Add test for memcpy expansion with hint.
[official-gcc.git] / gcc / ChangeLog
blob6c79e41f2db687d182d26e9a497b7eb2fa0a07ee
1 2018-08-27  Martin Liska  <mliska@suse.cz>
3         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
4         selected expansion strategy.
6 2018-08-27  Martin Liska  <mliska@suse.cz>
8         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
9         * builtins.c (is_builtin_fn): Likewise.
10         * attribs.c (diag_attr_exclusions): Use new function
11         fndecl_built_in_p and remove check for FUNCTION_DECL if
12         possible.
13         (builtin_mathfn_code): Likewise.
14         (fold_builtin_expect): Likewise.
15         (fold_call_expr): Likewise.
16         (fold_builtin_call_array): Likewise.
17         (fold_call_stmt): Likewise.
18         (set_builtin_user_assembler_name): Likewise.
19         (is_simple_builtin): Likewise.
20         * calls.c (gimple_alloca_call_p): Likewise.
21         (maybe_warn_nonstring_arg): Likewise.
22         * cfgexpand.c (expand_call_stmt): Likewise.
23         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
24         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
25         (cgraph_node::verify_node): Likewise.
26         * cgraphclones.c (build_function_decl_skip_args): Likewise.
27         (cgraph_node::create_clone): Likewise.
28         * config/arm/arm.c (arm_insert_attributes): Likewise.
29         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
30         * dse.c (scan_insn): Likewise.
31         * expr.c (expand_expr_real_1): Likewise.
32         * fold-const.c (operand_equal_p): Likewise.
33         (fold_binary_loc): Likewise.
34         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
35         * gimple-low.c (lower_stmt): Likewise.
36         * gimple-pretty-print.c (dump_gimple_call): Likewise.
37         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
38         * gimple.c (gimple_build_call_from_tree): Likewise.
39         (gimple_call_builtin_p): Likewise.
40         (gimple_call_combined_fn): Likewise.
41         * gimplify.c (gimplify_call_expr): Likewise.
42         (gimple_boolify): Likewise.
43         (gimplify_modify_expr): Likewise.
44         (gimplify_addr_expr): Likewise.
45         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
46         * ipa-cp.c (determine_versionability): Likewise.
47         * ipa-fnsummary.c (compute_fn_summary): Likewise.
48         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
49         * ipa-split.c (visit_bb): Likewise.
50         (split_function): Likewise.
51         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
52         * lto-cgraph.c (input_node): Likewise.
53         * lto-streamer-out.c (write_symbol): Likewise.
54         * omp-low.c (setjmp_or_longjmp_p): Likewise.
55         (lower_omp_1): Likewise.
56         * predict.c (strip_predict_hints): Likewise.
57         * print-tree.c (print_node): Likewise.
58         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
59         * trans-mem.c (is_tm_irrevocable): Likewise.
60         (is_tm_load): Likewise.
61         (is_tm_simple_load): Likewise.
62         (is_tm_store): Likewise.
63         (is_tm_simple_store): Likewise.
64         (is_tm_abort): Likewise.
65         (tm_region_init_1): Likewise.
66         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
67         * tree-cfg.c (verify_gimple_call): Likewise.
68         (move_stmt_r): Likewise.
69         (stmt_can_terminate_bb_p): Likewise.
70         * tree-eh.c (lower_eh_constructs_2): Likewise.
71         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
72         * tree-inline.c (remap_gimple_stmt): Likewise.
73         (copy_bb): Likewise.
74         (estimate_num_insns): Likewise.
75         (fold_marked_statements): Likewise.
76         * tree-sra.c (scan_function): Likewise.
77         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
78         (optimize_stack_restore): Likewise.
79         (pass_fold_builtins::execute): Likewise.
80         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
81         (mark_all_reaching_defs_necessary_1): Likewise.
82         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
83         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
84         (pass_forwprop::execute): Likewise.
85         * tree-ssa-loop-im.c (stmt_cost): Likewise.
86         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
87         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
88         * tree-ssa-strlen.c (get_string_length): Likewise.
89         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
90         (find_func_aliases_for_call): Likewise.
91         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
92         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
93         * tree-tailcall.c (find_tail_calls): Likewise.
94         * tree.c (need_assembler_name_p): Likewise.
95         (free_lang_data_in_decl): Likewise.
96         (get_call_combined_fn): Likewise.
97         * ubsan.c (is_ubsan_builtin_p): Likewise.
98         * varasm.c (incorporeal_function_p): Likewise.
99         * tree.h (DECL_BUILT_IN): Remove and replace with
100         fndecl_built_in_p.
101         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
102         (fndecl_built_in_p): New.
104 2018-08-27  Martin Liska  <mliska@suse.cz>
106         PR tree-optimization/86847
107         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
108         Dump also subtree probability.
109         (switch_decision_tree::do_jump_if_equal): New function.
110         (switch_decision_tree::emit_case_nodes): Handle special
111         situations in balanced tree that can be emitted much simpler.
112         Fix calculation of probabilities that happen in tree expansion.
113         * tree-switch-conversion.h (struct cluster): Add
114         is_single_value_p.
115         (struct simple_cluster): Likewise.
116         (struct case_tree_node): Add new function has_child.
117         (do_jump_if_equal): New.
119 2018-08-27  Martin Liska  <mliska@suse.cz>
121         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
122         Add new argument to bit_test_cluster constructor.
123         (bit_test_cluster::emit): Set bits really number of values
124         handlel by a test.
125         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
126         probability argument.
127         * tree-switch-conversion.h (struct bit_test_cluster):
128         Add m_handles_entire_switch.
130 2018-08-27  Martin Liska  <mliska@suse.cz>
132         PR tree-optimization/86702
133         * tree-switch-conversion.c (jump_table_cluster::emit):
134         Make probabilities even for values in jump table
135         according to number of cases handled.
136         (switch_decision_tree::compute_cases_per_edge): Pass
137         argument to reset_out_edges_aux function.
138         (switch_decision_tree::analyze_switch_statement): Likewise.
139         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
140         Make it static.
142 2018-08-27  Martin Liska  <mliska@suse.cz>
144         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
145         cfun argument explicitly.
146         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
147         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
148         function gimple_switch_default_bb.
149         (convert_switch_statements):
150         (expand_builtins):
151         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
152         * stmt.c (label_to_block_fn): Use label_to_block and pass
153         cfun argument explicitly and use gimple_switch_label_bb.
154         (expand_case): Likewise.
155         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
156         cfun argument explicitly. Likewise.
157         (make_edges_bb): Likewise.
158         (make_cond_expr_edges): Likewise.
159         (get_cases_for_edge): Likewise.
160         (make_gimple_switch_edges): Likewise.
161         (label_to_block_fn): Likewise.
162         (label_to_block): Likewise.
163         (make_goto_expr_edges): Likewise.
164         (make_gimple_asm_edges): Likewise.
165         (main_block_label): Likewise.
166         (group_case_labels_stmt): Likewise.
167         (find_taken_edge_computed_goto): Likewise.
168         (find_taken_edge_switch_expr): Likewise.
169         (gimple_verify_flow_info): Likewise.
170         (gimple_redirect_edge_and_branch): Likewise.
171         (gimple_switch_label_bb): New function.
172         (gimple_switch_default_bb): Likewise.
173         (gimple_switch_edge): Likewise.
174         (gimple_switch_default_edge): Likewise.
175         * tree-cfg.h (label_to_block_fn): Remove and replace ...
176         (label_to_block): ... with this.
177         (gimple_switch_label_bb): New.
178         (gimple_switch_default_bb): Likewise.
179         (gimple_switch_edge): Likewise.
180         (gimple_switch_default_edge): Likewise.
181         * tree-cfgcleanup.c (convert_single_case_switch): Use
182         new gimple functions and pass new argument to label_to_block.
183         (cleanup_control_flow_bb):
184         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
185         cfun argument explicitly.
186         (make_eh_edges): Likewise.
187         (redirect_eh_dispatch_edge): Likewise.
188         (lower_resx): Likewise.
189         (lower_eh_dispatch): Likewise.
190         (maybe_remove_unreachable_handlers): Likewise.
191         (unsplit_eh): Likewise.
192         (cleanup_empty_eh): Likewise.
193         (verify_eh_edges): Likewise.
194         (verify_eh_dispatch_edge): Likewise.
195         * tree-ssa-dom.c (record_edge_info): Likewise.
196         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
197         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
198         (thread_through_normal_block): Likewise.
199         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
200         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
201         * tree-switch-conversion.c (switch_conversion::collect): Use new
202         gimple functions.
203         (switch_conversion::check_final_bb): Likewise.
204         (switch_conversion::gather_default_values): Pass new argument
205         to label_to_block.
206         (switch_conversion::build_constructors): Likewise.
207         (switch_decision_tree::compute_cases_per_edge): Use new
208         gimple_switch_edge function.
209         (switch_decision_tree::analyze_switch_statement): Pass new argument
210         to label_to_block.
211         (switch_decision_tree::try_switch_expansion): Use
212         gimple_switch_default_edge.
213         * tree-vrp.c (find_switch_asserts): Pass new argument
214         to label_to_block.
215         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
216         (vr_values::simplify_switch_using_ranges): Likewise.
218 2018-08-27  Richard Biener  <rguenther@suse.de>
220         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
221         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
223         * tree-ssa-sccvn.h (struct vn_pval): New structure.
224         (struct vn_nary_op_s): Add unwind_to member.  Add
225         predicated_values flag and put result into a union together
226         with a linked list of vn_pval.
227         (struct vn_ssa_aux): Add name member to make maintaining
228         a map of SSA name to vn_ssa_aux possible.  Remove no longer
229         needed info, dfsnum, low, visited, on_sccstack, use_processed
230         and range_info_anti_range_p members.
231         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
232         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
233         New functions.
234         (vn_valueize): New global.
235         (vn_context_bb): Likewise.
236         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
237         VN_INFO_PTR_INFO): Remove.
238         * tree-ssa-sccvn.c: ... (rewrite)
239         (pass_fre::execute): For -O2+ initialize loops and run
240         RPO VN in optimistic mode (iterating).  For -O1 and -Og
241         run RPO VN in non-optimistic mode.
242         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
243         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
244         * doc/invoke.texi (sccvn-max-scc-size): Remove.
245         (rpo-vn-max-loop-depth): Document.
246         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
247         when valuezing the VUSE signals we walked out of the region.
248         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
249         (phi_translate): Set VN context block to use for availability
250         lookup.
251         (compute_avail): Likewise.
252         (pre_valueize): New function.
253         (pass_pre::execute): Adjust to the RPO VN API.
255         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
256         (propagate_constants_for_unrolling): Remove.
257         (tree_unroll_loops_completely): Perform value-numbering
258         on the unrolled bodies loop parent.
260 2018-08-27  Richard Biener  <rguenther@suse.de>
262         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
263         for partial antic compute.
265 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
267         PR rtl-optimization/87065
268         * combine.c (simplify_if_then_else): Formatting fix.
269         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
270         check.
271         (known_cond): Don't return const_true_rtx for vector modes.  Use
272         CONST0_RTX instead of const0_rtx.  Formatting fixes.
274 2018-08-27  Martin Liska  <mliska@suse.cz>
276         PR gcov-profile/87069
277         * gcov.c (process_file): Record files already processed
278         and warn about a file being processed multiple times.
280 2018-08-27  Martin Liska  <mliska@suse.cz>
282         PR driver/83193
283         * config/aarch64/aarch64.c (aarch64_override_options_internal):
284         Set default values for x_aarch64_*_string strings.
285         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
286         prefix.  For -mabi do not print '=ABI' in help and use
287         <option_value> format for -msve-vector-bits and -moverride
288         options.
290 2018-08-26  Jeff Law  <law@redhat.com>
292         * config/mips/frame-header-opt.c: Include "backend.h" rather than
293         "cfg.h"
295 2018-08-26  Marek Polacek  <polacek@redhat.com>
297         PR c++/87029, Implement -Wredundant-move.
298         * doc/invoke.texi: Document -Wredundant-move.
300 2018-08-25  Martin Sebor  <msebor@redhat.com>
302         PR tree-optimization/87059
303         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
304         to the same type as the other.
305         * fold-const.c (fold_binary_loc): Assert expectation.
307 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
309         * config/darwin.c (machopic_legitimize_pic_address): Clean up
310         extraneous parentheses, dead code section and formatting.
312 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
314         PR 87091
315         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
316         wide enough for jumps in the line-numbering to be visible.
317         (layout::print_gap_in_line_numbering): New member function.
318         (layout::calculate_line_spans): When using line numbering, merge
319         line spans that are only 1 line apart.
320         (diagnostic_show_locus): When printing line numbers, show gaps in
321         line numbering directly, rather than printing headers.
322         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
323         line-numbering with multiple line spans.
324         (selftest::test_fixit_insert_containing_newline_2): Add test of
325         line-numbering, in which the spans are close enough to be merged.
327 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
329         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
330         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
331         * tree-vrp.c (range_is_nonnull): Remove.
332         (range_includes_zero_p): Accept value_range instead of min/max.
333         (extract_range_from_binary_expr_1): Do not early bail on
334         POINTER_PLUS_EXPR.
335         Use range_includes_zero_p instead of range_is_nonnull.
336         (extract_range_from_unary_expr): Use range_includes_zero_p instead
337         of range_is_nonnull.
338         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
339         special case VR_ANTI_RANGE.
340         (vrp_finalize): Same.
341         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
342         instead of min/max.
343         (range_is_nonnull): Remove.
344         * vr-values.c (vrp_stmt_computes_nonzero): Use
345         range_includes_zero_p instead of range_is_nonnull.
346         (extract_range_basic): Pass value_range to range_includes_zero_p
347         instead of range_is_nonnull.
349 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
351         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
352         * emit-rtl.h (rtl_data): Remove return_bnd.
353         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
354         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
355         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
356         (POINTER_BOUNDS_MODE): Remove definition.
357         (make_pointer_bounds_mode): Remove.
358         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
359         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
360         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
361         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
362         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
363         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
364         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
366         * config/i386/i386-modes.def (BND32, BND64): Remove.
367         * config/i386/i386.c (dbx_register_map): Remove bound registers.
368         (dbx64_register_map): Ditto.
369         (svr4_dbx_register_map): Ditto.
370         (indirect_thunk_bnd_needed): Remove.
371         (indirect_thunks_bnd_used): Ditto.
372         (indirect_return_bnd_needed): Ditto.
373         (indirect_return_via_cx_bnd): Ditto.
374         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
375         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
376         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
377         (output_indirect_thunk_function): Remove handling of
378         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
379         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
380         (ix86_save_reg): Remove handling of crtl->return_bnd.
381         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
382         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
383         and UNSPEC_BNDLX_ADDR.
384         (ix86_output_indirect_branch_via_reg): Remove handling of
385         indirect_thunk_prefix_bnd.
386         (ix86_output_indirect_branch_via_push): Ditto.
387         (ix86_output_function_return): Ditto.
388         (ix86_output_indirect_function_return): Ditto.
389         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
390         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
391         (CALL_USED_REGISTERS): Ditto.
392         (REG_ALLOC_ORDER): Update for removal of bound registers.
393         (HI_REGISTER_NAMES): Ditto.
394         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
395         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
396         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
397         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
398         (FIRST_PSEUDO_REG): Update.
399         (BND): Remove mode iterator.
400         * config/i386/predicates.md (bnd_mem_operator): Remove.
402 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
404         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
405         vectors.
407 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
409         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
410         the case in which the permute needs only a single element and
411         repeats for every vector of the result.  Extend that case to
412         handle variable-length vectors.
413         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
415 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
417         PR debug/79342
418         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
419         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
421 2018-08-24  Richard Biener  <rguenther@suse.de>
423         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
424         bb_flags_allocated members.
425         (auto_flag): New RAII class for allocating flags.
426         (auto_edge_flag): New RAII class for allocating edge flags.
427         (auto_bb_flag): New RAII class for allocating bb flags.
428         * cfgloop.c (verify_loop_structure): Allocate temporary edge
429         flag dynamically.
430         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
431         in favor of temporarily allocated BB flag.
432         * hsa-brig.c: Re-order includes.
433         * hsa-dump.c: Likewise.
434         * hsa-regalloc.c: Likewise.
435         * print-rtl.c: Likewise.
436         * profile-count.c: Likewise.
438 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
440         PR target/86989
441         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
442         the TOC register.
444 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
446         PR 87073/bootstrap
447         * wide-int-range.cc (wide_int_range_div): Do not ignore result
448         from wide_int_range_multiplicative_op.
450 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
452         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
453         "permutaion".
455 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
457         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
458         to 'expanded'.
460 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
462         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
463         full GENERIC expression used for replacement.
465 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
467         * tree-vrp.c (abs_extent_range): Remove.
468         (extract_range_into_wide_ints): Pass wide ints by reference.
469         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
470         Pass wide ints by reference in all calls to
471         extract_range_into_wide_ints.
472         * wide-int-range.cc (wide_int_range_div): New.
473         * wide-int-range.h (wide_int_range_div): New.
474         (wide_int_range_includes_zero_p): New.
475         (wide_int_range_zero_p): New.
477 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
479         * config/aarch64/aarch64.md (arches): New enum.
480         (arch): New enum attr.
481         (arch_enabled): New attr.
482         (enabled): Now uses arch_enabled only.
483         (simd, sve, fp16): Removed attribute.
484         (fp): Attr now defined in terms of 'arch'.
485         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
486         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
487         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
488         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
489         attributes into 'arch'.
490         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
491         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
492         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
493         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
494         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
495         'simd' attribute into 'arch'.
496         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
497         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
498         Convert use of 'fp' attribute to 'arch'.
499         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
500         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
501         into 'arch'.
502         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
503         (different modes) Merge 'fp' and 'simd' into 'arch'.
504         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
505         'simd' into 'arch'.
507 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
509         PR rtl-optimization/87026
510         * expmed.c (canonicalize_comparison): If we can no longer create
511         pseudoregisters, don't.
513 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
515         PR target/86951
516         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
517         prototype.
518         * config/arm/arm.c (speculation_barrier_libfunc): New static
519         variable.
520         (arm_init_libfuncs): Initialize it.
521         (arm_emit_speculation_barrier): New function.
522         * config/arm/arm.md (speculation_barrier): Call
523         arm_emit_speculation_barrier for architectures that do not have
524         DSB or ISB.
525         (speculation_barrier_insn): Only match on Armv7 or later.
527 2018-08-23  Richard Biener  <rguenther@suse.de>
529         PR middle-end/87024
530         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
531         calls.
533 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
535         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
536         of single-vector TBLs.
537         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
538         one input is given.
540 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
542         PR target/85910
543         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
544         aarch64_evpc_tbl guard.
546 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
548         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
549         behaviour.
551 2018-08-22  Martin Sebor  <msebor@redhat.com>
553         PR middle-end/87052
554         * tree-pretty-print.c (pretty_print_string): Add argument.
555         (dump_generic_node): Call to pretty_print_string with string size.
557 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
559         PR rtl-optimization/86771
560         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
561         of two SETs into those two SETs, one to be placed at i2, if that SETs
562         destination is modified between i2 and i3.
564 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
566         PR tree-optimization/86725
567         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
568         function.
569         (vect_analyze_scalar_cycles_1): Check it.
571 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
573         PR tree-optimization/86725
574         * tree-vect-loop.c (vect_is_simple_reduction): When treating
575         an outer loop phi as a double reduction, make sure that the
576         single user of the phi result is an inner loop phi.
578 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
580         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
581         grouped stores with gaps to a strided group.
583 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
585         * tree-vect-stmts.c (get_group_load_store_type)
586         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
587         first statement in a group.
589 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
591         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
592         the sequence used in gcc/gcc.c.
594 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
596         PR other/704
597         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
598         building it.
600 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
602         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
603         Darwin10-specific unwinder-shim.
604         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
605         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC): 
606         New to cater for Darwin10 Rosetta.
608 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
610         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
611         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
613 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
615         PR bootstrap/81033
616         PR target/81733
617         PR target/52795
618         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
619         (dwarf2out_switch_text_section): Generate a local label for the
620         second function sub-section and apply it as the second FDE start
621         label.
622         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
623         second sub-section start.
625 2018-08-22  Richard Biener  <rguenther@suse.de>
627         PR tree-optimization/86988
628         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
630 2018-08-22  Richard Biener  <rguenther@suse.de>
632         PR tree-optimization/86945
633         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
635 2018-08-22  Alexandre Oliva <oliva@adacore.com>
637         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
638         a comment about how uses of r2 for .sdata2 come about.
640 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
642         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
644 2018-08-21  Marek Polacek  <polacek@redhat.com>
646         PR c++/86981, Implement -Wpessimizing-move.
647         * doc/invoke.texi: Document -Wpessimizing-move.
649 2018-08-21  Jan Hubicka  <jh@suse.cz>
651         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
652         * tree.h (is_redundant_typedef): Remove.
653         * dwarf2out.c (is_redundant_typedef): Turn into static function.
655 2018-08-21  Jan Hubicka  <jh@suse.cz>
657         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
658         when possible.
660 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
662         * expmed.c (extract_low_bits): Reject invalid subregs early.
664 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
666         PR middle-end/86121
667         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
668         behaviour.
670 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
672         * config/vxworks.h: Guard vxworks_asm_out_constructor and
673         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
674         * config/vxworks.c: Likewise.
676 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
678         * config/vxworks.c: Set targetm.have_ctors_dtors
679         if HAVE_INITFINI_ARRAY_SUPPORT.
680         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
681         if HAVE_INITFINI_ARRAY_SUPPORT.
683 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
685         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
686         default search path for VxWorks < 7.
688 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
690         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
691         (get_format_string): Refer to c_getstr.
693 2018-08-21  Tom de Vries  <tdevries@suse.de>
695         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
696         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
697         (debuginfo_early_stop): Declare.
698         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
699         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
700         (debuginfo_early_stop): New function.
701         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
702         and debuginfo_early_stop.
703         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
704         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
705         (general_init): Call debuginfo_early_init.
706         (finalize): Call debuginfo_fini.
707         (do_compile): Call debuginfo_init.
708         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
709         -fdump-early-debug.
710         (@item -fdump-debug, @item -fdump-earlydebug): Add.
712 2018-08-21  Tom de Vries  <tdevries@suse.de>
714         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
715         flag_dump_noaddr and flag_dump_unnumbered.
717 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
719         * wide-int-range.cc (wide_int_range_abs): New.
720         (wide_int_range_order_set): Rename from wide_int_range_min_max.
721         * wide-int-range.h (wide_int_range_abs): New.
722         (wide_int_range_min_max): New.
723         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
724         case to call wide_int_range_abs.
725         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
726         (extract_range_from_abs_expr): Delete.
728 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
730         PR target/87033
731         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
732         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
733         for indexed loads.
735 2018-08-20  Nathan Sidwell  <nathan@acm.org>
736             Jeff Law <law@redhat.com>
738         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
739         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
741 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
743         PR other/84889
744         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
745         (decl_attributes): Likewise.
746         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
747         instance.
748         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
749         * diagnostic-core.h (class auto_diagnostic_group): New class.
750         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
751         (diagnostic_report_diagnostic): Handle the first diagnostics within
752         a group.
753         (emit_diagnostic): Add auto_diagnostic_group instance.
754         (inform): Likewise.
755         (inform_n): Likewise.
756         (warning): Likewise.
757         (warning_at): Likewise.
758         (warning_n): Likewise.
759         (pedwarn): Likewise.
760         (permerror): Likewise.
761         (error): Likewise.
762         (error_n): Likewise.
763         (error_at): Likewise.
764         (sorry): Likewise.
765         (fatal_error): Likewise.
766         (internal_error): Likewise.
767         (internal_error_no_backtrace): Likewise.
768         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
769         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
770         * diagnostic.h (struct diagnostic_context): Add fields
771         "diagnostic_group_nesting_depth",
772         "diagnostic_group_emission_count", "begin_group_cb",
773         "end_group_cb".
774         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
775         Add auto_diagnostic_group instance(s).
776         (find_explicit_erroneous_behavior): Likewise.
777         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
778         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
779         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
780         (gimplify_va_arg_expr): Likewise.
781         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
782         (HSA_SORRY_AT): Likewise.
783         * ipa-devirt.c (compare_virtual_tables): Likewise.
784         (warn_odr): Likewise.
785         * multiple_target.c (expand_target_clones): Likewise.
786         * opts-common.c (cmdline_handle_error): Likewise.
787         * reginfo.c (globalize_reg): Likewise.
788         * substring-locations.c (format_warning_n_va): Likewise.
789         * tree-inline.c (expand_call_inline): Likewise.
790         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
791         * tree-ssa-loop-niter.c
792         (do_warn_aggressive_loop_optimizations): Likewise.
793         * tree-ssa-uninit.c (warn_uninit): Likewise.
794         * tree.c (warn_deprecated_use): Likewise.
796 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
798         PR target/87014
799         * config/i386/i386.md (eh_return): Always update EH return
800         address in word_mode.
802 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
804         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
805         TARGET_SPLIT_COMPLEX_ARG is defined.
807 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
809         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
811 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
813         PR target/86984
814         * expr.c (expand_assignment): Assert that bitpos is positive.
815         (store_field): Likewise
816         (expand_expr_real_1): Make sure that bitpos is positive.
817         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
818         integer overflow.
820 2018-08-20  Nathan Sidwell  <nathan@acm.org>
822         * Makefile.in (CPP_ID_DATA_H): Delete.
823         (CPP_INTERNAL_H): Don't add it.
824         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
825         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
827 2018-08-20  Richard Biener  <rguenther@suse.de>
829         PR tree-optimization/78655
830         * tree-vrp.c (extract_range_from_binary_expr_1): Make
831         pointer + offset nonnull if either operand is nonnull work.
833 2018-08-20  Tom de Vries  <tdevries@suse.de>
835         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
836         unless the referenced die describes the added property using
837         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
838         Otherwise, add a DW_AT_location to the referenced die.
840 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
842         PR target/86994
843         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
844         register_operand when calling ix86_set_reg_reg_cost.
845         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
846         Set *total to 0 for operands that satisfy x86_64_immediate_operand
847         predicate and to 1 otherwise.
849 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
851         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
852         emit a diagnostic that it is not supported and reset the option.
853         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
854         supported and consume the option.  (ASM_FINAL_SPEC): New.
856 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
858         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
859         a sentence.
861 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
863         C-SKY port: Documentation
865         * doc/extend.texi (C-SKY Function Attributes): New section.
866         * doc/invoke.texi (Option Summary): Add C-SKY options.
867         (C-SKY Options): New section.
868         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
870 2018-08-17  Jojo  <jijie_rong@c-sky.com>
871             Huibin Wang  <huibin_wang@c-sky.com>
872             Sandra Loosemore  <sandra@codesourcery.com>
873             Chung-Lin Tang  <cltang@codesourcery.com>
875         C-SKY port: Backend implementation
877         * config/csky/*: New.
878         * common/config/csky/*: New.
880 2018-08-17  Jojo  <jijie_rong@c-sky.com>
881             Huibin Wang  <huibin_wang@c-sky.com>
882             Sandra Loosemore  <sandra@codesourcery.com>
883             Chung-Lin Tang  <cltang@codesourcery.com>
884             Andrew Jenner  <andrew@codesourcery.com>
886         C-SKY port: Configury
888         * config.gcc (csky-*-*): New.
889         * configure.ac: Add csky to targets for dwarf2 debug_line support.
890         * configure: Regenerated.
892 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
894         * dump-context.h: Include "dumpfile.h".
895         (dump_context::dump_printf_va): Convert final param from va_list
896         to va_list *.  Convert from ATTRIBUTE_PRINTF to
897         ATTRIBUTE_GCC_DUMP_PRINTF.
898         (dump_context::dump_printf_loc_va): Likewise.
899         * dumpfile.c: Include "stringpool.h".
900         (make_item_for_dump_printf_va): Delete.
901         (make_item_for_dump_printf): Delete.
902         (class dump_pretty_printer): New class.
903         (dump_pretty_printer::dump_pretty_printer): New ctor.
904         (dump_pretty_printer::emit_items): New member function.
905         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
906         function.
907         (dump_pretty_printer::emit_item): New member function.
908         (dump_pretty_printer::stash_item): New member function.
909         (dump_pretty_printer::format_decoder_cb): New member function.
910         (dump_pretty_printer::decode_format): New member function.
911         (dump_context::dump_printf_va): Reimplement in terms of
912         dump_pretty_printer.
913         (dump_context::dump_printf_loc_va): Convert final param from va_list
914         to va_list *.
915         (dump_context::begin_scope): Reimplement call to
916         make_item_for_dump_printf.
917         (dump_printf): Update for change to dump_printf_va.
918         (dump_printf_loc): Likewise.
919         (selftest::test_capture_of_dump_calls): Convert "stmt" from
920         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
921         with %T, %E, and %G.
922         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
923         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
924         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
925         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
926         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
927         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
928         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
929         within a dump_printf_loc call to "%wu".
930         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
931         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
932         missing space after "=".
933         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
934         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
935         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
936         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
937         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
938         duplicate "vectorized" from message.
940 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
942         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
943         polyNxK_t element's TYPE_STRING_FLAG.
945 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
947         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
948         (they were unnamed before).  Fix comments.
950 2018-08-17  Nathan Sidwell  <nathan@acm.org>
952         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
954 2018-08-17  Richard Biener  <rguenther@suse.de>
956         PR tree-optimization/86841
957         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
959 2018-08-17  Martin Liska  <mliska@suse.cz>
961         * common.opt: Remove Warn, Init and Report for options with
962         Ignore/Deprecated flag. Warning is done automatically for
963         Deprecated flags.
964         * config/i386/i386.opt: Likewise.
965         * config/ia64/ia64.opt: Likewise.
966         * config/rs6000/rs6000.opt: Likewise.
967         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
968         Remove usage of flag_check_pointer_bounds.
969         * lto-wrapper.c (merge_and_complain): Do not handle
970         OPT_fcheck_pointer_bounds.
971         (append_compiler_options): Likewise.
972         * opt-functions.awk: Do not handle Deprecated.
973         * optc-gen.awk: Check that Var, Report and Init are not
974         used for an option with Ignore/Deprecated flag.
975         * opts-common.c (decode_cmdline_option): Do not report
976         CL_ERR_DEPRECATED.
977         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
978         options.
979         * opts.h (struct cl_option): Remove cl_deprecated flag.
980         (CL_ERR_DEPRECATED): Remove error enum value.
982 2018-08-17  Richard Biener  <rguenther@suse.de>
984         PR middle-end/86505
985         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
986         across a va-arg-pack using call adjust its return value accordingly.
988 2018-08-16  Martin Sebor  <msebor@redhat.com>
990         PR tree-optimization/86853
991         * gimple-ssa-sprintf.c (struct format_result): Rename member.
992         (struct fmtresult): Add member and initialize it in ctors.
993         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
994         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
995         (format_directive): Set POSUNDER4K when MAYFAIL is set.
996         (parse_directive): Handle %C same as %c.
997         (sprintf_dom_walker::compute_format_length): Adjust.
998         (is_call_safe): Adjust.
1000 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1002         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
1003         for determining how to count the elements.
1004         * builtins.h (c_strlen): Adjust prototype.
1005         * expr.c (string_constant): Add new parameter mem_size.
1006         Set *mem_size appropriately.
1007         * expr.h (string_constant): Adjust protoype.
1008         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
1009         * gimple-fold.h (get_range_strlen): Adjust prototype.
1010         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
1011         (format_string): Call get_string_length with eltsize.
1013 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
1015         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
1016         to emit the span, rather than setting it as the prefix.
1018 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
1020         * diagnostic-show-locus.c (layout::start_annotation_line): Add
1021         "margin_char" parameter, defaulting to space.  Use it in place
1022         of pp_space for the initial part of the margin.
1023         (layout::print_leading_fixits): Use '+' when filling the margin
1024         of line-insertion fix-it hints.
1026 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
1028         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
1029         Delete.
1031 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
1033         * config/rs6000/altivec.md: Don't set length attribute to the default
1034         value.
1035         * config/rs6000/darwin.md: Ditto.
1036         * config/rs6000/dfp.md: Ditto.
1037         * config/rs6000/htm.md: Ditto.
1038         * config/rs6000/rs6000.md: Ditto.
1039         * config/rs6000/sync.md: Ditto.
1040         * config/rs6000/vsx.md: Ditto.
1042 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
1044         * config/rs6000/altivec.md: Don't set length attribute to the default
1045         value, for branch instructions.
1046         * config/rs6000/darwin.md: Ditto.
1047         * config/rs6000/rs6000.md: Ditto.
1049 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
1051         * config/rs6000/rs6000.md (length): Always define as const_int 4.
1052         (unnamed conditional branch define_insn): Set length to 4 or 8
1053         depending on offset.
1054         (<bd>_<mode>): Similar, for alternative 0.
1055         (<bd>tf_<mode>): Ditto.
1057 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
1059         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
1061 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
1063         * doc/rtl.texi: Replace old RTX class names with new names.
1066 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
1068         * expmed.h (canonicalize_comparison): New declaration.
1069         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
1070         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
1071         * optabs.c (prepare_cmp_insn): Likewise.
1072         * rtl.h (unsigned_condition_p): New function which checks if a
1073         comparison operator is unsigned.
1075 2018-08-16  Nathan Sidwell  <nathan@acm.org>
1077         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
1078         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
1080 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
1082         PR target/84711
1083         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
1084         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
1085         (mov<mov>): ..this and enable unconditionally.
1087 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
1089         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
1091 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
1093         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
1094         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
1095         "Common" with "Target".
1097 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
1099         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
1100         * doc/invoke.texi (mmitigate-rop): Remove.
1101         * config/i386/i386.c: Do not include "regrename.h".
1102         (ix86_rop_should_change_byte_p, reg_encoded_number)
1103         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
1104         Remove.
1105         (ix86_reorg): Remove call to ix86_mitigate_rop.
1106         * config/i386/i386.md (attr "modrm_class"): Remove.
1107         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
1108         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
1109         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
1111 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
1113         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
1114         allow folding of mergeh() and mergel() for the float and double types.
1115         (fold_mergehl_helper): Rework to handle building a permute tree
1116         for float vectors.
1118 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
1120         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
1121         for TARGET_SSE.
1123 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
1125         * common.opt (fdiagnostics-show-labels): New option.
1126         * diagnostic-show-locus.c (class layout_range): Add field
1127         "m_label".
1128         (class layout): Add field "m_show_labels_p".
1129         (layout_range::layout_range): Add param "label" and use it to
1130         initialize m_label.
1131         (make_range): Pass in NULL for new "label" param of layout_range's
1132         ctor.
1133         (layout::layout): Initialize m_show_labels_p.
1134         (layout::maybe_add_location_range): Pass in loc_range->m_label
1135         when constructing layout_range instances.
1136         (struct line_label): New struct.
1137         (layout::print_any_labels): New member function.
1138         (layout::print_line): Call it if label-printing is enabled.
1139         (selftest::test_one_liner_labels): New test.
1140         (selftest::test_diagnostic_show_locus_one_liner): Call it.
1141         * diagnostic.c (diagnostic_initialize): Initialize
1142         context->show_labels_p.
1143         * diagnostic.h (struct diagnostic_context): Add field
1144         "show_labels_p".
1145         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
1146         -fno-diagnostics-show-labels.
1147         * dwarf2out.c (gen_producer_string): Add
1148         OPT_fdiagnostics_show_labels to the ignored options.
1149         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
1150         param.
1151         (gcc_rich_location::maybe_add_expr): Likewise.
1152         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
1153         label" param, defaulting to NULL.
1154         (gcc_rich_location::add_expr): Add "label" param.
1155         (gcc_rich_location::maybe_add_expr): Likewise.
1156         (class text_range_label): New class.
1157         (class range_label_for_type_mismatch): New class.
1158         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
1159         of format_warning_va.
1160         (fmtwarn_n): Likewise for new params of format_warning_n_va.
1161         * lto-wrapper.c (merge_and_complain): Add
1162         OPT_fdiagnostics_show_labels to the "pick one setting" options.
1163         (append_compiler_options): Likewise to the dropped options.
1164         (append_diag_options): Likewise to the passed-on options.
1165         * opts.c (common_handle_option): Handle the new option.
1166         * selftest-diagnostic.c
1167         (test_diagnostic_context::test_diagnostic_context): Enable
1168         show_labels_p.
1169         * substring-locations.c: Include "gcc-rich-location.h".
1170         (format_warning_n_va): Add "fmt_label" and "param_label" params
1171         and use them as appropriate.
1172         (format_warning_va): Add "fmt_label" and "param_label" params,
1173         passing them on to format_warning_n_va.
1174         (format_warning_at_substring): Likewise.
1175         (format_warning_at_substring_n): Likewise.
1176         * substring-locations.h (format_warning_va): Add "fmt_label" and
1177         "param_label" params.
1178         (format_warning_n_va): Likewise.
1179         (format_warning_at_substring): Likewise.
1180         (format_warning_at_substring_n): Likewise.
1181         * toplev.c (general_init): Initialize global_dc->show_labels_p.
1183 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
1185         PR testsuite/86519
1186         * builtins.c (expand_builtin_memcmp): Do not expand the call
1187         when overflow is detected.
1189 2018-08-15  Martin Sebor  <msebor@redhat.com>
1191         PR tree-optimization/71625
1192         * config/aarch64/aarch64-builtins.c
1193         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
1195 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
1197         * config/s390/s390.c (s390_reorg): Remove loop.
1199 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
1201         * config/darwin.c
1202          (darwin_function_switched_text_sections): Delete.
1203         * gcc/config/darwin.h
1204          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
1206 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
1208         PR target/81685
1209         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
1210         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
1211         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
1213 2018-08-15  Martin Liska  <mliska@suse.cz>
1215         PR tree-optimization/86925
1216         * predict.c (expr_expected_value_1): When taking
1217         later predictor, assign also probability.
1218         Use fold_build2_initializer_loc in order to fold
1219         the expression in -frounding-math.
1221 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
1223         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
1224         patterns.
1225         (expand_vec_perm_1): Try the new method.
1227 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
1229         PR target/86547
1230         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
1231         Check whether lra_live_max_point is 0 before dividing.
1233 2018-08-14  Martin Sebor  <msebor@redhat.com>
1235         PR tree-optimization/86650
1236         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
1237         (vrp_prop::check_mem_ref): Same.
1239 2018-08-13  Liu Hao <lh_mouse@126.com>
1241         * pretty-print.c (eat_esc_sequence): Swap the foreground and
1242         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
1243         and clear it thereafter, as it only works for DBCS.
1245 2018-08-13  Liu Hao <lh_mouse@126.com>
1247         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
1248         handle returned by _get_osf_handle().
1250 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
1252         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
1253         for folding vec_perm.
1255 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
1257         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
1258         Add support for gimple-folding of vec_pack() and vec_unpack()
1259         intrinsics.
1261 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
1263         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
1264         vec_xst variants to the list.
1265         (rs6000_gimple_fold_builtin): Add support for folding unaligned
1266         vector loads and stores.
1268 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
1270         * config.gcc (rs6000-ibm-aix4.x): Delete.
1271         (rs6000-ibm-aix5.1): Delete.
1272         (rs6000-ibm-aix5.2): Delete.
1273         (rs6000-ibm-aix5.3): Delete.
1274         * config/rs6000/aix43.h: Delete.
1275         * config/rs6000/aix51.h: Delete.
1276         * config/rs6000/aix52.h: Delete.
1277         * config/rs6000/t-aix43: Delete.
1279 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
1281         * config/s390/s390.c (s390_decompose_constant_pool_ref):
1282         New function.
1283         (s390_decompose_address): Factor out constant pool ref
1284         decomposition.
1286 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
1288         * config/nds32/nds32-predicates.c
1289         (nds32_can_use_bclr_p): Change return type as bool.
1290         (nds32_can_use_bset_p): Ditto.
1291         (nds32_can_use_btgl_p): Ditto.
1292         (nds32_can_use_bitci_p): Ditto.
1293         * config/nds32/nds32-protos.h
1294         (nds32_can_use_bclr_p): Change declaration.
1295         (nds32_can_use_bset_p): Ditto.
1296         (nds32_can_use_btgl_p): Ditto.
1297         (nds32_can_use_bitci_p): Ditto.
1299 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
1301         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
1302         Support -msched-prolog-epilog option.
1303         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
1305 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
1307         * common/config/nds32/nds32-common.c
1308         (nds32_option_optimization_table): Enalbe -malways-align.
1310 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
1312         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
1313         extra_headers.
1314         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
1315         OPT_misr_secure_ case.
1316         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
1317         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
1318         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
1319         secure attribute.
1320         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
1321         (nds32_isr_info): New field security_level.
1322         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
1323         * config/nds32/nds32.md (return_internal): Consider critical attribute.
1324         * config/nds32/nds32.opt (misr-secure): New option.
1325         * config/nds32/nds32_init.inc: New file.
1326         * config/nds32/nds32_isr.h: New file.
1328 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
1330         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
1331         Update comment for atomic instructions.
1332         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
1333         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
1334         Remove.
1335         (atomic_loaddi): Revise fence expansion to only emit fence prior to
1336         load for __ATOMIC_SEQ_CST model.
1337         (atomic_loaddi_1): Remove float register target.
1338         (atomic_storedi): Handle CONST_INT values.
1339         (atomic_storedi_1): Remove float register source.  Add special case
1340         for zero value.
1341         (memory_barrier): New expander and insn.
1343 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
1345         PR tree-optimization/86835
1346         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
1347         new_stmt after def_gsi, make sure to insert new_square_stmt after
1348         that stmt, not 2 stmts before it.
1350 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
1352         PR target/82418
1353         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
1354         instead of SWI48.
1356 2018-08-10  Martin Liska  <mliska@suse.cz>
1358         PR target/83610
1359         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
1360         function type.
1361         * builtins.c (expand_builtin_expect_with_probability):
1362         New function.
1363         (expand_builtin_expect_with_probability): New function.
1364         (build_builtin_expect_predicate): Add new argumnet probability
1365         for BUILT_IN_EXPECT_WITH_PROBABILITY.
1366         (fold_builtin_expect):
1367         (fold_builtin_2):
1368         (fold_builtin_3):
1369         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
1370         * builtins.h (fold_builtin_expect): Set new argument.
1371         * doc/extend.texi: Document __builtin_expect_with_probability.
1372         * doc/invoke.texi: Likewise.
1373         * gimple-fold.c (gimple_fold_call): Pass new argument.
1374         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
1375         also BUILT_IN_EXPECT_WITH_PROBABILITY.
1376         * predict.c (get_predictor_value): New function.
1377         (expr_expected_value): Add new argument probability. Assume
1378         that predictor and probability are always non-null.
1379         (expr_expected_value_1): Likewise.  For __builtin_expect and
1380         __builtin_expect_with_probability set probability.  Handle
1381         combination in binary expressions.
1382         (tree_predict_by_opcode): Simplify code by simply calling
1383         get_predictor_value.
1384         (pass_strip_predict_hints::execute): Add handling of
1385         BUILT_IN_EXPECT_WITH_PROBABILITY.
1386         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
1387         new predictor.
1388         * tree.h (DECL_BUILT_IN_P): New function.
1390 2018-08-10  Martin Liska  <mliska@suse.cz>
1392         PR tree-optimization/85799
1393         * passes.def: Add argument for pass_strip_predict_hints.
1394         * predict.c (class pass_strip_predict_hints): Add new argument
1395         early_p.
1396         (strip_predictor_early): New function.
1397         (pass_strip_predict_hints::execute): Call the function to
1398         strip predictors.
1399         (strip_predict_hints): New function.
1400         * predict.def: Fix comment.
1402 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
1404         * Makefile.in: Clarify which tm.texi to copy over to assert the
1405         right to grant a GFDL license for all.
1407 2018-08-09  Jeff Law  <law@redhat.com>
1409         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
1410         unused variable.
1412 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
1414         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
1415         prototype.
1417 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
1419         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
1420         reductions for variable-length vectors.
1422 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
1424         PR other/84889
1425         * common.opt (fdiagnostics-show-line-numbers): New option.
1426         * diagnostic-show-locus.c (class layout): Add fields
1427         "m_show_line_numbers_p" and "m_linenum_width";
1428         (num_digits): New function.
1429         (test_num_digits): New function.
1430         (layout::layout): Initialize new fields.  Update m_x_offset
1431         logic to handle any left margin.
1432         (layout::print_source_line): Print line number when requested.
1433         (layout::start_annotation_line): New member function.
1434         (layout::print_annotation_line): Call it.
1435         (layout::print_leading_fixits): Likewise.
1436         (layout::print_trailing_fixits): Likewise.  Update calls to
1437         move_to_column for new parameter.
1438         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
1439         it to potentially call start_annotation_line.
1440         (layout::show_ruler): Call start_annotation_line.
1441         (selftest::test_line_numbers_multiline_range): New selftest.
1442         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
1443         and selftest::test_line_numbers_multiline_range.
1444         * diagnostic.c (diagnostic_initialize): Initialize
1445         show_line_numbers_p.
1446         * diagnostic.h (struct diagnostic_context): Add field
1447         "show_line_numbers_p".
1448         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
1449         -fno-diagnostics-show-line-numbers.
1450         * dwarf2out.c (gen_producer_string): Add
1451         OPT_fdiagnostics_show_line_numbers to the ignored options.
1452         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
1453         one setting" options.
1454         (append_compiler_options): Likewise to the dropped options.
1455         (append_diag_options): Likewise to the passed-on options.
1456         * opts.c (common_handle_option): Handle the new option.
1457         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
1459 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1461         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
1462         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
1463         third argument of type "const signed char" to descriptions of
1464         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
1465         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
1466         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
1467         __builtin_bcdsub_ov functions.
1469 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
1471         PR tree-optimization/86858
1472         * tree-vect-loop.c (vect_is_simple_reduction): Restore
1473         flow_bb_inside_loop_p calls.
1475 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
1477         PR tree-optimization/86871
1478         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
1479         instead of gimple_assign_lhs.
1481 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
1483         PR target/86887
1484         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
1485         register constraint to operand 0.
1486         (add<mode>3_carryinC): Likewise.
1487         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
1489 2018-08-09  Martin Liska  <mliska@suse.cz>
1491         PR c/86895
1492         * common.opt: Remove extra line.
1494 2018-08-09  Martin Liska  <mliska@suse.cz>
1496         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
1497         at the end of a line, make first letter capital and end up
1498         a sentence with a dot.
1499         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
1500         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
1501         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
1502         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
1503         (PARAM_MAX_ISL_OPERATIONS): Likewise.
1504         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
1505         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
1506         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
1507         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
1508         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
1509         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
1510         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
1511         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
1512         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
1513         (PARAM_TREE_REASSOC_WIDTH): Likewise.
1514         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
1515         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
1516         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
1518 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
1520         PR target/84332
1521         * config/s390/s390.c (s390_option_override_internal): Reduce the
1522         stack-clash-protection-probe-interval param if it would be too big
1523         for z900.
1525 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
1527         PR target/46179
1528         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
1529         * config/m68k/m68k.c (handle_move_double): Don't call
1530         m68k_final_prescan_insn.
1531         (m68k_adjust_decorated_operand): Renamed from
1532         m68k_final_prescan_insn, remove first and third operand and
1533         simplify.
1534         (print_operand): Call it.
1535         (print_operand_address): Call it.
1537 2018-08-08  Nathan Sidwell  <nathan@acm.org>
1539         * diagnostic.c (diagnostic_report_current_module): Use
1540         linemap_included_from & linemap_included_from_linemap.
1542 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
1544         * config/aarch64/aarch64-cores.def: Add phecda core.
1545         * config/aarch64/aarch64-tune.md: Regenerate.
1546         * doc/invoke.texi: Add phecda core.
1548 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
1550         PR target/85295
1551         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
1552         definitions.
1553         * config/s390/s390.md ("movti"): Add more alternatives for
1554         constant to GPR copies.
1556 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
1558         * config/s390/s390.c: Fix whitespace damage throughout the file.
1559         * config/s390/s390.h: Likewise.
1560         * config/s390/tpf.h: Likewise.
1562 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
1564         * config/s390/s390.c (s390_loadrelative_operand_p):
1565         Remove TARGET_CPU_ZARCH usages.
1566         (s390_rtx_costs): Likewise.
1567         (s390_legitimate_constant_p): Likewise.
1568         (s390_cannot_force_const_mem): Likewise.
1569         (legitimate_reload_constant_p): Likewise.
1570         (s390_preferred_reload_class): Likewise.
1571         (legitimize_pic_address): Likewise.
1572         (legitimize_tls_address): Likewise.
1573         (s390_split_branches): Removed.
1574         (s390_add_execute): Removed.
1575         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
1576         (s390_mainpool_start): Likewise.
1577         (s390_mainpool_finish): Likewise.
1578         (s390_mainpool_cancel): Removed.
1579         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
1580         (s390_chunkify_cancel): Likewise.
1581         (s390_return_addr_rtx): Likewise.
1582         (s390_register_info): Remove split_branches_pending_p uages.
1583         (s390_optimize_register_info): Likewise.
1584         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
1585         split_branches_pending_p usages.
1586         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
1587         (s390_load_got): Likewise.
1588         (s390_expand_split_stack_prologue): Likewise.
1589         (output_asm_nops): Likewise.
1590         (s390_function_profiler): Likewise.
1591         (s390_emit_call): Likewise.
1592         (s390_conditional_register_usage): Likewise.
1593         (s390_optimize_prologue): Likewise.
1594         (s390_reorg): Remove TARGET_CPU_ZARCH and
1595         split_branches_pending_p usages.
1596         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
1597         usages.
1598         (s390_output_indirect_thunk_function): Likewise.
1599         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
1600         (TARGET_CPU_ZARCH_P): Removed.
1601         (struct machine_function): Remove split_branches_pending_p.
1602         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
1604 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
1606         * common/config/s390/s390-common.c (processor_flags_table):
1607         Remove flags.
1608         * config.gcc: Remove with_arch/with_tune support.
1609         * config/s390/2064.md: Remove cpu attribute comparisons.
1610         * config/s390/driver-native.c (s390_host_detect_local_cpu):
1611         Remove MTN.
1612         * config/s390/linux.h (ASM_SPEC):
1613         Remove -march support.
1614         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
1615         Use a table to get an arch level.
1616         * config/s390/s390-opts.h (enum processor_type):
1617         Remove enum values.
1618         * config/s390/s390.c
1619         (processor_table): Remove entries, add arch_level values.
1620         (s390_issue_rate): Remove cases.
1621         (s390_option_override): Adjust
1622         s390_option_override_internal() call.
1623         (s390_option_override_internal): Remove deprecation warning.
1624         (s390_valid_target_attribute_tree): Adjust
1625         s390_option_override_internal() call.
1626         * config/s390/s390.h (struct s390_processor):
1627         Share with s390-c.c, add arch_level field.
1628         * config/s390/s390.md:
1629         Remove occurrences in cpu attribute.
1630         * config/s390/s390.opt: Remove -march/-mtune support.
1631         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
1632         * doc/invoke.texi: Remove deprecation warning.
1634 2018-08-08  Luis Machado  <luis.machado@linaro.org>
1636         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
1637         global.
1638         (qdf24xx_tunings): Set vector cost structure to
1639         qdf24xx_vector_cost.
1641         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
1642         <register_sextend>: Set to 3.
1644 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
1646         PR target/86838
1647         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
1648         * config/aarch64/aarch64-simd.md
1649         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
1650         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
1651         (aarch64_frecpx<mode>): ...this new pattern.
1652         * config/aarch64/aarch64-simd-builtins.def: Remove comment
1653         about aarch64_frecp<FRECP:frecp_suffix><mode>.
1655 2018-08-07  Martin Liska  <mliska@suse.cz>
1657         PR middle-end/83023
1658         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
1659         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
1660         * predict.def (PRED_MALLOC_NONNULL): New predictor.
1661         * doc/extend.texi: Document that malloc attribute adds
1662         hit to compiler.
1664 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
1666         PR target/86785
1667         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1668         Define to speculation_safe_value_not_needed.
1670 2018-08-06  Jeff Law  <law@redhat.com>
1672         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
1673         the vr_values instance to cprop_into_stmt.
1674         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
1675         (cprop_operand): Also query EVRP to determine if OP is a constant.
1677 2018-08-06  Nathan Sidwell  <nathan@acm.org>
1679         * diagnostic.c (diagnostic_report_current_module): Reroll
1680         included-at loop.  Translate text.
1682 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
1684         * function-tests.c (selftest::test_expansion_to_rtl): Call
1685         free_after_compilation.
1687 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1689         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
1691 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
1693         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
1694         loops with memory block operations from getting unrolled.
1696 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
1698         PR target/86807
1699         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1700         Define to speculation_safe_value_not_needed.
1702 2018-08-06  Jeff Law  <law@redhat.com>
1704         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
1705         assert.
1707 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1709         PR target/86662
1710         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
1711         with all enabled __intN types.
1713         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
1715 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1717         * alias.c (record_set): Check for clobber high.
1718         * cfgexpand.c (expand_gimple_stmt): Likewise.
1719         * combine-stack-adj.c (single_set_for_csa): Likewise.
1720         * combine.c (find_single_use_1): Likewise.
1721         (set_nonzero_bits_and_sign_copies): Likewise.
1722         (get_combine_src_dest): Likewise.
1723         (is_parallel_of_n_reg_sets): Likewise.
1724         (try_combine): Likewise.
1725         (record_dead_and_set_regs_1): Likewise.
1726         (reg_dead_at_p_1): Likewise.
1727         (reg_dead_at_p): Likewise.
1728         * dce.c (deletable_insn_p): Likewise.
1729         (mark_nonreg_stores_1): Likewise.
1730         (mark_nonreg_stores_2): Likewise.
1731         * df-scan.c (df_find_hard_reg_defs): Likewise.
1732         (df_uses_record): Likewise.
1733         (df_get_call_refs): Likewise.
1734         * dwarf2out.c (mem_loc_descriptor): Likewise.
1735         * haifa-sched.c (haifa_classify_rtx): Likewise.
1736         * ira-build.c (create_insn_allocnos): Likewise.
1737         * ira-costs.c (scan_one_insn): Likewise.
1738         * ira.c (equiv_init_movable_p): Likewise.
1739         (rtx_moveable_p): Likewise.
1740         (interesting_dest_for_shprep): Likewise.
1741         * jump.c (mark_jump_label_1): Likewise.
1742         * postreload-gcse.c (record_opr_changes): Likewise.
1743         * postreload.c (reload_cse_simplify): Likewise.
1744         (struct reg_use): Add source expr.
1745         (reload_combine): Check for clobber high.
1746         (reload_combine_note_use): Likewise.
1747         (reload_cse_move2add): Likewise.
1748         (move2add_note_store): Likewise.
1749         * print-rtl.c (print_pattern): Likewise.
1750         * recog.c (decode_asm_operands): Likewise.
1751         (store_data_bypass_p): Likewise.
1752         (if_test_bypass_p): Likewise.
1753         * regcprop.c (kill_clobbered_value): Likewise.
1754         (kill_set_value): Likewise.
1755         * reginfo.c (reg_scan_mark_refs): Likewise.
1756         * reload1.c (maybe_fix_stack_asms): Likewise.
1757         (eliminate_regs_1): Likewise.
1758         (elimination_effects): Likewise.
1759         (mark_not_eliminable): Likewise.
1760         (scan_paradoxical_subregs): Likewise.
1761         (forget_old_reloads_1): Likewise.
1762         * reorg.c (find_end_label): Likewise.
1763         (try_merge_delay_insns): Likewise.
1764         (redundant_insn): Likewise.
1765         (own_thread_p): Likewise.
1766         (fill_simple_delay_slots): Likewise.
1767         (fill_slots_from_thread): Likewise.
1768         (dbr_schedule): Likewise.
1769         * resource.c (update_live_status): Likewise.
1770         (mark_referenced_resources): Likewise.
1771         (mark_set_resources): Likewise.
1772         * rtl.c (copy_rtx): Likewise.
1773         * rtlanal.c (reg_referenced_p): Likewise.
1774         (single_set_2): Likewise.
1775         (noop_move_p): Likewise.
1776         (note_stores): Likewise.
1777         * sched-deps.c (sched_analyze_reg): Likewise.
1778         (sched_analyze_insn): Likewise.
1780 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1782         * cse.c (invalidate_reg): New function extracted from...
1783         (invalidate): ...here.
1784         (canonicalize_insn): Check for clobber high.
1785         (invalidate_from_clobbers): invalidate clobber highs.
1786         (invalidate_from_sets_and_clobbers): Likewise.
1787         (count_reg_usage): Check for clobber high.
1788         (insn_live_p): Likewise.
1789         * cselib.c (cselib_expand_value_rtx_1):Likewise.
1790         (cselib_invalidate_regno): Check for clobber in setter.
1791         (cselib_invalidate_rtx): Pass through setter.
1792         (cselib_invalidate_rtx_note_stores):
1793         (cselib_process_insn): Check for clobber high.
1794         * cselib.h (cselib_invalidate_rtx): Add operand.
1796 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1798         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
1799         (mark_not_eliminable): Likewise.
1800         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
1801         * lra-lives.c (process_bb_lives): Check for clobber high.
1802         * lra.c (new_insn_reg): Remember clobber highs.
1803         (collect_non_operand_hard_regs): Check for clobber high.
1804         (lra_set_insn_recog_data): Likewise.
1805         (add_regs_to_insn_regno_info): Likewise.
1806         (lra_update_insn_regno_info): Likewise.
1808 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1810         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
1811         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
1813 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1815         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
1816         (copy_insn_1): Likewise.
1817         (gen_hard_reg_clobber_high): New gen function.
1818         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
1819         * genemit.c (gen_exp): Likewise.
1820         (gen_emit_seq): Pass through info.
1821         (gen_insn): Check for CLOBBER_HIGH.
1822         (gen_expand): Pass through info.
1823         (gen_split): Likewise.
1824         (output_add_clobbers): Likewise.
1825         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
1826         (remove_clobbers): Likewise.
1827         * rtl.h (gen_hard_reg_clobber_high): New declaration.
1829 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1831         * doc/rtl.texi (clobber_high): Add.
1832         (parallel): Add in clobber high
1833         * rtl.c (rtl_check_failed_code3): Add function.
1834         * rtl.def (CLOBBER_HIGH): Add expression.
1835         * rtl.h (RTL_CHECKC3): Add macro.
1836         (rtl_check_failed_code3): Add declaration.
1837         (XC3EXP): Add macro.
1839 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
1841         PR target/86386
1842         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
1843         cfun->machine->max_used_stack_alignment if needed.
1845 2018-08-04  Martin Sebor  <msebor@redhat.com>
1847         PR tree-optimization/86571
1848         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
1849         NaN output to 4.
1851 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
1853         PR target/86799
1854         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1855         Define.
1857 2018-08-03  Jeff Law  <law@redhat.com>
1859         PR target/86795
1860         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1861         Define to speculation_safe_value_not_needed.
1863 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
1865         * doc/gcov.texi (-x): Remove duplicate "to".
1866         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
1867         (-Wif-not-aligned): Remove duplicate "is".
1868         (-flto): Remove duplicate "the".
1869         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
1870         duplicate "v5.00.b".
1871         (MSP430 Options): Remove duplicate "and" from the description
1872         of "-mgprel-sec=regexp".
1873         (x86 Options): Remove duplicate copies of "vmldLog102" and
1874         vmlsLog104 from description of "-mveclibabi=type".
1876 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
1878         * internal-fn.h (first_commutative_argument): Declare.
1879         * internal-fn.c (first_commutative_argument): New function.
1880         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
1881         restrictions for pattern statements.  Use first_commutative_argument
1882         to look for commutative operands in calls to internal functions.
1884 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
1886         * Makefile.in (wide-int-range.o): New.
1887         * tree-vrp.c: Move all the wide_int_* functions to...
1888         * wide-int-range.cc: ...here.
1889         * tree-vrp.h: Move all the wide_int_* prototypes to...
1890         * wide-int-range.h: ...here.
1892 2018-08-03  Tom de Vries  <tdevries@suse.de>
1894         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
1895         UI_NONE.
1896         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
1897         * except.c (output_function_exception_table): Do early exit if
1898         targetm_common.except_unwind_info (&global_options) == UI_NONE.
1900 2018-08-03  Martin Liska  <mliska@suse.cz>
1902         * predict.c (dump_prediction): Change to 2 digits
1903         in fraction part.
1905 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
1907         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
1908         neon_dup_q to...
1909         (falkor_am_1_gtov_gtov): ... a new insn reservation.
1911 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
1913         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
1914         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
1915         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
1916         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
1917         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
1919 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
1921         * diagnostic-show-locus.c (diagnostic_show_locus): Use
1922         pp_take_prefix when saving the existing prefix.
1923         * diagnostic.c (diagnostic_append_note): Likewise.
1924         * langhooks.c (lhd_print_error_function): Likewise.
1925         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
1926         param's type.  Free the existing prefix.
1927         (pp_take_prefix): New function.
1928         (pretty_printer::pretty_printer): Drop the prefix parameter.
1929         Rename the length parameter to match the comment.
1930         (pretty_printer::~pretty_printer): Free the prefix.
1931         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
1932         parameter.
1933         (struct pretty_printer): Drop the "const" from "prefix" field's
1934         type and clarify memory management.
1935         (pp_set_prefix): Drop the "const" from the 2nd param.
1936         (pp_take_prefix): New decl.
1938 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
1940         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
1941         for word_mode_ok here instead of passing as argument.
1942         (expand_block_compare): Change select_block_compare_mode() call.
1943         (expand_strncmp_gpr_sequence): New function.
1944         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
1946 2018-08-02  Jeff Law  <law@redhat.com>
1948         PR target/86790
1949         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1950         Define to speculation_safe_value_not_needed.
1952         PR target/86784
1953         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1954         Define to speculation_safe_value_not_needed.
1956 2018-08-02  Tom de Vries  <tdevries@suse.de>
1958         PR target/86660
1959         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
1960         function.  Return UI_TARGET unconditionally.
1961         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
1962         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
1964 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
1966         * genemit.c (print_overload_test): Fix typo.
1968 2018-08-02  Richard Biener  <rguenther@suse.de>
1970         PR tree-optimization/86816
1971         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
1972         which checks for value availability before querying it.
1973         (gvn_uses_equal): Use it.
1974         (same_succ_hash): Likewise.
1975         (gimple_equal_p): Likewise.
1977 2018-08-02  Nick Clifton  <nickc@redhat.com>
1979         PR target/86813
1980         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1981         Define to speculation_safe_value_not_needed.
1983         PR target/86810
1984         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1985         Define to speculation_safe_value_not_needed.
1987         PR target/86810
1988         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1989         Define to speculation_safe_value_not_needed.
1991         PR target/86803
1992         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1993         Define to speculation_safe_value_not_needed.
1995         PR target/86797
1996         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1997         Define to speculation_safe_value_not_needed.
1999         PR target/86791
2000         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2001         Define to speculation_safe_value_not_needed.
2003         PR target/86789
2004         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2005         Define to speculation_safe_value_not_needed.
2007         PR target/86787
2008         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2009         Define to speculation_safe_value_not_needed.
2011         PR target/86782
2012         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
2013         speculation_safe_value_not_needed.
2015         PR target/86781
2016         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
2017         to speculation_safe_value_not_needed.
2019 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
2021         * doc/md.texi: Expand the documentation of instruction names
2022         to mention port-local uses.  Document '@' in pattern names.
2023         * read-md.h (overloaded_instance, overloaded_name): New structs.
2024         (mapping): Declare.
2025         (md_reader::handle_overloaded_name): New member function.
2026         (md_reader::get_overloads): Likewise.
2027         (md_reader::m_first_overload): New member variable.
2028         (md_reader::m_next_overload_ptr): Likewise.
2029         (md_reader::m_overloads_htab): Likewise.
2030         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
2031         m_next_overload_ptr and m_overloads_htab.
2032         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
2033         (get_mode_token, get_code_token, get_int_token): New functions.
2034         (map_attr_string): Add an optional argument that passes back
2035         the associated iterator.
2036         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
2037         (md_reader::handle_overloaded_name, add_overload_instance): New
2038         functions.
2039         (apply_iterators): Handle '@' names.  Report an error if '@'
2040         is used without iterators.
2041         (initialize_iterators): Initialize the new iterator_group fields.
2042         * genopinit.c (handle_overloaded_code_for)
2043         (handle_overloaded_gen): New functions.
2044         (main): Use them to print declarations of maybe_code_for_* and
2045         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
2046         * genemit.c (print_overload_arguments, print_overload_test)
2047         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
2048         (main): Use it to print definitions of maybe_code_for_* and
2049         maybe_gen_* functions.
2050         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
2051         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
2052         instead of explicit mode checks.
2053         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
2054         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
2055         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
2056         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
2057         (aarch64_expand_compare_and_swap): Likewise
2058         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
2059         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
2060         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
2061         (aarch64_constant_pool_reload_icode): Delete.
2062         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
2063         instead of aarch64_constant_pool_reload_icode.  Use
2064         code_for_aarch64_reload_mov instead of explicit mode checks.
2065         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
2066         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
2067         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
2068         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
2069         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
2070         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
2071         (aarch64_atomic_load_op_code): Delete.
2072         (aarch64_emit_atomic_load_op): Likewise.
2073         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
2074         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
2075         instead of aarch64_emit_atomic_load_op.
2076         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
2077         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
2078         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
2079         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
2080         character before the pattern name.
2081         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
2082         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
2083         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
2084         (aarch64_frecps<mode>): Likewise.
2085         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
2086         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
2087         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
2088         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
2089         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
2091 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
2093         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
2094         Allow HFmode constants if TARGET_FP_F16INST.
2096 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
2098         PR target/86014
2099         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
2100         No longer check last store for clobber of address register.
2102 2018-08-02  Martin Liska  <mliska@suse.cz>
2104         PR gcov-profile/86817
2105         * gcov.c (process_all_functions): New function.
2106         (main): Call it.
2107         (process_file): Move functions processing to
2108         process_all_functions.
2110 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
2112         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
2113         "const" to the "gimple *" and "rtx_insn *" parameters.
2114         * dumpfile.h (dump_user_location_t::dump_user_location_t):
2115         Likewise.
2116         (dump_location_t::dump_location_t): Likewise.
2118 2018-08-01  Martin Sebor  <msebor@redhat.com>
2120         PR tree-optimization/86650
2121         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
2122         rather than a "gcall *".  Directly pass the data of interest
2123         to percent_K_format, rather than building a temporary CALL_EXPR
2124         to hold it.
2125         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
2126         (gimple_fold_builtin_strncat): Adjust.
2127         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
2128         gcall* argument with gimple*.
2129         * gimple-ssa-warn-restrict.c (check_call): Same.
2130         (wrestrict_dom_walker::before_dom_children): Same.
2131         (builtin_access::builtin_access): Same.
2132         (check_bounds_or_overlap): Same
2133         (maybe_diag_overlap): Same.
2134         (maybe_diag_offset_bounds): Same.
2135         * tree-diagnostic.c (default_tree_printer): Move usage of
2136         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
2137         to this callsite.
2138         * tree-pretty-print.c (percent_K_format): Add argument.
2139         * tree-pretty-print.h: Add argument.
2140         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
2141         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
2142         (maybe_diag_stxncpy_trunc): Same.
2143         (handle_builtin_stxncpy): Same.
2144         (handle_builtin_strcat): Same.
2146 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2148         * match.pd: Optimise pointer range checks.
2150 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2152         PR tree-optimization/86758
2153         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
2154         to remove pattern statements.
2156 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2158         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
2159         result of dfs_enumerate_from when constructing stmt_vec_infos,
2160         instead of additionally calling get_loop_body.
2162 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2164         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
2165         parameter.
2166         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
2167         When creating an iv, assert that the step is not known to be zero.
2168         (vect_setup_realignment): Update call accordingly.
2169         * tree-vect-stmts.c (vectorizable_store): Likewise.
2170         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
2172 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2174         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
2175         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
2176         (vectorizable_reduction): Likewise.
2177         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2178         (vect_detect_hybrid_slp_stmts): Likewise.
2179         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2181 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
2183         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
2184         (wide_int_set_zero_nonzero_bits): ...this.
2185         (zero_nonzero_bits_from_vr): Rename to...
2186         (vrp_set_zero_nonzero_bits): ...this.
2187         (extract_range_from_multiplicative_op_1): Abstract wide int
2188         code...
2189         (wide_int_range_multiplicative_op): ...here.
2190         (extract_range_from_binary_expr_1): Extract wide int binary
2191         operations into their own functions.
2192         (wide_int_range_lshift): New.
2193         (wide_int_range_can_optimize_bit_op): New.
2194         (wide_int_range_shift_undefined_p): New.
2195         (wide_int_range_bit_xor): New.
2196         (wide_int_range_bit_ior): New.
2197         (wide_int_range_bit_and): New.
2198         (wide_int_range_trunc_mod): New.
2199         (extract_range_into_wide_ints): New.
2200         (vrp_shift_undefined_p): New.
2201         (extract_range_from_multiplicative_op): New.
2202         (vrp_can_optimize_bit_op): New.
2203         * tree-vrp.h (value_range::dump): New.
2204         (wide_int_range_multiplicative_op): New.
2205         (wide_int_range_lshift):New.
2206         (wide_int_range_shift_undefined_p): New.
2207         (wide_int_range_bit_xor): New.
2208         (wide_int_range_bit_ior): New.
2209         (wide_int_range_bit_and): New.
2210         (wide_int_range_trunc_mod): New.
2211         (zero_nonzero_bits_from_bounds): Rename to...
2212         (wide_int_set_zero_nonzero_bits): ...this.
2213         (zero_nonzero_bits_from_vr): Rename to...
2214         (vrp_set_zero_nonzero_bits): ...this.
2215         (range_easy_mask_min_max): Rename to...
2216         (wide_int_range_can_optimize_bit_op): this.
2217         * vr-values.c (simplify_bit_ops_using_ranges): Rename
2218         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
2220 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2222         * tree-vectorizer.h (vect_orig_stmt): New function.
2223         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
2224         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
2225         (vect_create_epilog_for_reduction): Likewise.
2226         (vectorizable_live_operation): Likewise.
2227         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
2228         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
2229         * tree-vect-stmts.c (vectorizable_call): Likewise.
2230         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
2232 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2234         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
2235         argument.
2236         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
2237         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
2238         (vect_transform_loop): Likewise.
2239         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
2241 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2243         * tree-vectorizer.h (vect_schedule_slp): Return void.
2244         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
2245         (vect_schedule_slp): Likewise.
2247 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2249         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
2250         argument.
2251         (vect_transform_loop): Update calls accordingly.  Schedule SLP
2252         instances before the main loop, if any exist.
2254 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2256         PR tree-optimization/86749
2257         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
2258         If the lhs is used in a COND_EXPR, check that it is being used
2259         as the "then" or "else" value.
2261 2018-08-01  Tom de Vries  <tdevries@suse.de>
2263         PR target/86800
2264         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
2265         speculation_safe_value_not_needed.
2267 2018-08-01  Richard Biener  <rguenther@suse.de>
2269         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
2270         as base and offset.
2272 2018-08-01  Martin Liska  <mliska@suse.cz>
2274         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
2275         format how successful transformation is dumped.
2276         (gimple_mod_pow2_value_transform): Likewise.
2277         (gimple_mod_subtract_transform): Likewise.
2278         (gimple_stringops_transform): Likewise.
2280 2018-08-01  Martin Liska  <mliska@suse.cz>
2282         PR value-prof/35543
2283         * value-prof.c (interesting_stringop_to_profile_p):
2284         Simplify the code and add BUILT_IN_MEMMOVE.
2285         (gimple_stringops_transform): Likewise.
2287 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
2289         * config/aarch64/aarch64-simd.md
2290         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
2291         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
2292         use GPI iterator instead of SI mode.
2294 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
2296         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
2297         rs6000_speculation_barrier.
2298         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
2299         new barrier pattern name.
2301 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
2303         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
2304         (speculation_barrier): New insn.
2306 2018-08-01  Richard Biener  <rguenther@suse.de>
2308         PR bootstrap/86724
2309         * graphite.h: Include isl/id.h and isl/space.h to allow build
2310         with ISL 0.20.
2312 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
2314         PR target/86651
2315         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
2316         mode for COFF targets.
2317         * defaults.h (TARGET_COFF): Define.
2318         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
2319         TARGET_COFF): Define.
2320         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
2321         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
2322         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
2324 2018-07-31  Alexandre Oliva <oliva@adacore.com>
2326         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
2327         * gimple-streamer-out.c (output_bb): Save it.
2328         * lto-streamer-in.c (input_struct_function_base): Restore
2329         instance discriminator if available.  Create map on demand.
2330         * lto-streamer-out.c (output_struct_function_base): Save it if
2331         available.
2332         * final.c (decl_to_instance_map): Document LTO strategy.
2334 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
2335             Olivier Hainque  <hainque@adacore.com>
2337         * debug.h (decl_to_instance_map_t): New type.
2338         (decl_to_instance_map): Declare.
2339         (maybe_create_decl_to_instance_map): New inline function.
2340         * final.c (bb_discriminator, last_bb_discriminator): New statics,
2341         to track basic block discriminators.
2342         (final_start_function_1): Initialize them.
2343         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
2344         bb_discriminator.
2345         (decl_to_instance_map): New variable.
2346         (map_decl_to_instance, maybe_set_discriminator): New functions.
2347         (notice_source_line): Set discriminator.
2349 2018-07-31  Ian Lance Taylor  <iant@golang.org>
2351         * targhooks.c (default_have_speculation_safe_value): Add
2352         ATTRIBUTE_UNUSED.
2354 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
2356         * dump-context.h: Include "pretty-print.h".
2357         (dump_context::refresh_dumps_are_enabled): New decl.
2358         (dump_context::emit_item): New decl.
2359         (class dump_context): Add fields "m_test_pp" and
2360         "m_test_pp_flags".
2361         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
2362         (temp_dump_context::get_dumped_text): New decl.
2363         (class temp_dump_context): Add field "m_pp".
2364         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
2365         (dump_context::refresh_dumps_are_enabled): ...and add a test for
2366         m_test_pp.
2367         (set_dump_file): Update for above change.
2368         (set_alt_dump_file): Likewise.
2369         (dump_loc): New overload, taking a pretty_printer *.
2370         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
2371         to any test pretty-printer.
2372         (make_item_for_dump_gimple_stmt): New function, adapted from
2373         optinfo::add_gimple_stmt.
2374         (dump_context::dump_gimple_stmt): Call it, and use the result,
2375         eliminating the direct usage of dump_file and alt_dump_file in
2376         favor of indirectly using them via emit_item.
2377         (make_item_for_dump_gimple_expr): New function, adapted from
2378         optinfo::add_gimple_expr.
2379         (dump_context::dump_gimple_expr): Call it, and use the result,
2380         eliminating the direct usage of dump_file and alt_dump_file in
2381         favor of indirectly using them via emit_item.
2382         (make_item_for_dump_generic_expr): New function, adapted from
2383         optinfo::add_tree.
2384         (dump_context::dump_generic_expr): Call it, and use the result,
2385         eliminating the direct usage of dump_file and alt_dump_file in
2386         favor of indirectly using them via emit_item.
2387         (make_item_for_dump_printf_va): New function, adapted from
2388         optinfo::add_printf_va.
2389         (make_item_for_dump_printf): New function.
2390         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
2391         and use the result, eliminating the direct usage of dump_file and
2392         alt_dump_file in favor of indirectly using them via emit_item.
2393         (make_item_for_dump_dec): New function.
2394         (dump_context::dump_dec): Call it, and use the result,
2395         eliminating the direct usage of dump_file and alt_dump_file in
2396         favor of indirectly using them via emit_item.
2397         (make_item_for_dump_symtab_node): New function, adapted from
2398         optinfo::add_symtab_node.
2399         (dump_context::dump_symtab_node): Call it, and use the result,
2400         eliminating the direct usage of dump_file and alt_dump_file in
2401         favor of indirectly using them via emit_item.
2402         (dump_context::begin_scope): Reimplement, avoiding direct usage
2403         of dump_file and alt_dump_file in favor of indirectly using them
2404         via emit_item.
2405         (dump_context::emit_item): New member function.
2406         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
2407         Set up test pretty-printer on the underlying context.  Call
2408         refresh_dumps_are_enabled.
2409         (temp_dump_context::~temp_dump_context): Call
2410         refresh_dumps_are_enabled.
2411         (temp_dump_context::get_dumped_text): New member function.
2412         (selftest::verify_dumped_text): New function.
2413         (ASSERT_DUMPED_TEXT_EQ): New macro.
2414         (selftest::test_capture_of_dump_calls): Run all tests twice, with
2415         and then without optinfo enabled.  Add uses of
2416         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
2417         * dumpfile.h: Update comment for the dump_* API.
2418         * optinfo-emit-json.cc
2419         (selftest::test_building_json_from_dump_calls): Update for new
2420         param for temp_dump_context ctor.
2421         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
2422         and "m_owned" field.
2423         (optinfo_item::~optinfo_item): Likewise.
2424         (optinfo::add_item): New member function.
2425         (optinfo::emit): Update comment.
2426         (optinfo::add_string): Delete.
2427         (optinfo::add_printf): Delete.
2428         (optinfo::add_printf_va): Delete.
2429         (optinfo::add_gimple_stmt): Delete.
2430         (optinfo::add_gimple_expr): Delete.
2431         (optinfo::add_tree): Delete.
2432         (optinfo::add_symtab_node): Delete.
2433         (optinfo::add_dec): Delete.
2434         * optinfo.h (class dump_context): New forward decl.
2435         (optinfo::add_item): New decl.
2436         (optinfo::add_string): Delete.
2437         (optinfo::add_printf): Delete.
2438         (optinfo::add_printf_va): Delete.
2439         (optinfo::add_gimple_stmt): Delete.
2440         (optinfo::add_gimple_expr): Delete.
2441         (optinfo::add_tree): Delete.
2442         (optinfo::add_symtab_node): Delete.
2443         (optinfo::add_dec): Delete.
2444         (optinfo::add_poly_int): Delete.
2445         (optinfo_item::optinfo_item): Remove "owned" param.
2446         (class optinfo_item): Remove field "m_owned".
2448 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2450         PR middle-end/86705
2451         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
2452         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
2453         requested variable alignment.
2454         (expand_one_ssa_partition): Likewise.
2455         (expand_one_var): Likewise.
2457 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
2459         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
2460         to speculation_safe_value_not_needed.
2462 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
2464         * targhooks.h (speculation_safe_value_not_needed): New prototype.
2465         * targhooks.c (speculation_safe_value_not_needed): New function.
2466         * target.def (have_speculation_safe_value): Update documentation.
2467         * doc/tm.texi: Regenerated.
2469 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
2471         * config/aarch64/iterators.md (ALLI_TI): New iterator.
2472         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
2473         expand.
2474         (despeculate_copy<ALLI:mode>_insn): New insn.
2475         (despeculate_copyti_insn): New insn.
2476         (despeculate_simple<ALLI:mode>): New insn
2477         (despeculate_simpleti): New insn.
2478         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
2479         function.
2480         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
2481         aarch64_speculation_safe_value.
2482         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
2484 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
2486         * config/aarch64/aarch64-speculation.cc: New file.
2487         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
2488         before pass_reorder_blocks.
2489         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
2490         prototype.
2491         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
2492         X14 and X15 when tracking speculation.
2493         * config/aarch64/aarch64.md (register name constants): Add
2494         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
2495         (unspec): Add UNSPEC_SPECULATION_TRACKER.
2496         (speculation_barrier): New insn attribute.
2497         (cmp<mode>): Allow SP in comparisons.
2498         (speculation_tracker): New insn.
2499         (speculation_barrier): Add speculation_barrier attribute.
2500         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
2501         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
2502         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
2504 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
2506         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
2507         aarch64_track_speculation is true.
2508         (tb<optab><mode>1): Likewise.
2509         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
2510         generate CB[N]Z when tracking speculation.
2511         (aarch64_split_compare_and_swap): Likewise.
2512         (aarch64_split_atomic_op): Likewise.
2514 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
2516         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
2518 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
2520         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
2521         (speculation_barrier): New insn.
2523 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
2525         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
2526         * config/arm/arm.md (speculation_barrier): New expand.
2527         (speculation_barrier_insn): New pattern.
2529 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
2531         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
2532         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
2533         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
2534         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
2535         list.
2536         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
2537         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
2538         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
2539         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
2540         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
2541         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
2542         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
2543         * builtins.c (expand_speculation_safe_value): New function.
2544         (expand_builtin): Call it.
2545         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
2546         * doc/extend.texi: Document __builtin_speculation_safe_value.
2547         * doc/md.texi: Document "speculation_barrier" pattern.
2548         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
2549         TARGET_HAVE_SPECULATION_SAFE_VALUE.
2550         * doc/tm.texi: Regenerated.
2551         * target.def (have_speculation_safe_value, speculation_safe_value): New
2552         hooks.
2553         * targhooks.c (default_have_speculation_safe_value): New function.
2554         (default_speculation_safe_value): New function.
2555         * targhooks.h (default_have_speculation_safe_value): Add prototype.
2556         (default_speculation_safe_value): Add prototype.
2558 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
2560         * dump-context.h (dump_context::dump_loc): New decl.
2561         * dumpfile.c (dump_context::dump_loc): New member function.
2562         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
2563         and dump_gimple_stmt.
2564         (dump_context::dump_gimple_expr_loc): Likewise, using
2565         dump_gimple_expr.
2566         (dump_context::dump_generic_expr_loc): Likewise, using
2567         dump_generic_expr.
2568         (dump_context::dump_printf_loc_va): Likewise, using
2569         dump_printf_va.
2570         (dump_context::begin_scope): Explicitly using the global function
2571         "dump_loc", rather than the member function.
2573 2018-07-31  Martin Sebor  <msebor@redhat.com>
2575         PR tree-optimization/86741
2576         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
2578 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
2580         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
2581         depend on whether prefetch instructions will be emitted or not.
2582         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
2583         will be emitted or not.
2584         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
2585         (TARGET_SETMEM_PFD): New macros.
2587 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2589         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
2590         (NULL_STMT_VEC_INFO): Delete.
2591         (stmt_vec_info::operator*): Likewise.
2592         (stmt_vec_info::operator gimple *): Likewise.
2593         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
2594         of NULL_STMT_VEC_INFO.
2595         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2596         (vect_reassociating_reduction_p): Likewise.
2597         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
2598         (vectorizable_store): Likewise.
2599         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
2600         (vec_info::free_stmt_vec_infos): Likewise.
2602 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2604         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
2605         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
2607 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2609         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
2610         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
2611         (vec_info::free_stmt_vec_info): New private member functions.
2612         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
2613         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
2614         * tree-parloops.c (gather_scalar_reductions): Remove calls to
2615         set_stmt_vec_info_vec and free_stmt_vec_infos.
2616         * tree-vect-loop.c (_loop_vec_info): Remove call to
2617         set_stmt_vec_info_vec.
2618         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
2619         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
2620         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
2621         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
2622         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
2623         assignments in {vec_info::,}new_stmt_vec_info that are redundant
2624         with the clearing in the xcalloc.
2625         (stmt_vec_info_vec): Delete.
2626         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
2627         (vectorize_loops): Likewise.
2628         (vec_info::~vec_info): Remove argument from call to
2629         free_stmt_vec_infos.
2630         (vec_info::add_stmt): Remove vinfo argument from call to
2631         new_stmt_vec_info.
2633 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2635         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
2636         rather than a gimple stmt.
2637         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
2638         information for pattern statements when passed the original
2639         statement; instead wait to be passed the pattern statement itself.
2640         Don't call set_vinfo_for_stmt here.
2641         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
2642         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
2643         stmt_vec_infos here.
2644         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
2645         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
2646         stmt_vec_infos entry.
2648 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2650         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
2651         * tree-vectorizer.c (vec_info::replace_stmt): New function.
2652         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
2653         * tree-vect-stmts.c (vectorizable_call): Likewise.
2654         (vectorizable_simd_clone_call): Likewise.
2656 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2658         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
2659         * tree-vectorizer.c (vec_info::remove_stmt): New function.
2660         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
2661         * tree-vect-loop.c (vect_transform_loop): Likewise.
2662         * tree-vect-slp.c (vect_schedule_slp): Likewise.
2663         * tree-vect-stmts.c (vect_remove_stores): Likewise.
2665 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2667         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
2668         (vect_dr_stmt): Delete.
2669         * tree-vectorizer.c (vec_info::lookup_dr): New function.
2670         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
2671         of DR_VECT_AUX.
2672         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
2673         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
2674         (vect_verify_datarefs_alignment, vect_peeling_supportable)
2675         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
2676         (vect_analyze_data_refs): Likewise.
2677         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
2678         argument.
2679         (vect_find_same_alignment_drs): Likewise.
2680         (vect_slp_analyze_node_dependences): Update calls accordingly.
2681         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
2682         instead of DR_VECT_AUX.
2683         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
2684         of a vector data references.  Use vec_info::lookup_dr instead of
2685         DR_VECT_AUX.
2686         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
2687         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
2688         instead of DR_VECT_AUX.
2690 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2692         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
2693         dr_vec_info.
2694         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
2695         accordingly.
2696         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2697         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2698         (vect_gen_prolog_loop_niters): Likewise.
2700 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2702         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
2703         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
2704         (vect_known_alignment_in_bytes, vect_dr_behavior)
2705         (vect_get_scalar_dr_size): Take references as dr_vec_infos
2706         instead of data_references.  Update calls to other routines for
2707         which the same change has been made.
2708         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
2709         dr_vec_infos instead of stmt_vec_infos.
2710         (vect_analyze_data_ref_dependence): Update call accordingly.
2711         (vect_slp_analyze_data_ref_dependence)
2712         (vect_record_base_alignments): Use DR_VECT_AUX.
2713         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
2714         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
2715         (vector_alignment_reachable_p, vect_get_data_access_cost)
2716         (vect_peeling_supportable, vect_analyze_group_access_1)
2717         (vect_analyze_group_access, vect_analyze_data_ref_access)
2718         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
2719         (vect_compile_time_alias, vect_small_gap_p)
2720         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
2721         (vect_supportable_dr_alignment): Take references as dr_vec_infos
2722         instead of data_references.  Update calls to other routines for
2723         which the same change has been made.
2724         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
2725         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
2726         (vect_slp_analyze_and_verify_node_alignment)
2727         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
2728         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
2729         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
2730         above changes.
2731         (_vect_peel_info::dr): Replace with...
2732         (_vect_peel_info::dr_info): ...this new field.
2733         (vect_peeling_hash_get_most_frequent)
2734         (vect_peeling_hash_choose_best_peeling): Update accordingly.
2735         (vect_peeling_hash_get_lowest_cost):
2736         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
2737         routines for which the same change has been made.
2738         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
2739         data_reference.
2740         * tree-vect-loop-manip.c (get_misalign_in_elems)
2741         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
2742         above changes.
2743         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2744         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
2745         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
2746         (get_group_load_store_type, get_negative_load_store_type)
2747         (vect_get_data_ptr_increment, vectorizable_store)
2748         (vectorizable_load): Likewise.
2749         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
2750         Update calls to other routines for which the same change has been made.
2752 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2754         * tree-vectorizer.h (vec_info::move_dr): New member function.
2755         (dataref_aux): Rename to...
2756         (dr_vec_info): ...this and add "dr" and "stmt" fields.
2757         (_stmt_vec_info::dr_aux): Update accordingly.
2758         (_stmt_vec_info::data_ref_info): Delete.
2759         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
2760         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
2761         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
2762         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
2763         of data_ref.
2764         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
2765         (STMT_VINFO_DR_INFO): New macro.
2766         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
2767         (set_dr_misalignment): Update after rename of dataref_aux.
2768         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
2769         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
2770         initialization of STMT_VINFO_DATA_REF.
2771         * tree-vectorizer.c (vec_info::move_dr): New function.
2772         * tree-vect-patterns.c (vect_recog_bool_pattern)
2773         (vect_recog_mask_conversion_pattern)
2774         (vect_recog_gather_scatter_pattern): Use it.
2775         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
2776         the "dr" and "stmt" fields of dr_vec_info instead of
2777         STMT_VINFO_DATA_REF.
2779 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2781         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
2782         (is_pattern_stmt_p): Use it.
2783         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
2784         on pattern statements.
2786 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2788         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
2789         original stmt as a stmt_vec_info rather than a gimple stmt.
2790         (vect_pattern_recog_1): Take the statement directly as a
2791         stmt_vec_info, rather than via a gimple_stmt_iterator.
2792         Update call to vect_mark_pattern_stmts.
2793         (vect_pattern_recog): Update calls accordingly.
2795 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2797         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
2798         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
2799         a vect_def_type for the first argument.
2800         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
2801         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
2802         operand if it isn't defined by a vectorized statement.
2803         (vect_build_gather_load_calls): Remove the mask_dt argument and
2804         update calls to vect_get_vec_def_for_stmt_copy.
2805         (vectorizable_bswap): Likewise the dt argument.
2806         (vectorizable_call): Update calls to vectorizable_bswap and
2807         vect_get_vec_def_for_stmt_copy.
2808         (vectorizable_simd_clone_call, vectorizable_assignment)
2809         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
2810         (vectorizable_comparison): Update calls to
2811         vect_get_vec_def_for_stmt_copy.
2812         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
2813         vect_is_simple_use.
2814         (vect_get_loop_based_defs): Remove dt argument and update call
2815         to vect_get_vec_def_for_stmt_copy.
2816         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
2817         and vect_get_vec_def_for_stmt_copy.
2818         (vectorizable_load): Update calls to vect_build_gather_load_calls
2819         and vect_get_vec_def_for_stmt_copy.
2820         * tree-vect-loop.c (vect_create_epilog_for_reduction)
2821         (vectorizable_reduction, vectorizable_live_operation): Update calls
2822         to vect_get_vec_def_for_stmt_copy.
2824 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2826         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
2827         and gimple stmt arguments with a stmt_vec_info.
2828         (vect_record_base_alignments): Update calls accordingly.
2829         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
2830         and gimple stmt arguments with a stmt_vec_info.
2831         (vect_build_slp_tree_1): Remove vinfo argument and update call
2832         to vect_record_max_nunits.
2833         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
2834         and vect_record_max_nunits.
2836 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2838         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
2839         file and take a stmt_vec_info instead of a gimple stmt.
2840         (supportable_widening_operation, vect_finish_replace_stmt)
2841         (vect_finish_stmt_generation, vect_get_store_rhs)
2842         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
2843         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
2844         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
2845         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
2846         (vect_create_data_ref_ptr, bump_vector_ptr)
2847         (vect_permute_store_chain, vect_setup_realignment)
2848         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
2849         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
2850         (vectorizable_reduction, vectorizable_induction)
2851         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
2852         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
2853         than gimple stmts as arguments.
2854         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
2855         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
2856         (can_group_stmts_p, vect_check_gather_scatter)
2857         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
2858         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
2859         (vect_permute_load_chain, vect_shift_permute_load_chain)
2860         (vect_transform_grouped_load)
2861         (vect_record_grouped_load_vectors): Likewise.
2862         * tree-vect-loop.c (vect_fixup_reduc_chain)
2863         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
2864         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
2865         (vectorizable_reduction, vectorizable_induction)
2866         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
2867         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
2868         (vect_get_load_store_mask): Likewise.
2869         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
2870         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
2871         * tree-vect-stmts.c (vect_mark_relevant)
2872         (is_simple_and_all_uses_invariant)
2873         (exist_non_indexing_operands_for_use_p, process_use)
2874         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
2875         (vect_get_vec_def_for_operand, vect_get_vec_defs)
2876         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
2877         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
2878         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
2879         (get_negative_load_store_type, get_load_store_type)
2880         (vect_check_load_store_mask, vect_check_store_rhs)
2881         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
2882         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2883         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2884         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2885         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
2886         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
2887         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
2888         (supportable_widening_operation): Likewise.
2890 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2892         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
2893         a stmt_vec_info instead of a gcall.
2894         (vect_check_gather_scatter): Update call accordingly.
2895         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
2896         of a gphi.
2897         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
2898         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
2899         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
2900         instead of a gimple stmt.
2901         (vect_transform_loop): Update calls accordingly.
2902         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
2903         stmt_vec_infos instead of gimple stmts.
2904         (vect_analyze_slp_instance): Update use accordingly.
2905         * tree-vect-stmts.c (read_vector_array, write_vector_array)
2906         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
2907         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
2908         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
2909         (vect_gen_widened_results_half, vect_get_loop_based_defs)
2910         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
2911         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
2912         down to subroutines.
2914 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2916         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
2917         of the worklist from a vector of gimple stmts to a vector of
2918         stmt_vec_infos.
2919         * tree-vect-stmts.c (vect_mark_relevant, process_use)
2920         (vect_mark_stmts_to_be_vectorized): Likewise
2922 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2924         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
2925         statement before passing it to vect_analyze_stmt.
2926         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
2927         the chain of phi vector definitions.  Track the exit phi via its
2928         stmt_vec_info.
2929         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
2930         STMT_VINFO_REDUC_DEF.
2931         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
2932         stmt_vec_infos to handle the statement chains.
2933         (vect_get_slp_defs): Record the first statement in the node
2934         using a stmt_vec_info.
2935         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
2936         statements here and pass their stmt_vec_info down to subroutines.
2937         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
2938         down to vect_finish_stmt_generation.
2939         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
2940         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
2941         stmt_vec_infos to subroutines.
2942         (vect_remove_stores): Use stmt_vec_infos to handle the statement
2943         chains.
2945 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2947         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
2948         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
2949         (vect_permute_store_chain, vect_setup_realignment)
2950         (vect_permute_load_chain, vect_shift_permute_load_chain)
2951         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
2952         stmts internally, and when passing values to other vectorizer routines.
2953         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
2954         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
2955         (vect_analyze_loop_operations, get_initial_def_for_reduction)
2956         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
2957         (vectorizable_reduction, vectorizable_induction)
2958         (vectorizable_live_operation, vect_transform_loop_stmt)
2959         (vect_transform_loop): Likewise.
2960         * tree-vect-patterns.c (vect_reassociating_reduction_p)
2961         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
2962         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
2963         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2964         (vect_slp_analyze_node_operations_1): Likewise.
2965         * tree-vect-stmts.c (vect_mark_relevant, process_use)
2966         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
2967         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
2968         (vect_finish_stmt_generation_1, get_group_load_store_type)
2969         (get_load_store_type, vect_build_gather_load_calls)
2970         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2971         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2972         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2973         (vectorizable_store, vectorizable_load, vectorizable_condition)
2974         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
2975         (supportable_widening_operation): Likewise.
2976         (vect_get_vector_types_for_stmt): Likewise.
2977         * tree-vectorizer.h (vect_dr_behavior): Likewise.
2979 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2981         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
2982         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
2983         (vect_permute_store_chain, vect_permute_load_chain)
2984         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
2985         repeated stmt_vec_info lookups.
2986         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
2987         (vect_update_ivs_after_vectorizer): Likewise.
2988         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
2989         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
2990         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
2991         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2992         (vect_bb_slp_scalar_cost): Likewise.
2993         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
2995 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2997         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
2998         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
2999         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
3000         to get gassigns and gcalls, rather than operating on generc gimple
3001         stmts.
3002         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
3003         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
3004         (vectorizable_load, vect_analyze_stmt): Likewise.
3005         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
3007 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3009         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
3010         return stmt_vec_infos rather than gimple stmts.  Do not accept
3011         null arguments.
3012         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
3013         of a gimple stmt.
3014         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3015         Update use of get_later_stmt.
3016         (vect_get_constant_vectors): Update call accordingly.
3017         (vect_schedule_slp_instance): Likewise
3018         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
3019         (vect_slp_analyze_instance_dependence): Likewise.
3020         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
3022 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3024         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
3025         (stmt_info_for_cost::stmt_info): ...this new field.
3026         (add_stmt_costs): Update accordingly.
3027         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
3028         (vect_get_known_peeling_cost): Likewise.
3029         (vect_estimate_min_profitable_iters): Likewise.
3030         * tree-vect-stmts.c (record_stmt_cost): Likewise.
3032 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3034         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
3035         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3036         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3037         accordingly.
3038         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
3040 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3042         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
3043         a gimple stmt to a stmt_vec_info.
3044         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
3046 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3048         * tree-vectorizer.h (vec_info::grouped_stores): Change from
3049         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3050         (_loop_vec_info::reduction_chains): Likewise.
3051         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
3052         accordingly.
3053         * tree-vect-slp.c (vect_analyze_slp): Likewise.
3055 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3057         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
3058         a gimple stmt to a stmt_vec_info.
3059         (_stmt_vec_info::next_element): Likewise.
3060         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
3061         (vect_slp_analyze_and_verify_node_alignment)
3062         (vect_analyze_group_access_1, vect_analyze_group_access)
3063         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
3064         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
3065         (vect_supportable_dr_alignment): Update accordingly.
3066         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
3067         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
3068         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
3069         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
3070         * tree-vect-slp.c (vect_build_slp_tree_1)
3071         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
3072         (vect_split_slp_store_group, vect_analyze_slp_instance)
3073         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
3074         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
3075         (get_group_load_store_type, get_load_store_type)
3076         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
3077         (vect_transform_stmt, vect_remove_stores): Likewise.
3079 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3081         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
3082         than a gimple stmt.
3083         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
3084         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
3085         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
3086         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
3087         (vector_alignment_reachable_p, vect_get_data_access_cost)
3088         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
3089         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
3090         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3091         (vect_analyze_group_access_1, vect_analyze_group_access)
3092         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
3093         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
3094         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
3095         result of vect_dr_stmt and use the stmt_vec_info instead of
3096         the associated gimple stmt.
3097         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3098         (vect_gen_prolog_loop_niters): Likewise.
3099         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3101 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3103         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
3104         to a vec<stmt_vec_info>.
3105         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
3106         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
3107         vec<stmt_vec_info>.
3108         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
3109         to a vec<stmt_vec_info>.
3110         (bst_traits::value_type, bst_traits::value_type): Likewise.
3111         (bst_traits::hash): Update accordingly.
3112         (vect_get_and_check_slp_defs): Change the stmts parameter from
3113         a vec<gimple *> to a vec<stmt_vec_info>.
3114         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
3115         (vect_build_slp_tree): Likewise.
3116         (vect_build_slp_tree_2): Likewise.  Update uses of
3117         SLP_TREE_SCALAR_STMTS.
3118         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
3119         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
3120         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
3121         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
3122         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
3123         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
3124         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
3125         (vect_get_constant_vectors, vect_get_slp_defs)
3126         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
3127         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
3128         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
3129         instead of gimple stmts.
3130         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
3131         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
3132         (vect_slp_analyze_instance_dependence): Update uses of
3133         SLP_TREE_SCALAR_STMTS.
3134         (vect_slp_analyze_and_verify_node_alignment): Likewise.
3135         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
3136         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
3137         (get_initial_defs_for_reduction): Likewise.
3138         (vect_create_epilog_for_reduction): Likewise.
3139         (vectorize_fold_left_reduction): Likewise.
3140         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
3141         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
3142         (can_vectorize_live_stmts): Likewise.
3144 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3146         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
3147         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3148         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
3149         than gimple stmts.
3150         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
3151         of a gimple stmt.
3152         (gather_scalar_reductions): Update after above interface changes.
3153         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
3154         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
3155         than gimple stmts.
3156         (vect_force_simple_reduction): Likewise.
3157         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
3158         LOOP_VINFO_REDUCTIONS.
3159         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3161 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3163         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
3164         a gimple stmt to a stmt_vec_info.
3165         * tree-vect-loop.c (vect_active_double_reduction_p)
3166         (vect_force_simple_reduction, vectorizable_reduction): Update
3167         accordingly.
3169 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3171         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
3172         vec<gimple *> to a vec<stmt_vec_info>.
3173         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
3174         the reduction_phis argument from a vec<gimple *> to a
3175         vec<stmt_vec_info>.
3176         (vectorizable_reduction): Likewise the phis local variable that
3177         is passed to vect_create_epilog_for_reduction.  Update for new type
3178         of SLP_TREE_VEC_STMTS.
3179         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
3180         (vectorizable_live_operation): Likewise.
3181         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
3182         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
3184 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3186         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
3187         a gimple stmt to a stmt_vec_info.
3188         (vectorizable_condition, vectorizable_live_operation)
3189         (vectorizable_reduction, vectorizable_induction): Pass back the
3190         vectorized statement as a stmt_vec_info.
3191         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
3192         use of STMT_VINFO_VEC_STMT.
3193         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
3194         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
3195         as stmt_vec_infos rather than gimple stmts.
3196         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
3197         to a stmt_vec_info.
3198         (vectorizable_live_operation): Likewise.
3199         (vectorizable_reduction, vectorizable_induction): Likewise,
3200         updating use of STMT_VINFO_VEC_STMT.
3201         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
3202         of STMT_VINFO_VEC_STMT.
3203         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
3204         (vectorizable_simd_clone_call, vectorizable_conversion)
3205         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3206         (vectorizable_store, vectorizable_load, vectorizable_condition)
3207         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
3208         from a gimple stmt to a stmt_vec_info.
3209         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
3210         pointer to a stmt_vec_info to the vectorizable_* routines.
3212 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3214         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
3215         a gimple stmt to a stmt_vec_info.
3216         (is_pattern_stmt_p): Update accordingly.
3217         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
3218         (vect_record_grouped_load_vectors): Likewise.
3219         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
3220         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
3221         (vect_model_reduction_cost): Likewise.
3222         (vect_create_epilog_for_reduction): Likewise.
3223         (vectorizable_reduction, vectorizable_induction): Likewise.
3224         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3225         Return the stmt_vec_info for the pattern statement.
3226         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
3227         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
3228         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
3229         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
3230         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
3231         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
3232         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
3233         (free_stmt_vec_info, vect_is_simple_use): Likewise.
3235 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3237         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
3238         (vect_finish_stmt_generation): Likewise.
3239         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3240         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
3241         (vect_build_gather_load_calls): Use the return value of the above
3242         functions instead of a separate call to vinfo_for_stmt.  Use narrow
3243         scopes for the input gimple stmt and wider scopes for the associated
3244         stmt_vec_info.  Use vec_info::lookup_def when setting these
3245         stmt_vec_infos from an SSA_NAME definition.
3246         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3247         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3248         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3249         (vectorizable_store, vectorizable_load, vectorizable_condition)
3250         (vectorizable_comparison): Likewise.
3251         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
3252         (vectorizable_reduction): Likewise.
3254 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3256         * tree-vectorizer.h (vect_is_simple_use): Add an optional
3257         stmt_vec_info * parameter before the optional gimple **.
3258         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3259         (process_use, vect_get_vec_def_for_operand_1): Update callers.
3260         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
3261         * tree-vect-loop.c (vectorizable_reduction): Likewise.
3262         (vectorizable_live_operation): Likewise.
3263         * tree-vect-patterns.c (type_conversion_p): Likewise.
3264         (vect_look_through_possible_promotion): Likewise.
3265         (vect_recog_rotate_pattern): Likewise.
3266         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3268 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3270         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
3271         a typedef to a wrapper class.
3272         (NULL_STMT_VEC_INFO): New macro.
3273         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
3274         (stmt_vec_info::operator*): New function.
3275         (stmt_vec_info::operator gimple *): Likewise.
3276         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
3277         (add_stmt_costs): Likewise.
3278         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
3279         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
3280         (vect_get_known_peeling_cost): Likewise.
3281         (vect_estimate_min_profitable_iters): Likewise.
3282         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3283         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
3284         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3285         (vectorizable_store, free_stmt_vec_infos): Likewise.
3286         (new_stmt_vec_info): Change return type of xcalloc to
3287         _stmt_vec_info *.
3289 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3291         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
3292         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
3293         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
3294         a single_imm_use-based sequence.
3295         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
3297 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3299         * tree-vectorizer.h (vec_info::lookup_def): Declare.
3300         * tree-vectorizer.c (vec_info::lookup_def): New function.
3301         * tree-vect-patterns.c (vect_get_internal_def): Use it.
3302         (vect_widened_op_tree): Likewise.
3303         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3304         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
3305         (vectorizable_reduction): Likewise.
3306         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
3307         of a gimple *.
3308         (vect_is_slp_reduction): Update calls accordingly.  Use
3309         vec_info::lookup_def.
3310         (vect_is_simple_reduction): Likewise
3311         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
3313 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3315         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
3316         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
3317         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
3318         of vinfo_for_stmt.
3319         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
3320         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
3321         (vect_update_vf_for_slp, vect_analyze_loop_operations)
3322         (vect_is_slp_reduction, vectorizable_induction)
3323         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
3324         * tree-vect-patterns.c (vect_init_pattern_stmt):
3325         (vect_determine_min_output_precision_1, vect_determine_precisions)
3326         (vect_pattern_recog): Likewise.
3327         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
3328         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
3329         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
3330         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
3331         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
3332         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
3333         info field from a loop to a loop_vec_info.
3335 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3337         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
3338         (vec_info::add_stmt): Declare.
3339         * tree-vectorizer.c (vec_info::add_stmt): New function.
3340         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
3341         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
3342         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
3343         (vectorizable_induction): Likewise.
3344         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
3345         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3346         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
3347         (vectorizable_load): Likewise.
3348         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3349         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
3350         (vect_recog_gather_scatter_pattern): Likewise.
3351         (append_pattern_def_seq): Likewise.  Remove a check that is
3352         performed by add_stmt itself.
3354 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3356         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
3357         which make_ssa_name was called with new_stmt before new_stmt
3358         had been created.
3360 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3362         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
3363         split out from...
3364         (vect_is_slp_reduction): ...here...
3365         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
3366         that are already known to be false.
3368 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3370         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
3371         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
3372         STMT_VINFO_NUM_SLP_USES when it's true.
3373         (vect_free_slp_instance): Add a final_p parameter and pass it to
3374         vect_free_slp_tree.
3375         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
3376         (vect_analyze_slp_instance): Likewise.
3377         (vect_slp_analyze_operations): Likewise.
3378         (vect_slp_analyze_bb_1): Likewise.
3379         * tree-vectorizer.c (vec_info): Likewise.
3380         * tree-vect-loop.c (vect_transform_loop): Likewise.
3382 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3384         * tree-vect-loop.c (vectorizable_reduction): Assert that the
3385         function is not called for second and subsequent members of
3386         a reduction group.
3388 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3390         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
3391         cases for nested loops from here to ...
3392         (vect_create_epilog_for_reduction): ...here.  Only call
3393         vect_is_simple_use for inner-loop reductions.
3395 2018-07-31  Martin Liska  <mliska@suse.cz>
3397         PR gcov-profile/85338
3398         PR gcov-profile/85350
3399         PR gcov-profile/85372
3400         * profile.c (struct location_triplet): New.
3401         (struct location_triplet_hash): Likewise.
3402         (output_location): Do not output a BB that
3403         is already recorded for a line.
3404         (branch_prob): Use streamed_locations.
3406 2018-07-31  Martin Liska  <mliska@suse.cz>
3408         PR gcov-profile/85370
3409         * coverage.c (coverage_begin_function): Do not mark target
3410         clones as artificial functions.
3412 2018-07-31  Martin Liska  <mliska@suse.cz>
3414         PR gcov-profile/83813
3415         PR gcov-profile/84758
3416         PR gcov-profile/85217
3417         PR gcov-profile/85332
3418         * profile.c (branch_prob): Do not record GOTO expressions
3419         for GIMPLE statements which locations are already streamed.
3421 2018-07-31  Olivier Hainque  <hainque@adacore.com>
3423         * gcc.c (handle_spec_function): Accept a soft_matched_part
3424         argument, as do_spec_1.  Pass it down to ...
3425         (eval_spec_function): Accept a soft_matched_part argument,
3426         and pass it down to ...
3427         (do_spec_2): Accept a soft_matched_part argument, and pass
3428         it down to do_spec_1.
3429         (do_spec_1): Pass soft_matched_part to handle_spec_function.
3430         (handle_braces): Update call to handle_spec_function.
3431         (driver::set_up_specs): Update calls to do_spec_2.
3432         (compare_debug_dump_opt_spec_function): Likewise.
3433         (compare_debug_self_opt_spec_function): Likewise.
3435 2018-07-31  Olivier Hainque  <hainque@adacore.com>
3437         * common.opt (nolibc): New option.
3438         * doc/invoke.texi (Link Options): Document it.
3439         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
3440         * config/alpha/linux.h: Likewise.
3441         * config/arc/elf.h: Likewise.
3442         * config/arm/uclinux-elf.h: Likewise.
3443         * config/arm/unknown-elf.h: Likewise.
3444         * config/avr/avrlibc.h: Likewise.
3445         * config/bfin/bfin.h: Likewise.
3446         * config/bfin/linux.h: Likewise.
3447         * config/bfin/uclinux.h: Likewise.
3448         * config/darwin.h: Likewise.
3449         * config/darwin10.h: Likewise.
3450         * config/darwin12.h: Likewise.
3451         * config/gnu-user.h: Likewise.
3452         * config/lm32/uclinux-elf.h: Likewise.
3453         * config/pa/pa-hpux11.h: Likewise.
3454         * config/pa/pa64-hpux.h: Likewise.
3455         * config/sparc/sparc.h: Likewise.
3457 2018-07-31  Olivier Hainque  <hainque@adacore.com>
3459         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
3460         undefined variables.
3462 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
3464         PR target/86640
3465         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
3466         instead of GEN_INT.
3468 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3470         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
3471         terminated string literal.
3473 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
3475         PR rtl-optimization/85160
3476         * combine.c (is_just_move): New function.
3477         (try_combine): Allow combining two instructions into two if neither of
3478         the original instructions was a move.
3480 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
3482         PR target/86673
3483         * doc/extend.texi (Global Register Variables): Discourage use of type
3484         qualifiers.
3485         (Local Register Variables): Likewise.
3487 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
3489         PR tree-optimization/86506
3490         * hwint.h (ceil_log2): Resync with hwint.c implementation.
3492 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
3494         PR target/86547
3495         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
3496         hard_regno, make sure no insn between `from` and `to` clobbers it.
3498 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
3499             Tom de Vries  <tdevries@suse.de>
3501         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
3502         (PTX_DEFAULT_RUNTIME_DIM): ... this.
3503         (nvptx_goacc_validate_dims): Set default worker and gang dims to
3504         PTX_DEFAULT_RUNTIME_DIM.
3505         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
3507 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
3509         * config/pa/pa.c (pa_output_addr_vec): Align address table.
3510         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
3511         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
3513 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
3515         * config/rs6000/constraints.md (wG constraint): Delete, no longer
3516         used.
3517         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
3518         predicate to reflect toc fusion has been deleted.
3519         (toc_fusion_mem_raw): Delete, no longer used.
3520         (toc_fusion_mem_wrapped): Likewise.
3521         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
3522         fusion mask bit.
3523         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
3524         Delete, no longer used.
3525         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
3526         meant to be used for toc fusion.
3527         (rs6000_debug_print_mode): Delete toc fusion debugging.
3528         (rs6000_debug_reg_global): Likewise.
3529         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
3530         fusion and secondary reload support that were never used.
3531         (rs6000_option_override_internal): Delete TOC fusion, that was only
3532         partially defined, and it did not work unless you also used the
3533         -mcmodel= switch.
3534         (rs6000_legitimate_address_p): Delete TOC fusion support.
3535         (rs6000_opt_masks): Likewise.
3536         (fusion_wrap_memory_address): Delete function, no longer used.
3537         (fusion_split_address); Delete TOC fusion support.
3538         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
3539         longer used with toc fusion being deleted.
3540         (TARGET_TOC_FUSION_FP): Likewise.
3541         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
3542         UNSPEC.
3543         (toc fusion spliter): Delete TOC fusion support.
3544         (toc_fusionload_<mode>): Likewise.
3545         (toc_fusionload_di): Likewise.
3546         (fusion_gpr_load_<mode>): Delete generator function, this insn no
3547         longer needs to be named.  Rename predicate to delete TOC fusion.
3548         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
3549         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
3550         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
3551         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
3552         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
3554 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3556         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
3557         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
3558         __int128 in built-in function prototypes.
3559         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
3560         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
3562 2018-07-27  Martin Sebor  <msebor@redhat.com>
3564         PR tree-optimization/86696
3565         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
3566         types, including enums.
3567         (handle_char_store): Be prepared for the above function to fail.
3569 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
3571         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
3572         when optimization level is lower than 2 or optimize for size.
3574 2018-07-26  Martin Sebor  <msebor@redhat.com>
3576         PR tree-optimization/86043
3577         PR tree-optimization/86042
3578         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
3579         (get_string_cst_length): Rename...
3580         (get_min_string_length): ...to this.  Add argument.
3581         (handle_char_store): Extend to handle multi-character stores by
3582         MEM_REF.
3583         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
3584         * tree.h (initializer_zerop): Add argument.
3586 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
3588         PR middle-end/86660
3589         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
3590         declare target to variables if they have always,{to,from,tofrom} map
3591         kinds.
3593 2018-07-26  Martin Liska  <mliska@suse.cz>
3595         PR lto/86548
3596         * lto-wrapper.c: Add linker_output as prefix
3597         for ltrans_output_file.
3599 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
3601         PR rtl-optimization/85805
3602         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
3603         value for hard registers if that was written in the same mode.
3605 2018-07-26  Martin Liska  <mliska@suse.cz>
3607         PR gcov-profile/86536
3608         * gcov.c (format_gcov): Use printf format %.*f directly
3609         and do not handle special values.
3611 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
3613         * common/config/arc/arc-common.c (arc_option_optimization_table):
3614         Update default optimizations for size.
3616 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
3618         * config/arc/arc.md (movsf_insn): Add short instruction selection.
3619         * config/arc/constraints.md (CfZ): New constraint.
3620         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
3621         (subsf3_fpu): Likewise.
3622         (cmpsf_fpu): Likewise.
3623         (cmpsf_fpu_uneq): Likewise.
3625 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
3627         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
3628         accesses as well.
3629         (arc_is_uncached_mem_p): uncached applies to both the variable and
3630         the pointer.
3632 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
3634         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
3635         register names.
3637 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
3639         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
3640         field "m_scopes" from vec to auto_vec.
3642 2018-07-25  Martin Liska  <mliska@suse.cz>
3644         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
3645         return type.
3647 2018-07-25  Richard Biener  <rguenther@suse.de>
3649         PR debug/86654
3650         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
3651         special wrt context_die late.
3652         (gen_subprogram_die): Re-use DIEs in local scope.
3654 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
3656         PR tree-optimization/86644
3657         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
3659 2018-07-25  Martin Liska  <mliska@suse.cz>
3661         PR middle-end/86645
3662         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
3663         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
3665 2018-07-25  Martin Liska  <mliska@suse.cz>
3667         PR sanitizer/79635
3668         * params.def: Explain ASan abbreviation and provide
3669         a documentation link.
3671 2018-07-24  Martin Sebor  <msebor@redhat.com>
3673         PR tree-optimization/86622
3674         PR tree-optimization/86532
3675         * builtins.h (string_length): Declare.
3676         * builtins.c (c_strlen): Correct handling of non-constant offsets.
3677         (check_access): Be prepared for non-constant length ranges.
3678         (string_length): Make extern.
3679         * expr.c (string_constant): Only handle the minor non-constant
3680         array index.  Use string_constant to compute the length of
3681         a generic string constant.
3683 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
3685         PR tree-optimization/86618
3686         * tree-vect-stmts.c (vectorizable_call): Don't take the address
3687         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
3689 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
3691         PR tree-optimization/86636
3692         * json.cc (json::object::set): Fix comment.  Add assertions.
3693         (json::array::append): Move here from json.h.  Add comment and an
3694         assertion.
3695         (json::string::string): Likewise.
3696         * json.h (json::array::append): Move to json.cc.
3697         (json::string::string): Likewise.
3698         * optinfo-emit-json.cc
3699         (optrecord_json_writer::impl_location_to_json): Assert that we
3700         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
3701         wrapper around it.  Expand the location once, rather than three
3702         times.
3703         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
3704         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
3705         wrappers.
3706         (optrecord_json_writer::optinfo_to_json): Likewise, in four
3707         places.  Fix some overlong lines.
3709 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
3711         * config/aarch64/aarch64-simd.md
3712         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
3713         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
3714         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
3715         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
3716         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
3717         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
3718         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
3719         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
3720         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
3722 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
3724         PR middle-end/86627
3725         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
3726         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
3727         and abs_d == d, do the power of two handling if profitable.
3729 2018-07-24  Richard Biener  <rguenther@suse.de>
3731         * match.pd: Add BIT_FIELD_REF canonicalizations.
3733 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3735         PR c/86617
3736         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
3738 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3740         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
3741         terminated STRING_CST object.
3743 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3745         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
3747 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
3749         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
3750         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
3751         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
3752         the elements into a register.
3753         (rs6000_split_v4si_init_di_reg): Delete.
3754         (rs6000_split_v4si_init): Delete.
3755         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
3756         (vsx_init_v4si): Rewrite as a define_expand.
3758 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
3760         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
3761         zero_extend argument from memory): New.
3763 2018-07-22  Martin Sebor  <msebor@redhat.com>
3765         PR bootstrap/86621
3766         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
3767         diagnosing calls with unknown arguments unless -Walloca-larger-than
3768         is restricted to less than PTRDIFF_MAX bytes.
3770 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
3772         * doc/gcov.texi (Invoking Gcov): Editorial changes.
3774 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
3776         * pretty-print.c (text_info::set_location): Remove redundant
3777         "line_table" parameter from call to rich_location::set_range.
3779 2018-07-20  Martin Sebor  <msebor@redhat.com>
3781         PR middle-end/82063
3782         * builtins.c (expand_builtin_alloca): Adjust.
3783         * calls.c (alloc_max_size): Simplify.
3784         * cgraphunit.c (cgraph_node::expand): Adjust.
3785         * common.opt (larger_than_size, warn_frame_larger_than): Remove
3786         variables.
3787         (frame_larger_than_size): Same.
3788         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
3789         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
3790         Initialize.
3791         * doc/invoke.texi (GCC Command Options): Document option arguments.
3792         Explain byte-size arguments and suffixes.
3793         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
3794         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
3795         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
3796         * doc/options.texi (UInteger): Expand.
3797         (Host_Wide_Int, ByteSize): Document new properties.
3798         * final.c (final_start_function_1): Include sizes in an error message.
3799         * function.c (frame_offset_overflow): Same.
3800         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
3801         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
3802         Diagnose unbounded alloca calls only for limits of less than
3803         PTRDIFF_MAX.
3804         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
3805         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
3806         for alloca(0).
3807         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
3808         only for limits of less than PTRDIFF_MAX.
3809         * langhooks-def.h (lhd_handle_option): Change function argument
3810         to HOST_WIDE_INT.
3811         * langhooks.c (lhd_handle_option): Same.
3812         * langhooks.h (handle_option): Same.
3813         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
3814         ByteSize flags.
3815         (var_type, var_type_struct): Same.
3816         (var_set): Handle ByteSize flag.
3817         * optc-gen.awk: Add comments to output to ease debugging.  Make
3818         use of HOST_WIDE_INT where appropriate.
3819         * opts-gen-save.awk:  Use %lx to format unsigned long.
3820         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
3821         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
3822         arguments.  Parse bytes-size suffixes.
3823         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
3824         (enum_value_to_arg): Same.
3825         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
3826         (handle_option): Adjust.
3827         (generate_option): Change function argument to HOST_WIDE_INT.
3828         (cmdline_handle_error): Adjust.
3829         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
3830         (set_option): Change function argument to HOST_WIDE_INT.
3831         (option_enabled): Handle cl_host_wide_int.
3832         (get_option_state): Handle CLVC_SIZE.
3833         (control_warning_option): Same.
3834         * opts.c (common_handle_option): Change function argument to
3835         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
3836         OPT_Wvla_larger_than_.
3837         * opts.h (enum cl_var_type): Add an enumerator.
3838         * stor-layout.c (layout_decl): Print a more meaningful warning.
3839         * toplev.c (output_stack_usage): Adjust.
3841 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
3843         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
3844         call to inline_expand_builtin_string_cmp.
3845         (expand_builtin_strcmp): Likewise.
3846         (expand_builtin_strncmp): Likewise.
3847         (inline_string_cmp): Delete the last parameter, change char_type_node
3848         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
3849         two operands.
3850         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
3851         the inlining expansion on target where the type of the call has same or
3852         narrower precision than unsigned char.
3854 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
3856         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
3857         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
3858         * common.opt (fsave-optimization-record): New option.
3859         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
3860         * doc/invoke.texi (-fsave-optimization-record): New option.
3861         * dumpfile.c: Include "optinfo-emit-json.h".
3862         (struct kv_pair): Move to coretypes.h.
3863         (optgroup_options): Make non-static.
3864         (dump_context::end_scope): Call
3865         optimization_records_maybe_pop_dump_scope.
3866         * dumpfile.h (optgroup_options): New decl.
3867         * json.cc: New file.
3868         * json.h: New file.
3869         * optinfo-emit-json.cc: New file.
3870         * optinfo-emit-json.h: New file.
3871         * optinfo.cc: Include "optinfo-emit-json.h".
3872         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
3873         (optinfo_enabled_p): Check optimization_records_enabled_p.
3874         (optinfo_wants_inlining_info_p): Likewise.
3875         * optinfo.h: Update comment.
3876         * profile-count.c (profile_quality_as_string): New function.
3877         * profile-count.h (profile_quality_as_string): New decl.
3878         (profile_count::quality): New accessor.
3879         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
3880         and optinfo_emit_json_cc_tests.
3881         * selftest.h (selftest::json_cc_tests): New decl.
3882         (selftest::optinfo_emit_json_cc_tests): New decl.
3883         * toplev.c: Include "optinfo-emit-json.h".
3884         (compile_file): Call optimization_records_finish.
3885         (do_compile): Call optimization_records_start.
3886         * tree-ssa-live.c: Include optinfo.h.
3887         (remove_unused_scope_block_p): Retain inlining information if
3888         optinfo_wants_inlining_info_p returns true.
3890 2018-07-20  Richard Biener  <rguenther@suse.de>
3892         PR debug/86585
3893         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
3894         to cover -flto-partition=none.
3896 2018-07-20  Martin Liska  <mliska@suse.cz>
3898         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
3899         (get_decl_source_range): Remove unused function.
3901 2018-07-20  Richard Biener  <rguenther@suse.de>
3903         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
3904         (struct vn_phi_s): Likewise.
3905         (struct vn_reference_s): Likewise.
3906         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
3907         for searching the slot of an entry known to be in the hash itself.
3908         (vn_phi_hasher::equal): Likewise.
3909         (vn_reference_hasher::equal): Likewise.
3910         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
3911         globals.
3912         (optimistic_info, current_info): Remove, keeping only valid_info.
3913         (vn_reference_lookup_1): Remove fallback lookup.
3914         (vn_reference_lookup_2): Likewise.
3915         (vn_nary_op_lookup_1): Likewise.
3916         (vn_phi_lookup): Likewise.
3917         (vn_nary_build_or_lookup_1): Make sure to not chain the built
3918         hash element.
3919         (vn_reference_insert): Adjust, chain the inserted hash element
3920         at last_inserted_ref.
3921         (vn_reference_insert_pieces): Likewise.
3922         (visit_reference_op_call): Likewise.
3923         (vn_nary_op_insert_into): Chain the inserted hash element at
3924         last_inserted_nary.
3925         (vn_nary_op_insert_pieces): Adjust.
3926         (vn_nary_op_insert): Likewise.
3927         (vn_nary_op_insert_stmt): Likewise.
3928         (vn_phi_insert): Adjust, chain the inserted hash element at
3929         last_inserted_phi.
3930         (process_scc): Remove clearing and copying the optimistic
3931         table.  Instead remove elements inserted during an optimistic
3932         iteration from the single table we maintain.
3933         (init_scc_vn): Adjust.
3934         (free_scc_vn): Likewise.
3935         (sccvn_dom_walker::record_cond): Likewise.
3936         (sccvn_dom_walker::after_dom_children): Likewise.
3938 2018-07-19  Martin Sebor  <msebor@redhat.com>
3940         PR tree-optimization/84047
3941         PR tree-optimization/83776
3942         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
3943         (check_array_bounds): Call it.
3945 2018-07-19  Martin Sebor  <msebor@redhat.com>
3947         * align.h (align_flags): Use member initialization.
3949 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
3951         * Makefile.in (OBJS): Add optinfo.o.
3952         * coretypes.h (class symtab_node): New forward decl.
3953         (struct cgraph_node): New forward decl.
3954         (class varpool_node): New forward decl.
3955         * dump-context.h: New file.
3956         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
3957         "tree-pass.h".
3958         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
3959         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
3960         (set_alt_dump_file): Likewise.
3961         (dump_context::~dump_context): New dtor.
3962         (dump_gimple_stmt): Move implementation to...
3963         (dump_context::dump_gimple_stmt): ...this new member function.
3964         Add the stmt to any pending optinfo, creating one if need be.
3965         (dump_gimple_stmt_loc): Move implementation to...
3966         (dump_context::dump_gimple_stmt_loc): ...this new member function.
3967         Start a new optinfo and add the stmt to it.
3968         (dump_gimple_expr): Move implementation to...
3969         (dump_context::dump_gimple_expr): ...this new member function.
3970         Add the stmt to any pending optinfo, creating one if need be.
3971         (dump_gimple_expr_loc): Move implementation to...
3972         (dump_context::dump_gimple_expr_loc): ...this new member function.
3973         Start a new optinfo and add the stmt to it.
3974         (dump_generic_expr): Move implementation to...
3975         (dump_context::dump_generic_expr): ...this new member function.
3976         Add the tree to any pending optinfo, creating one if need be.
3977         (dump_generic_expr_loc): Move implementation to...
3978         (dump_context::dump_generic_expr_loc): ...this new member
3979         function.  Add the tree to any pending optinfo, creating one if
3980         need be.
3981         (dump_printf): Move implementation to...
3982         (dump_context::dump_printf_va): ...this new member function.  Add
3983         the text to any pending optinfo, creating one if need be.
3984         (dump_printf_loc): Move implementation to...
3985         (dump_context::dump_printf_loc_va): ...this new member function.
3986         Start a new optinfo and add the stmt to it.
3987         (dump_dec): Move implementation to...
3988         (dump_context::dump_dec): ...this new member function.  Add the
3989         value to any pending optinfo, creating one if need be.
3990         (dump_context::dump_symtab_node): New member function.
3991         (dump_context::get_scope_depth): New member function.
3992         (dump_context::begin_scope): New member function.
3993         (dump_context::end_scope): New member function.
3994         (dump_context::ensure_pending_optinfo): New member function.
3995         (dump_context::begin_next_optinfo): New member function.
3996         (dump_context::end_any_optinfo): New member function.
3997         (dump_context::s_current): New global.
3998         (dump_context::s_default): New global.
3999         (dump_scope_depth): Delete global.
4000         (dumpfile_ensure_any_optinfo_are_flushed): New function.
4001         (dump_symtab_node): New function.
4002         (get_dump_scope_depth): Reimplement in terms of dump_context.
4003         (dump_begin_scope): Likewise.
4004         (dump_end_scope): Likewise.
4005         (selftest::temp_dump_context::temp_dump_context): New ctor.
4006         (selftest::temp_dump_context::~temp_dump_context): New dtor.
4007         (selftest::verify_item): New function.
4008         (ASSERT_IS_TEXT): New macro.
4009         (ASSERT_IS_TREE): New macro.
4010         (ASSERT_IS_GIMPLE): New macro.
4011         (selftest::test_capture_of_dump_calls): New test.
4012         (selftest::dumpfile_c_tests): Call it.
4013         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
4014         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
4015         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
4016         descriptive comment.
4017         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
4018         (dump_node, dump_bb): Move these unrelated decls.
4019         (class dump_manager): Add leading comment.
4020         * optinfo.cc: New file.
4021         * optinfo.h: New file.
4023 2018-07-19  Michael Collison  <michael.collison@arm.com>
4024             Richard Henderson <rth@redhat.com>
4026         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
4027         (subti): Handle op1 zero.
4028         (subvti4, usub4ti4): New.
4029         (*sub<GPI>3_compare1_imm): New.
4030         (sub<GPI>3_carryinCV): New.
4031         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
4032         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
4034 2018-07-19  Michael Collison  <michael.collison@arm.com>
4035             Richard Henderson <rth@redhat.com>
4037         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
4038         (addti3): Create simpler code if low part is already known to be 0.
4039         (addvti4, uaddvti4): New.
4040         (*add<GPI>3_compareC_cconly_imm): New.
4041         (*add<GPI>3_compareC_cconly): New.
4042         (*add<GPI>3_compareC_imm): New.
4043         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
4044         handle constants within this pattern..
4045         (*add<GPI>3_compareV_cconly_imm): New.
4046         (*add<GPI>3_compareV_cconly): New.
4047         (*add<GPI>3_compareV_imm): New.
4048         (add<GPI>3_compareV): New.
4049         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
4050         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
4051         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
4052         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
4053         with 'comparison' operator.
4054         (*add<GPI>3_compareV_cconly_imm): Ditto.
4055         (*add<GPI>3_compareV_cconly): Ditto.
4056         (*add<GPI>3_compareV_imm): Ditto.
4057         (add<GPI>3_compareV): Ditto.
4058         (add<mode>3_carryinC): Ditto.
4059         (*add<mode>3_carryinC_zero): Ditto.
4060         (*add<mode>3_carryinC): Ditto.
4061         (add<mode>3_carryinV): Ditto.
4062         (*add<mode>3_carryinV_zero): Ditto.
4063         (*add<mode>3_carryinV): Ditto.
4065 2018-07-19  Michael Collison  <michael.collison@arm.com>
4066             Richard Henderson <rth@redhat.com>
4068         * config/aarch64/aarch64-modes.def (CC_V): New.
4069         * config/aarch64/aarch64-protos.h
4070         (aarch64_addti_scratch_regs): Declare
4071         (aarch64_subvti_scratch_regs): Declare.
4072         (aarch64_expand_subvti): Declare.
4073         (aarch64_gen_unlikely_cbranch): Declare
4074         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
4075         for signed overflow using CC_Vmode.
4076         (aarch64_get_condition_code_1): Handle CC_Vmode.
4077         (aarch64_gen_unlikely_cbranch): New function.
4078         (aarch64_addti_scratch_regs): New function.
4079         (aarch64_subvti_scratch_regs): New function.
4080         (aarch64_expand_subvti): New function.
4082 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4084         * config/aarch64/aarch64-option-extensions.def: New entry for profile
4085         extension.
4086         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
4087         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
4088         extension.
4090 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4092         PR target/83009
4093         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
4094         address check not strict.
4096 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4098         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
4099         Umq with Umn.
4100         (store_pair_lanes<mode>): Likewise.
4101         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
4102         enum value 'ADDR_QUERY_LDP_STP_N'.
4103         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
4104         (aarch64_print_address_internal): Add declaration.
4105         (aarch64_print_ldpstp_address): Remove.
4106         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
4107         (aarch64_print_operand): Change printing of 'y'.
4108         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
4109         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
4110         'true' rather than '1'.
4111         * config/aarch64/constraints.md (Uml): Likewise.
4112         (Uml): Rename to Umn.
4113         (Umq): Remove.
4115 2018-07-19  Richard Biener  <rguenther@suse.de>
4117         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
4118         a trailing array.
4119         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
4120         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
4121         (vn_reference_hasher): Likewise.
4122         (struct vn_tables_s): Remove obstack and alloc-pool members.
4123         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
4124         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
4125         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
4126         (vn_reference_insert_pieces): Likewise.
4127         (alloc_vn_nary_op_noinit): Adjust.
4128         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
4129         (vn_phi_eq): Adjust.
4130         (shared_lookup_phiargs): Remove.
4131         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
4132         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
4133         (visit_reference_op_call): Likewise.
4134         (copy_nary, copy_phi, copy_reference): Remove.
4135         (process_scc): Rewind the obstack when iterating.  Do not
4136         copy the elements to valid_info but just move them from one
4137         hashtable to the other.
4138         (allocate_vn_table): Adjust.
4139         (free_vn_table): Likewise.
4140         (init_scc_vn): Likewise.
4141         (free_scc_vn): Likewise.
4143 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
4145         PR target/86560
4146         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
4147         indirect_return as function type attribute.
4148         (ix86_attribute_table): Change indirect_return to function
4149         type attribute.
4150         * doc/extend.texi: Update indirect_return attribute.
4152 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
4154         * wide-int.h (widest2_int): New.
4155         * gimple-fold.c (arith_overflowed_p): Use it.
4156         * tree.h (widest2_int_cst): New.
4157         * tree-vrp.c (wide_int_binop_overflow): Rename from
4158         vrp_int_const_binop.
4159         Rewrite to work on trees.
4160         (extract_range_from_multiplicative_op_1): Abstract code to...
4161         (wide_int_range_min_max): ...here.
4162         (wide_int_range_cross_product): ...and here.
4163         (extract_range_from_binary_expr_1): Abstract overflow code to...
4164         (wide_int_range_mult_wrapping): ...here.
4165         * tree-vrp.h (wide_int_range_cross_product): New.
4166         (wide_int_range_mult_wrapping): New.
4168 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
4169             Julia Koval  <julia.koval@intel.com>
4171         * config/i386/x86-tune-costs.h (skylake_memcpy,
4172         skylake_memset): Replace rep_prefix with unrolling for size 512.
4174 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
4176         PR middle-end/86544
4177         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
4178         comparision with EQ_EXPR in last stmt.
4180 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4182         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
4183         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
4184         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
4185         previously known as "PowerPC AltiVec Built-in Functions".  Move
4186         some material to new subsubsections "PowerPC AltiVec Built-in
4187         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
4188         ISA 2.07".
4189         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
4190         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
4191         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
4192         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
4194 2018-07-18  Richard Biener  <rguenther@suse.de>
4196         PR tree-optimization/86557
4197         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
4198         EXACT_DIV_EXPR.
4200 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
4202         * config/s390/s390.c (s390_function_profiler): Generate CFI.
4204 2018-07-17  Jeff Law  <law@redhat.com>
4206         * config/arm/arm.c (get_label_padding): Update for recent
4207         changes to label_to_alignment.
4209         PR tree-optimization/86010
4210         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
4212         * config/mips/mips.c (vr4130_align_insns): Update for recent
4213         changes to label_to_alignment.
4215         * config/frv/frv.c (frv_label_align): Update for recent changes
4216         to label_to_alignment.
4218         * config/nios2/nios2.c (nios2_label_align): Update for recent
4219         changes which dropped ALIGN_LABELS_LOG.
4221 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
4223         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
4224         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
4226 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
4228         * config/arc/arc.c (arc_label_align): Use align_labels instead of
4229         deprecated align_labels_log.
4231 2018-07-17  Richard Biener  <rguenther@suse.de>
4233         PR lto/86456
4234         * dwarf2out.c (init_sections_and_labels): Always generate
4235         a debug_line_str_section for early LTO debug.
4236         (dwarf2out_finish): Reset debug_line_str_hash output early.
4237         Bump counter for extra dwarf5 .debug_loc labels to not conflict
4238         with fat LTO part.
4239         (dwarf2out_early_finish): Output debug_line_str.
4241 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
4243         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
4244         index register on z196 or later.
4246 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
4248         * config/s390/s390.c (s390_default_align): Set default function
4249         alignment to 16.
4250         (s390_override_options_after_change): Call s390_default align.
4251         (s390_option_override_internal): Call s390_default_align.
4252         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
4254 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
4256         PR middle-end/86542
4257         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
4258         to _looptemp_ clauses, other than the first two.
4260 2018-07-17  Martin Liska  <mliska@suse.cz>
4262         * opts.c: Do not enable OPT_falign_* for -Os.
4264 2018-07-17  Martin Liska  <mliska@suse.cz>
4266         * align.h (MAX_CODE_ALIGN): New.
4267         (MAX_CODE_ALIGN_VALUE): New.
4268         * common/config/i386/i386-common.c (ix86_handle_option):
4269         (MAX_CODE_ALIGN): Moved to align.h.
4270         * final.c (MAX_CODE_ALIGN): Likewise.
4271         * opts.c (parse_and_check_align_values):
4272         (MAX_CODE_ALIGN): Likewise.
4273         (MAX_CODE_ALIGN_VALUE): Likewise.
4275 2018-07-17  Martin Liska  <mliska@suse.cz>
4277         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
4278         in order to fulfil coding style.
4279         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
4280         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4281         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4282         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
4283         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
4284         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
4285         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
4286         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
4287         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4289 2018-07-17  Martin Liska  <mliska@suse.cz>
4291         * align.h: New file.
4292         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
4293         directly.
4294         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
4295         align_flags of label_to_alignment.
4296         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
4297         align_flags class.
4298         * config/m68k/m68k.c: Do not use removed align_labels_value and
4299         align_loops_value.
4300         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
4301         (LOOP_ALIGN): Likewise.
4302         (LABEL_ALIGN): Likewise.
4303         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
4304         Remove not used macro.
4305         (rs6000_loop_align): Change return type to align_flags.
4306         (rs6000_loop_align_max_skip): Remove.
4307         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
4308         Change return type to align_flags.
4309         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
4310         Remove not used macro.
4311         (rs6000_loop_align):  Change return type to align_flags.
4312         (rs6000_loop_align_max_skip): Remove.
4313         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
4314         * config/rx/rx-protos.h (rx_align_for_label): Make it
4315         static function.
4316         * config/rx/rx.c (rx_align_for_label): Change return type
4317         to align_flags.
4318         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
4319         macro definitions.
4320         into align_flags class.
4321         (LABEL_ALIGN): Likewise.
4322         (LOOP_ALIGN): Likewise.
4323         * config/s390/s390.c (s390_label_align): Use align_flags
4324         class member.
4325         (s390_asm_output_function_label): Likewise.
4326         * config/sh/sh.c (sh_override_options_after_change):
4327         Use align_flags class directly without macros.
4328         (find_barrier): Likewise.
4329         (barrier_align): Likewise.
4330         (sh_loop_align): Likewise.
4331         * config/spu/spu.c (spu_option_override):
4332         Use align_flags_tuple::get_value instead of removed macros.
4333         (spu_sched_init): Likewise.
4334         * config/spu/spu.h (GTY): Likewise.
4335         * config/visium/visium.c (visium_option_override):
4336         Set "8" as default secondary alignment.
4337         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
4338         in order to guarantee secondary alignment of 8.
4339         * coretypes.h: Include align.h header file.
4340         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
4341         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
4342         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
4343         * doc/tm.texi.in: Likewise.
4344         * final.c (struct label_alignment): Remove not used structure.
4345         (LABEL_ALIGN): Change type to align_flags.
4346         (LOOP_ALIGN): Likewise.
4347         (JUMP_ALIGN): Likewise.
4348         (default_loop_align_max_skip): Remove.
4349         (default_label_align_max_skip): Likewise.
4350         (default_jump_align_max_skip): Likewise.
4351         (default_label_align_after_barrier_max_skip):
4352         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
4353         (LABEL_TO_MAX_SKIP): Remove.
4354         (label_to_alignment): Return align_flags type instead of integer.
4355         (label_to_max_skip): Remove.
4356         (align_fuzz): Use align_flags type.
4357         (compute_alignments): Use align_flags type and use align_flags::max
4358         to combine multiple alignments.
4359         (grow_label_align): Grow vec instead of C array.
4360         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
4361         (shorten_branches):  Use align_flags type and use align_flags::max
4362         to combine multiple alignments.
4363         (final_scan_insn_1): Remove usage of secondary alignment that comes
4364         from label alignment, but instead use proper secondary alignment
4365         which is computed in grow_label_align.
4366         * flags.h (struct align_flags_tuple): Move to align.h.
4367         (struct align_flags): Likewise.
4368         (state_align_loops): Rename to align_loops.
4369         (state_align_jumps): Rename to align_jumps.
4370         (state_align_labels): Rename to align_labels.
4371         (state_align_functions): Rename to align_functions.
4372         (align_loops_log): Remove.
4373         (align_jumps_log): Remove.
4374         (align_labels_log): Remove.
4375         (align_functions_log): Remove.
4376         (align_loops_max_skip): Remove.
4377         (align_jumps_max_skip): Remove.
4378         (align_labels_max_skip): Remove.
4379         (align_functions_max_skip): Remove.
4380         (align_loops_value): Remove.
4381         (align_jumps_value): Remove.
4382         (align_labels_value): Remove.
4383         (align_functions_value): Remove.
4384         * output.h (label_to_alignment): Change return type to align_flags.
4385         (label_to_max_skip): Remove.
4386         * target.def: Remove loop_align_max_skip, label_align_max_skip,
4387         jump_align_max_skip macros.
4388         * targhooks.h (default_loop_align_max_skip): Remove.
4389         (default_label_align_max_skip): Likewise.
4390         (default_jump_align_max_skip): Likewise.
4391         (default_label_align_after_barrier_max_skip): Remove.
4392         * toplev.c (read_log_maxskip): Use ::normalize function.
4393         (parse_N_M): Remove not used argument and also call ::normalize.
4394         (parse_alignment_opts): Do not pass unused arguments.
4395         * varasm.c (assemble_start_function): Use directly align_functions
4396         instead of removed macros.
4397         * system.h: Do not poison removed macros.
4399 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
4401         PR middle-end/86539
4402         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
4403         and cond temporaries don't have reference type if iterator has
4404         pointer type.  For init use &for_pre_body instead of pre_p if
4405         for_pre_body is non-empty.
4407 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
4409         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
4410         double-double modes to SFmode directly directly.
4411         (trunc<mode>sf2_fprs): Delete.
4413 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
4415         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
4416         for conversions between IFmode and the decimal floating point modes.
4417         (init_float128_ieee): Use the correct names for conversions between
4418         KFmode and the decimal floating point modes.
4420 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
4422         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
4423         for the conversions between TDmode and IFmode.
4424         (init_float128_ieee): Use more correct names for the conversions
4425         between TDmode and KFmode.
4427 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
4429         PR tree-optimization/86526
4430         * builtins.c (expand_builtin_memcmp): Formatting fixes.
4431         (inline_expand_builtin_string_cmp): Likewise.
4432         (inline_string_cmp): Likewise.  Use c_readstr instead of
4433         builtin_memcpy_read_str.  Add unit_mode temporary.
4435 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4437         PR middle-end/86528
4438         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
4439         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
4441 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4443         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
4444         Alphabetize prototypes of built-in functions, separating out
4445         built-in functions that are listed in this section but should be
4446         described elsewhere.
4448 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
4450         PR target/86511
4451         * expmed.c (emit_store_flag): Do not emit setcc followed by a
4452         conditional move when trapping comparison was split to a
4453         non-trapping one (and vice versa).
4455 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
4457         * config/s390/s390.c (s390_function_profiler): Generate nops
4458         instead of profiler call sequences.
4459         * config/s390/s390.opt: Add the new option.
4461 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
4463         * config/s390/s390.c (s390_function_profiler): Generate
4464         __mcount_loc section.
4465         * config/s390/s390.opt: Add the new option.
4467 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
4469         * common.opt: Add the new warning.
4470         * config/s390/s390.c (s390_function_profiler): Emit "brasl
4471         %r0,__fentry__" when -mfentry is specified.
4472         (s390_option_override_internal): Disallow -mfentry for 31-bit
4473         CPUs.
4474         * config/s390/s390.opt: Add the new option.
4476 2018-07-16  Richard Biener  <rguenther@suse.de>
4478         PR lto/86523
4479         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
4480         for function-local FUNCTION_DECL and RESULT_DECL immediately.
4482 2018-07-16  Martin Liska  <mliska@suse.cz>
4484         PR ipa/86529
4485         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
4486         to ::get_create.
4488 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
4490         * config/arc/arcHS.md: Update ARCHS scheduling rules.
4492 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
4494         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
4495         for ARCHS4x.
4496         * config/arc/arc-cpus.def (hs4x): New cpu.
4497         (hs4xd): Likewise.
4498         * config/arc/arc-tables.opt: Regenerate.
4499         * config/arc/arc.c (arc_sched_issue_rate): New function.
4500         (TARGET_SCHED_ISSUE_RATE): Define.
4501         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
4502         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
4503         fpu_cvt.
4504         (attr tune): Add ARCHS4x tune values.
4505         (attr tune_dspmpy): Define.
4506         (*tst): Correct instruction type.
4507         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
4508         * config/arc/arcHS4x.md: New file.
4509         * config/arc/fpu.md: Update instruction type attributes.
4510         * config/arc/t-multilib: Regenerate.
4512 2018-07-16  Tom de Vries  <tdevries@suse.de>
4514         PR debug/86455
4515         * var-tracking.c (vt_initialize): Fix pre_dec handling.
4517 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
4519         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
4520         early clobber.
4522 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
4524         PR tree-optimization/86514
4525         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
4526         conversion to a boolean type from a type with greater precision.
4528 2018-07-16  Tom de Vries  <tdevries@suse.de>
4530         * var-tracking.c (vt_initialize): Print adjusted insn slim if
4531         dump_flags request TDF_SLIM.
4533 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
4535         * fold-const.c (int_const_binop_1): Abstract...
4536         (wide_int_binop): ...wide int code here.
4537         (poly_int_binop): ...poly int code here.
4538         Abstract the rest of int_const_binop_1 into int_const_binop.
4539         * fold-const.h (wide_int_binop): New.
4540         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
4541         Remove useless PLUS/MINUS_EXPR case.
4542         (zero_nonzero_bits_from_vr): Move wide int code...
4543         (zero_nonzero_bits_from_bounds): ...here.
4544         (extract_range_from_binary_expr_1): Move mask optimization code...
4545         (range_easy_mask_min_max): ...here.
4546         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
4547         (range_easy_mask_min_max): New.
4549 2018-07-15  Jeff Law  <law@redhat.com>
4551         PR target/85993
4552         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
4553         block.
4555 2018-07-14  Jim Wilson  <jimw@sifive.com>
4557         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
4559 2018-07-14  Paul Koning  <ni1d@arrl.net>
4561         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
4563 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
4565         * lto-streamer-out.c (copy_function_or_variable): Dump info about
4566         copying section.
4568 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
4569             Steve Munroe  <munroesj52@gmail.com>
4571         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
4572         (_mm_andnot_si128): Likewise.
4573         (_mm_or_si128): Likewise.
4574         (_mm_xor_si128): Likewise.
4576 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
4578         PR middle-end/78809
4579         * builtins.c (expand_builtin_memcmp): Inline the calls first
4580         when result_eq is false.
4581         (expand_builtin_strcmp): Inline the calls first.
4582         (expand_builtin_strncmp): Likewise.
4583         (inline_string_cmp): New routine. Expand a string compare
4584         call by using a sequence of char comparison.
4585         (inline_expand_builtin_string_cmp): New routine. Inline expansion
4586         a call to str(n)cmp/memcmp.
4587         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
4588         New option.
4589         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
4591 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
4593         * config/arm/driver-arm.c: Include arm-native.h.
4594         (host_detect_local_cpu): Use auto-generated data tables.
4595         (vendors, arm_cpu_table): Delete.  Move part information to ...
4596         * config/arm/arm-cpus.in: ... here.
4597         * config/arm/parsecpu.awk (gen_native): New function.
4598         (vendor, part): New CPU fields.
4599         (END): Add support for building the native CPU detection tables.
4600         * config/arm/t-arm (arm-native.h): Add build rule.
4601         (driver-arm.o): Add dependency on arm-native.h.
4603 2018-07-13  Richard Biener  <rguenther@suse.de>
4605         PR middle-end/85974
4606         * match.pd (addr1 - addr2): Allow either of the operand to
4607         have a conversion.
4609 2018-07-13  Tom de Vries  <tdevries@suse.de>
4611         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
4612         in remap_ssa_name.
4614 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
4616         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
4617         arrays instead of numbered variables.
4619 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
4621         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
4622         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
4624 2018-07-13  Richard Biener  <rguenther@suse.de>
4626         PR debug/86452
4627         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
4628         instead of get_context_die.
4630 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
4631             Richard Biener  <rguenther@suse.de>
4633         PR middle-end/86489
4634         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
4635         that the loop latch destination where phi is defined.
4637 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
4639         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
4640         (riscv_expand_epilogue): Add assertion to check interrupt mode.
4641         (riscv_set_current_function): Extract getting interrupt type to new
4642         function.
4643         (riscv_get_interrupt_type): New function.
4644         (riscv_merge_decl_attributes): New function, checking interrupt type is
4645         same.
4646         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
4648 2018-07-12  Paul Koning  <ni1d@arrl.net>
4650         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
4651         directive.
4653 2018-07-12  Paul Koning  <ni1d@arrl.net>
4655         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
4656         zero reference, add doloop_end instead.
4657         * doc/md.texi (decrement_and_branch_until_zero): Remove.
4658         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
4659         detail for doloop_end.
4661 2018-07-12  Martin Sebor  <msebor@redhat.com>
4663         PR c/86453
4664         * attribs.c (decl_attributes): Reject conflicting attributes before
4665         calling attribute handlers.
4667 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
4669         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
4670          parameter.
4671         (gcc::dump_manager::get_dump_file_name): likewise.
4672         (dump_begin): Likewise.
4673         * dumpfile.h (dump_begin): Update prototype.
4674         (gcc::dump_manager::get_dump_file_name,
4675         gcc::dump_manager::get_dump_file_name): Update prototype.
4677 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
4679         * internal-fn.h (vectorizable_internal_fn_p): New function.
4680         * tree-vect-slp.c (compatible_calls_p): Likewise.
4681         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
4682         to internal functions.
4683         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
4685 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
4687         * fold-const.h (inverse_conditions_p): Declare.
4688         * fold-const.c (inverse_conditions_p): New function.
4689         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
4690         that test the inverse condition of a conditional internal function.
4691         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
4692         * internal-fn.c (internal_fn_mask_index): Handle conditional
4693         internal functions.
4694         (vectorized_internal_fn_supported_p): New function.
4695         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
4696         (any_pred_load_store): Replace with...
4697         (need_to_predicate): ...this new variable.
4698         (redundant_ssa_names): New variable.
4699         (ifcvt_can_use_mask_load_store): Move initial checks to...
4700         (ifcvt_can_predicate): ...this new function.  Handle tree codes
4701         for which a conditional internal function exists.
4702         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
4703         instead of ifcvt_can_use_mask_load_store.  Update after variable
4704         name change.
4705         (predicate_load_or_store): New function, split out from
4706         predicate_mem_writes.
4707         (check_redundant_cond_expr): New function.
4708         (value_available_p): Likewise.
4709         (predicate_rhs_code): Likewise.
4710         (predicate_mem_writes): Rename to...
4711         (predicate_statements): ...this.  Use predicate_load_or_store
4712         and predicate_rhs_code.
4713         (combine_blocks, tree_if_conversion): Update after above name changes.
4714         (ifcvt_local_dce): Handle redundant_ssa_names.
4715         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
4716         general conditional functions.
4717         * tree-vect-stmts.c (vectorizable_call): Likewise.
4719 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
4720             Alan Hayward  <alan.hayward@arm.com>
4721             David Sherwood  <david.sherwood@arm.com>
4723         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
4724         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
4725         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
4726         plus and minus and convert them into IFN_COND_FMA-based sequences.
4727         (convert_mult_to_fma): Handle conditional plus and minus.
4729 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
4731         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
4732         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
4733         (cond_fnms_optab): New optabs.
4734         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
4735         internal functions.
4736         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
4737         * internal-fn.h (get_conditional_internal_fn): Declare.
4738         (get_unconditional_internal_fn): Likewise.
4739         * internal-fn.c (cond_ternary_direct): New macro.
4740         (expand_cond_ternary_optab_fn): Likewise.
4741         (direct_cond_ternary_optab_supported_p): Likewise.
4742         (FOR_EACH_COND_FN_PAIR): Likewise.
4743         (get_conditional_internal_fn): New function.
4744         (get_unconditional_internal_fn): Likewise.
4745         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
4746         (gimple_match_op::gimple_match_op): Add a new overload for 5
4747         operands.
4748         (gimple_match_op::set_op): Likewise.
4749         (gimple_resimplify5): Declare.
4750         * genmatch.c (decision_tree::gen): Generate simplifications for
4751         5 operands.
4752         * gimple-match-head.c (gimple_simplify): Define an overload for
4753         5 operands.  Handle calls with 5 arguments in the top-level overload.
4754         (convert_conditional_op): Handle conversions from unconditional
4755         internal functions to conditional ones.
4756         (gimple_resimplify5): New function.
4757         (build_call_internal): Pass a fifth operand.
4758         (maybe_push_res_to_seq): Likewise.
4759         (try_conditional_simplification): Try converting conditional
4760         internal functions to unconditional internal functions.
4761         Handle 3-operand unconditional forms.
4762         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
4763         Define ternary equivalents of the current rules for binary conditional
4764         internal functions.
4765         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
4766         ternary operations.
4767         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
4768         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
4769         (optab): Handle them.
4770         (SVE_COND_FP_TERNARY): New int iterator.
4771         (sve_fmla_op, sve_fmad_op): New int attributes.
4772         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
4773         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
4774         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
4776 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
4778         * target.def (preferred_else_value): New target hook.
4779         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
4780         * doc/tm.texi: Regenerate.
4781         * targhooks.h (default_preferred_else_value): Declare.
4782         * targhooks.c (default_preferred_else_value): New function.
4783         * internal-fn.h (conditional_internal_fn_code): Declare.
4784         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
4785         (get_conditional_internal_fn): Use it.
4786         (conditional_internal_fn_code): New function.
4787         * gimple-match.h (gimple_match_cond): New struct.
4788         (gimple_match_op): Add a cond member function.
4789         (gimple_match_op::gimple_match_op): Update all forms to take a
4790         gimple_match_cond.
4791         * genmatch.c (expr::gen_transform): Use the same condition as res_op
4792         for the suboperation, but don't specify a particular else_value.
4793         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
4794         (visit_nary_op, visit_reference_op_load): Pass
4795         gimple_match_cond::UNCOND to the gimple_match_op constructor.
4796         * gimple-match-head.c: Include tree-eh.h
4797         (convert_conditional_op): New function.
4798         (maybe_resimplify_conditional_op): Likewise.
4799         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
4800         (gimple_resimplify2): Likewise.
4801         (gimple_resimplify3): Likewise.
4802         (gimple_resimplify4): Likewise.
4803         (maybe_push_res_to_seq): Return null for conditional operations.
4804         (try_conditional_simplification): New function.
4805         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
4806         constructor.
4807         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
4808         IFN_COND_* call.
4809         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
4810         function.
4811         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
4813 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
4815         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
4816         DECL_FCONTEXT
4817         (hash_tree): Do not hash DECL_FCONTEXT
4818         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
4819         Do not stream DECL_FCONTEXT.
4820         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
4821         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
4823 2018-07-12  Richard Biener  <rguenther@suse.de>
4825         PR debug/86462
4826         * dwarf2out.c (gen_block_die): Only output blocks when they have
4827         at least one !DECL_IGNORED_P variable.
4829 2018-07-12  Richard Biener  <rguenther@suse.de>
4831         PR target/84829
4832         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
4833         Remove -mieee-fp handling.
4835 2018-07-12  Richard Biener  <rguenther@suse.de>
4837         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
4838         left-over from last patch.
4840 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
4842         PR tree-optimization/86492
4843         * gimple-ssa-store-merging.c
4844         (imm_store_chain_info::coalesce_immediate_stores): Call
4845         check_no_overlap even for the merge_overlapping case.  Formatting fix.
4847 2018-07-12  Richard Biener  <rguenther@suse.de>
4849         PR middle-end/86479
4850         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
4851         move possibly trapping operations into the conditional.
4853 2018-07-12  Richard Biener  <rguenther@suse.de>
4855         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
4856         (vn_lookup_simplify_result): Remove recursion limit applied
4857         here.
4858         (vn_nary_build_or_lookup_1): Adjust.
4859         (try_to_simplify): Likewise.
4860         * gimple-match-head.c (gimple_resimplify1): Instead apply one
4861         here.
4862         (gimple_resimplify2): Likewise.
4863         (gimple_resimplify3): Likewise.
4864         (gimple_resimplify4): Likewise.
4866 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
4868         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
4869         Use __mmask64 type instead of __mmask8 for __M argument.
4870         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
4871         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
4872         __U argument.
4873         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
4874         __mmask16 for __M argument.
4875         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
4876         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
4877         to __mmask16 instead of __mmask8.
4878         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
4879         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
4880         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
4881         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
4882         instead of __mmask16 for __U argument.
4883         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
4884         __mmask16 instead of __mmask8 for __U argument.
4885         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
4886         __U argument.
4887         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
4888         __mmask16.
4889         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
4890         argument.
4891         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
4892         __U argument.
4893         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
4894         __mmask16.
4895         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
4896         of __mmask16.
4897         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
4898         __U argument.
4899         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
4900         __U argument.
4901         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
4902         __U argument.
4903         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
4904         __U argument.
4905         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
4906         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
4907         return type as well as __M argument type and all casts from __mmask8
4908         to __mmask32.
4909         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
4910         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
4911         return type as well as __M argument type and all casts from __mmask8
4912         to __mmask16.
4913         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
4914         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
4915         return type as well as __M argument type and all casts from __mmask8
4916         to __mmask32.
4917         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
4918         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
4919         return type as well as __M argument type and all casts from __mmask8
4920         to __mmask16.
4921         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
4922         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
4923         __mmask16.
4925 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
4927         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
4928         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
4929         for __U argument.
4931 2018-07-11  Paul Koning  <ni1d@arrl.net>
4933         * doc/md.texi (define_subst): Document how multiple occurrences of
4934         the same argument in the replacement pattern are handled.
4936 2018-07-11  Paul Koning  <ni1d@arrl.net>
4938         * doc/extend.texi (Common Variable Attributes): Move "mode" into
4939         alphabetical order.
4940         (Common Type Attributes): Add "mode" attribute.
4942 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
4944         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
4945         stream DECL_ORIGINAL_TYPE.
4946         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
4947         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
4948         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
4949         Do not walk original type.
4950         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
4951         external decls.
4952         (write_ts_decl_non_common_tree_pointers): Do not stream
4953         DECL_ORIGINAL_TYPE
4954         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
4955         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
4957 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
4959         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
4960         thread twice from the same starting edge.
4962 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
4964         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
4965         * gimple.c (gimple_call_nonnull_result_p): ...here...
4966         (gimple_call_nonnull_arg): ...and here.
4967         * gimple.h (gimple_call_nonnull_result_p): New.
4968         (gimple_call_nonnull_arg): New.
4970 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
4972         * config/arm/arm-cpus.in: Move information from fpu field of each
4973         cpu definition to the isa field.
4974         * config/arm/parsecpu.awk (fpu): Delete match rule.
4975         (gen_comm_data): Don't add bits from the CPU's FPU entry.
4977 2018-07-11  Richard Biener  <rguenther@suse.de>
4979         PR debug/86457
4980         * dwarf2out.c (init_sections_and_labels): Use
4981         output_asm_line_debug_info consistently.
4982         (dwarf2out_early_finish): Likewise.
4983         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
4984         type units.
4986 2018-07-11  Richard Biener  <rguenther@suse.de>
4988         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
4989         Rework father_bb setting in a way to avoid propagating constants
4990         multiple times on a loop body.
4992 2018-07-10  Mark Wielaard  <mark@klomp.org>
4994         PR debug/86459
4995         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
4997 2018-07-10  Richard Biener  <rguenther@suse.de>
4999         * hash-map.h (hash_map::iterator::operator*): Return
5000         references to key and value.
5002 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
5004         PR c++/86443
5005         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
5006         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
5007         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
5008         (gimplify_omp_for): For composite loops, move outer
5009         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
5010         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
5011         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
5012         TREE_LIST for both the original class iterator and the "last" helper
5013         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
5014         loop, remember has_decl_expr from outer composite loops for the
5015         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
5017 2018-07-09  Martin Sebor  <msebor@redhat.com>
5019         PR middle-end/77357
5020         PR middle-end/86428
5021         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
5022         accessing implicitly initialized array elements.
5023         * expr.c (string_constant): Handle string initializers of
5024         character arrays within aggregates.
5025         * gimple-fold.c (fold_array_ctor_reference): Add argument.
5026         Store element offset.  As a special case, handle zero size.
5027         (fold_nonarray_ctor_reference): Same.
5028         (fold_ctor_reference): Add argument.  Store subobject offset.
5029         * gimple-fold.h (fold_ctor_reference): Add argument.
5031 2018-07-09  Paul Koning  <ni1d@arrl.net>
5033         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
5034         (pdp11_insn_cost): New function.
5035         (pdp11_md_asm_adjust): New function.
5036         (TARGET_INVALID_WITHIN_DOLOOP): Define.
5037         (pdp11_rtx_costs): Update to match machine better.
5038         (output_addr_const_pdp11): Correct format mismatch warnings.
5039         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
5040         * config/pdp11/pdp11.md: General change to add base_cost and/or
5041         length attributes for use by new pdp11_insn_cost function.
5042         (MIN_BRANCH): Correct definition.
5043         (MIN_SOB): Ditto.
5044         (doloop_end): Use standard pattern name for looping pattern.
5045         (doloop_end_nocc): New.
5046         (movsf): Add another constraint alternative.
5047         (zero_extendqihi2): Add constraint alternatives for not in place
5048         extend.
5049         (zero_extendhisi2): Remove.
5050         (shift patterns): Add CC handling variants.
5051         (bswaphi2): New.
5052         (bswapsi2): New.
5053         (rothi3): New.
5054         (define_peephole2): New peephole to recognize mov that sets CC for
5055         subsequent test.
5057 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5059         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
5060         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
5061         wi::add.
5063 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
5065         PR c/86420
5066         * real.c (real_nextafter): Return true if result is denormal.
5068 2018-07-09  Martin Liska  <mliska@suse.cz>
5070         * common.opt: Add back wrongly removed attribute.
5072 2018-07-09  Richard Biener  <rguenther@suse.de>
5074         PR debug/86413
5075         * dwarf2out.c (gen_block_die): For an early generated DIE
5076         always output high/low PC attributes.
5078 2018-07-09  Tom de Vries  <tdevries@suse.de>
5080         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
5081         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
5082         onto VAR_DECL with abstract origin.
5084 2018-07-07  Jim Wilson  <jimw@sifive.com>
5086         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
5088 2018-07-07  Tom de Vries  <tdevries@suse.de>
5090         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
5092 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
5094         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
5095         overflow_type.
5096         (combine_bound): Use wide-int overflow calculation instead of
5097         rolling our own.
5098         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
5099         overflow_type.
5100         * fold-const.c (int_const_binop_2): Same.
5101         (extract_muldiv_1): Same.
5102         (fold_div_compare): Same.
5103         (fold_abs_const): Same.
5104         * match.pd: Same.
5105         * poly-int.h (add): Same.
5106         (sub): Same.
5107         (neg): Same.
5108         (mul): Same.
5109         * predict.c (predict_iv_comparison): Same.
5110         * profile-count.c (slow_safe_scale_64bit): Same.
5111         * simplify-rtx.c (simplify_const_binary_operation): Same.
5112         * tree-chrec.c (tree_fold_binomial): Same.
5113         * tree-data-ref.c (split_constant_offset_1): Same.
5114         * tree-if-conv.c (idx_within_array_bound): Same.
5115         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
5116         * tree-ssa-phiopt.c (minmax_replacement): Same.
5117         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
5118         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
5119         * vr-values.c (vr_values::adjust_range_with_scev): Same.
5120         * wide-int.cc (wi::add_large): Same.
5121         (wi::mul_internal): Same.
5122         (wi::sub_large): Same.
5123         (wi::divmod_internal): Same.
5124         * wide-int.h: Change overflow type to overflow_type for neg, add,
5125         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
5126         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
5127         mul_internal, divmod_internal.
5128         (overflow_type): New enum.
5129         (accumulate_overflow): New.
5131 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
5133         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
5134         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
5136 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
5138         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
5139         argument is checked for zero before entering loop, avoid checking again.
5141 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
5143         * gimplify.h (generic_expr_could_trap_p): Set as global function.
5144         * gimplify.h (generic_expr_could_trap_p): Likwise.
5145         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
5147 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
5149         PR tree-optimization/86401
5150         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
5151         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
5152         (fold_bit_and_mask): ... here.  New helper function for match.pd.
5153         * fold-const.h (fold_bit_and_mask): Declare.
5154         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
5156 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
5158         PR target/86324
5159         * target.def (translate_mode_attribute): New hook.
5160         * targhooks.h (default_translate_mode_attribute): Declare.
5161         * targhooks.c (default_translate_mode_attribute): New function.
5162         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
5163         * doc/tm.texi: Regenerate.
5164         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
5165         (rs6000_translate_mode_attribute): New function.
5167 2018-07-06  Paul Koning  <ni1d@arrl.net>
5169         * doc/md.texi (define_split): Document DONE and FAIL.
5170         (define_peephole2): Ditto.
5172 2018-07-05  Jeff Law  <law@redhat.com>
5174         PR tree-optimization/86010
5175         * tree-ssa-dse.c (compute_trims): More aggressively trim at
5176         both the head and tail of mem* and str* calls.
5178 2018-07-05  Jim Wilson  <jimw@sifive.com>
5180         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
5182 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
5184         * config/aarch64/aarch64-simd.md: correct flags text for
5185         MIN_EXPR replacement.
5187 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
5189         * configure: Regenerated.
5191 2018-07-05  Carl Love  <cel@us.ibm.com>
5193         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
5194         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
5195         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
5196         VSX_BUILTIN_DOUBLEL_V4SF.
5198 2018-07-05  Martin Sebor  <msebor@redhat.com>
5200         PR c++/86400
5201         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
5202         than its domain to compute its the upper bound of a char array.
5204 2018-07-05  Nathan Sidwell  <nathan@acm.org>
5206         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
5207         * doc/cpp.texi: Update comment.
5208         * doc/tm.texi: Rebuilt.
5209         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
5210         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
5211         * doc/extend.texi (Backwards Compatibility): Clarify it is system
5212         headers affected by extern "C".
5213         * system.h: Poison NO_IMPLICIT_EXTERN_C.
5214         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
5215         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
5216         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
5217         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
5218         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
5219         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
5220         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
5221         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
5222         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
5223         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
5224         config/sparc/sp64-elf.h, config/spu/spu.h,
5225         config/stormy16/stormy16.h, config/v850/v850.h,
5226         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
5227         define NO_IMPLICIT_EXTERN_C.
5228         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
5230 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
5232         PR target/84711
5233         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
5234         instead of GET_MODE_SIZE when comparing Units.
5236 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
5238         PR target/84711
5239         * rtlanal.c (set_noop_p): Constrain on mode change,
5240         include hard-reg-set.h
5242 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
5244         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
5246 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
5248         Revert
5249         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
5251         PR sanitizer/84250
5252         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
5253         libasan.
5254         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
5256 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
5258         PR sanitizer/84250
5259         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
5260         libasan.
5261         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
5263 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
5265         PR middle-end/86380
5266         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
5268 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
5270         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
5271         neg_*_op* variables.
5273 2018-07-04  Martin Liska  <mliska@suse.cz>
5275         * tree-switch-conversion.c: Define
5276         max_ratio_for_speed and max_ratio_for_size constants.
5278 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
5279             Martin Liska  <mliska@suse.cz>
5281         PR middle-end/66240
5282         PR target/45996
5283         PR c/84100
5284         * common.opt: Rename align options with 'str_' prefix.
5285         * common/config/i386/i386-common.c (set_malign_value): New
5286         function.
5287         (ix86_handle_option): Use it to set -falign-* options/
5288         * config/aarch64/aarch64-protos.h (struct tune_params): Change
5289         type from int to string.
5290         * config/aarch64/aarch64.c: Update default values from int
5291         to string.
5292         * config/alpha/alpha.c (alpha_override_options_after_change):
5293         Likewise.
5294         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
5295         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5296         max skip conditionally.
5297         * config/i386/freebsd.h (SUBALIGN_LOG): New.
5298         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5299         max skip conditionally.
5300         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5301         max skip conditionally.
5302         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
5303         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5304         max skip conditionally.
5305         * config/i386/i386.c (struct ptt): Change type from int to
5306         string.
5307         (ix86_default_align): Set default values.
5308         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
5309         max skip conditionally.
5310         * config/i386/iamcu.h (SUBALIGN_LOG): New.
5311         (ASM_OUTPUT_MAX_SKIP_ALIGN):
5312         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
5313         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5314         max skip conditionally.
5315         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
5316         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
5317         * config/i386/x86-64.h (SUBALIGN_LOG): New.
5318         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5319         max skip conditionally.
5320         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5321         * config/ia64/ia64.c (ia64_option_override): Set default values
5322         for alignment options.
5323         * config/m68k/m68k.c: Handle new str_align_* options.
5324         * config/mips/mips.c (mips_set_compression_mode): Change
5325         type of constants.
5326         (mips_option_override): Set default values for options.
5327         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
5328         Likewise.
5329         * config/rs6000/rs6000.c (rs6000_option_override_internal):
5330         Likewise.
5331         * config/rx/rx.c (rx_option_override): Likewise.
5332         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
5333         (LABEL_ALIGN): Use align_labels_log.
5334         (LOOP_ALIGN): Use align_loops_align.
5335         * config/s390/s390.c (s390_asm_output_function_label): Use new
5336         macros.
5337         * config/sh/sh.c (sh_override_options_after_change):
5338         Change type of constants.
5339         * config/spu/spu.c (spu_sched_init): Likewise.
5340         * config/sparc/sparc.c (sparc_option_override): Set default
5341         values for options.
5342         * config/visium/visium.c (visium_option_override): Likewise.
5343         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
5344         emit p2align format with last argument if it's not needed.
5345         * doc/invoke.texi: Document extended format of -falign-*.
5346         * final.c: Use align_labels alignment.
5347         * flags.h (struct target_flag_state): Change type to use
5348         align_flags.
5349         (struct align_flags_tuple): New.
5350         (struct align_flags): Likewise.
5351         (align_loops_log): Redefine macro to use new types.
5352         (align_loops_max_skip): Redefine macro to use new types.
5353         (align_jumps_log): Redefine macro to use new types.
5354         (align_jumps_max_skip): Redefine macro to use new types.
5355         (align_labels_log): Redefine macro to use new types.
5356         (align_labels_max_skip): Redefine macro to use new types.
5357         (align_functions_log): Redefine macro to use new types.
5358         (align_loops): Redefine macro to use new types.
5359         (align_jumps): Redefine macro to use new types.
5360         (align_labels): Redefine macro to use new types.
5361         (align_functions): Redefine macro to use new types.
5362         (align_functions_max_skip): Redefine macro to use new types.
5363         (align_loops_value): New macro.
5364         (align_jumps_value): New macro.
5365         (align_labels_value): New macro.
5366         (align_functions_value): New macro.
5367         * function.c (invoke_set_current_function_hook): Propagate
5368         alignment values from flags to global variables default in
5369         topleev.h.
5370         * ipa-icf.c (sem_function::equals_wpa): Use
5371         cl_optimization_option_eq instead of memcmp.
5372         * lto-streamer.h (cl_optimization_stream_out): Support streaming
5373         of string types.
5374         (cl_optimization_stream_in): Likewise.
5375         * optc-save-gen.awk: Support strings in cl_optimization.
5376         * opth-gen.awk: Likewise.
5377         * opts.c (finish_options): Remove error checking of invalid
5378         value ranges.
5379         (MAX_CODE_ALIGN): Remove.
5380         (MAX_CODE_ALIGN_VALUE): Likewise.
5381         (parse_and_check_align_values): New function.
5382         (check_alignment_argument): Likewise.
5383         (common_handle_option): Use check_alignment_argument.
5384         * opts.h (parse_and_check_align_values): Declare.
5385         * toplev.c (init_alignments): Remove.
5386         (read_log_maxskip): New.
5387         (parse_N_M): Likewise.
5388         (parse_alignment_opts): Likewise.
5389         (backend_init_target): Remove usage of init_alignments.
5390         * toplev.h (parse_alignment_opts): Declare.
5391         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
5392         argument.
5393         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
5394         * tree.c (cl_option_hasher::equal): New.
5395         * varasm.c: Use new global macros.
5397 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
5399         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
5400         Use a simpler align directive also if MAXSKIP = ALIGN-1.
5401         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5402         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5403         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5404         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5405         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
5406         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
5407         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
5408         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5409         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5410         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5411         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5413 2018-07-04  Martin Liska  <mliska@suse.cz>
5414             Jonathan Wakely  <jwakely@redhat.com>
5416         * coverage.c: Use correct type.
5417         * doc/invoke.texi: Language correction.
5419 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
5421         PR target/85620
5422         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
5423         ENDBRANCH for non-tail call which may return via indirect branch.
5424         * doc/extend.texi: Document indirect_return attribute.
5426 2018-07-03  Martin Sebor  <msebor@redhat.com>
5428         PR tree-optimization/86274
5429         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
5430         precondition.
5431         (format_floating): Correct handling of infinities and NaNs.
5433 2018-07-03  Martin Sebor  <msebor@redhat.com>
5435         * print-tree.c (print_real_cst): New function.
5436         (print_node_brief): Call it.
5437         (print_node): Ditto.
5439 2018-07-03  Jeff Law  <law@redhat.com>
5441         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
5442         into a single pattern.
5444         * config/h8300/h8300.md (ors code_iterator): New.
5445         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
5446         a single pattern and single splitter.
5447         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
5448         (iorqi3_1, xorqi3_1): Likewise.
5449         (iorqi3, xorqi3 expanders): Similarly.
5451         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
5452         (movmd_internal) into a single pattern using the P mode iterator.
5453         (movmd splitters): Similarly.
5454         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
5455         (movsd splitters): Similarly.
5457         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
5458         ADDB, ADDW and ADDL into a single ADD attribute which selects the
5459         right table based on the size of the operand.
5460         * config/h8300/h8300.md (length_table): Corresponding changes. All
5461         references to "addb", "addw" and "addl" changed to "add".
5462         (btst patterns): Merge two variants into a single pattern.
5463         (tstqi, tsthi): Likewise.
5464         (addhi3_incdec, addsi3_incdec): Likewise.
5465         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
5466         (mulhi3, mulsi3): Likewise.
5467         (udivhi3, udivsi3): Likewise.
5468         (divhi3, divsi3): Likewise.
5469         (andorqi3, andorhi3, andorsi3): Likewise.
5471 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
5473         PR target/85694
5474         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
5475         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
5477 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5479         PR tree-optimization/85694
5480         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
5481         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
5482         UNSPEC_URHADD.
5483         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
5484         (<u>avg<mode>3_ceil): New patterns.
5486 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
5488         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
5489         scan-tree-dump directive.
5490         * gcc.dg/vect/slp-perm-2.c: Likewise.
5491         * gcc.dg/vect/slp-perm-3.c: Likewise.
5492         * gcc.dg/vect/slp-perm-5.c: Likewise.
5493         * gcc.dg/vect/slp-perm-6.c: Likewise.
5494         * gcc.dg/vect/slp-perm-7.c: Likewise.
5495         * gcc.dg/vect/slp-perm-8.c: Likewise.
5497 2018-07-03  Marek Polacek  <polacek@redhat.com>
5499         PR middle-end/86202
5500         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
5502 2018-07-03  Richard Biener  <rguenther@suse.de>
5504         PR ipa/86389
5505         * tree-ssa-structalias.c (find_func_clobbers): Properly
5506         handle indirect calls.
5508 2018-07-03  Jeff Law  <law@redhat.com>
5510         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
5511         (shifts): New code iterator.
5512         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
5513         expander.  Fix HImode handling on H8/SX.
5514         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
5515         (subqi3, subhi3, subsi3 expanders): Likewise.
5516         (andqi3, andhi3, andsi3 expanders): Likewise.
5517         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
5518         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
5519         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
5520         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
5521         (zero_extendqihi2, zero_extendqisi2): Likewise.
5522         (extendqihi2, extendqisi2): Likewise.
5523         (rotlqi3, rotlhi3, rotlsi3): Likewise.
5524         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
5525         (rotlqi3_1, rotlhi3_1): Likewise.
5526         (logicalhi3_sn, logicalsi3_sn): Likewise.
5527         (logicalhi3, logicalsi3): Likewise.
5529 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5531         * tree-vect-patterns.c (vect_recog_rotate_pattern)
5532         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
5533         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
5534         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
5535         type to append_pattern_def_seq instead of creating a stmt_vec_info
5536         directly.
5537         (build_mask_conversion): Likewise.  Remove vinfo argument.
5538         (vect_add_conversion_to_patterm): Likewise, renaming to...
5539         (vect_add_conversion_to_pattern): ...this.
5540         (vect_recog_mask_conversion_pattern): Update call to
5541         build_mask_conversion.  Pass the vector type to
5542         append_pattern_def_seq here too.
5543         (vect_recog_gather_scatter_pattern): Update call to
5544         vect_add_conversion_to_pattern.
5546 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5548         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
5549         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5550         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
5551         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
5552         STMT_VINFO_PATTERN_DEF_SEQ to null here.
5553         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
5554         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
5555         append_pattern_def_seq instead of new_pattern_def_seq.
5556         (vect_recog_divmod_pattern): Do both of the above.
5557         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
5558         is null.
5560 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5562         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
5563         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
5564         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
5565         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
5566         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
5567         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
5568         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
5569         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
5570         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
5571         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
5572         parameter with a single stmt_vec_info.
5573         (vect_recog_func_ptr): Likewise.
5574         (vect_recog_gather_scatter_pattern): Likewise, folding in...
5575         (vect_try_gather_scatter_pattern): ...this.
5576         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
5577         the stmt_vec_info of the statement to be matched.  Don't clear
5578         STMT_VINFO_RELATED_STMT.
5579         (vect_pattern_recog): Update call accordingly.
5581 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5583         PR tree-optimization/85694
5584         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
5585         (uavgM3_ceil): Document new optabs.
5586         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
5587         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
5588         functions.
5589         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
5590         (savg_ceil_optab): New optabs.
5591         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
5592         (vect_vect_recog_func_ptrs): Add it.
5593         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
5594         constant directly from the associated lhs.
5596 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5598         * tree-vect-patterns.c (vect_split_statement): New function.
5599         (vect_convert_input): Use it to try to split an existing cast.
5601 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5603         * poly-int.h (print_hex): New function.
5604         * dumpfile.h (dump_dec, dump_hex): Declare.
5605         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
5606         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
5607         min_input_precision, operation_precision and operation_sign.
5608         * tree-vect-patterns.c (vect_get_range_info): New function.
5609         (vect_same_loop_or_bb_p, vect_single_imm_use)
5610         (vect_operation_fits_smaller_type): Delete.
5611         (vect_look_through_possible_promotion): Add an optional
5612         single_use_p parameter.
5613         (vect_recog_over_widening_pattern): Rewrite to use new
5614         stmt_vec_info infomration.  Handle one operation at a time.
5615         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
5616         (vect_truncatable_operation_p, vect_set_operation_type)
5617         (vect_set_min_input_precision): New functions.
5618         (vect_determine_min_output_precision_1): Likewise.
5619         (vect_determine_min_output_precision): Likewise.
5620         (vect_determine_precisions_from_range): Likewise.
5621         (vect_determine_precisions_from_users): Likewise.
5622         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
5623         (vect_vect_recog_func_ptrs): Put over_widening first.
5624         Add cast_forwprop.
5625         (vect_pattern_recog): Call vect_determine_precisions.
5627 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5629         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
5630         statements that have been replaced by further pattern statements.
5631         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
5633 2018-07-03  Richard Biener  <rguenther@suse.de>
5635         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
5636         always set *dt.  Dump vectype in vectype overload.
5637         * dumpfile.h (dump_gimple_expr): New function.
5638         (dump_gimple_expr_loc): Likewise.
5639         * dumpfile.c (dump_gimple_expr): New function.
5640         (dump_gimple_expr_loc): Likewise.
5642 2018-07-02  Jeff Law  <law@redhat.com>
5644         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
5645         the H8/300, H8/300H and H8/S variants into a single pattern.
5646         (movhi_h8300, movqi_h8300hs): Similarly.
5647         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
5648         (QHI mode iterator): New.
5650         * config/h8300/h8300.md: Remove trailing whitespace.
5652 2018-07-02  Jim Wilson  <jimw@sifive.com>
5654         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
5655         instead of emit_insn for interrupt returns.
5656         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
5657         (riscv_sret, riscv_uret): Likewise.
5659 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
5661         * pretty-print.c (selftest::test_pp_format): Move save and restore
5662         of quotes to class auto_fix_quotes, and add an instance.
5663         * selftest.c: Include "intl.h".
5664         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
5665         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
5666         * selftest.h (selftest::auto_fix_quotes): New class.
5668 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
5670         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
5671         (aarch64_sve_prepare_conditional_op): Remove.
5672         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
5673         Allow aarch64_simd_reg_or_zero as select operand; remove
5674         the aarch64_sve_prepare_conditional_op call.
5675         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
5676         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
5677         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
5678         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
5679         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
5680         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
5681         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
5682         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
5683         and a splitters to match all of the *_any patterns.
5684         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
5686         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
5687         (SVE_COND_FP_BINARY_REV): Remove.
5688         (sve_int_op_rev, sve_fp_op_rev): New.
5689         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
5690         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
5691         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
5692         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
5693         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
5694         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
5695         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
5696         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
5697         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
5699         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
5700         Remove match_dup 1 from the inner unspec.
5701         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
5703         * config/aarch64/aarch64.md (movprfx): New attr.
5704         (length): Default movprfx to 8.
5705         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
5706         (*madd<SVE_I>, *msub<SVE_I): Likewise.
5707         (*<su>mul<SVE_I>3_highpart): Likewise.
5708         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
5709         (*v<ASHIFT><SVE_I>3): Likewise.
5710         (*<su><MAXMIN><SVE_I>3): Likewise.
5711         (*<su><MAXMIN><SVE_F>3): Likewise.
5712         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
5713         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
5714         (*div<SVE_F>4): Likewise.
5716 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
5718         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
5719         in dump string.
5721 2018-07-02  Richard Biener  <rguenther@suse.de>
5723         PR tree-optimization/86363
5724         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
5725         memset argument refers to a non-variable address.
5727 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
5729         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
5730         {PLUS,MINUS}_EXPR code to...
5731         (adjust_symbolic_bound): ...here,
5732         (combine_bound): ...here,
5733         (set_value_range_with_overflow): ...and here.
5735 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
5737         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
5738         code...
5739         (extract_range_from_abs_expr): ...here.
5741 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
5743         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
5744         -fno-omit-frame-pointer when not optimizing.
5746 2018-07-02  Martin Liska  <mliska@suse.cz>
5748         PR ipa/86279
5749         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
5750         (propagate_nothrow): Likewise.
5752 2018-07-02  Martin Liska  <mliska@suse.cz>
5754         PR ipa/86323
5755         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
5757 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
5759         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
5760         function in r262149, changing "loc" param from source_location to
5761         const dump_location_t &.
5762         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
5763         declaration, as above.
5765 2018-07-01  Paul Koning  <ni1d@arrl.net>
5767         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
5768         -munit-asm, -mgnu-asm, -mdec-asm.
5769         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
5770         (pdp11_output_labelref): New.
5771         (pdp11_output_def): New.
5772         (pdp11_output_addr_vec_elt): New.
5773         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
5774         %# and %@ format codes.
5775         (pdp11_option_override): New.
5776         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
5777         (pdp11_output_ident): New.
5778         (pdp11_asm_named_section): New.
5779         (pdp11_asm_init_sections): New.
5780         (pdp11_file_start): New.
5781         (pdp11_file_end): New.
5782         (output_ascii): Use .ascii/.asciz for -mdec-asm.
5783         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
5784         %o, like %c but octal.
5785         (pdp11_option_override): New.
5786         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
5787         -mdec-asm.
5788         (DATA_SECTION_ASM_OP): Ditto.
5789         (READONLY_DATA_SECTION_ASM_OP): New.
5790         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
5791         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
5792         (ASM_OUTPUT_LABELREF): Ditto.
5793         (ASM_OUTPUT_DEF): Ditto.
5794         (ASM_OUTPUT_EXTERNAL): New.
5795         (ASM_OUTPUT_SOURCE_FILENAME): New.
5796         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
5797         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
5798         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
5799         %# and %@ format codes.
5800         * config/pdp11/pdp11.opt (mgnu-asm): New.
5801         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
5802         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
5803         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
5805 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
5807         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
5808         dereferencing path[] beyond its length.
5809         (debug_path): New.
5810         (debug_all_paths): New.
5811         (rewire_first_differing_edge): New.
5812         (adjust_paths_after_duplication): New.
5813         (duplicate_thread_path): Call adjust_paths_after_duplication.
5814         Add new argument.
5815         (thread_through_all_blocks): Add new argument to
5816         duplicate_thread_path.
5818 2018-06-30  Jim Wilson  <jimw@sifive.com>
5820         * config/riscv/predicates.md (p2m1_shift_operand): New.
5821         (high_mask_shift_operand): New.
5822         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
5823         pattern using p2m1_shift_operand.
5824         (lshsi3_zero_extend_3+2): New combiner pattern using
5825         high_mask_shift_operand.
5827 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5829         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
5830         split out from...
5831         (vect_recog_rotate_pattern): ...here.
5832         (vect_convert_input): Try to insert casts of invariants in the
5833         preheader.
5834         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
5835         preheader to be empty.
5837 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5839         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
5840         vector type.  If given, install it in the new statement's
5841         STMT_VINFO_VECTYPE.
5842         (vect_element_precision): New function.
5843         (vect_unpromoted_value): New struct.
5844         (vect_unpromoted_value::vect_unpromoted_value): New function.
5845         (vect_unpromoted_value::set_op): Likewise.
5846         (vect_look_through_possible_promotion): Likewise.
5847         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
5848         (vect_widened_op_tree, vect_convert_input): Likewise.
5849         (vect_convert_inputs, vect_convert_output): Likewise.
5850         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
5851         to handle the optional cast of the multiplication result and
5852         vect_widened_op_tree to detect the widened multiplication itself.
5853         Do not require the input and output of promotion casts to have
5854         the same sign, but base the signedness of the operation on the
5855         input rather than the result.  If the pattern includes two
5856         promotions, check that those promotions have the same sign.
5857         Do not restrict the MULT_EXPR handling to a double-width result;
5858         handle quadruple-width results and wider.  Use vect_convert_inputs
5859         to convert the inputs to the common type.
5860         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
5861         to handle the optional cast of the ABS result.  Also allow a sign
5862         change or a sign extension between the ABS and MINUS.
5863         Use vect_widened_op_tree to detect the widened subtraction and use
5864         vect_convert_inputs to convert the inputs to the common type.
5865         (vect_handle_widen_op_by_const): Delete.
5866         (vect_recog_widen_op_pattern): New function.
5867         (vect_recog_widen_mult_pattern): Use it.
5868         (vect_recog_widen_shift_pattern): Likewise.
5869         (vect_recog_widen_sum_pattern): Use
5870         vect_look_through_possible_promotion to handle the promoted
5871         PLUS_EXPR operand.
5873 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5875         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
5876         the containing gimple_seq *.
5877         * gimple-iterator.h (gsi_for_stmt): Declare it.
5878         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
5879         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
5880         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
5881         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
5882         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
5883         checks.
5884         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
5885         split out from...
5886         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
5887         statement being replaced is part of an existing pattern
5888         definition sequence, inserting the new pattern statements before
5889         the original one.
5890         (vect_pattern_recog_1): Don't return a bool.  If the statement
5891         is already part of a pattern, instead apply pattern matching
5892         to the pattern definition statements.  Don't clear the
5893         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
5894         (vect_pattern_recog): Don't break after the first match;
5895         continue processing the pattern definition statements instead.
5896         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
5898 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5900         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
5901         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5902         (vect_recog_widen_sum_pattern): Use it.
5904 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5906         * tree-vect-loop.c (vectorizable_reduction): Assert that the
5907         phi is not a pattern statement and has not been replaced by
5908         a pattern statement.
5909         * tree-vect-patterns.c (type_conversion_p): Don't check
5910         STMT_VINFO_IN_PATTERN_P.
5911         (vect_recog_vector_vector_shift_pattern): Likewise.
5912         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
5913         the pattern statement rather than the original statement; check
5914         directly for a WIDEN_MULT_EXPR here.
5915         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
5916         vect_is_simple_use to return the pattern statement rather
5917         than the original statement; use is_pattern_stmt_p to check
5918         for such a pattern statement.
5919         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
5920         to return the pattern statement rather than the original statement;
5921         don't do the same transformation here.
5922         (vect_is_simple_use): If the defining statement has been replaced
5923         by a pattern statement, return the pattern statement instead.
5924         Remove the corresponding (local) transformation from the vectype
5925         overload.
5927 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5929         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
5930         end and default to null.
5931         * tree-vect-loop.c (vect_create_epilog_for_reduction)
5932         (vectorizable_reduction): Update calls accordingly, dropping the
5933         gimple ** argument if the passed-back statement isn't needed.
5934         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
5935         (vect_recog_rotate_pattern): Likewise.
5936         (vect_recog_mask_conversion_pattern): Likewise.
5937         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
5938         (vect_mask_constant_operand_p): Likewise.
5939         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
5940         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
5941         (get_group_load_store_type, get_load_store_type): Likewise.
5942         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
5943         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
5944         (vectorizable_conversion, vectorizable_assignment): Likewise.
5945         (vectorizable_shift, vectorizable_operation): Likewise.
5946         (vectorizable_store, vect_is_simple_cond): Likewise.
5947         (vectorizable_condition, vectorizable_comparison): Likewise.
5948         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
5949         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
5950         and move it to the end.  Cope with null def_stmt_outs.
5952 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5954         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
5956 2018-06-29  Jeff Law  <law@redhat.com>
5958         * config/v850/v850.c (v850_legitimate_address_p): Handle large
5959         displacements for TARGET_V850E2V3 and newer.
5960         (TARGET_LRA_P): Remove.  Defaults to LRA now.
5961         * config/v850/v850.md (sign23byte_load): Remove.
5962         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
5963         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
5965 2018-06-29  Martin Liska  <mliska@suse.cz>
5967         PR lto/85759
5968         * coverage.c (coverage_init): Mangle full path name.
5969         * doc/invoke.texi: Document the change.
5970         * gcov-io.c (mangle_path): New.
5971         * gcov-io.h (mangle_path): Likewise.
5972         * gcov.c (mangle_name): Use mangle_path for path mangling.
5974 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5976         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
5977         if starting source register is not even.
5979 2018-06-29  Martin Liska  <mliska@suse.cz>
5981         PR tree-optimization/86263
5982         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
5983         Make edge redirection.
5985 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
5987         * dumpfile.c (dump_loc): Add indentation based on scope depth.
5988         (dump_scope_depth): New variable.
5989         (get_dump_scope_depth): New function.
5990         (dump_begin_scope): New function.
5991         (dump_end_scope): New function.
5992         * dumpfile.h (get_dump_scope_depth): New declaration.
5993         (dump_begin_scope): New declaration.
5994         (dump_end_scope): New declaration.
5995         (class auto_dump_scope): New class.
5996         (AUTO_DUMP_SCOPE): New macro.
5997         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
5998         AUTO_DUMP_SCOPE.
6000 2018-06-29  Richard Biener  <rguenther@suse.de>
6002         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
6003         compute_all_dependences succeeds.
6004         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
6005         exceed --param loop-max-datarefs-for-datadeps.
6007 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
6009         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
6011 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
6013         PR target/86348
6014         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
6015         alternative 0 in preferred_for_speed attribute.
6017 2018-06-28  Paul Koning  <ni1d@arrl.net>
6019         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
6020         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
6021         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
6022         * config/pdp11/pdp11.md: Correct "length" attribute calculation
6023         for shift insn patterns.
6025 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
6027         * cgraph.c (cgraph_node::get_body): Replace assignments to
6028         "dump_file" with calls to set_dump_file.
6029         * dumpfile.c (alt_dump_file): Make static, and group with...
6030         (alt_flags): ...this definition.
6031         (dumps_are_enabled): New variable.
6032         (refresh_dumps_are_enabled): New function.
6033         (set_dump_file): New function.
6034         (set_alt_dump_file): New function.
6035         (gcc::dump_manager::dump_start): Replace assignments to
6036         "dump_file" and "alt_dump_file" with calls to set_dump_file and
6037         set_alt_dump_file.
6038         (gcc::dump_manager::dump_finish): Likewise.
6039         * dumpfile.h (alt_dump_file): Delete decl.
6040         (dumps_are_enabled): New variable decl.
6041         (set_dump_file): New function decl.
6042         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
6043         global.
6044         * tree-nested.c (lower_nested_functions): Replace assignments to
6045         "dump_file" with calls to set_dump_file.
6047 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
6049         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
6050         goto_locus of each outgoing edge of each basic block.
6052 2018-06-28  Richard Biener  <rguenther@suse.de>
6054         * dwarf2out.c (decl_scope_table): Remove.
6055         (push_decl_scope): Likewise.
6056         (pop_decl_scope): Likewise.
6057         (gen_type_die_for_member): Do not call push/pop_decl_scope.
6058         (gen_struct_or_union_type_die): Likewise.
6059         (gen_tagged_type_die): Likewise.
6060         (dwarf2out_init): Do not initialize decl_scope_table.
6061         (dwarf2out_c_finalize): Do not free it.
6063 2018-06-28  Richard Biener  <rguenther@suse.de>
6065         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
6066         deciding whether to not re-use a DIE.
6068 2018-06-28  Richard Biener  <rguenther@suse.de>
6070         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
6071         DW_AT_abstract_origin attribute.
6073 2018-06-28  Martin Liska  <mliska@suse.cz>
6075         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
6076         Use newly introduced constants.
6077         * tree-switch-conversion.h (struct jump_table_cluster):
6078         Define max_ratio_for_size and max_ratio_for_speed.
6080 2018-06-28  Martin Liska  <mliska@suse.cz>
6082         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6083         Add new checking assert to catch invalid state.
6084         (jump_table_cluster::can_be_handled): Handle single case
6085         clusters.
6086         (jump_table_cluster::is_beneficial): Bail out for such case.
6087         (bit_test_cluster::find_bit_tests):
6088         Add new checking assert to catch invalid state.
6089         (bit_test_cluster::can_be_handled): Handle single case
6090         clusters.
6091         (bit_test_cluster::is_beneficial): Bail out for such case.
6092         (switch_decision_tree::analyze_switch_statement):
6093         Fix comment.
6095 2018-06-28  Martin Liska  <mliska@suse.cz>
6097         * common.opt: Introduce -completion option.
6098         * gcc.c (driver_handle_option): Handle it.
6099         (driver::main): Print completions if completion
6100         is set.
6101         * opt-suggestions.c (option_proposer::get_completions):
6102         New function.
6103         (option_proposer::suggest_completion): Likewise.
6104         (option_proposer::find_param_completions): Likewise.
6105         (verify_autocompletions): Likewise.
6106         (test_completion_valid_options): Likewise.
6107         (test_completion_valid_params): Likewise.
6108         (in_completion_p): Likewise.
6109         (empty_completion_p): Likewise.
6110         (test_completion_partial_match): Likewise.
6111         (test_completion_garbage): Likewise.
6112         (opt_proposer_c_tests): Likewise.
6113         * opt-suggestions.h: Declare new functions.
6114         * opts.c (common_handle_option): Handle OPT__completion_.
6115         * selftest-run-tests.c (selftest::run_tests): Add
6116         opt_proposer_c_tests.
6117         * selftest.c (assert_str_startswith): New.
6118         * selftest.h (assert_str_startswith): Likewise.
6119         (opt_proposer_c_tests): New.
6120         (ASSERT_STR_STARTSWITH): Likewise.
6122 2018-06-28  Martin Liska  <mliska@suse.cz>
6124         * Makefile.in: Add opt-suggestions.o.
6125         * gcc-main.c: Include opt-suggestions.h.
6126         * gcc.c (driver::driver): Likewise.
6127         (driver::~driver): Remove m_option_suggestions.
6128         (driver::build_option_suggestions): Moved to option_proposer.
6129         (driver::suggest_option): Likewise.
6130         (driver::handle_unrecognized_options): Use option_proposer.
6131         * gcc.h (class driver): Add new memver m_option_proposer.
6132         * opt-suggestions.c: New file.
6133         * opt-suggestions.h: New file.
6135 2018-06-28  Martin Liska  <mliska@suse.cz>
6137         * vec.h (class auto_string_vec): New (moved from auto_argvec).
6138         (auto_string_vec::~auto_string_vec): Likewise.
6140 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
6142         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
6143         prevent_decl_creation_for_types fields up and add reset_location field.
6144         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
6145         statement if id->reset_location is true.
6146         (copy_edges_for_bb): Do not set goto_locus on the new edges if
6147         id->reset_location is true.
6148         (copy_phis_for_bb): Force input_location on the arguments if
6149         id->reset_location is true.
6150         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
6151         is set on the function to be inlined.
6153 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
6155         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
6157 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
6159         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
6160         registers for Pmode.
6161         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
6162         hard registers for the clobbered pseudo.
6164 2018-06-27  Paul Koning  <ni1d@arrl.net>
6166         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6167         mutually exclusive options.
6168         * config/pdp11/constraints.md (h): New constraint.
6169         (O): Update definition to match shift code generation.
6170         (D): New constraint.
6171         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
6172         (CCFP): Remove.
6173         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
6174         function.
6175         (output_jump): Change arguments.
6176         (pdp11_fixed_cc_regs): New function.
6177         (pdp11_cc_mode): Ditto.
6178         (pdp11_expand_shift): Ditto.
6179         (pdp11_assemble_shift): Ditto.
6180         (pdp11_small_shift): Ditto.
6181         (pdp11_branch_cost): Remove.
6182         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
6183         from output.
6184         (pdp11_register_move_cost): Update for CC registers.
6185         (pdp11_rtx_costs): Add case for LSHIFTRT.
6186         (pdp11_output_jump): Add CCNZ mode conditional branches.
6187         (notice_update_cc_on_set): Remove.
6188         (pdp11_cc_mode): New function.
6189         (simple_memory_operand): Correct pre/post decrement case.
6190         (no_side_effect_operand): New function.
6191         (pdp11_regno_reg_class): Add CC_REGS class.
6192         (pdp11_fixed_cc_regs): New function.
6193         (pdp11_small_shift): New function.
6194         (pdp11_expand_shift): New function to expand shift insns.
6195         (pdp11_assemble_shift): New function to output shifts.
6196         (pdp11_branch_cost): Remove.
6197         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
6198         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
6199         (WCHAR_TYPE): Ditto.
6200         (PTRDIFF_TYPE): Ditto.
6201         (ADJUST_INSN_LENGTH): New macro.
6202         (FIXED_REGISTERS): Add CC registers.
6203         (CALL_USED_REGISTERS): Ditto.
6204         (reg_class): Ditto.
6205         (REG_CLASS_NAMES): Ditto.
6206         (REG_CLASS_CONTENTS): Ditto.
6207         (SELECT_CC_MODE): Use new function.
6208         (TARGET_FLAGS_REGNUM): New macro.
6209         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
6210         (cc0_reg_rtx): Remove.
6211         (CC_STATUS_MDEP): Remove.
6212         (CC_STATUS_MDEFP_INIT): Remove.
6213         (CC_IN_FPU): Remove.
6214         (NOTICE_UPDATE_CC): Remove.
6215         (REGISTER_NAMES): Add CC registers.
6216         (BRANCH_COST): Change to constant 1.
6217         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
6218         handling.
6219         * config/pdp11/pdp11.opt (mbcopy): Remove.
6220         (mbcopy-builtin): Remove.
6221         (mbranch-cheap): Remove.
6222         (mbranch-expensive): Remove.
6223         * config/pdp11/predicates.md (expand_shift_operand): Update to
6224         match shift code generation.
6225         (ccnz_operator): New predicate.
6226         * doc/invoke.texi (PDP-11 Options): Remove deleted options
6227         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
6228         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
6229         exclusive options.
6230         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
6231         description of O constraint.
6233 2018-06-27  Jeff Law  <law@redhat.com>
6234             Austin Law  <austinklaw@gmail.com>
6236         * config/v850/v850.md (addsi3_set_flags): New pattern.
6237         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
6238         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
6239         (zero_extendhisi2_v850_set_flags): Likewise.
6240         (zero_extendqisi2_v850_set_flags): Likewise.
6241         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
6242         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
6243         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
6245         * config/v850/v850-protos.h (notice_update_cc): Remove.
6246         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
6247         (v850_print_operand): Handle 'D' and "d".
6248         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
6249         Add handling of arithmetic/logical operations compared against zero.
6250         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
6251         Do not look at v850_compare_op, instead get mode from last argument.
6252         (v850_gen_compare): Remove
6253         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
6254         after reload for prologue insns.
6255         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
6256         patterns.
6257         (construct_save_jarl): Likewise.
6258         (TARGET_FLAGS_REGNUM): Define.
6259         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
6260         (NOTICE_UPDATE_CC): Remove.
6261         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
6262         than cc0.  Conditionalize on reload_completed.
6263         (cmpsi_insn, setfcc_insn): Likewise.
6264         (tst1 splitter): Turn into define_and_split which sets the flags
6265         after reload.
6266         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
6267         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
6268         (cstoresf4, cstoredf4): Clobber the flags.
6269         (cmpsi, cmpsf, cmpdf): Remove expanders.
6270         (setf_insn): Remove pattern.
6271         (addsi3): Turn into define_and_split which clobbers the flags after
6272         reload and a suitable pattern (addsi3_clobber_flags) for use after
6273         reload.
6274         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
6275         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
6276         (ashrsi3, ashrsi3_v850e2): Likewise.
6277         (bins): Clobber the flags.
6278         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
6279         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
6280         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
6281         (call_value_internal_short, call_value_internal_long): Likewise.
6282         (callt_save_interrupt, callt_return_interrupt): Likewise.
6283         (save_interrupt, return_interrupt): Likewise.
6284         (callt_save_all_interrupt, save_all_interrupt): Likewise.
6285         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
6286         (restore_all_interrupt, _restore_all_interrupt): Likewise.
6287         (All FP comparisons): Only allow after reload has completed.
6288         (trfsr): Likewise.
6289         (divh, divhu): Tweak output template.
6290         (branch_z_normal, branch_z_invert): Remove
6291         (branch_nz_normal, branch_nz_invert): Likewise.
6292         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
6294         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
6295         * config/v850/v850.c (notice_update_cc): Remove.
6296         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
6297         (CC_NO_CARRY): Likewise.
6298         (NOTICE_UPDATE_CC): Define to nothing.
6299         * config/v850/v850.md: Remove block comment on cc0 handling
6300         Remove "cc" attribute from all patterns.  Remove cc_status handling
6301         from all patterns.  Minor formatting fixes.
6303 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6305         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
6306         (cortex-a76.cortex-a55): Likewise.
6307         * config/aarch64/aarch64-tune.md: Regenerate.
6308         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
6309         cortex-a76.cortex-a55.
6311 2018-06-27  Jeff Law  <law@redhat.com>
6313         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
6314         (MULTILIB_DIRNAMES): Similarly.
6316 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
6318         * gimple.h (gimple_return_retbnd): Delete.
6319         (gimple_return_set_retbnd): Likewise.
6320         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
6321         gimple_return_set_retbnd.
6322         * gimple-pretty-print.c (dump_gimple_return): Remove call to
6323         gimple_return_retbnd and adjust.
6324         * tree-inline.h (struct copy_body_data): Remove retbnd field.
6325         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
6326         Explicitly return NULL in a couple more cases.  Move assertion
6327         on debug statements and remove unreachable code.
6328         (reset_debug_binding): Do not test id->retbnd.
6329         (expand_call_inline): Do not set it.
6331 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
6333         * configure.ac: Add --disable-gcov option.
6334         * configure: Regenerate.
6335         * Makefile.in: Honour @enable_gcov@.
6336         * doc/install.texi: Document --disable-gcov.
6338 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6340         * config/arm/arm-cpus.in (cortex-a76): New entry.
6341         (cortex-a76.cortex-a55): Likewise.
6342         * config/arm/arm-tables.opt: Regenerate.
6343         * config/arm/arm-tune.md: Likewise.
6344         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
6345         * doc/invoke.texi (ARM Options): Document cortex-a76 and
6346         cortex-a76.cortex-a55.
6348 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
6350         PR target/85769
6351         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
6353 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
6355         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
6356         comment.
6357         (EPILOGUE_USES): Likewise.
6359 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
6361         * tree-inline.c (remap_location): New function extracted from...
6362         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
6363         (copy_phis_for_bb): ...here.  Call remap_location.
6364         (copy_cfg_body): Adjust call to copy_edges_for_bb.
6366 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
6368         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
6369         unaligned vsx for 16B memset.
6371 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
6373         PR target/86285
6374         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
6375         ieee128_float_type_node to long_double_type_node unless
6376         TARGET_LONG_DOUBLE_128 is set.
6378 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
6380         * cfgloop.c (get_loop_location): Convert return type from
6381         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
6382         by implicit construction from rtx_insn *, and using
6383         dump_user_location_t::from_function_decl for the fallback case.
6384         * cfgloop.h (get_loop_location): Convert return type from
6385         location_t to dump_user_location_t.
6386         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
6387         dump_printf_loc to pass in a dump_location_t rather than a
6388         location_t, via the gimple stmt.
6389         * coverage.c (get_coverage_counts): Update calls to
6390         dump_printf_loc to pass in dump_location_t rather than a
6391         location_t.
6392         * doc/optinfo.texi (Dump types): Convert example of
6393         dump_printf_loc from taking "locus" to taking "insn".  Update
6394         description of the "_loc" calls to cover dump_location_t.
6395         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
6396         "selftest.h".
6397         (dump_user_location_t::dump_user_location_t): New constructors,
6398         from gimple *stmt and rtx_insn *.
6399         (dump_user_location_t::from_function_decl): New function.
6400         (dump_loc): Make static.
6401         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
6402         const dump_location_t &.
6403         (dump_generic_expr_loc): Delete.
6404         (dump_printf_loc): Convert param "loc" from location_t to
6405         const dump_location_t &.
6406         (selftest::test_impl_location): New function.
6407         (selftest::dumpfile_c_tests): New function.
6408         * dumpfile.h: Include "profile-count.h".
6409         (class dump_user_location_t): New class.
6410         (struct dump_impl_location_t): New struct.
6411         (class dump_location_t): New class.
6412         (dump_printf_loc): Convert 2nd param from source_location to
6413         const dump_location_t &.
6414         (dump_generic_expr_loc): Delete.
6415         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
6416         const dump_location_t &.
6417         * gimple-fold.c (fold_gimple_assign): Update call to
6418         dump_printf_loc to pass in a dump_location_t rather than a
6419         location_t, via the gimple stmt.
6420         (gimple_fold_call): Likewise.
6421         * gimple-loop-interchange.cc
6422         (loop_cand::analyze_iloop_reduction_var): Update for change to
6423         check_reduction_path.
6424         (tree_loop_interchange::interchange): Update for change to
6425         find_loop_location.
6426         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
6427         change in return-type of find_loop_location.
6428         (graphite_regenerate_ast_isl): Likewise.
6429         * graphite-optimize-isl.c (optimize_isl): Likewise.
6430         * graphite.c (graphite_transform_loops): Likewise.
6431         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
6432         pass in a dump_location_t rather than a location_t, via the
6433         gimple stmt.
6434         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6435         * ipa.c (walk_polymorphic_call_targets): Likewise.
6436         * loop-unroll.c (report_unroll): Convert "locus" param from
6437         location_t to dump_location_t.
6438         (decide_unrolling): Update for change to get_loop_location's
6439         return type.
6440         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
6441         location_t to dump_user_location_t.
6442         (grid_find_single_omp_among_assignments_1): Updates calls to
6443         dump_printf_loc to pass in a dump_location_t rather than a
6444         location_t, via the gimple stmt.
6445         (grid_parallel_clauses_gridifiable): Convert "tloc" from
6446         location_t to dump_location_t.  Updates calls to dump_printf_loc
6447         to pass in a dump_location_t rather than a location_t, via the
6448         gimple stmt.
6449         (grid_inner_loop_gridifiable_p): Likewise.
6450         (grid_dist_follows_simple_pattern): Likewise.
6451         (grid_gfor_follows_tiling_pattern): Likewise.
6452         (grid_target_follows_gridifiable_pattern): Likewise.
6453         (grid_attempt_target_gridification): Convert initialization
6454         of local "grid" from memset to zero-initialization; FIXME: does
6455         this require C++11?  Update call to dump_printf_loc to pass in a
6456         optinfo_location rather than a location_t, via the gimple stmt.
6457         * profile.c (read_profile_edge_counts): Updates call to
6458         dump_printf_loc to pass in a dump_location_t rather than a
6459         location_t
6460         (compute_branch_probabilities): Likewise.
6461         * selftest-run-tests.c (selftest::run_tests): Call
6462         dumpfile_c_tests.
6463         * selftest.h (dumpfile_c_tests): New decl.
6464         * tree-loop-distribution.c (pass_loop_distribution::execute):
6465         Update for change in return type of find_loop_location.
6466         * tree-parloops.c (parallelize_loops): Likewise.
6467         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
6468         "locus" from location_t to dump_user_location_t.
6469         (canonicalize_loop_induction_variables): Likewise.
6470         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
6471         for change in return type of find_loop_location.
6472         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
6473         to dump_printf_loc to pass in a dump_location_t rather than a
6474         location_t, via the stmt.
6475         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
6476         Likewise.
6477         * tree-vect-loop-manip.c (find_loop_location): Convert return
6478         type from source_location to dump_user_location_t.
6479         (vect_do_peeling): Update for above change.
6480         (vect_loop_versioning): Update for change in type of
6481         vect_location.
6482         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
6483         from location_t to dump_user_location_t.
6484         (vect_estimate_min_profitable_iters): Update for change in type
6485         of vect_location.
6486         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
6487         location_t to dump_location_t.
6488         (vect_slp_bb): Update for change in type of vect_location.
6489         * tree-vectorizer.c (vect_location): Convert from source_location
6490         to dump_user_location_t.
6491         (try_vectorize_loop_1): Update for change in vect_location's type.
6492         (vectorize_loops): Likewise.
6493         (increase_alignment): Likewise.
6494         * tree-vectorizer.h (vect_location): Convert from source_location
6495         to dump_user_location_t.
6496         (find_loop_location): Convert return type from source_location to
6497         dump_user_location_t.
6498         (check_reduction_path): Convert 1st param from location_t to
6499         dump_user_location_t.
6500         * value-prof.c (check_counter): Update call to dump_printf_loc to
6501         pass in a dump_user_location_t rather than a location_t; update
6502         call to error_at for change in type of "locus".
6503         (check_ic_target): Update call to dump_printf_loc to
6504         pass in a dump_user_location_t rather than a location_t, via the
6505         call_stmt.
6507 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
6509         * config/s390/s390.h (enum processor_flags): Do not use
6510         default tune parameter when -march was specified.
6512 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
6514         PR target/86314
6515         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
6516         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
6517         operands.
6519 2018-06-26  Richard Biener  <rguenther@suse.de>
6521         PR tree-optimization/86287
6522         PR bootstrap/86316
6523         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
6524         (vect_analyze_loop): Initialize n_stmts.
6526 2018-06-26  Richard Biener  <rguenther@suse.de>
6528         PR middle-end/86271
6529         * fold-const.c (fold_convertible_p): Pointer extension
6530         isn't valid.
6532 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
6534         PR debug/86064
6535         * dwarf2out.c (loc_list_has_views): Adjust comments.
6536         (dw_loc_list): Split single cross-partition range with
6537         nonzero locview.
6539 2018-06-25  Jeff Law  <law@redhat.com>
6541         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
6542         on -mbig-switch by default.
6544         * config/v850/predicates.md (const_float_1_operand): Fix match_code
6545         test.
6546         (const_float_0_operand): Remove unused predicate.
6547         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
6548         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
6549         (recipsf2): New expander.  Original pattern now called
6550         (recipsf2_insn).
6551         (recipdf2, recipdf2_insn): Similarly.
6552         (rsqrtsf2, rsqrtsf2_insn): Similarly
6553         (rsqrtdf2, rsqrtdf2_insn): Similarly
6555 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
6557         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
6558         Simplify logic for FreeBSD (twice).
6560 2018-06-25  Martin Sebor  <msebor@redhat.com>
6562         PR tree-optimization/86204
6563         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
6564         a strnlen result if it's less than the length of the string.
6566 2018-06-25  Martin Sebor  <msebor@redhat.com>
6568         PR tree-optimization/85700
6569         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
6570         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
6571         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
6573 2018-06-25  Martin Sebor  <msebor@redhat.com>
6575         * doc/extend.texi (Zero-length arrays): Update and clarify.
6577 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
6579         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
6580         added IEEE/IBM long double multilib support on PowerPC little
6581         endian Linux systems.
6582         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
6583         (MULTILIB_DEFAULTS): Likewise.
6584         * config/rs6000/rs6000.c (rs6000_option_override_internal):
6585         Likewise.
6586         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
6587         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
6588         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
6590 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
6592         PR middle-end/86311
6593         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
6594         (REORDER_45): Likewise.
6596 2018-06-25  Jeff Law  <law@redhat.com>
6598         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
6599         dividend to 32 bits.  Adjust length.
6600         (udivmodhi4): Cleanup output template.  Fix length.
6602 2018-06-25  Carl Love  <cel@us.ibm.com>
6604         * config/rs6000/vsx.md: Change word selector to prefered location.
6606 2018-06-25  Richard Biener  <rguenther@suse.de>
6608         PR tree-optimization/86304
6609         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
6610         epilogue-if-converted loops as well.
6612 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
6614         * lto-section-out.c (lto_begin_section): Do not print section
6615         name for noaddr and unnumbered dumps.
6617 2018-06-25  Richard Biener  <rguenther@suse.de>
6619         * tree-vectorizer.h (struct vec_info_shared): New structure
6620         with parts split out from struct vec_info and loop_nest from
6621         struct _loop_vec_info.
6622         (struct vec_info): Adjust accordingly.
6623         (struct _loop_vec_info): Likewise.
6624         (LOOP_VINFO_LOOP_NEST): Adjust.
6625         (LOOP_VINFO_DATAREFS): Likewise.
6626         (LOOP_VINFO_DDRS): Likewise.
6627         (struct _bb_vec_info): Likewise.
6628         (BB_VINFO_DATAREFS): Likewise.
6629         (BB_VINFO_DDRS): Likewise.
6630         (struct _stmt_vec_info): Add dr_aux member.
6631         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
6632         (DR_MISALIGNMENT_UNINITIALIZED): New.
6633         (set_dr_misalignment): Adjust.
6634         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
6635         (vect_analyze_loop): Adjust prototype.
6636         (vect_analyze_loop_form): Likewise.
6637         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
6638         Compute dependences lazily.
6639         (vect_record_base_alignments): Use shared datarefs/ddrs.
6640         (vect_verify_datarefs_alignment): Likewise.
6641         (vect_analyze_data_refs_alignment): Likewise.
6642         (vect_analyze_data_ref_accesses): Likewise.
6643         (vect_analyze_data_refs): Likewise.
6644         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
6645         constructor parameter for shared part.
6646         (vect_analyze_loop_form): Pass in shared part and adjust.
6647         (vect_analyze_loop_2): Pass in storage for the number of
6648         stmts.  Move loop nest finding to the caller.  Compute
6649         datarefs lazily.
6650         (vect_analyze_loop): Pass in shared part.
6651         (vect_transform_loop): Verify shared datarefs are unchanged.
6652         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
6653         constructor parameter for shared part.
6654         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
6655         (vect_slp_bb): Verify shared datarefs are unchanged before
6656         transform.
6657         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
6658         change.
6659         (new_stmt_vec_info): Initialize DR_AUX misalignment to
6660         DR_MISALIGNMENT_UNINITIALIZED.
6661         * tree-vectorizer.c (vec_info::vec_info): Add constructor
6662         parameter for shared part.
6663         (vec_info::~vec_info): Adjust.
6664         (vec_info_shared::vec_info_shared): New.
6665         (vec_info_shared::~vec_info_shared): Likewise.
6666         (vec_info_shared::save_datarefs): Likewise.
6667         (vec_info_shared::check_datarefs): Likewise.
6668         (try_vectorize_loop_1): Construct shared part live for analyses
6669         of a single loop for multiple vector sizes.
6670         * tree-parloops.c (gather_scalar_reductions): Adjust.
6672 2018-06-25  Richard Biener  <rguenther@suse.de>
6674         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
6675         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
6676         (vect_analyze_data_refs): Remove similar code from here and
6677         simplify accordingly.
6679 2018-06-25  Richard Biener  <rguenther@suse.de>
6681         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
6682         for reverse storage order accesses rather than asserting
6683         they cannot happen here.
6685 2018-06-25  Tom de Vries  <tdevries@suse.de>
6687         PR debug/86257
6688         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
6689         Use data16 instead of .byte for insn prefix.
6691 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
6693         PR C++/86082
6694         * parser.c (make_char_string_pack): Pass this literal chars
6695         through cpp_interpret_string.
6696         (cp_parser_userdef_numeric_literal): Check the result of
6697         make_char_string_pack.
6699 2018-06-24  Maya Rashish  <coypu@sdf.org>
6701         * ginclude/stddef.h: Simplify conditions around avoiding
6702         re-definition of __size_t.
6704 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
6706         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
6707         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
6709 2018-06-22  Maya Rashish  <coypu@sdf.org>
6711         * doc/invoke.texi (mno-fancy-math-387): Update for changes
6712         made to OpenBSD and NetBSD through the years.
6714 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6716         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
6717         behavior of vec_pack (vector double, vector double) to match
6718         behavior of vec_float2 (vector double, vector double).
6720 2018-06-22  Olivier Hainque  <hainque@adacore.com>
6722         * gimplify.c (gimplify_function_tree): Prevent creation
6723         of a trampoline for the address of the current function
6724         passed to entry/exit instrumentation hooks.
6726 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
6728         PR target/86222
6729         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
6730         correctly.
6732 2018-06-22  Martin Liska  <mliska@suse.cz>
6734         PR tree-optimization/86263
6735         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6736         Bail out if is_enabled is false.
6737         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
6738         New declaration.
6739         (jump_table_cluster::is_enabled): New function.
6741 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
6743         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
6744         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
6745         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
6746         (lto_input_ts_binfo_tree_pointers): Likewise.
6747         * tree-streamer-out.c (streamer_write_tree_bitfields,
6748         write_ts_binfo_tree_pointers): Likewise.
6749         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
6751 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
6753         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
6755 2018-06-22  Martin Liska  <mliska@suse.cz>
6757         * symbol-summary.h (get): Make it pure and inline move
6758         functionality from ::get function.
6759         (get): Remove and inline into ::get and ::get_create.
6760         (get_create): Move code from ::get function.
6762 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6764         PR target/85994
6765         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
6766         -x assembler-with-cpp.
6768 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6770         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
6771         _FILE_OFFSET_BITS=64 for C++.
6773 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
6775         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
6776         conversion insn that shows up when pr85657-3.c is compiled using
6777         IEEE 128-bit long double.
6778         (neg<mode>2_internal): Use the correct mode to check whether the
6779         mode is IBM extended.
6780         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
6781         multiply and divide external functions from being created more
6782         than once.
6784 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
6786         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
6787         functions.
6788         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
6789         the edge can be forwarded.
6790         (cfg_layout_merge_blocks): Likewise.
6792 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
6794         * except.c (finish_eh_generation): Commit edge insertions only after
6795         the EH edges have been redirected from post-landing to landing pads.
6797 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
6799         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
6800         create_tmp_var_for to create the FRAME decl.
6801         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
6803 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
6805         * tree-inline.c (copy_edges_for_bb): Minor tweak.
6806         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
6807         debug statement when resetting its value.
6808         (expand_call_inline): Copy the locus of the call onto the assignment
6809         of the return value, if any.  Use local variable in more cases.
6811 2018-06-21  Martin Liska  <mliska@suse.cz>
6813         * ipa-pure-const.c (propagate_nothrow): Use
6814         funct_state_summaries->get.
6815         (dump_malloc_lattice): Likewise.
6816         (propagate_malloc): Likewise.
6818 2018-06-21  Richard Biener  <rguenther@suse.de>
6820         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
6821         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
6822         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
6823         comment.
6824         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
6825         BLOCK_ABSTRACT_ORIGIN unconditionally.
6827 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
6829         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
6830         deleting it.
6831         * ipa-reference.c (ipa_reference_c_finalize): Delete
6832         ipa_ref_opt_sum_summaries and set it to NULL.
6834 2018-06-21  Tom de Vries  <tdevries@suse.de>
6836         PR tree-optimization/85859
6837         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
6838         test with comment from bb_no_side_effects_p.
6840 2018-06-21  Richard Biener  <rguenther@suse.de>
6842         PR tree-optimization/86232
6843         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
6844         max for constant niter.
6846 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6848         * config/aarch64/aarch64-simd.md
6849         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
6851 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6853         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
6854         Make opernads of the unspec commutative.
6856 2018-06-21  Richard Biener  <rguenther@suse.de>
6858         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
6859         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
6860         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
6861         (vect_analyze_data_ref_dependence): Re-order checks to deal with
6862         NULL DR_STEP.
6863         (vect_record_base_alignments): Do not record base alignment
6864         for gathers or scatters.
6865         (vect_compute_data_ref_alignment): Drop return value that is always
6866         true.  Bail out early for gathers or scatters.
6867         (vect_enhance_data_refs_alignment): Bail out early for gathers
6868         or scatters.
6869         (vect_find_same_alignment_drs): Likewise.
6870         (vect_analyze_data_refs_alignment): Remove dead code.
6871         (vect_slp_analyze_and_verify_node_alignment): Likewise.
6872         (vect_analyze_data_refs): For possible gathers or scatters do
6873         not create an alternate DR, just check their possible validity
6874         and mark them.  Adjust DECL_NONALIASED handling to not rely
6875         on DR_BASE_ADDRESS.
6876         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
6877         update inits of gathers or scatters.
6878         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
6879         Also copy gather/scatter flag to pattern vinfo.
6881 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6883         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
6884         behavior of vec_packsu (vector unsigned long long, vector unsigned
6885         long long) to match behavior of vec_packs with same signature.
6887 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
6888             Thomas Schwinge <thomas@codesourcery.com>
6889             Cesar Philippidis  <cesar@codesourcery.com>
6891         * gimplify.c (gimplify_scan_omp_clauses): Add support for
6892         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
6893         (gimplify_adjust_omp_clauses): Likewise.
6894         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
6895         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
6896         (gimplify_omp_target_update): Update handling of acc update and
6897         enter/exit data.
6898         * omp-low.c (install_var_field): Remove unused parameter
6899         base_pointers_restrict.
6900         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
6901         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
6902         FINALIZE}
6903         (omp_target_base_pointers_restrict_p): Delete.
6904         (scan_omp_target): Update call to scan_sharing_clauses.
6905         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
6906         FINALIZE}.
6907         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
6908         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
6909         (convert_local_omp_clauses): Likewise.
6910         * tree-pretty-print.c (dump_omp_clause): Likewise.
6911         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
6912         FINALIZE}.
6913         (omp_clause_code_name): Likewise.
6915 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
6917         PR debug/86194
6918         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
6919         be narrowed.
6921         PR tree-optimization/86231
6922         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
6923         anti-range don't overwrite *vr0min before using it to compute *vr0max.
6925 2018-06-20  Tom de Vries  <tdevries@suse.de>
6927         PR tree-optimization/86097
6928         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
6929         iv type if signedness of iv type is not the same as that of *nit.
6931 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
6933         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
6934         EDGE_EH edges, verify they are all EDGE_EH.
6936 2018-06-20  Maya Rashish  <coypu@sdf.org>
6938         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
6940 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6942         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
6943         * config/aarch64/aarch64.c (xgene1_tunings): Add
6944         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
6945         (aarch64_mode_valid_for_sched_fusion_p):
6946         Allow 16-byte modes.
6947         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
6948         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
6949         128-bit modes.
6950         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
6951         New pattern.
6952         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
6953         * config/aarch64/iterators.md (VQ2): New mode iterator.
6955 2018-06-20  Martin Liska  <mliska@suse.cz>
6957         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
6958         Change default ratio from 10 to 8.
6960 2018-06-20  Martin Liska  <mliska@suse.cz>
6962         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6963         New.
6964         (bit_test_cluster::find_bit_tests): Likewise.
6965         (switch_decision_tree::analyze_switch_statement): Find clusters.
6966         * tree-switch-conversion.h (struct jump_table_cluster): Document
6967         hierarchy.
6969 2018-06-20  Martin Liska  <mliska@suse.cz>
6971         * tree-switch-conversion.c (switch_conversion::collect):
6972         Record m_uniq property.
6973         (switch_conversion::expand): Bail out for special conditions.
6974         (group_cluster::~group_cluster): New.
6975         (group_cluster::group_cluster): Likewise.
6976         (group_cluster::dump): Likewise.
6977         (jump_table_cluster::emit): New.
6978         (switch_decision_tree::fix_phi_operands_for_edges): New.
6979         (struct case_node): Remove struct.
6980         (jump_table_cluster::can_be_handled): New.
6981         (case_values_threshold): Moved to header.
6982         (reset_out_edges_aux): Likewise.
6983         (jump_table_cluster::is_beneficial): New.
6984         (bit_test_cluster::can_be_handled): Likewise.
6985         (add_case_node): Remove.
6986         (bit_test_cluster::is_beneficial): New.
6987         (case_bit_test::cmp): New.
6988         (bit_test_cluster::emit): New.
6989         (expand_switch_as_decision_tree_p): Remove.
6990         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
6991         (fix_phi_operands_for_edge): Likewise.
6992         (switch_decision_tree::analyze_switch_statement): New.
6993         (compute_cases_per_edge): Move ...
6994         (switch_decision_tree::compute_cases_per_edge): ... here.
6995         (try_switch_expansion): Likewise.
6996         (switch_decision_tree::try_switch_expansion): Likewise.
6997         (record_phi_operand_mapping): Likewise.
6998         (switch_decision_tree::record_phi_operand_mapping): Likewise.
6999         (emit_case_decision_tree): Likewise.
7000         (switch_decision_tree::emit): Likewise.
7001         (balance_case_nodes): Likewise.
7002         (switch_decision_tree::balance_case_nodes): Likewise.
7003         (dump_case_nodes): Likewise.
7004         (switch_decision_tree::dump_case_nodes): Likewise.
7005         (emit_jump): Likewise.
7006         (switch_decision_tree::emit_jump): Likewise.
7007         (emit_cmp_and_jump_insns): Likewise.
7008         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
7009         (emit_case_nodes): Likewise.
7010         (switch_decision_tree::emit_case_nodes): Likewise.
7011         (conditional_probability): Remove.
7012         * tree-switch-conversion.h (enum cluster_type): New.
7013         (PRINT_CASE): New.
7014         (struct cluster): Likewise.
7015         (cluster::cluster): Likewise.
7016         (struct simple_cluster): Likewise.
7017         (simple_cluster::simple_cluster): Likewise.
7018         (struct group_cluster): Likewise.
7019         (struct jump_table_cluster): Likewise.
7020         (struct bit_test_cluster): Likewise.
7021         (struct min_cluster_item): Likewise.
7022         (struct case_tree_node): Likewise.
7023         (case_tree_node::case_tree_node): Likewise.
7024         (jump_table_cluster::case_values_threshold): Likewise.
7025         (struct case_bit_test): Likewise.
7026         (struct switch_decision_tree): Likewise.
7027         (struct switch_conversion): Likewise.
7028         (switch_decision_tree::reset_out_edges_aux): Likewise.
7030 2018-06-20  Martin Liska  <mliska@suse.cz>
7032         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
7033         (hoist_edge_and_branch_if_true): Likewise.
7034         (expand_switch_using_bit_tests_p): Likewise.
7035         (struct case_bit_test): Likewise.
7036         (case_bit_test_cmp): Likewise.
7037         (emit_case_bit_tests): Likewise.
7038         (switch_conversion::switch_conversion): New class.
7039         (struct switch_conv_info): Remove old struct.
7040         (collect_switch_conv_info): More to ...
7041         (switch_conversion::collect): ... this.
7042         (check_range): Likewise.
7043         (switch_conversion::check_range): Likewise.
7044         (check_all_empty_except_final): Likewise.
7045         (switch_conversion::check_all_empty_except_final): Likewise.
7046         (check_final_bb): Likewise.
7047         (switch_conversion::check_final_bb): Likewise.
7048         (create_temp_arrays): Likewise.
7049         (switch_conversion::create_temp_arrays): Likewise.
7050         (free_temp_arrays): Likewise.
7051         (gather_default_values): Likewise.
7052         (switch_conversion::gather_default_values): Likewise.
7053         (build_constructors): Likewise.
7054         (switch_conversion::build_constructors): Likewise.
7055         (constructor_contains_same_values_p): Likewise.
7056         (switch_conversion::contains_same_values_p): Likewise.
7057         (array_value_type): Likewise.
7058         (switch_conversion::array_value_type): Likewise.
7059         (build_one_array): Likewise.
7060         (switch_conversion::build_one_array): Likewise.
7061         (build_arrays): Likewise.
7062         (switch_conversion::build_arrays): Likewise.
7063         (gen_def_assigns): Likewise.
7064         (switch_conversion::gen_def_assigns): Likewise.
7065         (prune_bbs): Likewise.
7066         (switch_conversion::prune_bbs): Likewise.
7067         (fix_phi_nodes): Likewise.
7068         (switch_conversion::fix_phi_nodes): Likewise.
7069         (gen_inbound_check): Likewise.
7070         (switch_conversion::gen_inbound_check): Likewise.
7071         (process_switch): Use the newly created class.
7072         (switch_conversion::expand): New.
7073         (switch_conversion::~switch_conversion): New.
7074         * tree-switch-conversion.h: New file.
7076 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7078         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
7079         tree-vect-patterns.c.
7080         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
7081         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
7082         (vect_recog_sad_pattern): Likewise.
7083         (vect_recog_widen_sum_pattern): Likewise.
7084         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
7085         (vect_recog_widen_shift_pattern): Remove the type_in argument.
7086         (vect_recog_rotate_pattern): Likewise.
7087         (vect_recog_mult_pattern): Likewise.
7088         (vect_recog_vector_vector_shift_pattern): Likewise.
7089         (vect_recog_divmod_pattern): Likewise.
7090         (vect_recog_mixed_size_cond_pattern): Likewise.
7091         (vect_recog_bool_pattern): Likewise.
7092         (vect_recog_mask_conversion_pattern): Likewise.
7093         (vect_try_gather_scatter_pattern): Likewise.
7094         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
7095         (vect_recog_over_widening_pattern): Likewise.
7096         (vect_recog_gather_scatter_pattern): Likewise.
7097         (vect_recog_func_ptr): Move from tree-vectorizer.h
7098         (vect_vect_recog_func_ptrs): Move further down the file.
7099         (vect_recog_func): Likewise.  Remove the third argument.
7100         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
7101         (vect_pattern_recog_1): Expect the pattern function to do any
7102         necessary target tests.  Also expect it to provide a vector type.
7103         Remove the type_in handling.
7105 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7107         * tree-vect-patterns.c (vect_pattern_detected): New function.
7108         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
7109         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
7110         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
7111         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
7112         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
7113         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
7114         (vect_recog_mask_conversion_pattern)
7115         (vect_try_gather_scatter_pattern): Likewise.
7117 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7119         * tree-vect-patterns.c (vect_get_internal_def): New function.
7120         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7121         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
7122         (search_type_for_mask_1): Use it.
7124 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7126         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
7127         redundant WIDEN_SUM_EXPR handling.
7128         (vect_recog_sad_pattern): Likewise.
7130 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7132         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
7133         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
7134         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
7135         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
7136         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
7138 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7140         * tree-vect-stmts.c (vectorizable_call): Make sure that we
7141         use the stmt_vec_info of the original bb statement for the
7142         new zero assignment, even if the call is part of a pattern.
7144 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7146         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
7147         that the sequence is attached to the original statement rather
7148         than the pattern statement.
7149         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
7150         PATTERN_DEF_SEQ from the original statement rather than
7151         the main pattern statement.
7152         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
7153         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
7154         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
7156 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7158         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
7159         definition statements before the early exit for statements that aren't
7160         live or relevant.
7161         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
7162         split out from...
7163         (vect_transform_loop): ...here.  Process pattern definition
7164         statements without first checking whether the main pattern
7165         statement is live or relevant.
7167 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
7169         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
7170         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
7172 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
7174         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
7175         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
7176         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
7177         (expand_block_compare): Change select_block_compare_mode call.
7178         (expand_strncmp_align_check): Use new functions, fix comment.
7179         (emit_final_str_compare_gpr): New function.
7180         (expand_strn_compare): Refactor and clean up code.
7181         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
7183 2018-06-19  Tony Reix  <tony.reix@atos.com>
7184             Damien Bergamini  <damien.bergamini@atos.com>
7185             David Edelsohn  <dje.gcc@gmail.com>
7187         * collect2.c (static_obj): New variable.
7188         (static_libs): New variable.
7189         (is_in_list): Uncomment declaration.
7190         (main): Track AIX libraries linked statically.
7191         (is_in_list): Uncomment definition.
7192         (scan_prog_file): Don't add AIX shared libraries initializer
7193         to constructor list if linking statically.
7195 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
7197         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
7198         constant.
7199         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
7201 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
7203         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
7204         blocks.
7206 2018-06-19  Martin Liska  <mliska@suse.cz>
7208         * config/i386/i386.c (ix86_can_inline_p): Do not use
7209         ipa_fn_summaries::get_create.
7210         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
7211         get.
7212         (devirtualization_time_bonus): Likewise.
7213         (ipcp_propagate_stage): Likewise.
7214         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
7215         (edge_set_predicate): Likewise.
7216         (evaluate_conditions_for_known_args): Likewise.
7217         (evaluate_properties_for_edge): Likewise.
7218         (ipa_call_summary::reset): Tranform to ...
7219         (ipa_call_summary::~ipa_call_summary): ... this.
7220         (ipa_fn_summary::reset): Transform to ...
7221         (ipa_fn_summary::~ipa_fn_summary): ... this.
7222         (ipa_fn_summary_t::remove): Rename to ...
7223         (ipa_fn_summary_t::remove_callees): ... this.
7224         (ipa_fn_summary_t::duplicate): Use placement new
7225         instead of memory copy.
7226         (ipa_call_summary_t::duplicate): Likewise.
7227         (ipa_call_summary_t::remove): Remove.
7228         (dump_ipa_call_summary): Change get_create to get.
7229         (ipa_dump_fn_summary): Dump only when summary exists.
7230         (analyze_function_body): Use symbol_summary::get instead
7231         of get_create.
7232         (compute_fn_summary): Likewise.
7233         (estimate_edge_devirt_benefit): Likewise.
7234         (estimate_edge_size_and_time): Likewise.
7235         (inline_update_callee_summaries): Likewise.
7236         (remap_edge_change_prob): Likewise.
7237         (remap_edge_summaries): Likewise.
7238         (ipa_merge_fn_summary_after_inlining): Likewise.
7239         (write_ipa_call_summary): Likewise.
7240         (ipa_fn_summary_write): Likewise.
7241         (ipa_free_fn_summary): Likewise.
7242         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
7243         (struct ipa_call_summary): Likewise.
7244         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
7245         of get_create.
7246         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
7247         (estimate_size_after_inlining): Likewise.
7248         (estimate_growth): Likewise.
7249         (growth_likely_positive): Likewise.
7250         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
7251         (inline_call): Likewise.
7252         * ipa-inline.c (caller_growth_limits): Likewise.
7253         (can_inline_edge_p): Likewise.
7254         (can_inline_edge_by_limits_p): Likewise.
7255         (compute_uninlined_call_time): Likewise.
7256         (compute_inlined_call_time): Likewise.
7257         (want_inline_small_function_p): Likewise.
7258         (edge_badness): Likewise.
7259         (update_caller_keys): Likewise.
7260         (update_callee_keys): Likewise.
7261         (inline_small_functions): Likewise.
7262         (inline_to_all_callers_1): Likewise.
7263         (dump_overall_stats): Likewise.
7264         (early_inline_small_functions): Likewise.
7265         (early_inliner): Likewise.
7266         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
7267         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7268         * ipa-pure-const.c (malloc_candidate_p): Likewise.
7269         * ipa-split.c (execute_split_functions): Likewise.
7270         * symbol-summary.h: Likewise.
7271         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
7273 2018-06-19  Richard Biener  <rguenther@suse.de>
7275         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
7276         (vectorize_loops): ... here.  Fix dbgcnt handling.
7277         (try_vectorize_loop): Wrap try_vectorize_loop_1.
7279 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
7281         PR target/86197
7282         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
7283         ieee128 argument takes up only one (vector) register, not two (floating
7284         point) registers.
7286 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
7288         * gimplify.c (gimplify_init_constructor): Really never clear for an
7289         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
7291 2018-06-19  Richard Biener  <rguenther@suse.de>
7293         PR tree-optimization/86179
7294         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
7295         after failed recognition.
7297 2018-06-18  Martin Sebor  <msebor@redhat.com>
7299         PR middle-end/85602
7300         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
7301         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
7302         Handle integer subtraction.
7303         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
7304         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
7306 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
7308         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
7309         param from rtx to rtx_insn *.
7310         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
7311         param.
7312         (frv_ifcvt_modify_insn): Likwise.
7313         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
7314         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
7315         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
7316         as_a <rtx_insn *> cast to local "unprotected_region" once
7317         it's been established that it's not NULL or pc_rtx.
7318         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
7319         param "sethi" from rtx to rtx_insn *.
7320         (nds32_group_float_insns): Likewise for param "insn".
7321         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
7322         param.
7323         (vax_output_int_subtract): Likewise.
7324         * config/vax/vax.c (vax_output_int_add): Likewise for param
7325         "insn".
7326         (vax_output_int_subtract): Likewise.
7327         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
7328         (emit_pattern_after): Likewise for param "after".
7329         (emit_insn_after): Likewise.
7330         (emit_jump_insn_after): Likewise.
7331         (emit_call_insn_after): Likewise.
7332         (emit_debug_insn_after): Likewise.
7333         (emit_pattern_before): Likewise for param "before".
7334         (emit_insn_before): Likewise.
7335         (emit_jump_insn_before): Likewise.
7336         * final.c (get_insn_template): Likewise for param "insn", removing
7337         a cast.
7338         * output.h (get_insn_template): Likewise for 2nd param.
7339         * rtl.h (emit_insn_before): Likewise.
7340         (emit_jump_insn_before): Likewise.
7341         (emit_debug_insn_before_noloc): Likewise.
7342         (emit_insn_after): Likewise.
7343         (emit_jump_insn_after): Likewise.
7344         (emit_call_insn_after): Likewise.
7345         (emit_debug_insn_after): Likewise.
7346         (set_insn_deleted): Likewise for param.
7348 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
7350         PR target/85358
7351         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
7352         floating point modes, so that IFmode is numerically greater than
7353         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
7354         to declare the ordering.  This prevents IFmode from being
7355         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
7356         machine.  Include rs6000-modes.h to share the fractional values
7357         between genmodes* and the rest of the compiler.
7358         (IFmode): Likewise.
7359         (KFmode): Likewise.
7360         (TFmode): Likewise.
7361         * config/rs6000/rs6000-modes.h: New file.
7362         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
7363         meaning of rs6000_long_double_size so that 126..128 selects an
7364         appropriate 128-bit floating point type.
7365         (rs6000_option_override_internal): Likewise.
7366         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
7367         (TARGET_LONG_DOUBLE_128): Change the meaning of
7368         rs6000_long_double_size so that 126..128 selects an appropriate
7369         128-bit floating point type.
7370         (LONG_DOUBLE_TYPE_SIZE): Update comment.
7371         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
7372         source and destination to match the standard usage.
7373         (truncifkf2): Likewise.
7374         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
7375         ISA 2.07 to use an explicit clobber, instead of passing in a
7376         temporary.
7377         (copysign<mode>3_soft): Likewise.
7379 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
7381         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
7382         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
7383         (vect_slp_analyze_instance_dependence): Likewise.
7384         (vect_enhance_data_refs_alignment): Likewise.
7385         (vect_analyze_data_refs_alignment): Likewise.
7386         (vect_slp_analyze_and_verify_instance_alignment
7387         (vect_analyze_data_ref_accesses): Likewise.
7388         (vect_prune_runtime_alias_test_list): Likewise.
7389         (vect_analyze_data_refs): Likewise.
7390         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
7391         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
7392         (vect_analyze_scalar_cycles_1): Likewise.
7393         (vect_get_loop_niters): Likewise.
7394         (vect_analyze_loop_form_1): Likewise.
7395         (vect_update_vf_for_slp): Likewise.
7396         (vect_analyze_loop_operations): Likewise.
7397         (vect_analyze_loop): Likewise.
7398         (vectorizable_induction): Likewise.
7399         (vect_transform_loop): Likewise.
7400         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
7401         * tree-vect-slp.c (vect_analyze_slp): Likewise.
7402         (vect_make_slp_decision): Likewise.
7403         (vect_detect_hybrid_slp): Likewise.
7404         (vect_slp_analyze_operations): Likewise.
7405         (vect_slp_bb): Likewise.
7406         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
7407         (vectorizable_bswap): Likewise.
7408         (vectorizable_call): Likewise.
7409         (vectorizable_simd_clone_call): Likewise.
7410         (vectorizable_conversion): Likewise.
7411         (vectorizable_assignment): Likewise.
7412         (vectorizable_shift): Likewise.
7413         (vectorizable_operation): Likewise.
7414         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
7416 2018-06-18  Martin Sebor  <msebor@redhat.com>
7418         PR tree-optimization/81384
7419         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
7420         * builtins.c (expand_builtin_strnlen): New function.
7421         (expand_builtin): Call it.
7422         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
7423         * builtins.def (BUILT_IN_STRNLEN): New.
7424         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
7425         Warn for bounds in excess of maximum object size.
7426         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
7427         single-value ranges.  Handle strnlen.
7428         (handle_builtin_strlen): Handle strnlen.
7429         (strlen_check_and_optimize_stmt): Same.
7430         * doc/extend.texi (Other Builtins): Document strnlen.
7432 2018-06-18  Maya Rashish  <coypu@sdf.org>
7434         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
7435         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
7436         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
7438         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
7439         here to ...
7440         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
7442 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
7444         * tree.c (escaped_string::escape): Replace cast to char * by
7445         const_cast<char *> (unescaped).
7447 2018-06-18  Nick Clifton  <nickc@redhat.com>
7449         PR 84195
7450         * tree.c (escaped_string): New class.  Converts an unescaped
7451         string into its escaped equivalent.
7452         (warn_deprecated_use): Use the new class to convert the
7453         deprecation message, if present.
7454         (test_escaped_strings): New self test.
7455         (test_c_tests): Add test_escaped_strings.
7456         * doc/extend.texi (deprecated): Add a note that the
7457         deprecation message is affected by the -fmessage-length
7458         option, and that control characters will be escaped.
7459         (#pragma GCC error): Document this pragma.
7460         (#pragma GCC warning): Likewise.
7461         * doc/invoke.texi (-fmessage-length): Document this option's
7462         effect on the #warning and #error preprocessor directives and
7463         the deprecated attribute.
7465 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
7467         * tree.c (decl_value_expr_lookup): Revert latest change.
7468         (decl_value_expr_insert): Likewise.
7470 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
7472         * gimplify.c (nonlocal_vlas): Delete.
7473         (nonlocal_vla_vars): Likewise.
7474         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
7475         referenced VLAs.
7476         (gimplify_body): Do not create and destroy nonlocal_vlas.
7477         * tree-nested.c: Include diagnostic.h.
7478         (use_pointer_in_frame): Tweak.
7479         (lookup_field_for_decl): Add assertion and declare the transformation.
7480         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
7481         internal error when the reference is in a wrong context.  Do not
7482         create a debug decl by default.
7483         (note_nonlocal_block_vlas): Delete.
7484         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
7485         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
7486         create a debug decl by default.
7487         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
7488         call is in a wrong context.
7489         (fixup_vla_decls): New function.
7490         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
7491         debug variables were created.
7492         * tree.c (decl_value_expr_lookup): Add checking assertion.
7493         (decl_value_expr_insert): Likewise.
7495 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
7497         PR middle-end/82479
7498         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
7499         * tree-scalar-evolution.c (interpret_expr): Likewise.
7500         (expression_expensive_p): Likewise.
7501         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
7502         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
7503         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
7504         (ssa_defined_by_minus_one_stmt_p): New.
7506 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
7508         PR middle-end/64946
7509         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
7510         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
7511         * dojump.c (do_jump): Likewise.
7512         * expr.c (expand_expr_real_2): Check operand type's sign.
7513         * fold-const.c (const_unop): Handle ABSU_EXPR.
7514         (fold_abs_const): Likewise.
7515         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
7516         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
7517         (strip_sign_op_1): Likesise.
7518         * match.pd: Add new pattern to generate ABSU_EXPR.
7519         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
7520         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
7521         * tree-eh.c (operation_could_trap_helper_p): Likewise.
7522         * tree-inline.c (estimate_operator_cost): Likewise.
7523         * tree-pretty-print.c (dump_generic_node): Likewise.
7524         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
7525         * tree.def (ABSU_EXPR): New.
7527 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
7529         PR middle-end/86095
7530         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
7531         documented as preserved for backward compatibility only.
7532         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
7534         PR rtl-optimization/86108
7535         * bb-reorder.c (create_forwarder_block): Renamed to ...
7536         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
7537         jump from new landing pad to the second part.
7538         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
7539         Adjust callers.
7541 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
7543         PR middle-end/85878
7544         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
7545         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
7546         Only call store_expr for halves if the mode is the same.
7548         PR middle-end/86123
7549         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
7550         Fix up comment formatting.
7552 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7554         * typed-splay-tree.h (typed_splay_tree::remove): New function.
7555         (typed_splay_tree::closure,
7556         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
7557         (typed_splay_tree::typed_splay_tree,
7558         typed_splay_tree::operator =): Declared private.
7559         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
7560         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
7561         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
7562         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
7563         typed_splay_tree::splay_tree_splay,
7564         typed_splay_tree::splay_tree_foreach_helper,
7565         typed_splay_tree::splay_tree_insert,
7566         typed_splay_tree::splay_tree_remove,
7567         typed_splay_tree::splay_tree_lookup,
7568         typed_splay_tree::splay_tree_predecessor,
7569         typed_splay_tree::splay_tree_successor,
7570         typed_splay_tree::splay_tree_min,
7571         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
7572         (typed_splay_tree::root, typed_splay_tree::comp,
7573         typed_splay_tree::delete_key,
7574         typed_splay_tree::delete_value): New data members.
7575         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
7576         typed_splay_tree::remove.
7578 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
7580         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
7581         -mginv and -mno-ginv to the assembler.
7582         * config/mips/mips.opt (-mcrc): New option.
7583         (-mginv): Likewise.
7584         * doc/invoke.text (-mcrc): Document.
7585         (-mginv): Likewise.
7587 2018-06-15  Nick Clifton  <nickc@redhat.com>
7589         PR 84195
7590         * tree.c (escaped_string): New class.  Converts an unescaped
7591         string into its escaped equivalent.
7592         (warn_deprecated_use): Use the new class to convert the
7593         deprecation message, if present.
7594         (test_escaped_strings): New self test.
7595         (test_c_tests): Add test_escaped_strings.
7596         * doc/extend.texi (deprecated): Add a note that the
7597         deprecation message is affected by the -fmessage-length
7598         option, and that control characters will be escaped.
7599         (#pragma GCC error): Document this pragma.
7600         (#pragma GCC warning): Likewise.
7601         * doc/invoke.texi (-fmessage-length): Document this option's
7602         effect on the #warning and #error preprocessor directives and
7603         the deprecated attribute.
7605 2018-06-15  Richard Biener  <rguenther@suse.de>
7607         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
7608         here, also noting vector size used.
7609         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
7610         size used in MSG_OPTIMIZED_LOCATIONS dump.
7611         (pass_slp_vectorize::execute): Adjust.
7613 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
7615         PR target/85968
7616         * config/arc/arc.c (arc_return_address_register): Fix
7617         if-condition.
7619 2018-06-15  Richard Biener  <rguenther@suse.de>
7621         PR middle-end/86159
7622         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
7623         leave useless conversion stripping to force_gimple_operand_gsi.
7624         (gimplify_build2): Likewise.
7625         (gimplify_build1): Likewise.
7627 2018-06-15  Richard Biener  <rguenther@suse.de>
7629         PR middle-end/86076
7630         * tree-cfg.c (move_stmt_op): unshare invariant addresses
7631         before adjusting their block.
7633 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
7635         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
7636         multilibs for *-*-rtems*.
7637         * config/riscv/t-rtems: New file.
7639 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
7641         PR middle-end/86122
7642         * match.pd ((A +- CST1) +- CST2): Punt if last resort
7643         unsigned_type_for returns NULL.
7645         PR target/85945
7646         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
7647         subregs of multi-word pseudos unless the float mode has word size.
7649 2018-06-14  Richard Biener  <rguenther@suse.de>
7651         PR middle-end/86139
7652         * tree-vect-generic.c (build_word_mode_vector_type): Remove
7653         duplicate and harmful type_hash_canon.
7654         * tree.c (type_hash_canon): Assert we didn't find ourselves.
7656 2018-06-14  Richard Biener  <rguenther@suse.de>
7658         PR ipa/86124
7659         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
7660         NULL cgraph_node.
7662 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
7664         * config/rtems.h (STDINT_LONG32): Define.
7666 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
7667             Prachi Godbole  <prachi.godbole@imgtec.com>
7669         * config/mips/mips-cpus.def: Define P6600.
7670         * config/mips/mips-tables.opt: Regenerate.
7671         * config/mips/mips.c (mips_ucbranch_type): New enum.
7672         (mips_rtx_cost_data): Add support for P6600.
7673         (mips_issue_rate): Likewise.
7674         (mips_multipass_dfa_lookahead): Likewise.
7675         (mips_avoid_hazard): Likewise.
7676         (mips_reorg_process_insns): Likewise.
7677         (mips_classify_branch_p6600): New function.
7678         * config/mips/mips.h (TUNE_P6600): New define.
7679         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
7680         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
7681         * config/mips/mips.md: Include p6600.md.
7682         (processor): Add p6600.
7683         * config/mips/p6600.md: New file.
7684         * doc/invoke.texi: Add p6600 to supported architectures.
7686 2018-06-13  Martin Sebor  <msebor@redhat.com>
7688         PR tree-optimization/86114
7689         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
7690         of integer types.
7691         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
7693 2018-06-13  Richard Biener  <rguenther@suse.de>
7695         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
7696         Properly set vector type of the intermediate stmt.
7697         * tree-vect-stmts.c (vectorizable_operation): The destination
7698         var always has vectype_out type.
7700 2018-06-13  Jeff Law  <law@redhat.com>
7702         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
7703         integer 0 for argument to print_rtl_with_bb.
7704         (rl78_reorg): Likewise.
7706 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
7708         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
7709         from rtx to rtx_insn *.
7710         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
7711         "label".
7712         (add_sched_insns_for_speculation): Likewise for local "target",
7713         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
7714         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
7715         from rtx_insn ** to rtx_code_label **.
7716         (reorg_emit_nops): Likewise.
7717         (c6x_reorg): Likewise for local "call_labels".
7718         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
7719         rtx to rtx_insn *.
7720         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
7721         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
7722         the loops over LABEL_REFS.
7723         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
7724         braf_label.
7725         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
7726         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
7727         (split_branches): Strengthen local "olabel" from rtx to
7728         rtx_insn *, adding a safe_as_a cast.
7729         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
7730         to "rtx_insn *".
7731         (add_insn_after): Likewise for first two params.
7732         (add_insn_before): Likewise.
7733         (remove_insn): Likewise for param.
7734         (emit_pattern_before_noloc): Likewise for second and third params.
7735         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
7736         (emit_call_insn_before_noloc): Likewise.
7737         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
7738         to "rtx_insn *".
7739         (emit_barrier_before): Likewise.
7740         (emit_label_before): Strengthen "label" param from "rtx" to
7741         "rtx_code_label *".  Strengthen "before" param from "rtx" to
7742         "rtx_insn *".
7743         (emit_insn_after_1): Strengthen "after" param from "rtx" to
7744         "rtx_insn *".
7745         (emit_pattern_after_noloc): Likewise.
7746         (emit_insn_after_noloc): Likewise.
7747         (emit_jump_insn_after_noloc): Likewise.
7748         (emit_call_insn_after_noloc): Likewise.
7749         (emit_debug_insn_after_noloc): Likewise.
7750         (emit_barrier_after): Likewise.
7751         (emit_label_after): Likewise for both params.
7752         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
7753         "loc" param from "int" to "location_t".
7754         (emit_insn_after_setloc): Likewise.
7755         (emit_jump_insn_after_setloc): Likewise.
7756         (emit_call_insn_after_setloc): Likewise.
7757         (emit_debug_insn_after_setloc): Likewise.
7758         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
7759         "loc" param from "int" to "location_t".
7760         (emit_pattern_before): Convert NULL_RTX to NULL.
7761         (emit_insn_before_setloc): Convert "loc" param from "int" to
7762         "location_t".
7763         (emit_jump_insn_before_setloc): Likewise.
7764         (emit_call_insn_before_setloc): Likewise.
7765         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
7766         rtx_insn *.  Convert "loc" param from "int" to "location_t".
7767         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
7768         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
7769         Convert 3rd param from "int" to "location_t".
7770         (emit_barrier_before, emit_barrier_after, next_real_insn):
7771         Strengthen param from rtx to rtx_insn *.
7772         (emit_label_before): Strengthen 1st param from "rtx" to
7773         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
7774         "rtx_insn *".
7775         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
7776         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
7777         Strengthen 2nd param from "rtx" to "rtx_insn *".
7778         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
7779         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
7780         Likewise. Convert 3rd param from "int" to "location_t".
7781         (emit_label_after): Strengthen 1st param from "rtx" to
7782         "rtx_code_label *".
7783         (next_real_insn, remove_insn): Strengthen param from "rtx" to
7784         "rtx_insn *".
7785         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
7786         from "rtx" to "rtx_insn *".
7788 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
7790         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
7791         bodies streamed in with -Q.
7792         * dumpfile.c (dump_files): Add lto-stream-out dump file.
7793         * dumpfile.h (tree_dump_index): Add lto_stream_out.
7794         * gimple-streamer-out.c: Include gimple-pretty-print.h
7795         (output_bb): Dump stmts streamed.
7796         * lto-section-out.c: Include print-tree.h
7797         (lto_begin_section): Dump sections created.
7798         (lto_output_decl_index): Dump decl encoded.
7799         * lto-streamer-out.c: Include print-tree.h
7800         (create_output_block): Dump output block created.
7801         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
7802         (output_function): Dump function output.
7803         (output_constructor): Dump constructor streamed.
7804         (write_global_stream): Output indexes encoded.
7805         (produce_asm_for_decls): Dump streams encoded.
7806         * lto-streamer.c (streamer_dump_file): New global var.
7807         * lto-streamer.h (streamer_dump_file): Declare.
7808         * passes.c (ipa_write_summaries): Initialize streamer dump.
7809         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
7810         in.
7812 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
7814         PR target/86048
7815         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
7816         offsets for register save directives.  Emit a second batch of save
7817         directives, if need be, when the function accesses prior frames.
7819 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7821         * config/arc/fpu.md (fmasf4): Force operand to register.
7822         (fnmasf4): Likewise.
7824 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7826         * config/arc/arc-protos.h (arc_pad_return): Remove.
7827         * config/arc/arc.c (machine_function): Remove force_short_suffix
7828         and size_reason.
7829         (arc_print_operand): Adjust printing of '&'.
7830         (arc_verify_short): Remove conditional printing of short suffix.
7831         (arc_final_prescan_insn): Remove reference to size_reason.
7832         (pad_return): New function.
7833         (arc_reorg): Call pad_return.
7834         (arc_pad_return): Remove.
7835         (arc_init_machine_status): Remove reference to force_short_suffix.
7836         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
7837         (attr length): When attribute iscompact is true force to 2
7838         regardless; in the case of maybe check if we want to force the
7839         instruction to have 4 bytes length.
7840         (nopv): Change it to generate 4 byte long nop as well.
7841         (blockage): New pattern.
7842         (simple_return): Remove call to arc_pad_return.
7843         (p_return_i): Likewise.
7845 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7847         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
7849 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7851         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
7852         ARC cores.
7854 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7856         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
7857         for ARC700 and ARCv2.
7859 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
7861         PR target/86076
7862         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
7863         operands[2] instead of operands[1].
7866 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
7868         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
7869         case, check whether the outer register overlaps an unallocatable
7870         register, not just whether it fits the required class.
7872 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
7874         * poly-int.h (can_div_trunc_p): Add new overload in which all values
7875         are poly_ints.
7876         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
7877         (memrefs_conflict_p): Likewise.
7878         (init_alias_analysis): Likewise.
7879         * cfgexpand.c (expand_debug_expr): Likewise.
7880         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
7881         * cse.c (fold_rtx): Likewise.
7882         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
7883         * expr.c (emit_block_move_hints): Likewise.
7884         (clear_storage_hints, push_block, emit_push_insn): Likewise.
7885         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
7886         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
7887         (emit_group_store): Likewise.
7888         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
7889         to read the PRE/POST_MODIFY increment.
7890         * calls.c (store_one_arg): Use strip_offset.
7891         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
7892         poly_int_rtx_p.
7893         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
7894         by a VEC_SELECT.
7895         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
7896         (simplify_binary_operation_1): Extend CONST_INT handling to
7897         poly_int_rtx_p.
7898         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
7899         than a HOST_WIDE_INT.
7900         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
7901         poly_int64.
7902         (adjust_mems, add_stores): Update accodingly.
7903         (vt_canonicalize_addr): Track polynomial offsets.
7904         (emit_note_insn_var_location): Likewise.
7905         (vt_add_function_parameter): Likewise.
7906         (vt_initialize): Likewise.
7908 2018-06-12  Jeff Law  <law@redhat.com>
7910         * config.gcc (alpha*-*-freebsd*): Remove.
7911         * config/alpha/freebsd.h: Remove.
7913 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
7915         PR other/69968
7916         * spellcheck-tree.c (levenshtein_distance): Rename to...
7917         (get_edit_distance): ...this, and update for underlying renaming.
7918         * spellcheck-tree.h (levenshtein_distance): Rename to...
7919         (get_edit_distance): ...this.
7920         * spellcheck.c (levenshtein_distance): Rename to...
7921         (get_edit_distance): ...this.  Convert from Levenshtein distance
7922         to Damerau-Levenshtein distance by supporting transpositions of
7923         adjacent characters.  Rename "v1" to "v_next" and "v0" to
7924         "v_one_ago".
7925         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
7926         (selftest::test_edit_distance_unit_test_oneway): ...this, and
7927         update for underlying renaming.
7928         (selftest::levenshtein_distance_unit_test): Rename to...
7929         (selftest::test_get_edit_distance_unit): ...this, and update for
7930         underlying renaming.
7931         (selftest::test_find_closest_string): Add example from PR 69968
7932         where transposition helps
7933         (selftest::test_metric_conditions): Update for renaming.
7934         (selftest::test_metric_conditions): Likewise.
7935         (selftest::spellcheck_c_tests): Likewise.
7936         * spellcheck.h (levenshtein_distance): Rename both overloads to...
7937         (get_edit_distance): ...this.
7938         (best_match::consider): Update for renaming.
7940 2018-06-12  Martin Sebor  <msebor@redhat.com>
7942         PR tree-optimization/85259
7943         * builtins.c (compute_objsize): Handle constant offsets.
7944         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
7945         true iff a warning has been issued.
7946         * gimple.h (gimple_nonartificial_location): New function.
7947         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
7948         gimple_nonartificial_location and handle -Wno-system-headers.
7949         (handle_builtin_stxncpy): Same.
7951 2018-06-12  Martin Sebor  <msebor@redhat.com>
7953         PR c/85931
7954         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
7956 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
7958         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
7959         BUILTIN_VEC_XST entries for pointer to double and long long.
7961 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
7963         PR target/85990
7964         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
7965         Update comments.
7966         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
7967         Likewise.
7969 2018-06-12  Martin Liska  <mliska@suse.cz>
7971         * doc/options.texi: Document IntegerRange.
7973 2018-06-12  Martin Liska  <mliska@suse.cz>
7975         * config/i386/i386.opt: Make MPX-related options as Deprecated.
7976         * opt-functions.awk: Handle Deprecated flag.
7977         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
7978         and report error.
7979         (read_cmdline_option): Report warning for a deprecated option.
7980         * opts.h (struct cl_option): Add new field cl_deprecated.
7981         (CL_ERR_DEPRECATED): New.
7983 2018-06-12  Martin Liska  <mliska@suse.cz>
7985         * doc/options.texi: Document Deprecated option flag.
7987 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7989         * config/arc/arc-arch.h (arc_extras): New enum.
7990         (arc_cpu_t):Add field extra.
7991         (arc_cpu_types): Consider the extras.
7992         * config/arc/arc-cpus.def: Add extras info.
7993         * config/arc/arc-opts.h (processor_type): Consider extra field.
7994         * config/arc/arc.c (arc_override_options): Handle extra field.
7996 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7998         * config/arc/arc-arch.h: Update ARC_OPTX macro.
7999         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
8000         field.
8001         * config/arc/arc.c (arc_init): Update pic warning.
8002         (irq_range): Update irq range parsing warnings.
8003         (arc_override_options): Update various warning messages.
8004         (arc_handle_aux_attribute): Likewise.
8006 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
8008         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
8010 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8012         * doc/sourcebuild.texi: Document usage of line number 0 in verify
8013         compiler messages directives.
8015 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
8017         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
8018         * config/mips/mips-tables.opt: Regenerate.
8019         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
8020         mips64r6.
8021         * doc/invoke.texi: Document -march=i6500.
8023 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
8025         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
8026         (i6400_gpmul): Add cpu_unit.
8027         (i6400_gpdiv): Likewise.
8028         (i6400_msa_add_d): Update reservations.
8029         (i6400_msa_int_add) Likewise.
8030         (i6400_msa_short_logic3) Likewise.
8031         (i6400_msa_short_logic2) Likewise.
8032         (i6400_msa_short_logic) Likewise.
8033         (i6400_msa_move) Likewise.
8034         (i6400_msa_cmp) Likewise.
8035         (i6400_msa_short_float2) Likewise.
8036         (i6400_msa_div_d) Likewise.
8037         (i6400_msa_long_logic1) Likewise.
8038         (i6400_msa_long_logic2) Likewise.
8039         (i6400_msa_mult) Likewise.
8040         (i6400_msa_long_float2) Likewise.
8041         (i6400_msa_long_float4) Likewise.
8042         (i6400_msa_long_float5) Likewise.
8043         (i6400_msa_long_float8) Likewise.
8044         (i6400_fpu_fadd): Include frint type.
8045         (i6400_fpu_store): New define_insn_reservation.
8046         (i6400_fpu_load): Likewise.
8047         (i6400_fpu_move): Likewise.
8048         (i6400_fpu_fcmp): Likewise.
8049         (i6400_fpu_fmadd): Likewise.
8050         (i6400_int_mult): Include imul3nc type and update reservation.
8051         (i6400_int_div): Include idiv3 type and update reservation.
8052         (i6400_int_load): Update to check type not move_type.
8053         (i6400_int_store): Likewise.
8054         (i6400_int_prefetch): Set zero latency.
8056 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
8058         * gcc.c: Document new %@{...} sequence.
8059         (LINK_COMMAND_SPEC): Use it for the -L switches.
8060         (cpp_unique_options): Use it for the -I switches.
8061         (at_file_argbuf): New global variable.
8062         (in_at_file): Likewise.
8063         (alloc_args): Create at_file_argbuf.
8064         (clear_args): Truncate at_file_argbuf.
8065         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
8066         (open_at_file): New function.
8067         (close_at_file): Likewise.
8068         (create_at_file): Delete.
8069         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
8070         <'o'>: Likewise.
8071         <'@'>: New case.
8072         (validate_switches_from_spec): Deal with %@{...} sequence.
8073         (validate_switches): Likewise.
8074         (driver::finalize): Call clear_args.
8076 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
8078         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
8080 2018-06-11  Martin Sebor  <msebor@redhat.com>
8082         * doc/invoke.texi (-Wall): List -Wc++17-compat.
8083         (Wno-class-memaccess): Add @opindex.
8084         (Wno-templates, Wno-multiple-inheritance): Same.
8085         (Wno-virtual-inheritance, Wno-namespaces): Same.
8086         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
8087         (Wno-format-overflow, Wno-format-truncation): Same.
8088         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
8089         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
8090         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
8091         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
8092         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
8093         (Wno-misspelled-isr): Same.
8095 2018-06-11  Martin Sebor  <msebor@redhat.com>
8097         * PR tree-optimization/86083
8098         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
8100 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
8102         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
8104 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
8106         PR target/85755
8107         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
8108         on the correct operand.
8109         (*movdi_internal64): Ditto.
8111 2018-06-11  Martin Liska  <mliska@suse.cz>
8113         PR tree-optimization/86089
8114         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
8116 2018-06-11  Julia Koval  <julia.koval@intel.com>
8118         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
8119         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
8120         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
8122 2018-06-11  Olivier Hainque  <hainque@adacore.com>
8124         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
8125         for Ada with strict dwarf2.
8127 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
8129         PR target/85755
8130         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
8131         addresses.
8133 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
8135         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
8137 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
8139         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
8140         TARGET_ELF.
8142 2018-06-08  Martin Liska  <mliska@suse.cz>
8144         * tree-cfg.h (debug_function): Fix argument type to match
8145         implementation.
8147 2018-06-08  Martin Liska  <mliska@suse.cz>
8149         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
8150         Remove usage of MPX-related (and removed) fields.
8151         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
8153 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
8155         * cfg.c (debug): Use TDF_NONE rather than 0.
8156         * cfghooks.c (debug): Likewise.
8157         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
8158         (struct dump_option_value_info): Convert to...
8159         (struct kv_pair): ...this template type.
8160         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
8161         rather than 0.
8162         (optinfo_verbosity_options): Likewise.
8163         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
8164         OPTGROUP_NONE.
8165         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
8166         than int for "optgroup_flags" param.
8167         (dump_generic_expr_loc): Use dump_flags_t rather than int for
8168         "dump_kind" param.
8169         (dump_dec): Likewise.
8170         (dump_finish): Use TDF_NONE rather than 0.
8171         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
8172         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
8173         than 0.  Update for change to option_ptr.
8174         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
8175         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
8176         0.  Update for changes to optinfo_verbosity_options and
8177         optgroup_options.
8178         (opt_info_switch_p): Convert optgroup_flags from int to
8179         optgroup_flags_t.
8180         (dump_basic_block): Use dump_flags_t rather than int
8181         for "dump_kind" param.
8182         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
8183         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
8184         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
8185         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
8186         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
8187         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
8188         TDF_NONE): Convert from macros to...
8189         (enum dump_flag): ...this new enum.
8190         (dump_flags_t): Update to use enum.
8191         (operator|, operator&, operator~, operator|=, operator&=):
8192         Implement for dump_flags_t.
8193         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
8194         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
8195         Convert from macros to...
8196         (enum optgroup_flag): ...this new enum.
8197         (optgroup_flags_t): New typedef.
8198         (operator|, operator|=): Implement for optgroup_flags_t.
8199         (struct dump_file_info): Convert field "alt_flags" to
8200         dump_flags_t.  Convert field "optgroup_flags" to
8201         optgroup_flags_t.
8202         (dump_basic_block): Use dump_flags_t rather than int for param.
8203         (dump_generic_expr_loc): Likewise.
8204         (dump_dec): Likewise.
8205         (dump_register): Convert param "optgroup_flags" to
8206         optgroup_flags_t.
8207         (opt_info_enable_passes): Likewise.
8208         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
8209         than 0.
8210         * gimple-pretty-print.c (debug): Likewise.
8211         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
8212         (merged_store_group::apply_stores): Likewise.
8213         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
8214         * gimple.c (verify_gimple_pp): Likewise.
8215         * graphite-poly.c (print_pbb_body): Likewise.
8216         * passes.c (pass_manager::register_one_dump_file): Convert
8217         local "optgroup_flags" to optgroup_flags_t.
8218         * print-tree.c (print_node): Use TDF_NONE rather than 0.
8219         (debug): Likewise.
8220         (debug_body): Likewise.
8221         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
8222         to optgroup_flags_t.
8223         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
8224         than 0.
8225         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
8226         (convert_mult_to_fma): Likewise.
8227         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
8228         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
8229         * tree-vect-data-refs.c (dump_lower_bound): Convert param
8230         "dump_kind" to dump_flags_t.
8232 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
8234         * config/rs6000/rs6000.c (min, max): Delete.
8236 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
8238         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
8239         -mabi=spe and -mabi=no-spe.
8241 2018-06-08  Martin Liska  <mliska@suse.cz>
8243         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
8244         where we expect an existing summary.
8246 2018-06-08  Martin Liska  <mliska@suse.cz>
8248         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
8249         * ipa-inline.h (estimate_edge_growth): Likewise.
8251 2018-06-08  Martin Liska  <mliska@suse.cz>
8253         * cgraph.c (function_version_hasher::hash): Use
8254         cgraph_node::get_uid ().
8255         (function_version_hasher::equal):
8256         * cgraph.h (cgraph_node::get_uid): New method.
8257         * ipa-inline.c (update_caller_keys): Use
8258         cgraph_node::get_uid ().
8259         (update_callee_keys): Likewise.
8260         * ipa-utils.c (searchc): Likewise.
8261         (ipa_reduced_postorder): Likewise.
8262         * lto-cgraph.c (input_node): Likewise.
8263         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
8264         * symbol-summary.h (symtab_insertion): Likewise.
8265         (symtab_removal): Likewise.
8266         (symtab_duplication): Likewise.
8267         * tree-pretty-print.c (dump_function_header): Likewise.
8268         * tree-sra.c (convert_callers_for_node): Likewise.
8270 2018-06-08  Martin Liska  <mliska@suse.cz>
8272         * cgraph.c (symbol_table::create_edge): Always assign a new
8273         unique number.
8274         (symbol_table::free_edge): Do not recycle numbers.
8275         * cgraph.h (cgraph_edge::get): New method.
8276         * symbol-summary.h (symtab_removal): Use it.
8277         (symtab_duplication): Likewise.
8278         (call_summary::hashable_uid): Remove.
8280 2018-06-08  Martin Liska  <mliska@suse.cz>
8282         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
8283         (initialize_growth_caches): Remove.
8284         (free_growth_caches): Likewise.
8285         (do_estimate_edge_time): Use edge_growth_cache.
8286         (do_estimate_edge_size): Likewise.
8287         (do_estimate_edge_hints): Likewise.
8288         * ipa-inline.c (reset_edge_caches): Likewise.
8289         (recursive_inlining): Likewise.
8290         (inline_small_functions): Likewise.
8291         * ipa-inline.h (initialize_growth_caches): Remove.
8292         (estimate_edge_size): Likewise.
8293         (estimate_edge_time): Likewise.
8294         (estimate_edge_hints): Likewise.
8295         (reset_edge_growth_cache): Likewise.
8296         * symbol-summary.h (call_summary::remove): New method.
8298 2018-06-08  Martin Liska  <mliska@suse.cz>
8300         * ipa-cp.c (class edge_clone_summary): New summary.
8301         (grow_edge_clone_vectors): Remove.
8302         (ipcp_edge_duplication_hook): Remove.
8303         (class edge_clone_summary_t): New call_summary class.
8304         (ipcp_edge_removal_hook): Remove.
8305         (edge_clone_summary_t::duplicate): New function.
8306         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
8307         (create_specialized_node): Likewise.
8308         (ipcp_driver): Initialize edge_clone_summaries and do not
8309         register hooks.
8311 2018-06-08  Martin Liska  <mliska@suse.cz>
8313         * symbol-summary.h (get): New function.
8314         (call_summary::m_initialize_when_cloning): New class member.
8316 2018-06-08  Martin Liska  <mliska@suse.cz>
8318         * cgraph.c (cgraph_node::remove): Do not recycle uid.
8319         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
8320         (symbol_table::allocate_cgraph_symbol): Do not set uid.
8321         * passes.c (uid_hash_t): Record removed_nodes by their uids.
8322         (remove_cgraph_node_from_order): Use the removed_nodes set.
8323         (do_per_function_toporder): Likwise.
8324         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
8325         instead of summary_uid.
8326         (symtab_removal): Likewise.
8327         (symtab_duplication): Likewise.
8329 2018-06-08  Martin Liska  <mliska@suse.cz>
8331         * ipa-cp.c (ipcp_store_bits_results): Use
8332         ipcp_transformation_sum.
8333         (ipcp_store_vr_results): Likewise.
8334         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
8335         to ...
8336         (ipcp_transformation_initialize): ... this.
8337         (ipa_set_node_agg_value_chain):
8338         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
8339         (write_ipcp_transformation_info): Likewise.
8340         (read_ipcp_transformation_info): Likewise.
8341         (ipcp_update_bits): Likewise.
8342         (ipcp_update_vr): Likewise.
8343         (ipcp_transform_function): Likewise.
8344         * ipa-prop.h: Rename ipcp_transformation_summary to
8345         ipcp_transformation.
8346         (class ipcp_transformation_t): New function summary.
8347         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
8348         (ipa_get_agg_replacements_for_node): Likewise.
8350 2018-06-08  Martin Liska  <mliska@suse.cz>
8352         * ipa-pure-const.c (struct funct_state_d): Do it class instead
8353         of struct.
8354         (class funct_state_summary_t): New function_summary class.
8355         (has_function_state): Remove.
8356         (get_function_state): Likewise.
8357         (set_function_state): Likewise.
8358         (add_new_function): Likewise.
8359         (funct_state_summary_t::insert): New function.
8360         (duplicate_node_data): Remove.
8361         (remove_node_data): Remove.
8362         (funct_state_summary_t::duplicate): New function.
8363         (register_hooks): Create new funct_state_summaries.
8364         (pure_const_generate_summary): Use it.
8365         (pure_const_write_summary): Likewise.
8366         (pure_const_read_summary): Likewise.
8367         (propagate_pure_const): Likewise.
8368         (propagate_nothrow): Likewise.
8369         (dump_malloc_lattice): Likewise.
8370         (propagate_malloc): Likewise.
8371         (execute): Do not register hooks, just remove summary
8372         instead.
8373         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
8374         constructor.
8376 2018-06-08  Martin Liska  <mliska@suse.cz>
8378         * ipa-reference.c (remove_node_data): Remove.
8379         (duplicate_node_data): Likewise.
8380         (class ipa_ref_var_info_summary_t): New class.
8381         (class ipa_ref_opt_summary_t): Likewise.
8382         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
8383         (get_reference_optimization_summary): Use
8384         ipa_ref_opt_sum_summaries.
8385         (set_reference_vars_info): Remove.
8386         (set_reference_optimization_summary): Likewise.
8387         (ipa_init): Create summaries.
8388         (init_function_info): Use function summary.
8389         (ipa_ref_opt_summary_t::duplicate): New function.
8390         (ipa_ref_opt_summary_t::remove): New function.
8391         (get_read_write_all_from_node): Fix GNU coding style.
8392         (propagate): Use function summary.
8393         (write_node_summary_p): Fix GNU coding style.
8394         (stream_out_bitmap): Likewise.
8395         (ipa_reference_read_optimization_summary): Use function summary.
8396         (ipa_reference_c_finalize): Do not release hooks.
8398 2018-06-08  Martin Liska  <mliska@suse.cz>
8400         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
8401         (analyze_function_body): Extract multiple calls of get_create.
8402         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
8403         * ipa-inline.c (recursive_inlining): Use ::get method.
8404         * ipa-inline.h (estimate_edge_growth): Likewise.
8406 2018-06-08  Martin Liska  <mliska@suse.cz>
8408         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
8409         HSA_INVALID.
8410         (hsa_function_summary::hsa_function_summary): Use the new enum
8411         value.
8412         (hsa_gpu_implementation_p): Use hsa_summaries::get.
8413         * hsa-gen.c (hsa_get_host_function): Likewise.
8414         (get_brig_function_name): Likewise.
8415         * ipa-hsa.c (process_hsa_functions): Likewise.
8416         (ipa_hsa_write_summary): Likewise.
8417         * symbol-summary.h (symtab_duplication): Use ::get function/
8418         (get): New function.
8420 2018-06-08  Martin Liska  <mliska@suse.cz>
8422         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
8423         of get.
8424         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
8425         (hsa_register_kernel): Likewise.
8426         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
8427         * hsa-gen.c (hsa_get_host_function): Likewise.
8428         (get_brig_function_name): Likewise.
8429         (generate_hsa): Likewise.
8430         (pass_gen_hsail::execute): Likewise.
8431         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
8432         (devirtualization_time_bonus): Likewise.
8433         (ipcp_propagate_stage): Likewise.
8434         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
8435         (edge_set_predicate): Likewise.
8436         (evaluate_conditions_for_known_args): Likewise.
8437         (evaluate_properties_for_edge): Likewise.
8438         (ipa_fn_summary::reset): Likewise.
8439         (ipa_fn_summary_t::duplicate): Likewise.
8440         (dump_ipa_call_summary): Likewise.
8441         (ipa_dump_fn_summary): Likewise.
8442         (analyze_function_body): Likewise.
8443         (compute_fn_summary): Likewise.
8444         (estimate_edge_devirt_benefit): Likewise.
8445         (estimate_edge_size_and_time): Likewise.
8446         (estimate_calls_size_and_time): Likewise.
8447         (estimate_node_size_and_time): Likewise.
8448         (inline_update_callee_summaries): Likewise.
8449         (remap_edge_change_prob): Likewise.
8450         (remap_edge_summaries): Likewise.
8451         (ipa_merge_fn_summary_after_inlining): Likewise.
8452         (ipa_update_overall_fn_summary): Likewise.
8453         (read_ipa_call_summary): Likewise.
8454         (inline_read_section): Likewise.
8455         (write_ipa_call_summary): Likewise.
8456         (ipa_fn_summary_write): Likewise.
8457         (ipa_free_fn_summary): Likewise.
8458         * ipa-hsa.c (process_hsa_functions): Likewise.
8459         (ipa_hsa_write_summary): Likewise.
8460         (ipa_hsa_read_section): Likewise.
8461         * ipa-icf.c (sem_function::merge): Likewise.
8462         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
8463         (do_estimate_edge_time): Likewise.
8464         (estimate_size_after_inlining): Likewise.
8465         (estimate_growth): Likewise.
8466         (growth_likely_positive): Likewise.
8467         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
8468         (inline_call): Likewise.
8469         * ipa-inline.c (caller_growth_limits): Likewise.
8470         (can_inline_edge_p): Likewise.
8471         (can_inline_edge_by_limits_p): Likewise.
8472         (compute_uninlined_call_time): Likewise.
8473         (compute_inlined_call_time): Likewise.
8474         (want_inline_small_function_p): Likewise.
8475         (edge_badness): Likewise.
8476         (update_caller_keys): Likewise.
8477         (update_callee_keys): Likewise.
8478         (recursive_inlining): Likewise.
8479         (inline_small_functions): Likewise.
8480         (inline_to_all_callers_1): Likewise.
8481         (dump_overall_stats): Likewise.
8482         (early_inline_small_functions): Likewise.
8483         (early_inliner): Likewise.
8484         * ipa-inline.h (estimate_edge_growth): Likewise.
8485         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
8486         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8487         * ipa-prop.h (IPA_NODE_REF): Likewise.
8488         (IPA_EDGE_REF): Likewise.
8489         * ipa-pure-const.c (malloc_candidate_p): Likewise.
8490         (propagate_malloc): Likewise.
8491         * ipa-split.c (execute_split_functions): Likewise.
8492         * symbol-summary.h: Rename get to get_create.
8493         (get): Likewise.
8494         (get_create): Likewise.
8495         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
8497 2018-06-08  Martin Liska  <mliska@suse.cz>
8499         * symbol-summary.h (release): Move definition out of class
8500         declaration.
8501         (symtab_removal): Likewise.
8502         (symtab_duplication): Likewise.
8504 2018-06-08  Martin Liska  <mliska@suse.cz>
8506         * symbol-summary.h (function_summary): Move constructor
8507         implementation out of class declaration.
8508         (release): Likewise.
8509         (symtab_insertion): Likewise.
8510         (symtab_removal): Likewise.
8511         (symtab_duplication): Likewise.
8512         (get): Likewise.
8514 2018-06-08  Martin Liska  <mliska@suse.cz>
8516         * Makefile.in: Remove support for MPX (macros, related functions,
8517         fields in cgraph_node, ...).
8518         * builtin-types.def (BT_BND): Likewise.
8519         (BT_FN_BND_CONST_PTR): Likewise.
8520         (BT_FN_CONST_PTR_BND): Likewise.
8521         (BT_FN_VOID_PTR_BND): Likewise.
8522         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
8523         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
8524         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
8525         (expand_builtin_mempcpy_with_bounds): Likewise.
8526         (expand_builtin_memset_with_bounds): Likewise.
8527         (expand_builtin_memset_args): Likewise.
8528         (std_expand_builtin_va_start): Likewise.
8529         (expand_builtin): Likewise.
8530         (expand_builtin_with_bounds): Likewise.
8531         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
8532         (DEF_LIB_BUILTIN_CHKP): Likewise.
8533         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
8534         (DEF_CHKP_BUILTIN): Likewise.
8535         (BUILT_IN_MEMCPY): Likewise.
8536         (BUILT_IN_MEMMOVE): Likewise.
8537         (BUILT_IN_MEMPCPY): Likewise.
8538         (BUILT_IN_MEMSET): Likewise.
8539         (BUILT_IN_STPCPY): Likewise.
8540         (BUILT_IN_STRCAT): Likewise.
8541         (BUILT_IN_STRCHR): Likewise.
8542         (BUILT_IN_STRCPY): Likewise.
8543         (BUILT_IN_STRLEN): Likewise.
8544         (BUILT_IN_MEMCPY_CHK): Likewise.
8545         (BUILT_IN_MEMMOVE_CHK): Likewise.
8546         (BUILT_IN_MEMPCPY_CHK): Likewise.
8547         (BUILT_IN_MEMSET_CHK): Likewise.
8548         (BUILT_IN_STPCPY_CHK): Likewise.
8549         (BUILT_IN_STRCAT_CHK): Likewise.
8550         (BUILT_IN_STRCPY_CHK): Likewise.
8551         * calls.c (store_bounds): Likewise.
8552         (emit_call_1): Likewise.
8553         (special_function_p): Likewise.
8554         (maybe_warn_nonstring_arg): Likewise.
8555         (initialize_argument_information): Likewise.
8556         (finalize_must_preallocate): Likewise.
8557         (compute_argument_addresses): Likewise.
8558         (expand_call): Likewise.
8559         * cfgexpand.c (expand_call_stmt): Likewise.
8560         (expand_return): Likewise.
8561         (expand_gimple_stmt_1): Likewise.
8562         (pass_expand::execute): Likewise.
8563         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
8564         (cgraph_node::remove): Likewise.
8565         (cgraph_node::dump): Likewise.
8566         (cgraph_node::verify_node): Likewise.
8567         * cgraph.h (chkp_function_instrumented_p): Likewise.
8568         (symtab_node::get_alias_target): Likewise.
8569         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
8570         (cgraph_local_p): Likewise.
8571         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
8572         (cgraph_edge::rebuild_references): Likewise.
8573         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
8574         (walk_polymorphic_call_targets): Likewise.
8575         (cgraph_node::expand_thunk): Likewise.
8576         (symbol_table::output_weakrefs): Likewise.
8577         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
8578         (ix86_handle_option): Likewise.
8579         * config/i386/constraints.md: Likewise.
8580         * config/i386/i386-builtin-types.def (BND): Likewise.
8581         (VOID): Likewise.
8582         (PVOID): Likewise.
8583         (ULONG): Likewise.
8584         * config/i386/i386-builtin.def (BDESC_END): Likewise.
8585         (BDESC_FIRST): Likewise.
8586         (BDESC): Likewise.
8587         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
8588         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
8589         * config/i386/i386.c (enum reg_class): Likewise.
8590         (ix86_target_string): Likewise.
8591         (ix86_option_override_internal): Likewise.
8592         (ix86_conditional_register_usage): Likewise.
8593         (ix86_valid_target_attribute_inner_p): Likewise.
8594         (ix86_set_indirect_branch_type): Likewise.
8595         (ix86_set_current_function): Likewise.
8596         (ix86_function_arg_regno_p): Likewise.
8597         (init_cumulative_args): Likewise.
8598         (ix86_function_arg_advance): Likewise.
8599         (ix86_function_arg): Likewise.
8600         (ix86_pass_by_reference): Likewise.
8601         (ix86_function_value_regno_p): Likewise.
8602         (ix86_function_value_1): Likewise.
8603         (ix86_function_value_bounds): Likewise.
8604         (ix86_return_in_memory): Likewise.
8605         (ix86_setup_incoming_vararg_bounds): Likewise.
8606         (ix86_va_start): Likewise.
8607         (indirect_thunk_need_prefix): Likewise.
8608         (print_reg): Likewise.
8609         (ix86_print_operand): Likewise.
8610         (ix86_expand_call): Likewise.
8611         (ix86_output_function_return): Likewise.
8612         (reg_encoded_number): Likewise.
8613         (BDESC_VERIFYS): Likewise.
8614         (ix86_init_mpx_builtins): Likewise.
8615         (ix86_init_builtins): Likewise.
8616         (ix86_emit_cmove): Likewise.
8617         (ix86_emit_move_max): Likewise.
8618         (ix86_expand_builtin): Likewise.
8619         (ix86_builtin_mpx_function): Likewise.
8620         (ix86_get_arg_address_for_bt): Likewise.
8621         (ix86_load_bounds): Likewise.
8622         (ix86_store_bounds): Likewise.
8623         (ix86_load_returned_bounds): Likewise.
8624         (ix86_store_returned_bounds): Likewise.
8625         (ix86_class_likely_spilled_p): Likewise.
8626         (ix86_hard_regno_mode_ok): Likewise.
8627         (x86_order_regs_for_local_alloc): Likewise.
8628         (ix86_mitigate_rop): Likewise.
8629         (ix86_bnd_prefixed_insn_p): Likewise.
8630         (ix86_mpx_bound_mode): Likewise.
8631         (ix86_make_bounds_constant): Likewise.
8632         (ix86_initialize_bounds): Likewise.
8633         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
8634         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
8635         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
8636         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
8637         (TARGET_CHKP_BOUND_MODE): Likewise.
8638         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
8639         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
8640         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
8641         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
8642         * config/i386/i386.h (TARGET_MPX): Likewise.
8643         (TARGET_MPX_P): Likewise.
8644         (VALID_BND_REG_MODE): Likewise.
8645         (FIRST_BND_REG): Likewise.
8646         (LAST_BND_REG): Likewise.
8647         (enum reg_class): Likewise.
8648         (BND_REG_P): Likewise.
8649         (BND_REGNO_P): Likewise.
8650         (BNDmode): Likewise.
8651         (ADJUST_INSN_LENGTH): Likewise.
8652         * config/i386/i386.md: Likewise.
8653         * config/i386/i386.opt: Likewise.
8654         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
8655         (defined): Likewise.
8656         (LINK_MPX): Likewise.
8657         (MPX_SPEC): Likewise.
8658         (LIBMPX_SPEC): Likewise.
8659         (LIBMPXWRAPPERS_SPEC): Likewise.
8660         (CHKP_SPEC): Likewise.
8661         * config/i386/predicates.md: Likewise.
8662         * dbxout.c (dbxout_type): Likewise.
8663         * doc/extend.texi: Likewise.
8664         * doc/invoke.texi: Likewise.
8665         * doc/md.texi: Likewise.
8666         * doc/tm.texi: Likewise.
8667         * doc/tm.texi.in: Likewise.
8668         * dwarf2out.c (is_base_type): Likewise.
8669         (gen_formal_types_die): Likewise.
8670         (gen_subprogram_die): Likewise.
8671         (gen_type_die_with_usage): Likewise.
8672         (gen_decl_die): Likewise.
8673         (dwarf2out_late_global_decl): Likewise.
8674         * expr.c (expand_assignment): Likewise.
8675         (emit_storent_insn): Likewise.
8676         (store_expr_with_bounds): Likewise.
8677         (store_expr): Likewise.
8678         (expand_expr_real_1): Likewise.
8679         * expr.h (store_expr_with_bounds): Likewise.
8680         * function.c (use_register_for_decl): Likewise.
8681         (struct bounds_parm_data): Likewise.
8682         (assign_parms_augmented_arg_list): Likewise.
8683         (assign_parm_find_entry_rtl): Likewise.
8684         (assign_parm_is_stack_parm): Likewise.
8685         (assign_parm_load_bounds): Likewise.
8686         (assign_bounds): Likewise.
8687         (assign_parms): Likewise.
8688         (expand_function_start): Likewise.
8689         * gcc.c (CHKP_SPEC): Likewise.
8690         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
8691         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
8692         (wrestrict_dom_walker::check_call): Likewise.
8693         * gimple.c (gimple_build_call_from_tree): Likewise.
8694         * gimple.h (enum gf_mask): Likewise.
8695         (gimple_call_with_bounds_p): Likewise.
8696         (gimple_call_set_with_bounds): Likewise.
8697         * gimplify.c (gimplify_init_constructor): Likewise.
8698         * ipa-cp.c (initialize_node_lattices): Likewise.
8699         (propagate_constants_across_call): Likewise.
8700         (find_more_scalar_values_for_callers_subset): Likewise.
8701         * ipa-hsa.c (process_hsa_functions): Likewise.
8702         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
8703         * ipa-icf.c (sem_function::merge): Likewise.
8704         * ipa-inline.c (early_inliner): Likewise.
8705         * ipa-pure-const.c (warn_function_noreturn): Likewise.
8706         (warn_function_cold): Likewise.
8707         (propagate_pure_const): Likewise.
8708         * ipa-ref.h (enum GTY): Likewise.
8709         * ipa-split.c (find_retbnd): Likewise.
8710         (consider_split): Likewise.
8711         (split_function): Likewise.
8712         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
8713         * ipa.c (walk_polymorphic_call_targets): Likewise.
8714         (symbol_table::remove_unreachable_nodes): Likewise.
8715         (process_references): Likewise.
8716         (cgraph_build_static_cdtor_1): Likewise.
8717         * lto-cgraph.c (lto_output_node): Likewise.
8718         (output_refs): Likewise.
8719         (compute_ltrans_boundary): Likewise.
8720         (input_overwrite_node): Likewise.
8721         (input_node): Likewise.
8722         (input_cgraph_1): Likewise.
8723         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
8724         * passes.c (pass_manager::execute_early_local_passes): Likewise.
8725         (class pass_chkp_instrumentation_passes): Likewise.
8726         (make_pass_chkp_instrumentation_passes): Likewise.
8727         * passes.def: Likewise.
8728         * rtl.h (struct GTY): Likewise.
8729         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
8730         * stor-layout.c (layout_type): Likewise.
8731         * symtab.c: Likewise.
8732         * target.def: Likewise.
8733         * targhooks.c (default_chkp_bound_type): Likewise.
8734         (default_chkp_bound_mode): Likewise.
8735         (default_builtin_chkp_function): Likewise.
8736         (default_chkp_function_value_bounds): Likewise.
8737         (default_chkp_make_bounds_constant): Likewise.
8738         (default_chkp_initialize_bounds): Likewise.
8739         * targhooks.h (default_chkp_bound_type): Likewise.
8740         (default_chkp_bound_mode): Likewise.
8741         (default_builtin_chkp_function): Likewise.
8742         (default_chkp_function_value_bounds): Likewise.
8743         (default_chkp_make_bounds_constant): Likewise.
8744         (default_chkp_initialize_bounds): Likewise.
8745         * toplev.c (compile_file): Likewise.
8746         (process_options): Likewise.
8747         * tree-core.h (DEF_BUILTIN): Likewise.
8748         (DEF_BUILTIN_CHKP): Likewise.
8749         * tree-inline.c (declare_return_variable): Likewise.
8750         (remap_gimple_stmt): Likewise.
8751         (copy_bb): Likewise.
8752         (initialize_inlined_parameters): Likewise.
8753         (expand_call_inline): Likewise.
8754         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
8755         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
8756         (make_pass_ipa_chkp_produce_thunks): Likewise.
8757         (make_pass_chkp): Likewise.
8758         (make_pass_chkp_opt): Likewise.
8759         (make_pass_chkp_instrumentation_passes): Likewise.
8760         * tree-pretty-print.c (dump_generic_node): Likewise.
8761         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
8762         * tree-ssa-dce.c (propagate_necessity): Likewise.
8763         (eliminate_unnecessary_stmts): Likewise.
8764         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
8765         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
8766         * tree-ssa-sccvn.h: Likewise.
8767         * tree-ssa-strlen.c (get_string_length): Likewise.
8768         (valid_builtin_call): Likewise.
8769         (adjust_last_stmt): Likewise.
8770         (handle_builtin_strchr): Likewise.
8771         (handle_builtin_strcpy): Likewise.
8772         (handle_builtin_stxncpy): Likewise.
8773         (handle_builtin_memcpy): Likewise.
8774         (handle_builtin_strcat): Likewise.
8775         (strlen_check_and_optimize_stmt): Likewise.
8776         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
8777         * tree-streamer-in.c: Likewise.
8778         * tree-streamer.c (record_common_node): Likewise.
8779         * tree.c (tree_code_size): Likewise.
8780         (wide_int_to_tree_1): Likewise.
8781         (type_contains_placeholder_1): Likewise.
8782         (build_common_tree_nodes): Likewise.
8783         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
8784         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
8785         (POINTER_BOUNDS_P): Likewise.
8786         (BOUNDED_TYPE_P): Likewise.
8787         (BOUNDED_P): Likewise.
8788         (CALL_WITH_BOUNDS_P): Likewise.
8789         (pointer_bounds_type_node): Likewise.
8790         * value-prof.c (gimple_ic): Likewise.
8791         * var-tracking.c (vt_add_function_parameters): Likewise.
8792         * varasm.c (make_decl_rtl): Likewise.
8793         (assemble_start_function): Likewise.
8794         (output_constant): Likewise.
8795         (maybe_assemble_visibility): Likewise.
8796         * varpool.c (ctor_for_folding): Likewise.
8797         * chkp-builtins.def: Remove.
8798         * ipa-chkp.c: Remove.
8799         * ipa-chkp.h: Remove.
8800         * rtl-chkp.c: Remove.
8801         * rtl-chkp.h: Remove.
8802         * tree-chkp-opt.c: Remove.
8803         * tree-chkp.c: Remove.
8804         * tree-chkp.h: Remove.
8806 2018-06-07  Carl Love  <cel@us.ibm.com>
8808         * config/rs6000/vsx.md (vextract_fp_from_shorth,
8809         vextract_fp_from_shortl): Add BE support.
8811 2018-06-07  Paul Koning  <ni1d@arrl.net>
8813         * compare-elim.c (try_merge_compare): Don't merge compare if
8814         address contains a side effect.
8815         (try_eliminate_compare): Likewise.
8817 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
8819         * config.gcc: Support "tremont".
8820         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
8821         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8822         PROCESSOR_TREMONT.
8823         * config/i386/i386.c (m_TREMONT): Define.
8824         (processor_target_table): Add "tremont".
8825         (PTA_TREMONT): Define.
8826         (ix86_lea_outperforms): Add TARGET_TREMONT.
8827         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
8828         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
8829         and M_INTEL_GOLDMONT_PLUS.
8830         (fold_builtin_cpu): Add "tremont".
8831         (ix86_add_stmt_cost): Add TARGET_TREMONT.
8832         (ix86_option_override_internal): Add "tremont".
8833         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
8834         (processor_type): Add PROCESSOR_TREMONT.
8835         * config/i386/x86-tune.def: Add m_TREMONT.
8836         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
8838 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8840         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
8841         symbol defined for msp430i* devices to be lower case.
8843 2018-06-07  Richard Biener  <rguenther@suse.de>
8845         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
8846         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
8847         Properly wrap signed arithmetic if overflow wraps.
8849 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
8851         PR tree-optimization/69615
8852         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
8853         of a cast from a same precision integral SSA_NAME in a bb dominated
8854         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
8855         cast to utype if rhs2 has already a compatible type.
8857 2018-06-07  Richard Biener  <rguenther@suse.de>
8859         PR tree-optimization/85935
8860         * graphite-scop-detection.c (find_params_in_bb): Analyze
8861         condition operands with respect to the correct loop.  Assert
8862         the analysis doesn't fail.
8864 2018-06-04  Carl Love  <cel@us.ibm.com>
8866         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
8867         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
8868         as it is slightly cheaper.
8869         (first_match_or_eos_index_<mode>):
8870         Calculate index using natural element order.
8871         (first_match_index_<mode>):
8872         Calculate index using natural element order.
8873         (first_match_or_eos_index_<mode>):
8874         Calculate index using natural order.
8875         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
8876         for BE and LE modes.
8877         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
8878         P9V_BUILTIN_VCLZLSBB_V16QI.
8879         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
8880         specific.
8882 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8884         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
8885         indentation and line wrap for many prototypes.  Add missing
8886         @smallexample directives around block of prototypes for vec_xl and
8887         vec_xst.
8889 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
8891         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
8892         track if we pass or return IEEE 128-bit floating point.
8893         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
8894         C++ mangling that is compatible with GCC 8.1.
8895         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
8896         (init_cumulative_args): Note if we pass or return IEEE 128-bit
8897         floating point types.
8898         (rs6000_function_arg_advance_1): Likewise.
8899         (rs6000_mangle_type): Optionally generate mangled names that match
8900         what GCC 8.1 generated for IEEE 128-bit floating point types.
8901         (rs6000_globalize_decl_name): If we have an external function that
8902         passes or returns IEEE 128-bit types, generate a weak reference
8903         from the mangled name used in GCC 8.1 to the current mangled
8904         name.
8905         (rs6000_init_builtins): Make __ibm128 use the long double type if
8906         long double is IBM extended double.  Make __float128 use the long
8907         double type if long double is IEEE 128-bit.
8909         PR target/85657
8910         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
8911         macro for __ibm128 built-in functions.
8912         (PACK_IF): Add __ibm128 pack/unpack functions.
8913         (UNPACK_IF): Likewise.
8914         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
8915         enable long double built-in functions if long double is IEEE
8916         128-bit floating point.
8917         (rs6000_invalid_builtin): Update long double built-in function
8918         error message.
8919         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
8920         functions, adjust the built-in function to use the long double
8921         built-in function if __ibm128 and long double are the same type.
8922         * doc/extend.texi (PowerPC builtins): Update documention for
8923         __builtin_{,un}pack_longdouble.  Add documentation for
8924         __builtin_{,un}pack_ibm128.
8926 2018-06-06  Jim Wilson  <jimw@sifive.com>
8928         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
8929         (struct machine_function): New field interrupt_mode.
8930         (riscv_handle_type_attribute): New function.  Add forward declaration.
8931         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
8932         (riscv_expand_epilogue): Check interrupt_mode field.
8933         (riscv_set_current_function): Check interrupt attribute args and
8934         set interrupt_mode field.
8935         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
8936         (riscv_sret, riscv_uret): New.
8937         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
8938         new arguments to interrupt attribute.
8940 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
8942         PR target/63177
8943         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
8944         Don't handle -mcpu=power8 if -mpower9-vector is also used.
8946 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8948         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
8949         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
8950         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
8951         several redundant entries.
8953 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
8955         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
8956         type from "rtx" to "rtx_insn *".
8957         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
8958         for local "call_insn", removing cast.
8959         (ix86_expand_call): Likewise, introducing a "call_insn" local.
8961 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
8963         PR tree-optimization/86066
8964         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
8965         for BIT_INSERT_EXPR stores.
8967 2018-06-06  Richard Biener  <rguenther@suse.de>
8969         PR tree-optimization/86062
8970         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
8971         component refs ontop
8972         of to be offsetted base.
8974 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8976         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
8977         to be static and remove check on interrupt attribute name.
8979 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8981         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
8982         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
8984 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
8986         PR target/79924
8987         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
8988         second argument.
8989         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
8990         Remove second argument, change how error is called.
8991         (aarch64_layout_arg): Remove second argument from
8992         aarch64_err_no_fpadvsimd call.
8993         (aarch64_init_cumulative_args): Ditto.
8994         (aarch64_gimplify_va_arg_expr): Ditto.
8995         * config/aarch64/aarch64.md (mov<mode>): Ditto.
8997 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
8999         * config/i386/i386.md (simple_return_indirect_internal): New expander.
9000         (*simple_return_indirect_internal<mode>): Rename from
9001         simple_return_indirect_internal.  Use W mode iterator.
9002         (rstorssp): New expander.
9003         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
9004         (clrssbsy): New expander.
9005         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
9007 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9009         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
9010         __typeof__.
9011         (cmse_check_pointed_object): Likewise.
9013 2018-06-05  Martin Liska  <mliska@suse.cz>
9015         PR gcov-profile/47618
9016         * doc/invoke.texi: Document how -fprofile-dir format
9017         is extended.
9019 2018-06-05  Richard Biener  <rguenther@suse.de>
9021         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
9022         removal pretend DOM info isn't available so we do not update
9023         it and only remove edges, not dominated blocks.  Actually free
9024         DOM info in case we removed something.  Remove unreachable blocks.
9025         (mfb_keep_latches): Work with either DOM info or marked backedges.
9026         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
9027         first.  Mark backedges if DOM info isn't available.
9028         (Re-)compute DOM info after cleanup_control_flow_pre.
9030 2018-06-05  Richard Biener  <rguenther@suse.de>
9032         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
9033         (locus_discrim_hasher::hash): Adjust.
9034         (locus_discrim_hasher::equal): Likewise.
9035         (next_discriminator_for_locus): Work on line directly.
9036         (same_line_p): Pass in expanded locus1 as well.
9037         (assign_discriminators): Avoid redundant location expansions.
9039 2018-06-05  Richard Biener  <rguenther@suse.de>
9041         PR tree-optimization/86046
9042         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
9043         if required after clearing TREE_ADDRESSABLE.
9045 2018-06-05  Richard Biener  <rguenther@suse.de>
9047         PR tree-optimization/86047
9048         * tree-ssa-loop.c (for_each_index): Glob handling of all
9049         decls and constants and really handle all of them.
9051 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9053         PR target/81497
9054         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
9055         qualifier_void_pointer and qualifier_const_void_pointer.
9056         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
9057         (arm_init_builtins): Handle the above.
9058         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
9059         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
9060         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
9061         void intrinsics.
9063 2018-06-05  Martin Liska  <mliska@suse.cz>
9065         * auto-profile.c (read_autofdo_file): Do not use
9066         gcov_ctr_summary struct.
9067         (afdo_callsite_hot_enough_for_early_inline): Likewise.
9068         * coverage.c (struct counts_entry): Likewise.
9069         (read_counts_file): Read just single summary entry.
9070         (get_coverage_counts): Use gcov_summary struct.
9071         * coverage.h (get_coverage_counts): Likewise.
9072         * gcov-dump.c (dump_working_sets): Likewise.
9073         (tag_summary): Dump just single summary.
9074         * gcov-io.c (gcov_write_summary): Write just histogram
9075         summary.
9076         (gcov_read_summary): Read just single summary.
9077         (compute_working_sets): Use gcov_summary struct.
9078         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
9079         of GCOV_COUNTERS_SUMMABLE.
9080         (GCOV_COUNTERS_SUMMABLE): Remove.
9081         (GCOV_FIRST_VALUE_COUNTER): Replace with
9082         GCOV_COUNTER_V_INTERVAL.
9083         (struct gcov_ctr_summary): Remove.
9084         (struct gcov_summary): Directly use fields of former
9085         gcov_ctr_summary.
9086         (compute_working_sets): Use gcov_summary struct.
9087         * gcov.c (read_count_file): Do not use ctrs fields.
9088         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
9089         struct.
9090         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
9091         struct.
9092         * profile.c: Likewise.
9093         * profile.h: Likewise.
9095 2018-06-05  Martin Liska  <mliska@suse.cz>
9097         PR gcov-profile/84846
9098         * gcov.c (output_lines): Print working directory only
9099         in intermediate format.
9101 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
9103         * config/s390/s390-builtin-types.def: Add void function type.
9104         * config/s390/s390-builtins.def: Use the function type for the
9105         tbeginc builtin.
9107 2018-06-04  Jim Wilson  <jimw@sifive.com>
9109         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
9110         to int.
9111         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
9112         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
9113         handle EH_RETURN_DATA_REGNO registers properly.
9114         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
9115         (riscv_expand_epilogue): Update comment.  Change argument name and
9116         type.  Update code to use new name and type.  Pass new args to
9117         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
9118         EXCEPTION_RETURN.
9119         * config/riscv/riscv.md (NORMAL_RETURN): New.
9120         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
9121         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
9122         (eh_return): Call gen_eh_return_internal and emit barrier.
9123         (eh_return_internal): Call riscv_expand_epilogue.
9125 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
9127         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
9128         bit_insertion field and declare can_be_merged_into method.
9129         (merged_store_group::can_be_merged_into): New method.
9130         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
9131         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
9132         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
9134 2018-06-04  Richard Biener  <rguenther@suse.de>
9136         PR tree-optimization/85955
9137         * builtins.c (fold_builtin_sincos): Convert pointers to
9138         destination to appropriate type before dereferencing.
9140 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
9142         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
9144 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
9146         * expr.c (expand_expr_real_1): Force the operand into memory if
9147         its TYPE_MODE is BLKmode and if there is no integer mode for
9148         the number of bits being extracted.
9150 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
9152         PR target/85832
9153         PR target/86036
9154         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
9155         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
9157 2018-06-04  Richard Biener  <rguenther@suse.de>
9159         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
9160         (cleanup_tree_cfg_noloop): ... single caller.  Do
9161         start_recording_case_labels later.
9163 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
9165         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
9166         to _IMMINTRIN_H_INCLUDED.
9167         * config/i386/pconfigintrin.h: Ditto.
9168         * config/i386/waitpkgintrin.h: Ditto.
9169         * config/i386/immintrin.h: Add includes for sgxintrin.h,
9170         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
9171         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
9172         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
9173         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
9174         waitpkgintrin.h and cldemoteintrin.h.
9176 2018-06-04  Richard Biener  <rguenther@suse.de>
9178         PR tree-optimization/86038
9179         * tracer.c (find_best_successor): Check probability for
9180         being initialized, bail out if not.
9182 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
9184         PR target/86003
9185         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
9186         of bits to ignore when comparing architectures.
9188 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
9190         PR tree-optimization/69615
9191         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
9192         maximum or minimum of the type, try to merge it also as if
9193         range1 is + [-, x - 1] or + [x + 1, -].
9195         PR c++/86025
9196         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
9198 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
9200         PR tree-optimization/86034
9201         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
9202         the unsigned bitfield type in a bit insertion sequence if it does not
9203         have a larger precision than the bitfield size.
9204         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
9206 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
9208         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
9210 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
9212         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
9213         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
9214         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
9215         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
9217 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
9219         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
9220         Disable -fdelete-null-pointer-checks for ELF toolchain.
9222 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
9223             Kito Cheng  <kito.cheng@gmail.com>
9225         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
9226         (nds32le-*-*, nds32be-*-*): Integrate checking process.
9227         (nds32*-*-*): Add glibc and uclibc conditions.
9228         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
9229         (TARGET_EXCEPT_UNWIND_INFO): Define.
9230         * config/nds32/elf.h: New file.
9231         * config/nds32/linux.h: New file.
9232         * config/nds32/nds32-elf.opt: New file.
9233         * config/nds32/nds32-linux.opt: New file.
9234         * config/nds32/nds32-fp-as-gp.c
9235         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
9236         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
9237         TARGET_LINUX_ABI.
9238         (nds32_asm_file_end): Ditto.
9239         (nds32_print_operand): Ditto.
9240         (nds32_insert_attributes): Ditto.
9241         (nds32_init_libfuncs): New function.
9242         (TARGET_HAVE_TLS): Define.
9243         (TARGET_INIT_LIBFUNCS): Define.
9244         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
9245         spec content.
9246         (TARGET_ELF): Apply different mcmodel setting.
9247         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
9248         been migrated into elf.h and linux.h files.
9249         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
9250         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
9251         (mcmodel): The content has been migrated into nds32-elf.opt and
9252         nds32-linux.opt files.
9253         * config/nds32/t-elf: New file.
9254         * config/nds32/t-linux: New file.
9256 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
9257             Shiva Chen  <shiva0217@gmail.com>
9259         * config/nds32/constants.md (unspec_volatile_element): Add
9260         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
9261         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
9262         optimization.
9263         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
9264         (make_pass_nds32_fp_as_gp): Declare.
9265         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
9266         optmization pass.
9267         (nds32_asm_function_end_prologue): Remove unused asm output.
9268         (nds32_asm_function_begin_epilogue): Remove unused asm output.
9269         (nds32_asm_file_start): Output necessary fp_as_gp information.
9270         (nds32_option_override): Adjust register usage.
9271         (nds32_expand_prologue): Consider fp_as_gp situation.
9272         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
9273         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
9274         (epilogue): Ditto.
9275         (return): Ditto.
9276         (simple_return): Ditto.
9277         (omit_fp_begin): Output special directive for fp_as_gp.
9278         (omit_fp_end): Output special directive for fp_as_gp.
9279         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
9280         mforbid-fp-as-gp): New options.
9282 2018-06-01  Mark Wielaard  <mark@klomp.org>
9284         * dwarf2out.c (dwarf2out_finish): Remove generation of
9285         DW_AT_loclists_base.
9287 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
9289         * gimple-ssa-store-merging.c: Include gimple-fold.h.
9290         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
9291         (struct merged_store_group): Add bit_insertion field.
9292         (dump_char_array): Use standard hexadecimal format.
9293         (merged_store_group::merged_store_group): Set bit_insertion to false.
9294         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
9295         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
9296         also print the mask in the dump file.
9297         (pass_store_merging::gate): Minor tweak.
9298         (imm_store_chain_info::coalesce_immediate): Fix wrong association
9299         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
9300         stores with INTEGER_CST stores.
9301         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
9302         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
9303         and use it throughout.  Generate bit insertion sequences if need be.
9304         (pass_store_merging::process_store): Remove redundant condition.
9305         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
9307 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
9309         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
9310         the 128-bit floating point types.  Fix function comment.
9312 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9314         * config/aarch64/aarch64-simd.md
9315         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
9316         mnemonics.
9317         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
9318         mnemonics.
9320 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
9322         PR tree-optimization/85989
9323         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
9324         variable.
9325         (backprop::intersect_uses): Check it when deciding whether this
9326         is a backedge reference.
9327         (backprop::process_block): Add each phi to m_visited_phis
9328         after visiting it, then clear it at the end.
9330 2018-06-01  Richard Biener  <rguenther@suse.de>
9332         * tree-vectorizer.h (vect_dr_stmt): New function.
9333         (vect_get_load_cost): Adjust.
9334         (vect_get_store_cost): Likewise.
9335         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
9336         Use vect_dr_stmt instead of DR_SMTT.
9337         (vect_record_base_alignments): Likewise.
9338         (vect_calculate_target_alignment): Likewise.
9339         (vect_compute_data_ref_alignment): Likewise and make static.
9340         (vect_update_misalignment_for_peel): Likewise.
9341         (vect_verify_datarefs_alignment): Likewise.
9342         (vector_alignment_reachable_p): Likewise.
9343         (vect_get_data_access_cost): Likewise.  Pass down
9344         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
9345         (vect_get_peeling_costs_all_drs): Likewise.
9346         (vect_peeling_hash_get_lowest_cost): Likewise.
9347         (vect_enhance_data_refs_alignment): Likewise.
9348         (vect_find_same_alignment_drs): Likewise.
9349         (vect_analyze_data_refs_alignment): Likewise.
9350         (vect_analyze_group_access_1): Likewise.
9351         (vect_analyze_group_access): Likewise.
9352         (vect_analyze_data_ref_access): Likewise.
9353         (vect_analyze_data_ref_accesses): Likewise.
9354         (vect_vfa_segment_size): Likewise.
9355         (vect_small_gap_p): Likewise.
9356         (vectorizable_with_step_bound_p): Likewise.
9357         (vect_prune_runtime_alias_test_list): Likewise.
9358         (vect_analyze_data_refs): Likewise.
9359         (vect_supportable_dr_alignment): Likewise.
9360         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
9361         (vect_gen_prolog_loop_niters): Likewise.
9362         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
9363         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
9364         modify DR_STMT.
9365         (vect_recog_mask_conversion_pattern): Likewise.
9366         (vect_try_gather_scatter_pattern): Likewise.
9367         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
9368         to vect_get_store_cost.
9369         (vect_get_store_cost): Get stmt_info instead of DR.
9370         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
9371         (vect_get_load_cost): Get stmt_info instead of DR.
9373 2018-06-01  Richard Biener  <rguenther@suse.de>
9375         PR middle-end/86017
9376         * gimple-fold.c (var_decl_component_p): Also allow offsetted
9377         vars wrapped in MEM_REFs.
9379 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
9381         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
9382         Fix subreg tests so that we only return a choice between
9383         GENERAL_REGS and FP_REGS if the original classes included both.
9385 2018-06-01  Richard Biener  <rguenther@suse.de>
9387         PR ipa/85960
9388         * tree-ssa-structalias.c (get_function_part_constraint):
9389         Handle NULL fi->decl.
9390         (find_func_aliases_for_call): Properly handle indirect
9391         fi from direct call.
9392         (find_func_clobbers): Likewise.
9393         (ipa_pta_execute): Likewise.
9394         (create_variable_info_for): For functions that are ifunc_resolver
9395         resolve to a varinfo that contains the result of the resolver call.
9396         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
9397         aliases.
9399 2018-05-31  Michael Collison  <michael.collison@arm.com>
9401         * config/aarch64/aarch64.md:
9402         (*fix_to_zero_extenddfdi2): New pattern.
9403         * gcc.target/aarch64/fix_extend1.c: New testcase.
9405 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
9407         PR middle-end/78809
9408         PR middle-end/83026
9409         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
9410         and BUILT_IN_STRNCMP_EQ.
9411         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
9412         BUILT_IN_STRNCMP_EQ.
9413         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
9414         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
9415         (gimple_fold_builtin): Likewise.
9416         * tree-ssa-strlen.c (compute_string_length): New function.
9417         (determine_min_obsize): New function.
9418         (handle_builtin_string_cmp): New function to handle calls to
9419         string compare functions.
9420         (strlen_optimize_stmt): Add handling to builtin string compare
9421         calls.
9422         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
9423         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
9424         * tree.c (build_common_builtin_nodes): Add new defines of
9425         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
9427 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
9429         PR target/85984
9430         * bb-reorder.c (pass_partition_blocks::gate): Return false for
9431         functions with naked attribute.
9433 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
9435         * config/i386/sse.md (avx_vec_concat<mode>):
9436         Substitute concat_tg_mode mode attribute with xtg_mode.
9437         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
9438         (concat_tg_mode): Remove mode attribute.
9440 2018-05-31  Martin Sebor  <msebor@redhat.com>
9442         PR c/82063
9443         * calls.c (alloc_max_size): Correct a logic error/typo.
9444         Treat excessive arguments as infinite.  Warn for invalid arguments.
9445         * doc/invoke.texi (-Walloc-size-larger-than): Update.
9447 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
9449         PR target/85829
9450         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
9451         and movx for Haswell.
9453 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
9454             Cesar Philippidis  <cesar@codesourcery.com>
9456         PR middle-end/85879
9457         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
9458         when emitting error on private/firstprivate reductions.
9459         * omp-low.c (lower_omp_target): Avoid reference-type processing
9460         on pointers for firstprivate clause.
9462 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
9464         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
9465         (st1x2): Likewise.
9466         (st1x3): Likewise.
9467         * config/aarch64/aarch64-simd.md
9468         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
9469         (aarch64_ld1_x3_<mode>): Likewise
9470         (aarch64_st1x2<VALLDIF:mode>): Likewise
9471         (aarch64_st1_x2_<mode>): Likewise
9472         (aarch64_st1x3<VALLDIF:mode>): Likewise
9473         (aarch64_st1_x3_<mode>): Likewise
9474         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
9475         (vld1_s8_x3): Likewise.
9476         (vld1_u16_x3): Likewise.
9477         (vld1_s16_x3): Likewise.
9478         (vld1_u32_x3): Likewise.
9479         (vld1_s32_x3): Likewise.
9480         (vld1_u64_x3): Likewise.
9481         (vld1_s64_x3): Likewise.
9482         (vld1_f16_x3): Likewise.
9483         (vld1_f32_x3): Likewise.
9484         (vld1_f64_x3): Likewise.
9485         (vld1_p8_x3): Likewise.
9486         (vld1_p16_x3): Likewise.
9487         (vld1_p64_x3): Likewise.
9488         (vld1q_u8_x3): Likewise.
9489         (vld1q_s8_x3): Likewise.
9490         (vld1q_u16_x3): Likewise.
9491         (vld1q_s16_x3): Likewise.
9492         (vld1q_u32_x3): Likewise.
9493         (vld1q_s32_x3): Likewise.
9494         (vld1q_u64_x3): Likewise.
9495         (vld1q_s64_x3): Likewise.
9496         (vld1q_f16_x3): Likewise.
9497         (vld1q_f32_x3): Likewise.
9498         (vld1q_f64_x3): Likewise.
9499         (vld1q_p8_x3): Likewise.
9500         (vld1q_p16_x3): Likewise.
9501         (vld1q_p64_x3): Likewise.
9502         (vst1_s64_x2): Likewise.
9503         (vst1_u64_x2): Likewise.
9504         (vst1_f64_x2): Likewise.
9505         (vst1_s8_x2): Likewise.
9506         (vst1_p8_x2): Likewise.
9507         (vst1_s16_x2): Likewise.
9508         (vst1_p16_x2): Likewise.
9509         (vst1_s32_x2): Likewise.
9510         (vst1_u8_x2): Likewise.
9511         (vst1_u16_x2): Likewise.
9512         (vst1_u32_x2): Likewise.
9513         (vst1_f16_x2): Likewise.
9514         (vst1_f32_x2): Likewise.
9515         (vst1_p64_x2): Likewise.
9516         (vst1q_s8_x2): Likewise.
9517         (vst1q_p8_x2): Likewise.
9518         (vst1q_s16_x2): Likewise.
9519         (vst1q_p16_x2): Likewise.
9520         (vst1q_s32_x2): Likewise.
9521         (vst1q_s64_x2): Likewise.
9522         (vst1q_u8_x2): Likewise.
9523         (vst1q_u16_x2): Likewise.
9524         (vst1q_u32_x2): Likewise.
9525         (vst1q_u64_x2): Likewise.
9526         (vst1q_f16_x2): Likewise.
9527         (vst1q_f32_x2): Likewise.
9528         (vst1q_f64_x2): Likewise.
9529         (vst1q_p64_x2): Likewise.
9530         (vst1_s64_x3): Likewise.
9531         (vst1_u64_x3): Likewise.
9532         (vst1_f64_x3): Likewise.
9533         (vst1_s8_x3): Likewise.
9534         (vst1_p8_x3): Likewise.
9535         (vst1_s16_x3): Likewise.
9536         (vst1_p16_x3): Likewise.
9537         (vst1_s32_x3): Likewise.
9538         (vst1_u8_x3): Likewise.
9539         (vst1_u16_x3): Likewise.
9540         (vst1_u32_x3): Likewise.
9541         (vst1_f16_x3): Likewise.
9542         (vst1_f32_x3): Likewise.
9543         (vst1_p64_x3): Likewise.
9544         (vst1q_s8_x3): Likewise.
9545         (vst1q_p8_x3): Likewise.
9546         (vst1q_s16_x3): Likewise.
9547         (vst1q_p16_x3): Likewise.
9548         (vst1q_s32_x3): Likewise.
9549         (vst1q_s64_x3): Likewise.
9550         (vst1q_u8_x3): Likewise.
9551         (vst1q_u16_x3): Likewise.
9552         (vst1q_u32_x3): Likewise.
9553         (vst1q_u64_x3): Likewise.
9554         (vst1q_f16_x3): Likewise.
9555         (vst1q_f32_x3): Likewise.
9556         (vst1q_f64_x3): Likewise.
9557         (vst1q_p64_x3): Likewise.
9559 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
9561         * config/msp430/msp430.c (msp430_output_labelref): Prepend
9562         user_label_prefix to name.
9564         * tree-core.h: Update comment about the format of NAME string
9565         passed to handler in attribute_spec.
9567         * config/msp430/msp430.md: Remove erroneous subreg expression from
9568         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
9569         zero_extend{q,h}isi2.
9571 2018-05-30  Borislav Petkov  <bp@suse.de>
9573         * doc/extend.texi: Document some architecture specific
9574         constraints and sort entries.
9576 2018-05-30  Martin Sebor  <msebor@redhat.com>
9578         PR middle-end/85369
9579         * builtins.c (expand_builtin_stpcpy_1): New function.
9580         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
9581         only if the former succeeds.
9583 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
9585         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
9586         in saphira.
9588 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
9590         * doc/invoke.texi (-flinker-output): Document
9592 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
9594         * passes.c (ipa_write_summaries): Only modify statements if body
9595         is in memory.
9596         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
9597         incrementally linking.
9598         (ipa_passes): Likewise.
9599         * lto-cgraph.c (lto_output_node): When incrementally linking do not
9600         pass down resolution info.
9601         * common.opt (flag_incremental_link): Update info.
9602         * gcc.c (plugin specs): Turn flinker-output=* to
9603         -plugin-opt=-linker-output-known
9604         * toplev.c (compile_file): Also cut compilation when doing incremental
9605         link.
9606         * flag-types. (enum lto_partition_model): Add
9607         LTO_LINKER_OUTPUT_NOLTOREL.
9608         (invoke.texi): Add -flinker-output docs.
9609         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
9610         link same way as WPA; do not stream in dead initializers.
9612         * dwarf2out.c (dwarf2out_die_ref_for_decl,
9613         darf2out_register_external_decl): Support incremental link.
9615 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
9617         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
9619 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
9621         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
9622         it down to simple_object_copy_lto_debug_sections.
9623         (run_gcc): Determine incremental LTO link time and configure
9624         lto1 into non-wpa mode, disable renaming of debug sections.
9626 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9628         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
9629         descriptions of various incorrectly documented functions.
9631 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9633         Revert:
9634         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9635         address check not strict.
9637 2018-05-30  Richard Biener  <rguenther@suse.de>
9639         PR tree-optimization/85964
9640         * tracer.c (better_p): Drop initialized count check, we only
9641         call the function with initialized counts now.
9642         (find_best_successor): Do find a best edge if one
9643         has uninitialized count.
9644         (find_best_predecessor): Likewise.  Do BB frequency check only
9645         if count is initialized.
9647 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
9649         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
9650         (aarch64_ldrstr_offset_compare): New.
9651         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
9652         load/store orderings.
9653         (aarch64_gen_adjusted_ldpstp): Likewise.
9655 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
9657         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
9658         Check for subset of GENERAL_REGS and FP_REGS.
9659         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
9660         r=w alternative.
9662 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
9664         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
9665         and wi::to_poly_offset.  Add the current offset and then check
9666         whether the sum fits, rather than using an unchecked addition of
9667         a checked term.  Check for a shwi rather than a uhwi.
9668         * expr.c (get_bit_range): Use tree_to_poly_uint64.
9669         (store_constructor): Use poly_int_tree_p.
9670         (expand_expr_real_1): Likewise.
9671         * function.c (assign_temp): Likewise.
9672         * fold-const.c (const_binop): Use poly_int_tree_p and
9673         wi::to_poly_offset.
9674         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
9675         division.
9676         * ipa-icf-gimple.c (func_checker::compare_operand): Use
9677         to_poly_offset for MEM offsets.
9678         * ipa-icf.c (sem_variable::equals): Likewise.
9679         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
9680         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
9681         wi::to_poly_offset for BIT_FIELD_REF offsets.
9682         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
9683         wi::to_poly_offset.
9684         * var-tracking.c (emit_note_insn_var_location): Use
9685         tree_to_poly_uint64.
9687 2018-05-29  Jim Wilson  <jimw@sifive.com>
9689         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
9691 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
9693         PR target/85950
9694         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
9695         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
9696         sequence.
9697         (sse4_1_round<mode>2): Use nonimmediate_operand
9698         for operand 1 predicate.
9700 2018-05-29  Martin Sebor  <msebor@redhat.com>
9701             Richard Biener  <rguenther@suse.de>
9703         PR testsuite/85888
9704         * calls.c (get_size_range): Call determine_value_range instead
9705         of get_value_range..
9706         * tree-vrp.h (determine_value_range): Declared new function.
9707         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
9709 2018-05-29  Richard Biener  <rguenther@suse.de>
9711         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
9712         sure to use non-pattern stmts for get_earlier_stmt arguments.
9713         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
9714         called on pattern stmts.
9715         (get_later_stmt): Likewise.
9717 2018-05-29  Martin Liska  <mliska@suse.cz>
9719         PR gcov-profile/85759
9720         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
9721         env variables.
9723 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
9725         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
9726         VEC_UNPACK_*_EXPR.
9727         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
9728         VEC_PACK_*_EXPR.
9730         PR target/85918
9731         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
9732         VEC_PACK_FLOAT_EXPR): New tree codes.
9733         * tree-pretty-print.c (op_code_prio): Handle
9734         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
9735         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
9736         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
9737         * tree-inline.c (estimate_operator_cost): Likewise.
9738         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
9739         * fold-const.c (const_binop): Likewise.
9740         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
9741         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
9742         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
9743         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
9744         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
9745         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
9746         * expr.c (expand_expr_real_2): Likewise.
9747         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
9748         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
9749         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
9750         optabs.
9751         * optabs.c (expand_widen_pattern_expr): For
9752         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
9753         sign from result type rather than operand's type.
9754         (expand_binop_directly): For vec_packu_float_optab and
9755         vec_packs_float_optab allow result type to be different from operand's
9756         type.
9757         * optabs-tree.c (optab_for_tree_code): Handle
9758         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
9759         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
9760         * tree-vect-generic.c (expand_vector_operations_1):  Handle
9761         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
9762         VEC_PACK_FLOAT_EXPR.
9763         * tree-vect-stmts.c (supportable_widening_operation): Handle
9764         FIX_TRUNC_EXPR.
9765         (supportable_narrowing_operation): Handle FLOAT_EXPR.
9766         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
9767         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
9768         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
9769         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
9770         mode attributes.
9771         (vec_pack<floatprefix>_float_<mode>): New expander.
9772         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
9773         attributes.
9774         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
9775         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
9776         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
9777         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
9778         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
9779         Document.
9780         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
9781         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
9782         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
9783         VEC_PACK_FLOAT_EXPR): Document.
9785 2018-05-29  Richard Biener  <rguenther@suse.de>
9787         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
9788         member.
9789         (stmt_vec_info_vec): Make pointer.
9790         (init_stmt_vec_info_vec): Remove.
9791         (free_stmt_vec_info_vec): Likewise.
9792         (set_stmt_vec_info_vec): New function.
9793         (free_stmt_vec_infos): Likewise.
9794         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
9795         (set_vinfo_for_stmt): Likewise.
9796         (get_earlier_stmt): Likewise.
9797         (get_later_stmt): Likewise.
9798         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
9799         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
9800         (vec_info::~vec_info): Free stmt_vec_infos.
9801         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
9802         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
9803         (pass_slp_vectorize::execute): Likewise.
9804         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
9805         (free_stmt_vec_info_vec): Likewise.
9806         (set_stmt_vec_info_vec): New function.
9807         (free_stmt_vec_infos): Likewise.
9808         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
9809         the global stmt_vec_info_vec.
9810         * tree-parloops.c (gather_scalar_reductions): Use
9811         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
9812         vector.
9814 2018-05-29  Richard Biener  <rguenther@suse.de>
9816         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
9818 2018-05-29  Martin Liska  <mliska@suse.cz>
9819             David Malcolm  <dmalcolm@redhat.com>
9821         * vec.c (test_reverse): New.
9822         (vec_c_tests): Add new test.
9823         * vec.h (vl_ptr>::reverse): New function.
9825 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
9827         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
9829         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
9830         and later.
9832 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9834         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
9836 2018-05-28  Richard Biener  <rguenther@suse.de>
9838         PR tree-optimization/85933
9839         * tree-vect-data-refs.c (vect_record_base_alignments): Only
9840         look at stmts marked as vectorizable.
9842 2018-05-28  Richard Biener  <rguenther@suse.de>
9844         PR tree-optimization/85934
9845         * tree-vect-generic.c (expand_vector_operations_1): Hoist
9846         vector boolean check before scalar optimization.
9848 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
9850         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
9851         for armv5te.
9853 2018-05-28  Mark Wielaard  <mark@klomp.org>
9855         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
9856         if it is an expression containing a minus sign.
9858 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
9860         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
9862 2018-05-27  Paul Koning  <ni1d@arrl.net>
9864         * config/pdp11/pdp11.md (truncsihi2): Remove.
9866 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
9867             Chung-Ju Wu  <jasonwucj@gmail.com>
9869         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
9870         implementation.
9871         (unaligned_store_dw): Ditto.
9872         * config/nds32/nds32-memory-manipulation.c
9873         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
9874         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
9875         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
9876         (emit_setmem_word_loop): Rename to ...
9877         (emit_setmem_doubleword_loop): ... this.
9878         (nds32_gen_dup_4_byte_to_word_value): New function.
9879         (nds32_gen_dup_8_byte_to_double_word_value): New function.
9880         (nds32_expand_setmem_loop): Refine implementation.
9881         (nds32_expand_setmem_loop_v3m): Ditto.
9882         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
9883         pattern.
9885 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
9887         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
9889 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
9891         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
9892         (nds32_init_machine_status): Initialize machine->attr_naked_p and
9893         machine->attr_no_prologue_p.
9894         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
9895         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
9896         (nds32_expand_epilogue): Consider attr_naked_p.
9897         (nds32_expand_epilogue_v3pop): Likewise.
9898         (nds32_can_use_return_insn): Likewise.
9899         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
9900         attr_no_prologue_p fields.
9901         * config/nds32/nds32.opt (mret-in-naked-func): New option.
9903 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
9905         PR target/85918
9906         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
9907         attributes.
9908         * config/i386/sse.md
9909         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
9910         Rename to ...
9911         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
9912         ... this.
9913         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
9914         Rename to ...
9915         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
9916         ... this.
9917         (*<floatsuffix>floatv2div2sf2): Rename to ...
9918         (*float<floatunssuffix>v2div2sf2): ... this.
9919         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
9920         (float<floatunssuffix>v2div2sf2_mask): ... this.
9921         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
9922         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
9923         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
9924         to ...
9925         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
9926         ... this.
9927         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
9928         Rename to ...
9929         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
9930         ... this.
9931         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
9932         Rename to ...
9933         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
9934         ... this.
9935         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
9936         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
9937         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
9938         gen_ufix_truncv8dfv8si2.
9939         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
9940         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
9941         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
9942         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
9943         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
9944         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
9945         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
9946         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
9948 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
9950         PR target/85900
9951         PR target/85345
9952         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
9954 2018-05-25  Jim Wilson  <jimw@sifive.com>
9956         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
9957         * config/riscv/riscv.c (struct machine_function): Add
9958         interrupt_handler_p and attribute_checked_p fields.
9959         (riscv_attribute_table): Add interrupt.
9960         (riscv_interrupt_type_p): New.
9961         (riscv_save_reg_p): Save extra regs for interrupt handler.
9962         (riscv_use_save_libcall): Return false  for interrupt handler.
9963         (riscv_first_stack_step): Add forward declaration.
9964         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
9965         for interrupt handler with large frame.  Use it for saved reg list.
9966         (riscv_expand_prologue): Move flag_stack_usage_info support to
9967         eliminate duplication.
9968         (riscv_expand_epilogue): Generate mret for interrupt handler.
9969         (riscv_epilogue_uses): New.
9970         (riscv_can_use_return_insn): Return false for interrupt handler.
9971         (riscv_function_ok_for_sibcall): Likewise.
9972         (riscv_set_current_function): Add interrupt handler support.
9973         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
9974         * config/riscv/riscv.md (UNSPECV_MRET): New.
9975         (GP_REGNUM): New.
9976         (riscv_frflags, riscv_fsflags): Use tab after opcode.
9977         (riscv_mret): New.
9978         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
9980 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
9982         PR tree-optimization/85712
9983         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
9984         this candidate has already been replaced in-situ by a copy.
9986 2018-05-25  Jason Merrill  <jason@redhat.com>
9988         PR c++/80485 - inline function non-zero address.
9989         * symtab.c (nonzero_address): Check DECL_COMDAT.
9991 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
9993         PR target/83628
9994         * config/alpha/alpha.md (ashlsi3): New insn pattern.
9995         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
9996         extension of SImode operation.  Use const123_operand predicate.
9997         (*saddsi_1): Remove.
9998         (*saddl_se_1): Ditto.
9999         (*ssubsi_1): Ditto.
10000         (*ssubl_se_1): Ditto.
10001         * config/alpha/predicates.md (const123_operand): New predicate.
10002         * config/alpha/constraints.md (P): Use IN_RANGE.
10004 2018-05-25  Richard Biener  <rguenther@suse.de>
10006         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
10007         defaulted to true.
10008         (ref_maybe_used_by_stmt_p): Likewise.
10009         (stmt_may_clobber_ref_p): Likewise.
10010         (stmt_may_clobber_ref_p_1): Likewise.
10011         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
10012         and pass it along.
10013         (ref_maybe_used_by_stmt_p): Likewise.
10014         (stmt_may_clobber_ref_p): Likewise.
10015         (stmt_may_clobber_ref_p_1): Likewise.
10016         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
10017         the alias oracle to disambiguate DRs with stmts DR analysis
10018         couldn't handle.
10019         (vect_analyze_data_refs): Do not give up on not analyzable
10020         DRs for BB vectorization.  Remove code truncating the dataref
10021         vector.
10023 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
10025         PR target/85832
10026         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10027         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
10028         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
10030 2018-05-25  Richard Biener  <rguenther@suse.de>
10032         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
10033         function, combining stmt data ref gathering and fatal analysis
10034         parts.
10035         (vect_analyze_data_refs): Remove now redudnant code and simplify.
10036         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
10037         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
10038         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
10039         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
10041 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
10043         PR tree-optimization/85720
10044         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
10045         SCC if all partitions are builtins.
10046         (version_loop_by_alias_check): New parameter.  Generate cancelable
10047         runtime alias check if all partitions are builtins.
10048         (distribute_loop): Update call to above function.
10050 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
10052         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
10053         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
10054         (parm_default_def_partition_arg): Ditto.
10055         (set_parm_default_def_partition): Ditto.
10056         (get_parm_default_def_partitions): Ditto and make it static.
10057         (get_undefined_value_partitions): Ditto and make it static.
10058         (remove_ssa_form): Refactor call to init_var_map here.
10059         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
10060         computation for loop region.
10061         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
10062         (register_default_def): Delete.
10063         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
10064         (parm_default_def_partition_arg): Ditto.
10065         (set_parm_default_def_partition): Ditto.
10066         (get_parm_default_def_partitions): Ditto and make it static.
10067         (get_undefined_value_partitions): Ditto and make it static.
10068         (coalesce_with_default, coalesce_with_default): Update comment.
10069         (create_coalesce_list_for_region): New func factored out from
10070         create_outofssa_var_map.
10071         (populate_coalesce_list_for_outofssa): New func factored out from
10072         create_outofssa_var_map and coalesce_ssa_name.
10073         (create_outofssa_var_map): Delete.
10074         (coalesce_ssa_name): Refactor to support live range computation.
10075         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
10076         (get_parm_default_def_partitions): Delete.
10077         (get_undefined_value_partitions): Ditto.
10078         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
10079         computation for loop region.
10080         (new_tree_live_info, loe_visit_block): Ditto.
10081         (live_worklist, set_var_live_on_entry): Ditto.
10082         (calculate_live_on_exit, verify_live_on_entry): Ditto.
10083         * tree-ssa-live.h (struct _var_map): New fields.
10084         (init_var_map): Change decl.
10085         (region_contains_p): New.
10087 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
10089         * tree-ssa-live.h (live_merge_and_clear): Delete.
10091 2018-05-25  Richard Biener  <rguenther@suse.de>
10093         PR c++/85912
10094         * tree-dump.c (dequeue_and_dump): Remove access to removed
10095         operand 2 of a SWITCH_EXPR.
10097 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
10099         * doc/sourcebuild.texi (vect_double_cond_arith): Include
10100         multiplication and division.
10101         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
10102         (cond_udiv@var{m}, cond_umod@var{m}): Document.
10103         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
10104         (cond_udiv_optab, cond_umod_optab): New optabs.
10105         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
10106         (IFN_COND_RDIV): New internal functions.
10107         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
10108         TRUNC_MOD_EXPR and RDIV_EXPR.
10109         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
10110         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
10111         New unspecs.
10112         (SVE_INT_BINARY): Include mult.
10113         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
10114         (optab, sve_int_op): Handle mult.
10115         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
10116         UNSPEC_COND_DIV.
10117         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
10118         for SVE_INT_BINARY_SD.
10120 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
10122         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
10123         (optab, sve_int_op): Handle div and udiv.
10124         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
10125         for SVE_INT_BINARY_SD.
10126         (*<optab><mode>3): New insn for the same.
10128 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
10130         * tree-vect-patterns.c: Include predict.h.
10131         (vect_recog_divmod_pattern): Restrict check for division support
10132         to when optimizing for size.
10134 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
10136         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
10137         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
10138         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
10139         (gimple_match_op::set_op): Likewise.
10140         (gimple_resimplify4): Declare.
10141         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
10142         (expr::gen_transform): Likewise.
10143         (decision_tree::gen): Generate a simplification routine for 4 operands.
10144         * gimple-match-head.c (gimple_simplify): Add an overload for
10145         4 operands.  In the top-level function, handle up to 4 call
10146         arguments and call gimple_resimplify4.
10147         (gimple_resimplify4): New function.
10148         (build_call_internal): Pass a fourth operand.
10149         (maybe_push_to_seq): Likewise.
10150         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
10151         Fold VEC_COND_EXPRs of an operation and a default value into
10152         an IFN_COND_* function if possible.
10153         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
10154         New unspecs.
10155         (SVE_COND_FP_BINARY): Include them.
10156         (optab, sve_fp_op): Handle them.
10157         (SVE_INT_BINARY_REV): New code iterator.
10158         (SVE_COND_FP_BINARY_REV): New int iterator.
10159         (commutative): New int attribute.
10160         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
10161         Declare.
10162         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
10163         function.
10164         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
10165         (*cond_<optab><mode>): New patterns for reversed operands.
10167 2018-05-25  Richard Biener  <rguenther@suse.de>
10169         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
10170         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
10171         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
10172         (STMT_VINFO_GROUPED_ACCESS): Adjust.
10173         * tree-vect-data-refs.c (everywhere): Adjust users.
10174         * tree-vect-loop.c (everywhere): Likewise.
10175         * tree-vect-slp.c (everywhere): Likewise.
10176         * tree-vect-stmts.c (everywhere): Likewise.
10177         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
10179 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10181         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
10182         Rename to...
10183         (gcc_cv_as_section_exclude): ... this.
10184         Try Solaris as #exclude syntax.
10185         * configure: Regenerate.
10186         * config.in: Regenerate.
10187         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
10188         SECTION_EXCLUDE.
10189         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
10190         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
10192         * varasm.c (default_elf_asm_named_section): Don't check if
10193         HAVE_GAS_SECTION_EXCLUDE is defined.
10195 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
10197         * doc/md.texi: Update the documentation of the cond_* optabs
10198         to mention the new final operand.  Fix GET_MODE_NUNITS call.
10199         Describe the scalar case too.
10200         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
10201         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
10202         instead of 2.
10203         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
10204         (get_conditional_internal_fn): Update comment.
10205         * tree-vect-loop.c (vectorizable_reduction): Pass the original
10206         accumulator value as a final argument to conditional functions.
10207         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
10208         a define_expand and add an "else" operand.  Assert for now that
10209         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
10210         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
10211         (*cond_<optab><mode>): New patterns.
10212         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
10213         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
10214         (UNSPEC_COND_EOR): Delete.
10215         (optab): Remove associated mappings.
10216         (SVE_INT_BINARY): New code iterator.
10217         (sve_int_op): Remove int attribute and add "minus" to the code
10218         attribute.
10219         (SVE_COND_INT_OP): Delete.
10220         (SVE_COND_FP_OP): Rename to...
10221         (SVE_COND_FP_BINARY): ...this.
10223 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
10225         * optabs.c (can_reuse_operands_p): New function.
10226         (maybe_legitimize_operands): Try to reuse the results for
10227         earlier operands.
10229 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
10231         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
10232         Add {q} suffix to insn mnemonic.
10234 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
10236         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
10237         (msp430_warn_func_return): New.
10239 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
10241         * fold-const.c (tree_nonzero_bits): New function.
10242         * fold-const.h (tree_nonzero_bits): Likewise.
10243         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
10244         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
10246 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
10248         PR target/85900
10249         PR target/85345
10250         * varasm.c (assemble_alias): Check ifunc_resolver only on
10251         FUNCTION_DECL.
10253 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
10255         PR target/85903
10256         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
10257         when memory input operand is handled.
10259 2018-05-24  Luis Machado  <luis.machado@linaro.org>
10261         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
10262         global.
10263         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
10265 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
10267         * match.pd: Delay FMA folds until after vectorization.
10269 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
10271         PR target/83009
10272         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10273         address check not strict.
10275 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
10277         * gimple-match.h (gimple_match_op): New class.
10278         (mprts_hook): Replace parameters with a gimple_match_op *.
10279         (maybe_build_generic_op): Likewise.
10280         (gimple_simplified_result_is_gimple_val): Replace parameters with
10281         a const gimple_match_op *.
10282         (gimple_simplify): Replace code_helper * and tree * parameters with
10283         a gimple_match_op * parameter.
10284         (gimple_resimplify1): Replace code_helper *, tree and tree *
10285         parameters with a gimple_match_op * parameter.
10286         (gimple_resimplify2): Likewise.
10287         (gimple_resimplify3): Likewise.
10288         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
10289         parameters with a gimple_match_op * parameter.
10290         * gimple-match-head.c (gimple_simplify): Change prototypes of
10291         auto-generated functions to take a gimple_match_op * instead of
10292         separate code_helper * and tree * parameters.  Make the same
10293         change in the top-level overload and update calls to the
10294         gimple_resimplify routines.  Update calls to the auto-generated
10295         functions and to maybe_push_res_to_seq in the publicly-facing
10296         operation-specific gimple_simplify overloads.
10297         (gimple_match_op::MAX_NUM_OPS): Define.
10298         (gimple_resimplify1): Replace rcode and ops with a single res_op
10299         parameter.  Update call to gimple_simplify.
10300         (gimple_resimplify2): Likewise.
10301         (gimple_resimplify3): Likewise.
10302         (mprts_hook): Replace parameters with a gimple_match_op *.
10303         (maybe_build_generic_op): Likewise.
10304         (build_call_internal): Replace type, nargs and ops with
10305         a gimple_match_op *.
10306         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
10307         with a single gimple_match_op *.  Update calls to mprts_hook,
10308         build_call_internal and gimple_simplified_result_is_gimple_val.
10309         Factor out code that is common to the tree_code and combined_fn cases.
10310         * genmatch.c (expr::gen_transform): Replace tem_code and
10311         tem_ops with a gimple_match_op called tem_op.  Update calls
10312         to the gimple_resimplify functions and maybe_push_res_to_seq.
10313         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
10314         res_ops.  Update call to the gimple_resimplify functions.
10315         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
10316         (decision_tree::gen): Make the functions take a gimple_match_op *
10317         called res_op instead of separate res_code and res_ops parameters.
10318         Update call accordingly.
10319         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
10320         and ops with a single res_op parameter.  Update calls to
10321         maybe_build_generic_op and maybe_push_res_to_seq.
10322         (fold_stmt_1): Update calls to gimple_simplify and
10323         replace_stmt_with_simplification.
10324         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
10325         and gimple_simplified_result_is_gimple_val.
10326         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
10327         gimple_simplify.
10328         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
10329         with a gimple_match_op *.
10330         (vn_nary_build_or_lookup): Likewise.  Update call to
10331         vn_nary_build_or_lookup_1.
10332         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
10333         gimple_match_op *.  Update calls to the gimple_resimplify routines
10334         and to gimple_simplified_result_is_gimple_val.
10335         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
10336         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
10337         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
10338         (visit_nary_op): Likewise.
10339         (visit_reference_op_load): Likewise.
10341 2018-05-23  Luis Machado  <luis.machado@linaro.org>
10343         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
10344         modifier for printing the step amount.
10346 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
10348         PR target/78849
10349         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
10350         types.
10352 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
10354         * doc/sourcebuild.texi (Endianness): New subsubsection.
10356 2018-05-23  Luis Machado  <luis.machado@linaro.org>
10358         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10359         <prefetch_dynamic_strides>: New const bool field.
10360         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10361         prefetch_dynamic_strides.
10362         (exynosm1_prefetch_tune): Likewise.
10363         (thunderxt88_prefetch_tune): Likewise.
10364         (thunderx_prefetch_tune): Likewise.
10365         (thunderx2t99_prefetch_tune): Likewise.
10366         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
10367         false.
10368         (aarch64_override_options_internal): Update to set
10369         PARAM_PREFETCH_DYNAMIC_STRIDES.
10370         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10371         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10372         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10373         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10374         prefetch-dynamic-strides setting.
10376 2018-05-23  Luis Machado  <luis.machado@linaro.org>
10378         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10379         <minimum_stride>: New const int field.
10380         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10381         minimum_stride field defaulting to -1.
10382         (exynosm1_prefetch_tune): Likewise.
10383         (thunderxt88_prefetch_tune): Likewise.
10384         (thunderx_prefetch_tune): Likewise.
10385         (thunderx2t99_prefetch_tune): Likewise.
10386         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
10387         <default_opt_level>: Set to 3.
10388         (aarch64_override_options_internal): Update to set
10389         PARAM_PREFETCH_MINIMUM_STRIDE.
10390         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10391         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10392         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10393         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10394         stride is constant and is below the minimum stride threshold.
10396 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10398         * config/arm/arm-cpus.in (mode26): Delete.
10399         (armv4): Delete mode26 reference.
10400         * config/arm/arm.c (arm_configure_build_target): Delete use of
10401         isa_bit_mode26.
10403 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
10405         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
10406         New insn pattern.
10407         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
10408         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
10409         for non-SSE modes.
10410         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
10411         (floatunsdidf2): Ditto.
10413 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
10415         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
10416         (fixuns_trunc<mode>si2_avx512f): Ditto.
10417         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
10418         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
10419         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
10421 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
10423         PR rtl-optimization/79985
10424         * df-scan.c (df_insn_refs_collect): Remove special case for
10425         global registers and asm statements.
10427 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
10429         * extend.texi (Global Register Variables): Rewrite the bullet list.
10430         Note that the register is available for allocation. Note that access
10431         via inline asm must use constraints. Add note about async-signal
10432         handlers. Remove paragraph about automagic register selection.
10434 2018-05-23  Richard Biener  <rguenther@suse.de>
10436         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
10437         of fixed offset from memset VN.
10439 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
10441         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
10442         first_interp field.
10443         (alloc_cand_and_find_basis): Initialize first_interp field.
10444         (slsr_process_mul): Modify first_interp field.
10445         (slsr_process_add): Likewise.
10446         (slsr_process_cast): Modify first_interp field for each new
10447         interpretation.
10448         (slsr_process_copy): Likewise.
10449         (dump_candidate): Dump first_interp field.
10450         (replace_mult_candidate): Process all interpretations, not just
10451         subsequent ones.
10452         (replace_rhs_if_not_dup): Likewise.
10453         (replace_one_candidate): Likewise.
10455 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
10457         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
10458         Add new boolean.
10459         (aarch64_needs_frame_chain): New function.
10460         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
10462 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
10464         PR target/84882
10465         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
10466         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
10467         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
10468         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
10469         as true for strict-align.
10470         (aarch64_can_inline_p): Perform checks even when callee has no
10471         attributes to check for strict alignment.
10472         * doc/extend.texi (AArch64 Function Attributes): Document
10473         no-strict-align.
10474         * doc/invoke.texi: (AArch64 Options): Likewise.
10476 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
10478         PR tree-optimization/85853
10479         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
10480         the handling of the root of the node to...
10481         (vect_slp_analyze_node_operations_1): ...this new function,
10482         and run the whole thing with the child nodes' def types
10483         set according to their SLP node's def type.
10485 2018-05-23  Richard Biener  <rguenther@suse.de>
10487         PR middle-end/85874
10488         * tree-data-ref.c (create_runtime_alias_checks): Defer
10489         and ignore overflow warnings.
10491 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
10493         PR tree-optimization/85822
10494         * tree-vrp.c (is_masked_range_test): Fix handling of negative
10495         constants.
10497 2018-05-23  Richard Biener  <rguenther@suse.de>
10499         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
10500         memset constants via native_interpret_expr.
10502 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
10504         PR target/85345
10505         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
10506         attribute.
10507         (cgraph_node::create_alias): Likewise.
10508         (cgraph_node::get_availability): Check ifunc_resolver instead
10509         of looking up ifunc attribute.
10510         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
10511         * varasm.c (do_assemble_alias): Likewise.
10512         (assemble_alias): Likewise.
10513         (default_binds_local_p_3): Likewise.
10514         * cgraph.h (cgraph_node): Add ifunc_resolver.
10515         (cgraph_node::only_called_directly_or_aliased_p): Return false
10516         for IFUNC resolver.
10517         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
10518         attribute.
10519         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
10520         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
10521         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
10522         instead of looking up ifunc attribute.
10524 2018-05-22  Luis Machado  <luis.machado@linaro.org>
10526         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
10528 2018-05-22  Martin Sebor  <msebor@redhat.com>
10530         PR middle-end/85359
10531         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
10532         only when expasion succeeds.
10533         (expand_builtin_strcmp): Same.
10534         (expand_builtin_strncmp): Same.
10536 2018-05-22  Martin Sebor  <msebor@redhat.com>
10538         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
10540 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
10541             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10543         * config/aarch64/aarch64-ldpstp.md: Replace uses of
10544         aarch64_mem_pair_operand with memory_operand and delete operand swapping
10545         code.
10546         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
10547         Add check for legitimate_address.
10548         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
10549         (aarch64_swap_ldrstr_operands): New.
10550         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
10551         Define prototype.
10553 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
10554             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10556         * config/aarch64/aarch64.md: New patterns to generate stp
10557         and ldp.
10558         (store_pair_sw, store_pair_dw): New patterns to generate stp for
10559         single words and double words.
10560         (load_pair_sw, load_pair_dw): Likewise.
10561         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
10562         Delete.
10563         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
10564         Delete.
10565         * config/aarch64/aarch64-ldpstp.md: Modify peephole
10566         for different mode ldpstp and add peephole for merged zero stores.
10567         Likewise for loads.
10568         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
10569         Add size check.
10570         (aarch64_gen_store_pair): Rename calls to match new patterns.
10571         (aarch64_gen_load_pair): Rename calls to match new patterns.
10572         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
10573         (load_pair<DREG:mode><DREG2:mode>): ... This.
10574         (store_pair<mode>): Rename to...
10575         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
10576         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
10577         New mode iterators.
10578         (V_INT_EQUIV): Handle SImode.
10579         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
10580         New predicate.
10582 2018-05-22  Martin Sebor  <msebor@redhat.com>
10584         PR c/85623
10585         * calls.c (maybe_warn_nonstring_arg): Use string length to set
10586         or ajust the presumed bound on an operation to avoid unnecessary
10587         warnings.
10589 2018-05-22  Martin Sebor  <msebor@redhat.com>
10591         PR tree-optimization/85826
10592         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
10593         assuming that a DECL necesarily has a constant size.
10595 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
10597         PR middle-end/85862
10598         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
10600 2018-05-22  Richard Biener  <rguenther@suse.de>
10602         PR tree-optimization/85834
10603         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
10604         non-constant and non-zero memset arguments.
10606 2018-05-22  Martin Liska  <mliska@suse.cz>
10608         PR ipa/85607
10609         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
10611 2018-05-22  Richard Biener  <rguenther@suse.de>
10613         PR tree-optimization/85863
10614         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
10615         comparisons when vectype is specified.
10616         (vectorizable_condition): Do not specify vectype for
10617         vect_is_simple_cond when SLP vectorizing.
10619 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
10621         PR target/85657
10622         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
10623         define __ibm128 as long double.
10624         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
10625         as a distinct type when IEEE 128-bit support is enabled.
10626         (init_float128_ieee): Fix up conversions between IFmode and IEEE
10627         128-bit types to use the correct functions.
10628         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
10629         convert between 128-bit floating point types that have different
10630         modes but the same representation, instead of using gen_lowpart to
10631         makean alias.
10632         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
10633         KFmode.
10634         (IFKF_reg): New attributes to give the register constraints for
10635         IFmode and KFmode.
10636         (extend<mode>tf2_internal): New insns to mark an explicit
10637         conversion between 128-bit floating point types that have a
10638         different mode but share the same representation.
10640 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
10642         PR tree-optimization/85814
10643         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
10644         a null return from get_strinfo when unsharing the next
10645         strinfo in the chain.
10647 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10649         PR gcc/84923
10650         * varasm.c (weak_finish): Clean up weak_decls.
10652 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10654         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
10655         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
10656         UNSPEC_UADALP values.
10657         * config/aarch64/iterators.md (ABAL): New int iterator.
10658         (ABDL2): Likewise.
10659         (ADALP): Likewise.
10660         (sur): Add mappings for the above.
10661         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
10662         New define_insn.
10663         (aarch64_<sur>abal<mode>_4): Likewise.
10664         (aarch64_<sur>adalp<mode>_3): Likewise.
10665         (<sur>sadv16qi): New define_expand.
10667 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
10669         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
10670         (*movdf_internal): Ditto.
10671         (*rcpsf2_sse): Ditto.
10672         (*rsqrtsf2_sse): Ditto.
10673         (*sqrt<mode>2_sse): Ditto.
10675 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
10677         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
10678         eor3q<mode>4.
10679         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
10680         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
10681         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
10682         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
10683         vbcaxq_s64): New.
10684         * config/aarch64/arm_neon.h: Likewise.
10685         * config/aarch64/iterators.md (VQ_I): New.
10687 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
10689         * config.gcc: Add arc/t-multilib-linux to tmake_file for
10690         arc*-*-linux*.
10691         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
10692         MULTILIB_DIRNAMES
10694 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
10696         * config/nds32/constraints.md (S): New constraint.
10697         * config/nds32/nds32.md (call_internal): Use constraint S.
10698         (call_value_internal): Likewise.
10699         (sibcall_internal): Likewise.
10700         (sibcall_value_internal): Likewise.
10702 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
10703             Chung-Ju Wu  <jasonwucj@gmail.com>
10705         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
10706         into consideration.
10708 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
10709             Chung-Ju Wu  <jasonwucj@gmail.com>
10711         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
10712         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
10713         (nds32_rtx_costs_impl): Simplify.
10714         (nds32_address_cost_impl): Simplify.
10715         (nds32_init_rtx_costs): New function.
10716         (nds32_rtx_costs_speed_prefer): Likewise.
10717         (nds32_rtx_costs_size_prefer): Likewise.
10718         (nds32_address_cost_speed_prefer): Likewise.
10719         (nds32_address_cost_speed_fwprop): Likewise.
10720         (nds32_address_cost_size_prefer): Likewise.
10721         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
10722         * config/nds32/nds32.c (nds32_option_override): Use
10723         nds32_init_rtx_costs function.
10725 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
10727         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
10728         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
10729         (TARGET_PIPELINE_N8): Likewise.
10730         (TARGET_PIPELINE_N10): Likewise.
10731         (TARGET_PIPELINE_N13): Likewise.
10732         (TARGET_PIPELINE_GRAYWOLF): Likewise.
10734 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
10736         * config/nds32/nds32-fpu.md: Update copyright year.
10738 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10740         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
10742 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10744         * config/nds32/nds32.c
10745         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
10746         * config/nds32/nds32.opt (minline-asm-r15): New option.
10748 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10750         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
10751         MASK_HW_ABS.
10752         * config/nds32/nds32.md (abssi2): New pattern.
10754 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
10756         * config/i386/i386.md (rex64namesuffix): New mode attribute.
10757         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
10758         Merge insn pattern from sse_cvtsi2ss<round_name> and
10759         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
10760         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
10761         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
10762         using SWI48 mode iterator.
10763         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
10764         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
10765         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
10766         pattern from sse_cvttss2si<round_saeonly_name>
10767         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
10768         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
10769         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
10770         using SWI48 mode iterator.
10771         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
10772         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
10773         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
10774         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
10775         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
10776         using SWI48 mode iterator.
10777         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
10778         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
10779         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
10780         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
10781         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
10782         SWI48 mode iterator.
10783         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
10784         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
10785         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
10786         pattern from sse_cvttsd2si<round_saeonly_name>
10787         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
10789 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10791         * config/nds32/nds32-md-auxiliary.c
10792         (nds32_valid_smw_lwm_base_p): Refine.
10793         (nds32_output_smw_single_word): Refine.
10794         (nds32_output_smw_double_word): New.
10795         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
10797 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10799         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
10800         (nds32_output_stack_pop): Refine.
10801         (nds32_expand_unaligned_load): Refine.
10802         (nds32_expand_unaligned_store): Refine.
10804 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
10805             Chung-Ju Wu  <jasonwucj@gmail.com>
10807         * config/nds32/constants.md: Add TP_REGNUM constant.
10808         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
10809         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
10810         UNSPEC_ADD32.
10811         * config/nds32/nds32-doubleword.md: Consider flag_pic.
10812         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
10813         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
10814         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
10815         and PIC code generation.
10816         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
10817         code generation.
10818         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
10819         optimization.
10820         * config/nds32/nds32.md: Support TLS and PIC.
10821         * config/nds32/nds32.c: Support TLS and PIC.
10822         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
10823         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
10824         predicate.
10826 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10828         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
10829         mode with E_ prefix.
10831 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
10832             Chung-Ju Wu  <jasonwucj@gmail.com>
10834         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
10835         * config/nds32/nds32-md-auxiliary.c
10836         (symbolic_reference_mentioned_p): New.
10837         (nds32_legitimize_ict_address): New.
10838         (nds32_expand_ict_move): New.
10839         (nds32_indirect_call_referenced_p): New.
10840         (nds32_symbol_binds_local_p): Delete.
10841         (nds32_long_call_p): Modify.
10842         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
10843         * config/nds32/nds32-protos.h
10844         (symbolic_reference_mentioned_p): Declare.
10845         (nds32_legitimize_ict_address): Declare.
10846         (nds32_expand_ict_move): Declare.
10847         (nds32_indirect_call_referenced_p): Declare.
10848         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
10849         (nds32_relax_group): Use nds32_ict_const_p as condition.
10850         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
10851         (nds32_asm_file_start): Output ict_model directive in asm code.
10852         (nds32_legitimate_address_p): Consider indirect call.
10853         (nds32_print_operand): Consider indirect call.
10854         (nds32_print_operand_address): Consider indirect call.
10855         (nds32_insert_attributes): Handle "indirect_call" attribute.
10856         (TARGET_LEGITIMATE_ADDRESS_P): Define.
10857         (TARGET_LEGITIMATE_CONSTANT_P): Define.
10858         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
10859         (TARGET_DELEGITIMIZE_ADDRESS): Define.
10860         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
10861         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
10862         (TARGET_ICT_MODEL_SMALL): Define.
10863         (TARGET_ICT_MODEL_LARGE): Define.
10864         * config/nds32/nds32.md (movsi): Consider ict model.
10865         (call, call_value): Consider ict model.
10866         (sibcall, sibcall_value): Consider ict model.
10867         * config/nds32/nds32.opt (mict-model): New option.
10868         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
10869         model.
10871 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
10872             Monk Chiang  <sh.chiang04@gmail.com>
10873             Jim Wilson <jimw@sifive.com>
10875         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
10876         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
10877         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
10878         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
10879         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
10880         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
10881         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
10882         compute save_libcall_adjustment properly.
10883         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
10884         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
10885         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
10886         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
10887         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
10888         (ABI_SPEC): Handle mabi=ilp32e.
10889         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
10890         (RVE): Add RVE mask.
10891         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
10892         <-march>: Add rv32e as an example.
10894 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
10896         PR c++/82899
10897         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
10898         (intra_create_variable_infos): Handle C++ constructors.
10900 2018-05-18  Martin Liska  <mliska@suse.cz>
10902         * passes.def: Remove a redundant pass.
10904 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
10906         PR bootstrap/85838
10907         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
10909 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10911         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
10912         (ARMv4): Update.
10913         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
10914         (ARMv6m): Update.
10915         (armv2, armv2a, armv3, armv3m): Delete architectures.
10916         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
10917         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
10918         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
10919         Delete cpus.
10920         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
10921         (*mulsidi3adddi): Likewise.
10922         (mulsidi3): Likewise.
10923         (*mulsidi3_nov6): Likewise.
10924         (umulsidi3): Likewise.
10925         (umulsidi3_nov6): Likewise.
10926         (umaddsidi4): Likewise.
10927         (*umulsidi3adddi): Likewise.
10928         (smulsi3_highpart): Likewise.
10929         (*smulsi3_highpart_nov6): Likewise.
10930         (umulsi3_highpart): Likewise.
10931         (*umulsi3_highpart_nov6): Likewise.
10932         * config/arm/arm.h (arm_arch3m): Delete.
10933         * config/arm/arm.c (arm_arch3m): Delete.
10934         (arm_option_override_internal): Update armv3-related comment.
10935         (arm_configure_build_target): Delete use of isa_bit_mode32.
10936         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
10937         (arm_rtx_costs_internal): Delete check of arm_arch3m.
10938         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
10939         (mulsa3): Likewise.
10940         (mulusa3): Likewise.
10941         * config/arm/arm-protos.h (arm_arch3m): Delete.
10942         * config/arm/arm-tables.opt: Regenerate.
10943         * config/arm/arm-tune.md: Likewise.
10944         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
10945         deleted architectures.
10947 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10949         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
10950         (armv5t, armv5te): New features.
10951         (ARMv5, ARMv5e): Delete fgroups.
10952         (ARMv5t, ARMv5te): Adjust for above changes.
10953         (ARMv6m): Likewise.
10954         (armv5, armv5e): Delete arches.
10955         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
10956         arm_arch5.
10957         (*call_reg_arm): Likewise.
10958         (*call_value_reg_armv5): Likewise.
10959         (*call_value_reg_arm): Likewise.
10960         (*call_symbol): Likewise.
10961         (*call_value_symbol): Likewise.
10962         (*sibcall_insn): Likewise.
10963         (*sibcall_value_insn): Likewise.
10964         (clzsi2): Likewise.
10965         (prefetch): Likewise.
10966         (define_split and define_peephole2 dependent on arm_arch5):
10967         Likewise.
10968         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
10969         arm_arch5e.
10970         (TARGET_ARM_QBIT): Likewise.
10971         (TARGET_DSP_MULTIPLY): Likewise.
10972         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
10973         (arm_arch5, arm_arch5e): Delete.
10974         (arm_arch5t, arm_arch5te): Declare.
10975         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
10976         (arm_arch5t): Declare.
10977         (arm_option_reconfigure_globals): Update for the above.
10978         (arm_options_perform_arch_sanity_checks): Update comment, replace
10979         use of arm_arch5 with arm_arch5t.
10980         (use_return_insn): Likewise.
10981         (arm_emit_call_insn): Likewise.
10982         (output_return_instruction): Likewise.
10983         (arm_final_prescan_insn): Likewise.
10984         (arm_coproc_builtin_available): Likewise.
10985         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
10986         arm_arch5e with arm_arch5t and arm_arch5te.
10987         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
10988         (arm_arch5t, arm_arch5te): Declare.
10989         * config/arm/arm-tables.opt: Regenerate.
10990         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
10991         * config/arm/t-multilib: Likewise.
10992         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
10993         instead of arm_arch5.
10994         (*call_reg_thumb1): Likewise.
10995         (*call_value_reg_thumb1_v5): Likewise.
10996         (*call_value_reg_thumb1): Likewise.
10997         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
10998         unreachable path.
10999         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
11001 2018-05-18  Martin Liska  <mliska@suse.cz>
11003         PR gcov-profile/84846
11004         * doc/gcov.texi: Document -t option of gcov tool.
11006 2018-05-18  Martin Liska  <mliska@suse.cz>
11008         PR gcov-profile/84846
11009         * gcov.c (print_usage): Add new -t option.
11010         (process_args): Handle the option.
11011         (generate_results): Use stdout as output when requested by
11012         the option.
11014 2018-05-18  Martin Liska  <mliska@suse.cz>
11016         PR gcov-profile/84846
11017         * coverage.c (coverage_init): Write PWD to .gcno file.
11018         * doc/gcov.texi: Document how working directory is printed.
11019         * gcov-dump.c (dump_gcov_file): Print PWD.
11020         * gcov.c (output_intermediate_file): Likewise.
11021         (read_graph_file): Read PWD string.
11022         (output_lines): Print PWD.
11024 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11026         PR middle-end/85817
11027         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
11028         for retval and return false if all args to phi are zero.
11030 2018-05-18  Richard Biener  <rguenther@suse.de>
11032         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
11033         method.
11034         (evrp_dom_walker::before_dom_children): Call it.
11036 2018-05-18  Richard Biener  <rguenther@suse.de>
11038         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
11039         results when processing array refs with variable index.
11041 2018-05-18  Toon Moene  <toon@moene.org>
11043         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
11044         directly after that of -floop-interchange. Indicate that both
11045         options are enabled by default when specifying -O3.
11047 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11049         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
11050         iterator.  Delete separate integer-mode vec_set<mode> expander.
11051         (aarch64_simd_vec_setv2di): Delete.
11052         (vec_setv2di): Delete.
11053         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
11054         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
11055         the "w, r" alternative.
11057 2018-05-18  Martin Liska  <mliska@suse.cz>
11059         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
11060         * tree-pass.h (make_pass_lower_switch_O0): New function.
11061         * tree-switch-conversion.c (node_has_low_bound): Remove.
11062         (node_has_high_bound): Likewise.
11063         (node_is_bounded): Likewise.
11064         (class pass_lower_switch): Make it a template type and create
11065         two instances.
11066         (pass_lower_switch::execute): Add template argument.
11067         (make_pass_lower_switch): New function.
11068         (make_pass_lower_switch_O0): New function.
11069         (do_jump_if_equal): Remove.
11070         (emit_case_nodes): Simplify to just handle all 3 cases and leave
11071         all the hard work to tree optimization passes.
11073 2018-05-18  Martin Liska  <mliska@suse.cz>
11075         * dbgcnt.c (limit_low): Renamed from limit.
11076         (limit_high): New variable.
11077         (dbg_cnt_is_enabled): Check for upper limit.
11078         (dbg_cnt): Adjust dumping.
11079         (dbg_cnt_set_limit_by_index): Add new argument for high
11080         value.
11081         (dbg_cnt_set_limit_by_name): Likewise.
11082         (dbg_cnt_process_single_pair): Parse new format.
11083         (dbg_cnt_process_opt): Use strtok.
11084         (dbg_cnt_list_all_counters): Remove 'value' and add
11085         'limit_high'.
11086         * doc/invoke.texi: Document changes.
11088 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
11090         * doc/sourcebuild.texi (scalar_all_fma): Document.
11091         * tree.def (FMA_EXPR): Delete.
11092         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
11093         * internal-fn.c (ternary_direct): New macro.
11094         (expand_ternary_optab_fn): Likewise.
11095         (direct_ternary_optab_supported_p): Likewise.
11096         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
11097         * builtins.c (fold_builtin_fma): Delete.
11098         (fold_builtin_3): Don't call it.
11099         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
11100         * expr.c (expand_expr_real_2): Likewise.
11101         * fold-const.c (operand_equal_p): Likewise.
11102         (fold_ternary_loc): Likewise.
11103         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
11104         * gimple.c (DEFTREECODE): Likewise.
11105         * gimplify.c (gimplify_expr): Likewise.
11106         * optabs-tree.c (optab_for_tree_code): Likewise.
11107         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
11108         * tree-eh.c (operation_could_trap_p): Likewise.
11109         (stmt_could_throw_1_p): Likewise.
11110         * tree-inline.c (estimate_operator_cost): Likewise.
11111         * tree-pretty-print.c (dump_generic_node): Likewise.
11112         (op_code_prio): Likewise.
11113         * tree-ssa-loop-im.c (stmt_cost): Likewise.
11114         * tree-ssa-operands.c (get_expr_operands): Likewise.
11115         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
11116         * fold-const-call.h (fold_fma): Delete.
11117         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
11118         CFN_FNMA and CFN_FNMS.
11119         (fold_fma): Delete.
11120         * genmatch.c (combined_fn): New enum.
11121         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
11122         (commutative_op): New function.
11123         (commutate): Use it.  Handle more than 2 operands.
11124         (dt_operand::gen_gimple_expr): Use commutative_op.
11125         (parser::parse_expr): Allow :c to be used with non-binary
11126         operators if the commutative operand is known.
11127         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
11128         CFN_FMS, CFN_FNMA and CFN_FNMS.
11129         (backprop::process_assign_use): Remove FMA_EXPR handling.
11130         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
11131         (gen_hsa_fma): New function.
11132         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
11133         IFN_FNMA and IFN_FNMS.
11134         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
11135         * gimple-fold.h (follow_all_ssa_edges): Declare.
11136         * gimple-fold.c (follow_all_ssa_edges): New function.
11137         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
11138         gimple_build interface and use follow_all_ssa_edges to fold the result.
11139         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
11140         instead of checking for optabs directly.
11141         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
11142         rather than FMA_EXPRs.
11143         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
11144         call to IFN_FMA instead of an FMA_EXPR.
11146 2018-05-17  Jim Wilson  <jimw@sifive.com>
11148         * expr.c (do_tablejump): When converting index to Pmode, if we have a
11149         sign extended promoted subreg, and the range does not have the sign bit
11150         set, then do a sign extend.
11152         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
11153         test, check for sign extended subreg and/or constant operands, and
11154         do a sign extend in that case.
11156 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
11158         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
11159         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
11160         Add untyped.
11161         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
11162         Change logics_shift_reg to logics_shift_imm.
11163         (thunderx2t99_fp_loadpair_basic): Delete.
11164         (thunderx2t99_fp_storepair_basic): Delete.
11165         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
11166         (thunderx2t99_asimd_polynomial): Delete.
11167         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
11168         and neon_fp_mul_d_scalar_q.
11169         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
11170         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
11171         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
11172         (thunderx2t99_asimd_lut): Add missing tbl types.
11173         (thunderx2t99_asimd_ext): Delete.
11174         (thunderx2t99_asimd_load1_1_mult): Delete.
11175         (thunderx2t99_asimd_load1_2_mult): Delete.
11176         (thunderx2t99_asimd_load1_ldp): New.
11177         (thunderx2t99_asimd_load1): New.
11178         (thunderx2t99_asimd_load2): Add missing *load2* types.
11179         (thunderx2t99_asimd_load3): New.
11180         (thunderx2t99_asimd_load4): New.
11181         (thunderx2t99_asimd_store1_1_mult): Delete.
11182         (thunderx2t99_asimd_store1_2_mult): Delete.
11183         (thunderx2t99_asimd_store2_mult): Delete.
11184         (thunderx2t99_asimd_store2_onelane): Delete.
11185         (thunderx2t99_asimd_store_stp): New.
11186         (thunderx2t99_asimd_store1): New.
11187         (thunderx2t99_asimd_store2): New.
11188         (thunderx2t99_asimd_store3): New.
11189         (thunderx2t99_asimd_store4): New.
11191 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
11193         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
11194         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
11196 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
11197             Segher Boessenkool  <segher@kernel.crashing.org>
11199         PR target/85698
11200         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
11201         operand.
11203 2018-05-17  Richard Biener  <rguenther@suse.de>
11205         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
11206         for pruning loop and prune defs feeding only already visited PHIs.
11208 2018-05-17  Richard Biener  <rguenther@suse.de>
11210         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
11212 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
11213             Richard Biener  <rguenther@suse.de>
11215         PR tree-optimization/85793
11216         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
11217         for VMAT_ELEMENTWISE.
11219 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
11221         * internal-fn.h (lookup_internal_fn): Declare
11222         * internal-fn.c (lookup_internal_fn): New function.
11223         * gimple.c (gimple_build_call_from_tree): Handle calls to
11224         internal functions.
11225         * gimple-pretty-print.c (dump_gimple_call): Print "." before
11226         internal function names.
11227         * tree-pretty-print.c (dump_generic_node): Likewise.
11228         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
11230 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
11232         * gimple-fold.h (gimple_build): Make the function forms take
11233         combined_fn rather than built_in_function.
11234         (gimple_simplify): Likewise.
11235         * gimple-match-head.c (gimple_simplify): Likewise.
11236         * gimple-fold.c (gimple_build): Likewise.
11237         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
11238         rather than gimple_build_call_internal.
11239         (get_initial_defs_for_reduction): Likewise.
11240         (vect_create_epilog_for_reduction): Likewise.
11241         (vectorizable_live_operation): Likewise.
11243 2018-05-17  Martin Liska  <mliska@suse.cz>
11245         * gimple-ssa-sprintf.c (format_directive): Do not use
11246         space in between 'G_' and '('.
11248 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
11250         PR target/85323
11251         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
11252         even if the mask is not all ones.
11254         PR target/85323
11255         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
11256         vector.
11257         (ix86_gimple_fold_builtin): Likewise.
11259         PR target/85323
11260         * config/i386/i386.c: Include tree-vector-builder.h.
11261         (ix86_vector_shift_count): New function.
11262         (ix86_fold_builtin): Fold shift builtins by scalar count.
11263         (ix86_gimple_fold_builtin): Likewise.
11265         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
11266         _mm512_setzero): New intrinsics.
11268 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
11269             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11271         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
11272         code generation for cases where splatting a value is not useful.
11273         * simplify-rtx.c (simplify_ternary_operation): Simplify
11274         vec_merge across a vec_duplicate and a paradoxical subreg forming
11275         a vector mode to a vec_concat.
11277 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
11279         * config.gcc: Support "goldmont-plus".
11280         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
11281         "goldmont-plus".
11282         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11283         PROCESSOR_GOLDMONT_PLUS.
11284         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
11285         (processor_target_table): Add "goldmont-plus".
11286         (PTA_GOLDMONT_PLUS): Define.
11287         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
11288         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
11289         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
11290         (fold_builtin_cpu): Add "goldmont-plus".
11291         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
11292         (ix86_option_override_internal): Add "goldmont-plus".
11293         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
11294         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
11295         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
11296         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
11298 2018-05-17  Richard Biener  <rguenther@suse.de>
11300         PR tree-optimization/85757
11301         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
11302         remove defs that only feed that PHI from further processing.
11304 2018-05-16  Jim Wilson  <jimw@sifive.com>
11306         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
11307         asterisk to name.
11308         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
11310 2018-05-16  Mark Wielaard  <mark@klomp.org>
11312         * dwarf2out.c (count_index_strings): New function.
11313         (output_indirect_strings): Call count_index_strings and generate
11314         header for dwarf_version >= 5.
11316 2018-05-16  Mark Wielaard  <mark@klomp.org>
11318         * dwarf2out.c (dwarf_FORM): New function.
11319         (set_indirect_string): Use dwarf_FORM.
11320         (reset_indirect_string): Likewise.
11321         (size_of_die): Likewise.
11322         (value_format): Likewise.
11323         (output_die): Likewise.
11324         (add_skeleton_AT_string): Likewise.
11325         (output_macinfo_op): Likewise.
11326         (index_string): Likewise.
11327         (output_index_string_offset): Likewise.
11328         (output_index_string): Likewise.
11329         (count_index_strings): Likewise.
11331 2018-05-16  Carl Love  <cel@us.ibm.com>
11333         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
11334         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
11336 2018-05-16  Martin Jambor  <mjambor@suse.cz>
11338         * ipa-prop.c (ipa_free_all_edge_args): Remove.
11339         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
11341 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
11343         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
11344         (fnma<mode>4): Likewise.
11345         (fms<mode>4): Likewise.
11346         (fnms<mode>4): Likewise.
11347         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
11348         (aarch64_fnma<mode>4): Likewise.
11349         (aarch64_fms<mode>4): Likewise.
11350         (aarch64_fnms<mode>4): Likewise.
11351         (aarch64_fnmadd<mode>4): Likewise.
11353 2018-05-16  Jason Merrill  <jason@redhat.com>
11355         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
11357 2018-05-16  Richard Biener  <rguenther@suse.de>
11359         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
11360         (dump_stmt_cost): Declare.
11361         (add_stmt_cost): Dump cost we add.
11362         (add_stmt_costs): New function.
11363         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
11364         No longer exported.
11365         (vect_analyze_stmt): Adjust prototype.
11366         (vectorizable_condition): Likewise.
11367         (vectorizable_live_operation): Likewise.
11368         (vectorizable_reduction): Likewise.
11369         (vectorizable_induction): Likewise.
11370         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
11371         cost vector to pass to vectorizable_ and record afterwards.
11372         (vect_model_reduction_cost): Take cost vector argument and adjust.
11373         (vect_model_induction_cost): Likewise.
11374         (vectorizable_reduction): Likewise.
11375         (vectorizable_induction): Likewise.
11376         (vectorizable_live_operation): Likewise.
11377         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
11378         SLP_TREE_NUMBER_OF_VEC_STMTS.
11379         (vect_analyze_slp_cost_1): Remove.
11380         (vect_analyze_slp_cost): Likewise.
11381         (vect_slp_analyze_node_operations): Take visited args and
11382         a target cost vector.  Avoid processing already visited stmt sets.
11383         (vect_slp_analyze_operations): Use a local cost vector to gather
11384         costs and register those of non-discarded instances.
11385         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
11386         (vect_schedule_slp_instance): Remove copying of
11387         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
11388         zero.
11389         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
11390         adding cost.  Record cost entry location.
11391         (vect_prologue_cost_for_slp_op): Function to compute cost of
11392         a constant or invariant generated for SLP vect in the prologue,
11393         split out from vect_analyze_slp_cost_1.
11394         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
11395         (vect_model_promotion_demotion_cost): Likewise.
11396         (vect_model_store_cost): Likewise, make static.
11397         (vect_model_load_cost): Likewise.
11398         (vectorizable_bswap): Add cost vector arg and adjust.
11399         (vectorizable_call): Likewise.
11400         (vectorizable_simd_clone_call): Likewise.
11401         (vectorizable_conversion): Likewise.
11402         (vectorizable_assignment): Likewise.
11403         (vectorizable_shift): Likewise.
11404         (vectorizable_operation): Likewise.
11405         (vectorizable_store): Likewise.
11406         (vectorizable_load): Likewise.
11407         (vectorizable_condition): Likewise.
11408         (vectorizable_comparison): Likewise.
11409         (can_vectorize_live_stmts): Likewise.
11410         (vect_analyze_stmt): Likewise.
11411         (vect_transform_stmt): Adjust calls to vectorizable_*.
11412         * tree-vectorizer.c: Include gimple-pretty-print.h.
11413         (dump_stmt_cost): New function.
11415 2018-05-16  Richard Biener  <rguenther@suse.de>
11417         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
11418         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
11419         * tree-ssa-dse.c: Include tree-ssa-loop.h.
11420         (check_name): New callback.
11421         (dse_classify_store): Track cycles via a visited bitmap of PHI
11422         defs and simplify handling of in-loop and across loop dead stores
11423         and properly fail for loop-variant refs.  Handle byte-tracking with
11424         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
11425         limiting the walk.
11427 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
11429         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
11430         (vect_get_mask_type_for_stmt): Likewise.
11431         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
11432         split out from...
11433         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
11434         to determine the statement's vector type and the vector type that
11435         should be used for calculating nunits.  Deal with cases in which
11436         the type has to be deferred.
11437         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
11438         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
11439         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
11440         (vect_determine_vf_for_stmt): New functions, split out from...
11441         (vect_determine_vectorization_factor): ...here.
11442         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
11443         (vect_get_mask_type_for_stmt): New functions, split out from
11444         vect_determine_vectorization_factor.
11446 2018-05-16  Richard Biener  <rguenther@suse.de>
11448         * tree-cfg.c (verify_gimple_assign_ternary): Properly
11449         verify the [VEC_]COND_EXPR embedded comparison.
11451 2018-05-15  Martin Sebor  <msebor@redhat.com>
11453         PR tree-optimization/85753
11454         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
11455         RECORD_TYPE in addition to ARRAY_TYPE.
11457 2018-05-15  Martin Sebor  <msebor@redhat.com>
11459         PR middle-end/85643
11460         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
11462 2018-05-15  Richard Biener  <rguenther@suse.de>
11464         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
11465         add by_clobber_p one.  Change algorithm to collect all defs
11466         representing uses we need to walk and try reducing them to
11467         a single one before failing.
11468         (dse_dom_walker::dse_optimize_stmt): Adjust.
11470 2018-05-13  Mark Wielaard  <mark@klomp.org>
11472         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
11473         (size_of_loc_descr): Likewise.
11474         (output_loc_operands): Likewise.
11475         (output_loc_operands_raw): Likewise.
11476         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
11477         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
11478         (hash_loc_operands): Likewise.
11479         (compare_loc_operands): Likewise.
11481 2018-05-14  Mark Wielaard  <mark@klomp.org>
11483         * dwarf2out.c (count_index_addrs): New function.
11484         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
11486 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11488         PR tree-optimization/83648
11489         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
11490         return value as malloc candidate.
11492 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11494         PR ipa/85734
11495         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
11496         param as true in call to suggest_attribute.
11498 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
11500         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
11501         -mreadonly-in-sdata.
11503 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11505         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
11506         New pattern.
11507         (aarch64_crypto_aesd_fused): Likewise.
11509 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
11511         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
11512         (movsi_aarch64): Likewise.
11513         (load_pairsi): Likewise.
11514         (load_pairdi): Likewise.
11515         (store_pairsi): Likewise.
11516         (store_pairdi): Likewise.
11517         (load_pairsf): Likewise.
11518         (load_pairdf): Likewise.
11519         (store_pairsf): Likewise.
11520         (store_pairdf): Likewise.
11521         (zero_extend): Likewise.
11522         (trunc): Swap alternatives.
11523         (fcvt_target): Add '?' to prefer w over r.
11525 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
11527         PR target/85756
11528         * config/i386/i386.md: Disallow non-commutative arithmetics in
11529         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
11530         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
11531         in the peephole2 before it.
11533 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
11535         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
11536         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
11537         (ix86_handle_option): Handle -mcldemote.
11538         * config.gcc: New header.
11539         * config/i386/cldemoteintrin.h: New file.
11540         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
11541         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
11542         -mcldemote.
11543         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11544         OPTION_MASK_ISA_CLDEMOTE.
11545         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
11546         (ix86_valid_target_attribute_inner_p): Ditto.
11547         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
11548         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
11549         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
11550         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
11551         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
11552         (cldemote): New.
11553         * config/i386/i386.opt: Add -mcldemote.
11554         * config/i386/x86intrin.h: New header.
11555         * doc/invoke.texi: Add -mcldemote.
11557 2018-05-14  Richard Biener  <rguenther@suse.de>
11559         * doc/match-and-simplify.texi: Adjust :s documentation.
11561 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
11563         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
11564         intended memcpy size.
11565         (REORDER_45): Likewise.
11567 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
11569         * sort.cc: New file.
11570         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
11571         * vec.c (qsort_chk): Use gcc_qsort.
11572         * Makefile.in (OBJS-libcommon): Add sort.o.
11573         (build/sort.o): New target.  Use it...
11574         (BUILD_RTL): ... here, and...
11575         (build/gencfn-macros): ... here, and...
11576         (build/genmatch): ... here.
11578 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
11579             Chung-Ju Wu  <jasonwucj@gmail.com>
11581         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
11582         * config/nds32/nds32-graywolf.md: New file.
11583         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
11584         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
11585         pipeline.
11586         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
11587         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
11588         * config/nds32/nds32.md (pipeline_model): Add graywolf.
11589         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
11590         * config/nds32/pipelines.md: Include n15 settings.
11592 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
11593             Chung-Ju Wu  <jasonwucj@gmail.com>
11595         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
11596         * config/nds32/nds32-n13.md: New file.
11597         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
11598         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
11599         pipeline.
11600         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
11601         * config/nds32/nds32.md (pipeline_model): Add n13.
11602         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
11603         * config/nds32/pipelines.md: Include n13 settings.
11605 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
11606             Chung-Ju Wu  <jasonwucj@gmail.com>
11608         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
11609         * config/nds32/nds32-n10.md: New file.
11610         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
11611         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
11612         pipeline.
11613         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
11614         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
11615         * config/nds32/nds32.md (pipeline_model): Add n10.
11616         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
11617         * config/nds32/pipelines.md: Include n10 settings.
11619 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
11620             Kito Cheng  <kito.cheng@gmail.com>
11621             Chung-Ju Wu  <jasonwucj@gmail.com>
11623         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
11624         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11625         Add enum values for DSP extension instructions.
11626         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
11627         New constraints.
11628         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
11629         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
11630         New code iterators.
11631         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
11632         * config/nds32/nds32-dspext.md: New file for DSP implementation.
11633         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
11634         * config/nds32/nds32-intrinsic.md: Likewise.
11635         * config/nds32/nds32_intrinsic.h: Likewise.
11636         * config/nds32/nds32-md-auxiliary.c: Likewise.
11637         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
11638         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
11639         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
11640         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
11641         * config/nds32/nds32-protos.h: New declarations for DSP extension.
11642         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
11643         TYPE_DMAC in switch statement.
11644         * config/nds32/nds32.c: New checking and implementation for DSP
11645         extension instructions.
11646         * config/nds32/nds32.h: Likewise.
11647         * config/nds32/nds32.md: Likewise.
11648         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
11649         * config/nds32/predicates.md: Implement new predicates for DSP
11650         extension.
11652 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
11654         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
11655         Reformat alternatives and attributes so it is easier to identify
11656         which constraints/attributes go with which instruction.
11657         (mov<mode>_hardfloat32, FMOVE64): Likewise.
11658         (mov<mode>_softfloat32, FMOVE64): Likewise.
11659         (mov<mode>_hardfloat64, FMOVE64): Likewise.
11660         (mov<mode>_softfloat64, FMOVE64): Likewise.
11662 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11664         * doc/extend.texi (PowerPC Built-in Functions): Rename this
11665         subsection.
11666         (Basic PowerPC Built-in Functions): The new name of the
11667         subsection previously known as "PowerPC Built-in Functions".
11668         (Basic PowerPC Built-in Functions Available on all Configurations):
11669         New subsubsection.
11670         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
11671         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
11672         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
11673         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
11675 2018-05-11  Martin Jambor  <mjambor@suse.cz>
11677         PR ipa/85655
11678         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
11679         single const.
11681 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
11683         PR target/85733
11684         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
11686 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
11688         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
11689         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
11690         (ix86_handle_option): Handle -mwaitpkg.
11691         * config.gcc: New header.
11692         * config/i386/cpuid.h (bit_WAITPKG): New bit.
11693         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
11694         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
11695         function type.
11696         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11697         OPTION_MASK_ISA_WAITPKG.
11698         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
11699         (ix86_option_override_internal): Add PTA_WAITPKG.
11700         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
11701         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
11702         IX86_BUILTIN_TPAUSE.
11703         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
11704         __builtin_ia32_umwait and __builtin_ia32_tpause.
11705         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
11706         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
11707         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
11708         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
11709         UNSPECV_TPAUSE): New.
11710         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
11711         * config/i386/i386.opt: Add -mwaitpkg.
11712         * config/i386/waitpkgintrin.h: New file.
11713         * config/i386/x86intrin.h: New header.
11714         * doc/invoke.texi: Add -mwaitpkg.
11716 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
11718         PR target/85606
11719         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
11720         equivalent.
11721         (cortex-m0): Use armv6s-m isa.
11722         (cortex-m0plus): Likewise.
11723         (cortex-m1): Likewise.
11724         (cortex-m0.small-multiply): Likewise.
11725         (cortex-m0plus.small-multiply): Likewise.
11726         (cortex-m1.small-multiply): Likewise.
11728 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
11729             Jakub Jelinek  <jakub@redhat.com>
11731         PR tree-optimization/85692
11732         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
11733         source permute as well.
11735 2018-05-11  Martin Liska  <mliska@suse.cz>
11737         PR sanitizer/85556
11738         * doc/extend.texi: Document LLVM style format for no_sanitize
11739         attribute.
11741 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
11743         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
11744         mode_supports_vsx_dform_quad to mode_supports_dq_form.
11745         (mode_supports_vsx_dform_quad): Likewise.
11746         (mode_supports_vmx_dform): Move these functions to be next to the
11747         other mode_supports functions.
11748         (mode_supports_dq_form): Likewise.
11749         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
11750         mode_supports_dq_form.
11751         (reg_offset_addressing_ok_p): Likewise.
11752         (offsettable_ok_by_alignment): Likewise.
11753         (rs6000_legitimate_offset_address_p): Likewise.
11754         (legitimate_lo_sum_address_p): Likewise.
11755         (rs6000_legitimize_address): Likewise.
11756         (rs6000_legitimize_reload_address): Likewise.
11757         (rs6000_secondary_reload_inner): Likewise.
11758         (rs6000_preferred_reload_class): Likewise.
11759         (rs6000_output_move_128bit): Likewise.
11761 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
11763         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
11764         Generate SImode target register for null target.
11765         <case IX86_BUILTIN_XGETBV>: Ditto.
11766         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
11767         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
11769 2018-05-10  Carl Love  <cel@us.ibm.com>
11771         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
11772         dcbtt and dcbtstt if operands[2] is 0.
11774 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
11776         PR target/85693
11777         * config/i386/sse.md (usadv64qi): New expander.
11779 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
11781         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
11782         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
11783         -maltivec=be support.
11784         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
11785         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
11786         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
11787         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
11788         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
11789         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
11790         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
11791         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
11792         altivec_vsumsws): Adjust.
11793         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
11794         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
11795         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
11796         support.
11797         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
11798         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
11799         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
11800         (altivec_lve<VI_char>x): Delete expand.
11801         (*altivec_lve<VI_char>x_internal): Rename to...
11802         (altivec_lve<VI_char>x): ... this.
11803         (altivec_lvxl_<mode>): Delete expand.
11804         (*altivec_lvxl_<mode>_internal): Rename to ...
11805         (altivec_lvxl_<mode>): ... this.
11806         (altivec_stvxl_<mode>): Delete expand.
11807         (*altivec_stvxl_<mode>_internal): Rename to ...
11808         (altivec_stvxl_<mode>): ... this.
11809         (altivec_stve<VI_char>x): Delete expand.
11810         (*altivec_stve<VI_char>x_internal): Rename to ...
11811         (altivec_stve<VI_char>x): ... this.
11812         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
11813         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
11814         reduc_plus_scal_<mode>): Adjust.
11815         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
11816         comment.
11817         (rs6000_cpu_cpp_builtins): Adjust.
11818         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
11819         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
11820         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
11821         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
11822         -maltivec=be support.
11823         (rs6000_split_vec_extract_var): Adjust.
11824         (rs6000_split_v4si_init): Adjust.
11825         (swap_selector_for_mode): Delete.
11826         (altivec_expand_lvx_be, altivec_expand_stvx_be,
11827         altivec_expand_stvex_be): Delete.
11828         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
11829         -maltivec=be support.
11830         (rs6000_gimple_fold_builtin): Ditto.
11831         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
11832         Adjust.
11833         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
11834         (TARGET_DIRECT_MOVE_64BIT): Adjust.
11835         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
11836         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
11837         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
11838         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
11839         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
11840         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
11841         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
11842         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
11843         anonymous split): Adjust.
11844         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
11845         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
11847 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
11849         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
11850         when --with-gxx-include-dir is also specified.
11851         * configure: Regenerate.
11853 2018-05-09  Jim Wilson  <jimw@sifive.com>
11855         PR target/84797
11856         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
11857         * config/riscv/t-withmultilib: New.
11858         * config/riscv/withmultilib.h: New.
11859         * doc/install.texi: Document RISC-V --with-multilib-list support.
11861 2018-05-09  Richard Biener  <rguenther@suse.de>
11863         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
11864         vector.
11865         (vect_bb_vectorization_profitable_p): Adjust.  Compute
11866         actual scalar cost using the cost vector and the add_stmt_cost
11867         machinery.
11869 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
11871         PR rtl-optimization/85645
11872         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
11873         in the REG_CFA_REGISTER note for LR, don't leave it empty.
11875 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
11877         PR rtl-optimization/85645
11878         * shrink-wrap.c (spread_components): Return a boolean saying if
11879         anything was changed.
11880         (try_shrink_wrapping_separate): Iterate spread_components until
11881         nothing changes anymore.
11883 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
11885         PR rtl-optimization/85645
11886         * regrename.c (build_def_use): Also kill the chains that include the
11887         destination of a REG_CFA_REGISTER note.
11889 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
11891         PR rtl-optimization/85645
11892         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
11893         insn that has a REG_CFA_REGISTER note.
11895 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
11897         * cfgexpand.c (expand_clobber): New function.
11898         (expand_gimple_stmt_1): Use it.
11899         * tree-vect-stmts.c (vect_clobber_variable): New function,
11900         split out from...
11901         (vectorizable_simd_clone_call): ...here.
11902         (vectorizable_store): Emit a clobber either side of an
11903         IFN_STORE_LANES sequence.
11904         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
11906 2018-05-09  Tom de Vries  <tom@codesourcery.com>
11908         PR target/85626
11909         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
11910         (define_insn "trap_if_false"): Add exit after trap.
11912 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
11914         PR rtl-optimization/85638
11915         * bb-reorder.c: Include common/common-target.h.
11916         (create_forwarder_block): New function extracted from...
11917         (fix_up_crossing_landing_pad): ...here.  Rename into...
11918         (dw2_fix_up_crossing_landing_pad): ...this.
11919         (sjlj_fix_up_crossing_landing_pad): New function.
11920         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
11921         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
11922         from both partitions and exit the loop after one iteration.
11924 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11926         Revert:
11927         * doc/extend.texi (PowerPC Built-in Functions): Rename this
11928         subsection.
11929         (Basic PowerPC Built-in Functions): The new name of the
11930         subsection previously known as "PowerPC Built-in Functions".
11931         (Basic PowerPC Built-in Functions Available on all Configurations):
11932         New subsubsection.
11933         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
11934         subsubsection.
11935         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
11936         subsubsection.
11937         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
11938         subsubsection.
11939         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
11940         subsubsection.
11942 2018-05-08  Jim Wilson  <jimw@sifive.com>
11944         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
11945         (LD_EMUL_SUFFIX): New.
11946         (LINK_SPEC): Use it.
11948 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11950         * doc/extend.texi (PowerPC Built-in Functions): Rename this
11951         subsection.
11952         (Basic PowerPC Built-in Functions): The new name of the
11953         subsection previously known as "PowerPC Built-in Functions".
11954         (Basic PowerPC Built-in Functions Available on all Configurations):
11955         New subsubsection.
11956         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
11957         subsubsection.
11958         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
11959         subsubsection.
11960         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
11961         subsubsection.
11962         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
11963         subsubsection.
11965 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
11967         PR target/85683
11968         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
11969         after cmpelim optimization.
11971 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
11973         * config.gcc: Support "goldmont".
11974         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
11975         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11976         PROCESSOR_GOLDMONT.
11977         * config/i386/i386.c (m_GOLDMONT): Define.
11978         (processor_target_table): Add "goldmont".
11979         (PTA_GOLDMONT): Define.
11980         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
11981         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
11982         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
11983         (fold_builtin_cpu): Add "goldmont".
11984         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
11985         (ix86_option_override_internal): Add "goldmont".
11986         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
11987         (processor_type): Add PROCESSOR_GOLDMONT.
11988         * config/i386/i386.md: Add CPU "glm".
11989         * config/i386/glm.md: New file.
11990         * config/i386/x86-tune.def: Add m_GOLDMONT.
11991         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
11993 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
11995         PR target/85572
11996         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
11997         E_V4DImode.
11998         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
11999         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
12000         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
12002         PR target/85317
12003         * config/i386/i386.c (ix86_fold_builtin): Handle
12004         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
12006         PR target/85480
12007         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
12008         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
12010 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
12012         PR target/85658
12013         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
12014         (check_arch): Likewise.
12015         (check_fpu): Return the result rather than printing it.
12016         (end arch): Fix operator precedence.
12017         (end cpu): Likewise.
12018         (END): Print the result from check_fpu.
12020 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
12021             Alan Hayward  <alan.hayward@arm.com>
12022             David Sherwood  <david.sherwood@arm.com>
12024         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
12025         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
12026         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
12027         (*fcmuo<mode>_and): New patterns.
12029 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
12031         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
12032         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
12033         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
12034         (cmp_op, sve_imm_con): New code attributes.
12035         (SVE_COND_INT_CMP, imm_con): Delete.
12036         (cmp_op): Remove above unspecs from int attribute.
12037         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
12038         to...
12039         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
12040         comparison-specific unspecs.
12041         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
12042         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
12043         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
12044         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
12045         (*vec_fcm<cmp_op><mode>): Rename to...
12046         (*fcm<cmp_op><mode>): ...this and adjust likewise.
12047         (*vec_fcmuo<mode>): Rename to...
12048         (*fcmuo<mode>): ...this and adjust likewise.
12049         (*pred_fcm<cmp_op><mode>): New pattern.
12050         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
12051         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
12052         functions.
12053         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
12054         and UNORDERED.
12055         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
12056         (aarch64_emit_sve_predicated_cond): New function.
12057         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
12058         (aarch64_emit_unspec_cond_or): Replace with...
12059         (aarch64_emit_sve_or_conds): ...this new function.  Use
12060         aarch64_emit_sve_ptrue_op for the individual comparisons and
12061         aarch64_emit_binop to OR them together.
12062         (aarch64_emit_inverted_unspec_cond): Replace with...
12063         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
12064         aarch64_emit_sve_ptrue_op for the comparison and
12065         aarch64_emit_unop to invert the result.
12066         (aarch64_expand_sve_vec_cmp_float): Update after the above
12067         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
12069 2018-05-07  Nathan Sidwell  <nathan@acm.org>
12071         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
12072         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
12073         (Backwards Compatibility): Likewise.
12075 2018-05-07  Luis Machado  <luis.machado@linaro.org>
12077         PR bootstrap/85681
12078         Revert:
12079         2018-05-07  Luis Machado  <luis.machado@linaro.org>
12081         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12082         <prefetch_dynamic_strides>: New const bool field.
12083         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12084         prefetch_dynamic_strides.
12085         (exynosm1_prefetch_tune): Likewise.
12086         (thunderxt88_prefetch_tune): Likewise.
12087         (thunderx_prefetch_tune): Likewise.
12088         (thunderx2t99_prefetch_tune): Likewise.
12089         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
12090         to false.
12091         (aarch64_override_options_internal): Update to set
12092         PARAM_PREFETCH_DYNAMIC_STRIDES.
12093         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12094         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12095         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12096         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12097         prefetch-dynamic-strides setting.
12099         2018-05-07  Luis Machado  <luis.machado@linaro.org>
12101         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12102         <minimum_stride>: New const int field.
12103         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12104         minimum_stride field.
12105         (exynosm1_prefetch_tune): Likewise.
12106         (thunderxt88_prefetch_tune): Likewise.
12107         (thunderx_prefetch_tune): Likewise.
12108         (thunderx2t99_prefetch_tune): Likewise.
12109         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
12110         (aarch64_override_options_internal): Update to set
12111         PARAM_PREFETCH_MINIMUM_STRIDE.
12112         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12113         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12114         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12115         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12116         stride is constant and is below the minimum stride threshold.
12118 2018-05-07  Luis Machado  <luis.machado@linaro.org>
12120         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
12121         to 512.
12123 2018-05-07  Luis Machado  <luis.machado@linaro.org>
12125         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12126         <prefetch_dynamic_strides>: New const bool field.
12127         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12128         prefetch_dynamic_strides.
12129         (exynosm1_prefetch_tune): Likewise.
12130         (thunderxt88_prefetch_tune): Likewise.
12131         (thunderx_prefetch_tune): Likewise.
12132         (thunderx2t99_prefetch_tune): Likewise.
12133         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
12134         to false.
12135         (aarch64_override_options_internal): Update to set
12136         PARAM_PREFETCH_DYNAMIC_STRIDES.
12137         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12138         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12139         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12140         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12141         prefetch-dynamic-strides setting.
12143 2018-05-07  Luis Machado  <luis.machado@linaro.org>
12145         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12146         <minimum_stride>: New const int field.
12147         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12148         minimum_stride field.
12149         (exynosm1_prefetch_tune): Likewise.
12150         (thunderxt88_prefetch_tune): Likewise.
12151         (thunderx_prefetch_tune): Likewise.
12152         (thunderx2t99_prefetch_tune): Likewise.
12153         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
12154         (aarch64_override_options_internal): Update to set
12155         PARAM_PREFETCH_MINIMUM_STRIDE.
12156         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12157         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12158         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12159         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12160         stride is constant and is below the minimum stride threshold.
12162 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
12164         PR c++/85659
12165         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
12166         the type is addressable.  Don't force op into register if it has
12167         BLKmode.
12169 2018-05-05  Roland McGrath  <mcgrathr@google.com>
12171         PR other/77609
12172         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
12173         any section for which we don't know a specific type it should have,
12174         regardless of name.  Previously this was done only for the exact
12175         names ".init_array", ".fini_array", and ".preinit_array".
12176         (default_elf_asm_named_section): Add comment about
12177         relationship with default_section_type_flags and SECTION_NOTYPE.
12178         (get_section): Don't consider it a type conflict if one side has
12179         SECTION_NOTYPE and the other doesn't, as long as neither has the
12180         SECTION_BSS et al used in the default_section_type_flags logic.
12182 2018-05-05  Tom de Vries  <tom@codesourcery.com>
12184         PR target/85653
12185         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
12186         (workaround_barsyncs): New function.
12187         (nvptx_reorg): Use workaround_barsyncs.
12188         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
12189         (define_expand "nvptx_membar_cta"): New define_expand.
12190         (define_insn "*nvptx_membar_cta"): New insn.
12192 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
12194         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
12195         To improve optimization opportunities.
12196         * builtin-types.def: The new needed builtin types for the above.
12198 2018-05-04  Richard Biener  <rguenther@suse.de>
12200         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
12201         * gimple-ssa-store-merging.c
12202         (imm_store_chain_info::output_merged_store): Remove redundant create,
12203         release split_store vector contents on failure.
12204         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
12205         scalar stmt vector on cache hit.
12207 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
12209         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
12210         Xilinx FP support.
12211         * config.gcc (powerpc-xilinx-eabi*): Remove.
12212         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
12213         support.
12214         (fusion_addis_mem_combo_load): Ditto.
12215         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
12216         FP support.
12217         (rs6000_cpu_cpp_builtins): Ditto.
12218         * config/rs6000/rs6000-linux.c
12219         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
12220         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
12221         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
12222         support.
12223         (rs6000_setup_reg_addr_masks): Ditto.
12224         (rs6000_init_hard_regno_mode_ok): Ditto.
12225         (rs6000_option_override_internal): Ditto.
12226         (legitimate_lo_sum_address_p): Ditto.
12227         (rs6000_legitimize_address): Ditto.
12228         (rs6000_legitimize_reload_address): Ditto.
12229         (rs6000_legitimate_address_p): Ditto.
12230         (abi_v4_pass_in_fpr): Ditto.
12231         (setup_incoming_varargs): Ditto.
12232         (rs6000_gimplify_va_arg): Ditto.
12233         (rs6000_split_multireg_move): Ditto.
12234         (rs6000_savres_strategy): Ditto.
12235         (rs6000_emit_prologue_components): Ditto.
12236         (rs6000_emit_epilogue_components): Ditto.
12237         (rs6000_emit_prologue): Ditto.
12238         (rs6000_emit_epilogue): Ditto.
12239         (rs6000_elf_file_end): Ditto.
12240         (rs6000_function_value): Ditto.
12241         (rs6000_libcall_value): Ditto.
12242         * config/rs6000/rs6000.h: Ditto.
12243         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
12244         (TARGET_MINMAX): ... this.  New.
12245         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
12246         * config/rs6000/rs6000.md: Remove Xilinx FP support.
12247         (*movsi_internal1_single): Delete.
12248         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
12249         mfpu=, mxilinx-fpu): Delete.
12250         * config/rs6000/singlefp.h: Delete.
12251         * config/rs6000/sysv4.h: Remove Xilinx FP support.
12252         * config/rs6000/t-rs6000: Ditto.
12253         * config/rs6000/t-xilinx: Delete.
12254         * config/rs6000/titan.md: Adjust for fp_type removal.
12255         * config/rs6000/vsx.md: Remove Xilinx FP support.
12256         (VStype_simple): Delete.
12257         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
12258         * config/rs6000/xfpu.h: Delete.
12259         * config/rs6000/xfpu.md: Delete.
12260         * config/rs6000/xilinx.h: Delete.
12261         * config/rs6000/xilinx.opt: Delete.
12262         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
12263         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
12265 2018-05-04  Tom de Vries  <tom@codesourcery.com>
12267         PR libgomp/85639
12268         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
12269         if ignore == 0.
12271 2018-05-04  Richard Biener  <rguenther@suse.de>
12273         PR middle-end/85627
12274         * tree-complex.c (update_complex_assignment): We are always in SSA form.
12275         (expand_complex_div_wide): Likewise.
12276         (expand_complex_operations_1): Likewise.
12277         (expand_complex_libcall): Preserve EH info of the original stmt.
12278         (tree_lower_complex): Handle removed blocks.
12279         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
12280         on complex multiplication and division libcall builtins.
12282 2018-05-04  Richard Biener  <rguenther@suse.de>
12284         PR middle-end/85574
12285         * fold-const.c (negate_expr_p): Restrict negation of operand
12286         zero of a division to when we know that can happen without
12287         overflow.
12288         (fold_negate_expr_1): Likewise.
12290 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
12292         PR libstdc++/85466
12293         * real.h (real_nextafter): Declare.
12294         * real.c (real_nextafter): New function.
12295         * fold-const-call.c (fold_const_nextafter): New function.
12296         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
12297         CASE_CFN_NEXTTOWARD.
12298         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
12299         even when arg1_mode is different from arg0_mode.
12301 2018-05-03  Nathan Sidwell  <nathan@acm.org>
12303         * doc/extend.texi (Deprecated Features): Remove
12304         -ffriend-injection.
12305         (Backwards Compatibility): Likewise.
12306         * doc/invoke.texi (C++ Language Options): Likewise.
12307         (C++ Dialect Options): Likewise.
12309 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
12311         PR target/85530
12312         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
12313         _mm512_mask_mullox_epi64): New intrinsics.
12315 2018-05-03  Tom de Vries  <tom@codesourcery.com>
12317         PR testsuite/85106
12318         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12319         dump files): Add offload-tree.
12321 2018-05-03  Richard Biener  <rguenther@suse.de>
12323         PR tree-optimization/85615
12324         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
12325         to loops not nested in BBs loop father to avoid creating multi-entry
12326         loops.
12328 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12330         PR tree-optimization/70291
12331         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
12332         arguments.  Change return type to tree.  Emit libcall as a new
12333         statement rather than replacing existing one when inplace_p is true.
12334         (expand_complex_multiplication_components): New function.
12335         (expand_complex_multiplication): Expand floating-point complex
12336         multiplication using the above.
12337         (expand_complex_division): Rename inner_type parameter to type.
12338         Update expand_complex_libcall call-site.
12339         (expand_complex_operations_1): Update expand_complex_multiplication
12340         and expand_complex_division call-sites.
12342 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
12344         PR target/85582
12345         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
12346         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
12347         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
12348         the highest significant bit of the shift count mask is clear.  In
12349         check whether and[sq]i3 is needed verify that all significant bits
12350         of the shift count other than the highest are set.
12352 2018-05-02  Tom de Vries  <tom@codesourcery.com>
12354         PR libgomp/82428
12355         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
12356         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
12357         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
12358         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
12359         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
12360         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
12361         __builtin_goacc_parlevel_size.
12363 2018-05-02  Richard Biener  <rguenther@suse.de>
12365         PR tree-optimization/85597
12366         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
12367         do not use split vect_get_vec_defs call but call vect_get_slp_defs
12368         directly.
12370 2018-05-02  Tom de Vries  <tom@codesourcery.com>
12372         PR testsuite/85106
12373         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12374         dump files): Add ltrans-tree.
12376 2018-05-02  Tom de Vries  <tom@codesourcery.com>
12378         PR testsuite/85106
12379         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12380         dump files): Add wpa-ipa.
12382 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
12384         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
12385         powerpc*-*-linux*paired* target.
12386         * config/rs6000/750cl.h: Delete.
12387         * config/rs6000/paired.h: Delete.
12388         * config/rs6000/paired.md: Delete.
12389         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
12390         float support.
12391         * config/rs6000/rs6000-builtin.def: Remove paired float support.
12392         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
12393         comment.  Remove paired float support.
12394         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
12395         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
12396         VECTOR_PAIRED.
12397         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
12398         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
12399         declarations.
12400         * config/rs6000/rs6000.c: Remove paired float support.
12401         (paired_expand_vector_init, paired_expand_vector_move,
12402         paired_emit_vector_compare, paired_emit_vector_cond_expr,
12403         (paired_expand_lv_builtin, paired_expand_stv_builtin,
12404         paired_expand_builtin, paired_expand_predicate_builtin,
12405         paired_init_builtins): Delete.
12406         * config/rs6000/rs6000.h: Remove paired float support.
12407         * config/rs6000/rs6000.md: Remove paired float support.
12408         (move_from_CR_ov_bit): Delete.
12409         * config/rs6000/rs6000.opt (mpaired): Delete.
12410         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
12411         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
12413 2018-05-02  Richard Biener  <rguenther@suse.de>
12415         PR middle-end/85567
12416         * gimplify.c (gimplify_save_expr): When in SSA form allow
12417         SAVE_EXPRs to compute to SSA vars.
12419 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
12421         PR target/85582
12422         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
12423         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
12424         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
12425         clobber operands[2], instead use a new pseudo.  Formatting fixes.
12427 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
12429         PR tree-optimization/85586
12430         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
12431         exit early for statements in the same group if the accesses are
12432         not strided.
12434 2018-05-02  Tom de Vries  <tom@codesourcery.com>
12436         PR lto/85451
12437         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
12438         error message.
12440 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
12442         PR tree-optimization/85143
12443         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
12445 2018-05-01  Tom de Vries  <tom@codesourcery.com>
12447         PR lto/85451
12448         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
12449         not found" error message.
12451 2018-05-01  Tom de Vries  <tom@codesourcery.com>
12453         PR other/83786
12454         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
12455         * vec.c (test_ordered_remove_if): New function.
12456         (vec_c_tests): Call test_ordered_remove_if.
12457         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
12458         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
12459         * tree-vect-patterns.c (vect_pattern_recog_1): Use
12460         VEC_ORDERED_REMOVE_IF.
12462 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12464         PR tree-optimization/82665
12465         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
12466         pointer subtraction where arguments come from a memchr call.
12468 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
12470         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
12471         --push-state --as-needed and --pop-state instead of --as-needed and
12472         --no-as-needed if ld supports it.
12473         * configure: Regenerated.
12475         PR web/85578
12476         * doc/install.texi2html: Replace _002d with - and _002a with * in
12477         generated html files using sed.
12479 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
12481         PR c++/85523
12482         * gcc-rich-location.c (blank_line_before_p): New function.
12483         (use_new_line): New function.
12484         (gcc_rich_location::add_fixit_insert_formatted): New function.
12485         * gcc-rich-location.h
12486         (gcc_rich_location::add_fixit_insert_formatted): New function.
12488 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
12490         * selftest.c (assert_streq): Rename "expected" and "actual" to
12491         "val1" and "val2".  Extend NULL-handling to cover both inputs
12492         symmetrically, while still requiring both to be non-NULL for a pass.
12493         * selftest.h (assert_streq): Rename "expected" and "actual" to
12494         "val1" and "val2".
12495         (ASSERT_EQ): Likewise.
12496         (ASSERT_EQ_AT): Likewise.
12497         (ASSERT_KNOWN_EQ): Likewise.
12498         (ASSERT_KNOWN_EQ_AT): Likewise.
12499         (ASSERT_NE): Likewise.
12500         (ASSERT_MAYBE_NE): Likewise.
12501         (ASSERT_MAYBE_NE_AT): Likewise.
12502         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
12503         the assertion to pass.
12504         (ASSERT_STREQ_AT): Likewise.
12506 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
12508         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
12509         interaction with -pie.
12511 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
12513         * selftest.h: Fix alphabetization of per-source-file selftest
12514         declarations.
12516 2018-04-30  Jason Merrill  <jason@redhat.com>
12518         PR c++/61982 - dead stores to destroyed objects.
12519         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
12520         of clobber.
12522 2018-04-30  Jason Merrill  <jason@redhat.com>
12524         * tree.c (build_clobber): New.
12525         * tree.h: Declare it.
12526         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
12528 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
12530         * diagnostic-show-locus.c (layout::layout): Update for
12531         location_get_source_line returning a char_span.
12532         (struct char_span): Move to input.h.
12533         (struct correction): Update for fields in char_span becoming
12534         private.
12535         (struct source_line): Update for location_get_source_line
12536         returning a char_span.
12537         (layout::print_line): Likewise.
12538         * edit-context.c (edited_file::print_content): Likewise.
12539         (edited_file::print_diff_hunk): Likewise.
12540         (edited_file::print_run_of_changed_lines): Likewise.
12541         (edited_file::get_num_lines): Likewise.
12542         (edited_line::edited_line): Likewise.
12543         * final.c (asm_show_source): Likewise.
12544         * input.c (location_get_source_line): Convert return type
12545         from const char * to char_span, losing the final "line_len"
12546         param.
12547         (dump_location_info): Update for the above.
12548         (get_substring_ranges_for_loc): Likewise.  Use a char_span
12549         when handling the literal within the line.
12550         (test_reading_source_line): Update for location_get_source_line
12551         returning a char_span.
12552         * input.h (class char_span): Move here from
12553         diagnostic-show-locus.c, converting from a struct to a class.
12554         Make data members private.
12555         (char_span::operator bool): New.
12556         (char_span::length): New.
12557         (char_span::get_buffer): New.
12558         (char_span::operator[]): New.
12559         (char_span::subspan): Make const.
12560         (char_span::xstrdup): New.
12561         (location_get_source_line): Convert return type from const char *
12562         to char_span, losing the final "line_size" param.
12564 2018-04-30  Jan Hubicka  <jh@suse.cz>
12566         * lto-wrapper.c (ltrans_priorities): New static var.
12567         (cmp_priority): New.
12568         (run_gcc): Read priorities and if doing parallel build order
12569         the Makefile by them.
12571 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
12573         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
12575 2018-04-30  Richard Biener  <rguenther@suse.de>
12577         * tree-cfg.c (verify_address): Remove base argument, add
12578         flag whether to check TREE_ADDRESSABLE and do that.
12579         (verify_expr): Remove.
12580         (verify_types_in_gimple_reference): Add pieces from verify_expr.
12581         (verify_gimple_assign_single): Likewise.
12582         (verify_gimple_switch): Likewise.
12583         (verify_expr_location_1): Dereference tp once.  Add (disabled)
12584         piece from verify_expr.
12585         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
12587 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
12589         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
12591 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
12593         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
12594         (small_data_pattern): Likewise.
12595         (arc_rewrite_small_data): Likewise.
12596         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
12597         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
12598         (get_symbol_alignment): New function.
12599         (legitimate_small_data_address_p): Likewise.
12600         (legitimate_scaled_address): Update, call
12601         legitimate_small_data_address_p.
12602         (output_sdata): New static variable.
12603         (arc_print_operand): Update how we handle small data operands.
12604         (arc_print_operand_address): Likewise.
12605         (arc_legitimate_address_p): Update, use
12606         legitimate_small_data_address_p.
12607         (arc_rewrite_small_data_p): Remove.
12608         (arc_rewrite_small_data_1): Likewise.
12609         (arc_rewrite_small_data): Likewise.
12610         (small_data_pattern): Likewise.
12611         (compact_sda_memory_operand): Update to use
12612         legitimate_small_data_address_p and get_symbol_alignment.
12613         (prepare_move_operands): Don't rewite sdata pattern.
12614         (prepare_extend_operands): Remove.
12615         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
12616         pattern.
12617         (zero_extendqisi2): Likewise.
12618         (zero_extendhisi2): Likewise.
12619         (extendqihi2): Likewise.
12620         (extendqisi2): Likewise.
12621         (extendhisi2): Likewise.
12622         (addsi3): Likewise.
12623         (subsi3): Likewise.
12624         (andsi3): Likewise.
12625         * config/arc/constraints.md (Usd): Change it to memory constraint.
12627 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
12629         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
12630         as source of std instructions.
12631         * config/arc/arc.md (movsi_insn): Update pattern predicate to
12632         allow 6-bit constants as source for store instructions.
12633         (movdi_insn): Update instruction pattern to allow 6-bit constants
12634         as source for store instructions.
12636 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
12638         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
12640 2018-04-30  Nathan Sidwell  <nathan@acm.org>
12641             Sandra Loosemore <sandra@codesourcery.com>
12643         * dumpfile.c (dump_open): Allow '-' for stdout.
12644         * doc/invoke.texi (Developer Options): Document dump filename
12645         determination early.  Document stdin/stdout selection.
12647 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
12649         Microblaze Target: PIC data text relative
12651         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
12652         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
12653         Add declaration.
12654         * config/microblaze/microblaze.h (microblaze_constant_address_p):
12655         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
12656         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
12657         New addressing mode for data-text relative position indepenedent code.
12658         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
12659         'ADDRESS_SYMBOLIC_TXT_REL'.
12660         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
12661         (microblaze_legitimate_pic_operand): Exclude function calls from
12662         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
12663         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
12664         addresses cases.
12665         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
12666         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
12667         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
12668         for 'address + offset'.
12669         (microblaze_expand_prologue): Add new function prologue call for
12670         'r20' assignation.
12671         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
12672         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
12673         table in case of TARGET_PIC_DATA_TEXT_REL.
12674         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
12675         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
12676         Add new macros 'UNSPEC_TEXT',
12677         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
12678         + exclude function calls from 'UNSPEC_PLT' in case of data text
12679         relative mode.
12680         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
12681         new target hook for generating address diff vector tables in case of
12682         flag_pic.
12683         * doc/tm.texi : Regenerate.
12684         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
12685         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
12686         of addr diff vector generation.
12687         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
12688         target hook definition.
12689         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
12690         Add default function for generate_pic_addr_diff_vec -> flag_pic.
12691         * doc/invoke.texi (Add new pic option): Add new microblaze pic
12692         option for data text relative.
12694 2018-04-30  Richard Biener  <rguenther@suse.de>
12696         * tree-chrec.h (evolution_function_is_constant_p): Remove
12697         redundant check.
12698         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
12700 2018-04-30  Richard Biener  <rguenther@suse.de>
12702         PR bootstrap/85571
12703         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
12705 2018-04-30  Richard Biener  <rguenther@suse.de>
12707         PR tree-optimization/28364
12708         PR tree-optimization/85275
12709         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
12710         copying first exit test.
12712 2018-04-28  Mark Wielaard  <mark@klomp.org>
12714         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
12715         dwarf_version >= 5.
12716         (dwarf_AT): Handle DW_AT_addr_base.
12717         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
12719 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
12721         PR target/84431
12722         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
12723         (*ashl<dwi>3_doubleword_mask_1): Ditto.
12724         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
12725         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
12727 2018-04-28  Richard Biener  <rguenther@suse.de>
12729         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
12730         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
12731         to reflect use.  Only add interesting stmts.
12733 2018-04-27  Martin Jambor  <mjambor@suse.cz>
12735         PR ipa/85549
12736         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
12737         the jump function allows for passing through aggregate values.
12739 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
12741         * input.h (in_system_header_at): Convert from macro to inline
12742         function.
12743         (from_macro_expansion_at): Likewise.
12744         (from_macro_definition_at): Likewise.
12746 2018-04-27  Jeff Law  <law@redhat.com>
12748         * config.gcc: Mark tile* targets as deprecated/obsolete.
12750 2018-04-27  Richard Biener  <rguenther@suse.de>
12752         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
12753         fix for ILP32.
12755 2018-04-27  Richard Biener  <rguenther@suse.de>
12757         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
12759 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
12761         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
12762         with Yd constraint. Set "preferred_for_speed" attribute from
12763         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
12764         with Yd constraint.
12765         (*movdi_internal): Ditto.
12766         (movti_interunit splitters): Remove
12767         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
12768         (movdi_interunit splitters): Ditto.
12769         * config/i386/constraints.md (Ye): Remove.
12770         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
12772 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12774         PR target/85512
12775         * config/aarch64/constraints.md (Usg): Limit to 31.
12776         (Usj): Limit to 63.
12778 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
12780         PR tree-optimization/85529
12781         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
12782         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
12783         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
12784         zero extension or masking of the MSB bit.
12785         (optimize_range_tests): Add FIRST_BB argument, pass it through
12786         to optimize_range_tests_var_bound.
12787         (maybe_optimize_range_tests, reassociate_bb): Adjust
12788         optimize_range_tests callers.
12790 2018-04-26  Richard Biener  <rguenther@suse.de>
12791             Jakub Jelinek  <jakub@redhat.com>
12793         * cgraph.h (symbol_table): Just declare debug method here.
12794         * symtab.c (symbol_table::debug): Define.
12796 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
12798         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
12800 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
12802         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
12803         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
12804         (*movdi_internal): Substitute Yi and Yj constraint with x
12805         and Ym and Yn constraint with y constraint.  Update "isa"
12806         attribute and set "preferred_for_speed" attribute from
12807         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
12808         (*movsi_internal): Ditto.
12809         (*movdf_internal): Ditto.
12810         (*movsf_internal): Ditto.
12811         (*zero_extendsidi2): Ditto.
12812         * config/i386/sse.md (vec_set<mode>_0): Ditto.
12813         (sse2_loadld): Ditto.
12814         (*vec_extract<ssevecmodelower>_0): Ditto.
12815         (*vec_extractv4si_0_zext_sse4): Ditto.
12816         (vec_concatv2di): Ditto.
12817         (*vec_dup<mode>): Ditto.
12818         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
12819         * config/i386/constraints.md (Yi): Remove.
12820         (Yj): Remove.
12821         (Ym): Remove.
12822         (Yn): Remove.
12824 2018-04-26  Nathan Sidwell  <nathan@acm.org>
12826         * dumpfile.c (dump_open): New.
12827         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
12828         (dump_finish): Detect stdio/stderr by value not name.
12830 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
12832         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
12834 2018-04-26  Tom de Vries  <tom@codesourcery.com>
12836         PR target/84952
12837         * config/nvptx/nvptx.c (verify_neutering_jumps)
12838         (verify_neutering_labels): New function
12839         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
12841 2018-04-26  Tom de Vries  <tom@codesourcery.com>
12843         PR target/84025
12844         * config/nvptx/nvptx.c (needs_neutering_p): New function.
12845         (nvptx_single): Use needs_neutering_p to skip over insns that do not
12846         need neutering.
12848 2018-04-26  Richard Biener <rguenther@suse.de>
12849             Tom de Vries  <tom@codesourcery.com>
12851         PR lto/85422
12852         * lto-streamer-out.c (output_function): Fixup loops if required to match
12853         discovery done in the reader.
12855 2018-04-26  Richard Biener  <rguenther@suse.de>
12857         PR tree-optimization/85116
12858         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
12859         have a loop exit from the single latch predecessor.  Remove
12860         case of header with just condition.
12861         (ch_base::copy_headers): Exclude infinite loops from any
12862         processing.
12863         (pass_ch::execute): Record exits.
12865 2018-04-26  Richard Biener  <rguenther@suse.de>
12867         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
12868         prologue cost vector and pass it to vect_get_load_cost.
12869         (vect_get_peeling_costs_all_drs): Likewise.
12870         (vect_peeling_hash_get_lowest_cost): Likewise.
12871         (vect_enhance_data_refs_alignment): Likewise.
12873 2018-04-26  Richard Biener  <rguenther@suse.de>
12875         PR middle-end/85450
12876         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
12877         checking of integer<->pointer conversions.
12878         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
12879         sign-/zero-extending pointer types.
12880         (expand_omp_for_static_chunk): Likewise.
12882 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
12883             Jean Lee  <xiaoyur347@gmail.com>
12885         * config/mips/mips.c (mips_asan_shadow_offset): New function.
12886         (TARGET_ASAN_SHADOW_OFFSET): Define.
12887         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
12888         true for -fsanitize=address.
12890 2018-04-25  Mark Wielaard  <mark@klomp.org>
12892         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
12893         shorter ones.
12895 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
12897         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
12898         than "alu", remove explicit "memory" and "imm_disp" attributes.
12899         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
12901         PR middle-end/85414
12902         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
12903         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
12904         gen_lowpart_no_emit.
12906 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
12908         PR target/85473
12909         * config/i386/i386.c (ix86_expand_builtin): Change memory
12910         operand to XI, extend p0 to Pmode.
12911         * config/i386/i386.md: Change unspec volatile and operand
12912         1 mode to XI, change operand 0 mode to P.
12914 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
12916         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
12917         GET_MODE_MASK before any checking.
12918         (nds32_can_use_bset_p): Likewise.
12919         (nds32_can_use_btgl_p): Likewise.
12921 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
12923         * config/nds32/nds32-doubleword.md: New define_split pattern for
12924         illegal register number.
12926 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
12928         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
12930 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
12932         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
12934 2018-04-25  Richard Biener  <rguenther@suse.de>
12936         * lto-streamer.h (LTO_major_version): Bump to 8.
12938 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
12940         * BASE-VER: Set to 9.0.0.
12942 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
12944         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
12945         in __abskf2 and __powikf2.
12947 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12949         PR target/85512
12950         * config/aarch64/constraints.md (Usg, Usj): New constraints.
12951         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
12952         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
12953         Use the above on operand 2.  Reindent.
12954         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
12956 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
12958         PR target/85485
12959         * common/config/i386/i386-common.c (ix86_handle_option): Don't
12960         handle OPT_mcet.
12961         * config/i386/i386.opt (mcet): Removed.
12962         * doc/install.texi: Remove -mcet documentation.
12963         * doc/invoke.texi: Likewise.
12965 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
12967         PR target/85485
12968         * doc/install.texi: Remove -mcet from bootstrap-cet.
12970 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
12972         PR target/85511
12973         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
12974         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
12975         if TARGET_64BIT.
12977         PR target/85503
12978         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
12979         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
12980         containing a CONST_VECTOR.
12982 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
12984         * doc/install.texi: Update newlib dependency for nvptx.
12986 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
12988         PR target/85508
12989         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
12990         instead of INTVAL when shifting x left.
12992 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
12994         PR tree-optimization/85478
12995         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
12996         vect_grouped_store_supported for single element vectors.
12998 2018-04-24  Richard Biener  <rguenther@suse.de>
13000         PR target/85491
13001         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
13002         load cost increase to the case of non-constant step.
13004 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
13006         PR target/84828
13007         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
13008         destination if any_malformed_asm.
13010 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
13012         PR middle-end/85496
13013         * expr.c (store_field): In the bitfield case, if the value comes from
13014         a function call and is returned in registers by means of a PARALLEL,
13015         do not change the mode of the temporary unless BLKmode and VOIDmode.
13017 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
13019         PR rtl-optimization/85423
13020         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
13021         dependencies to debug insns when the previous insn is non-debug.
13023 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
13025         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
13026         enums into a single definition.
13027         (fls): Fix predicates and printing.
13028         (seti): Likewise.
13030 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
13032         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
13033         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
13034         and short u6 immediate.
13035         (check_if_valid_sleep_operand): Remove.
13036         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
13038 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
13040         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
13041         flag_always_save_lp condition.
13042         * config/nds32/nds32.opt (malways-save-lp): New option.
13044 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
13046         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
13047         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
13048         * config/nds32/nds32.h
13049         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
13050         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
13052 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
13054         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
13055         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
13057 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
13058             Chung-Ju Wu  <jasonwucj@gmail.com>
13060         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
13061         Declare.
13062         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
13063         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
13065 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
13067         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
13069 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
13071         * config/nds32/nds32-protos.h (nds32_data_alignment,
13072         nds32_local_alignment): Declare.
13073         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
13074         nds32_local_alignment): New functions.
13075         (TARGET_CONSTANT_ALIGNMENT): Define.
13076         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
13078 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
13080         * config/nds32/nds32.c
13081         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
13082         (TARGET_MODES_TIEABLE_P): Likewise.
13084 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
13086         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
13087         level Ofast and Og.
13089 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
13090             Chung-Ju Wu  <jasonwucj@gmail.com>
13092         * config/nds32/constants.md (unspec_volatile_element): Add enum values
13093         for unaligned access.
13094         * config/nds32/nds32-intrinsic.c: Implementation of expanding
13095         unaligned access.
13096         * config/nds32/nds32-intrinsic.md: Likewise.
13097         * config/nds32/nds32_intrinsic.h: Likewise.
13098         * config/nds32/nds32.h (nds32_builtins): Likewise.
13099         * config/nds32/nds32.opt (munaligned-access): New option.
13100         * config/nds32/nds32.c (nds32_asm_file_start): Display
13101         flag_unaligned_access status.
13103 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
13105         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
13106         -mno-relax is present.
13107         * config/riscv/linux.h (LINK_SPEC): Ditto.
13109 2018-04-20  Martin Sebor  <msebor@redhat.com>
13111         PR c/85365
13112         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
13113         for null pointers.
13114         (gimple_fold_builtin_stxcpy_chk): Same.
13115         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
13117 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
13119         PR target/85456
13120         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
13121         __powikf2 when long double is IEEE 128-bit.
13123 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
13125         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
13126         step to make sure stack always aligned.
13128 2018-04-20  Carl Love  <cel@us.ibm.com>
13130         PR target/83402
13131         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
13132         size check for arg0.
13134 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
13135             Tom de Vries  <tom@codesourcery.com>
13137         PR target/85445
13138         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
13139         Emit insns for calls too.
13140         (nvptx_find_par): Always look for worker-level predecessor insn.
13141         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
13142         calls.
13143         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
13144         (nvptx_process_pars): Propagate frames for calls.
13146 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
13148         PR target/85469
13149         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
13150         Removed.
13151         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
13152         (ix86_handle_option): Don't handle OPT_mibt.
13153         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
13154         __SHSTK__.
13155         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
13156         has_ibt and ibt.
13157         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
13158         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
13159         (ix86_target_macros): Define __CET__ with flag_cf_protection
13160         for -fcf-protection.
13161         * config/i386/i386.c (isa2_opts): Remove -mibt.
13162         * config/i386/i386.h (TARGET_IBT): Removed.
13163         (TARGET_IBT_P): Likewise.
13164         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
13165         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
13166         * config/i386/i386.opt (mcet): Update help message.
13167         (mshstk): Likewise.
13168         (mibt): Removed.
13169         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
13170         -mcet as an alias for -mshstk.
13172 2018-04-20  Richard Biener <rguenther@suse.de>
13174         PR middle-end/85475
13175         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
13176         complexity by forcing a single use of the multiply operand.
13178 2018-04-20  Martin Jambor  <mjambor@suse.cz>
13180         ipa/85449
13181         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
13182         recursion dependency to only apply to non-clones.
13184 2018-04-20  Martin Jambor  <mjambor@suse.cz>
13186         ipa/85447
13187         * ipa-cp.c (create_specialized_node): Check that clones of
13188         self-recursive edges exist during IPA-CP.
13190 2018-04-19  Toon Moene  <toon@moene.org>
13192         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
13193         by -O3.
13195 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
13197         PR tree-optimization/85467
13198         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
13199         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
13200         VECTOR_CST element to type.
13202 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
13204         PR target/85397
13205         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
13206         * config/i386/i386.md (builtin_setjmp_setup): Removed.
13207         (builtin_longjmp): Likewise.
13208         (save_stack_nonlocal): New pattern.
13209         (restore_stack_nonlocal): Likewise.
13211 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
13213         PR target/85404
13214         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
13215         Replace ASM_OUTPUT_LABEL with fprintf.
13217 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
13219         PR target/85417
13220         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
13221         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
13222         * config/i386/i386-c.c (ix86_target_macros_internal): Also
13223         define __IBT__ and __SHSTK__ for -fcf-protection.
13224         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
13225         TARGET_IBT.
13226         (ix86_trampoline_init): Likewise.
13227         (x86_output_mi_thunk): Likewise.
13228         (ix86_notrack_prefixed_insn_p): Likewise.
13229         (ix86_option_override_internal): Don't disallow -fcf-protection.
13230         * config/i386/i386.md (rdssp<mode>): Also enable for
13231         -fcf-protection.
13232         (incssp<mode>): Likewise.
13233         (nop_endbr): Likewise.
13234         * config/i386/i386.opt (mcet): Change help message to built-in
13235         functions only.
13236         (mibt): Likewise.
13237         (mshstk): Likewise.
13238         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
13239         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
13240         enable CET built-in functions.
13242 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
13244         * common/config/i386/i386-common.c
13245         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
13246         OPTION_MASK_ISA_MOVDIRI_UNSET,
13247         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
13248         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
13249         * config.gcc (movdirintrin.h): New header.
13250         * config/i386/cpuid.h (bit_MOVDIRI,
13251         bit_MOVDIR64B): New bits.
13252         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
13253         and -mmvodir64b.
13254         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
13255         (VOID, PVOID, PCVOID)): New function types.
13256         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
13257         __builtin_ia32_directstoreu_u64,
13258         __builtin_ia32_movdir64b): New builtins.
13259         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
13260         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
13261         and -mmovdiri.
13262         (ix86_valid_target_attribute_inner_p): Ditto.
13263         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
13264         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
13265         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
13266         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
13267         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
13268         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
13269         (movdiri<mode>, movdir64b_<mode>): New.
13270         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
13271         * config/i386/immintrin.h: Include movdirintrin.h.
13272         * config/i386/movdirintrin.h: New file.
13273         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
13275 2018-04-19  Richard Biener  <rguenther@suse.de>
13277         PR middle-end/85455
13278         * cfg.c (clear_bb_flags): When loop state says we have
13279         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
13281 2018-04-19  Richard Biener  <rguenther@suse.de>
13283         PR tree-optimization/84737
13284         * tree-vect-data-refs.c (vect_copy_ref_info): New function
13285         copying restrict info.
13286         (vect_setup_realignment): Use it.
13287         * tree-vectorizer.h (vect_copy_ref_info): Declare.
13288         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
13289         the first DR to all generated stores.
13290         (vectorizable_load): Likewise for loads.
13292 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
13294         PR tree-optimization/85446
13295         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
13296         the integral and pointer types to have the same precision.
13298         * doc/install.texi: Document --disable-cet being the default and
13299         --enable-cet=auto.
13301 2018-04-18  Martin Liska  <mliska@suse.cz>
13303         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
13304         style.
13306 2018-04-18  Martin Liska  <mliska@suse.cz>
13308         Revert
13309         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
13311         PR ipa/83983
13312         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
13313         arguments if they are comparable.
13315 2018-04-18  Martin Liska  <mliska@suse.cz>
13317         Revert
13318         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
13320         PR lto/84805
13321         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
13322         incomplete types.
13324 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
13326         PR target/85388
13327         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
13328         ENDBR after calling __morestack.
13330 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
13332         PR jit/85384
13333         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
13334         by using gcc_base_ver to generate a gcc_driver_version, and use
13335         it when generating GCC_DRIVER_NAME.
13336         * configure: Regenerate.
13338 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
13340         PR target/81084
13341         * config.gcc: Obsolete powerpc*-*-*spe*.
13343 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
13345         PR debug/84637
13346         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
13347         (stabstr_D): Change type of unum from unsigned int to
13348         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
13349         type.
13351 2018-04-17  Jim Wilson  <jimw@sifive.com>
13353         PR 84856
13354         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
13355         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
13356         Set arg_pointer_offset after using pretend_args_size.
13358 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
13360         PR rtl-optimization/85431
13361         * dse.c (record_store): Ignore zero width stores.
13363         PR sanitizer/85230
13364         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
13365         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
13366         __builtin_stack_restore rather than after it.
13367         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
13368         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
13369         argument instead of virtual_dynamic_stack_rtx.
13371 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13373         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
13374         New prototype.
13375         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
13376         Add note to error message to explain internal mapping of overloaded
13377         built-in function name to non-overloaded built-in function name.
13378         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
13379         function.
13381 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
13383         PR target/85424
13384         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
13385         where the inputs overlap with the output.
13387 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
13389         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
13390         (=v, v) alternative and explicit "memory" attribute.
13391         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
13392         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
13393         attributes.
13394         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
13395         "sselog1" type instead of "sselog".
13396         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
13397         "sselog".  Remove explicit "memory" attribute.
13398         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
13399         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
13400         attributes.
13401         (vec_extract_hi_v32hi): Merge all alternatives into one, use
13402         "sselog1" type instead of "sselog".  Remove explicit "memory"
13403         attribute.
13404         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
13405         use "sselog1" type instead of "sselog".  Remove explicit "memory"
13406         attribute.
13407         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
13408         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
13409         attributes.
13410         (vec_extract_hi_v64qi): Merge all alternatives into one, use
13411         "sselog1" type instead of "sselog".  Remove explicit "memory"
13412         attribute.
13413         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
13414         use "sselog1" type instead of "sselog".  Remove explicit "memory"
13415         attribute.
13417         PR target/85430
13418         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
13420         PR middle-end/85414
13421         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
13422         on a SUBREG.
13424 2018-04-17  Martin Jambor  <mjambor@suse.cz>
13426         PR ipa/85421
13427         * ipa-cp.c (create_specialized_node): Call
13428         expand_all_artificial_thunks if necessary.
13430 2018-04-17  Martin Liska  <mliska@suse.cz>
13432         PR lto/85405
13433         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
13434         in message, remote space in between '_G' and '('.
13436 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
13438         PR target/85281
13439         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
13440         avx512f_vmcmp<mode>3<round_saeonly_name>,
13441         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
13442         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
13443         avx512f_rndscale<mode><round_saeonly_name>,
13444         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
13445         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
13446         Use %<iptr>2 instead of %2 for -masm=intel.
13447         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
13448         avx512f_vcvttss2usi<round_saeonly_name>,
13449         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
13450         -masm=intel.
13451         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
13452         avx512f_vcvttsd2usi<round_saeonly_name>,
13453         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
13454         Use %q1 instead of %1 for -masm=intel.
13455         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
13456         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
13457         of %3 for -masm=intel.
13458         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
13459         -masm=intel.
13460         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
13461         -masm=intel.
13462         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
13463         -masm=intel.
13464         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
13465         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
13466         %g1.
13467         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
13468         -masm=intel.
13469         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
13470         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
13471         %g1 and one with %0 and %1.
13472         (avx512er_vmrcp28<mode><round_saeonly_name>,
13473         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
13474         %1 for -masm=intel.
13475         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
13476         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
13477         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
13478         of %0 and %{%4%} for -masm=intel.
13479         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
13480         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
13481         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
13482         order of %0 and %{%5%}%{z%} for -masm=intel.
13484 2018-04-17  Jan Hubicka  <jh@suse.cz>
13486         PR lto/85405
13487         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
13489 2018-04-17  Martin Liska  <mliska@suse.cz>
13491         PR ipa/85329
13492         * multiple_target.c (create_dispatcher_calls): Set apostrophes
13493         for target_clone error message.  Make default implementation
13494         clone to be a local declaration.
13495         (separate_attrs): Add new argument and check for an empty
13496         string.
13497         (expand_target_clones): Handle it.
13498         (ipa_target_clone): Make redirection just for target_clones
13499         functions.
13501 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
13502             Tom de Vries  <tom@codesourcery.com>
13504         PR middle-end/84955
13505         * omp-expand.c (expand_oacc_for): Add dummy false branch for
13506         tiled basic blocks without omp continue statements.
13508 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
13510         PR target/83660
13511         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
13512         vec_extract expression as having side effects to make sure it gets
13513         a cleanup point.
13515 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
13517         PR target/85403
13518         * config/i386/i386.c (get_builtin_code_for_version): Check
13519         error_mark_node.
13521 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
13523         PR target/84331
13524         * config.gcc: Support "skylake".
13525         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13526         PROCESSOR_SKYLAKE.
13527         * config/i386/i386.c (m_SKYLAKE): Define.
13528         (processor_target_table): Add "skylake".
13529         (ix86_option_override_internal): Add "skylake".
13530         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
13531         PROCESSOR_CANNONLAKE.
13532         (get_builtin_code_for_version): Fix priority for
13533         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
13534         PROCESSOR_SKYLAKE-AVX512.
13535         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
13536         (processor_type): Add PROCESSOR_SKYLAKE.
13538 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
13539             Jason Merrill  <jason@redhat.com>
13541         PR c++/85112
13542         * convert.c (convert_to_integer_1): Use direct recursion for
13543         enumeral types and types with a precision less than the number
13544         of bits in their mode.
13546 2018-04-16  Julia Koval  <julia.koval@intel.com>
13548         PR target/84413
13549         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
13550         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
13552 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
13554         PR target/85293
13555         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
13556         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
13557         and -mno-direct-move.
13559 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
13561         PR target/83402
13562         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
13563         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
13564         Ensure negative shifts result in {0}.
13566 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
13568         PR rtl-optimization/79916
13569         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
13570         regs (if any) to define how to gnerate SD moves when LRA is in
13571         progress.
13573 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
13575         PR rtl-optimization/85393
13576         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
13577         * except.c (expand_dw2_landing_pad_for_region): Make static.
13578         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
13579         a label and unconditional jump to old_bb, rather than
13580         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
13581         basic block.
13583         PR rtl-optimization/85376
13584         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
13585         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
13586         instead of a specific value.
13588 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
13589             Bin Cheng  <bin.cheng@arm.com>
13591         PR tree-optimization/82965
13592         PR tree-optimization/83991
13593         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
13594         by_profile_only parameter.
13595         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
13596         information if the loop was predicted to iterate too many times.
13597         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
13599 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
13601         PR lto/71991
13602         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
13603         always inline.
13605 2018-04-13  Martin Liska  <mliska@suse.cz>
13606             Jakub Jelinek  <jakub@redhat.com>
13608         PR middle-end/81657
13609         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
13610         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
13611         * builtins.c (expand_builtin_memory_copy_args): Use
13612         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
13613         handle dest_addr == pc_rtx.
13615 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
13617         PR target/85291
13618         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
13619         asked to not generate direct moves.
13620         (fix_trunc<mode>si2_stfiwx): Similar.
13621         (fix_trunc<mode>si2_internal): Similar.
13623 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
13625         PR debug/83157
13626         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
13627         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
13628         lookup if dest in some wider mode is known to be const0_rtx and
13629         if so, record permanent equivalence for it to be ZERO_EXTEND of
13630         the narrower mode destination.
13632 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
13634         * lto-streamer-out.c (output_function): Revert 259346.
13635         * omp-expand.c (expand_oacc_for): Likewise.
13637 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
13639         PR rtl-optimization/85354
13640         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
13641         * sel-sched.c (sel_global_init): ... here.
13643 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
13645         PR target/85238
13646         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
13647         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
13648         mode for PE-COFF targets.
13649         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
13650         (i386_pe_asm_lto_end): Likewise.
13651         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
13652         (TARGET_ASM_LTO_END): Likewise.
13653         * config/i386/winnt.c (saved_debug_info_level): New static variable.
13654         (i386_pe_asm_lto_start): New function.
13655         (i386_pe_asm_lto_end): Likewise.
13657 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
13658             Richard Biener  <rguenther@suse.de>
13660         PR middle-end/84955
13661         * lto-streamer-out.c (output_function): Fix CFG loop state before
13662         streaming out.
13663         * omp-expand.c (expand_oacc_for): Handle calls to internal
13664         functions like regular functions.
13666 2018-04-12  Richard Biener  <rguenther@suse.de>
13668         PR lto/85371
13669         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
13670         for the early LTO debug to properly generate references to it
13671         during DIE emission.  Do not re-use that for the skeleton for
13672         split-dwarf.
13673         (dwarf2out_early_finish): Likewise.
13675 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
13677         PR target/85328
13678         * config/i386/sse.md
13679         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
13680         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
13681         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
13682         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
13683         and output is a reg, avoid creating invalid lowpart subreg, but
13684         instead split into a 512-bit move.  Don't split if not AVX512VL,
13685         input is xmm16+ reg and output is a mem.
13686         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
13687         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
13688         xmm16+ reg and output is a mem.
13690 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13692         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
13693         also for flag_dwarf2_cfi_asm.
13695 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
13697         PR rtl-optimization/85342
13698         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
13699         a bool scalar var inside of the loop instead.  Don't try to update
13700         recog_data.operand after failed apply_change_group.
13702 2018-04-12  Tom de Vries  <tom@codesourcery.com>
13704         PR target/85296
13705         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
13706         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
13707         array with flexible array member as array without given dimension.
13708         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
13709         argument for undefined param to true.
13711 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
13713         PR target/85321
13714         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
13715         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
13716         from PowerPC section.
13717         * config/rs6000/sysv4.opt (mcall-): Improve help text.
13718         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
13719         help text that is too long.
13720         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
13721         help text that is too long.
13722         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
13723         help text that is too long.
13725 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
13727         * config/alpha/alpha.md (stack_probe_internal): Rename
13728         from "probe_stack".  Update all callers.
13730 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
13732         PR rtl-optimization/84566
13733         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
13734         sched_macro_fuse_insns.
13736 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
13738         PR target/84301
13739         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
13740         (compute_block_dependences): ... from here.
13742 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
13744         PR tree-optimization/85331
13745         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
13746         from int to HOST_WIDE_INT.
13748 2018-04-11  Martin Jambor  <mjambor@suse.cz>
13750         PR ipa/84149
13751         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
13752         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
13753         not the same as the source val.
13754         (cgraph_edge_brings_value_p): New parameter.
13755         (gather_edges_for_value): Pass destination value to
13756         cgraph_edge_brings_value_p.
13757         (perhaps_add_new_callers): Likewise.
13758         (get_info_about_necessary_edges): Likewise and exclude values brought
13759         only by self-recursive edges.
13760         (create_specialized_node): Redirect only clones of self-calling edges.
13761         (+self_recursive_pass_through_p): New function.
13762         (find_more_scalar_values_for_callers_subset): Use it.
13763         (find_aggregate_values_for_callers_subset): Likewise.
13764         (known_aggs_to_agg_replacement_list): Removed.
13765         (decide_whether_version_node): Re-calculate known constants for all
13766         remaining context clones.
13768 2018-04-11  Richard Biener  <rguenther@suse.de>
13770         PR lto/85339
13771         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
13772         from early DWARF output.
13773         (dwarf2out_early_finish): Output line info unconditionally into
13774         early DWARF and add reference to it.
13776 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
13778         PR target/85281
13779         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
13780         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
13781         other than V2DFmode using iptr mode attribute.
13782         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
13784 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
13786         PR rtl-optimization/84659
13787         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
13789 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
13791         PR debug/85302
13792         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
13793         SIZEP is NULL.
13794         (output_loc_list): Pass address of a dummy size variable even in the
13795         locview handling loop.
13796         (index_location_lists): Add comment on why skip_loc_list_entry can't
13797         call size_of_locs.
13799 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13801         PR target/85261
13802         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
13803         into register.
13805 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
13807         PR target/85321
13808         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
13809         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
13810         and -mstring-compare-inline-limit.
13812 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
13814         PR target/85287
13815         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
13816         for stack clash protection in a register whenever we need it to be in
13817         a register.
13819 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
13821         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
13822         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
13824 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
13826         PR target/85321
13827         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
13828         the help text.
13829         (mlong-double-): Ditto.
13830         * config/rs6000/sysv4.opt (msdata=): Ditto.
13831         (mtls-size=): Ditto.
13833 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13835         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
13836         erroneous entries for
13837         "vector int vec_ldl (int, long int *)", and
13838         "vector unsigned int vec_ldl (int, unsigned long int *)".
13839         Add comments and entries for
13840         "vector bool char vec_ldl (int, bool char *)",
13841         "vector bool short vec_ldl (int, bool short *)",
13842         "vector bool int vec_ldl (int, bool int *)",
13843         "vector bool long long vec_ldl (int, bool long long *)",
13844         "vector pixel vec_ldl (int, pixel *)",
13845         "vector long long vec_ldl (int, long long *)",
13846         "vector unsigned long long vec_ldl (int, unsigned long long *)".
13847         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
13848         type tree bool_long_long_type_node and correct definition of
13849         bool_V2DI_type_node to make reference to this new type tree.
13850         (rs6000_mangle_type): Replace erroneous reference to
13851         bool_long_type_node with bool_long_long_type_node.
13852         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
13853         comments to emphasize sign distinctions for char and int types and
13854         replace RS6000_BTI_bool_long constant with
13855         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
13856         use of RS6000_BTI_pixel.
13857         (bool_long_type_node): Remove this macro definition.
13858         (bool_long_long_type_node): New macro definition
13860 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
13862         PR rtl-optimization/85300
13863         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
13864         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
13865         simplify_unary_operation fails.
13867 2018-04-10  Martin Liska  <mliska@suse.cz>
13869         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
13870         cgraph_edge and ipa_ref.
13872 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
13874         PR target/85177
13875         PR target/85255
13876         * config/i386/sse.md
13877         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
13878         computation of the VEC_MERGE selector from mask.
13879         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
13880         Fix decoding of the VEC_MERGE selector into mask.
13882 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
13884         PR tree-optimization/85286
13885         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
13887 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
13889         * final.c (final_1): Set insn_last_address as well as
13890         insn_current_address.
13892 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13894         PR target/85173
13895         * explow.c (emit_stack_probe): Call validize_mem on memory location
13896         before passing it to gen_probe_stack.  Create address operand and
13897         legitimize it for the probe_stack_address case.
13899 2018-04-09  Jan Hubicka  <jh@suse.cz>
13901         PR lto/85078
13902         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
13903         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
13904         * tree.c (free_lang_data_in_type): Fix handling of binfos;
13905         walk basetypes.
13906         (free_lang_data): Rebuild type inheritance graph.
13908 2018-04-09  Martin Sebor  <msebor@redhat.com>
13910         * invoke.texi (-finline-small-functions): Mention other optimization
13911         options.
13912         (-findirect-inlining, -fpartial-inlining): Same.
13913         (-finline-functions-called-once): Same.
13914         (-freorder-blocks-and-partition): Same.
13916 2018-04-09  Jan Hubicka  <jh@suse.cz>
13918         PR rtl/84058
13919         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
13920         jumps; choose last target that matches the criteria (i.e.
13921         no partition changes for non-crossing jumps).
13922         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
13923         support for redirecting crossing jumps to non-crossing.
13925 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
13927         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
13928         also for naked functions.
13930 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
13932         * config/arc/arc.md (add_shift): New pattern.
13933         (add_shift2): Likewise.
13934         (sub_shift): Likewise.
13935         (sub_shift_cmp0_noout): Likewise.
13936         (compare_si_ashiftsi): Likewise.
13937         (xbfu_cmp0_noout): New combine pattern.
13938         (xbfu_cmp0"): Likewise.
13939         (movsi_set_cc_insn): Place the predicable variant first.
13940         (commutative_binary_cmp0_noout): Remove clobber.
13941         (commutative_binary_cmp0): New pattern.
13942         (noncommutative_binary_cmp0): Likewise.
13943         (noncommutative_binary_cmp0_noout): Likewise.
13944         (noncommutative_binary_comparison_result_used): Removed.
13945         (rsub_cmp0): New pattern.
13946         (rsub_cmp0_noout): Likewise.
13947         (extzvsi): Changed, keep only meaningful variants.
13948         (SQH, SEZ): New iterators.
13949         (SQH_postfix): New mode attribute.
13950         (SEZ_prefix): New code attribute.
13951         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
13952         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
13953         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
13954         of numerical value.
13955         (noncommutative_operator): Check the availability of barrel
13956         shifter option.
13958 2018-04-09  Richard Biener  <rguenther@suse.de>
13960         PR tree-optimization/85284
13961         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
13962         Only use the niter constraining form of simple_iv when the exit
13963         is always executed.
13965 2018-04-09  Tom de Vries  <tom@codesourcery.com>
13967         PR target/84041
13968         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13969         (define_expand "*memory_barrier"): New define_expand.
13970         (define_insn "memory_barrier"): New insn.
13972 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
13974         PR rtl-optimization/80463
13975         PR rtl-optimization/83972
13976         PR rtl-optimization/83480
13978         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
13979         correct producer for the insn.
13980         (tidy_control_flow): Fixup seqnos in case of debug insns.
13982 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
13984         PR rtl-optimization/83913
13986         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
13987         different sched-times when merging exprs.
13989 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
13991         PR rtl-optimization/83962
13993         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
13994         tidy_fallthru_edge and tidy_control_flow.
13996 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
13998         PR rtl-optimization/83530
14000         * sel-sched.c (force_next_insn): New global variable.
14001         (remove_insn_for_debug): When force_next_insn is true, also leave only
14002         next insn in the ready list.
14003         (sel_sched_region): When the region wasn't scheduled, make another pass
14004         over it with force_next_insn set to 1.
14006 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
14008         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
14009         into tm_file.
14010         * config/nds32/constants.md (unspec_volatile_element): Add enum values
14011         for interrupt control.
14012         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
14013         functions for interrupt control.
14014         * config/nds32/nds32-intrinsic.md: Likewise.
14015         * config/nds32/nds32_intrinsic.h: Likewise.
14016         * config/nds32/nds32.h (nds32_builtins): Likewise.
14018 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
14020         * config/nds32/nds32.c (nds32_init_machine_status,
14021         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
14022         strict_aligned_p field.
14023         (nds32_expand_to_rtl_hook): New function.
14024         (TARGET_EXPAND_TO_RTL_HOOK): Define.
14025         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
14027 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
14028             Chung-Ju Wu  <jasonwucj@gmail.com>
14030         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
14031         * config/nds32/nds32-n7.md: New file.
14032         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
14033         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
14034         pipeline.
14035         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
14036         * config/nds32/nds32.md (pipeline_model): Add n7.
14037         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
14038         * config/nds32/pipelines.md: Include n7 settings.
14040 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
14041             Chung-Ju Wu  <jasonwucj@gmail.com>
14043         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
14044         * config/nds32/nds32-e8.md: New file.
14045         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
14046         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
14047         pipeline.
14048         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
14049         * config/nds32/nds32.md (pipeline_model): Add e8.
14050         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
14051         * config/nds32/pipelines.md: Include e8 settings.
14053 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
14054             Chung-Ju Wu  <jasonwucj@gmail.com>
14056         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
14057         * config/nds32/nds32-n8.md: New file.
14058         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
14059         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
14060         pipeline.
14061         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
14062         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
14063         * config/nds32/nds32.md (pipeline_model): Add n8.
14064         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
14065         * config/nds32/pipelines.md: Include n8 settings.
14067 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
14068             Chung-Ju Wu  <jasonwucj@gmail.com>
14070         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
14071         * config/nds32/nds32-n9-2r1w.md: New file.
14072         * config/nds32/nds32-n9-3r2w.md: New file.
14073         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
14074         nds32_register_ports): New or modify for cpu n9.
14075         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
14076         pipeline.
14077         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
14078         * config/nds32/nds32-utils.c: New file.
14079         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
14080         TARGET_MUL_SLOW): Define.
14081         * config/nds32/nds32.md (pipeline_model): New attribute.
14082         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
14083         New options that support cpu n9.
14084         * config/nds32/pipelines.md: Include n9 settings.
14085         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
14087 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
14089         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
14090         information if necessary.
14091         (output_cond_branch_compare_zero): Likewise.
14092         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
14093         (nds32_target_alignment): Refine for alignment.
14094         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
14095         (FUNCTION_BOUNDARY): Modify.
14096         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
14097         align case.
14098         * config/nds32/nds32.opt (malways-align, malign-functions): New.
14100 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
14102         * config/nds32/constants.md (unspec_volatile_element): Add values for
14103         TLB operation and data prefetch.
14104         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
14105         functions for TLB operation and data prefetch.
14106         * config/nds32/nds32-intrinsic.md: Likewise.
14107         * config/nds32/nds32_intrinsic.h: Likewise.
14108         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
14109         (nds32_print_operand): Likewise.
14110         * config/nds32/nds32.h (nds32_builtins): Likewise.
14112 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
14113         Andrew Pinski <pinsika@gcc.gnu.org>
14115         PR middle-end/82976
14116         * match.pd: Use constant_boolean_node of correct type instead of
14117         boolean_true_node or boolean_false_node for simplifying
14118         pointer comparisons to zero.
14120 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
14122         PR tree-optimization/80021
14123         * tree.c (verify_type_variant): Make error call in verify_variant_match
14124         translatable and remove final full stop.
14126 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
14128         * config/nds32/constants.md (unspec_volatile_element): Add
14129         UNSPEC_VOLATILE_EH_RETURN.
14130         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
14131         nds32_output_stack_pop): Support dwarf exception handling process.
14132         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
14133         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
14134         exception handling process.
14135         (nds32_compute_stack_frame): Likewise.
14136         (nds32_return_addr_rtx): Likewise.
14137         (nds32_initial_elimination_offset): Likewise.
14138         (nds32_expand_prologue): Likewise.
14139         (nds32_expand_epilogue): Likewise.
14140         (nds32_dynamic_chain_address): New function.
14141         * config/nds32/nds32.h (machine_function): Add fields for dwarf
14142         exception handling.
14143         (DYNAMIC_CHAIN_ADDRESS): Define.
14144         (EH_RETURN_DATA_REGNO): Define.
14145         (EH_RETURN_STACKADJ_RTX): Define.
14146         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
14147         patterns for dwarf exception handling.
14149 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
14151         * config/nds32/nds32.h: Clean up obsolete macros.
14153 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
14155         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
14156         Add enum values for particular instructions.
14157         * config/nds32/nds32-intrinsic.c: Implementation of expanding
14158         particular intrinsic functions.
14159         * config/nds32/nds32-intrinsic.md: Likewise.
14160         * config/nds32/nds32_intrinsic.h: Likewise.
14161         * config/nds32/nds32.h (nds32_builtins): Likewise.
14162         * config/nds32/nds32.md (type): Add pbsad and pbsada.
14163         (btst, ave): New patterns for particular instructions.
14165 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
14167         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
14168         Add enum values for atomic load/store and memory sync.
14169         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
14170         and memory sync.
14171         * config/nds32/nds32-intrinsic.md: Likewise.
14172         * config/nds32/nds32_intrinsic.h: Likewise.
14173         * config/nds32/nds32.h (nds32_builtins): Likewise.
14175 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
14177         PR tree-optimization/85257
14178         * fold-const.c (native_encode_vector): If not all elts could fit
14179         and off is -1, return 0 rather than offset.
14180         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
14181         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
14182         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
14183         adjust buffer in native_interpret_expr call.
14185 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
14187         * config/nds32/constants.md (unspec_volatile_element): Add cache
14188         control enum values.
14189         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
14190         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
14191         * config/nds32/nds32.c (nds32_cctl_names): New.
14192         (nds32_print_operand): Handle cache control register names.
14193         * config/nds32/nds32.h (nds32_builtins): New enum values.
14194         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
14195         macros.
14196         * config/nds32/nds32.md (type): Add mmu.
14197         * config/nds32/pipelines.md (simple_insn): Add mmu.
14199 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
14201         * config/nds32/nds32.md (type): Remove call.
14202         * config/nds32/pipelines.md (simple_insn): Likewise.
14204 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
14206         * config/nds32/constants.md (unspec_volatile_element): Add
14207         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
14208         UNSPEC_VOLATILE_FMFCFG.
14209         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
14210         description for fmfcfg and fmfcsr.
14211         (bdesc_1arg): Add fmtcsr.
14212         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
14213         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
14214         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
14215         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
14216         unspec_fmfcfg): New patterns.
14217         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
14218         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
14219         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
14220         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
14221         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
14222         __nds32__fmfcfg): Define.
14224 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
14226         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
14227         intrinsic register names.
14228         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
14229         intrinsic register enum values and macros.
14231 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
14233         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
14234         for load/store addressing form.
14235         (nds32_print_operand_address): Likewise.
14237 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
14239         PR target/85196
14240         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
14241         based on LABEL_REF.  Remove useless assertion.
14242         (pic_address_needs_scratch): Fix formatting.
14243         (sparc_legitimize_pic_address): Minor tweaks.
14244         (sparc_delegitimize_address): Adjust assertion accordingly.
14245         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
14246         into symbolic_operand.
14247         (movsi_high_pic_label_ref): Likewise.
14248         (movsi_lo_sum_pic_label_ref): Likewise.
14249         (movdi_pic_label_ref): Likewise.
14250         (movdi_high_pic_label_ref): Likewise.
14251         (movdi_lo_sum_pic_label_ref): Likewise.
14253 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
14255         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
14256         custom LIB_SPEC setup.
14258 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
14259             Kito Cheng  <kito.cheng@gmail.com>
14261         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
14262         * config/riscv/freebsd.h: New.
14264 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
14266         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
14267         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
14268         file.
14270 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
14271             Kito Cheng  <kito.cheng@gmail.com>
14273         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
14274         nds32_output_call, nds32_symbol_binds_local_p): New functions.
14275         * config/nds32/nds32-protos.h (nds32_output_call,
14276         nds32_output_return): Declare.
14277         * config/nds32/nds32.md: Refine all the call and return patterns.
14279 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
14281         PR debug/85252
14282         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
14283         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
14285         PR rtl-optimization/84872
14286         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
14287         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
14288         EDGE_CROSSING edge.
14290 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
14292         * expr.c (copy_blkmode_to_reg): Revert 254862.
14293         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
14295 2018-04-06  Richard Biener  <rguenther@suse.de>
14297         PR middle-end/85244
14298         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
14299         after seeing a component reference with an adjacent field.  Treat
14300         refs to arrays at struct end of external decls similar to
14301         refs to unconstrained commons.
14303 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
14305         PR sanitizer/85213
14306         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
14307         look through SAVE_EXPRs with non-side-effects argument.  Adjust
14308         recursive calls.
14309         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
14310         save_p here.
14312 2018-04-06  Richard Biener  <rguenther@suse.de>
14314         PR middle-end/85180
14315         * alias.c (find_base_term): New wrapper around find_base_term
14316         unwinding CSELIB_VAL_PTR changes.
14317         (find_base_term): Do not restore CSELIB_VAL_PTR during the
14318         recursion.
14320 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
14322         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
14323         instructions.
14324         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
14325         constant definitions.
14326         ("nop"): lr 0,0 -> nopr r0
14327         ("nop_lr0", "nop_lr1"): New insn definitions.
14329 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
14331         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
14332         NDS32_V3PUSH_AVAILABLE_P macro.
14334 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
14335             Chung-Ju Wu  <jasonwucj@gmail.com>
14337         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
14338         (nds32*-*-*): Add float and fpu_config into supported_defaults.
14339         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
14340         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
14341         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
14342         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
14343         * config/nds32/constraints.md: New constraints and checking for hard
14344         float configuration.
14345         * config/nds32/iterators.md: New mode iterator and attribute for hard
14346         float configuration.
14347         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
14348         patterns.
14349         * config/nds32/nds32-fpu.md: New file.
14350         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
14351         deal with hard float code generation.
14352         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
14353         ARCH_V3S.
14354         (abi_type, float_reg_number): New enum type.
14355         * config/nds32/nds32-predicates.c: New predicates for hard float.
14356         * config/nds32/nds32-protos.h: Declare functions for hard float.
14357         * config/nds32/nds32.c: Implementation for hard float configuration.
14358         * config/nds32/nds32.h: Definitions for hard float configuration.
14359         * config/nds32/nds32.md: Include hard float machine description and
14360         modify patterns for hard float configuration.
14361         * config/nds32/nds32.opt: New options for hard float configuration.
14362         * config/nds32/predicates.md: New predicates for hard float
14363         configuration.
14365 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
14367         * common/config/nds32/nds32-common.c
14368         (nds32_option_optimization_table): Enable -mreleax-hint by default.
14370 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
14372         PR middle-end/85195
14373         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
14374         CONSTRUCTOR_ELT (ctor, ...)->value.
14376 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
14378         PR target/85193
14379         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
14381 2018-04-05  Tom de Vries  <tom@codesourcery.com>
14383         PR target/85204
14384         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
14385         cond jump.
14387 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
14388             Kito Cheng  <kito.cheng@gmail.com>
14390         * config/nds32/constraints.md (U33): Fine-tune checking condition.
14391         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
14392         * config/nds32/nds32.h (nds32_16bit_address_type): Add
14393         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
14395 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
14396             Kito Cheng  <kito.cheng@gmail.com>
14398         * config/nds32/constraints.md (Ufe): New memory constraint.
14399         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
14400         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
14401         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
14402         operands.
14403         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
14404         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
14406 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
14408         * config/nds32/nds32.md: Use optimize_size in the condition for
14409         alu-shift instructions.
14411 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
14413         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
14415 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
14417         * config/nds32/nds32.md (negsi2): Refine pattern.
14419 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
14420             Chung-Ju Wu  <jasonwucj@gmail.com>
14422         * config/nds32/iterators.md (shift_rotate): New code iterator.
14423         (shift): New code attribute.
14424         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
14425         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
14426         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
14427         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
14428         bit-wise operations.
14429         (andsi3, *andsi3): Ditto.
14430         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
14431         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
14432         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
14433         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
14434         nds32_ior_operand, nds32_xor_operand): New predicates.
14436 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
14438         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
14439         (addsi3, subsi3): ... this.
14441 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
14443         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
14445 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
14447         * config/nds32/nds32.md: Adjust indention.
14449 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
14451         * config/nds32/nds32.md (feature): New attribute.
14453 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
14455         * config/nds32/nds32.md (subtype): New attribute.
14457 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
14459         PR target/85203
14460         * config/arm/arm-builtins.c (arm_expand_builtin): Change
14461         expansion to perform a bitwise AND of the argument followed by a
14462         boolean negation of the result.
14464 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
14466         PR rtl-optimization/84878
14467         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
14468         the basic block.  Assert the use reference is not artificial and that
14469         it has an associated insn.
14471 2018-04-04  Michael Matz  <matz@suse.de>
14473         * builtins.c (compute_objsize): Pass correct operand
14474         to array_at_struct_end_p.
14476 2018-04-04  Richard Biener  <rguenther@suse.de>
14478         PR lto/85176
14479         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
14480         from contexts for DINFO_LEVEL_TERSE and below.
14482 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
14484         * config/nds32/nds32-doubleword.md (move_<mode>): Require
14485         resiter_operand condition.
14486         * config/nds32/nds32.md (*move<mode>): Ditto.
14488 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
14489             Monk Chiang  <sh.chiang04@gmail.com>
14491         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
14493 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
14495         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
14497 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
14498             Kito Cheng  <kito.cheng@gmail.com>
14500         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
14501         nds32_cond_code_str, output_cond_branch,
14502         output_cond_branch_compare_zero, nds32_expand_cbranch,
14503         nds32_expand_cstore, nds32_expand_movcc,
14504         nds32_output_cbranchsi4_equality_zero,
14505         nds32_output_cbranchsi4_equality_reg,
14506         nds32_output_cbranchsi4_equality_reg_or_const_int,
14507         nds32_output_cbranchsi4_greater_less_zero: New functions.
14508         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
14509         nds32_expand_cstore, nds32_expand_movcc,
14510         nds32_output_cbranchsi4_equality_zero,
14511         nds32_output_cbranchsi4_equality_reg,
14512         nds32_output_cbranchsi4_equality_reg_or_const_int,
14513         nds32_output_cbranchsi4_greater_less_zero): Declare.
14514         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
14515         nds32_rimm11s_operand): New predicates.
14516         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
14517         * config/nds32/nds32.md: Rewrite all the branch and conditional move
14518         patterns.
14520 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
14522         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
14523         * config/nds32/nds32.md: Ditto.
14524         * config/nds32/pipelines.md: Ditto.
14526 2018-04-04  Richard Biener  <rguenther@suse.de>
14528         PR tree-optimization/85168
14529         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
14530         propagating abnormals.
14532 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
14534         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
14536 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
14537             Kito Cheng  <kito.cheng@gmail.com>
14539         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
14540         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
14541         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
14542         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
14543         * config/nds32/nds32.md (sibcall_internal): New.
14544         (sibcall_register): Remove.
14545         (sibcall_immediate): Remove.
14546         (sibcall_value_internal): New.
14547         (sibcall_value_register): Remove.
14548         (sibcall_value_immediate): Remove.
14549         * config/nds32/predicates.md (nds32_general_register_operand): New.
14550         (nds32_call_address_operand): New.
14552 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
14554         PR rtl-optimization/85167
14555         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
14556         bb_defs if *split_p, instead preinitialize it to NULL.
14558         PR tree-optimization/85156
14559         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
14560         evaluating the argument multiple times.
14562 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
14564         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
14565         than vector.
14566         (_mm_cvtpd_ps): Likewise.
14567         (_mm_cvttpd_epi32): Likewise.
14568         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
14569         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
14570         vector, pixel, and bool following altivec.h include.
14572 2018-04-03  Martin Sebor  <msebor@redhat.com>
14574         * doc/extend.texi (Common Function Attributes): Clarify.
14575         (const attribute): Likewise.
14576         (pure attribute): Likewise.
14578 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
14580         PR target/85169
14581         * config/i386/i386.c (ix86_expand_vector_set): Use
14582         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
14584 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
14586         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
14587         instructions when changing rounding bits to preserve precision bits
14588         in the x87 control word.
14590 2018-04-03  Martin Liska  <mliska@suse.cz>
14592         PR tree-optimization/82491
14593         * rtl.h (strip_offset_and_add): Replace += suboffset with
14594         poly_uint64 () + suboffset.
14596 2018-03-29  Martin Liska  <mliska@suse.cz>
14597             Martin Jambor  <mjambor@suse.cz>
14599         PR ipa/84947
14600         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
14601         param_type is not an integral or pointer type.
14603 2018-04-03  Richard Biener  <rguenther@suse.de>
14605         * sese.h (recompute_all_dominators): Remove.
14607 2018-04-02  Martin Sebor  <msebor@redhat.com>
14609         * doc/invoke.texi (-Wrestrict): Fix typos.
14611 2018-04-02  Jim Wilson  <jimw@sifive.com>
14613         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
14614         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
14615         (<optab>di3, <optab>si3_extend): Likewise.
14616         (<optab>si3_mask, <optab>si3_mask_1): New.
14617         (<optab>di3_mask, <optab>di3_mask_1): New.
14618         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
14619         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
14620         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
14622 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
14624         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
14625         example.
14627 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
14629         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
14630         (nds32_canonicalize_comparison): New function.
14632 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
14633             Kito Cheng  <kito.cheng@gmail.com>
14634             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
14636         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
14637         * config/nds32/constants.md (unspec_volatile_element): Add
14638         UNSPEC_VOLATILE_RELAX_GROUP.
14639         * config/nds32/nds32-relax-opt.c: New file.
14640         * config/nds32/nds32-predicates.c
14641         (nds32_symbol_load_store_p): New function.
14642         * config/nds32/nds32-protos.h
14643         (nds32_symbol_load_store_p): Declare function.
14644         (make_pass_nds32_relax_opt): Declare new rtl pass function.
14645         * config/nds32/nds32.c
14646         (nds32_register_pass): New function to register pass.
14647         (nds32_register_passes): New function to register passes.
14648         * config/nds32/nds32.md (relax_group): New pattern.
14649         * config/nds32/nds32.opt (mrelax-hint): New option.
14650         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
14652 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
14654         * config/nds32/t-nds32: Modify files dependency.
14656 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
14658         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
14659         (PROFILE_HOOK): Define its implementation.
14661 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
14663         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
14664         type and 32-bit size.
14666 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
14668         PR middle-end/85090
14669         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
14670         (V_128_256): New mode iterator.
14671         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
14672         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
14673         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
14674         of V.
14675         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
14676         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
14678 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
14680         PR target/83315
14681         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
14682         NaN inputs correctly.
14684 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
14686         PR target/80546
14687         * config/rs6000/vsx.md (??r): New mode attribute.
14688         (*vsx_mov<mode>_64bit): Use it.
14689         (*vsx_mov<mode>_32bit): Likewise.
14691 2018-03-30  Martin Sebor  <msebor@redhat.com>
14693         PR tree-optimization/84818
14694         * builtins.c (check_access): Use warning_n.
14696 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14698         PR target/83822
14699         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
14700         condition.
14701         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
14702         condition.
14704 2018-03-30  Julia Koval  <julia.koval@intel.com>
14706         PR target/84413
14707         * x86-tune.def (movx, partial_reg_dependency): Enable for
14708         m_SKYLAKE_AVX512.
14710 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
14712         PR inline-asm/84985
14713         * lra-constraints.c (process_alt_operands): Move setting
14714         this_alternative_matches below.
14716 2018-03-29  Martin Liska  <mliska@suse.cz>
14718         PR lto/84995.
14719         * doc/invoke.texi: Document how LTO works with debug info.
14720         Describe auto-load support of binutils.  Mention 'x86-64'
14721         as valid option value of -march option.
14723 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
14725         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
14727         PR c/85094
14728         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
14729         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
14730         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
14731         checking.
14733 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
14735         PR target/84912
14736         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
14737         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
14738         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
14739         for RS6000_BTM_POWERPC64.
14740         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
14741         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
14742         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
14743         definition.
14744         (DIVDE): Use it.
14745         (DIVDEU): Likewise.
14747 2018-03-28  Carl Love  <cel@us.ibm.com>
14749         Revert
14750         2017-09-27  Carl Love  <cel@us.ibm.com>
14752         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
14753         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
14754         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
14755         fctiw instruction.
14757 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14759         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
14760         instead of __vector bool.
14761         (_mm_max_pu8): Likewise.
14762         (_mm_min_pi16): Likewise.
14764 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
14766         PR target/84912
14767         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
14768         (DIVWEUO): Likewise.
14769         (DIVDEO): Likewise.
14770         (DIVDEUO): Likewise.
14771         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
14772         DIVWEUO and DIVDEUO.
14773         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
14774         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
14775         (div_extend): Likewise.
14776         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
14777         builtin function.
14778         (__builtin_divweuo): Likewise.
14779         (__builtin_divdeo): Likewise.
14780         (__builtin_divdeuo): Likewise.
14782 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
14784         PR target/85095
14785         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
14786         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
14788         PR tree-optimization/82004
14789         * gimple-match-head.c (optimize_pow_to_exp): New function.
14790         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
14791         Don't fold to exp if optimize_pow_to_exp is false.
14793 2018-03-28  Martin Liska  <mliska@suse.cz>
14795         PR other/84819
14796         * calls.c (initialize_argument_information): Fix trailing space.
14797         * common.opt: Fix typo and provide better explanation for
14798         -fsanitize-coverage option.
14799         * config/i386/i386.opt: Fix typo.
14801 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
14802             Martin Liska  <mliska@suse.cz>
14804         PR sanitizer/85081
14805         * gimplify.c (asan_poison_variable): Don't do the check for
14806         gimplify_omp_ctxp here.
14807         (gimplify_decl_expr): Do it here.
14808         (gimplify_target_expr): Likewise.
14810 2018-03-28  Martin Liska  <mliska@suse.cz>
14812         PR target/84988
14813         * config/i386/i386.c (ix86_function_arg_advance): Do not call
14814         chkp_type_bounds_count if MPX is not enabled.
14816 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
14818         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
14820 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
14822         PR target/84914
14823         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
14824         function to create the function decl for complex long double
14825         multiply and divide for -mabi=ieeelongdouble.
14826         (init_float128_ieee): Call it.
14828 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
14830         PR target/85044
14831         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
14832         -fcf-protection=branch -mibt.
14833         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
14835 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
14837         PR target/81863
14838         * config/arm/arm.c (arm_valid_symbolic_address): Handle
14839         arm_word_relocations.
14841 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
14843         PR target/85056
14844         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
14845         extern array declarations.
14847 2018-03-27  Richard Biener  <rguenther@suse.de>
14849         PR middle-end/84067
14850         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
14851         explicit single_use checks.
14853 2018-03-27  Richard Biener  <rguenther@suse.de>
14855         PR tree-optimization/85082
14856         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
14857         Valueize the VUSE.
14859 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
14861         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
14862         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
14863         Turn on fasynchronous-unwind-tables and funwind-tables.
14865 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
14867         PR target/85073
14868         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
14869         (*bmi_blsr_<mode>_ccz): Ditto.
14871 2018-03-26  Tom de Vries  <tom@codesourcery.com>
14873         PR tree-optimization/85063
14874         * omp-general.c (offloading_function_p): New function.  Factor out
14875         of ...
14876         * omp-offload.c (pass_omp_target_link::gate): ... here.
14877         * omp-general.h (offloading_function_p): Declare.
14878         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
14879         with attribute omp declare target for offloading functions.
14881 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
14883         PR tree-optimization/84005
14884         * tree-data-ref.h (get_base_for_alignment): Declare.
14885         * tree-data-ref.c (get_base_for_alignment_1): New function.
14886         (get_base_for_alignment): Likewise.
14887         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
14888         get_base_for_alignment to find a suitable base object, instead
14889         of always using drb->base_address.
14891 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
14893         PR inline-asm/85022
14894         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
14895         known size by default.
14897 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
14899         PR inline-asm/85030
14900         * lra-constraints.c (process_alt_operands): Don't match BLKmode
14901         and non BLKmode operands.
14903 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14905         PR target/85026
14906         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
14907         Clean up attributes.
14909 2018-03-23  Richard Biener  <rguenther@suse.de>
14911         PR debug/85020
14912         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
14913         we are going to emit early debug for LTO.
14915 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
14917         PR inline-asm/85034
14918         * function.c (match_asm_constraints_1): Don't optimize if input
14919         doesn't satisfy general_operand predicate for output's mode.
14921         PR inline-asm/85022
14922         * alias.c (write_dependence_p): Don't require for x_canonicalized
14923         non-VOIDmode if x has VOIDmode.
14925         PR sanitizer/85029
14926         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
14927         just don't try to optimize it rather than assert it never happens.
14929 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14931         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
14932         macro expansions for definition of ST_INTERNAL_<mode> and
14933         LD_INTERNAL_<mode> builtins.
14934         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
14935         Remove prototype.
14936         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
14937         function.
14938         (altivec_expand_st_builtin): Likewise.
14939         (altivec_expand_builtin): Remove calls to deleted functions.
14940         (rs6000_address_for_altivec): Delete this function.
14941         * config/rs6000/vector.md: Remove expands for
14942         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
14944 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
14946         PR target/84826
14947         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
14948         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
14949         re-computing once computed.
14950         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
14951         (arm_init_machine_status): Initialize
14952         machine->static_chain_stack_bytes.
14954 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14956         PR target/84760
14957         * doc/extend.texi: Add four new prototypes for vec_ld.
14958         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
14959         definitions for more logical presentation.
14960         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
14961         entries for V1TI variants of __builtin_altivec_ld builtin.
14962         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
14963         handling of V1TI variant of LVX icode pattern.
14964         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
14965         (rs6000_gimple_fold_builtin): Likewise.
14966         (altivec_init_builtins): Add code to define
14967         __builtin_altivec_lvx_v1ti function.
14969 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
14971         PR inline-asm/84941
14972         * function.c (match_asm_constraints_1): Don't do the optimization
14973         if input isn't a REG, SUBREG, MEM or constant.
14975 2018-03-22  Tom de Vries  <tom@codesourcery.com>
14977         PR tree-optimization/84956
14978         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
14979         bb_has_abnormal_pred.
14981 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
14983         PR sanitizer/85018
14984         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
14985         DECL_INITIAL (decl) to decl at the end.
14986         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
14987         adjust the comment.
14989 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
14991         * doc/extend.texi (__builtin_tgmath): Document when complex
14992         integer types are treated as _Complex _Float64.
14994 2018-03-21  Tom de Vries  <tom@codesourcery.com>
14996         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
14998 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
15000         PR tree-optimization/84960
15001         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
15002         if it is ENTRY block, move them into single succ of ENTRY in that case.
15004 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
15006         PR tree-optimization/84811
15007         * poly-int.h (poly_span_traits): Remove the T3 parameter and
15008         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
15009         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
15010         (known_subrange_p): Update accordingly.  Cast each value involved
15011         in the size comparison, rather than casting the result of the
15012         subtraction.
15014 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
15016         PR tree-optimization/84982
15017         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
15018         by flipping the least significant bit rather than all bits from
15019         bitpos to bitpos + bitsize - 1.
15021 2018-03-21  Nathan Sidwell  <nathan@acm.org>
15023         * doc/extend.texi (Deprecated Features): Remove mention of
15024         long-deleted deprecations.
15026 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15028         PR jit/84288
15029         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
15030         * configure: Regenerate.
15032 2018-03-21  Tom de Vries  <tom@codesourcery.com>
15034         PR tree-optimization/83126
15035         * tree-parloops.c (num_phis): New function.
15036         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
15038 2018-03-21  Nathan Sidwell  <nathan@acm.org>
15040         * doc/extend.texi (Deprecated Features): Update deprecated flags,
15041         mention anon-struct/union members and trailing attributes.
15043 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
15045         PR tree-optimization/84969
15046         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
15047         builtin memset partitions if they set different rhs values.
15049 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
15051         PR rtl-optimization/84989
15052         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
15053         VEC_DUPLICATE with scalar result mode.
15055 2018-03-21  Martin Liska  <mliska@suse.cz>
15057         PR ipa/84963
15058         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
15059         not intended return statement.
15061 2018-03-21  Martin Liska  <mliska@suse.cz>
15063         PR target/84988
15064         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
15065         (chkp_find_bound_slots_1): Limit number of iterations.
15067 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
15069         PR target/84838
15070         * Minor grammar fixes for x86 options.
15072 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
15074         PR debug/84875
15075         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
15076         holding REG_CFA_RESTORE notes, instead turn them into a USE.
15078 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
15080         PR target/83789
15081         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
15082         (altivec_lvx_<mode>_1op): Likewise.
15083         (altivec_stvx_<mode>_2op): Likewise.
15084         (altivec_stvx_<mode>_1op): Likewise.
15085         (altivec_lvx_<VM2:mode>): New define_expand.
15086         (altivec_stvx_<VM2:mode>): Likewise.
15087         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
15088         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
15089         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
15090         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
15091         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
15092         (rs6000_gen_lvx): Likewise.
15093         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
15094         (altivec_expand_stv_builtin): Likewise.
15095         (altivec_expand_builtin): Likewise.
15096         * config/rs6000/vector.md: Likewise.
15098 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15100         PR target/82518
15101         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
15102         BYTES_BIG_ENDIAN.
15104 2018-03-20  Richard Biener  <rguenther@suse.de>
15106         PR target/84986
15107         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
15108         sign-conversions as zero, fall back to standard scalar_stmt
15109         cost for the rest.
15111 2018-03-20  Martin Liska  <mliska@suse.cz>
15113         PR ipa/84825
15114         * predict.c (rebuild_frequencies): Handle case when we have
15115         PROFILE_ABSENT, but flag_guess_branch_prob is false.
15117 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
15119         PR target/84990
15120         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
15121         flag_section_anchors.
15122         * varasm.c (use_blocks_for_decl_p): Remove hack for
15123         dw2_force_const_mem.
15125         PR target/84845
15126         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
15127         to ...
15128         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
15129         be created, use lowpart_subreg of operands[0] rather than operands[0]
15130         itself.
15131         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
15132         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
15133         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
15134         and n constraint instead of aarch64_shift_imm_di and Usd.
15135         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
15136         (*aarch64_<optab>_reg_minus<mode>3): ... this.
15138 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
15140         PR target/82989
15141         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
15142         to favor GPR over NEON registers.
15143         (<shift>di3_neon): Likewise.
15145 2018-03-20  Tom de Vries  <tom@codesourcery.com>
15147         PR target/84952
15148         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
15149         (nvptx_process_pars): Emit bar.sync asap and alap.
15151 2018-03-20  Tom de Vries  <tom@codesourcery.com>
15153         PR target/84954
15154         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
15155         seen_label if seen_label is already set.
15157 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
15159         PR target/84945
15160         * config/i386/i386.c (fold_builtin_cpu): For features above 31
15161         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
15162         Use 1U instead of 1.  Formatting fixes.
15164         PR c/84953
15165         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
15166         instead of TREE_TYPE (s1) for the return value.
15168 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
15170         PR tree-optimization/84946
15171         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
15172         bitsize + bitsize in poly_uint64 rather than poly_int64.
15174         PR sanitizer/78651
15175         * dwarf2asm.c: Include fold-const.c.
15176         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
15177         of decl rather than decl itself.
15179         PR rtl-optimization/84643
15180         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
15182 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
15184         PR sanitizer/78651
15185         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
15186         calling assemble_variable.
15188 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
15190         PR target/81647
15191         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
15192         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
15194 2018-03-19  Jim Wilson  <jimw@sifive.com>
15196         PR bootstrap/84856
15197         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
15198         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
15199         (riscv_first_stack_step): Likewise.
15200         (riscv_option_override): Use STACK_BOUNDARY instead of
15201         MIN_STACK_BOUNDARY.
15202         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
15203         MIN_STACK_BOUNDARY.
15204         (BIGGEST_ALIGNMENT): Set to 128.
15205         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
15206         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
15207         STACK_BOUNDARY.
15209 2018-03-19  Richard Biener  <rguenther@suse.de>
15211         PR tree-optimization/84933
15212         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
15213         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
15215 2018-03-19  Richard Biener  <rguenther@suse.de>
15217         PR tree-optimization/84859
15218         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
15219         (cond_if_else_store_replacement): Perform sinking operation on
15220         single-store BBs regardless of MAX_STORES_TO_SINK setting.
15221         Generalize what a BB with a single eligible store is.
15223 2018-03-19  Richard Biener  <rguenther@suse.de>
15225         PR tree-optimization/84929
15226         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
15227         chrec_is_positive against non-chrec arg.
15229 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
15231         PR target/84711
15232         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
15234 2018-03-18  Martin Liska  <mliska@suse.cz>
15236         PR rtl-optimization/84635
15237         * regrename.c (build_def_use): Use matches_mode only when
15238         matches >= 0.
15240 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
15242         PR tree-optimization/84913
15243         * tree-vect-loop.c (vectorizable_reduction): Don't try to
15244         vectorize chains of COND_EXPRs.
15246 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
15248         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
15250 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
15252         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
15254 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
15256         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
15258 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
15259             Kito Cheng  <kito.cheng@gmail.com>
15261         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
15262         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
15263         (nds32_adjust_reg_alloc_order): New function.
15264         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
15266 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
15268         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
15269         nds32_print_operand, nds32_print_operand_address): Use
15270         HOST_WIDE_INT_PRINT_DEC instead.
15272 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
15274         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
15276 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
15278         PR target/84902
15279         * config/i386/i386.c (initial_ix86_tune_features,
15280         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
15281         unsigned long long.
15282         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
15283         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
15284         rather than 1u << ix86_tune.  Formatting fix.
15285         (ix86_option_override_internal): Change ix86_arch_mask from
15286         unsigned int to unsigned HOST_WIDE_INT, initialize to
15287         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
15288         (ix86_function_specific_restore): Likewise.
15290 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
15292         PR target/84899
15293         * postreload.c (reload_combine_recognize_pattern): Perform
15294         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
15295         truncate_int_for_mode the result for the destination's mode.
15297         PR c/84909
15298         * hsa-gen.c (mem_type_for_type): Fix comment typo.
15299         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
15300         Likewise.
15301         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
15302         Likewise.
15304 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
15306         PR target/84876
15307         * lra-assigns.c (lra_split_hard_reg_for): Don't use
15308         regno_allocno_class_array and sorted_pseudos.
15309         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
15310         insns where regno is used.
15312 2018-03-16  Martin Liska  <mliska@suse.cz>
15314         PR ipa/84833
15315         * multiple_target.c (create_dispatcher_calls): Redirect
15316         reference in the symbol table.
15318 2018-03-16  Martin Liska  <mliska@suse.cz>
15320         PR ipa/84722
15321         * multiple_target.c (create_dispatcher_calls): Redirect also
15322         an alias.
15324 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
15326         PR c++/79937
15327         PR c++/82410
15328         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
15329         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
15330         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
15332 2018-03-16  Julia Koval  <julia.koval@intel.com>
15334         * doc/invoke.texi (Skylake Server): Add CLWB.
15335         Cannonlake): Remove CLWB.
15337 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
15339         PR tree-optimization/84841
15340         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
15341         1 << 3.
15342         (FLOAT_ONE_CONST_TYPE): Define.
15343         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
15344         (sort_by_operand_rank): Put entries with higher constant_type last
15345         rather than first to match comments.
15347 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
15349         * config/nios2/nios2.md (movsi_internal): Fix thinko in
15350         split predicate.
15352 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
15354         PR c++/79085
15355         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
15356         check and use address of target always.
15358 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
15360         PR target/84574
15361         * config/i386/i386.c (indirect_thunk_needed): Update comments.
15362         (indirect_thunk_bnd_needed): Likewise.
15363         (indirect_thunks_used): Likewise.
15364         (indirect_thunks_bnd_used): Likewise.
15365         (indirect_return_needed): New.
15366         (indirect_return_bnd_needed): Likewise.
15367         (output_indirect_thunk_function): Add a bool argument for
15368         function return.
15369         (output_indirect_thunk_function): Don't generate alias for
15370         function return thunk.
15371         (ix86_code_end): Call output_indirect_thunk_function to generate
15372         function return thunks.
15373         (ix86_output_function_return): Set indirect_return_bnd_needed
15374         and indirect_return_needed instead of indirect_thunk_bnd_needed
15375         and indirect_thunk_needed.
15377 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
15379         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
15380         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
15381         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
15383 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
15384             Paul Hua <paul.hua.gm@gmail.com>
15386         PR c/84852
15387         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
15389 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
15391         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
15392         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
15393         resp. SFmode cases.
15395 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
15397         PR target/84711
15398         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
15399         instead of GET_MODE_SIZE when comparing Units.
15401 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
15403         PR target/68256
15404         * varasm.c (hash_section): Return an unchangeble hash value
15405         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
15406         Return !aarch64_can_use_per_function_literal_pools_p ().
15408 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
15410         PR target/84860
15411         * optabs.c (emit_conditional_move): Pass address of cmode's copy
15412         rather than address of cmode as last argument to prepare_cmp_insn.
15414 2018-03-15  Julia Koval  <julia.koval@intel.com>
15416         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
15417         F_AVX512VNNI, F_AVX512BITALG): New.
15419 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
15421         PR target/83451
15422         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
15423         insn for floating-point loads and stores.
15425 2018-03-14  Carl Love  <cel@us.ibm.com>
15427         * config/rs6000/rs6000-c.c: Add macro definitions for
15428         ALTIVEC_BUILTIN_VEC_PERMXOR.
15429         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
15430         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
15431         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
15432         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
15433         UNSPEC_VPERMXOR.
15434         * config/doc/extend.texi: Add prototypes for vec_permxor.
15436 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
15438         PR c/84852
15439         * diagnostic-show-locus.c (class layout_point): Convert m_line
15440         from int to linenum_type.
15441         (line_span::comparator): Use linenum "compare" function when
15442         comparing line numbers.
15443         (test_line_span): New function.
15444         (layout_range::contains_point): Convert param "row" from int to
15445         linenum_type.
15446         (layout_range::intersects_line_p): Likewise.
15447         (layout::will_show_line_p): Likewise.
15448         (layout::print_source_line): Likewise.
15449         (layout::should_print_annotation_line_p): Likewise.
15450         (layout::print_annotation_line): Likewise.
15451         (layout::print_leading_fixits): Likewise.
15452         (layout::annotation_line_showed_range_p): Likewise.
15453         (struct line_corrections): Likewise for field m_row.
15454         (line_corrections::line_corrections): Likewise for param "row".
15455         (layout::print_trailing_fixits): Likewise.
15456         (layout::get_state_at_point): Likewise.
15457         (layout::get_x_bound_for_row): Likewise.
15458         (layout::print_line): Likewise.
15459         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
15460         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
15461         * input.c (selftest::test_linenum_comparisons): New function.
15462         (selftest::input_c_tests): Call it.
15463         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
15464         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
15465         * selftest.h (ASSERT_GT): New macro.
15466         (ASSERT_GT_AT): New macro.
15467         (ASSERT_LT): New macro.
15468         (ASSERT_LT_AT): New macro.
15470 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
15472         PR rtl-optimization/84780
15473         * combine.c (distribute_links): Don't make a link based on pc_rtx.
15475 2018-03-14  Martin Liska  <mliska@suse.cz>
15477         * tree.c (record_node_allocation_statistics): Use
15478         get_stats_node_kind.
15479         (get_stats_node_kind): New function extracted from
15480         record_node_allocation_statistics.
15481         (free_node): Use get_stats_node_kind.
15483 2018-03-14  Richard Biener  <rguenther@suse.de>
15485         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
15486         that the value-set of ANTIC_IN doesn't grow.
15488         Revert
15489         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
15490         member.
15491         (BB_VISITED_WITH_VISITED_SUCCS): New define.
15492         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
15494 2018-03-14  Julia Koval  <julia.koval@intel.com>
15496         * config.gcc (icelake-client, icelake-server): New.
15497         (icelake): Remove.
15498         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
15499         (initial_ix86_arch_features): Ditto.
15500         (PTA_SKYLAKE): Add SGX.
15501         (PTA_ICELAKE): Remove.
15502         (PTA_ICELAKE_CLIENT): New.
15503         (PTA_ICELAKE_SERVER): New.
15504         (ix86_option_override_internal): Split up icelake on icelake client and
15505         icelake server.
15506         (get_builtin_code_for_version): Ditto.
15507         (fold_builtin_cpu): Ditto.
15508         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
15509         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
15510         * config/i386/i386.h (processor_type): Ditto.
15511         * doc/invoke.texi: Ditto.
15513 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
15515         PR sanitizer/83392
15516         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
15517         INTEGER_CST offset, add it together with bitpos / 8 and
15518         sign extend based on POINTER_SIZE.
15520         PR target/84844
15521         Revert
15522         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
15524         PR target/78090
15525         * config/i386/constraints.md (Yc): New register constraint.
15526         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
15527         Use Yc constraint for alternative 2 of operand 0.  Remove
15528         preferred_for_speed attribute.
15530 2018-03-14  Richard Biener  <rguenther@suse.de>
15532         PR tree-optimization/84830
15533         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
15534         with the old one to avoid oscillations.
15536 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
15538         PR target/83712
15539         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
15540         pseudos.
15541         (assign_by_spills): Return a flag of reload assignment failure.
15542         Do not process the reload assignment failures.  Do not spill other
15543         reload pseudos if they has the same reg class.  Update n if
15544         necessary.
15545         (lra_assign): Add a return arg.  Set up from the result of
15546         assign_by_spills call.
15547         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15548         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
15549         usage_insns if it is not NULL.
15550         (spill_hard_reg_in_range): New function.
15551         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15552         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15553         function prototypes.
15554         (lra_assign): Change prototype.
15555         * lra.c (lra): Add code to deal with fails by splitting hard reg
15556         live ranges.
15558 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
15560         * config/riscv/riscv.opt (mrelax): New option.
15561         * config/riscv/riscv.c (riscv_file_start): Emit ".option
15562         "norelax" when riscv_mrelax is disabled.
15563         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
15565 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
15567         PR target/84743
15568         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
15569         reassociation for int modes.
15571 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
15573         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
15574         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
15575         for big-endian.
15576         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
15577         * config/aarch64/aarch64-sve.md
15578         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
15579         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
15580         (*extend<mode><Vwide>2): Rename to...
15581         (aarch64_sve_extend<mode><Vwide>2): ...this.
15582         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
15583         renaming the old pattern to...
15584         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
15585         unsigned packs.
15586         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
15587         define_expand, renaming the old pattern to...
15588         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
15589         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
15590         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
15591         account when deciding which SVE instruction the optab should use.
15592         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
15594 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
15596         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
15597         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
15598         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
15599         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
15600         (tlsdesc_small_<mode>): Turn a define_expand and use
15601         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
15602         (tlsdesc_small_advsimd_<mode>): ...this.
15603         (tlsdesc_small_sve_<mode>): New pattern.
15605 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
15607         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
15608         (UNSPEC_UMUL_HIGHPART): New constants.
15609         (MUL_HIGHPART): New int iteraor.
15610         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
15611         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
15612         define_expand.
15613         (*<su>mul<mode>3_highpart): New define_insn.
15615 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
15617         PR lto/84805
15618         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
15619         incomplete types.
15621 2018-03-13  Martin Liska  <mliska@suse.cz>
15623         PR ipa/84658.
15624         * (sem_item_optimizer::sem_item_optimizer): Initialize new
15625         vector.
15626         (sem_item_optimizer::~sem_item_optimizer): Release it.
15627         (sem_item_optimizer::merge_classes): Register variable aliases.
15628         (sem_item_optimizer::fixup_pt_set): New function.
15629         (sem_item_optimizer::fixup_points_to_sets): Likewise.
15630         * ipa-icf.h: Declare new variables and functions.
15632 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
15634         PR middle-end/84834
15635         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
15636         integer_pow2p@2 and test integer_pow2p in condition.
15637         (A < 0 ? C : 0): Similarly for @1.
15639         PR middle-end/84831
15640         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
15641         characters starting at p contain '\0' character, don't look beyond
15642         that.
15644         PR target/84827
15645         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
15646         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
15648         PR target/84828
15649         * reg-stack.c (change_stack): Change update_end var from int to
15650         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
15651         also call set_block_for_insn on the newly added insns and rescan.
15653         PR target/84786
15654         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
15655         on the last operand.
15657         PR c++/84704
15658         * tree.c (stabilize_reference_1): Return save_expr (e) for
15659         STATEMENT_LIST even if it doesn't have side-effects.
15661 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
15663         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
15665 2018-03-12  Renlin Li  <renlin.li@arm.com>
15667         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
15668         aarch64_output_scalar_simd_mov_immediate.
15670 2018-03-12  Martin Sebor  <msebor@redhat.com>
15672         PR tree-optimization/83456
15673         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
15674         for perfectly overlapping calls to memcpy.
15675         (gimple_fold_builtin_memory_chk): Same.
15676         (gimple_fold_builtin_strcpy): Handle no-warning.
15677         (gimple_fold_builtin_stxcpy_chk): Same.
15678         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
15680 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
15682         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
15683         parameter.  Use it for SFmode.
15684         (rs6000_function_arg_advance_1): Adjust.
15685         (rs6000_function_arg): Adjust.
15686         (rs6000_gimplify_va_arg): Pass false for that new parameter.
15688 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
15690         PR rtl-optimization/84169
15691         PR rtl-optimization/84780
15692         * combine.c (can_combine_p): Check for a 2-insn combination whether
15693         the destination register is used between the two insns, too.
15695 2018-03-12  Richard Biener  <rguenther@suse.de>
15697         PR tree-optimization/84803
15698         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
15699         for refs DR analysis didn't process.
15701 2018-03-12  Richard Biener  <rguenther@suse.de>
15703         PR tree-optimization/84777
15704         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
15705         force-vectorize loops ignore whether we are optimizing for size.
15707 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
15709         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
15710         (TARGET_MD_ASM_ADJUST): Define.
15712 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
15713             Kito Cheng  <kito.cheng@gmail.com>
15714             Chung-Ju Wu  <jasonwucj@gmail.com>
15716         * config/nds32/nds32.c (nds32_compute_stack_frame,
15717         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
15718         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
15719         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
15720         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
15721         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
15722         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
15723         * config/nds32/nds32.md (prologue, epilogue): Use macro
15724         NDS32_V3PUSH_AVAILABLE_P to do checking.
15726 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
15728         PR debug/58150
15729         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
15730         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
15731         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
15732         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
15733         addition of most attributes on !orig_type_die or the attribute not
15734         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
15736 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
15737             Chung-Ju Wu  <jasonwucj@gmail.com>
15739         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
15740         __NDS32_VH__ macro.
15741         * config/nds32/nds32.opt (mvh): New option.
15743 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
15744             Chung-Ju Wu  <jasonwucj@gmail.com>
15746         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
15747         function.
15748         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
15749         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
15750         definition.
15752 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
15753             Chung-Ju Wu  <jasonwucj@gmail.com>
15755         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
15756         function.
15757         * config/nds32/nds32-multiple.md (strlensi): New pattern.
15758         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
15760 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
15761             Kito Cheng  <kito.cheng@gmail.com>
15762             Chung-Ju Wu  <jasonwucj@gmail.com>
15764         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
15765         UNSPEC_FFMISM and UNSPEC_FLMISM.
15766         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
15767         for ffb, ffmism and flmism.
15768         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
15769         (unspec_ffmism): Ditto.
15770         (unspec_flmism): Ditto.
15771         (nds32_expand_builtin_impl): Check if string extension is available.
15772         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
15773         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
15775 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
15777         Reverting patch:
15778         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
15780         PR target/83712
15781         * lra-assigns.c (assign_by_spills): Return a flag of reload
15782         assignment failure.  Do not process the reload assignment
15783         failures.  Do not spill other reload pseudos if they has the same
15784         reg class.
15785         (lra_assign): Add a return arg.  Set up from the result of
15786         assign_by_spills call.
15787         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15788         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
15789         usage_insns if it is not NULL.
15790         (spill_hard_reg_in_range): New function.
15791         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15792         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15793         function prototypes.
15794         (lra_assign): Change prototype.
15795         * lra.c (lra): Add code to deal with fails by splitting hard reg
15796         live ranges.
15798 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
15800         PR target/84807
15801         * config/i386/i386.opt: Replace Enforcment with Enforcement.
15803 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
15805         PR debug/84620
15806         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
15807         (dw_val_node): Add val_symbolic_view.
15808         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
15809         (symview_upper_bound): New.
15810         (new_line_info_table): Initialize symviews_since_reset.
15811         (dwarf2out_source_line): Count symviews_since_reset and set
15812         symview_upper_bound.
15813         (dw_val_equal_p): Handle symview.
15814         (add_AT_symview): New.
15815         (print_dw_val): Handle symview.
15816         (attr_checksum, attr_checksum_ordered): Likewise.
15817         (same_dw_val_p, size_of_die): Likewise.
15818         (value_format, output_die): Likewise.
15819         (add_high_low_attributes): Use add_AT_symview for entry_view.
15820         (dwarf2out_finish): Reset symview_upper_bound, clear
15821         zero_view_p.
15823 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
15825         PR target/83969
15826         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
15827         Add strict argument and use it.
15828         (rs6000_split_multireg_move): Update for new strict argument.
15829         (mem_operand_gpr): Disallow all non-offsettable addresses.
15830         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
15832 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
15834         PR target/84772
15835         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
15836         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
15837         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
15839         PR c++/84767
15840         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
15841         decl, use remap_type if we want to use the type.
15843 2018-03-09  Martin Sebor  <msebor@redhat.com>
15845         PR tree-optimization/84526
15846         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
15847         Remove dead code.
15848         (builtin_access::generic_overlap): Be prepared to handle non-array
15849         base objects.
15851 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
15853         PR rtl-optimization/84682
15854         * lra-constraints.c (process_address_1): Check is_address flag
15855         for address constraints.
15856         (process_alt_operands): Likewise.
15857         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
15858         preprocess_constraints.
15859         * recog.h (preprocess_constraints): Add oploc parameter.
15860         Adjust callers.
15861         * recog.c (preprocess_constraints): Test address_operand for
15862         CT_ADDRESS constraints.
15864 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
15866         PR target/83712
15867         * lra-assigns.c (assign_by_spills): Return a flag of reload
15868         assignment failure.  Do not process the reload assignment
15869         failures.  Do not spill other reload pseudos if they has the same
15870         reg class.
15871         (lra_assign): Add a return arg.  Set up from the result of
15872         assign_by_spills call.
15873         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15874         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
15875         usage_insns if it is not NULL.
15876         (spill_hard_reg_in_range): New function.
15877         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15878         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15879         function prototypes.
15880         (lra_assign): Change prototype.
15881         * lra.c (lra): Add code to deal with fails by splitting hard reg
15882         live ranges.
15884 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15886         PR target/83193
15887         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
15888         Accept complain bool parameter.  Only emit errors if it is true.
15889         (arm_parse_cpu_option_name): Likewise.
15890         (arm_target_thumb_only): Adjust callers of the above.
15891         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
15892         prototype to take a default true bool parameter.
15893         (arm_parse_arch_option_name): Likewise.
15895 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
15896             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
15898         PR jit/64089
15899         PR jit/84288
15900         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
15901         * configure: Regenerate.
15902         * configure.ac ("linker --version-script option"): New.
15903         ("linker soname option"): New.
15905 2018-03-09  Richard Biener  <rguenther@suse.de>
15907         PR tree-optimization/84775
15908         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
15909         immediate uses of predicate stmts and mark them modified.
15911         Revert
15912         PR tree-optimization/84178
15913         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
15914         to caller.
15915         (version_loop_for_if_conversion): Delay update_ssa call.
15916         (tree_if_conversion): Delay update_ssa until after predicate
15917         insertion.
15919 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
15921         PR target/84763
15922         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
15923         when the function accesses prior frames.
15925 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
15927         PR debug/84456
15928         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
15929         gen_llsym, otherwise call maybe_gen_llsym.
15931         PR inline-asm/84742
15932         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
15933         has ',' character inside of it.
15935 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15937         PR target/84748
15938         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
15939         as clobbering CC_REGNUM.
15941 2018-03-08  Richard Biener  <rguenther@suse.de>
15943         PR middle-end/84552
15944         * tree-scalar-evolution.c: Include tree-into-ssa.h.
15945         (follow_copies_to_constant): Do not follow SSA names registered
15946         for update.
15948 2018-03-08  Richard Biener  <rguenther@suse.de>
15950         PR tree-optimization/84178
15951         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
15952         to caller.
15953         (version_loop_for_if_conversion): Delay update_ssa call.
15954         (tree_if_conversion): Delay update_ssa until after predicate
15955         insertion.
15957 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
15959         PR tree-optimization/84178
15960         * tree-if-conv.c (release_bb_predicate): Remove the
15961         the assertion that the stmts have NULL use_ops.
15962         Discard the statements, asserting that they haven't
15963         yet been added to a BB.
15965 2018-03-08  Richard Biener  <rguenther@suse.de>
15967         PR tree-optimization/84746
15968         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
15969         (phi_translate): Pass in destination ANTIC_OUT set.
15970         (phi_translate_1): Likewise.  For a simplified result lookup
15971         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
15972         (phi_translate_set): Adjust.
15973         (do_pre_regular_insertion): Likewise.
15974         (do_pre_partial_partial_insertion): Likewise.
15976 2018-03-08  Martin Liska  <mliska@suse.cz>
15978         PR gcov-profile/84735
15979         * doc/gcov.texi: Document usage of profile files.
15980         * gcov-io.h: Document changes in the format.
15982 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
15984         PR debug/84404
15985         PR debug/84408
15986         * dwarf2out.c (struct dw_line_info_table): Update comments for
15987         view == -1.
15988         (FORCE_RESET_NEXT_VIEW): New.
15989         (FORCE_RESETTING_VIEW_P): New.
15990         (RESETTING_VIEW_P): Check for -1 too.
15991         (ZERO_VIEW_P): Likewise.
15992         (new_line_info_table): Force-reset next view.
15993         (dwarf2out_begin_function): Likewise.
15994         (dwarf2out_source_line): Simplify zero_view_p initialization.
15995         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
15996         view directly.  Omit view when omitting .loc at line 0.
15998 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
16000         PR tree-optimization/84740
16001         * tree-switch-conversion.c (process_switch): Call build_constructors
16002         only if info.phi_count is non-zero.
16004         PR tree-optimization/84739
16005         * tree-tailcall.c (find_tail_calls): Check call arguments against
16006         DECL_ARGUMENTS (current_function_decl) rather than
16007         DECL_ARGUMENTS (func) when checking for tail recursion.
16009 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
16011         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
16012         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
16013         Volker Reichelt's entry and add entries for people that perform
16014         GCC fuzzy testing and report numerous bugs.
16016 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
16018         PR target/82411
16019         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
16020         readonly data in sdata, if that is disabled.
16021         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
16022         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
16023         -mreadonly-in-sdata option.
16025 2018-03-07  Martin Sebor  <msebor@redhat.com>
16027         PR tree-optimization/84468
16028         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
16029         basic block when looking for nul assignment.
16031 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
16033         PR target/84277
16034         * except.h (output_function_exception_table): Adjust prototype.
16035         * except.c (output_function_exception_table): Remove FNNAME parameter
16036         and add SECTION parameter.  Ouput one part of the table at a time.
16037         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
16038         the first part of the exception table and emit unwind directives.
16039         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
16040         (i386_pe_seh_cold_init): Likewise.
16041         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
16042         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
16043         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
16044         (ix86_output_call_insn): Emit a nop in one more case for SEH.
16045         * config/i386/winnt.c: Include except.h.
16046         (struct seh_frame_state): Add reg_offset, after_prologue and
16047         in_cold_section fields.
16048         (i386_pe_seh_end_prologue): Set seh->after_prologue.
16049         (i386_pe_seh_cold_init): New function.
16050         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
16051         to seh->in_cold_section.
16052         (seh_emit_push): Record the offset of the push.
16053         (seh_emit_save): Record the offet of the save.
16054         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
16055         Test seh->after_prologue to disregard the epilogue.
16056         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
16057         (i386_pe_end_cold_function): New function.
16059 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
16061         PR fortran/84565
16062         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
16063         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
16065         PR c++/84704
16066         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
16067         on tmp_var.
16068         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
16069         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
16071         PR middle-end/84723
16072         * multiple_target.c: Include tree-inline.h and intl.h.
16073         (expand_target_clones): Diagnose and fail if node->definition and
16074         !tree_versionable_function_p (node->decl).
16076 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
16078         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
16079         sprint_ul.
16080         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
16081         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
16082         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
16084 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
16086         PR target/84710
16087         * combine.c (try_combine): Use reg_or_subregno instead of handling
16088         just paradoxical SUBREGs and REGs.
16090 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
16092         * config/arc/arc.c (arc_finalize_pic): Remove function.
16093         (arc_must_save_register): We use single base PIC register, remove
16094         checks to save/restore the PIC register.
16095         (arc_expand_prologue): Likewise.
16096         * config/arc/arc-protos.h (arc_set_default_type_attributes):
16097         Remove.
16098         (arc_verify_short): Likewise.
16099         (arc_attr_type): Likewise.
16100         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
16101         (walk_stores): Likewise.
16102         (arc_address_cost): Make it static.
16103         (arc_verify_short): Likewise.
16104         (branch_dest): Likewise.
16105         (arc_attr_type): Likewise.
16106         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
16107         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
16108         (arc_final_prescan_insn): Remove inserting the nops due to
16109         hardware hazards.  It is done in reorg step.
16110         (insn_length_variant_t): Remove.
16111         (insn_length_parameters_t): Likewise.
16112         (arc_insn_length_parameters): Likewise.
16113         (arc_get_insn_variants): Likewise.
16114         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
16116 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
16118         PR inline-asm/84683
16119         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
16120         assertion failure.
16122         PR tree-optimization/84687
16123         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
16124         on new_node->decl.
16125         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
16127 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16129         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
16130         Rename to ppc_speculation_barrier.
16131         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
16132         __builtin_ppc_speculation_barrier.
16134 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
16136         PR target/84700
16137         * combine.c (combine_simplify_rtx): Don't try to simplify if
16138         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
16139         are equal to x.
16141 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
16143         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
16144         to 32 bytes when compiling for POWER9.
16146 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
16148         PR target/84564
16149         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
16150         regparm >= 3 with no arg reg available also for calls with
16151         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
16153         PR target/84524
16154         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
16155         orig,vex.
16156         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
16158 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
16160         PR target/84264
16161         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
16163 2018-03-05  Richard Biener  <rguenther@suse.de>
16165         PR tree-optimization/84486
16166         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
16167         When inserting a __builtin_assume_aligned call set the LHS
16168         SSA name alignment info accordingly.
16170 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
16172         PR tree-optimization/84114
16173         * config/aarch64/aarch64.c (aarch64_reassociation_width)
16174         Avoid reassociation of FLOAT_MODE addition.
16176 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
16178         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
16179         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
16180         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
16181         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
16182         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
16183         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
16184         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
16185         and -mwbnoinvd.
16186         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
16187         __builtin_ia32_wbinvd): New builtins.
16188         (SPECIAL_ARGS2): New.
16189         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
16190         (SPECIAL_ARGS2): New.
16191         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
16192         (ix86_valid_target_attribute_inner_p): Ditto.
16193         (ix86_init_mmx_sse_builtins): Add special_args2.
16194         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
16195         TARGET_WBNOINVD_P): New.
16196         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
16197         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
16198         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
16199         * config/i386/immintrin.h (_wbinvd): New intrinsic.
16200         * config/i386/pconfigintrin.h: New file.
16201         * config/i386/wbnoinvdintrin.h: Ditto.
16202         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
16203         wbnoinvdintrin.h.
16204         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
16206 2018-03-05  Richard Biener  <rguenther@suse.de>
16208         PR tree-optimization/84670
16209         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16210         member.
16211         (BB_VISITED_WITH_VISITED_SUCCS): New define.
16212         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16213         (compute_antic_aux): Only assert the number of values in ANTIC_IN
16214         doesn't grow if all successors (recursively) were visited at least
16215         once.
16217 2018-03-05  Richard Biener  <rguenther@suse.de>
16219         PR tree-optimization/84650
16220         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
16221         if executed in the loop pipeline.
16223 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
16225         * doc/configfiles.texi (Configuration Files): Move info about
16226         conditionalizing $target-protos.h to...
16227         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
16228         differs from $target-protos.h.
16230 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
16231             Chung-Ju Wu  <jasonwucj@gmail.com>
16233         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
16234         * config/nds32/nds32-multiple.md (setmemsi): Define.
16235         * config/nds32/nds32-memory-manipulation.c
16236         (nds32_gen_dup_4_byte_to_word_value): New.
16237         (emit_setmem_word_loop): New.
16238         (emit_setmem_byte_loop): New.
16239         (nds32_expand_setmem_loop): New.
16240         (nds32_expand_setmem_loop_v3m): New.
16241         (nds32_expand_setmem_unroll): New.
16242         (nds32_expand_setmem): New.
16244 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
16245             Chung-Ju Wu  <jasonwucj@gmail.com>
16247         * config/nds32/nds32-memory-manipulation.c
16248         (nds32_emit_load_store): New.
16249         (nds32_emit_post_inc_load_store): New.
16250         (nds32_emit_mem_move): New.
16251         (nds32_emit_mem_move_block): New.
16252         (nds32_expand_movmemsi_loop_unknown_size): New.
16253         (nds32_expand_movmemsi_loop_known_size): New.
16254         (nds32_expand_movmemsi_loop): New.
16255         (nds32_expand_movmemsi_unroll): New.
16256         (nds32_expand_movmemqi): Rename ...
16257         (nds32_expand_movmemsi): ... to this.
16258         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
16259         (movmemsi): ... to this.
16260         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
16261         (nds32_expand_movmemsi): ... to this.
16263 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
16264             Monk Chiang  <sh.chiang04@gmail.com>
16265             Chung-Ju Wu  <jasonwucj@gmail.com>
16267         * config/nds32/nds32-protos.h
16268         (nds32_expand_load_multiple): New arguments.
16269         (nds32_expand_store_multiple): Ditto.
16270         (nds32_valid_multiple_load_store): Rename ...
16271         (nds32_valid_multiple_load_store_p): ... to this.
16272         * config/nds32/nds32-memory-manipulation.c
16273         (nds32_expand_load_multiple): Refine implementation.
16274         (nds32_expand_store_multiple): Ditto.
16275         * config/nds32/nds32-multiple.md
16276         (load_multiple): Update nds32_expand_load_multiple interface.
16277         (store_multiple): Update nds32_expand_store_multiple interface.
16278         * config/nds32/nds32-predicates.c
16279         (nds32_valid_multiple_load_store): Rename ...
16280         (nds32_valid_multiple_load_store_p): ... to this and refine
16281         implementation.
16282         * config/nds32/predicates.md
16283         (nds32_load_multiple_and_update_address_operation): New predicate.
16284         (nds32_store_multiple_and_update_address_operation): New predicate.
16286 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
16287             Chung-Ju Wu  <jasonwucj@gmail.com>
16289         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
16290         (combo): New attribute.
16291         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
16293 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
16295         * config/nds32/nds32.opt: Change -mcmodel= default value.
16297 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
16298             Monk Chiang  <sh.chiang04@gmail.com>
16299             Chung-Ju Wu  <jasonwucj@gmail.com>
16301         * config/nds32/constants.md (unspec_element): New enum.
16302         * config/nds32/constraints.md (Umw): New constraint.
16303         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
16304         * config/nds32/nds32-intrinsic.md: Likewise.
16305         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
16306         (nds32_valid_smw_lwm_base_p): New.
16307         (nds32_output_smw_single_word): New.
16308         (nds32_output_lmw_single_word): New.
16309         (nds32_expand_unaligned_load): New.
16310         (nds32_expand_unaligned_store): New.
16311         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
16312         (nds32_output_smw_single_word): Declare.
16313         (nds32_output_lmw_single_word): Declare.
16314         (nds32_expand_unaligned_load): Declare.
16315         (nds32_expand_unaligned_store): Declare.
16316         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
16317         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
16318         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
16319         NDS32_BUILTIN_UASTORE_DW.
16320         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
16321         predicate.
16323 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
16324             Kito Cheng  <kito.cheng@gmail.com>
16325             Chung-Ju Wu  <jasonwucj@gmail.com>
16327         * config/nds32/nds32-intrinsic.c
16328         (nds32_expand_builtin_null_ftype_reg): Delete.
16329         (nds32_expand_builtin_reg_ftype_imm): Ditto.
16330         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
16331         (nds32_read_argument): New.
16332         (nds32_legitimize_target): Ditto.
16333         (nds32_legitimize_argument): Ditto.
16334         (nds32_check_constant_argument): Ditto.
16335         (nds32_expand_unop_builtin): Ditto.
16336         (nds32_expand_unopimm_builtin): Ditto.
16337         (nds32_expand_binop_builtin): Ditto.
16338         (nds32_builtin_decl_impl): Ditto.
16339         (builtin_description): Ditto.
16340         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
16341         (nds32_init_builtins_impl): Ditto.
16342         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
16343         (nds32_builtin_decl): New.
16344         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
16345         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
16347 2018-03-02  Jeff Law  <law@redhat.com>
16349         * reorg.c (stop_search_p): Handle DEBUG_INSN.
16350         (redundant_insn, fill_simple_delay_slots): Likewise.
16351         (fill_slots_from_thread): Likewise.
16352         * resource.c (mark_referenced_resources): Likewise.
16353         (mark_set_resources, find_dead_or_set_registers): Likewise.
16355 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
16357         * substring-locations.h (format_warning_va): Formatting fix for
16358         ATTRIBUTE_GCC_DIAG.
16359         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
16360         argument.
16361         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
16362         * substring-locations.c: Include intl.h.
16363         (format_warning_va): Turned into small wrapper around
16364         format_warning_n_va, renamed to ...
16365         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
16366         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
16367         use ngettext.
16368         (format_warning_at_substring_n): New function.
16369         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
16370         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
16371         format_warning_at_substring with just a shorter name instead of
16372         const function pointer.
16373         (fmtwarn_n): New function.
16374         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
16375         appropriate, get rid of all the fmtstr temporaries, move conditionals
16376         with G_() wrapped string literals directly into fmtwarn arguments,
16377         cast dir.len to (int), formatting fixes.
16379 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
16381         * doc/invoke.texi: Remove "Cilk Plus" references.
16383 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
16384             Richard Biener  <rguenther@suse.de>
16386         PR ipa/84628
16387         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
16388         for error or warning attributes if CALL_FROM_THUNK_P is set.
16389         Formatting fixes.
16391 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
16393         PR target/56540
16394         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
16395         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
16397         PR target/56540
16398         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
16399         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
16401         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
16402         instead of -1U in last predictors element's probability member.
16404 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
16406         PR ipa/83983
16407         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
16408         arguments if they are comparable.
16410 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
16412         PR tree-optimization/84634
16413         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
16414         masks and masked_loop_p with a single loop_masks, making sure it's
16415         null for bb vectorization.
16417 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
16419         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
16420         (vect_analyze_data_ref_access): Use loop->safe_len rather than
16421         loop->force_vectorize to check whether there is no alias.
16423 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
16425         PR target/84614
16426         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
16427         prototypes.
16428         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
16429         comments.
16430         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
16431         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
16432         instead of a loop around prev_real_insn.
16433         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
16434         prev_real_insn.
16436         PR inline-asm/84625
16437         * config/i386/i386.c (ix86_print_operand): Use conditional
16438         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
16439         zero vector.
16441 2018-03-02  Richard Biener  <rguenther@suse.de>
16443         PR tree-optimization/84427
16444         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
16445         (bitmap_set_subtract_values): Rewrite to handle multiple
16446         exprs per value.
16447         (clean): Likewise.
16448         (prune_clobbered_mems): Likewise.
16449         (phi_translate): Take edge instead of pred/phiblock.
16450         (phi_translate_1): Likewise.
16451         (phi_translate_set): Likewise.  Insert all translated
16452         exprs for a value into the set, keeping possibly multiple
16453         expressions per value.
16454         (compute_antic_aux): Adjust for phi_translate changes.
16455         When intersecting union the expressions and prune those
16456         not in the final value set, keeping possibly multiple
16457         expressions per value.  Do not use value-insertion
16458         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
16459         all expressions.  Add verification that the value-sets
16460         only shrink during iteration.
16461         (compute_partial_antic_aux): Adjust for the phi_translate changes.
16462         (do_pre_regular_insertion): Likewise.
16463         (do_pre_partial_partial_insertion): Likewise.
16465 2018-03-02  Richard Biener  <rguenther@suse.de>
16467         PR target/82005
16468         * config/darwin.c (saved_debug_info_level): New static global.
16469         (darwin_asm_lto_start): Disable debug info generation for LTO out.
16470         (darwin_asm_lto_end): Restore debug info generation settings.
16472 2018-03-01  Martin Liska  <mliska@suse.cz>
16474         PR sanitizer/82484
16475         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
16476         volatile arguments.
16478 2018-03-01  Richard Biener  <rguenther@suse.de>
16480         PR debug/84645
16481         * dwarf2out.c (gen_variable_die): Properly handle late VLA
16482         type annotation with LTO when debug was disabled at compile-time.
16484 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
16486         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
16487         XINT with INTVAL.
16488         (mips_final_postscan_insn): Likewise.
16490 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
16492         PR rtl-optimization/84528
16493         * alias.c (init_alias_target): Add commentary.
16494         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
16495         a unique base value if the frame pointer is not eliminated
16496         to the stack pointer.
16498 2018-03-01  Tom de Vries  <tom@codesourcery.com>
16500         PR rtl-optimization/83327
16501         * lra-int.h (hard_regs_spilled_into): Declare.
16502         * lra.c (hard_regs_spilled_into): Define.
16503         (init_reg_info): Init hard_regs_spilled_into.
16504         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
16505         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
16506         (process_bb_lives): Handle hard_regs_spilled_into.
16507         (lra_create_live_ranges_1): Before doing liveness propagation, clear
16508         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
16510 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
16512         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
16513         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
16514         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
16515         * config/rs6000/aix72.h: New file.
16517 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
16519         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
16520         instead of warning_at with conditional singular and plural messages
16521         where possible.
16523         PR target/52991
16524         * stor-layout.c (update_alignment_for_field): For
16525         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
16526         && !DECL_PACKED (field), do the alignment update, just use
16527         only desired_align instead of MAX (type_align, desired_align)
16528         as the alignment.
16529         (place_field): Don't do known_align < desired_align handling
16530         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
16531         is non-NULL, instead do it after rli->prev_field handling and
16532         only if not within a bitfield word.  For DECL_PACKED (field)
16533         use type_align of BITS_PER_UNIT.
16535 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
16537         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
16538         superfluous parentheses and trailing spaces.
16540 2018-02-28  Richard Biener  <rguenther@suse.de>
16542         PR tree-optimization/84584
16543         * graphite-scop-detection.c (scop_detection::add_scop): Discard
16544         SCoPs with fake exit edge.
16546 2018-02-28  Martin Liska  <mliska@suse.cz>
16548         PR testsuite/84597
16549         * timevar.c (timer::print): Fix format to properly print 100%
16550         values.
16552 2018-02-28  Richard Biener  <rguenther@suse.de>
16554         PR middle-end/84607
16555         * genmatch.c (capture_info::walk_match): Do not mark
16556         captured expressions without operands as expr_p given
16557         they act more like predicates and should be subject to
16558         "lost tail" side-effect preserving.
16560 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
16562         PR rtl-optimization/81611
16563         * auto-inc-dec.c (attempt_change): Move dead note from
16564         mem_insn if it's the next use of regno
16565         (find_address): Take address use of reg holding
16566         non-incremented value.  Add parm to limit search to the named
16567         reg only.
16568         (merge_in_block): Attempt to use a mem insn that is the next
16569         use of the original regno.
16571 2018-02-27  Martin Sebor  <msebor@redhat.com>
16573         PR c++/83871
16574         * doc/invoke.texi (-Wmissing-attributes): New option.
16575         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
16577 2018-02-27  Martin Sebor  <msebor@redhat.com>
16579         PR translation/84207
16580         * diagnostic-core.h (warning_n, error_n, inform_n): Change
16581         n argument to unsigned HOST_WIDE_INT.
16582         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
16583         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
16584         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
16585         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
16587 2018-02-27  Richard Biener  <rguenther@suse.de>
16589         PR tree-optimization/84512
16590         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
16591         Do not use the estimate returned from record_stmt_cost for
16592         the scalar iteration cost but sum properly using add_stmt_cost.
16594 2018-02-27  Richard Biener  <rguenther@suse.de>
16596         PR tree-optimization/84466
16597         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
16598         Adjust last change to less strictly validate use operands.
16600 2018-02-27  Martin Liska  <mliska@suse.cz>
16602         PR gcov-profile/84548
16603         * gcov.c (process_file): Allow partial overlap and consider it
16604         also as group functions.
16605         (output_lines): Properly calculate range of lines for a group.
16607 2018-02-27  Martin Liska  <mliska@suse.cz>
16609         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
16610         'ggc' suffixes.  Change first column width.
16611         (timer::print): Fix formatting of the column.
16613 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
16615         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
16616         preserve inline entry blocks for the sake of debug inline
16617         entry point markers alone.
16618         (remove_unused_locals): Suggest in comments a better place to
16619         force the preservation of inline entry blocks that are
16620         otherwise unused, but do not preserve them.
16622 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
16624         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
16626 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
16628         PR target/84039
16629         * config/i386/constraints.md (Bs): Replace
16630         ix86_indirect_branch_register with
16631         TARGET_INDIRECT_BRANCH_REGISTER.
16632         (Bw): Likewise.
16633         * config/i386/i386.md (indirect_jump): Likewise.
16634         (tablejump): Likewise.
16635         (*sibcall_memory): Likewise.
16636         (*sibcall_value_memory): Likewise.
16637         Peepholes of indirect call and jump via memory: Likewise.
16638         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
16639         (*sibcall_value_GOT_32): Likewise.
16640         * config/i386/predicates.md (indirect_branch_operand): Likewise.
16641         (GOT_memory_operand): Likewise.
16642         (call_insn_operand): Likewise.
16643         (sibcall_insn_operand): Likewise.
16644         (GOT32_symbol_operand): Likewise.
16645         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
16647 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
16649         PR rtl-optimization/83496
16650         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
16651         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
16652         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
16653         redundant insn, if any.
16654         (relax_delay_slots): Likewise.
16655         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
16657 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
16659         PR tree-optimization/83965
16660         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
16661         that grouped statements are part of a reduction chain.  Return
16662         true if the statement is not marked as a reduction itself but
16663         is part of a group.
16664         (vect_recog_dot_prod_pattern): Don't check whether the statement
16665         is part of a group here.
16666         (vect_recog_sad_pattern): Likewise.
16667         (vect_recog_widen_sum_pattern): Likewise.
16669 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
16671         PR debug/84545
16672         * final.c (rest_of_clean_state): Also look for calls inside sequences.
16674 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
16676         PR target/84530
16677         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
16678         the bool argument.
16679         (ix86_output_indirect_function_return): New prototype.
16680         (ix86_split_simple_return_pop_internal): Likewise.
16681         * config/i386/i386.c (indirect_return_via_cx): New.
16682         (indirect_return_via_cx_bnd): Likewise.
16683         (indirect_thunk_name): Handle return va CX_REG.
16684         (output_indirect_thunk_function): Create alias for
16685         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
16686         (ix86_output_indirect_jmp): Remove the bool argument.
16687         (ix86_output_indirect_function_return): New function.
16688         (ix86_split_simple_return_pop_internal): Likewise.
16689         * config/i386/i386.md (*indirect_jump): Don't pass false
16690         to ix86_output_indirect_jmp.
16691         (*tablejump_1): Likewise.
16692         (simple_return_pop_internal): Change it to define_insn_and_split.
16693         Call ix86_split_simple_return_pop_internal to split it for
16694         -mfunction-return=.
16695         (simple_return_indirect_internal): Call
16696         ix86_output_indirect_function_return instead of
16697         ix86_output_indirect_jmp.
16699 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
16701         PR bootstrap/84405
16702         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
16703         memset and value initialization afterwards.
16705 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
16707         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
16709 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
16711         PR target/84521
16712         * common/config/aarch64/aarch64-common.c
16713         (aarch_option_optimization_table[]): Switch
16714         off fomit-frame-pointer
16716 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
16717             Chung-Ju Wu  <jasonwucj@gmail.com>
16719         * config/nds32/nds32-multiple.md (load_multiple): Disallow
16720         volatile memory.
16721         (store_multiple): Ditto.
16723 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
16725         * config.gcc: Add --with-cpu support for nds32 target.
16726         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
16727         * config/nds32/nds32.opt: Add -mcpu= option.
16729 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
16731         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
16732         isel=yes): Warn for these deprecated options.
16734 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
16736         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
16737         ISA_2_5_MASKS_EMBEDDED.
16739 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
16741         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
16742         p->max as pointers rather than using iterative_hash_expr.
16744 2018-02-23  Carl Love  <cel@us.ibm.com>
16746         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
16747         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
16748         BU_P8V_OVERLOAD_2.
16749         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
16750         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
16751         P8V_BUILTIN_VEC_VUNSIGNED2.
16753 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
16755         PR target/81572
16756         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
16757         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
16758         LRA_UNKNOWN_ALT.
16759         * lra-constraints.c (curr_insn_transform): Set up
16760         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
16761         LRA_UNKNOWN_ALT.
16762         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
16763         * lra-eliminations.c (spill_pseudos): Ditto.
16764         (process_insn_for_elimination): Ditto.
16765         * lra-lives.c (reg_early_clobber_p): Use the new macros.
16766         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
16767         LRA_NON_CLOBBERED_ALT.
16769 2018-02-22  Martin Sebor  <msebor@redhat.com>
16771         PR tree-optimization/84480
16772         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
16773         to maybe_diag_stxncpy_trunc.  Call it.
16774         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
16775         from gimple_fold_builtin_strcpy.  Print inlining stack.
16776         (handle_builtin_stxncpy): Print inlining stack.
16777         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
16779 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
16781         PR target/84176
16782         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
16783         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
16784         and -fcheck-pointer-bounds are used together.
16785         (indirect_thunk_prefix): New enum.
16786         (indirect_thunk_need_prefix): New function.
16787         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
16788         "_nt" instead of "_bnd" for NOTRACK prefix.
16789         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
16790         (output_indirect_thunk_function): Likewise.
16791         (): Likewise.
16792         (ix86_code_end): Update output_indirect_thunk_function calls.
16793         (ix86_output_indirect_branch_via_reg): Replace
16794         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
16795         (ix86_output_indirect_branch_via_push): Likewise.
16796         (ix86_output_function_return): Likewise.
16797         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
16798         incompatible with -fcf-protection=branch and
16799         -fcheck-pointer-bounds.
16801 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
16803         PR target/83335
16804         * config/aarch64/aarch64.c (aarch64_print_address_internal):
16805         Change gcc_assert call to output_operand_lossage.
16807 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
16809         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
16811 2018-02-22  DJ Delorie  <dj@redhat.com>
16812             Sebastian Perta  <sebastian.perta@renesas.com>
16813             Oleg Endo  <olegendo@gcc.gnu.org>
16815         * config/rx/rx.c (rx_rtx_costs): New function.
16816         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
16818 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
16820         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
16822 2018-02-22  Martin Liska  <mliska@suse.cz>
16824         PR driver/83193
16825         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
16826         Add "native" as a possible value.
16828 2018-02-22  Martin Liska  <mliska@suse.cz>
16830         PR driver/83193
16831         * config/i386/i386.c (ix86_option_override_internal):
16832         Add "native" as a possible value for -march and -mtune.
16834 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
16836         PR target/84502
16837         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
16838         to all type variants.
16840         PR tree-optimization/84503
16841         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
16842         width as info->bitpos + info->bitsize - start.
16843         (merged_store_group::merge_overlapping): Simplify width computation.
16844         (check_no_overlap): New function.
16845         (imm_store_chain_info::try_coalesce_bswap): Compute expected
16846         start + width and last_order of the group, fail if check_no_overlap
16847         fails.
16848         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
16849         to group if check_no_overlap fails.
16851 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
16853         * config/rs6000/altivec.md: Delete contraint arguments to
16854         define_expand, define_split, and define_peephole2, and in
16855         define_insn_and_split if always unused.
16856         * config/rs6000/darwin.md: Ditto.
16857         * config/rs6000/dfp.md: Ditto.
16858         * config/rs6000/rs6000.md: Ditto.
16859         * config/rs6000/sync.md: Ditto.
16860         * config/rs6000/vector.md: Ditto.
16861         * config/rs6000/vsx.md: Ditto.
16863 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
16865         * config/rs6000/altivec.md: Write output control strings as braced
16866         blocks instead of double-quoted strings.
16867         * config/rs6000/darwin.md: Ditto.
16868         * config/rs6000/rs6000.md: Ditto.
16869         * config/rs6000/vector.md: Ditto.
16870         * config/rs6000/vsx.md: Ditto.
16872 2018-02-21  Jason Merrill  <jason@redhat.com>
16874         PR c++/84314 - ICE with templates and fastcall attribute.
16875         * attribs.c (build_type_attribute_qual_variant): Remove assert.
16877 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
16879         * ipa-cp.c (determine_versionability): Fix comment typos.
16881 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
16883         PR c/84229
16884         * ipa-cp.c (determine_versionability): Do not version functions caling
16885         va_arg_pack.
16887 2018-02-21  Martin Liska  <mliska@suse.cz>
16889         PR driver/83193
16890         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
16891         Add "native" as a possible value.
16892         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
16893         the macro when native cpu detection is available.
16895 2018-02-21  Martin Liska  <mliska@suse.cz>
16897         PR driver/83193
16898         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
16899         Add "native" as a possible value.
16900         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
16901         when native cpu detection is available.
16903 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
16904             Martin Sebor  <msebor@redhat.com>
16906         PR tree-optimization/84478
16907         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
16908         false.
16909         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
16910         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
16911         support which is conservatively correct, for 2 only stay conservative
16912         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
16913         argument to the 2 argument get_range_strlen, adjust 6 arg
16914         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
16915         false.
16916         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
16917         (gimple_fold_builtin_strlen): Pass true as last argument to
16918         get_range_strlen.
16920 2018-02-20  Martin Sebor  <msebor@redhat.com>
16922         PR middle-end/84095
16923         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
16924         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
16925         (builtin_memref::builtin_memref): Factor out parts into
16926         set_base_and_offset and call it.
16928 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
16930         PR middle-end/84406
16931         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
16932         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
16933         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
16934         search at the associated MODE_INT.
16936 2018-02-20  Jeff Law  <law@redhat.com>
16938         PR middle-end/82123
16939         PR tree-optimization/81592
16940         PR middle-end/79257
16941         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
16942         for range data rather than using global data.
16943         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
16944         range data rather than using global data.
16945         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
16946         pass it to children as needed.
16947         (struct directive::fmtresult): Similarly.
16948         (struct directive::set_width): Similarly.
16949         (struct directive::set_precision): Similarly.
16950         (format_integer, format_directive, parse_directive): Similarly.
16951         (format_none): Accept unnamed vr_values parameter.
16952         (format_percent, format_floating, format_character): Similarly.
16953         (format_string, format_plain): Similarly.
16954         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
16955         the EVRP range analyzer for range data rather than using global data.
16956         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
16957         gimple-ssa-evrp-analyze.h
16958         (class sprintf_dom_walker): Add after_dom_children member function.
16959         Add evrp_range_analyzer member.
16960         (sprintf_dom_walker::before_dom_children): Call into the EVRP
16961         range analyzer as needed.
16962         (sprintf_dom_walker::after_dom_children): New member function.
16963         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
16964         if not optimizing.
16965         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
16966         (evrp_range_analyzer::pop_to_marker): Likewise.
16968 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
16970         PR tree-optimization/84419
16971         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
16972         with the required type if its current type is compatible but
16973         different.
16975 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
16977         PR middle-end/82004
16978         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
16979         after vectorization.
16981 2018-02-20  Martin Liska  <mliska@suse.cz>
16983         PR driver/83193
16984         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
16985         possible values if we don't have a hint.
16987 2018-02-20  Martin Liska  <mliska@suse.cz>
16989         PR c/84310
16990         PR target/79747
16991         * final.c (shorten_branches): Build align_tab array with one
16992         more element.
16993         * opts.c (finish_options): Add alignment option limit check.
16994         (MAX_CODE_ALIGN): Likewise.
16995         (MAX_CODE_ALIGN_VALUE): Likewise.
16996         * doc/invoke.texi: Document maximum allowed option value for
16997         all -falign-* options.
16999 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
17001         PR target/84146
17002         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
17003         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
17004         * var-tracking.c (emit_note_insn_var_location): Remove all references
17005         to NOTE_INSN_CALL_ARG_LOCATION.
17006         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
17007         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
17008         Use copy_rtx_if_shared.
17009         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
17010         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
17011         (dwarf2out_var_location): Remove handling of
17012         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
17013         on call_insn.
17014         * final.c (final_scan_insn): Remove all references to
17015         NOTE_INSN_CALL_ARG_LOCATION.
17016         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
17017         before dumping final insns.
17018         * except.c (emit_note_eh_region_end): Remove all references to
17019         NOTE_INSN_CALL_ARG_LOCATION.
17020         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
17021         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
17022         * config/arc/arc.c (hwloop_optimize): Likewise.
17023         * config/arm/arm.c (create_fix_barrier): Likewise.
17024         * config/s390/s390.c (s390_chunkify_start): Likewise.
17025         * config/sh/sh.c (find_barrier): Likewise.
17026         * config/i386/i386.c (rest_of_insert_endbranch,
17027         ix86_seh_fixup_eh_fallthru): Likewise.
17028         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
17029         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
17030         * config/frv/frv.c (frv_function_prologue): Likewise.
17031         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
17032         reg note.
17033         (note_outside_basic_block_p): Remove all references to
17034         NOTE_INSN_CALL_ARG_LOCATION.
17035         * gengtype.c (adjust_field_rtx_def): Likewise.
17036         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
17037         Likewise.
17038         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
17039         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
17041         PR c++/84444
17042         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
17043         is ADDR_EXPR.
17045         PR tree-optimization/84452
17046         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
17047         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
17048         is NULL.
17050 2018-02-19  Martin Liska  <mliska@suse.cz>
17052         PR sanitizer/82183
17053         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
17055 2018-02-19  Martin Liska  <mliska@suse.cz>
17056             Richard Sandiford  <richard.sandiford@linaro.org>
17058         PR tree-optimization/82491
17059         * gimple-fold.c (get_base_constructor): Make earlier bail out
17060         to prevent ubsan.
17062 2018-02-19  Carl Love  <cel@us.ibm.com>
17064         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
17065         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
17066         BU_P8V_OVERLOAD_1.
17067         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
17068         P8V_BUILTIN_VEC_NEG.
17070 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
17072         * config/rl78/rl78.md (movdf): New define expand.
17074 2018-02-19  Martin Liska  <mliska@suse.cz>
17076         PR other/80589
17077         * doc/invoke.texi: Fix typo.
17078         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
17080 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
17082         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
17083         handle rs6000_single_float and rs6000_double_float specially for
17084         e500 family CPUs.
17086 2018-02-16  Jeff Law  <law@redhat.com>
17088         * config/rx/rx.c (add_pop_cfi_notes): New function.;
17089         (pop_regs): Use it.
17091 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
17093         PR ipa/84425
17094         * ipa-inline.c (inline_small_functions): Fix a typo.
17096 2018-02-16  Nathan Sidwell  <nathan@acm.org>
17098         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
17100 2018-02-16  Carl Love  <cel@us.ibm.com>
17102         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
17103         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
17104         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
17105         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
17106         expansion to P8V_BUILTIN_VEC_FLOAT2.
17108 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
17110         PR rtl-optimization/70023
17111         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
17112         src_regno into account.
17114 2018-02-16  Carl Love  <cel@us.ibm.com>
17116         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
17117         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
17118         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
17119         * config/rs6000/rs6000.c: Remove case statements for
17120         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
17121         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
17122         and P9V_BUILTIN_VEC_VINSERT4B.
17123         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
17124         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
17125         * config/rs6000/vsx.md:
17126         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
17127         vec_insert4b.
17129 2018-02-16  Carl Love  <cel@us.ibm.com>
17131         * config/rs6000/altivec.h: Add builtin names vec_extract4b
17132         vec_insert4b.
17133         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
17134         definitions.
17135         * config/rs6000/rs6000-c.c: Add the definitions for
17136         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
17137         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
17138         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
17139         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
17140         definition for insert4b and define insn *insert3b_internal.
17141         * doc/extend.texi: Add documentation for vec_extract4b.
17143 2018-02-16  Nathan Sidwell  <nathan@acm.org>
17145         * doc/extend.texi (Backwards Compatibility): Mention friend
17146         injection.  Note for-scope is deprecated.
17147         * doc/invoke.texi (-ffriend-injection): Deprecate.
17149 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
17151         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
17152         that moved to I2, also allow destinations that are a paradoxical
17153         subreg (instead of a normal reg).
17155 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
17157         PR target/83831
17158         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
17159         to QImode.
17161 2018-02-16  Richard Biener  <rguenther@suse.de>
17163         PR tree-optimization/84037
17164         PR tree-optimization/84016
17165         PR target/82862
17166         * config/i386/i386.c (ix86_builtin_vectorization_cost):
17167         Adjust vec_construct for the fact we need additional higher latency
17168         128bit inserts for AVX256 and AVX512 vector builds.
17169         (ix86_add_stmt_cost): Scale vector construction cost for
17170         elementwise loads.
17172 2018-02-16  Richard Biener  <rguenther@suse.de>
17174         PR tree-optimization/84417
17175         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
17176         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
17177         (non_rewritable_lvalue_p): Likewise, use poly-ints.
17179 2018-02-16  Martin Liska  <mliska@suse.cz>
17181         PR sanitizer/84307
17182         * internal-fn.def (ASAN_CHECK): Set proper flags.
17183         (ASAN_MARK): Likewise.
17185 2018-02-16  Julia Koval  <julia.koval@intel.com>
17187         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
17188         from PTA_CANNONLAKE.
17190 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
17192         PR target/84272
17193         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
17194         Use ++iter rather than iter++ for std::list iterators.
17195         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
17196         defer deleting them until all nodes in the forest are processed.  Do
17197         free even leaf nodes.  Change to_process into auto_vec.
17199         PR bootstrap/84405
17200         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
17201         * vec.h (vec_default_construct): Use memset instead of placement new
17202         if BROKEN_VALUE_INITIALIZATION is defined.
17203         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
17204         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
17205         is defined.
17207         PR rtl-optimization/83723
17208         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
17209         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
17210         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
17211         recursive calls.
17212         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
17213         callers.
17214         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
17216 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
17218         PR rtl-optimization/81443
17219         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
17220         from inner REGs to paradoxical SUBREGs.
17222 2018-02-16  Richard Biener  <rguenther@suse.de>
17224         PR tree-optimization/84399
17225         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17226         For operands we can analyze at their definition make sure we can
17227         analyze them at each use as well.
17229 2018-02-16  Richard Biener  <rguenther@suse.de>
17231         PR tree-optimization/84190
17232         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
17233         volatile accesses if the decl isn't volatile.
17235 2018-02-15  Jason Merrill  <jason@redhat.com>
17237         PR c++/84314 - ICE with templates and fastcall attribute.
17238         * attribs.c (build_type_attribute_qual_variant): Don't clobber
17239         TYPE_CANONICAL on an existing type.
17241 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
17243         PR tree-optimization/84383
17244         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
17245         dstoff nor call operand_equal_p if dstbase is NULL.
17247         PR tree-optimization/84334
17248         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
17249         also a CONSTANT_CLASS_P, punt.
17251 2018-02-14  Jim Wilson  <jimw@sifive.com>
17253         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
17254         first SMALL_OPERAND check.  New local min_second_step.  Move assert
17255         to where locals are set.  Add TARGET_RVC support.
17256         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
17258 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
17260         * doc/invoke.texi: Correct -Wformat-overflow code sample.
17262 2018-02-14  Martin Sebor  <msebor@redhat.com>
17264         PR tree-optimization/83698
17265         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
17266         arrays constrain the offset range to their bounds.
17267         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
17268         (builtin_access::overlap): Avoid setting the size of overlap if it's
17269         already been set.
17270         (maybe_diag_overlap): Also consider arrays when deciding what values
17271         of offsets to include in diagnostics.
17273 2018-02-14  Martin Sebor  <msebor@redhat.com>
17275         PR c/84108
17276         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
17277         that correspond to the kind of a declaration.
17279 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
17281         PR target/83984
17282         * config/pa/pa.md: Load address of PIC label using the linkage table
17283         if the label is nonlocal.
17285 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17287         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
17288         warning message if user requests -maltivec=be.
17289         * doc/invoke.texi: Document deprecation of -maltivec=be.
17291 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
17293         PR target/84220
17294         * config/rs6000/rs6000-c.c: Update definitions for
17295         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
17296         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
17298 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
17300         PR target/84239
17301         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
17302         add _get_ssp intrinsics. Remove argument from
17303         __builtin_ia32_rdssp[d|q].
17304         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
17305         * config/i386/i386-builtin.def: Remove argument from
17306         __builtin_ia32_rdssp[d|q].
17307         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
17308         ix86_expand_special_args_builtin for _rdssp[d|q].
17309         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
17310         Clear register before usage.
17311         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
17312         Add documentation for new _get_ssp and _inc_ssp intrinsics.
17314 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
17316         PR tree-optimization/84357
17317         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
17318         operand 1 of an ARRAY_REF too.
17320 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
17322         PR target/83831
17323         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
17324         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
17325         declarations.
17326         (set_of_reg): New struct.
17327         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
17328         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
17329         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
17330         functions.
17331         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
17332         Split into bitclr, bitset, bitinvert patterns if appropriate.
17333         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
17334         use rx_fuse_in_memory_bitop.
17335         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
17336         to named insn, correct maximum insn length.
17338 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
17340         PR target/79242
17341         * machmode.def: Define a complex mode for PARTIAL_INT.
17342         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
17343         MODE_PARTIAL_INT.
17344         * doc/rtl.texi: Document CSPImode.
17345         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
17346         handling.
17347         (msp430_hard_regno_nregs_with_padding): Likewise.
17349 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
17351         PR target/84279
17352         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
17354 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
17356         PR rtl-optimization/84169
17357         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
17358         we generated a parallel as new i3 and we split that to new i2 and i3
17359         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
17360         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
17361         those to i2, not i1.  Partially rewrite this scan code.
17363 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
17365         PR c/82210
17366         * stor-layout.c (place_field): For variable length fields, adjust
17367         offset_align afterwards not just based on the field's alignment,
17368         but also on the size.
17370         PR middle-end/84309
17371         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
17372         of exps and logs in the use_exp2 case.
17374 2018-02-13  Jeff Law  <law@redhat.com>
17376         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
17377         entry for "vector".
17379         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
17380         ARGS as unused.
17382 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
17384         PR debug/84342
17385         PR debug/84319
17386         * common.opt (gas-loc-support, gas-locview-support): New.
17387         (ginline-points, ginternal-reset-location-views): New.
17388         * doc/invoke.texi: Document them.  Use @itemx where intended.
17389         (gvariable-location-views): Adjust.
17390         * target.def (reset_location_view): New.
17391         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
17392         (TARGET_RESET_LOCATION_VIEW): New.
17393         * doc/tm.texi: Rebuilt.
17394         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
17395         (dwarf2out_default_as_locview_support): New.
17396         (output_asm_line_debug_info): Use option variables.
17397         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
17398         (output_loc_list): Likewise.
17399         (add_high_low_attributes): Check option variables.
17400         Don't output entry view attribute in strict mode.
17401         (gen_inlined_subroutine_die): Check option variables.
17402         (dwarf2out_inline_entry): Likewise.
17403         (init_sections_and_labels): Likewise.
17404         (dwarf2out_early_finish): Likewise.
17405         (maybe_reset_location_view): New, from...
17406         (dwarf2out_var_location): ... here.  Call it.
17407         * debug.h (dwarf2out_default_as_loc_support): Declare.
17408         (dwarf2out_default_as_locview_support): Declare.
17409         * hooks.c (hook_int_rtx_insn_0): New.
17410         * hooks.h (hook_int_rtx_insn_0): Declare.
17411         * toplev.c (process_options): Take -gas-loc-support and
17412         -gas-locview-support from dwarf2out.  Enable
17413         -gvariable-location-views by default only with locview
17414         assembler support.  Enable -ginternal-reset-location-views by
17415         default only if the target defines the corresponding hook.
17416         Enable -ginline-points by default if location views are
17417         enabled; force it disabled if statement frontiers are
17418         disabled.
17419         * tree-inline.c (expand_call_inline): Check option variables.
17420         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
17422 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
17424         PR tree-optimization/84321
17425         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
17426         handling.  Also check whether the anti-range contains any values
17427         that satisfy the mask; switch to a VR_RANGE if not.
17429 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
17431         PR sanitizer/84340
17432         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
17434 2018-02-13  Martin Jambor  <mjambor@suse.cz>
17436         PR c++/83990
17437         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
17438         of call statements, also set location of a load to a temporary.
17440 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
17442         * config/rl78/rl78.c (add_vector_labels): New function.
17443         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
17444         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
17445         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
17446         which checks that no arguments are passed.
17447         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
17448         * doc/extend.texi: Documentation for the new attribute.
17450 2018-02-13  Andreas Schwab  <schwab@suse.de>
17452         * config/riscv/linux.h (CPP_SPEC): Define.
17454 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
17456         PR target/84335
17457         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
17458         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
17459         OPTION_MASK_ISA_AES as first argument to def_builtin_const
17460         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
17461         instead of OPTION_MASK_ISA_PCLMUL as first argument to
17462         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
17463         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
17464         temporarily for AES and PCLMUL builtins.
17466         PR tree-optimization/84339
17467         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
17468         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
17469         Formatting fixes.
17471         PR middle-end/84309
17472         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
17473         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
17474         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
17475         inline function.
17476         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
17477         inline function.
17478         * omp-simd-clone.h: New file.
17479         * omp-simd-clone.c: Include omp-simd-clone.h.
17480         (expand_simd_clones): No longer static.
17481         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
17482         cgraph.h and omp-simd-clone.h.
17483         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
17484         (vect_recog_widen_shift_pattern): Formatting fix.
17485         (vect_pattern_recog_1): Don't check optab for calls.
17487         PR target/84336
17488         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
17489         operands[2] into a REG before using gen_lowpart on it.
17491 2018-02-12  Jeff Law  <law@redhat.com>
17493         PR target/83760
17494         * config/sh/sh.c (find_barrier): Consider a sibling call
17495         a barrier as well.
17497         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
17498         successfully back substituting a reg.
17500 2018-02-12  Richard Biener  <rguenther@suse.de>
17502         PR tree-optimization/84037
17503         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
17504         parameter, move visited init to caller.
17505         (vect_slp_analyze_operations): Separate cost from validity
17506         check, initialize visited once for all instances.
17507         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
17508         for all instances.
17509         * tree-vect-stmts.c (vect_model_simple_cost): Make early
17510         out an assert.
17511         (vect_model_promotion_demotion_cost): Likewise.
17512         (vectorizable_bswap): Guard cost modeling with !slp_node
17513         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
17514         SLP stmts.
17515         (vectorizable_call): Likewise.
17516         (vectorizable_conversion): Likewise.
17517         (vectorizable_assignment): Likewise.
17518         (vectorizable_shift): Likewise.
17519         (vectorizable_operation): Likewise.
17520         (vectorizable_store): Likewise.
17521         (vectorizable_load): Likewise.
17522         (vectorizable_condition): Likewise.
17523         (vectorizable_comparison): Likewise.
17525 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
17527         PR sanitizer/84307
17528         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
17529         (ASAN_MARK): Fix fnspec to account for return value, change pointer
17530         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
17532 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
17534         PR middle-end/83665
17535         * params.def (inline-min-speedup): Increase from 8 to 15.
17536         (max-inline-insns-auto): Decrease from 40 to 30.
17537         * ipa-split.c (consider_split): Add some buffer for function to
17538         be considered inlining candidate.
17539         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
17540         default values.
17542 2018-02-12  Richard Biener  <rguenther@suse.de>
17544         PR tree-optimization/84037
17545         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
17546         matched stmts if we cannot swap the non-matched ones.
17548 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
17550         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
17551         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
17552         _mm_maskz_scalef_round_ss): New intrinsics.
17553         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
17554         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
17555         __builtin_ia32_scalefss_round): Remove.
17556         (__builtin_ia32_scalefsd_mask_round,
17557         __builtin_ia32_scalefss_mask_round): New intrinsics.
17558         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
17559         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
17560         ((match_operand:VF_128 2 "<round_nimm_predicate>"
17561         "<round_constraint>")): Changed to ...
17562         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
17563         "<round_scalar_constraint>")): ... this.
17564         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
17565         %0, %1, %2<round_op3>}"): Changed to ...
17566         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
17567         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
17568         %2<round_scalar_mask_op3>}"): ... this.
17569         * config/i386/subst.md (round_scalar_nimm_predicate): New.
17571 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
17573         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
17574         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
17575         (_mm_maskz_sqrt_round_ss): New intrinsics.
17576         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
17577         (__builtin_ia32_sqrtsd_mask_round)
17578         (__builtin_ia32_sqrtss_mask_round): New builtins.
17579         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
17580         (__builtin_ia32_sqrtss_round): Remove.
17581         (__builtin_ia32_sqrtsd_mask_round)
17582         (__builtin_ia32_sqrtss_mask_round): New builtins.
17583         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
17584         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
17585         ((match_operand:VF_128 1 "vector_operand"
17586         "xBm,<round_constraint>")): Changed to ...
17587         ((match_operand:VF_128 1 "vector_operand"
17588         "xBm,<round_scalar_constraint>")): ... this.
17589         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
17590         %0, %2, %<iptr>1<round_op3>}): Changed to ...
17591         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
17592         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
17593         %<iptr>1<round_scalar_mask_op3>}): ... this.
17594         ((set_attr "prefix" "<round_prefix>")): Changed to ...
17595         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
17597 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
17599         PR target/84266
17600         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
17601         Cast vec_cmpeq result to correct type.
17602         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
17603         Cast vec_cmpgt result to correct type.
17605 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
17607         * final.c (final_scan_insn_1): Renamed from...
17608         (final_scan_insn): ... this.  New wrapper, to recover
17609         seen from the outermost call in recursive ones.
17610         * config/sparc/sparc.c (output_return): Drop seen from call.
17611         (output_sibcall): Likewise.
17612         * config/visium/visium.c (output_branch): Likewise.
17614 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
17616         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
17617         function label.
17619 2018-02-10  Alan Modra  <amodra@gmail.com>
17621         PR target/84300
17622         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
17623         Specify LR as an input.
17625 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
17627         PR sanitizer/83987
17628         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
17629         remove_member_access_dummy_vars): New functions.
17630         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
17631         lower_omp_1, execute_lower_omp): Use them.
17633         PR rtl-optimization/84308
17634         * shrink-wrap.c (spread_components): Release todo vector.
17636 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
17638         PR rtl-optimization/57193
17639         * ira-color.c (struct allocno_color_data): Add member
17640         conflict_allocno_hard_prefs.
17641         (update_conflict_allocno_hard_prefs): New.
17642         (bucket_allocno_compare_func): Add a preference based on
17643         conflict_allocno_hard_prefs.
17644         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
17645         (color_allocnos): Remove a dead code.  Initiate
17646         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
17648 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
17650         PR target/84226
17651         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
17652         constraint from =wa to wa.  Avoid a subreg on the output operand,
17653         instead use a pseudo and subreg it in a move.
17654         (p9_xxbrd_<mode>): Changed to ...
17655         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
17656         (p9_xxbrd_v2df): New expander.
17657         (p9_xxbrw_<mode>): Changed to ...
17658         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
17659         (p9_xxbrw_v4sf): New expander.
17661 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
17663         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
17665 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
17667         PR target/83926
17668         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
17669         multiply in 32-bit mode.
17670         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
17671         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
17672         mode.
17674 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
17676         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
17677         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
17678         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
17679         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
17681 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
17683         PR lto/84213
17684         * dwarf2out.c (is_trivial_indirect_ref): New function.
17685         (dwarf2out_late_global_decl): Do not generate a location
17686         attribute for variables that have a non-trivial DECL_VALUE_EXPR
17687         and that are not defined in the current unit.
17689 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
17691         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
17692         instead of a libcall for UNORDERED.
17694 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
17696         PR target/82641
17697         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
17698         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
17700 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
17702         PR target/PR84295
17703         * config/s390/s390.c (s390_set_current_function): Invoke
17704         s390_indirect_branch_settings also if fndecl didn't change.
17706 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
17708         * config/rs6000/rs6000.md (blockage): Set length to zero.
17710 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
17712         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
17714 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
17716         PR sanitizer/84285
17717         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
17718         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
17719         -static-lib*san.
17721         PR debug/84252
17722         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
17723         PARALLEL incoming that failed vt_get_decl_and_offset check.
17725         PR middle-end/84237
17726         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
17727         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
17728         TREE_READONLY bit.
17729         (get_variable_section): For decls in named .bss* sections pass true as
17730         second argument to bss_initializer_p.
17732 2018-02-09  Marek Polacek  <polacek@redhat.com>
17733             Jakub Jelinek  <jakub@redhat.com>
17735         PR c++/83659
17736         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
17737         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
17738         Sync some changes from cxx_fold_indirect_ref.
17740 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
17742         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
17743         markers.
17744         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
17745         (BLOCK_INLINE_ENTRY_LABEL): New.
17746         (dwarf2out_var_location): Disregard inline entry markers.
17747         (inline_entry_data): New struct.
17748         (inline_entry_data_hasher): New hashtable type.
17749         (inline_entry_data_hasher::hash): New.
17750         (inline_entry_data_hasher::equal): New.
17751         (inline_entry_data_table): New variable.
17752         (add_high_low_attributes): Add DW_AT_entry_pc and
17753         DW_AT_GNU_entry_view attributes if a pending entry is found
17754         in inline_entry_data_table.  Add old entry_pc attribute only
17755         if debug nonbinding markers are disabled.
17756         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
17757         markers are enabled.
17758         (block_within_block_p, dwarf2out_inline_entry): New.
17759         (dwarf2out_finish): Check that no entries remained in
17760         inline_entry_data_table.
17761         * final.c (reemit_insn_block_notes): Handle inline entry notes.
17762         (final_scan_insn, notice_source_line): Likewise.
17763         (rest_of_clean_state): Skip inline entry markers.
17764         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
17765         markers.
17766         * gimple.c (gimple_build_debug_inline_entry): New.
17767         * gimple.h (enum gimple_debug_subcode): Add
17768         GIMPLE_DEBUG_INLINE_ENTRY.
17769         (gimple_build_debug_inline_entry): Declare.
17770         (gimple_debug_inline_entry_p): New.
17771         (gimple_debug_nonbind_marker_p): Adjust.
17772         * insn-notes.def (INLINE_ENTRY): New.
17773         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
17774         inline entry marker notes.
17775         (print_insn): Likewise.
17776         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
17777         (INSN_DEBUG_MARKER_KIND): Likewise.
17778         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
17779         * tree-inline.c (expand_call_inline): Build and insert
17780         debug_inline_entry stmt.
17781         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
17782         inline entry blocks early, if nonbind markers are enabled.
17783         (dump_scope_block): Dump fragment info.
17784         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
17785         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
17786         (gimple_build_debug_inline_entry): New.
17787         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
17788         Enable/disable inline entry points too.
17789         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
17790         (DEBUG_INSN): Describe inline entry markers.
17792         * common.opt (gvariable-location-views): New.
17793         (gvariable-location-views=incompat5): New.
17794         * config.in: Rebuilt.
17795         * configure: Rebuilt.
17796         * configure.ac: Test assembler for view support.
17797         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
17798         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
17799         * dwarf2out.c (var_loc_view): New typedef.
17800         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
17801         (dwarf2out_locviews_in_attribute): New.
17802         (dwarf2out_locviews_in_loclist): New.
17803         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
17804         (enum dw_line_info_opcode): Add LI_adv_address.
17805         (struct dw_line_info_table): Add view.
17806         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
17807         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
17808         (zero_view_p): New variable.
17809         (ZERO_VIEW_P): New macro.
17810         (output_asm_line_debug_info): New.
17811         (struct var_loc_node): Add view.
17812         (add_AT_view_list, AT_loc_list): New.
17813         (add_var_loc_to_decl): Add view param.  Test it against last.
17814         (new_loc_list): Add view params.  Record them.
17815         (AT_loc_list_ptr): Handle loc and view lists.
17816         (view_list_to_loc_list_val_node): New.
17817         (print_dw_val): Handle dw_val_class_view_list.
17818         (size_of_die): Likewise.
17819         (value_format): Likewise.
17820         (loc_list_has_views): New.
17821         (gen_llsym): Set vl_symbol too.
17822         (maybe_gen_llsym, skip_loc_list_entry): New.
17823         (dwarf2out_maybe_output_loclist_view_pair): New.
17824         (output_loc_list): Output view list or entries too.
17825         (output_view_list_offset): New.
17826         (output_die): Handle dw_val_class_view_list.
17827         (output_dwarf_version): New.
17828         (output_compilation_unit_header): Use it.
17829         (output_skeleton_debug_sections): Likewise.
17830         (output_rnglists, output_line_info): Likewise.
17831         (output_pubnames, output_aranges): Update version comments.
17832         (output_one_line_info_table): Output view numbers in asm comments.
17833         (dw_loc_list): Determine current endview, pass it to new_loc_list.
17834         Call maybe_gen_llsym.
17835         (loc_list_from_tree_1): Adjust.
17836         (add_AT_location_description): Create view list attribute if
17837         needed, check it's absent otherwise.
17838         (convert_cfa_to_fb_loc_list): Adjust.
17839         (maybe_emit_file): Call output_asm_line_debug_info for test.
17840         (dwarf2out_var_location): Reset views as needed.  Precompute
17841         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
17842         attribute.  Set view.
17843         (new_line_info_table): Reset next view.
17844         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
17845         (dwarf2out_source_line): Likewise.  Output view resets and labels to
17846         the assembler, or select appropriate line info opcodes.
17847         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
17848         (optimize_string_length): Catch it.  Adjust.
17849         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
17850         dw_val_class_view_list, and remove it if no longer needed.
17851         (hash_loc_list): Hash view numbers.
17852         (loc_list_hasher::equal): Compare them.
17853         (optimize_location_lists): Check whether a view list symbol is
17854         needed, and whether the locview attribute is present, and
17855         whether they match.  Remove the locview attribute if no longer
17856         needed.
17857         (index_location_lists): Call skip_loc_list_entry for test.
17858         (dwarf2out_finish): Call output_asm_line_debug_info for test.
17859         Use output_dwarf_version.
17860         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
17861         (struct dw_val_node): Add val_view_list.
17862         * final.c (SEEN_NEXT_VIEW): New.
17863         (set_next_view_needed): New.
17864         (clear_next_view_needed): New.
17865         (maybe_output_next_view): New.
17866         (final_start_function): Rename to...
17867         (final_start_function_1): ... this.  Take pointer to FIRST,
17868         add SEEN parameter.  Emit param bindings in the initial view.
17869         (final_start_function): Reintroduce SEEN-less interface.
17870         (final): Rename to...
17871         (final_1): ... this.  Take SEEN parameter.  Output final pending
17872         next view at the end.
17873         (final): Reintroduce seen-less interface.
17874         (final_scan_insn): Output pending next view before switching
17875         sections or ending a block.  Mark the next view as needed when
17876         outputting variable locations.  Notify debug backend of section
17877         changes, and of location view changes.
17878         (rest_of_handle_final): Adjust.
17879         * toplev.c (process_options): Autodetect value for debug variable
17880         location views option.  Warn on incompat5 without -gdwarf-5.
17881         * doc/invoke.texi (gvariable-location-views): New.
17882         (gvariable-location-views=incompat5): New.
17883         (gno-variable-location-views): New.
17885 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
17887         PR tree-optimization/84136
17888         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
17889         that the result of find_edge is non-NULL.
17891 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
17893         PR target/83008
17894         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
17895         storing integer register in SImode.  Fix cost of 256 and 512
17896         byte aligned SSE register store.
17898 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
17900         * config/i386/i386.c (ix86_multiplication_cost): Fix
17901         multiplication cost for TARGET_AVX512DQ.
17903 2018-02-08  Marek Polacek  <polacek@redhat.com>
17905         PR tree-optimization/84238
17906         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
17907         get_range_strlen.
17909 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
17911         PR tree-optimization/84265
17912         * tree-vect-stmts.c (vectorizable_store): Don't treat
17913         VMAT_CONTIGUOUS accesses as grouped.
17914         (vectorizable_load): Likewise.
17916 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
17918         PR tree-optimization/81635
17919         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
17920         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
17921         (test_round_for_mask): New functions.
17922         (wide_int_cc_tests): Call test_round_for_mask.
17923         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
17924         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
17925         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
17926         range returned by get_range_info.
17928 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
17930         PR ipa/81360
17931         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
17932         * symtab.c: Include builtins.h
17933         (symtab_node::output_to_lto_symbol_table_p): Move here
17934         from lto-streamer-out.c:output_symbol_p.
17935         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
17936         (output_symbol_p): Move all logic to symtab.c
17937         (produce_symtab): Update.
17939 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
17941         * config/s390/s390-opts.h (enum indirect_branch): Define.
17942         * config/s390/s390-protos.h (s390_return_addr_from_memory)
17943         (s390_indirect_branch_via_thunk)
17944         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
17945         (enum s390_indirect_branch_type): Define.
17946         * config/s390/s390.c (struct s390_frame_layout, struct
17947         machine_function): Remove.
17948         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
17949         (indirect_branch_table_label_no, indirect_branch_table_name):
17950         Define variables.
17951         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
17952         (enum s390_indirect_branch_option): Define.
17953         (s390_return_addr_from_memory): New function.
17954         (s390_handle_string_attribute): New function.
17955         (s390_attribute_table): Add new attribute handler.
17956         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
17957         (s390_indirect_branch_via_thunk): New function.
17958         (s390_indirect_branch_via_inline_thunk): New function.
17959         (s390_function_ok_for_sibcall): When jumping via thunk disallow
17960         sibling call optimization for non z10 compiles.
17961         (s390_emit_call): Force indirect branch target to be a single
17962         register.  Add r1 clobber for non-z10 compiles.
17963         (s390_emit_epilogue): Emit return jump via return_use expander.
17964         (s390_reorg): Handle JUMP_INSNs as execute targets.
17965         (s390_option_override_internal): Perform validity checks for the
17966         new command line options.
17967         (s390_indirect_branch_attrvalue): New function.
17968         (s390_indirect_branch_settings): New function.
17969         (s390_set_current_function): Invoke s390_indirect_branch_settings.
17970         (s390_output_indirect_thunk_function):  New function.
17971         (s390_code_end): Implement target hook.
17972         (s390_case_values_threshold): Implement target hook.
17973         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
17974         macros.
17975         * config/s390/s390.h (struct s390_frame_layout)
17976         (struct machine_function): Move here from s390.c.
17977         (TARGET_INDIRECT_BRANCH_NOBP_RET)
17978         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
17979         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
17980         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
17981         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
17982         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
17983         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
17984         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
17985         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
17986         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
17987         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
17988         (mnemonic attribute): Add values which aren't recognized
17989         automatically.
17990         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
17991         pattern for branch conversion.  Fix mnemonic attribute.
17992         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
17993         indirect branch via thunk if requested.
17994         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
17995         ("*indirect_jump"): Disable for branch conversion using out of
17996         line thunks.
17997         ("indirect_jump_via_thunk<mode>_z10")
17998         ("indirect_jump_via_thunk<mode>")
17999         ("indirect_jump_via_inlinethunk<mode>_z10")
18000         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
18001         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
18002         ("casesi_jump_via_inlinethunk<mode>_z10")
18003         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
18004         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
18005         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
18006         ("*indirect2_jump"): Disable for branch conversion.
18007         ("casesi_jump"): Turn into expander and expand patterns for branch
18008         conversion.
18009         ("return_use"): New expander.
18010         ("*return"): Emit return via thunk and rename it to ...
18011         ("*return<mode>"): ... this one.
18012         * config/s390/s390.opt: Add new options and and enum for the
18013         option values.
18015 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
18017         * lra-constraints.c (match_reload): Unconditionally use
18018         gen_lowpart_SUBREG, rather than selecting between that
18019         and equivalent gen_rtx_SUBREG code.
18021 2018-02-08  Richard Biener  <rguenther@suse.de>
18023         PR tree-optimization/84233
18024         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
18025         changed flag instead of boguously re-using phi_inserted.
18027 2018-02-08  Martin Jambor  <mjambor@suse.cz>
18029         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
18030         static local variables.
18032 2018-02-08  Richard Biener  <rguenther@suse.de>
18034         PR tree-optimization/84278
18035         * tree-vect-stmts.c (vectorizable_store): When looking for
18036         smaller vector types to perform grouped strided loads/stores
18037         make sure the mode is supported by the target.
18038         (vectorizable_load): Likewise.
18040 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
18042         * config/aarch64/aarch64.c (aarch64_components_for_bb):
18043         Increase LDP/STP opportunities by adding adjacent callee-saves.
18045 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
18047         PR rtl-optimization/84068
18048         PR rtl-optimization/83459
18049         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
18051 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
18053         PR tree-optimization/84224
18054         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
18055         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
18056         non-zero arguments.
18058 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
18060         PR target/84113
18061         * config/rs6000/altivec.md (*restore_world): Remove LR use.
18062         * config/rs6000/predicates.md (restore_world_operation): Adjust op
18063         count, remove one USE.
18065 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
18067         * doc/install.texi (Configuration): Document the
18068         --with-long-double-format={ibm,ieee} PowerPC configuration
18069         options.
18071         PR target/84154
18072         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
18073         Convert from define_expand to be define_insn_and_split.  Rework
18074         float/double/_Float128 conversions to QI/HI/SImode to work with
18075         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
18076         conversions to QI/HImode types did a store and then a load to
18077         truncate the value.  For conversions to VSX registers, don't split
18078         the insn, instead emit the code directly.  Use the code iterator
18079         any_fix to combine signed and unsigned conversions.
18080         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
18081         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
18082         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
18083         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
18084         (fix_<mode>di2_hw): Likewise.
18085         (fixuns_<mode>di2_hw): Likewise.
18086         (fix_<mode>si2_hw): Likewise.
18087         (fixuns_<mode>si2_hw): Likewise.
18088         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
18089         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
18090         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
18091         fix<uns>_trunc<SFDF:mode>si2_p8.
18092         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
18093         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
18094         (fix<uns>_<mode>_mem): Likewise.
18095         (fctiw<u>z_<mode>_mem): Likewise.
18096         (fix<uns>_<mode>_mem): Likewise.
18097         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
18098         the register allocator from doing a direct move to the GPRs to do
18099         a store, and instead use the ISA 3.0 store byte/half-word from
18100         vector register instruction.  For IEEE 128-bit floating point,
18101         also optimize stores of 32-bit ints.
18102         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
18104 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
18106         * genextract.c (push_pathstr_operand): New function to support
18107         [a-zA-Z].
18108         (walk_rtx): Call push_pathstr_operand.
18109         (print_path): Support [a-zA-Z].
18111 2018-02-07  Richard Biener  <rguenther@suse.de>
18113         PR tree-optimization/84037
18114         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
18115         (cse_and_gimplify_to_preheader): Declare.
18116         (vect_get_place_in_interleaving_chain): Likewise.
18117         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18118         ivexpr_map.
18119         (_loop_vec_info::~_loop_vec_info): Delete it.
18120         (cse_and_gimplify_to_preheader): New function.
18121         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
18122         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
18123         (vectorizable_load): Likewise.  For grouped stores always base
18124         the IV on the first element.
18125         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
18126         condition before gimplifying.
18128 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
18130         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
18131         *DIV_EXPR and *MOD_EXPR.
18133 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
18135         PR target/84248
18136         * config/i386/i386.c (ix86_option_override_internal): Mask out
18137         the CF_SET bit when checking -fcf-protection.
18139 2018-02-07  Tom de Vries  <tom@codesourcery.com>
18141         PR libgomp/84217
18142         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
18143         enough.
18145 2018-02-07  Richard Biener  <rguenther@suse.de>
18147         PR tree-optimization/84204
18148         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
18149         this place.
18151         PR tree-optimization/84205
18152         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
18153         special-case isl_ast_op_zdiv_r.
18155         PR tree-optimization/84223
18156         * graphite-scop-detection.c (gather_bbs::before_dom_children):
18157         Only add conditions from within the region.
18158         (gather_bbs::after_dom_children): Adjust.
18160 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
18162         PR target/84209
18163         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
18164         * config/avr/avr.md: Only post-reload split REG-REG moves if
18165         either register is GENERAL_REG_P.
18167 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
18169         PR tree-optimization/84235
18170         * tree-ssa-scopedtables.c
18171         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
18172         if the subtraction is performed in floating point type where NaNs are
18173         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
18174         build 1.  Formatting fix.
18176 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
18178         PR target/84146
18179         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
18180         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
18181         and skip it regardless of bb boundaries.  Use CALL_P macro,
18182         don't test INSN_P (insn) together with CALL_P or JUMP_P check
18183         unnecessarily, formatting fix.
18185 2018-02-06  Michael Collison  <michael.collison@arm.com>
18187         * config/arm/thumb2.md:
18188         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
18189         (*thumb_mov_notscc): Ditto.
18191 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
18193         PR target/84154
18194         * config/rs6000/rs6000.md (su code attribute): Use "u" for
18195         unsigned_fix, not "s".
18197 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18199         * configure.ac (gcc_fn_eh_frame_ro): New function.
18200         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
18201         correct .eh_frame permissions.
18202         * configure: Regenerate.
18204 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
18206         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
18207         irrelevant options.
18209 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18211         * config/rs6000/rs6000.c (rs6000_option_override_internal):
18212         Display warning message for -mno-speculate-indirect-jumps.
18214 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
18216         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
18217         Undocumented.
18218         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
18220 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
18222         PR tree-optimization/84225
18223         * tree-eh.c (find_trapping_overflow): Only call
18224         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
18226 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
18228         PR target/84145
18229         * config/i386/i386.c: Reimplement the check of possible options
18230         -mibt/-mshstk conbination. Change error messages.
18231         * doc/invoke.texi: Fix a typo: remove extra '='.
18233 2018-02-06  Marek Polacek  <polacek@redhat.com>
18235         PR tree-optimization/84228
18236         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
18238 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
18240         PR target/82641
18241         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
18242         emitted arch directives.
18243         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
18244         __ARM_FEATURE_COPROC before changing architectures.
18246 2018-02-06  Richard Biener  <rguenther@suse.de>
18248         * config/i386/i386.c (print_reg): Fix typo.
18249         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
18251 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
18253         * configure: Regenerate.
18255 2018-02-05  Martin Sebor  <msebor@redhat.com>
18257         PR tree-optimization/83369
18258         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
18259         inlining context.
18261 2018-02-05  Martin Liska  <mliska@suse.cz>
18263         * doc/invoke.texi: Cherry-pick upstream r323995.
18265 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
18267         * ira.c (ira_init_register_move_cost): Adjust comment.
18269 2018-02-05  Martin Liska  <mliska@suse.cz>
18271         PR gcov-profile/84137
18272         * doc/gcov.texi: Fix typo in documentation.
18274 2018-02-05  Martin Liska  <mliska@suse.cz>
18276         PR gcov-profile/83879
18277         * doc/gcov.texi: Document necessity of --dynamic-list-data when
18278         using dlopen functionality.
18280 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
18282         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
18283         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
18284         _mm_maskz_range_ss, _mm_mask_range_round_ss,
18285         _mm_maskz_range_round_ss): New intrinsics.
18286         (__builtin_ia32_rangesd128_round)
18287         (__builtin_ia32_rangess128_round): Remove.
18288         (__builtin_ia32_rangesd128_mask_round,
18289         __builtin_ia32_rangess128_mask_round): New builtins.
18290         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
18291         __builtin_ia32_rangess128_round): Remove.
18292         (__builtin_ia32_rangesd128_mask_round,
18293         __builtin_ia32_rangess128_mask_round): New builtins.
18294         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
18295         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
18296         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
18297         "<round_saeonly_constraint>")): Changed to ...
18298         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
18299         "<round_saeonly_scalar_constraint>")): ... this.
18300         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
18301         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
18302         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
18303         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
18304         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
18306 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
18308         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
18309         options.
18310         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
18311         Remove all values except native, 8540 and 8548.
18313 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
18315         * config/i386/i386.c (ix86_output_function_return): Pass
18316         INVALID_REGNUM, instead of -1, as invalid register number to
18317         indirect_thunk_name and output_indirect_thunk.
18319 2018-02-02  Julia Koval  <julia.koval@intel.com>
18321         * config.gcc: Add -march=icelake.
18322         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
18323         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
18324         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
18325         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
18326         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
18327         (processor_target_table): Add icelake.
18328         (ix86_option_override_internal): Handle new PTAs.
18329         (get_builtin_code_for_version): Handle icelake.
18330         (M_INTEL_COREI7_ICELAKE): New.
18331         (fold_builtin_cpu): Handle icelake.
18332         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
18333         * doc/invoke.texi: Add -march=icelake.
18335 2018-02-02  Julia Koval  <julia.koval@intel.com>
18337         * config/i386/i386.c (ix86_option_override_internal): Change flags type
18338         to wide_int_bitmask.
18339         * wide-int-bitmask.h: New.
18341 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
18343         PR target/84066
18344         * config/i386/i386.md: Replace Pmode with word_mode in
18345         builtin_setjmp_setup and builtin_longjmp to support x32.
18347 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
18349         PR target/56010
18350         PR target/83743
18351         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
18352         #include "opts.h".
18353         (rs6000_supported_cpu_names): New static variable.
18354         (linux_cpu_translation_table): Likewise.
18355         (elf_platform) <cpu>: Define new static variable and use it.
18356         Translate kernel AT_PLATFORM name to canonical name if needed.
18357         Error if platform name is unknown.
18359 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
18361         PR target/84089
18362         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
18364 2018-02-01  Jeff Law  <law@redhat.com>
18366         PR target/84128
18367         * config/i386/i386.c (release_scratch_register_on_entry): Add new
18368         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
18369         the scratch if RELEASE_VIA_POP is false.
18370         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
18371         If we have to save a temporary register, decrement SIZE appropriately.
18372         Pass new arguments to release_scratch_register_on_entry.
18373         (ix86_adjust_stack_and_probe): Likewise.
18374         (ix86_emit_probe_stack_range): Pass new arguments to
18375         release_scratch_register_on_entry.
18377 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
18379         PR rtl-optimization/84157
18380         * combine.c (change_zero_ext): Use REG_P predicate in
18381         front of HARD_REGISTER_P predicate.
18383 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
18385         * config/avr/avr.c (avr_option_override): Move disabling of
18386         -fdelete-null-pointer-checks to...
18387         * common/config/avr/avr-common.c (avr_option_optimization_table):
18388         ...here.
18390 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
18392         PR tree-optimization/81635
18393         * tree-data-ref.c (split_constant_offset_1): For types that
18394         wrap on overflow, try to use range info to prove that wrapping
18395         cannot occur.
18397 2018-02-01  Renlin Li  <renlin.li@arm.com>
18399         PR target/83370
18400         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
18401         TAILCALL_ADDR_REGS.
18402         (aarch64_register_move_cost): Likewise.
18403         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
18404         TAILCALL_ADDR_REGS.
18405         (REG_CLASS_NAMES): Likewise.
18406         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
18407         TAILCALL_ADDR_REGS. Remove IP registers.
18408         * config/aarch64/aarch64.md (Ucs): Update register constraint.
18410 2018-02-01  Richard Biener  <rguenther@suse.de>
18412         * domwalk.h (dom_walker::dom_walker): Add additional constructor
18413         for specifying RPO order and allow NULL for that.
18414         * domwalk.c (dom_walker::dom_walker): Likewise.
18415         (dom_walker::walk): Handle NULL RPO order.
18416         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
18417         in RPO order.
18418         (rewrite_update_dom_walker): Likewise.
18419         (mark_def_dom_walker): Likewise.
18421 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
18423         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
18424         (aarch64_maybe_expand_sve_subreg_move): Declare.
18425         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
18426         * config/aarch64/predicates.md (aarch64_any_register_operand): New
18427         predicate.
18428         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
18429         that are semantically a reverse operation.
18430         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
18431         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
18432         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
18433         functions.
18434         (aarch64_can_change_mode_class): For big-endian, forbid changes
18435         between two SVE modes if they have different element sizes.
18437 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
18439         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
18440         the TImode handling for big-endian targets.
18442 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
18444         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
18445         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
18446         not just bytes.
18447         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
18448         Remove BSWAP handing for big-endian targets and use the form of
18449         LD1RQ appropariate for the mode.
18451 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
18453         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
18454         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
18455         duplicated element.
18457 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
18459         PR tearget/83845
18460         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
18461         check for operands that need to go through aarch64_sve_reload_be.
18463 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
18465         PR tree-optimization/81661
18466         PR tree-optimization/84117
18467         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
18468         * tree-eh.c: Include gimplify.h.
18469         (find_trapping_overflow, replace_trapping_overflow,
18470         rewrite_to_non_trapping_overflow): New functions.
18471         * tree-vect-loop.c: Include tree-eh.h.
18472         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
18473         * tree-data-ref.c: Include tree-eh.h.
18474         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
18476 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
18478         PR rtl-optimization/84123
18479         * combine.c (change_zero_ext): Check if hard register satisfies
18480         can_change_dest_mode before calling gen_lowpart_SUBREG.
18482 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
18484         PR target/82444
18485         * ira.c (ira_init_register_move_cost): Remove assert.
18487 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
18489         PR rtl-optimization/84071
18490         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
18491         * doc/tm.texi: Regenerate.
18493 2018-01-31  Richard Biener  <rguenther@suse.de>
18495         PR tree-optimization/84132
18496         * tree-data-ref.c (analyze_miv_subscript): Properly
18497         check whether evolution_function_is_affine_multivariate_p
18498         before calling gcd_of_steps_may_divide_p.
18500 2018-01-31  Julia Koval  <julia.koval@intel.com>
18502         PR target/83618
18503         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
18504         * config/i386/i386.md (rdpid_rex64) New.
18505         (rdpid): Make 32bit only.
18507 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
18509         PR lto/84105
18510         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
18511         an IDENTIFIER_NODE for FUNCTION_TYPE's.
18513 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
18515         Revert
18516         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
18518         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
18520 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
18522         PR rtl-optimization/84071
18523         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
18524         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
18526 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
18528         * config/arc/arc.c (arc_handle_aux_attribute): New function.
18529         (arc_attribute_table): Add 'aux' attribute.
18530         (arc_in_small_data_p): Consider aux like variables.
18531         (arc_is_aux_reg_p): New function.
18532         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
18533         (arc_get_aux_arg): New function.
18534         (prepare_move_operands): Handle aux-register access.
18535         (arc_handle_aux_attribute): New function.
18536         * doc/extend.texi (ARC Variable attributes): Add subsection.
18538 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
18540         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
18541         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
18542         (arc_attribute_table): Add 'uncached' attribute.
18543         (arc_print_operand): Print '.di' flag for uncached memory
18544         accesses.
18545         (arc_in_small_data_p): Do not consider for small data the uncached
18546         types.
18547         (arc_is_uncached_mem_p): New function.
18548         * config/arc/predicates.md (compact_store_memory_operand): Check
18549         for uncached memory accesses.
18550         (nonvol_nonimm_operand): Likewise.
18551         * doc/extend.texi (ARC Type Attribute): New subsection.
18553 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
18555         PR c/84100
18556         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
18557         falign-loops=): Add Optimization flag.
18559 2018-01-30  Jeff Law  <law@redhat.com>
18561         PR target/84064
18562         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
18563         INT_REGISTERS_SAVED.  Check it prior to calling
18564         get_scratch_register_on_entry.
18565         (ix86_adjust_stack_and_probe): Similarly.
18566         (ix86_emit_probe_stack_range): Similarly.
18567         (ix86_expand_prologue): Corresponding changes.
18569 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18571         PR target/40411
18572         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
18573         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
18575 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
18577         PR target/84112
18578         * lra-constraints.c (curr_insn_transform): Process AND in the
18579         address.
18581 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
18583         PR rtl-optimization/83986
18584         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
18585         dependence against last_pending_memory_flush in addition to
18586         pending_jump_insns.
18588 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
18590         PR tree-optimization/81611
18591         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
18592         copies.
18594 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
18596         PR target/83758
18597         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
18598         a reg rtx.
18600 2018-01-30  Richard Biener  <rguenther@suse.de>
18601             Jakub Jelinek  <jakub@redhat.com>
18603         PR tree-optimization/84111
18604         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
18605         inner loops added during recursion, as they don't have up-to-date
18606         SSA form.
18608 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
18610         PR ipa/81360
18611         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
18612         (can_inline_edge_by_limits_p): ... here.
18613         (can_early_inline_edge_p, check_callers,
18614         update_caller_keys, update_callee_keys, recursive_inlining,
18615         add_new_edges_to_heap, speculation_useful_p,
18616         inline_small_functions,
18617         inline_small_functions, flatten_function,
18618         inline_to_all_callers_1): Update.
18620 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
18622         * profile-count.c (profile_count::combine_with_ipa_count): Handle
18623         zeros correctly.
18625 2018-01-30  Richard Biener  <rguenther@suse.de>
18627         PR tree-optimization/83008
18628         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
18629         invariant and constant vector uses in stmts when they need
18630         more than one stmt.
18632 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18634         PR bootstrap/84017
18635         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
18636         * configure: Regenerate.
18638 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
18640         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
18641         pattern.
18642         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
18643         Use gen_rtx_REG rather than gen_lowpart.
18645 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
18647         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
18648         rather than 0 when creating partial subregs.
18650 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
18652         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
18653         of usage.
18655 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
18657         PR target/81550
18658         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
18659         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
18660         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
18661         flags.  This restores the settings used before the 2017-07-24.
18662         Turning off pre increment/decrement/modify allows IVOPTS to
18663         optimize DF/SF loops where the index is an int.
18665 2018-01-29  Richard Biener  <rguenther@suse.de>
18666             Kelvin Nilsen  <kelvin@gcc.gnu.org>
18668         PR bootstrap/80867
18669         * tree-vect-stmts.c (vectorizable_call): Don't call
18670         targetm.vectorize_builtin_md_vectorized_function if callee is
18671         NULL.
18673 2018-01-22  Carl Love  <cel@us.ibm.com>
18675         * doc/extend.tex: Fix typo in second arg in
18676         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
18678 2018-01-29  Richard Biener  <rguenther@suse.de>
18680         PR tree-optimization/84086
18681         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
18682         (flush_ssaname_freelist): When SSA names were released reset
18683         the SCEV hash table.
18685 2018-01-29  Richard Biener  <rguenther@suse.de>
18687         PR tree-optimization/84057
18688         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
18689         removed paths when removing edges.
18691 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
18693         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
18694         -mfunction-return=@var{choice}.
18696 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
18698         PR diagnostic/84034
18699         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
18700         Handle CR like TAB.
18701         (layout::print_source_line): Likewise.
18702         (test_get_line_width_without_trailing_whitespace): Add test cases.
18704 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
18706         PR middle-end/84040
18707         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
18708         debug insns.
18710 2018-01-26  Jim Wilson  <jimw@sifive.com>
18712         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
18714         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
18715         specified.
18717 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18719         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
18720         and CMP + SUB-immediate -> SUBS.
18722 2018-01-26  Martin Sebor  <msebor@redhat.com>
18724         PR tree-optimization/83896
18725         * tree-ssa-strlen.c (get_string_len): Rename...
18726         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
18727         Avoid assuming length is constant.
18728         (handle_char_store): Use HOST_WIDE_INT for string length.
18730 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
18732         PR target/81763
18733         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
18734         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
18736 2018-01-26  Richard Biener  <rguenther@suse.de>
18738         PR rtl-optimization/84003
18739         * dse.c (record_store): Only record redundant stores when
18740         the earlier store aliases at least all accesses the later one does.
18742 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
18744         PR rtl-optimization/83985
18745         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
18746         REG_CFA_RESTORE insns.
18747         (delete_unmarked_insns): Don't ignore separate shrink wrapping
18748         REG_CFA_RESTORE insns here.
18750         PR c/83989
18751         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
18752         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
18754 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18756         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
18757         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
18758         (arc_init): Likewise.
18759         (arc_override_options): Likewise.
18760         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
18761         value.
18762         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
18763         support.
18764         * config/arc/arc.h (TARGET_DBNZ): Define.
18765         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
18766         properly set the tune attribute.
18767         (dbnz): Use TARGET_DBNZ guard.
18768         * config/arc/arc.opt (mtune): Add core3 option.
18770 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18772         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
18773         recognize new pic like addresses.
18774         (arc_delegitimize_address): Clean up.
18776 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18778         * config/arc/arc-arches.def: Option mrf16 valid for all
18779         architectures.
18780         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
18781         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
18782         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
18783         * config/arc/arc-tables.opt: Regenerate.
18784         * config/arc/arc.c (arc_conditional_register_usage): Handle
18785         reduced register file case.
18786         (arc_file_start): Set must have build attributes.
18787         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
18788         mrf16 option value.
18789         * config/arc/arc.opt (mrf16): Add new option.
18790         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
18791         * config/arc/genmultilib.awk: Handle new mrf16 option.
18792         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
18793         * config/arc/t-multilib: Regenerate.
18794         * doc/invoke.texi (ARC Options): Document mrf16 option.
18796 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18798         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
18799         * config/arc/arc.c (arc_handle_secure_attribute): New function.
18800         (arc_attribute_table): Add 'secure_call' attribute.
18801         (arc_print_operand): Print secure call operand.
18802         (arc_function_ok_for_sibcall): Don't optimize tail calls when
18803         secure.
18804         (arc_is_secure_call_p): New function.  * config/arc/arc.md
18805         (call_i): Add support for sjli instruction.
18806         (call_value_i): Likewise.
18807         * config/arc/constraints.md (Csc): New constraint.
18809 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18810             John Eric Martin  <John.Martin@emmicro-us.com>
18812         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
18813         * config/arc/arc.c (_arc_jli_section): New struct.
18814         (arc_jli_section): New type.
18815         (rc_jli_sections): New static variable.
18816         (arc_handle_jli_attribute): New function.
18817         (arc_attribute_table): Add jli_always and jli_fixed attribute.
18818         (arc_file_end): New function.
18819         (TARGET_ASM_FILE_END): Define.
18820         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
18821         (arc_add_jli_section): New function.
18822         (jli_call_scan): Likewise.
18823         (arc_reorg): Call jli_call_scan.
18824         (arc_output_addsi): Remove 'S' from printing asm operand.
18825         (arc_is_jli_call_p): New function.
18826         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
18827         operand.
18828         (movhi_insn): Likewise.
18829         (movsi_insn): Likewise.
18830         (movsi_set_cc_insn): Likewise.
18831         (loadqi_update): Likewise.
18832         (load_zeroextendqisi_update): Likewise.
18833         (load_signextendqisi_update): Likewise.
18834         (loadhi_update): Likewise.
18835         (load_zeroextendhisi_update): Likewise.
18836         (load_signextendhisi_update): Likewise.
18837         (loadsi_update): Likewise.
18838         (loadsf_update): Likewise.
18839         (movsicc_insn): Likewise.
18840         (bset_insn): Likewise.
18841         (bxor_insn): Likewise.
18842         (bclr_insn): Likewise.
18843         (bmsk_insn): Likewise.
18844         (bicsi3_insn): Likewise.
18845         (cmpsi_cc_c_insn): Likewise.
18846         (movsi_ne): Likewise.
18847         (movsi_cond_exec): Likewise.
18848         (clrsbsi2): Likewise.
18849         (norm_f): Likewise.
18850         (normw): Likewise.
18851         (swap): Likewise.
18852         (divaw): Likewise.
18853         (flag): Likewise.
18854         (sr): Likewise.
18855         (kflag): Likewise.
18856         (ffs): Likewise.
18857         (ffs_f): Likewise.
18858         (fls): Likewise.
18859         (call_i): Remove 'S' asm letter, add jli instruction.
18860         (call_value_i): Likewise.
18861         * config/arc/arc.op (mjli-always): New option.
18862         * config/arc/constraints.md (Cji): New constraint.
18863         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
18864         operand.
18865         (subsf3_fpx): Likewise.
18866         (mulsf3_fpx): Likewise.
18867         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
18868         asm operand.
18869         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
18870         function attrbutes.
18871         * doc/invoke.texi (ARC): Document mjli-always option.
18873 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
18875         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
18876         avoid addition with 0 and use incw and decw where possible.
18878 2018-01-26  Richard Biener  <rguenther@suse.de>
18880         PR tree-optimization/81082
18881         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
18882         association if it requires casting to unsigned.
18883         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
18884         from fold_plusminus_mult_expr to catch important cases late when
18885         range info is available.
18887 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18889         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
18890         * configure.ac (hidden_linkonce): New test.
18891         * configure: Regenerate.
18892         * config.in: Regenerate.
18894 2018-01-26  Julia Koval  <julia.koval@intel.com>
18896         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
18897         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
18898         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
18899         _mm_mask_bitshuffle_epi64_mask): Fix type.
18900         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
18901         USI_FTYPE_V4DI_V4DI_USI): Remove.
18902         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
18903         __builtin_ia32_vpshufbitqmb256_mask,
18904         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
18905         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
18906         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
18908 2018-01-26  Alan Modra  <amodra@gmail.com>
18910         PR target/84033
18911         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
18912         UNSPEC_VBPERMQ.  Sort other unspecs.
18914 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
18916         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
18918 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
18920         PR middle-end/83055
18921         * predict.c (drop_profile): Do not push/pop cfun; update also
18922         node->count.
18923         (handle_missing_profiles): Fix logic looking for zero profiles.
18925 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
18927         PR middle-end/83977
18928         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
18929         on functions with #pragma omp declare simd or functions with simd
18930         attribute.
18931         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
18932         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
18933         Remove trailing \n from warning_at calls.
18935 2018-01-25  Tom de Vries  <tom@codesourcery.com>
18937         PR target/84028
18938         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
18939         for neutered workers.
18941 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
18943         PR target/68467
18944         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
18945         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
18947 2018-01-24  Jeff Law  <law@redhat.com>
18949         PR target/83994
18950         * i386.c (get_probe_interval): Move to earlier point.
18951         (ix86_compute_frame_layout): If -fstack-clash-protection and
18952         the frame is larger than the probe interval, then use pushes
18953         to save registers rather than reg->mem moves.
18954         (ix86_expand_prologue): Remove conditional for int_registers_saved
18955         assertion.
18957 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
18959         PR target/84014
18960         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
18961         min/max for never referenced object.
18963 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
18965         PR middle-end/83977
18966         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
18967         here.
18968         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
18969         attributes from DECL_ATTRIBUTES (decl) without affecting
18970         DECL_ATTRIBUTES (current_function_decl).
18971         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
18972         functions with non-NULL DECL_ABSTRACT_ORIGIN.
18974 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
18976         PR tree-optimization/83979
18977         * fold-const.c (fold_comparison): Use constant_boolean_node
18978         instead of boolean_{true,false}_node.
18980 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
18982         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
18983         with zero counts.
18985 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18987         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18988         Simplify the clause that sets the length attribute.
18989         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18990         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
18991         clause that sets the length attribute.
18992         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18994 2018-01-24  Tom de Vries  <tom@codesourcery.com>
18996         PR target/83589
18997         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
18998         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
18999         Add strict parameter.
19000         (prevent_branch_around_nothing): Insert dummy insn between branch to
19001         label and label with no ptx insn inbetween.
19002         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
19004 2018-01-24  Tom de Vries  <tom@codesourcery.com>
19006         PR target/81352
19007         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
19008         for neutered threads in warp.
19009         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
19011 2018-01-24  Richard Biener  <rguenther@suse.de>
19013         PR tree-optimization/83176
19014         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
19015         operands.
19017 2018-01-24  Richard Biener  <rguenther@suse.de>
19019         PR tree-optimization/82819
19020         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
19021         code generating pluses that are no-ops in the target precision.
19023 2018-01-24  Richard Biener  <rguenther@suse.de>
19025         PR middle-end/84000
19026         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
19028 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
19030         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
19031         to merge probabilities.
19032         * predict.c (probably_never_executed): Also mark as cold functions
19033         with global 0 profile and guessed local profile.
19034         * profile-count.c (profile_probability::combine_with_count): New
19035         member function.
19036         * profile-count.h (profile_probability::operator*,
19037         profile_probability::operator*=, profile_probability::operator/,
19038         profile_probability::operator/=): Reduce precision to adjusted
19039         and set value to guessed on contradictory divisions.
19040         (profile_probability::combine_with_freq): Remove.
19041         (profile_probability::combine_wiht_count): Declare.
19042         (profile_count::force_nonzero):: Set to adjusted.
19043         (profile_count::probability_in):: Set quality to adjusted.
19044         * tree-ssa-tail-merge.c (replace_block_by): Use
19045         combine_with_count.
19047 2018-01-23  Andrew Waterman  <andrew@sifive.com>
19048             Jim Wilson  <jimw@sifive.com>
19050         * config/riscv/riscv.c (riscv_stack_boundary): New.
19051         (riscv_option_override): Set riscv_stack_boundary.  Handle
19052         riscv_preferred_stack_boundary_arg.
19053         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
19054         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
19055         (STACK_BOUNDARY): Set to riscv_stack_boundary.
19056         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
19057         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
19058         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
19060 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
19062         PR target/83905
19063         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
19064         of struct ix86_frame.
19065         (ix86_expand_epilogue): Likewise.  Add a local variable for
19066         the reg_save_offset field in struct ix86_frame.
19068 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
19070         PR tree-optimization/82604
19071         * tree-loop-distribution.c (enum partition_kind): New enum item
19072         PKIND_PARTIAL_MEMSET.
19073         (partition_builtin_p): Support above new enum item.
19074         (generate_code_for_partition): Ditto.
19075         (compute_access_range): Differentiate cases that equality can be
19076         proven at all loops, the innermost loops or no loops.
19077         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
19078         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
19079         (finalize_partitions, distribute_loop): Don't fuse partition of
19080         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
19081         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
19082         parloop is enabled.
19084 2018-01-23  Martin Liska  <mliska@suse.cz>
19086         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
19087         order to ignore the predictor.
19088         (PRED_POLYMORPHIC_CALL): Likewise.
19089         (PRED_RECURSIVE_CALL): Likewise.
19091 2018-01-23  Martin Liska  <mliska@suse.cz>
19093         * tree-profile.c (tree_profiling): Print function header to
19094         aware reader which function we are working on.
19095         * value-prof.c (gimple_find_values_to_profile): Do not print
19096         not interesting value histograms.
19098 2018-01-23  Martin Liska  <mliska@suse.cz>
19100         * profile-count.h (enum profile_quality): Add
19101         profile_uninitialized as the first value. Do not number values
19102         as they are zero based.
19103         (profile_count::verify): Update sanity check.
19104         (profile_probability::verify): Likewise.
19106 2018-01-23  Nathan Sidwell  <nathan@acm.org>
19108         * doc/invoke.texi (ffor-scope): Deprecate.
19110 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
19112         PR tree-optimization/83510
19113         * domwalk.c (set_all_edges_as_executable): New function.
19114         (dom_walker::dom_walker): Convert bool param
19115         "skip_unreachable_blocks" to enum reachability.  Move setup of
19116         edge flags to set_all_edges_as_executable and only do it when
19117         reachability is REACHABLE_BLOCKS.
19118         * domwalk.h (enum dom_walker::reachability): New enum.
19119         (dom_walker::dom_walker): Convert bool param
19120         "skip_unreachable_blocks" to enum reachability.
19121         (set_all_edges_as_executable): New decl.
19122         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
19123         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
19124         "reachability".
19125         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
19126         but converting true to REACHABLE_BLOCKS.
19127         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
19128         * tree-vrp.c
19129         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
19130         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
19131         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
19132         REACHABLE_BLOCKS.
19133         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
19134         if check_all_array_refs will be called.
19136 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
19138         * tree.c (selftest::test_location_wrappers): Add more test
19139         coverage.
19141 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
19143         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
19144         (selftest::test_bit_in_range): Likewise.
19146 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
19148         PR testsuite/83888
19149         * doc/sourcebuild.texi (vect_float): Say that the selector
19150         only describes the situation when -funsafe-math-optimizations is on.
19151         (vect_float_strict): Document.
19153 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
19155         PR tree-optimization/83965
19156         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
19157         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
19158         instead of checking only for a reduction.
19159         (vect_recog_widen_sum_pattern): Likewise.
19161 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
19163         * predict.c (probably_never_executed): Only use precise profile info.
19164         (compute_function_frequency): Skip after inlining hack since we now
19165         have quality checking.
19167 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
19169         * profile-count.h (profile_probability::very_unlikely,
19170         profile_probability::unlikely, profile_probability::even): Set
19171         precision to guessed.
19173 2018-01-23  Richard Biener  <rguenther@suse.de>
19175         PR tree-optimization/83963
19176         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
19177         Properly terminate dominator walk when crossing the exit edge not
19178         when visiting its source block.
19180 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
19182         PR c++/83918
19183         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
19184         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
19186 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
19188         PR tree-optimization/83957
19189         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
19190         semicolon after for body surrounded by braces.
19192         PR tree-optimization/83081
19193         * profile-count.h (profile_probability::split): New method.
19194         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
19195         Use profile_probability::split.
19196         (do_compare_rtx_and_jump): Fix adjustment of probabilities
19197         when splitting a single conditional jump into 2.
19199 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
19201         PR tree-optimization/69452
19202         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
19203         decl.
19205 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
19207         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
19208         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
19209         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
19211 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
19213         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
19214         declaration.
19215         * config/rl78/rl78.md (movdi): New define_expand.
19216         * config/rl78/rl78.c (rl78_split_movdi): New function.
19218 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
19220         PR target/83862
19221         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
19222         no longer used.
19223         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
19224         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
19225         128-bit to produce an UNSPEC move to get the double word with the
19226         signbit and then a shift directly to do signbit.
19227         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
19228         implementation with a new version that just does either a direct
19229         move or a regular move.  Move memory interface to separate insns.
19230         Move insns so they are next to the expander.
19231         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
19232         with signbit move.  Split big and little endian case.
19233         (signbit<mode>2_dm_mem_le): Likewise.
19234         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
19235         (signbit<mode>2_dm2): Likewise.
19237 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
19239         * config/rl78/rl78.md (anddi3): New define_expand.
19241 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
19243         * config/rl78/rl78.md (umindi3): New define_expand.
19245 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
19247         * config/rl78/rl78.md (smindi3): New define_expand.
19249 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
19251         * config/rl78/rl78.md (smaxdi3): New define_expand.
19253 2018-01-22  Carl Love  <cel@us.ibm.com>
19255         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
19256         LVX_V1TI): Add macro expansion.
19257         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
19258         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
19259         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
19260         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
19261         Change check to determine if the instruction is a byte reversing
19262         entry.  Fix typo in comment.
19263         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
19264         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
19265         Add def_builtin calls for new builtins.
19266         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
19267         Add define_insn expansion.
19269 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
19271         * config/rl78/rl78.md (umaxdi3): New define_expand.
19273 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
19275         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
19276         for non-QImode registers.
19278 2018-01-22  Richard Biener  <rguenther@suse.de>
19280         PR tree-optimization/83963
19281         * graphite-scop-detection.c (scop_detection::get_sese): Delay
19282         including the loop exit block.
19283         (scop_detection::merge_sese): Likewise.
19284         (scop_detection::add_scop): Do it here instead.
19286 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19288         * doc/sourcebuild.texi (arm_softfloat): Document.
19290 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
19292         PR gcc/77734
19293         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
19294         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
19295         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
19297 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19298             David Edelsohn  <dje.gcc@gmail.com>
19300         PR target/83946
19301         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19302         Change "crset eq" to "crset 2".
19303         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19304         (*call_indirect_aix<mode>_nospec): Likewise.
19305         (*call_value_indirect_aix<mode>_nospec): Likewise.
19306         (*call_indirect_elfv2<mode>_nospec): Likewise.
19307         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
19308         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
19309         change assembly output from . to $.
19310         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19311         (indirect_jump<mode>_nospec): Change assembly output from . to $.
19312         (*tablejump<mode>_internal1_nospec): Likewise.
19314 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
19316         PR target/80870
19317         * config/sh/sh_optimize_sett_clrt.cc:
19318         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
19320 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
19322         PR tree-optimization/83940
19323         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
19324         offset_dt to vect_constant_def rather than vect_unknown_def_type.
19325         (vect_check_load_store_mask): Add a mask_dt_out parameter and
19326         use it to pass back the definition type.
19327         (vect_check_store_rhs): Likewise rhs_dt_out.
19328         (vect_build_gather_load_calls): Add a mask_dt argument and use
19329         it instead of a call to vect_is_simple_use.
19330         (vectorizable_store): Update calls to vect_check_load_store_mask
19331         and vect_check_store_rhs.  Use the dt returned by the latter instead
19332         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
19333         instead of calls to vect_is_simple_use.  Pass the scalar rather
19334         than the vector operand to vect_is_simple_use when handling
19335         second and subsequent copies of an rhs value.
19336         (vectorizable_load): Update calls to vect_check_load_store_mask
19337         and vect_build_gather_load_calls.  Use the cached mask_dt and
19338         gs_info.offset_dt instead of calls to vect_is_simple_use.
19340 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
19342         PR middle-end/83945
19343         * tree-emutls.c: Include gimplify.h.
19344         (lower_emutls_2): New function.
19345         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
19346         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
19347         it before further processing.
19349         PR target/83930
19350         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
19351         UINTVAL (trueop1) instead of INTVAL (op1).
19353 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
19355         PR debug/81570
19356         PR debug/83728
19357         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
19358         INCOMING_FRAME_SP_OFFSET if not defined.
19359         (scan_trace): Add ENTRY argument.  If true and
19360         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
19361         emit a note to adjust the CFA offset.
19362         (create_cfi_notes): Adjust scan_trace callers.
19363         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
19364         INCOMING_FRAME_SP_OFFSET in the CIE.
19365         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
19366         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
19367         Likewise.
19368         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
19369         * doc/tm.texi: Regenerated.
19371 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
19373         PR rtl-optimization/83147
19374         * lra-constraints.c (remove_inheritance_pseudos): Use
19375         lra_substitute_pseudo_within_insn.
19377 2018-01-19  Tom de Vries  <tom@codesourcery.com>
19378             Cesar Philippidis  <cesar@codesourcery.com>
19380         PR target/83920
19381         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
19383 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
19385         PR target/83790
19386         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
19387         spaces for function labels.
19389 2018-01-19  Martin Liska  <mliska@suse.cz>
19391         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
19392         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
19393         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
19394         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
19395         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
19396         (PRED_CONST_RETURN): Change from 69 to 65.
19397         (PRED_NULL_RETURN): Change from 91 to 71.
19398         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
19399         (PRED_LOOP_GUARD): Change from 66 to 73.
19401 2018-01-19  Martin Liska  <mliska@suse.cz>
19403         * predict.c (predict_insn_def): Add new assert.
19404         (struct branch_predictor): Change type to signed integer.
19405         (test_prediction_value_range): Amend test to cover
19406         PROB_UNINITIALIZED.
19407         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
19408         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
19409         (PRED_LOOP_ITERATIONS_MAX): Likewise.
19410         (PRED_LOOP_IV_COMPARE): Likewise.
19411         * predict.h (PROB_UNINITIALIZED): Define new constant.
19413 2018-01-19  Martin Liska  <mliska@suse.cz>
19415         * predict.c (dump_prediction): Add new format for
19416         analyze_brprob.py script which is enabled with -details
19417         suboption.
19418         * profile-count.h (precise_p): New function.
19420 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
19422         PR tree-optimization/83922
19423         * tree-vect-loop.c (vect_verify_full_masking): Return false if
19424         there are no statements that need masking.
19425         (vect_active_double_reduction_p): New function.
19426         (vect_analyze_loop_operations): Use it when handling phis that
19427         are not in the loop header.
19429 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
19431         PR tree-optimization/83914
19432         * tree-vect-loop.c (vectorizable_induction): Don't convert
19433         init_expr or apply the peeling adjustment for inductions
19434         that are nested within the vectorized loop.
19436 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19438         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
19439         instead of NEG.
19441 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
19443         PR sanitizer/81715
19444         PR testsuite/83882
19445         * function.h (gimplify_parameters): Add gimple_seq * argument.
19446         * function.c: Include gimple.h and options.h.
19447         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
19448         for the added local temporaries if needed.
19449         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
19450         if there are any parameter cleanups, wrap whole body into a
19451         try/finally with the cleanups.
19453 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
19455         PR target/82964
19456         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
19457         Use GET_MODE_CLASS for scalar floating point.
19459 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
19461         PR ipa/82256
19462         patch by PaX Team
19463         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
19464         Fix call of call_cgraph_insertion_hooks.
19466 2018-01-18  Martin Sebor  <msebor@redhat.com>
19468         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
19470 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
19472         PR ipa/83619
19473         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
19474         frequencies.
19476 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
19478         PR other/70268
19479         * common.opt: (-ffile-prefix-map): New option.
19480         * opts.c (common_handle_option): Defer it.
19481         * opts-global.c (handle_common_deferred_options): Handle it.
19482         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
19483         * file-prefix-map.h: New file.
19484         (remap_debug_filename, add_debug_prefix_map): ...here.
19485         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
19486         * final.c (debug_prefix_map, add_debug_prefix_map
19487         remap_debug_filename): Move to...
19488         * file-prefix-map.c: New file.
19489         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
19490         generalize, get rid of alloca(), use strrchr() instead of strchr().
19491         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
19492         Implement in terms of add_prefix_map().
19493         (remap_macro_filename, remap_debug_filename): Implement in term of
19494         remap_filename().
19495         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
19496         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
19497         * dbxout.c: Include file-prefix-map.h.
19498         * varasm.c: Likewise.
19499         * vmsdbgout.c: Likewise.
19500         * xcoffout.c: Likewise.
19501         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
19502         * doc/cppopts.texi (-fmacro-prefix-map): Document.
19503         * doc/invoke.texi (-ffile-prefix-map): Document.
19504         (-fdebug-prefix-map): Update description.
19506 2018-01-18  Martin Liska  <mliska@suse.cz>
19508         * config/i386/i386.c (indirect_thunk_name): Document that also
19509         lfence is emitted.
19510         (output_indirect_thunk): Document why both instructions
19511         (pause and lfence) are generated.
19513 2018-01-18  Richard Biener  <rguenther@suse.de>
19515         PR tree-optimization/83887
19516         * graphite-scop-detection.c
19517         (scop_detection::get_nearest_dom_with_single_entry): Remove.
19518         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
19519         (scop_detection::merge_sese): Re-implement with a flood-fill
19520         algorithm that properly finds a SESE region if it exists.
19522 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
19524         PR c/61240
19525         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
19526         pointer_diff optimizations use view_convert instead of convert.
19528 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19530         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19531         Generate different code for -mno-speculate-indirect-jumps.
19532         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19533         (*call_indirect_aix<mode>): Disable for
19534         -mno-speculate-indirect-jumps.
19535         (*call_indirect_aix<mode>_nospec): New define_insn.
19536         (*call_value_indirect_aix<mode>): Disable for
19537         -mno-speculate-indirect-jumps.
19538         (*call_value_indirect_aix<mode>_nospec): New define_insn.
19539         (*sibcall_nonlocal_sysv<mode>): Generate different code for
19540         -mno-speculate-indirect-jumps.
19541         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19543 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
19545         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
19546         long double type, set the flags for noting the default long double
19547         type, even if we don't pass or return a long double type.
19549 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
19551         PR ipa/83051
19552         * ipa-inline.c (flatten_function): Do not overwrite final inlining
19553         failure.
19555 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
19557         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
19558         support for merge[hl].
19559         (fold_mergehl_helper): New helper function.
19560         (tree-vector-builder.h): New #include for tree_vector_builder usage.
19561         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
19562         (altivec_vmrglw_direct): Add xxmrglw insn.
19564 2018-01-17  Andrew Waterman  <andrew@sifive.com>
19566         * config/riscv/riscv.c (riscv_conditional_register_usage): If
19567         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
19569 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
19571         PR lto/83121
19572         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
19573         call the lto_location_cache before reading the
19574         DECL_SOURCE_LOCATION of the types.
19576 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
19577             Richard Sandiford  <richard.sandiford@linaro.org>
19579         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
19580         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
19581         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
19582         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
19583         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
19584         Add declaration.
19585         * config/aarch64/constraints.md (aarch64_movti_operand):
19586         Limit immediates.
19587         * config/aarch64/predicates.md (Uti): Add new constraint.
19589 2018-01-17  Carl Love  <cel@us.ibm.com>
19591         * config/rs6000/vsx.md (define_expand xl_len_r,
19592         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
19593         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
19594         lxvll.
19595         (define_expand, define_insn): Move the shift left from  the
19596         define_insn to the define_expand for lxvl and stxvl instructions.
19597         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
19598         and XL_LEN_R definitions to PURE.
19600 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
19602         * config/i386/i386.c (indirect_thunk_name): Declare regno
19603         as unsigned int.  Compare regno with INVALID_REGNUM.
19604         (output_indirect_thunk): Ditto.
19605         (output_indirect_thunk_function): Ditto.
19606         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
19607         in the call to output_indirect_thunk_function.
19609 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
19611         PR middle-end/83884
19612         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
19613         rather than the size of inner_type to determine the stack slot size
19614         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
19616 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
19618         PR target/83546
19619         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
19620         to PTA_SILVERMONT.
19622 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
19624         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
19625         endian Linux systems to optionally enable multilibs for selecting
19626         the long double type if the user configured an explicit type.
19627         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
19628         have no long double multilibs if not defined.
19629         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
19630         warn if the user used -mabi={ieee,ibm}longdouble and we built
19631         multilibs for long double.
19632         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
19633         appropriate multilib option.
19634         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
19635         multilib options.
19636         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
19637         for building long double multilibs.
19638         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
19640 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
19642         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
19643         copies.
19645         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
19646         64 bits.
19647         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
19648         128 bits.
19650         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
19651         variables.
19653         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
19654         return value.
19656 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
19658         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
19659         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
19661 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19663         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
19664         different rtl trees depending on TARGET_64BIT.
19665         (rs6000_gen_lvx): Likewise.
19667 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
19669         * config/visium/visium.md (nop): Tweak comment.
19670         (hazard_nop): Likewise.
19672 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19674         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
19675         -mspeculate-indirect-jumps.
19676         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
19677         for -mno-speculate-indirect-jumps.
19678         (*call_indirect_elfv2<mode>_nospec): New define_insn.
19679         (*call_value_indirect_elfv2<mode>): Disable for
19680         -mno-speculate-indirect-jumps.
19681         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
19682         (indirect_jump): Emit different RTL for
19683         -mno-speculate-indirect-jumps.
19684         (*indirect_jump<mode>): Disable for
19685         -mno-speculate-indirect-jumps.
19686         (*indirect_jump<mode>_nospec): New define_insn.
19687         (tablejump): Emit different RTL for
19688         -mno-speculate-indirect-jumps.
19689         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
19690         (tablejumpsi_nospec): New define_expand.
19691         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
19692         (tablejumpdi_nospec): New define_expand.
19693         (*tablejump<mode>_internal1): Disable for
19694         -mno-speculate-indirect-jumps.
19695         (*tablejump<mode>_internal1_nospec): New define_insn.
19696         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
19697         option.
19699 2018-01-16  Artyom Skrobov tyomitch@gmail.com
19701         * caller-save.c (insert_save): Drop unnecessary parameter.  All
19702         callers updated.
19704 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
19705             Richard Biener  <rguenth@suse.de>
19707         PR libgomp/83590
19708         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
19709         return early, inline manually is_gimple_sizepos.  Make sure if we
19710         call gimplify_expr we don't end up with a gimple constant.
19711         * tree.c (variably_modified_type_p): Don't return true for
19712         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
19713         * gimplify.h (is_gimple_sizepos): Remove.
19715 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
19717         PR tree-optimization/83857
19718         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
19719         vectorizable_live_operation for pure SLP statements.
19720         (vectorizable_live_operation): Handle PHIs.
19722 2018-01-16  Richard Biener  <rguenther@suse.de>
19724         PR tree-optimization/83867
19725         * tree-vect-stmts.c (vect_transform_stmt): Precompute
19726         nested_in_vect_loop_p since the scalar stmt may get invalidated.
19728 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
19730         PR c/83844
19731         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
19732         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
19733         If off is not INTEGER_CST, issue a may not be aligned warning
19734         rather than isn't aligned.  Use isn%'t rather than isn't.
19735         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
19736         into MULT_EXPR.
19737         <case MULT_EXPR>: Improve the case when bottom and one of the
19738         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
19739         operand, in that case check if the other operand is multiple of
19740         bottom divided by the INTEGER_CST operand.
19742 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
19744         PR target/83858
19745         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
19746         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
19747         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
19748         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
19749         * config/pa/pa.c (pa_function_arg_advance): Likewise.
19750         (pa_function_arg, pa_arg_partial_bytes): Likewise.
19751         (pa_function_arg_size): New function.
19753 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
19755         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
19756         in a separate statement.
19758 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
19760         PR tree-optimization/83847
19761         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
19762         group gathers and scatters.
19764 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
19766         PR rtl-optimization/86620
19767         * params.def (max-sched-ready-insns): Bump minimum value to 1.
19769         PR rtl-optimization/83213
19770         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
19771         to last if both are JUMP_INSNs.
19773         PR tree-optimization/83843
19774         * gimple-ssa-store-merging.c
19775         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
19776         store_immediate_info for bswap/nop orig_stores.
19778 2018-01-15  Andrew Waterman  <andrew@sifive.com>
19780         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
19781         !TARGET_MUL.
19782         <UDIV>: Increase cost if !TARGET_DIV.
19784 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
19786         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
19787         (define_attr "cr_logical_3op"): New.
19788         (cceq_ior_compare): Adjust.
19789         (cceq_ior_compare_complement): Adjust.
19790         (*cceq_rev_compare): Adjust.
19791         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
19792         (is_cracked_insn): Adjust.
19793         (insn_must_be_first_in_group): Adjust.
19794         * config/rs6000/40x.md: Adjust.
19795         * config/rs6000/440.md: Adjust.
19796         * config/rs6000/476.md: Adjust.
19797         * config/rs6000/601.md: Adjust.
19798         * config/rs6000/603.md: Adjust.
19799         * config/rs6000/6xx.md: Adjust.
19800         * config/rs6000/7450.md: Adjust.
19801         * config/rs6000/7xx.md: Adjust.
19802         * config/rs6000/8540.md: Adjust.
19803         * config/rs6000/cell.md: Adjust.
19804         * config/rs6000/e300c2c3.md: Adjust.
19805         * config/rs6000/e500mc.md: Adjust.
19806         * config/rs6000/e500mc64.md: Adjust.
19807         * config/rs6000/e5500.md: Adjust.
19808         * config/rs6000/e6500.md: Adjust.
19809         * config/rs6000/mpc.md: Adjust.
19810         * config/rs6000/power4.md: Adjust.
19811         * config/rs6000/power5.md: Adjust.
19812         * config/rs6000/power6.md: Adjust.
19813         * config/rs6000/power7.md: Adjust.
19814         * config/rs6000/power8.md: Adjust.
19815         * config/rs6000/power9.md: Adjust.
19816         * config/rs6000/rs64.md: Adjust.
19817         * config/rs6000/titan.md: Adjust.
19819 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19821         * config/i386/predicates.md (indirect_branch_operand): Rewrite
19822         ix86_indirect_branch_register logic.
19824 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19826         * config/i386/constraints.md (Bs): Update
19827         ix86_indirect_branch_register check.  Don't check
19828         ix86_indirect_branch_register with GOT_memory_operand.
19829         (Bw): Likewise.
19830         * config/i386/predicates.md (GOT_memory_operand): Don't check
19831         ix86_indirect_branch_register here.
19832         (GOT32_symbol_operand): Likewise.
19834 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19836         * config/i386/predicates.md (constant_call_address_operand):
19837         Rewrite ix86_indirect_branch_register logic.
19838         (sibcall_insn_operand): Likewise.
19840 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19842         * config/i386/constraints.md (Bs): Replace
19843         ix86_indirect_branch_thunk_register with
19844         ix86_indirect_branch_register.
19845         (Bw): Likewise.
19846         * config/i386/i386.md (indirect_jump): Likewise.
19847         (tablejump): Likewise.
19848         (*sibcall_memory): Likewise.
19849         (*sibcall_value_memory): Likewise.
19850         Peepholes of indirect call and jump via memory: Likewise.
19851         * config/i386/i386.opt: Likewise.
19852         * config/i386/predicates.md (indirect_branch_operand): Likewise.
19853         (GOT_memory_operand): Likewise.
19854         (call_insn_operand): Likewise.
19855         (sibcall_insn_operand): Likewise.
19856         (GOT32_symbol_operand): Likewise.
19858 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
19860         PR middle-end/83837
19861         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
19862         type rather than type addr's type points to.
19863         (expand_omp_atomic_mutex): Likewise.
19864         (expand_omp_atomic): Likewise.
19866 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19868         PR target/83839
19869         * config/i386/i386.c (output_indirect_thunk_function): Use
19870         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
19871         for  __x86_return_thunk.
19873 2018-01-15  Richard Biener  <rguenther@suse.de>
19875         PR middle-end/83850
19876         * expmed.c (extract_bit_field_1): Fix typo.
19878 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19880         PR target/83687
19881         * config/arm/iterators.md (VF): New mode iterator.
19882         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
19883         Remove integer-related logic from pattern.
19884         (neon_vabd<mode>_3): Likewise.
19886 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
19888         PR middle-end/82694
19889         * common.opt (fstrict-overflow): No longer an alias.
19890         (fwrapv-pointer): New option.
19891         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
19892         also for pointer types based on flag_wrapv_pointer.
19893         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
19894         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
19895         opts->x_flag_wrapv got set.
19896         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
19897         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
19898         POINTER_TYPE_OVERFLOW_UNDEFINED.
19899         * match.pd: Likewise in address comparison pattern.
19900         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
19902 2018-01-15  Richard Biener  <rguenther@suse.de>
19904         PR lto/83804
19905         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
19906         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
19907         Reset type names to their identifier if their TYPE_DECL doesn't
19908         have linkage (and thus is used for ODR and devirt).
19909         (save_debug_info_for_decl): Remove.
19910         (save_debug_info_for_type): Likewise.
19911         (add_tree_to_fld_list): Adjust.
19912         * tree-pretty-print.c (dump_generic_node): Make dumping of
19913         type names more robust.
19915 2018-01-15  Richard Biener  <rguenther@suse.de>
19917         * BASE-VER: Bump to 8.0.1.
19919 2018-01-14  Martin Sebor  <msebor@redhat.com>
19921         PR other/83508
19922         * builtins.c (check_access): Avoid warning when the no-warning bit
19923         is set.
19925 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
19927         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
19928         * ira-color (allocno_hard_regs_compare): Likewise.
19930 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
19932         PR target/83013
19933         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
19934         Use .pushsection/.popsection.
19936 2018-01-14  Martin Sebor  <msebor@redhat.com>
19938         PR c++/81327
19939         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
19941 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
19943         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
19944         entry from extra_headers.
19945         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
19946         extra_headers, make the list bitwise identical to the i?86-*-* one.
19948 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19950         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
19951         -mcmodel=large with -mindirect-branch=thunk,
19952         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
19953         -mfunction-return=thunk-extern.
19954         * doc/invoke.texi: Document -mcmodel=large is incompatible with
19955         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
19956         -mfunction-return=thunk and -mfunction-return=thunk-extern.
19958 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19960         * config/i386/i386.c (print_reg): Print the name of the full
19961         integer register without '%'.
19962         (ix86_print_operand): Handle 'V'.
19963         * doc/extend.texi: Document 'V' modifier.
19965 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19967         * config/i386/constraints.md (Bs): Disallow memory operand for
19968         -mindirect-branch-register.
19969         (Bw): Likewise.
19970         * config/i386/predicates.md (indirect_branch_operand): Likewise.
19971         (GOT_memory_operand): Likewise.
19972         (call_insn_operand): Likewise.
19973         (sibcall_insn_operand): Likewise.
19974         (GOT32_symbol_operand): Likewise.
19975         * config/i386/i386.md (indirect_jump): Call convert_memory_address
19976         for -mindirect-branch-register.
19977         (tablejump): Likewise.
19978         (*sibcall_memory): Likewise.
19979         (*sibcall_value_memory): Likewise.
19980         Disallow peepholes of indirect call and jump via memory for
19981         -mindirect-branch-register.
19982         (*call_pop): Replace m with Bw.
19983         (*call_value_pop): Likewise.
19984         (*sibcall_pop_memory): Replace m with Bs.
19985         * config/i386/i386.opt (mindirect-branch-register): New option.
19986         * doc/invoke.texi: Document -mindirect-branch-register option.
19988 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19990         * config/i386/i386-protos.h (ix86_output_function_return): New.
19991         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
19992         set function_return_type.
19993         (indirect_thunk_name): Add ret_p to indicate thunk for function
19994         return.
19995         (output_indirect_thunk_function): Pass false to
19996         indirect_thunk_name.
19997         (ix86_output_indirect_branch_via_reg): Likewise.
19998         (ix86_output_indirect_branch_via_push): Likewise.
19999         (output_indirect_thunk_function): Create alias for function
20000         return thunk if regno < 0.
20001         (ix86_output_function_return): New function.
20002         (ix86_handle_fndecl_attribute): Handle function_return.
20003         (ix86_attribute_table): Add function_return.
20004         * config/i386/i386.h (machine_function): Add
20005         function_return_type.
20006         * config/i386/i386.md (simple_return_internal): Use
20007         ix86_output_function_return.
20008         (simple_return_internal_long): Likewise.
20009         * config/i386/i386.opt (mfunction-return=): New option.
20010         (indirect_branch): Mention -mfunction-return=.
20011         * doc/extend.texi: Document function_return function attribute.
20012         * doc/invoke.texi: Document -mfunction-return= option.
20014 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
20016         * config/i386/i386-opts.h (indirect_branch): New.
20017         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
20018         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
20019         with local indirect jump when converting indirect call and jump.
20020         (ix86_set_indirect_branch_type): New.
20021         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
20022         (indirectlabelno): New.
20023         (indirect_thunk_needed): Likewise.
20024         (indirect_thunk_bnd_needed): Likewise.
20025         (indirect_thunks_used): Likewise.
20026         (indirect_thunks_bnd_used): Likewise.
20027         (INDIRECT_LABEL): Likewise.
20028         (indirect_thunk_name): Likewise.
20029         (output_indirect_thunk): Likewise.
20030         (output_indirect_thunk_function): Likewise.
20031         (ix86_output_indirect_branch_via_reg): Likewise.
20032         (ix86_output_indirect_branch_via_push): Likewise.
20033         (ix86_output_indirect_branch): Likewise.
20034         (ix86_output_indirect_jmp): Likewise.
20035         (ix86_code_end): Call output_indirect_thunk_function if needed.
20036         (ix86_output_call_insn): Call ix86_output_indirect_branch if
20037         needed.
20038         (ix86_handle_fndecl_attribute): Handle indirect_branch.
20039         (ix86_attribute_table): Add indirect_branch.
20040         * config/i386/i386.h (machine_function): Add indirect_branch_type
20041         and has_local_indirect_jump.
20042         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
20043         to true.
20044         (tablejump): Likewise.
20045         (*indirect_jump): Use ix86_output_indirect_jmp.
20046         (*tablejump_1): Likewise.
20047         (simple_return_indirect_internal): Likewise.
20048         * config/i386/i386.opt (mindirect-branch=): New option.
20049         (indirect_branch): New.
20050         (keep): Likewise.
20051         (thunk): Likewise.
20052         (thunk-inline): Likewise.
20053         (thunk-extern): Likewise.
20054         * doc/extend.texi: Document indirect_branch function attribute.
20055         * doc/invoke.texi: Document -mindirect-branch= option.
20057 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
20059         PR ipa/83051
20060         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
20062 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
20064         * ipa-inline.c (want_inline_small_function_p): Return false if
20065         inlining has already failed with CIF_FINAL_ERROR.
20066         (update_caller_keys): Call want_inline_small_function_p before
20067         can_inline_edge_p.
20068         (update_callee_keys): Likewise.
20070 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20072         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
20073         New function.
20074         (rs6000_quadword_masked_address_p): Likewise.
20075         (quad_aligned_load_p): Likewise.
20076         (quad_aligned_store_p): Likewise.
20077         (const_load_sequence_p): Add comment to describe the outer-most loop.
20078         (mimic_memory_attributes_and_flags): New function.
20079         (rs6000_gen_stvx): Likewise.
20080         (replace_swapped_aligned_store): Likewise.
20081         (rs6000_gen_lvx): Likewise.
20082         (replace_swapped_aligned_load): Likewise.
20083         (replace_swapped_load_constant): Capitalize argument name in
20084         comment describing this function.
20085         (rs6000_analyze_swaps): Add a third pass to search for vector loads
20086         and stores that access quad-word aligned addresses and replace
20087         with stvx or lvx instructions when appropriate.
20088         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
20089         New function prototype.
20090         (rs6000_quadword_masked_address_p): Likewise.
20091         (rs6000_gen_lvx): Likewise.
20092         (rs6000_gen_stvx): Likewise.
20093         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
20094         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
20095         when memory address is aligned.
20096         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
20097         this split to select lvx instruction when memory address is aligned.
20098         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
20099         instruction when memory address is aligned.
20100         (*vsx_le_perm_load_v16qi): Likewise.
20101         (four unnamed splitters): Modify to select the stvx instruction
20102         when memory is aligned.
20104 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
20106         * predict.c (determine_unlikely_bbs): Handle correctly BBs
20107         which appears in the queue multiple times.
20109 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20110             Alan Hayward  <alan.hayward@arm.com>
20111             David Sherwood  <david.sherwood@arm.com>
20113         * tree-vectorizer.h (vec_lower_bound): New structure.
20114         (_loop_vec_info): Add check_nonzero and lower_bounds.
20115         (LOOP_VINFO_CHECK_NONZERO): New macro.
20116         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
20117         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
20118         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
20119         fields.  Make seg_len the distance travelled, not including the
20120         access size.
20121         (dr_direction_indicator): Declare.
20122         (dr_zero_step_indicator): Likewise.
20123         (dr_known_forward_stride_p): Likewise.
20124         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
20125         tree-ssanames.h.
20126         (runtime_alias_check_p): Allow runtime alias checks with
20127         variable strides.
20128         (operator ==): Compare access_size and align.
20129         (prune_runtime_alias_test_list): Rework for new distinction between
20130         the access_size and seg_len.
20131         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
20132         segment lengths.
20133         (get_segment_min_max): New function.
20134         (create_intersect_range_checks): Use it.
20135         (dr_step_indicator): New function.
20136         (dr_direction_indicator): Likewise.
20137         (dr_zero_step_indicator): Likewise.
20138         (dr_known_forward_stride_p): Likewise.
20139         * tree-loop-distribution.c (data_ref_segment_size): Return
20140         DR_STEP * (niters - 1).
20141         (compute_alias_check_pairs): Update call to the dr_with_seg_len
20142         constructor.
20143         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
20144         (vect_preserves_scalar_order_p): New function, split out from...
20145         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
20146         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
20147         (vect_vfa_access_size): New function.
20148         (vect_vfa_align): Likewise.
20149         (vect_compile_time_alias): Take access_size_a and access_b arguments.
20150         (dump_lower_bound): New function.
20151         (vect_check_lower_bound): Likewise.
20152         (vect_small_gap_p): Likewise.
20153         (vectorizable_with_step_bound_p): Likewise.
20154         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
20155         depencies if the vectorization factor is 1.  Convert the checks
20156         for nonzero steps into checks on the bounds of DR_STEP.  Try using
20157         a bunds check for variable steps if the minimum required step is
20158         relatively small. Update calls to the dr_with_seg_len
20159         constructor and to vect_compile_time_alias.
20160         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
20161         function.
20162         (vect_loop_versioning): Call it.
20163         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
20164         when retrying.
20165         (vect_estimate_min_profitable_iters): Account for any bounds checks.
20167 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20168             Alan Hayward  <alan.hayward@arm.com>
20169             David Sherwood  <david.sherwood@arm.com>
20171         * doc/sourcebuild.texi (vect_scatter_store): Document.
20172         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
20173         optabs.
20174         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
20175         Document.
20176         * genopinit.c (main): Add supports_vec_scatter_store and
20177         supports_vec_scatter_store_cached to target_optabs.
20178         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
20179         IFN_MASK_SCATTER_STORE.
20180         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
20181         functions.
20182         * internal-fn.h (internal_store_fn_p): Declare.
20183         (internal_fn_stored_value_index): Likewise.
20184         * internal-fn.c (scatter_store_direct): New macro.
20185         (expand_scatter_store_optab_fn): New function.
20186         (direct_scatter_store_optab_supported_p): New macro.
20187         (internal_store_fn_p): New function.
20188         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
20189         IFN_MASK_SCATTER_STORE.
20190         (internal_fn_mask_index): Likewise.
20191         (internal_fn_stored_value_index): New function.
20192         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
20193         for scatter stores.
20194         * optabs-query.h (supports_vec_scatter_store_p): Declare.
20195         * optabs-query.c (supports_vec_scatter_store_p): New function.
20196         * tree-vectorizer.h (vect_get_store_rhs): Declare.
20197         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
20198         true for scatter stores.
20199         (vect_gather_scatter_fn_p): Handle scatter stores too.
20200         (vect_check_gather_scatter): Consider using scatter stores if
20201         supports_vec_scatter_store_p.
20202         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
20203         scatter stores too.
20204         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
20205         internal_fn_stored_value_index.
20206         (check_load_store_masking): Handle scatter stores too.
20207         (vect_get_store_rhs): Make public.
20208         (vectorizable_call): Use internal_store_fn_p.
20209         (vectorizable_store): Handle scatter store internal functions.
20210         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
20211         when deciding whether the end of the group has been reached.
20212         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
20213         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
20214         (mask_scatter_store<mode>): New insns.
20216 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20217             Alan Hayward  <alan.hayward@arm.com>
20218             David Sherwood  <david.sherwood@arm.com>
20220         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
20221         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
20222         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
20223         function.
20224         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
20225         Use vect_truncate_gather_scatter_offset if we can't treat the
20226         operation as a normal gather load or scatter store.
20227         (get_group_load_store_type): Take the gather_scatter_info
20228         as argument.  Try using a gather load or scatter store for
20229         single-element groups.
20230         (get_load_store_type): Update calls to get_group_load_store_type
20231         and vect_use_strided_gather_scatters_p.
20233 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20234             Alan Hayward  <alan.hayward@arm.com>
20235             David Sherwood  <david.sherwood@arm.com>
20237         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
20238         optional tree argument.
20239         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
20240         null target hooks.
20241         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
20242         but continue to use the current value as a fallback.
20243         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
20244         to compare the updates.
20245         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
20246         (get_load_store_type): Use it when handling a strided access.
20247         (vect_get_strided_load_store_ops): New function.
20248         (vect_get_data_ptr_increment): Likewise.
20249         (vectorizable_load): Handle strided gather loads.  Always pass
20250         a step to vect_create_data_ref_ptr and bump_vector_ptr.
20252 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20253             Alan Hayward  <alan.hayward@arm.com>
20254             David Sherwood  <david.sherwood@arm.com>
20256         * doc/md.texi (gather_load@var{m}): Document.
20257         (mask_gather_load@var{m}): Likewise.
20258         * genopinit.c (main): Add supports_vec_gather_load and
20259         supports_vec_gather_load_cached to target_optabs.
20260         * optabs-tree.c (init_tree_optimization_optabs): Use
20261         ggc_cleared_alloc to allocate target_optabs.
20262         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
20263         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
20264         functions.
20265         * internal-fn.h (internal_load_fn_p): Declare.
20266         (internal_gather_scatter_fn_p): Likewise.
20267         (internal_fn_mask_index): Likewise.
20268         (internal_gather_scatter_fn_supported_p): Likewise.
20269         * internal-fn.c (gather_load_direct): New macro.
20270         (expand_gather_load_optab_fn): New function.
20271         (direct_gather_load_optab_supported_p): New macro.
20272         (direct_internal_fn_optab): New function.
20273         (internal_load_fn_p): Likewise.
20274         (internal_gather_scatter_fn_p): Likewise.
20275         (internal_fn_mask_index): Likewise.
20276         (internal_gather_scatter_fn_supported_p): Likewise.
20277         * optabs-query.c (supports_at_least_one_mode_p): New function.
20278         (supports_vec_gather_load_p): Likewise.
20279         * optabs-query.h (supports_vec_gather_load_p): Declare.
20280         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
20281         and memory_type field.
20282         (NUM_PATTERNS): Bump to 15.
20283         * tree-vect-data-refs.c: Include internal-fn.h.
20284         (vect_gather_scatter_fn_p): New function.
20285         (vect_describe_gather_scatter_call): Likewise.
20286         (vect_check_gather_scatter): Try using internal functions for
20287         gather loads.  Recognize existing calls to a gather load function.
20288         (vect_analyze_data_refs): Consider using gather loads if
20289         supports_vec_gather_load_p.
20290         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
20291         (vect_get_gather_scatter_offset_type): Likewise.
20292         (vect_convert_mask_for_vectype): Likewise.
20293         (vect_add_conversion_to_patterm): Likewise.
20294         (vect_try_gather_scatter_pattern): Likewise.
20295         (vect_recog_gather_scatter_pattern): New pattern recognizer.
20296         (vect_vect_recog_func_ptrs): Add it.
20297         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
20298         internal_fn_mask_index and internal_gather_scatter_fn_p.
20299         (check_load_store_masking): Take the gather_scatter_info as an
20300         argument and handle gather loads.
20301         (vect_get_gather_scatter_ops): New function.
20302         (vectorizable_call): Check internal_load_fn_p.
20303         (vectorizable_load): Likewise.  Handle gather load internal
20304         functions.
20305         (vectorizable_store): Update call to check_load_store_masking.
20306         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
20307         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
20308         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
20309         (aarch64_gather_scale_operand_d): New predicates.
20310         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
20311         (mask_gather_load<mode>): New insns.
20313 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20314             Alan Hayward  <alan.hayward@arm.com>
20315             David Sherwood  <david.sherwood@arm.com>
20317         * optabs.def (fold_left_plus_optab): New optab.
20318         * doc/md.texi (fold_left_plus_@var{m}): Document.
20319         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
20320         * internal-fn.c (fold_left_direct): Define.
20321         (expand_fold_left_optab_fn): Likewise.
20322         (direct_fold_left_optab_supported_p): Likewise.
20323         * fold-const-call.c (fold_const_fold_left): New function.
20324         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
20325         * tree-parloops.c (valid_reduction_p): New function.
20326         (gather_scalar_reductions): Use it.
20327         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
20328         (vect_finish_replace_stmt): Declare.
20329         * tree-vect-loop.c (fold_left_reduction_fn): New function.
20330         (needs_fold_left_reduction_p): New function, split out from...
20331         (vect_is_simple_reduction): ...here.  Accept reductions that
20332         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
20333         (vect_force_simple_reduction): Also store the reduction type in
20334         the assignment's STMT_VINFO_REDUC_TYPE.
20335         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
20336         (merge_with_identity): New function.
20337         (vect_expand_fold_left): Likewise.
20338         (vectorize_fold_left_reduction): Likewise.
20339         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
20340         scalar phi in place for it.  Check for target support and reject
20341         cases that would reassociate the operation.  Defer the transform
20342         phase to vectorize_fold_left_reduction.
20343         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
20344         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
20345         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
20347 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20349         * tree-if-conv.c (predicate_mem_writes): Remove redundant
20350         call to ifc_temp_var.
20352 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20353             Alan Hayward  <alan.hayward@arm.com>
20354             David Sherwood  <david.sherwood@arm.com>
20356         * target.def (legitimize_address_displacement): Take the original
20357         offset as a poly_int.
20358         * targhooks.h (default_legitimize_address_displacement): Update
20359         accordingly.
20360         * targhooks.c (default_legitimize_address_displacement): Likewise.
20361         * doc/tm.texi: Regenerate.
20362         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
20363         as an argument, moving assert of ad->disp == ad->disp_term to...
20364         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
20365         Try calling targetm.legitimize_address_displacement before expanding
20366         the address rather than afterwards, and adjust for the new interface.
20367         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
20368         Match the new hook interface.  Handle SVE addresses.
20369         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
20370         new hook interface.
20372 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20374         * Makefile.in (OBJS): Add early-remat.o.
20375         * target.def (select_early_remat_modes): New hook.
20376         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
20377         * doc/tm.texi: Regenerate.
20378         * targhooks.h (default_select_early_remat_modes): Declare.
20379         * targhooks.c (default_select_early_remat_modes): New function.
20380         * timevar.def (TV_EARLY_REMAT): New timevar.
20381         * passes.def (pass_early_remat): New pass.
20382         * tree-pass.h (make_pass_early_remat): Declare.
20383         * early-remat.c: New file.
20384         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
20385         function.
20386         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
20388 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20389             Alan Hayward  <alan.hayward@arm.com>
20390             David Sherwood  <david.sherwood@arm.com>
20392         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
20393         vfm1 with a bound_epilog parameter.
20394         (vect_do_peeling): Update calls accordingly, and move the prologue
20395         call earlier in the function.  Treat the base bound_epilog as 0 for
20396         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
20397         this base when peeling for gaps.
20398         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
20399         with fully-masked loops.
20400         (vect_estimate_min_profitable_iters): Handle the single peeled
20401         iteration in that case.
20403 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20404             Alan Hayward  <alan.hayward@arm.com>
20405             David Sherwood  <david.sherwood@arm.com>
20407         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
20408         single-element interleaving even if the size is not a power of 2.
20409         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
20410         accesses for single-element interleaving if the group size is
20411         not a power of 2.
20413 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20414             Alan Hayward  <alan.hayward@arm.com>
20415             David Sherwood  <david.sherwood@arm.com>
20417         * doc/md.texi (fold_extract_last_@var{m}): Document.
20418         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
20419         * optabs.def (fold_extract_last_optab): New optab.
20420         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
20421         * internal-fn.c (fold_extract_direct): New macro.
20422         (expand_fold_extract_optab_fn): Likewise.
20423         (direct_fold_extract_optab_supported_p): Likewise.
20424         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
20425         * tree-vect-loop.c (vect_model_reduction_cost): Handle
20426         EXTRACT_LAST_REDUCTION.
20427         (get_initial_def_for_reduction): Do not create an initial vector
20428         for EXTRACT_LAST_REDUCTION reductions.
20429         (vectorizable_reduction): Leave the scalar phi in place for
20430         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
20431         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
20432         epilogue code for EXTRACT_LAST_REDUCTION and defer the
20433         transform phase to vectorizable_condition.
20434         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
20435         split out from...
20436         (vect_finish_stmt_generation): ...here.
20437         (vect_finish_replace_stmt): New function.
20438         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
20439         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
20440         pattern.
20441         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
20443 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20444             Alan Hayward  <alan.hayward@arm.com>
20445             David Sherwood  <david.sherwood@arm.com>
20447         * doc/md.texi (extract_last_@var{m}): Document.
20448         * optabs.def (extract_last_optab): New optab.
20449         * internal-fn.def (EXTRACT_LAST): New internal function.
20450         * internal-fn.c (cond_unary_direct): New macro.
20451         (expand_cond_unary_optab_fn): Likewise.
20452         (direct_cond_unary_optab_supported_p): Likewise.
20453         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
20454         loops using EXTRACT_LAST.
20455         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
20456         (extract_last_<mode>): ...this optab.
20457         (vec_extract<mode><Vel>): Update accordingly.
20459 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20460             Alan Hayward  <alan.hayward@arm.com>
20461             David Sherwood  <david.sherwood@arm.com>
20463         * target.def (empty_mask_is_expensive): New hook.
20464         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
20465         * doc/tm.texi: Regenerate.
20466         * targhooks.h (default_empty_mask_is_expensive): Declare.
20467         * targhooks.c (default_empty_mask_is_expensive): New function.
20468         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
20469         if the target says that empty masks are expensive.
20470         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
20471         New function.
20472         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
20474 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20475             Alan Hayward  <alan.hayward@arm.com>
20476             David Sherwood  <david.sherwood@arm.com>
20478         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
20479         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
20480         (vect_use_loop_mask_for_alignment_p): New function.
20481         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
20482         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
20483         niters_skip argument.  Make sure that the first niters_skip elements
20484         of the first iteration are inactive.
20485         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
20486         Update call to vect_set_loop_masks_directly.
20487         (get_misalign_in_elems): New function, split out from...
20488         (vect_gen_prolog_loop_niters): ...here.
20489         (vect_update_init_of_dr): Take a code argument that specifies whether
20490         the adjustment should be added or subtracted.
20491         (vect_update_init_of_drs): Likewise.
20492         (vect_prepare_for_masked_peels): New function.
20493         (vect_do_peeling): Skip prologue peeling if we're using a mask
20494         instead.  Update call to vect_update_inits_of_drs.
20495         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
20496         mask_skip_niters.
20497         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
20498         alignment.  Do not include the number of peeled iterations in
20499         the minimum threshold in that case.
20500         (vectorizable_induction): Adjust the start value down by
20501         LOOP_VINFO_MASK_SKIP_NITERS iterations.
20502         (vect_transform_loop): Call vect_prepare_for_masked_peels.
20503         Take the number of skipped iterations into account when calculating
20504         the loop bounds.
20505         * tree-vect-stmts.c (vect_gen_while_not): New function.
20507 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20508             Alan Hayward  <alan.hayward@arm.com>
20509             David Sherwood  <david.sherwood@arm.com>
20511         * doc/sourcebuild.texi (vect_fully_masked): Document.
20512         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
20513         default value to 0.
20514         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
20515         split out from...
20516         (vect_analyze_loop_2): ...here. Don't check the vectorization
20517         factor against the number of loop iterations if the loop is
20518         fully-masked.
20520 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20521             Alan Hayward  <alan.hayward@arm.com>
20522             David Sherwood  <david.sherwood@arm.com>
20524         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
20525         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
20526         (dump_groups): Update accordingly.
20527         (iv_use::mem_type): New member variable.
20528         (address_p): New function.
20529         (record_use): Add a mem_type argument and initialize the new
20530         mem_type field.
20531         (record_group_use): Add a mem_type argument.  Use address_p.
20532         Remove obsolete null checks of base_object.  Update call to record_use.
20533         (find_interesting_uses_op): Update call to record_group_use.
20534         (find_interesting_uses_cond): Likewise.
20535         (find_interesting_uses_address): Likewise.
20536         (get_mem_type_for_internal_fn): New function.
20537         (find_address_like_use): Likewise.
20538         (find_interesting_uses_stmt): Try find_address_like_use before
20539         calling find_interesting_uses_op.
20540         (addr_offset_valid_p): Use the iv mem_type field as the type
20541         of the addressed memory.
20542         (add_autoinc_candidates): Likewise.
20543         (get_address_cost): Likewise.
20544         (split_small_address_groups_p): Use address_p.
20545         (split_address_groups): Likewise.
20546         (add_iv_candidate_for_use): Likewise.
20547         (autoinc_possible_for_pair): Likewise.
20548         (rewrite_groups): Likewise.
20549         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
20550         (determine_group_iv_cost): Update after split of USE_ADDRESS.
20551         (get_alias_ptr_type_for_ptr_address): New function.
20552         (rewrite_use_address): Rewrite address uses in calls that were
20553         identified by find_address_like_use.
20555 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20556             Alan Hayward  <alan.hayward@arm.com>
20557             David Sherwood  <david.sherwood@arm.com>
20559         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
20560         TARGET_MEM_REFs.
20561         * gimple-expr.h (is_gimple_addressable: Likewise.
20562         * gimple-expr.c (is_gimple_address): Likewise.
20563         * internal-fn.c (expand_call_mem_ref): New function.
20564         (expand_mask_load_optab_fn): Use it.
20565         (expand_mask_store_optab_fn): Likewise.
20567 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20568             Alan Hayward  <alan.hayward@arm.com>
20569             David Sherwood  <david.sherwood@arm.com>
20571         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
20572         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
20573         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
20574         (cond_umax@var{mode}): Document.
20575         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
20576         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
20577         (cond_umin_optab, cond_umax_optab): New optabs.
20578         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
20579         (COND_IOR, COND_XOR): New internal functions.
20580         * internal-fn.h (get_conditional_internal_fn): Declare.
20581         * internal-fn.c (cond_binary_direct): New macro.
20582         (expand_cond_binary_optab_fn): Likewise.
20583         (direct_cond_binary_optab_supported_p): Likewise.
20584         (get_conditional_internal_fn): New function.
20585         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
20586         Cope with reduction statements that are vectorized as calls rather
20587         than assignments.
20588         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
20589         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
20590         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
20591         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
20592         (UNSPEC_COND_EOR): New unspecs.
20593         (optab): Add mappings for them.
20594         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
20595         (sve_int_op, sve_fp_op): New int attributes.
20597 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20598             Alan Hayward  <alan.hayward@arm.com>
20599             David Sherwood  <david.sherwood@arm.com>
20601         * optabs.def (while_ult_optab): New optab.
20602         * doc/md.texi (while_ult@var{m}@var{n}): Document.
20603         * internal-fn.def (WHILE_ULT): New internal function.
20604         * internal-fn.h (direct_internal_fn_supported_p): New override
20605         that takes two types as argument.
20606         * internal-fn.c (while_direct): New macro.
20607         (expand_while_optab_fn): New function.
20608         (convert_optab_supported_p): Likewise.
20609         (direct_while_optab_supported_p): New macro.
20610         * wide-int.h (wi::udiv_ceil): New function.
20611         * tree-vectorizer.h (rgroup_masks): New structure.
20612         (vec_loop_masks): New typedef.
20613         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
20614         and fully_masked_p.
20615         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
20616         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
20617         (vect_max_vf): New function.
20618         (slpeel_make_loop_iterate_ntimes): Delete.
20619         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
20620         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
20621         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
20622         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
20623         internal-fn.h, stor-layout.h and optabs-query.h.
20624         (vect_set_loop_mask): New function.
20625         (add_preheader_seq): Likewise.
20626         (add_header_seq): Likewise.
20627         (interleave_supported_p): Likewise.
20628         (vect_maybe_permute_loop_masks): Likewise.
20629         (vect_set_loop_masks_directly): Likewise.
20630         (vect_set_loop_condition_masked): Likewise.
20631         (vect_set_loop_condition_unmasked): New function, split out from
20632         slpeel_make_loop_iterate_ntimes.
20633         (slpeel_make_loop_iterate_ntimes): Rename to..
20634         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
20635         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
20636         (vect_do_peeling): Update call accordingly.
20637         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
20638         loops.
20639         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
20640         mask_compare_type, can_fully_mask_p and fully_masked_p.
20641         (release_vec_loop_masks): New function.
20642         (_loop_vec_info): Use it to free the loop masks.
20643         (can_produce_all_loop_masks_p): New function.
20644         (vect_get_max_nscalars_per_iter): Likewise.
20645         (vect_verify_full_masking): Likewise.
20646         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
20647         retries, and free the mask rgroups before retrying.  Check loop-wide
20648         reasons for disallowing fully-masked loops.  Make the final decision
20649         about whether use a fully-masked loop or not.
20650         (vect_estimate_min_profitable_iters): Do not assume that peeling
20651         for the number of iterations will be needed for fully-masked loops.
20652         (vectorizable_reduction): Disable fully-masked loops.
20653         (vectorizable_live_operation): Likewise.
20654         (vect_halve_mask_nunits): New function.
20655         (vect_double_mask_nunits): Likewise.
20656         (vect_record_loop_mask): Likewise.
20657         (vect_get_loop_mask): Likewise.
20658         (vect_transform_loop): Handle the case in which the final loop
20659         iteration might handle a partial vector.  Call vect_set_loop_condition
20660         instead of slpeel_make_loop_iterate_ntimes.
20661         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
20662         (check_load_store_masking): New function.
20663         (prepare_load_store_mask): Likewise.
20664         (vectorizable_store): Handle fully-masked loops.
20665         (vectorizable_load): Likewise.
20666         (supportable_widening_operation): Use vect_halve_mask_nunits for
20667         booleans.
20668         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
20669         (vect_gen_while): New function.
20670         * config/aarch64/aarch64.md (umax<mode>3): New expander.
20671         (aarch64_uqdec<mode>): New insn.
20673 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20674             Alan Hayward  <alan.hayward@arm.com>
20675             David Sherwood  <david.sherwood@arm.com>
20677         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
20678         (reduc_xor_scal_optab): New optabs.
20679         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
20680         (reduc_xor_scal_@var{m}): Document.
20681         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
20682         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
20683         internal functions.
20684         * fold-const-call.c (fold_const_call): Handle them.
20685         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
20686         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
20687         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
20688         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
20689         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
20690         (UNSPEC_XORV): New unspecs.
20691         (optab): Add entries for them.
20692         (BITWISEV): New int iterator.
20693         (bit_reduc_op): New int attributes.
20695 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20696             Alan Hayward  <alan.hayward@arm.com>
20697             David Sherwood  <david.sherwood@arm.com>
20699         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
20700         * internal-fn.def (VEC_SHL_INSERT): New internal function.
20701         * optabs.def (vec_shl_insert_optab): New optab.
20702         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
20703         (duplicate_and_interleave): Likewise.
20704         * tree-vect-loop.c: Include internal-fn.h.
20705         (neutral_op_for_slp_reduction): New function, split out from
20706         get_initial_defs_for_reduction.
20707         (get_initial_def_for_reduction): Handle option 2 for variable-length
20708         vectors by loading the neutral value into a vector and then shifting
20709         the initial value into element 0.
20710         (get_initial_defs_for_reduction): Replace the code argument with
20711         the neutral value calculated by neutral_op_for_slp_reduction.
20712         Use gimple_build_vector for constant-length vectors.
20713         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
20714         but the first group_size elements have a neutral value.
20715         Use duplicate_and_interleave otherwise.
20716         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
20717         Update call to get_initial_defs_for_reduction.  Handle SLP
20718         reductions for variable-length vectors by creating one vector
20719         result for each scalar result, with the elements associated
20720         with other scalar results stubbed out with the neutral value.
20721         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
20722         Require IFN_VEC_SHL_INSERT for double reductions on
20723         variable-length vectors, or SLP reductions that have
20724         a neutral value.  Require can_duplicate_and_interleave_p
20725         support for variable-length unchained SLP reductions if there
20726         is no neutral value, such as for MIN/MAX reductions.  Also require
20727         the number of vector elements to be a multiple of the number of
20728         SLP statements when doing variable-length unchained SLP reductions.
20729         Update call to vect_create_epilog_for_reduction.
20730         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
20731         and remove initial values.
20732         (duplicate_and_interleave): Make public.
20733         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
20734         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
20736 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20737             Alan Hayward  <alan.hayward@arm.com>
20738             David Sherwood  <david.sherwood@arm.com>
20740         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
20741         (can_duplicate_and_interleave_p): New function.
20742         (vect_get_and_check_slp_defs): Take the vector of statements
20743         rather than just the current one.  Remove excess parentheses.
20744         Restriction rejectinon of vect_constant_def and vect_external_def
20745         for variable-length vectors to boolean types, or types for which
20746         can_duplicate_and_interleave_p is false.
20747         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
20748         (duplicate_and_interleave): New function.
20749         (vect_get_constant_vectors): Use gimple_build_vector for
20750         constant-length vectors and suitable variable-length constant
20751         vectors.  Use duplicate_and_interleave for other variable-length
20752         vectors.  Don't defer the update when inserting new statements.
20754 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20755             Alan Hayward  <alan.hayward@arm.com>
20756             David Sherwood  <david.sherwood@arm.com>
20758         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
20759         min_profitable_iters doesn't go negative.
20761 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20762             Alan Hayward  <alan.hayward@arm.com>
20763             David Sherwood  <david.sherwood@arm.com>
20765         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
20766         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
20767         * optabs.def (vec_mask_load_lanes_optab): New optab.
20768         (vec_mask_store_lanes_optab): Likewise.
20769         * internal-fn.def (MASK_LOAD_LANES): New internal function.
20770         (MASK_STORE_LANES): Likewise.
20771         * internal-fn.c (mask_load_lanes_direct): New macro.
20772         (mask_store_lanes_direct): Likewise.
20773         (expand_mask_load_optab_fn): Handle masked operations.
20774         (expand_mask_load_lanes_optab_fn): New macro.
20775         (expand_mask_store_optab_fn): Handle masked operations.
20776         (expand_mask_store_lanes_optab_fn): New macro.
20777         (direct_mask_load_lanes_optab_supported_p): Likewise.
20778         (direct_mask_store_lanes_optab_supported_p): Likewise.
20779         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
20780         parameter.
20781         (vect_load_lanes_supported): Likewise.
20782         * tree-vect-data-refs.c (strip_conversion): New function.
20783         (can_group_stmts_p): Likewise.
20784         (vect_analyze_data_ref_accesses): Use it instead of checking
20785         for a pair of assignments.
20786         (vect_store_lanes_supported): Take a masked_p parameter.
20787         (vect_load_lanes_supported): Likewise.
20788         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
20789         vect_store_lanes_supported and vect_load_lanes_supported.
20790         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
20791         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
20792         parameter.  Don't allow gaps for masked accesses.
20793         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
20794         and vect_load_lanes_supported.
20795         (get_load_store_type): Take a masked_p parameter and update
20796         call to get_group_load_store_type.
20797         (vectorizable_store): Update call to get_load_store_type.
20798         Handle IFN_MASK_STORE_LANES.
20799         (vectorizable_load): Update call to get_load_store_type.
20800         Handle IFN_MASK_LOAD_LANES.
20802 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20803             Alan Hayward  <alan.hayward@arm.com>
20804             David Sherwood  <david.sherwood@arm.com>
20806         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
20807         modes for SVE.
20808         * config/aarch64/aarch64-protos.h
20809         (aarch64_sve_struct_memory_operand_p): Declare.
20810         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
20811         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
20812         (VPRED, vpred): Handle SVE structure modes.
20813         * config/aarch64/constraints.md (Utx): New constraint.
20814         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
20815         (aarch64_sve_struct_nonimmediate_operand): New predicates.
20816         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
20817         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
20818         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
20819         structure modes.  Split into pieces after RA.
20820         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
20821         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
20822         New patterns.
20823         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
20824         SVE structure modes.
20825         (aarch64_classify_address): Likewise.
20826         (sizetochar): Move earlier in file.
20827         (aarch64_print_operand): Handle SVE register lists.
20828         (aarch64_array_mode): New function.
20829         (aarch64_sve_struct_memory_operand_p): Likewise.
20830         (TARGET_ARRAY_MODE): Redefine.
20832 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20833             Alan Hayward  <alan.hayward@arm.com>
20834             David Sherwood  <david.sherwood@arm.com>
20836         * target.def (array_mode): New target hook.
20837         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
20838         * doc/tm.texi: Regenerate.
20839         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
20840         * hooks.c (hook_optmode_mode_uhwi_none): New function.
20841         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
20842         targetm.array_mode.
20843         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
20844         type sizes.
20846 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20847             Alan Hayward  <alan.hayward@arm.com>
20848             David Sherwood  <david.sherwood@arm.com>
20850         * fold-const.c (fold_binary_loc): Check the argument types
20851         rather than the result type when testing for a vector operation.
20853 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20855         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
20856         * doc/tm.texi: Regenerate.
20858 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20859             Alan Hayward  <alan.hayward@arm.com>
20860             David Sherwood  <david.sherwood@arm.com>
20862         * doc/invoke.texi (-msve-vector-bits=): Document new option.
20863         (sve): Document new AArch64 extension.
20864         * doc/md.texi (w): Extend the description of the AArch64
20865         constraint to include SVE vectors.
20866         (Upl, Upa): Document new AArch64 predicate constraints.
20867         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
20868         enum.
20869         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
20870         (msve-vector-bits=): New option.
20871         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
20872         SVE when these are disabled.
20873         (sve): New extension.
20874         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
20875         modes.  Adjust their number of units based on aarch64_sve_vg.
20876         (MAX_BITSIZE_MODE_ANY_MODE): Define.
20877         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
20878         aarch64_addr_query_type.
20879         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
20880         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
20881         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
20882         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
20883         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
20884         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
20885         (aarch64_simd_imm_zero_p): Delete.
20886         (aarch64_check_zero_based_sve_index_immediate): Declare.
20887         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
20888         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
20889         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
20890         (aarch64_sve_float_mul_immediate_p): Likewise.
20891         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
20892         rather than an rtx.
20893         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
20894         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
20895         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
20896         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
20897         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
20898         (aarch64_regmode_natural_size): Likewise.
20899         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
20900         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
20901         left one place.
20902         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
20903         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
20904         for VG and the SVE predicate registers.
20905         (V_ALIASES): Add a "z"-prefixed alias.
20906         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
20907         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
20908         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
20909         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
20910         (REG_CLASS_NAMES): Add entries for them.
20911         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
20912         and the predicate registers.
20913         (aarch64_sve_vg): Declare.
20914         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
20915         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
20916         (REGMODE_NATURAL_SIZE): Define.
20917         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
20918         SVE macros.
20919         * config/aarch64/aarch64.c: Include cfgrtl.h.
20920         (simd_immediate_info): Add a constructor for series vectors,
20921         and an associated step field.
20922         (aarch64_sve_vg): New variable.
20923         (aarch64_dbx_register_number): Handle VG and the predicate registers.
20924         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
20925         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
20926         (VEC_ANY_DATA, VEC_STRUCT): New constants.
20927         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
20928         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
20929         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
20930         (aarch64_get_mask_mode): New functions.
20931         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
20932         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
20933         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
20934         predicate modes and predicate registers.  Explicitly restrict
20935         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
20936         to store a vector mode if it is recognized by
20937         aarch64_classify_vector_mode.
20938         (aarch64_regmode_natural_size): New function.
20939         (aarch64_hard_regno_caller_save_mode): Return the original mode
20940         for predicates.
20941         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
20942         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
20943         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
20944         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
20945         functions.
20946         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
20947         does not overlap dest if the function is frame-related.  Handle
20948         SVE constants.
20949         (aarch64_split_add_offset): New function.
20950         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
20951         them aarch64_add_offset.
20952         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
20953         and update call to aarch64_sub_sp.
20954         (aarch64_add_cfa_expression): New function.
20955         (aarch64_expand_prologue): Pass extra temporary registers to the
20956         functions above.  Handle the case in which we need to emit new
20957         DW_CFA_expressions for registers that were originally saved
20958         relative to the stack pointer, but now have to be expressed
20959         relative to the frame pointer.
20960         (aarch64_output_mi_thunk): Pass extra temporary registers to the
20961         functions above.
20962         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
20963         IP0 and IP1 values for SVE frames.
20964         (aarch64_expand_vec_series): New function.
20965         (aarch64_expand_sve_widened_duplicate): Likewise.
20966         (aarch64_expand_sve_const_vector): Likewise.
20967         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
20968         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
20969         into the register, rather than emitting a SET directly.
20970         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
20971         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
20972         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
20973         (offset_9bit_signed_scaled_p): New functions.
20974         (aarch64_replicate_bitmask_imm): New function.
20975         (aarch64_bitmask_imm): Use it.
20976         (aarch64_cannot_force_const_mem): Reject expressions involving
20977         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
20978         (aarch64_classify_index): Handle SVE indices, by requiring
20979         a plain register index with a scale that matches the element size.
20980         (aarch64_classify_address): Handle SVE addresses.  Assert that
20981         the mode of the address is VOIDmode or an integer mode.
20982         Update call to aarch64_classify_symbol.
20983         (aarch64_classify_symbolic_expression): Update call to
20984         aarch64_classify_symbol.
20985         (aarch64_const_vec_all_in_range_p): New function.
20986         (aarch64_print_vector_float_operand): Likewise.
20987         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
20988         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
20989         and the FP immediates 1.0 and 0.5.
20990         (aarch64_print_address_internal): Handle SVE addresses.
20991         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
20992         (aarch64_regno_regclass): Handle predicate registers.
20993         (aarch64_secondary_reload): Handle big-endian reloads of SVE
20994         data modes.
20995         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
20996         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
20997         (aarch64_convert_sve_vector_bits): New function.
20998         (aarch64_override_options): Use it to handle -msve-vector-bits=.
20999         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
21000         rather than an rtx.
21001         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
21002         Handle SVE vector and predicate modes.  Accept VL-based constants
21003         that need only one temporary register, and VL offsets that require
21004         no temporary registers.
21005         (aarch64_conditional_register_usage): Mark the predicate registers
21006         as fixed if SVE isn't available.
21007         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
21008         Return true for SVE vector and predicate modes.
21009         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
21010         rather than an unsigned int.  Handle SVE modes.
21011         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
21012         SVE modes.
21013         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
21014         if SVE is enabled.
21015         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
21016         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
21017         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
21018         (aarch64_sve_float_mul_immediate_p): New functions.
21019         (aarch64_sve_valid_immediate): New function.
21020         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
21021         Explicitly reject structure modes.  Check for INDEX constants.
21022         Handle PTRUE and PFALSE constants.
21023         (aarch64_check_zero_based_sve_index_immediate): New function.
21024         (aarch64_simd_imm_zero_p): Delete.
21025         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
21026         vector modes.  Accept constants in the range of CNT[BHWD].
21027         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
21028         ask for an Advanced SIMD mode.
21029         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
21030         (aarch64_simd_vector_alignment): Handle SVE predicates.
21031         (aarch64_vectorize_preferred_vector_alignment): New function.
21032         (aarch64_simd_vector_alignment_reachable): Use it instead of
21033         the vector size.
21034         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
21035         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
21036         functions.
21037         (MAX_VECT_LEN): Delete.
21038         (expand_vec_perm_d): Add a vec_flags field.
21039         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
21040         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
21041         (aarch64_evpc_ext): Don't apply a big-endian lane correction
21042         for SVE modes.
21043         (aarch64_evpc_rev): Rename to...
21044         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
21045         (aarch64_evpc_rev_global): New function.
21046         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
21047         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
21048         MAX_VECT_LEN.
21049         (aarch64_evpc_sve_tbl): New function.
21050         (aarch64_expand_vec_perm_const_1): Update after rename of
21051         aarch64_evpc_rev.  Handle SVE permutes too, trying
21052         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
21053         than aarch64_evpc_tbl.
21054         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
21055         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
21056         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
21057         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
21058         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
21059         (aarch64_expand_sve_vcond): New functions.
21060         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
21061         of aarch64_vector_mode_p.
21062         (aarch64_dwarf_poly_indeterminate_value): New function.
21063         (aarch64_compute_pressure_classes): Likewise.
21064         (aarch64_can_change_mode_class): Likewise.
21065         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
21066         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
21067         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
21068         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
21069         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
21070         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
21071         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
21072         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
21073         constraints.
21074         (Dn, Dl, Dr): Accept const as well as const_vector.
21075         (Dz): Likewise.  Compare against CONST0_RTX.
21076         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
21077         of "vector" where appropriate.
21078         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
21079         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
21080         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
21081         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
21082         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
21083         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
21084         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
21085         (v_int_equiv): Extend to SVE modes.
21086         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
21087         mode attributes.
21088         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
21089         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
21090         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
21091         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
21092         (SVE_COND_FP_CMP): New int iterators.
21093         (perm_hilo): Handle the new unpack unspecs.
21094         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
21095         attributes.
21096         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
21097         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
21098         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
21099         (aarch64_equality_operator, aarch64_constant_vector_operand)
21100         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
21101         (aarch64_sve_nonimmediate_operand): Likewise.
21102         (aarch64_sve_general_operand): Likewise.
21103         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
21104         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
21105         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
21106         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
21107         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
21108         (aarch64_sve_float_arith_immediate): Likewise.
21109         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
21110         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
21111         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
21112         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
21113         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
21114         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
21115         (aarch64_sve_float_arith_operand): Likewise.
21116         (aarch64_sve_float_arith_with_sub_operand): Likewise.
21117         (aarch64_sve_float_mul_operand): Likewise.
21118         (aarch64_sve_vec_perm_operand): Likewise.
21119         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
21120         (aarch64_mov_operand): Accept const_poly_int and const_vector.
21121         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
21122         as well as const_vector.
21123         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
21124         in file.  Use CONST0_RTX and CONSTM1_RTX.
21125         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
21126         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
21127         Use aarch64_simd_imm_zero.
21128         * config/aarch64/aarch64-sve.md: New file.
21129         * config/aarch64/aarch64.md: Include it.
21130         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
21131         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
21132         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
21133         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
21134         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
21135         (sve): New attribute.
21136         (enabled): Disable instructions with the sve attribute unless
21137         TARGET_SVE.
21138         (movqi, movhi): Pass CONST_POLY_INT operaneds through
21139         aarch64_expand_mov_immediate.
21140         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
21141         CNT[BHSD] immediates.
21142         (movti): Split CONST_POLY_INT moves into two halves.
21143         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
21144         Split additions that need a temporary here if the destination
21145         is the stack pointer.
21146         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
21147         (*add<mode>3_poly_1): New instruction.
21148         (set_clobber_cc): New expander.
21150 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21152         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
21153         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
21154         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
21155         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
21156         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
21157         Change innermode from fixed_mode_size to machine_mode.
21158         (simplify_subreg): Update call accordingly.  Handle a constant-sized
21159         subreg of a variable-length CONST_VECTOR.
21161 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21162             Alan Hayward  <alan.hayward@arm.com>
21163             David Sherwood  <david.sherwood@arm.com>
21165         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
21166         (add_offset_to_base): New function, split out from...
21167         (create_mem_ref): ...here.  When handling a scale other than 1,
21168         check first whether the address is valid without the offset.
21169         Add it into the base if so, leaving the index and scale as-is.
21171 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
21173         PR c++/83778
21174         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
21175         fold_for_warn before checking if arg2 is INTEGER_CST.
21177 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
21179         * config/rs6000/predicates.md (load_multiple_operation): Delete.
21180         (store_multiple_operation): Delete.
21181         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
21182         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
21183         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
21184         guarded by TARGET_STRING.
21185         (rs6000_output_load_multiple): Delete.
21186         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
21187         OPTION_MASK_STRING / TARGET_STRING handling.
21188         (print_operand) <'N', 'O'>: Add comment that these are unused now.
21189         (const rs6000_opt_masks) <"string">: Change mask to 0.
21190         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
21191         (MASK_STRING): Delete.
21192         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
21193         parts.  Simplify.
21194         (load_multiple): Delete.
21195         (*ldmsi8): Delete.
21196         (*ldmsi7): Delete.
21197         (*ldmsi6): Delete.
21198         (*ldmsi5): Delete.
21199         (*ldmsi4): Delete.
21200         (*ldmsi3): Delete.
21201         (store_multiple): Delete.
21202         (*stmsi8): Delete.
21203         (*stmsi7): Delete.
21204         (*stmsi6): Delete.
21205         (*stmsi5): Delete.
21206         (*stmsi4): Delete.
21207         (*stmsi3): Delete.
21208         (movmemsi_8reg): Delete.
21209         (corresponding unnamed define_insn): Delete.
21210         (movmemsi_6reg): Delete.
21211         (corresponding unnamed define_insn): Delete.
21212         (movmemsi_4reg): Delete.
21213         (corresponding unnamed define_insn): Delete.
21214         (movmemsi_2reg): Delete.
21215         (corresponding unnamed define_insn): Delete.
21216         (movmemsi_1reg): Delete.
21217         (corresponding unnamed define_insn): Delete.
21218         * config/rs6000/rs6000.opt (mno-string): New.
21219         (mstring): Replace by deprecation warning stub.
21220         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
21222 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
21224         * regrename.c (regrename_do_replace): If replacing the same
21225         reg multiple times, try to reuse last created gen_raw_REG.
21227         PR debug/81155
21228         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
21229         main to workaround a bug in GDB.
21231 2018-01-12  Tom de Vries  <tom@codesourcery.com>
21233         PR target/83737
21234         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
21236 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
21238         PR rtl-optimization/80481
21239         * ira-color.c (get_cap_member): New function.
21240         (allocnos_conflict_by_live_ranges_p): Use it.
21241         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
21242         (setup_slot_coalesced_allocno_live_ranges): Ditto.
21244 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
21246         PR target/83628
21247         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
21248         (*saddl_se_1): Ditto.
21249         (*ssubsi_1): Ditto.
21250         (*ssubl_se_1): Ditto.
21252 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
21254         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
21255         rather than wi::to_widest for DR_INITs.
21256         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
21257         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
21258         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
21259         INTEGER_CSTs.
21260         (vect_analyze_group_access_1): Note that here.
21262 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
21264         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
21265         polynomial type sizes.
21267 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
21269         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
21270         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
21271         (gimple_add_tmp_var): Likewise.
21273 2018-01-12  Martin Liska  <mliska@suse.cz>
21275         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
21276         (gimple_alloc_sizes): Likewise.
21277         (dump_gimple_statistics): Use PRIu64 in printf format.
21278         * gimple.h: Change uint64_t to int.
21280 2018-01-12  Martin Liska  <mliska@suse.cz>
21282         * tree-core.h: Use uint64_t instead of int.
21283         * tree.c (tree_node_counts): Likewise.
21284         (tree_node_sizes): Likewise.
21285         (dump_tree_statistics): Use PRIu64 in printf format.
21287 2018-01-12  Martin Liska  <mliska@suse.cz>
21289         * Makefile.in: As qsort_chk is implemented in vec.c, add
21290         vec.o to linkage of gencfn-macros.
21291         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
21292         passing the info to record_node_allocation_statistics.
21293         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
21294         and pass the info.
21295         * ggc-common.c (struct ggc_usage): Add operator== and use
21296         it in operator< and compare function.
21297         * mem-stats.h (struct mem_usage): Likewise.
21298         * vec.c (struct vec_usage): Remove operator< and compare
21299         function. Can be simply inherited.
21301 2018-01-12  Martin Jambor  <mjambor@suse.cz>
21303         PR target/81616
21304         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
21305         * tree-ssa-math-opts.c: Include domwalk.h.
21306         (convert_mult_to_fma_1): New function.
21307         (fma_transformation_info): New type.
21308         (fma_deferring_state): Likewise.
21309         (cancel_fma_deferring): New function.
21310         (result_of_phi): Likewise.
21311         (last_fma_candidate_feeds_initial_phi): Likewise.
21312         (convert_mult_to_fma): Added deferring logic, split actual
21313         transformation to convert_mult_to_fma_1.
21314         (math_opts_dom_walker): New type.
21315         (math_opts_dom_walker::after_dom_children): New method, body moved
21316         here from pass_optimize_widening_mul::execute, added deferring logic
21317         bits.
21318         (pass_optimize_widening_mul::execute): Moved most of code to
21319         math_opts_dom_walker::after_dom_children.
21320         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
21321         * config/i386/i386.c (ix86_option_override_internal): Added
21322         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
21324 2018-01-12  Richard Biener  <rguenther@suse.de>
21326         PR debug/83157
21327         * dwarf2out.c (gen_variable_die): Do not reset old_die for
21328         inline instance vars.
21330 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
21332         PR target/81819
21333         * config/rx/rx.c (rx_is_restricted_memory_address):
21334         Handle SUBREG case.
21336 2018-01-12  Richard Biener  <rguenther@suse.de>
21338         PR tree-optimization/80846
21339         * target.def (split_reduction): New target hook.
21340         * targhooks.c (default_split_reduction): New function.
21341         * targhooks.h (default_split_reduction): Declare.
21342         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
21343         target requests first reduce vectors by combining low and high
21344         parts.
21345         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
21346         (get_vectype_for_scalar_type_and_size): Export.
21347         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
21348         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
21349         * doc/tm.texi: Regenerate.
21350         * config/i386/i386.c (ix86_split_reduction): Implement
21351         TARGET_VECTORIZE_SPLIT_REDUCTION.
21353 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
21355         PR target/83368
21356         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
21357         in PIC mode except for TARGET_VXWORKS_RTP.
21358         * config/sparc/sparc.c: Include cfgrtl.h.
21359         (TARGET_INIT_PIC_REG): Define.
21360         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
21361         (sparc_pic_register_p): New predicate.
21362         (sparc_legitimate_address_p): Use it.
21363         (sparc_legitimize_pic_address): Likewise.
21364         (sparc_delegitimize_address): Likewise.
21365         (sparc_mode_dependent_address_p): Likewise.
21366         (gen_load_pcrel_sym): Remove 4th parameter.
21367         (load_got_register): Adjust call to above.  Remove obsolete stuff.
21368         (sparc_expand_prologue): Do not call load_got_register here.
21369         (sparc_flat_expand_prologue): Likewise.
21370         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
21371         (sparc_use_pseudo_pic_reg): New function.
21372         (sparc_init_pic_reg): Likewise.
21373         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
21374         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
21376 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
21378         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
21379         Add item for branch_cost.
21381 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
21383         PR rtl-optimization/83565
21384         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
21385         not extend the result to a larger mode for rotate operations.
21386         (num_sign_bit_copies1): Likewise.
21388 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
21390         PR target/40411
21391         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
21392         -symbolic.
21393         Use values-Xc.o for -pedantic.
21394         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
21396 2018-01-12  Martin Liska  <mliska@suse.cz>
21398         PR ipa/83054
21399         * ipa-devirt.c (final_warning_record::grow_type_warnings):
21400         New function.
21401         (possible_polymorphic_call_targets): Use it.
21402         (ipa_devirt): Likewise.
21404 2018-01-12  Martin Liska  <mliska@suse.cz>
21406         * profile-count.h (enum profile_quality): Use 0 as invalid
21407         enum value of profile_quality.
21409 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
21411         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
21412         -mext-string options.
21414 2018-01-12  Richard Biener  <rguenther@suse.de>
21416         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
21417         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
21418         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
21419         Likewise.
21420         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
21422 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
21424         * configure.ac (--with-long-double-format): Add support for the
21425         configuration option to change the default long double format on
21426         PowerPC systems.
21427         * config.gcc (powerpc*-linux*-*): Likewise.
21428         * configure: Regenerate.
21429         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
21430         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
21431         used without modification.
21433 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21435         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
21436         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
21437         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
21438         MISC_BUILTIN_SPEC_BARRIER.
21439         (rs6000_init_builtins): Likewise.
21440         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
21441         enum value.
21442         (speculation_barrier): New define_insn.
21443         * doc/extend.texi: Document __builtin_speculation_barrier.
21445 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
21447         PR target/83203
21448         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
21449         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
21450         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
21451         iterators.
21452         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
21453         integral modes instead of "ss" and "sd".
21454         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
21455         vectors with 32-bit and 64-bit elements.
21456         (vecdupssescalarmodesuffix): New mode attribute.
21457         (vec_dup<mode>): Use it.
21459 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
21461         PR target/83330
21462         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
21463         frame if argument is passed on stack.
21465 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
21467         PR target/82682
21468         * ree.c (combine_reaching_defs): Optimize also
21469         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
21470         reg2=any_extend(exp); reg1=reg2;, formatting fix.
21472 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
21474         PR middle-end/83189
21475         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
21477 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
21479         PR middle-end/83718
21480         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
21481         after they are computed.
21483 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
21485         PR tree-optimization/83695
21486         * gimple-loop-linterchange.cc
21487         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
21488         reset cached scev information after interchange.
21489         (pass_linterchange::execute): Remove call to scev_reset_htab.
21491 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21493         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
21494         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
21495         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
21496         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
21497         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
21498         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
21499         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
21500         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
21501         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
21502         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
21503         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
21504         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
21505         (V_lane_reg): Likewise.
21506         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
21507         New define_expand.
21508         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
21509         (vfmal_lane_low<mode>_intrinsic,
21510         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
21511         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
21512         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
21513         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
21514         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
21515         vfmsl_lane_high<mode>_intrinsic): New define_insns.
21517 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21519         * config/arm/arm-cpus.in (fp16fml): New feature.
21520         (ALL_SIMD): Add fp16fml.
21521         (armv8.2-a): Add fp16fml as an option.
21522         (armv8.3-a): Likewise.
21523         (armv8.4-a): Add fp16fml as part of fp16.
21524         * config/arm/arm.h (TARGET_FP16FML): Define.
21525         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
21526         when appropriate.
21527         * config/arm/arm-modes.def (V2HF): Define.
21528         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
21529         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
21530         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
21531         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
21532         vfmsl_low, vfmsl_high): New set of builtins.
21533         * config/arm/iterators.md (PLUSMINUS): New code iterator.
21534         (vfml_op): New code attribute.
21535         (VFMLHALVES): New int iterator.
21536         (VFML, VFMLSEL): New mode attributes.
21537         (V_reg): Define mapping for V2HF.
21538         (V_hi, V_lo): New mode attributes.
21539         (VF_constraint): Likewise.
21540         (vfml_half, vfml_half_selector): New int attributes.
21541         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
21542         define_expand.
21543         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
21544         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
21545         New define_insn.
21546         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
21547         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
21548         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
21549         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
21550         documentation.
21551         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
21552         Document new effective target and option set.
21554 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21556         * config/arm/arm-cpus.in (armv8_4): New feature.
21557         (ARMv8_4a): New fgroup.
21558         (armv8.4-a): New arch.
21559         * config/arm/arm-tables.opt: Regenerate.
21560         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
21561         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
21562         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
21563         Add matching rules for -march=armv8.4-a and extensions.
21564         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
21566 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
21568         PR target/81821
21569         * config/rx/rx.md (BW): New mode attribute.
21570         (sync_lock_test_and_setsi): Add mode suffix to insn output.
21572 2018-01-11  Richard Biener  <rguenther@suse.de>
21574         PR tree-optimization/83435
21575         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
21576         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
21577         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
21579 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21580             Alan Hayward  <alan.hayward@arm.com>
21581             David Sherwood  <david.sherwood@arm.com>
21583         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
21584         field.
21585         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
21586         (aarch64_print_address_internal): Use it to check for a zero offset.
21588 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21589             Alan Hayward  <alan.hayward@arm.com>
21590             David Sherwood  <david.sherwood@arm.com>
21592         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
21593         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
21594         Return a poly_int64 rather than a HOST_WIDE_INT.
21595         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
21596         rather than a HOST_WIDE_INT.
21597         * config/aarch64/aarch64.h (aarch64_frame): Protect with
21598         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
21599         hard_fp_offset, frame_size, initial_adjust, callee_offset and
21600         final_offset from HOST_WIDE_INT to poly_int64.
21601         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
21602         to_constant when getting the number of units in an Advanced SIMD
21603         mode.
21604         (aarch64_builtin_vectorized_function): Check for a constant number
21605         of units.
21606         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
21607         GET_MODE_SIZE.
21608         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
21609         attribute instead of GET_MODE_NUNITS.
21610         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
21611         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
21612         GET_MODE_SIZE for fixed-size registers.
21613         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
21614         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
21615         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
21616         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
21617         (aarch64_print_operand, aarch64_print_address_internal)
21618         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
21619         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
21620         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
21621         Handle polynomial GET_MODE_SIZE.
21622         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
21623         wider than SImode without modification.
21624         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
21625         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
21626         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
21627         passing and returning SVE modes.
21628         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
21629         rather than GEN_INT.
21630         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
21631         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
21632         (aarch64_allocate_and_probe_stack_space): Likewise.
21633         (aarch64_layout_frame): Cope with polynomial offsets.
21634         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
21635         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
21636         polynomial offsets.
21637         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
21638         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
21639         poly_int64 rather than a HOST_WIDE_INT.
21640         (aarch64_get_separate_components, aarch64_process_components)
21641         (aarch64_expand_prologue, aarch64_expand_epilogue)
21642         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
21643         (aarch64_anchor_offset): New function, split out from...
21644         (aarch64_legitimize_address): ...here.
21645         (aarch64_builtin_vectorization_cost): Handle polynomial
21646         TYPE_VECTOR_SUBPARTS.
21647         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
21648         GET_MODE_NUNITS.
21649         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
21650         number of elements from the PARALLEL rather than the mode.
21651         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
21652         rather than GET_MODE_BITSIZE.
21653         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
21654         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
21655         (aarch64_expand_vec_perm_const_1): Handle polynomial
21656         d->perm.length () and d->perm elements.
21657         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
21658         Apply to_constant to d->perm elements.
21659         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
21660         polynomial CONST_VECTOR_NUNITS.
21661         (aarch64_move_pointer): Take amount as a poly_int64 rather
21662         than an int.
21663         (aarch64_progress_pointer): Avoid temporary variable.
21664         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
21665         the mode attribute instead of GET_MODE.
21667 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21668             Alan Hayward  <alan.hayward@arm.com>
21669             David Sherwood  <david.sherwood@arm.com>
21671         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
21672         x exists before using it.
21673         (aarch64_add_constant_internal): Rename to...
21674         (aarch64_add_offset_1): ...this.  Replace regnum with separate
21675         src and dest rtxes.  Handle the case in which they're different,
21676         including when the offset is zero.  Replace scratchreg with an rtx.
21677         Use 2 additions if there is no spare register into which we can
21678         move a 16-bit constant.
21679         (aarch64_add_constant): Delete.
21680         (aarch64_add_offset): Replace reg with separate src and dest
21681         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
21682         Use aarch64_add_offset_1.
21683         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
21684         an rtx rather than an int.  Take the delta as a poly_int64
21685         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
21686         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
21687         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
21688         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
21689         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
21690         and aarch64_add_sp.
21691         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
21692         aarch64_add_constant.
21694 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21696         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
21697         Use scalar_float_mode.
21699 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21701         * config/aarch64/aarch64-simd.md
21702         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
21703         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
21704         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
21705         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
21706         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
21707         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
21708         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
21709         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
21710         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
21711         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
21713 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21715         PR target/83514
21716         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
21717         targ_options->x_arm_arch_string is non NULL.
21719 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
21721         * config/aarch64/aarch64.h
21722         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
21724 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
21726         PR target/82096
21727         * expmed.c (emit_store_flag_force): Swap if const op0
21728         and change VOIDmode to mode of op0.
21730 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21732         PR rtl-optimization/83761
21733         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
21734         than bytes to mode_for_size.
21736 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
21738         PR middle-end/83189
21739         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
21740         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
21741         profile.
21743 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
21745         PR middle-end/83575
21746         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
21747         when in layout mode.
21748         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
21749         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
21750         partition fixup.
21752 2018-01-10  Michael Collison  <michael.collison@arm.com>
21754         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
21755         * config/aarch64/aarch64-option-extension.def: Add
21756         AARCH64_OPT_EXTENSION of 'fp16fml'.
21757         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21758         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
21759         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
21760         * config/aarch64/constraints.md (Ui7): New constraint.
21761         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
21762         (VFMLA_SEL_W): Ditto.
21763         (f16quad): Ditto.
21764         (f16mac1): Ditto.
21765         (VFMLA16_LOW): New int iterator.
21766         (VFMLA16_HIGH): Ditto.
21767         (UNSPEC_FMLAL): New unspec.
21768         (UNSPEC_FMLSL): Ditto.
21769         (UNSPEC_FMLAL2): Ditto.
21770         (UNSPEC_FMLSL2): Ditto.
21771         (f16mac): New code attribute.
21772         * config/aarch64/aarch64-simd-builtins.def
21773         (aarch64_fmlal_lowv2sf): Ditto.
21774         (aarch64_fmlsl_lowv2sf): Ditto.
21775         (aarch64_fmlalq_lowv4sf): Ditto.
21776         (aarch64_fmlslq_lowv4sf): Ditto.
21777         (aarch64_fmlal_highv2sf): Ditto.
21778         (aarch64_fmlsl_highv2sf): Ditto.
21779         (aarch64_fmlalq_highv4sf): Ditto.
21780         (aarch64_fmlslq_highv4sf): Ditto.
21781         (aarch64_fmlal_lane_lowv2sf): Ditto.
21782         (aarch64_fmlsl_lane_lowv2sf): Ditto.
21783         (aarch64_fmlal_laneq_lowv2sf): Ditto.
21784         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
21785         (aarch64_fmlalq_lane_lowv4sf): Ditto.
21786         (aarch64_fmlsl_lane_lowv4sf): Ditto.
21787         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
21788         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
21789         (aarch64_fmlal_lane_highv2sf): Ditto.
21790         (aarch64_fmlsl_lane_highv2sf): Ditto.
21791         (aarch64_fmlal_laneq_highv2sf): Ditto.
21792         (aarch64_fmlsl_laneq_highv2sf): Ditto.
21793         (aarch64_fmlalq_lane_highv4sf): Ditto.
21794         (aarch64_fmlsl_lane_highv4sf): Ditto.
21795         (aarch64_fmlalq_laneq_highv4sf): Ditto.
21796         (aarch64_fmlsl_laneq_highv4sf): Ditto.
21797         * config/aarch64/aarch64-simd.md:
21798         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
21799         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
21800         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
21801         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
21802         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
21803         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
21804         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
21805         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
21806         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
21807         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
21808         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
21809         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
21810         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
21811         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
21812         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
21813         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
21814         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
21815         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
21816         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
21817         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
21818         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
21819         (vfmlsl_low_u32): Ditto.
21820         (vfmlalq_low_u32): Ditto.
21821         (vfmlslq_low_u32): Ditto.
21822         (vfmlal_high_u32): Ditto.
21823         (vfmlsl_high_u32): Ditto.
21824         (vfmlalq_high_u32): Ditto.
21825         (vfmlslq_high_u32): Ditto.
21826         (vfmlal_lane_low_u32): Ditto.
21827         (vfmlsl_lane_low_u32): Ditto.
21828         (vfmlal_laneq_low_u32): Ditto.
21829         (vfmlsl_laneq_low_u32): Ditto.
21830         (vfmlalq_lane_low_u32): Ditto.
21831         (vfmlslq_lane_low_u32): Ditto.
21832         (vfmlalq_laneq_low_u32): Ditto.
21833         (vfmlslq_laneq_low_u32): Ditto.
21834         (vfmlal_lane_high_u32): Ditto.
21835         (vfmlsl_lane_high_u32): Ditto.
21836         (vfmlal_laneq_high_u32): Ditto.
21837         (vfmlsl_laneq_high_u32): Ditto.
21838         (vfmlalq_lane_high_u32): Ditto.
21839         (vfmlslq_lane_high_u32): Ditto.
21840         (vfmlalq_laneq_high_u32): Ditto.
21841         (vfmlslq_laneq_high_u32): Ditto.
21842         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
21843         (AARCH64_FL_FOR_ARCH8_4): New.
21844         (AARCH64_ISA_F16FML): New ISA flag.
21845         (TARGET_F16FML): New feature flag for fp16fml.
21846         (doc/invoke.texi): Document new fp16fml option.
21848 2018-01-10  Michael Collison  <michael.collison@arm.com>
21850         * config/aarch64/aarch64-builtins.c:
21851         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
21852         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21853         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
21854         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
21855         (AARCH64_ISA_SHA3): New ISA flag.
21856         (TARGET_SHA3): New feature flag for sha3.
21857         * config/aarch64/iterators.md (sha512_op): New int attribute.
21858         (CRYPTO_SHA512): New int iterator.
21859         (UNSPEC_SHA512H): New unspec.
21860         (UNSPEC_SHA512H2): Ditto.
21861         (UNSPEC_SHA512SU0): Ditto.
21862         (UNSPEC_SHA512SU1): Ditto.
21863         * config/aarch64/aarch64-simd-builtins.def
21864         (aarch64_crypto_sha512hqv2di): New builtin.
21865         (aarch64_crypto_sha512h2qv2di): Ditto.
21866         (aarch64_crypto_sha512su0qv2di): Ditto.
21867         (aarch64_crypto_sha512su1qv2di): Ditto.
21868         (aarch64_eor3qv8hi): Ditto.
21869         (aarch64_rax1qv2di): Ditto.
21870         (aarch64_xarqv2di): Ditto.
21871         (aarch64_bcaxqv8hi): Ditto.
21872         * config/aarch64/aarch64-simd.md:
21873         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
21874         (aarch64_crypto_sha512su0qv2di): Ditto.
21875         (aarch64_crypto_sha512su1qv2di): Ditto.
21876         (aarch64_eor3qv8hi): Ditto.
21877         (aarch64_rax1qv2di): Ditto.
21878         (aarch64_xarqv2di): Ditto.
21879         (aarch64_bcaxqv8hi): Ditto.
21880         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
21881         (vsha512h2q_u64): Ditto.
21882         (vsha512su0q_u64): Ditto.
21883         (vsha512su1q_u64): Ditto.
21884         (veor3q_u16): Ditto.
21885         (vrax1q_u64): Ditto.
21886         (vxarq_u64): Ditto.
21887         (vbcaxq_u16): Ditto.
21888         * config/arm/types.md (crypto_sha512): New type attribute.
21889         (crypto_sha3): Ditto.
21890         (doc/invoke.texi): Document new sha3 option.
21892 2018-01-10  Michael Collison  <michael.collison@arm.com>
21894         * config/aarch64/aarch64-builtins.c:
21895         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
21896         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21897         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
21898         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
21899         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
21900         (AARCH64_ISA_SM4): New ISA flag.
21901         (TARGET_SM4): New feature flag for sm4.
21902         * config/aarch64/aarch64-simd-builtins.def
21903         (aarch64_sm3ss1qv4si): Ditto.
21904         (aarch64_sm3tt1aq4si): Ditto.
21905         (aarch64_sm3tt1bq4si): Ditto.
21906         (aarch64_sm3tt2aq4si): Ditto.
21907         (aarch64_sm3tt2bq4si): Ditto.
21908         (aarch64_sm3partw1qv4si): Ditto.
21909         (aarch64_sm3partw2qv4si): Ditto.
21910         (aarch64_sm4eqv4si): Ditto.
21911         (aarch64_sm4ekeyqv4si): Ditto.
21912         * config/aarch64/aarch64-simd.md:
21913         (aarch64_sm3ss1qv4si): Ditto.
21914         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
21915         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
21916         (aarch64_sm4eqv4si): Ditto.
21917         (aarch64_sm4ekeyqv4si): Ditto.
21918         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
21919         (sm3part_op): Ditto.
21920         (CRYPTO_SM3TT): Ditto.
21921         (CRYPTO_SM3PART): Ditto.
21922         (UNSPEC_SM3SS1): New unspec.
21923         (UNSPEC_SM3TT1A): Ditto.
21924         (UNSPEC_SM3TT1B): Ditto.
21925         (UNSPEC_SM3TT2A): Ditto.
21926         (UNSPEC_SM3TT2B): Ditto.
21927         (UNSPEC_SM3PARTW1): Ditto.
21928         (UNSPEC_SM3PARTW2): Ditto.
21929         (UNSPEC_SM4E): Ditto.
21930         (UNSPEC_SM4EKEY): Ditto.
21931         * config/aarch64/constraints.md (Ui2): New constraint.
21932         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
21933         * config/arm/types.md (crypto_sm3): New type attribute.
21934         (crypto_sm4): Ditto.
21935         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
21936         (vsm3tt1aq_u32): Ditto.
21937         (vsm3tt1bq_u32): Ditto.
21938         (vsm3tt2aq_u32): Ditto.
21939         (vsm3tt2bq_u32): Ditto.
21940         (vsm3partw1q_u32): Ditto.
21941         (vsm3partw2q_u32): Ditto.
21942         (vsm4eq_u32): Ditto.
21943         (vsm4ekeyq_u32): Ditto.
21944         (doc/invoke.texi): Document new sm4 option.
21946 2018-01-10  Michael Collison  <michael.collison@arm.com>
21948         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
21949         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
21950         (AARCH64_FL_FOR_ARCH8_4): New.
21951         (AARCH64_FL_V8_4): New flag.
21952         (doc/invoke.texi): Document new armv8.4-a option.
21954 2018-01-10  Michael Collison  <michael.collison@arm.com>
21956         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21957         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
21958         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
21959         * config/aarch64/aarch64-option-extension.def: Add
21960         AARCH64_OPT_EXTENSION of 'sha2'.
21961         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
21962         (crypto): Disable sha2 and aes if crypto disabled.
21963         (crypto): Enable aes and sha2 if enabled.
21964         (simd): Disable sha2 and aes if simd disabled.
21965         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
21966         New flags.
21967         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
21968         (TARGET_SHA2): New feature flag for sha2.
21969         (TARGET_AES): New feature flag for aes.
21970         * config/aarch64/aarch64-simd.md:
21971         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
21972         conditional on TARGET_AES.
21973         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
21974         (aarch64_crypto_sha1hsi): Make pattern conditional
21975         on TARGET_SHA2.
21976         (aarch64_crypto_sha1hv4si): Ditto.
21977         (aarch64_be_crypto_sha1hv4si): Ditto.
21978         (aarch64_crypto_sha1su1v4si): Ditto.
21979         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
21980         (aarch64_crypto_sha1su0v4si): Ditto.
21981         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
21982         (aarch64_crypto_sha256su0v4si): Ditto.
21983         (aarch64_crypto_sha256su1v4si): Ditto.
21984         (doc/invoke.texi): Document new aes and sha2 options.
21986 2018-01-10  Martin Sebor  <msebor@redhat.com>
21988         PR tree-optimization/83781
21989         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
21990         as string arrays.
21992 2018-01-11  Martin Sebor  <msebor@gmail.com>
21993             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21995         PR tree-optimization/83501
21996         PR tree-optimization/81703
21998         * tree-ssa-strlen.c (get_string_cst): Rename...
21999         (get_string_len): ...to this.  Handle global constants.
22000         (handle_char_store): Adjust.
22002 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
22003             Jim Wilson  <jimw@sifive.com>
22005         * config/riscv/riscv-protos.h (riscv_output_return): New.
22006         * config/riscv/riscv.c (struct machine_function): New naked_p field.
22007         (riscv_attribute_table, riscv_output_return),
22008         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
22009         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
22010         (riscv_compute_frame_info): Only compute frame->mask if not a naked
22011         function.
22012         (riscv_expand_prologue): Add early return for naked function.
22013         (riscv_expand_epilogue): Likewise.
22014         (riscv_function_ok_for_sibcall): Return false for naked function.
22015         (riscv_set_current_function): New.
22016         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
22017         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
22018         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
22019         * doc/extend.texi (RISC-V Function Attributes): New.
22021 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
22023         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
22024         check for 128-bit long double before checking TCmode.
22025         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
22026         128-bit long doubles before checking TFmode or TCmode.
22027         (FLOAT128_IBM_P): Likewise.
22029 2018-01-10  Martin Sebor  <msebor@redhat.com>
22031         PR tree-optimization/83671
22032         * builtins.c (c_strlen): Unconditionally return zero for the empty
22033         string.
22034         Use -Warray-bounds for warnings.
22035         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
22036         for non-constant array indices with COMPONENT_REF, arrays of
22037         arrays, and pointers to arrays.
22038         (gimple_fold_builtin_strlen): Determine and set length range for
22039         non-constant character arrays.
22041 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
22043         PR middle-end/81897
22044         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
22045         empty blocks.
22047 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
22049         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
22051 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
22053         PR target/83399
22054         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
22055         VECTOR_MEM_ALTIVEC_OR_VSX_P.
22056         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
22057         indexed_or_indirect_operand predicate.
22058         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
22059         (*vsx_le_perm_load_v8hi): Likewise.
22060         (*vsx_le_perm_load_v16qi): Likewise.
22061         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
22062         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
22063         (*vsx_le_perm_store_v8hi): Likewise.
22064         (*vsx_le_perm_store_v16qi): Likewise.
22065         (eight unnamed splitters): Likewise.
22067 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
22069         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
22070         * config/rs6000/emmintrin.h: Likewise.
22071         * config/rs6000/mmintrin.h: Likewise.
22072         * config/rs6000/xmmintrin.h: Likewise.
22074 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
22076         PR c++/43486
22077         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
22078         "public_flag".
22079         * tree.c (tree_nop_conversion): Return true for location wrapper
22080         nodes.
22081         (maybe_wrap_with_location): New function.
22082         (selftest::check_strip_nops): New function.
22083         (selftest::test_location_wrappers): New function.
22084         (selftest::tree_c_tests): Call it.
22085         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
22086         (maybe_wrap_with_location): New decl.
22087         (EXPR_LOCATION_WRAPPER_P): New macro.
22088         (location_wrapper_p): New inline function.
22089         (tree_strip_any_location_wrapper): New inline function.
22091 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
22093         PR target/83735
22094         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
22095         stack_realign_offset for the largest alignment of stack slot
22096         actually used.
22097         (ix86_find_max_used_stack_alignment): New function.
22098         (ix86_finalize_stack_frame_flags): Use it.  Set
22099         max_used_stack_alignment if we don't realign stack.
22100         * config/i386/i386.h (machine_function): Add
22101         max_used_stack_alignment.
22103 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
22105         * config/arm/arm.opt (-mbranch-cost): New option.
22106         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
22107         account.
22109 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
22111         PR target/83629
22112         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
22113         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
22115 2018-01-10  Richard Biener  <rguenther@suse.de>
22117         PR debug/83765
22118         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
22119         early out so it also covers the case where we have a non-NULL
22120         origin.
22122 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
22124         PR tree-optimization/83753
22125         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
22126         for non-strided grouped accesses if the number of elements is 1.
22128 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
22130         PR target/81616
22131         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
22132         * i386.h (TARGET_USE_GATHER): Define.
22133         * x86-tune.def (X86_TUNE_USE_GATHER): New.
22135 2018-01-10  Martin Liska  <mliska@suse.cz>
22137         PR bootstrap/82831
22138         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
22139         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
22140         partitioning.
22141         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
22142         CLEANUP_NO_PARTITIONING is not set.
22144 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
22146         * doc/rtl.texi: Remove documentation of (const ...) wrappers
22147         for vectors, as a partial revert of r254296.
22148         * rtl.h (const_vec_p): Delete.
22149         (const_vec_duplicate_p): Don't test for vector CONSTs.
22150         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
22151         * expmed.c (make_tree): Likewise.
22153         Revert:
22154         * common.md (E, F): Use CONSTANT_P instead of checking for
22155         CONST_VECTOR.
22156         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
22157         checking for CONST_VECTOR.
22159 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
22161         PR middle-end/83575
22162         * predict.c (force_edge_cold): Handle in more sane way edges
22163         with no prediction.
22165 2018-01-09  Carl Love  <cel@us.ibm.com>
22167         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
22168         V4SI, V4SF types.
22169         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
22170         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
22171         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
22172         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
22173         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
22174         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
22175         * config/rs6000/rs6000-protos.h: Add extern defition for
22176         rs6000_generate_float2_double_code.
22177         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
22178         function.
22179         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
22180         (float2_v2df): Add define_expand.
22182 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
22184         PR target/83628
22185         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
22186         op_mode in the force_to_mode call.
22188 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
22190         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
22191         instead of checking each element individually.
22192         (aarch64_evpc_uzp): Likewise.
22193         (aarch64_evpc_zip): Likewise.
22194         (aarch64_evpc_ext): Likewise.
22195         (aarch64_evpc_rev): Likewise.
22196         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
22197         instead of checking each element individually.  Return true without
22198         generating rtl if
22199         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
22200         whether all selected elements come from the same input, instead of
22201         checking each element individually.  Remove calls to gen_rtx_REG,
22202         start_sequence and end_sequence and instead assert that no rtl is
22203         generated.
22205 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
22207         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
22208         order of HIGH and CONST checks.
22210 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
22212         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
22213         if the destination isn't an SSA_NAME.
22215 2018-01-09  Richard Biener  <rguenther@suse.de>
22217         PR tree-optimization/83668
22218         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
22219         move prologue...
22220         (canonicalize_loop_form): ... here, renamed from ...
22221         (canonicalize_loop_closed_ssa_form): ... this and amended to
22222         swap successor edges for loop exit blocks to make us use
22223         the RPO order we need for initial schedule generation.
22225 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
22227         PR tree-optimization/64811
22228         * match.pd: When optimizing comparisons with Inf, avoid
22229         introducing or losing exceptions from comparisons with NaN.
22231 2018-01-09  Martin Liska  <mliska@suse.cz>
22233         PR sanitizer/82517
22234         * asan.c (shadow_mem_size): Add gcc_assert.
22236 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
22238         Don't save registers in main().
22240         PR target/83738
22241         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
22242         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
22243         * config/avr/avr.c (avr_set_current_function): Don't error if
22244         naked, OS_task or OS_main are specified at the same time.
22245         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
22246         OS_main.
22247         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
22248         attribute.
22249         * common/config/avr/avr-common.c (avr_option_optimization_table):
22250         Switch on -mmain-is-OS_task for optimizing compilations.
22252 2018-01-09  Richard Biener  <rguenther@suse.de>
22254         PR tree-optimization/83572
22255         * graphite.c: Include cfganal.h.
22256         (graphite_transform_loops): Connect infinite loops to exit
22257         and remove fake edges at the end.
22259 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
22261         * ipa-inline.c (edge_badness): Revert accidental checkin.
22263 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
22265         PR ipa/80763
22266         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
22267         symbols; not inline clones.
22269 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
22271         PR target/83507
22272         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
22273         hard registers.  Formatting fixes.
22275         PR preprocessor/83722
22276         * gcc.c (try_generate_repro): Pass
22277         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
22278         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
22279         do_report_bug.
22281 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
22282             Kito Cheng  <kito.cheng@gmail.com>
22284         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
22285         (riscv_leaf_function_p): Delete.
22286         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
22288 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
22290         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
22291         function.
22292         (do_ifelse): New function.
22293         (do_isel): New function.
22294         (do_sub3): New function.
22295         (do_add3): New function.
22296         (do_load_mask_compare): New function.
22297         (do_overlap_load_compare): New function.
22298         (expand_compare_loop): New function.
22299         (expand_block_compare): Call expand_compare_loop() when appropriate.
22300         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
22301         option description.
22302         (-mblock-compare-inline-loop-limit): New option.
22304 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22306         PR target/83677
22307         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
22308         Reverse order of second and third operands in first alternative.
22309         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
22310         of first and second elements in UNSPEC_VPERMR vector.
22311         (altivec_expand_vec_perm_le): Likewise.
22313 2018-01-08  Jeff Law  <law@redhat.com>
22315         PR rtl-optimizatin/81308
22316         * tree-switch-conversion.c (cfg_altered): New file scoped static.
22317         (process_switch): If group_case_labels makes a change, then set
22318         cfg_altered.
22319         (pass_convert_switch::execute): If a switch is converted, then
22320         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
22322         PR rtl-optimization/81308
22323         * recog.c (split_all_insns): Conditionally cleanup the CFG after
22324         splitting insns.
22326 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
22328         PR target/83663 - Revert r255946
22329         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
22330         generation for cases where splatting a value is not useful.
22331         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
22332         across a vec_duplicate and a paradoxical subreg forming a vector
22333         mode to a vec_concat.
22335 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22337         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
22338         -march=armv8.3-a variants.
22339         * config/arm/t-multilib: Likewise.
22340         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
22342 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
22344         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
22345         to generate rtl.
22346         (cceq_ior_compare_complement): Give it a name so I can use it, and
22347         change boolean_or_operator predicate to boolean_operator so it can
22348         be used to generate a crand.
22349         (eqne): New code iterator.
22350         (bd/bd_neg): New code_attrs.
22351         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
22352         a single define_insn.
22353         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
22354         decrement (bdnzt/bdnzf/bdzt/bdzf).
22355         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
22356         with the new names of the branch decrement patterns, and added the
22357         names of the branch decrement conditional patterns.
22359 2018-01-08  Richard Biener  <rguenther@suse.de>
22361         PR tree-optimization/83563
22362         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
22363         cache.
22365 2018-01-08  Richard Biener  <rguenther@suse.de>
22367         PR middle-end/83713
22368         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
22370 2018-01-08  Richard Biener  <rguenther@suse.de>
22372         PR tree-optimization/83685
22373         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
22374         references to abnormals.
22376 2018-01-08  Richard Biener  <rguenther@suse.de>
22378         PR lto/83719
22379         * dwarf2out.c (output_indirect_strings): Handle empty
22380         skeleton_debug_str_hash.
22381         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
22383 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
22385         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
22386         (emit_store_direct): Likewise.
22387         (arc_trampoline_adjust_address): Likewise.
22388         (arc_asm_trampoline_template): New function.
22389         (arc_initialize_trampoline): Use asm_trampoline_template.
22390         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
22391         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
22392         * config/arc/arc.md (flush_icache): Delete pattern.
22394 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
22396         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
22397         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
22398         munaligned-access.
22400 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
22402         PR target/83681
22403         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
22404         by not USED_FOR_TARGET.
22405         (make_pass_resolve_sw_modes): Likewise.
22407 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
22409         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
22410         USED_FOR_TARGET.
22412 2018-01-08  Richard Biener  <rguenther@suse.de>
22414         PR middle-end/83580
22415         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
22417 2018-01-08  Richard Biener  <rguenther@suse.de>
22419         PR middle-end/83517
22420         * match.pd ((t * 2) / 2) -> t): Add missing :c.
22422 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
22424         PR middle-end/81897
22425         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
22426         basic blocks with a small number of successors.
22427         (convert_control_dep_chain_into_preds): Improve handling of
22428         forwarder blocks.
22429         (dump_predicates): Split apart into...
22430         (dump_pred_chain): ...here...
22431         (dump_pred_info): ...and here.
22432         (can_one_predicate_be_invalidated_p): Add debugging printfs.
22433         (can_chain_union_be_invalidated_p): Improve check for invalidation
22434         of paths.
22435         (uninit_uses_cannot_happen): Avoid unnecessary if
22436         convert_control_dep_chain_into_preds yielded nothing.
22438 2018-01-06  Martin Sebor  <msebor@redhat.com>
22440         PR tree-optimization/83640
22441         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
22442         subtracting negative offset from size.
22443         (builtin_access::overlap): Adjust offset bounds of the access to fall
22444         within the size of the object if possible.
22446 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
22448         PR rtl-optimization/83699
22449         * expmed.c (extract_bit_field_1): Restrict the vector usage of
22450         extract_bit_field_as_subreg to cases in which the extracted
22451         value is also a vector.
22453         * lra-constraints.c (process_alt_operands): Test for the equivalence
22454         substitutions when detecting a possible reload cycle.
22456 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
22458         PR debug/83480
22459         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
22460         by default if flag_selective_schedling{,2}.  Formatting fixes.
22462         PR rtl-optimization/83682
22463         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
22464         if it has non-VECTOR_MODE element mode.
22465         (vec_duplicate_p): Likewise.
22467         PR middle-end/83694
22468         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
22469         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
22471 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
22473         PR target/83604
22474         * config/i386/i386-builtin.def
22475         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
22476         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
22477         Require also OPTION_MASK_ISA_AVX512F in addition to
22478         OPTION_MASK_ISA_GFNI.
22479         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
22480         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
22481         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
22482         to OPTION_MASK_ISA_GFNI.
22483         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
22484         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
22485         OPTION_MASK_ISA_AVX512BW.
22486         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
22487         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
22488         addition to OPTION_MASK_ISA_GFNI.
22489         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
22490         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
22491         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
22492         to OPTION_MASK_ISA_GFNI.
22493         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
22494         a requirement for all ISAs rather than any of them with a few
22495         exceptions.
22496         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
22497         processing.
22498         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
22499         bitmasks to be enabled with 3 exceptions, instead of requiring any
22500         enabled ISA with lots of exceptions.
22501         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
22502         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
22503         Change avx512bw in isa attribute to avx512f.
22504         * config/i386/sgxintrin.h: Add license boilerplate.
22505         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
22506         to __AVX512F__ and __AVX512VL to __AVX512VL__.
22507         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
22508         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
22509         defined.
22510         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
22511         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
22512         temporarily sse2 rather than sse if not enabled already.
22514         PR target/83604
22515         * config/i386/sse.md (VI248_VLBW): Rename to ...
22516         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
22517         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
22518         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
22519         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
22520         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
22521         mode iterator instead of VI248_VLBW.
22523 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
22525         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
22526         (record_modified): Skip clobbers; add debug output.
22527         (param_change_prob): Use sreal frequencies.
22529 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
22531         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
22532         punt for user-aligned variables.
22534 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
22536         * tree-chrec.c (chrec_contains_symbols): Return true for
22537         POLY_INT_CST.
22539 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
22541         PR target/82439
22542         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
22543         of (x|y) == x for BICS pattern.
22545 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
22547         PR tree-optimization/83605
22548         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
22549         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
22550         can throw.
22552 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
22554         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
22555         * config/epiphany/rtems.h: New file.
22557 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
22558             Uros Bizjak  <ubizjak@gmail.com>
22560         PR target/83554
22561         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
22562         QIreg_operand instead of register_operand predicate.
22563         * config/i386/i386.c (ix86_rop_should_change_byte_p,
22564         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
22565         comments instead of -fmitigate[-_]rop.
22567 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22569         PR bootstrap/81926
22570         * cgraphunit.c (symbol_table::compile): Switch to text_section
22571         before calling assembly_start debug hook.
22572         * run-rtl-passes.c (run_rtl_passes): Likewise.
22573         Include output.h.
22575 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
22577         * tree-vrp.c (extract_range_from_binary_expr_1): Check
22578         range_int_cst_p rather than !symbolic_range_p before calling
22579         extract_range_from_multiplicative_op_1.
22581 2018-01-04  Jeff Law  <law@redhat.com>
22583         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
22584         redundant test in assertion.
22586 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
22588         * doc/rtl.texi: Document machine_mode wrapper classes.
22590 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
22592         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
22593         using tree_to_uhwi.
22595 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
22597         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
22598         the VEC_PERM_EXPR fold to fail.
22600 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
22602         PR debug/83585
22603         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
22604         to switched_sections.
22606 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
22608         PR target/83680
22609         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
22610         test for d.testing.
22612 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
22614         PR target/83387
22615         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
22616         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
22618 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
22620         PR debug/83666
22621         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
22622         is BLKmode and bitpos not zero or mode change is needed.
22624 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
22626         PR target/83675
22627         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
22628         TARGET_VIS2.
22630 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
22632         PR target/83628
22633         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
22634         instead of MULT rtx.  Update all corresponding splitters.
22635         (*saddl_se): Ditto.
22636         (*ssub<modesuffix>): Ditto.
22637         (*ssubl_se): Ditto.
22638         (*cmp_sadd_di): Update split patterns.
22639         (*cmp_sadd_si): Ditto.
22640         (*cmp_sadd_sidi): Ditto.
22641         (*cmp_ssub_di): Ditto.
22642         (*cmp_ssub_si): Ditto.
22643         (*cmp_ssub_sidi): Ditto.
22644         * config/alpha/predicates.md (const23_operand): New predicate.
22645         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
22646         Look for ASHIFT, not MULT inner operand.
22647         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
22649 2018-01-04  Martin Liska  <mliska@suse.cz>
22651         PR gcov-profile/83669
22652         * gcov.c (output_intermediate_file): Add version to intermediate
22653         gcov file.
22654         * doc/gcov.texi: Document new field 'version' in intermediate
22655         file format. Fix location of '-k' option of gcov command.
22657 2018-01-04  Martin Liska  <mliska@suse.cz>
22659         PR ipa/82352
22660         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
22662 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
22664         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
22666 2018-01-03  Martin Sebor  <msebor@redhat.com>
22668         PR tree-optimization/83655
22669         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
22670         checking calls with invalid arguments.
22672 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22674         * tree-vect-stmts.c (vect_get_store_rhs): New function.
22675         (vectorizable_mask_load_store): Delete.
22676         (vectorizable_call): Return false for masked loads and stores.
22677         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
22678         instead of gimple_assign_rhs1.
22679         (vectorizable_load): Handle IFN_MASK_LOAD.
22680         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
22682 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22684         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
22685         split out from..,
22686         (vectorizable_mask_load_store): ...here.
22687         (vectorizable_load): ...and here.
22689 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22691         * tree-vect-stmts.c (vect_build_all_ones_mask)
22692         (vect_build_zero_merge_argument): New functions, split out from...
22693         (vectorizable_load): ...here.
22695 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22697         * tree-vect-stmts.c (vect_check_store_rhs): New function,
22698         split out from...
22699         (vectorizable_mask_load_store): ...here.
22700         (vectorizable_store): ...and here.
22702 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22704         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
22705         split out from...
22706         (vectorizable_mask_load_store): ...here.
22708 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22710         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
22711         (vect_model_store_cost): Take a vec_load_store_type instead of a
22712         vect_def_type.
22713         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
22714         (vect_model_store_cost): Take a vec_load_store_type instead of a
22715         vect_def_type.
22716         (vectorizable_mask_load_store): Update accordingly.
22717         (vectorizable_store): Likewise.
22718         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
22720 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22722         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
22723         IFN_MASK_LOAD calls here rather than...
22724         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
22726 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22727             Alan Hayward  <alan.hayward@arm.com>
22728             David Sherwood  <david.sherwood@arm.com>
22730         * expmed.c (extract_bit_field_1): For vector extracts,
22731         fall back to extract_bit_field_as_subreg if vec_extract
22732         isn't available.
22734 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22735             Alan Hayward  <alan.hayward@arm.com>
22736             David Sherwood  <david.sherwood@arm.com>
22738         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
22739         they are variable or constant sized.
22740         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
22741         slots for constant-sized data.
22743 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22744             Alan Hayward  <alan.hayward@arm.com>
22745             David Sherwood  <david.sherwood@arm.com>
22747         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
22748         handling COND_EXPRs with boolean comparisons, try to find a better
22749         basis for the mask type than the boolean itself.
22751 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22753         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
22754         is calculated and how it can be overridden.
22755         * genmodes.c (max_bitsize_mode_any_mode): New variable.
22756         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
22757         if defined.
22758         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
22759         if nonzero.
22761 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22762             Alan Hayward  <alan.hayward@arm.com>
22763             David Sherwood  <david.sherwood@arm.com>
22765         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
22766         Remove the mode argument.
22767         (aarch64_simd_valid_immediate): Remove the mode and inverse
22768         arguments.
22769         * config/aarch64/iterators.md (bitsize): New iterator.
22770         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
22771         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
22772         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
22773         aarch64_simd_valid_immediate.
22774         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
22775         (aarch64_reg_or_bic_imm): Likewise.
22776         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
22777         with an insn_type enum and msl with a modifier_type enum.
22778         Replace element_width with a scalar_mode.  Change the shift
22779         to unsigned int.  Add constructors for scalar_float_mode and
22780         scalar_int_mode elements.
22781         (aarch64_vect_float_const_representable_p): Delete.
22782         (aarch64_can_const_movi_rtx_p)
22783         (aarch64_simd_scalar_immediate_valid_for_move)
22784         (aarch64_simd_make_constant): Update call to
22785         aarch64_simd_valid_immediate.
22786         (aarch64_advsimd_valid_immediate_hs): New function.
22787         (aarch64_advsimd_valid_immediate): Likewise.
22788         (aarch64_simd_valid_immediate): Remove mode and inverse
22789         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
22790         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
22791         and aarch64_float_const_representable_p on the result.
22792         (aarch64_output_simd_mov_immediate): Remove mode argument.
22793         Update call to aarch64_simd_valid_immediate and use of
22794         simd_immediate_info.
22795         (aarch64_output_scalar_simd_mov_immediate): Update call
22796         accordingly.
22798 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22799             Alan Hayward  <alan.hayward@arm.com>
22800             David Sherwood  <david.sherwood@arm.com>
22802         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
22803         (mode_nunits): Likewise CONST_MODE_NUNITS.
22804         * machmode.def (ADJUST_NUNITS): Document.
22805         * genmodes.c (mode_data::need_nunits_adj): New field.
22806         (blank_mode): Update accordingly.
22807         (adj_nunits): New variable.
22808         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
22809         parameter.
22810         (emit_mode_size_inline): Set need_bytesize_adj for all modes
22811         listed in adj_nunits.
22812         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
22813         listed in adj_nunits.  Don't emit case statements for such modes.
22814         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
22815         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
22816         nothing if adj_nunits is nonnull.
22817         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
22818         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
22819         (emit_mode_fbit): Update use of print_maybe_const_decl.
22820         (emit_move_size): Likewise.  Treat the array as non-const
22821         if adj_nunits.
22822         (emit_mode_adjustments): Handle adj_nunits.
22824 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22826         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
22827         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
22828         (VECTOR_MODES): Use it.
22829         (make_vector_modes): Take the prefix as an argument.
22831 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22832             Alan Hayward  <alan.hayward@arm.com>
22833             David Sherwood  <david.sherwood@arm.com>
22835         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
22836         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
22837         for MODE_VECTOR_BOOL.
22838         * machmode.def (VECTOR_BOOL_MODE): Document.
22839         * genmodes.c (VECTOR_BOOL_MODE): New macro.
22840         (make_vector_bool_mode): New function.
22841         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
22842         MODE_VECTOR_BOOL.
22843         * lto-streamer-in.c (lto_input_mode_table): Likewise.
22844         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
22845         Likewise.
22846         * stor-layout.c (int_mode_for_mode): Likewise.
22847         * tree.c (build_vector_type_for_mode): Likewise.
22848         * varasm.c (output_constant_pool_2): Likewise.
22849         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
22850         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
22851         for MODE_VECTOR_BOOL.
22852         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
22853         of mode class checks.
22854         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
22855         instead of a list of mode class checks.
22856         (expand_vector_scalar_condition): Likewise.
22857         (type_for_widest_vector_mode): Handle BImode as an inner mode.
22859 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22860             Alan Hayward  <alan.hayward@arm.com>
22861             David Sherwood  <david.sherwood@arm.com>
22863         * machmode.h (mode_size): Change from unsigned short to
22864         poly_uint16_pod.
22865         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
22866         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
22867         or if measurement_type is not polynomial.
22868         (fixed_size_mode::includes_p): Check for constant-sized modes.
22869         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
22870         return a poly_uint16 rather than an unsigned short.
22871         (emit_mode_size): Change the type of mode_size from unsigned short
22872         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
22873         (emit_mode_adjustments): Cope with polynomial vector sizes.
22874         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22875         for GET_MODE_SIZE.
22876         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22877         for GET_MODE_SIZE.
22878         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
22879         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
22880         * caller-save.c (setup_save_areas): Likewise.
22881         (replace_reg_with_saved_mem): Likewise.
22882         * calls.c (emit_library_call_value_1): Likewise.
22883         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
22884         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
22885         (gen_lowpart_for_combine): Likewise.
22886         * convert.c (convert_to_integer_1): Likewise.
22887         * cse.c (equiv_constant, cse_insn): Likewise.
22888         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
22889         (cselib_subst_to_values): Likewise.
22890         * dce.c (word_dce_process_block): Likewise.
22891         * df-problems.c (df_word_lr_mark_ref): Likewise.
22892         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
22893         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
22894         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
22895         (rtl_for_decl_location): Likewise.
22896         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
22897         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
22898         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
22899         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
22900         (expand_expr_real_1): Likewise.
22901         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
22902         (pad_below): Likewise.
22903         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
22904         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
22905         * ira.c (get_subreg_tracking_sizes): Likewise.
22906         * ira-build.c (ira_create_allocno_objects): Likewise.
22907         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
22908         (ira_sort_regnos_for_alter_reg): Likewise.
22909         * ira-costs.c (record_operand_costs): Likewise.
22910         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
22911         (resolve_simple_move): Likewise.
22912         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
22913         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
22914         (lra_constraints): Likewise.
22915         (CONST_POOL_OK_P): Reject variable-sized modes.
22916         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
22917         (add_pseudo_to_slot, lra_spill): Likewise.
22918         * omp-low.c (omp_clause_aligned_alignment): Likewise.
22919         * optabs-query.c (get_best_extraction_insn): Likewise.
22920         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
22921         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
22922         (expand_mult_highpart, valid_multiword_target_p): Likewise.
22923         * recog.c (offsettable_address_addr_space_p): Likewise.
22924         * regcprop.c (maybe_mode_change): Likewise.
22925         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
22926         * regrename.c (build_def_use): Likewise.
22927         * regstat.c (dump_reg_info): Likewise.
22928         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
22929         (find_reloads, find_reloads_subreg_address): Likewise.
22930         * reload1.c (eliminate_regs_1): Likewise.
22931         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
22932         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
22933         (simplify_binary_operation_1, simplify_subreg): Likewise.
22934         * targhooks.c (default_function_arg_padding): Likewise.
22935         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
22936         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
22937         (verify_gimple_assign_ternary): Likewise.
22938         * tree-inline.c (estimate_move_cost): Likewise.
22939         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22940         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
22941         (get_address_cost_ainc): Likewise.
22942         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
22943         (vect_supportable_dr_alignment): Likewise.
22944         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
22945         (vectorizable_reduction): Likewise.
22946         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
22947         (vectorizable_operation, vectorizable_load): Likewise.
22948         * tree.c (build_same_sized_truth_vector_type): Likewise.
22949         * valtrack.c (cleanup_auto_inc_dec): Likewise.
22950         * var-tracking.c (emit_note_insn_var_location): Likewise.
22951         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
22952         (ADDR_VEC_ALIGN): Likewise.
22954 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22955             Alan Hayward  <alan.hayward@arm.com>
22956             David Sherwood  <david.sherwood@arm.com>
22958         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
22959         unsigned short.
22960         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
22961         or if measurement_type is polynomial.
22962         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
22963         * combine.c (make_extraction): Likewise.
22964         * dse.c (find_shift_sequence): Likewise.
22965         * dwarf2out.c (mem_loc_descriptor): Likewise.
22966         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
22967         (extract_bit_field, extract_low_bits): Likewise.
22968         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
22969         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
22970         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
22971         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
22972         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
22973         * reload.c (find_reloads): Likewise.
22974         * reload1.c (alter_reg): Likewise.
22975         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
22976         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
22977         * tree-if-conv.c (predicate_mem_writes): Likewise.
22978         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
22979         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
22980         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
22981         * valtrack.c (dead_debug_insert_temp): Likewise.
22982         * varasm.c (mergeable_constant_section): Likewise.
22983         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
22985 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22986             Alan Hayward  <alan.hayward@arm.com>
22987             David Sherwood  <david.sherwood@arm.com>
22989         * expr.c (expand_assignment): Cope with polynomial mode sizes
22990         when assigning to a CONCAT.
22992 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22993             Alan Hayward  <alan.hayward@arm.com>
22994             David Sherwood  <david.sherwood@arm.com>
22996         * machmode.h (mode_precision): Change from unsigned short to
22997         poly_uint16_pod.
22998         (mode_to_precision): Return a poly_uint16 rather than an unsigned
22999         short.
23000         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
23001         or if measurement_type is not polynomial.
23002         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
23003         in which the mode is already known to be a scalar_int_mode.
23004         * genmodes.c (emit_mode_precision): Change the type of mode_precision
23005         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
23006         initializer.
23007         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23008         for GET_MODE_PRECISION.
23009         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23010         for GET_MODE_PRECISION.
23011         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
23012         as polynomial.
23013         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
23014         (expand_field_assignment, make_extraction): Likewise.
23015         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
23016         (get_last_value): Likewise.
23017         * convert.c (convert_to_integer_1): Likewise.
23018         * cse.c (cse_insn): Likewise.
23019         * expr.c (expand_expr_real_1): Likewise.
23020         * lra-constraints.c (simplify_operand_subreg): Likewise.
23021         * optabs-query.c (can_atomic_load_p): Likewise.
23022         * optabs.c (expand_atomic_load): Likewise.
23023         (expand_atomic_store): Likewise.
23024         * ree.c (combine_reaching_defs): Likewise.
23025         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
23026         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
23027         * tree.h (type_has_mode_precision_p): Likewise.
23028         * ubsan.c (instrument_si_overflow): Likewise.
23030 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23031             Alan Hayward  <alan.hayward@arm.com>
23032             David Sherwood  <david.sherwood@arm.com>
23034         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
23035         polynomial numbers of units.
23036         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
23037         (valid_vector_subparts_p): New function.
23038         (build_vector_type): Remove temporary shim and take the number
23039         of units as a poly_uint64 rather than an int.
23040         (build_opaque_vector_type): Take the number of units as a
23041         poly_uint64 rather than an int.
23042         * tree.c (build_vector_from_ctor): Handle polynomial
23043         TYPE_VECTOR_SUBPARTS.
23044         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
23045         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
23046         (build_vector_from_val): If the number of units is variable,
23047         use build_vec_duplicate_cst for constant operands and
23048         VEC_DUPLICATE_EXPR otherwise.
23049         (make_vector_type): Remove temporary is_constant ().
23050         (build_vector_type, build_opaque_vector_type): Take the number of
23051         units as a poly_uint64 rather than an int.
23052         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
23053         VECTOR_CST_NELTS.
23054         * cfgexpand.c (expand_debug_expr): Likewise.
23055         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
23056         (store_constructor, expand_expr_real_1): Likewise.
23057         (const_scalar_mask_from_tree): Likewise.
23058         * fold-const-call.c (fold_const_reduction): Likewise.
23059         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
23060         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
23061         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
23062         (fold_relational_const): Likewise.
23063         (native_interpret_vector): Likewise.  Change the size from an
23064         int to an unsigned int.
23065         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
23066         TYPE_VECTOR_SUBPARTS.
23067         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
23068         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
23069         duplicating a non-constant operand into a variable-length vector.
23070         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
23071         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
23072         * ipa-icf.c (sem_variable::equals): Likewise.
23073         * match.pd: Likewise.
23074         * omp-simd-clone.c (simd_clone_subparts): Likewise.
23075         * print-tree.c (print_node): Likewise.
23076         * stor-layout.c (layout_type): Likewise.
23077         * targhooks.c (default_builtin_vectorization_cost): Likewise.
23078         * tree-cfg.c (verify_gimple_comparison): Likewise.
23079         (verify_gimple_assign_binary): Likewise.
23080         (verify_gimple_assign_ternary): Likewise.
23081         (verify_gimple_assign_single): Likewise.
23082         * tree-pretty-print.c (dump_generic_node): Likewise.
23083         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23084         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
23085         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
23086         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
23087         (vect_shift_permute_load_chain): Likewise.
23088         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
23089         (expand_vector_condition, optimize_vector_constructor): Likewise.
23090         (lower_vec_perm, get_compute_type): Likewise.
23091         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
23092         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
23093         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
23094         (vect_recog_mask_conversion_pattern): Likewise.
23095         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
23096         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
23097         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23098         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
23099         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
23100         (vectorizable_shift, vectorizable_operation, vectorizable_store)
23101         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
23102         (supportable_widening_operation): Likewise.
23103         (supportable_narrowing_operation): Likewise.
23104         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
23105         Likewise.
23106         * varasm.c (output_constant): Likewise.
23108 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23109             Alan Hayward  <alan.hayward@arm.com>
23110             David Sherwood  <david.sherwood@arm.com>
23112         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
23113         so that both the length == 3 and length != 3 cases set up their
23114         own permute vectors.  Add comments explaining why we know the
23115         number of elements is constant.
23116         (vect_permute_load_chain): Likewise.
23118 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23119             Alan Hayward  <alan.hayward@arm.com>
23120             David Sherwood  <david.sherwood@arm.com>
23122         * machmode.h (mode_nunits): Change from unsigned char to
23123         poly_uint16_pod.
23124         (ONLY_FIXED_SIZE_MODES): New macro.
23125         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
23126         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
23127         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
23128         New typedefs.
23129         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
23130         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
23131         or if measurement_type is not polynomial.
23132         * genmodes.c (ZERO_COEFFS): New macro.
23133         (emit_mode_nunits_inline): Make mode_nunits_inline return a
23134         poly_uint16.
23135         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
23136         Use ZERO_COEFFS when emitting initializers.
23137         * data-streamer.h (bp_pack_poly_value): New function.
23138         (bp_unpack_poly_value): Likewise.
23139         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23140         for GET_MODE_NUNITS.
23141         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23142         for GET_MODE_NUNITS.
23143         * tree.c (make_vector_type): Remove temporary shim and make
23144         the real function take the number of units as a poly_uint64
23145         rather than an int.
23146         (build_vector_type_for_mode): Handle polynomial nunits.
23147         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
23148         * emit-rtl.c (const_vec_series_p_1): Likewise.
23149         (gen_rtx_CONST_VECTOR): Likewise.
23150         * fold-const.c (test_vec_duplicate_folding): Likewise.
23151         * genrecog.c (validate_pattern): Likewise.
23152         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
23153         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
23154         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
23155         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
23156         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
23157         * rtlanal.c (subreg_get_info): Likewise.
23158         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23159         (vect_grouped_load_supported): Likewise.
23160         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
23161         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
23162         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
23163         (simplify_const_unary_operation, simplify_binary_operation_1)
23164         (simplify_const_binary_operation, simplify_ternary_operation)
23165         (test_vector_ops_duplicate, test_vector_ops): Likewise.
23166         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
23167         instead of CONST_VECTOR_NUNITS.
23168         * varasm.c (output_constant_pool_2): Likewise.
23169         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
23170         explicit-encoded elements in the XVEC for variable-length vectors.
23172 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23174         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
23176 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23177             Alan Hayward  <alan.hayward@arm.com>
23178             David Sherwood  <david.sherwood@arm.com>
23180         * coretypes.h (fixed_size_mode): Declare.
23181         (fixed_size_mode_pod): New typedef.
23182         * builtins.h (target_builtins::x_apply_args_mode)
23183         (target_builtins::x_apply_result_mode): Change type to
23184         fixed_size_mode_pod.
23185         * builtins.c (apply_args_size, apply_result_size, result_vector)
23186         (expand_builtin_apply_args_1, expand_builtin_apply)
23187         (expand_builtin_return): Update accordingly.
23189 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23191         * cse.c (hash_rtx_cb): Hash only the encoded elements.
23192         * cselib.c (cselib_hash_rtx): Likewise.
23193         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
23194         CONST_VECTOR encoding.
23196 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
23197             Jeff Law  <law@redhat.com>
23199         PR target/83641
23200         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
23201         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
23202         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
23203         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
23205         PR target/83641
23206         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
23207         explicitly probe *sp in a noreturn function if there were any callee
23208         register saves or frame pointer is needed.
23210 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
23212         PR debug/83621
23213         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
23214         BLKmode for ternary, binary or unary expressions.
23216         PR debug/83645
23217         * var-tracking.c (delete_vta_debug_insn): New inline function.
23218         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
23219         insns from get_insns () to NULL instead of each bb separately.
23220         Use delete_vta_debug_insn.  No longer static.
23221         (vt_debug_insns_local, variable_tracking_main_1): Adjust
23222         delete_vta_debug_insns callers.
23223         * rtl.h (delete_vta_debug_insns): Declare.
23224         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
23225         instead of variable_tracking_main.
23227 2018-01-03  Martin Sebor  <msebor@redhat.com>
23229         PR tree-optimization/83603
23230         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
23231         arguments past the endof the argument list in functions declared
23232         without a prototype.
23233         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
23234         Avoid checking when arguments are null.
23236 2018-01-03  Martin Sebor  <msebor@redhat.com>
23238         PR c/83559
23239         * doc/extend.texi (attribute const): Fix a typo.
23240         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
23241         issuing -Wsuggest-attribute for void functions.
23243 2018-01-03  Martin Sebor  <msebor@redhat.com>
23245         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
23246         offset_int::from instead of wide_int::to_shwi.
23247         (maybe_diag_overlap): Remove assertion.
23248         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
23249         * gimple-ssa-sprintf.c (format_directive): Same.
23250         (parse_directive): Same.
23251         (sprintf_dom_walker::compute_format_length): Same.
23252         (try_substitute_return_value): Same.
23254 2018-01-03  Jeff Law  <law@redhat.com>
23256         PR middle-end/83654
23257         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
23258         non-constant residual for zero at runtime and avoid probing in
23259         that case.  Reorganize code for trailing problem to mirror handling
23260         of the residual.
23262 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
23264         PR tree-optimization/83501
23265         * tree-ssa-strlen.c (get_string_cst): New.
23266         (handle_char_store): Call get_string_cst.
23268 2018-01-03  Martin Liska  <mliska@suse.cz>
23270         PR tree-optimization/83593
23271         * tree-ssa-strlen.c: Include tree-cfg.h.
23272         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
23273         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
23274         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
23275         to false.
23276         (strlen_dom_walker::before_dom_children): Call
23277         gimple_purge_dead_eh_edges. Dump tranformation with details
23278         dump flags.
23279         (strlen_dom_walker::before_dom_children): Update call by adding
23280         new argument cleanup_eh.
23281         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
23283 2018-01-03  Martin Liska  <mliska@suse.cz>
23285         PR ipa/83549
23286         * cif-code.def (VARIADIC_THUNK): New enum value.
23287         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
23288         thunks.
23290 2018-01-03  Jan Beulich  <jbeulich@suse.com>
23292         * sse.md (mov<mode>_internal): Tighten condition for when to use
23293         vmovdqu<ssescalarsize> for TI and OI modes.
23295 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
23297         Update copyright years.
23299 2018-01-03  Martin Liska  <mliska@suse.cz>
23301         PR ipa/83594
23302         * ipa-visibility.c (function_and_variable_visibility): Skip
23303         functions with noipa attribure.
23305 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
23307         * gcc.c (process_command): Update copyright notice dates.
23308         * gcov-dump.c (print_version): Ditto.
23309         * gcov.c (print_version): Ditto.
23310         * gcov-tool.c (print_version): Ditto.
23311         * gengtype.c (create_file): Ditto.
23312         * doc/cpp.texi: Bump @copying's copyright year.
23313         * doc/cppinternals.texi: Ditto.
23314         * doc/gcc.texi: Ditto.
23315         * doc/gccint.texi: Ditto.
23316         * doc/gcov.texi: Ditto.
23317         * doc/install.texi: Ditto.
23318         * doc/invoke.texi: Ditto.
23320 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23322         * vector-builder.h (vector_builder::m_full_nelts): Change from
23323         unsigned int to poly_uint64.
23324         (vector_builder::full_nelts): Update prototype accordingly.
23325         (vector_builder::new_vector): Likewise.
23326         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
23327         (vector_builder::operator ==): Likewise.
23328         (vector_builder::finalize): Likewise.
23329         * int-vector-builder.h (int_vector_builder::int_vector_builder):
23330         Take the number of elements as a poly_uint64 rather than an
23331         unsigned int.
23332         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
23333         from unsigned int to poly_uint64.
23334         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
23335         (vec_perm_indices::new_vector): Likewise.
23336         (vec_perm_indices::length): Likewise.
23337         (vec_perm_indices::nelts_per_input): Likewise.
23338         (vec_perm_indices::input_nelts): Likewise.
23339         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
23340         number of elements per input as a poly_uint64 rather than an
23341         unsigned int.  Use the original encoding for variable-length
23342         vectors, rather than clamping each individual element.
23343         For the second and subsequent elements in each pattern,
23344         clamp the step and base before clamping their sum.
23345         (vec_perm_indices::series_p): Handle polynomial element counts.
23346         (vec_perm_indices::all_in_range_p): Likewise.
23347         (vec_perm_indices_to_tree): Likewise.
23348         (vec_perm_indices_to_rtx): Likewise.
23349         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
23350         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
23351         (tree_vector_builder::new_binary_operation): Handle polynomial
23352         element counts.  Return false if we need to know the number
23353         of elements at compile time.
23354         * fold-const.c (fold_vec_perm): Punt if the number of elements
23355         isn't known at compile time.
23357 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23359         * vec-perm-indices.h (vec_perm_builder): Change element type
23360         from HOST_WIDE_INT to poly_int64.
23361         (vec_perm_indices::element_type): Update accordingly.
23362         (vec_perm_indices::clamp): Handle polynomial element_types.
23363         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
23364         (vec_perm_indices::all_in_range_p): Likewise.
23365         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
23366         than shwi trees.
23367         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
23368         polynomial vec_perm_indices element types.
23369         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
23370         * fold-const.c (fold_vec_perm): Likewise.
23371         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
23372         * tree-vect-generic.c (lower_vec_perm): Likewise.
23373         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
23374         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
23375         element type to HOST_WIDE_INT.
23377 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23378             Alan Hayward  <alan.hayward@arm.com>
23379             David Sherwood  <david.sherwood@arm.com>
23381         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
23382         rather than an int.  Use plus_constant.
23383         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
23384         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
23386 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23387             Alan Hayward  <alan.hayward@arm.com>
23388             David Sherwood  <david.sherwood@arm.com>
23390         * calls.c (emit_call_1, expand_call): Change struct_value_size from
23391         a HOST_WIDE_INT to a poly_int64.
23393 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23394             Alan Hayward  <alan.hayward@arm.com>
23395             David Sherwood  <david.sherwood@arm.com>
23397         * calls.c (load_register_parameters): Cope with polynomial
23398         mode sizes.  Require a constant size for BLKmode parameters
23399         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
23400         forces a parameter to be padded at the lsb end in order to
23401         fill a complete number of words, require the parameter size
23402         to be ordered wrt UNITS_PER_WORD.
23404 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23405             Alan Hayward  <alan.hayward@arm.com>
23406             David Sherwood  <david.sherwood@arm.com>
23408         * reload1.c (spill_stack_slot_width): Change element type
23409         from unsigned int to poly_uint64_pod.
23410         (alter_reg): Treat mode sizes as polynomial.
23412 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23413             Alan Hayward  <alan.hayward@arm.com>
23414             David Sherwood  <david.sherwood@arm.com>
23416         * reload.c (complex_word_subreg_p): New function.
23417         (reload_inner_reg_of_subreg, push_reload): Use it.
23419 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23420             Alan Hayward  <alan.hayward@arm.com>
23421             David Sherwood  <david.sherwood@arm.com>
23423         * lra-constraints.c (process_alt_operands): Reject matched
23424         operands whose sizes aren't ordered.
23425         (match_reload): Refer to this check here.
23427 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23428             Alan Hayward  <alan.hayward@arm.com>
23429             David Sherwood  <david.sherwood@arm.com>
23431         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
23432         that the mode size is in the set {1, 2, 4, 8, 16}.
23434 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23435             Alan Hayward  <alan.hayward@arm.com>
23436             David Sherwood  <david.sherwood@arm.com>
23438         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
23439         Use plus_constant instead of gen_rtx_PLUS.
23441 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23442             Alan Hayward  <alan.hayward@arm.com>
23443             David Sherwood  <david.sherwood@arm.com>
23445         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
23446         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
23447         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
23448         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
23449         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
23450         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
23451         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
23452         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
23453         * config/i386/i386.c (ix86_push_rounding): ...this new function.
23454         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
23455         a poly_int64.
23456         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
23457         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
23458         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
23459         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
23460         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
23461         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
23462         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
23463         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
23464         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
23465         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
23466         function.
23467         * expr.c (emit_move_resolve_push): Treat the input and result
23468         of PUSH_ROUNDING as a poly_int64.
23469         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
23470         (emit_push_insn): Likewise.
23471         * lra-eliminations.c (mark_not_eliminable): Likewise.
23472         * recog.c (push_operand): Likewise.
23473         * reload1.c (elimination_effects): Likewise.
23474         * rtlanal.c (nonzero_bits1): Likewise.
23475         * calls.c (store_one_arg): Likewise.  Require the padding to be
23476         known at compile time.
23478 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23479             Alan Hayward  <alan.hayward@arm.com>
23480             David Sherwood  <david.sherwood@arm.com>
23482         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
23483         Use plus_constant instead of gen_rtx_PLUS.
23485 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23486             Alan Hayward  <alan.hayward@arm.com>
23487             David Sherwood  <david.sherwood@arm.com>
23489         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
23490         rather than an int.
23492 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23493             Alan Hayward  <alan.hayward@arm.com>
23494             David Sherwood  <david.sherwood@arm.com>
23496         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
23497         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
23498         via stack temporaries.  Treat the mode size as polynomial too.
23500 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23501             Alan Hayward  <alan.hayward@arm.com>
23502             David Sherwood  <david.sherwood@arm.com>
23504         * expr.c (expand_expr_real_2): When handling conversions involving
23505         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
23506         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
23507         as a poly_uint64 too.
23509 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23510             Alan Hayward  <alan.hayward@arm.com>
23511             David Sherwood  <david.sherwood@arm.com>
23513         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
23515 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23516             Alan Hayward  <alan.hayward@arm.com>
23517             David Sherwood  <david.sherwood@arm.com>
23519         * combine.c (can_change_dest_mode): Handle polynomial
23520         REGMODE_NATURAL_SIZE.
23521         * expmed.c (store_bit_field_1): Likewise.
23522         * expr.c (store_constructor): Likewise.
23523         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
23524         and polynomial REGMODE_NATURAL_SIZE.
23525         (gen_lowpart_common): Likewise.
23526         * reginfo.c (record_subregs_of_mode): Likewise.
23527         * rtlanal.c (read_modify_subreg_p): Likewise.
23529 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23530             Alan Hayward  <alan.hayward@arm.com>
23531             David Sherwood  <david.sherwood@arm.com>
23533         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
23534         numbers of elements.
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         * match.pd: Cope with polynomial numbers of vector elements.
23542 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23543             Alan Hayward  <alan.hayward@arm.com>
23544             David Sherwood  <david.sherwood@arm.com>
23546         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
23547         in a POINTER_PLUS_EXPR.
23549 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23550             Alan Hayward  <alan.hayward@arm.com>
23551             David Sherwood  <david.sherwood@arm.com>
23553         * omp-simd-clone.c (simd_clone_subparts): New function.
23554         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
23555         (ipa_simd_modify_function_body): Likewise.
23557 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23558             Alan Hayward  <alan.hayward@arm.com>
23559             David Sherwood  <david.sherwood@arm.com>
23561         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
23562         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
23563         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
23564         (expand_vector_condition, vector_element): Likewise.
23565         (subparts_gt): New function.
23566         (get_compute_type): Use subparts_gt.
23567         (count_type_subparts): Delete.
23568         (expand_vector_operations_1): Use subparts_gt instead of
23569         count_type_subparts.
23571 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23572             Alan Hayward  <alan.hayward@arm.com>
23573             David Sherwood  <david.sherwood@arm.com>
23575         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
23576         (vect_compile_time_alias): ...this new function.  Do the calculation
23577         on poly_ints rather than trees.
23578         (vect_prune_runtime_alias_test_list): Update call accordingly.
23580 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23581             Alan Hayward  <alan.hayward@arm.com>
23582             David Sherwood  <david.sherwood@arm.com>
23584         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
23585         numbers of units.
23586         (vect_schedule_slp_instance): Likewise.
23588 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23589             Alan Hayward  <alan.hayward@arm.com>
23590             David Sherwood  <david.sherwood@arm.com>
23592         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
23593         constant and extern definitions for variable-length vectors.
23594         (vect_get_constant_vectors): Note that the number of units
23595         is known to be constant.
23597 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23598             Alan Hayward  <alan.hayward@arm.com>
23599             David Sherwood  <david.sherwood@arm.com>
23601         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
23602         of units as polynomial.  Choose between WIDE and NARROW based
23603         on multiple_p.
23605 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23606             Alan Hayward  <alan.hayward@arm.com>
23607             David Sherwood  <david.sherwood@arm.com>
23609         * tree-vect-stmts.c (simd_clone_subparts): New function.
23610         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
23612 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23613             Alan Hayward  <alan.hayward@arm.com>
23614             David Sherwood  <david.sherwood@arm.com>
23616         * tree-vect-stmts.c (vectorizable_call): Treat the number of
23617         vectors as polynomial.  Use build_index_vector for
23618         IFN_GOMP_SIMD_LANE.
23620 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23621             Alan Hayward  <alan.hayward@arm.com>
23622             David Sherwood  <david.sherwood@arm.com>
23624         * tree-vect-stmts.c (get_load_store_type): Treat the number of
23625         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
23626         for variable-length vectors.
23627         (vectorizable_mask_load_store): Treat the number of units as
23628         polynomial, asserting that it is constant if the condition has
23629         already been enforced.
23630         (vectorizable_store, vectorizable_load): Likewise.
23632 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23633             Alan Hayward  <alan.hayward@arm.com>
23634             David Sherwood  <david.sherwood@arm.com>
23636         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
23637         of units as polynomial.  Punt if we can't tell at compile time
23638         which vector contains the final result.
23640 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23641             Alan Hayward  <alan.hayward@arm.com>
23642             David Sherwood  <david.sherwood@arm.com>
23644         * tree-vect-loop.c (vectorizable_induction): Treat the number
23645         of units as polynomial.  Punt on SLP inductions.  Use an integer
23646         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
23647         cast of such a series for variable-length floating-point
23648         reductions.
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         * tree.h (build_index_vector): Declare.
23655         * tree.c (build_index_vector): New function.
23656         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
23657         of units as polynomial, forcibly converting it to a constant if
23658         vectorizable_reduction has already enforced the condition.
23659         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
23660         to create a {1,2,3,...} vector.
23661         (vectorizable_reduction): Treat the number of units as polynomial.
23662         Choose vectype_in based on the largest scalar element size rather
23663         than the smallest number of units.  Enforce the restrictions
23664         relied on above.
23666 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23667             Alan Hayward  <alan.hayward@arm.com>
23668             David Sherwood  <david.sherwood@arm.com>
23670         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
23671         number of units as polynomial.
23673 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23674             Alan Hayward  <alan.hayward@arm.com>
23675             David Sherwood  <david.sherwood@arm.com>
23677         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
23678         * target.def (autovectorize_vector_sizes): Return the vector sizes
23679         by pointer, using vector_sizes rather than a bitmask.
23680         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
23681         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
23682         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
23683         Likewise.
23684         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
23685         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
23686         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
23687         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
23688         * omp-general.c (omp_max_vf): Likewise.
23689         * omp-low.c (omp_clause_aligned_alignment): Likewise.
23690         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
23691         * tree-vect-loop.c (vect_analyze_loop): Likewise.
23692         * tree-vect-slp.c (vect_slp_bb): Likewise.
23693         * doc/tm.texi: Regenerate.
23694         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
23695         to a poly_uint64.
23696         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
23697         the vector size as a poly_uint64 rather than an unsigned int.
23698         (current_vector_size): Change from an unsigned int to a poly_uint64.
23699         (get_vectype_for_scalar_type): Update accordingly.
23700         * tree.h (build_truth_vector_type): Take the size and number of
23701         units as a poly_uint64 rather than an unsigned int.
23702         (build_vector_type): Add a temporary overload that takes
23703         the number of units as a poly_uint64 rather than an unsigned int.
23704         * tree.c (make_vector_type): Likewise.
23705         (build_truth_vector_type): Take the number of units as a poly_uint64
23706         rather than an unsigned int.
23708 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23709             Alan Hayward  <alan.hayward@arm.com>
23710             David Sherwood  <david.sherwood@arm.com>
23712         * target.def (get_mask_mode): Take the number of units and length
23713         as poly_uint64s rather than unsigned ints.
23714         * targhooks.h (default_get_mask_mode): Update accordingly.
23715         * targhooks.c (default_get_mask_mode): Likewise.
23716         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
23717         * doc/tm.texi: Regenerate.
23719 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23720             Alan Hayward  <alan.hayward@arm.com>
23721             David Sherwood  <david.sherwood@arm.com>
23723         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
23724         * omp-general.c (omp_max_vf): Likewise.
23725         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
23726         (expand_omp_simd): Handle polynomial safelen.
23727         * omp-low.c (omplow_simd_context): Add a default constructor.
23728         (omplow_simd_context::max_vf): Change from int to poly_uint64.
23729         (lower_rec_simd_input_clauses): Update accordingly.
23730         (lower_rec_input_clauses): Likewise.
23732 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23733             Alan Hayward  <alan.hayward@arm.com>
23734             David Sherwood  <david.sherwood@arm.com>
23736         * tree-vectorizer.h (vect_nunits_for_cost): New function.
23737         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
23738         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
23739         (vect_analyze_slp_cost): Likewise.
23740         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
23741         (vect_model_load_cost): Likewise.
23743 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23744             Alan Hayward  <alan.hayward@arm.com>
23745             David Sherwood  <david.sherwood@arm.com>
23747         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
23748         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
23749         from an unsigned int * to a poly_uint64_pod *.
23750         (calculate_unrolling_factor): New function.
23751         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
23753 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23754             Alan Hayward  <alan.hayward@arm.com>
23755             David Sherwood  <david.sherwood@arm.com>
23757         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
23758         from an unsigned int to a poly_uint64.
23759         (_loop_vec_info::slp_unrolling_factor): Likewise.
23760         (_loop_vec_info::vectorization_factor): Change from an int
23761         to a poly_uint64.
23762         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
23763         (vect_get_num_vectors): New function.
23764         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
23765         (vect_get_num_copies): Use vect_get_num_vectors.
23766         (vect_analyze_data_ref_dependences): Change max_vf from an int *
23767         to an unsigned int *.
23768         (vect_analyze_data_refs): Change min_vf from an int * to a
23769         poly_uint64 *.
23770         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
23771         than an unsigned HOST_WIDE_INT.
23772         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
23773         (vect_analyze_data_ref_dependence): Change max_vf from an int *
23774         to an unsigned int *.
23775         (vect_analyze_data_ref_dependences): Likewise.
23776         (vect_compute_data_ref_alignment): Handle polynomial vf.
23777         (vect_enhance_data_refs_alignment): Likewise.
23778         (vect_prune_runtime_alias_test_list): Likewise.
23779         (vect_shift_permute_load_chain): Likewise.
23780         (vect_supportable_dr_alignment): Likewise.
23781         (dependence_distance_ge_vf): Take the vectorization factor as a
23782         poly_uint64 rather than an unsigned HOST_WIDE_INT.
23783         (vect_analyze_data_refs): Change min_vf from an int * to a
23784         poly_uint64 *.
23785         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
23786         vfm1 as a poly_uint64 rather than an int.  Make the same change
23787         for the returned bound_scalar.
23788         (vect_gen_vector_loop_niters): Handle polynomial vf.
23789         (vect_do_peeling): Likewise.  Update call to
23790         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
23791         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
23792         be constant.
23793         * tree-vect-loop.c (vect_determine_vectorization_factor)
23794         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
23795         (vect_get_known_peeling_cost): Likewise.
23796         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
23797         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
23798         (vect_transform_loop): Likewise.  Use the lowest possible VF when
23799         updating the upper bounds of the loop.
23800         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
23801         rather than an int.
23802         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
23803         polynomial unroll factors.
23804         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
23805         (vect_make_slp_decision): Likewise.
23806         (vect_supported_load_permutation_p): Likewise, and polynomial
23807         vf too.
23808         (vect_analyze_slp_cost): Handle polynomial vf.
23809         (vect_slp_analyze_node_operations): Likewise.
23810         (vect_slp_analyze_bb_1): Likewise.
23811         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
23812         than an unsigned HOST_WIDE_INT.
23813         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
23814         (vectorizable_load): Handle polynomial vf.
23815         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
23816         a poly_uint64.
23817         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
23819 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23820             Alan Hayward  <alan.hayward@arm.com>
23821             David Sherwood  <david.sherwood@arm.com>
23823         * match.pd: Handle bit operations involving three constants
23824         and try to fold one pair.
23826 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23828         * tree-vect-loop-manip.c: Include gimple-fold.h.
23829         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
23830         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
23831         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
23832         Add a path that uses a step of VF instead of 1, but disable it
23833         for now.
23834         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
23835         and niters_no_overflow parameters.  Update calls to
23836         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
23837         Create a new SSA name if the latter choses to use a ste other
23838         than zero, and return it via niters_vector_mult_vf_var.
23839         * tree-vect-loop.c (vect_transform_loop): Update calls to
23840         vect_do_peeling, vect_gen_vector_loop_niters and
23841         slpeel_make_loop_iterate_ntimes.
23842         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
23843         (vect_gen_vector_loop_niters): Update declarations after above changes.
23845 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
23847         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
23848         128-bit round to integer instructions.
23849         (ceil<mode>2): Likewise.
23850         (btrunc<mode>2): Likewise.
23851         (round<mode>2): Likewise.
23853 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23855         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
23856         unaligned VSX load/store on P8/P9.
23857         (expand_block_clear): Allow the use of unaligned VSX
23858         load/store on P8/P9.
23860 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23862         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
23863         New function.
23864         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
23865         swap associated with both a load and a store.
23867 2018-01-02  Andrew Waterman  <andrew@sifive.com>
23869         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
23870         * config/riscv/riscv.md (clear_cache): Use it.
23872 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
23874         * web.c: Remove out-of-date comment.
23876 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23878         * expr.c (fixup_args_size_notes): Check that any existing
23879         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
23880         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
23881         (emit_single_push_insn): ...here.
23883 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23885         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
23886         (const_vector_encoded_nelts): New function.
23887         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
23888         (const_vector_int_elt, const_vector_elt): Declare.
23889         * emit-rtl.c (const_vector_int_elt_1): New function.
23890         (const_vector_elt): Likewise.
23891         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
23892         of CONST_VECTOR_ELT.
23894 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23896         * expr.c: Include rtx-vector-builder.h.
23897         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
23898         directly on the tree encoding.
23899         (const_vector_from_tree): Likewise.
23900         * optabs.c: Include rtx-vector-builder.h.
23901         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
23902         sequence of "u" values.
23903         * vec-perm-indices.c: Include rtx-vector-builder.h.
23904         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
23905         directly on the vec_perm_indices encoding.
23907 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23909         * doc/rtl.texi (const_vector): Describe new encoding scheme.
23910         * Makefile.in (OBJS): Add rtx-vector-builder.o.
23911         * rtx-vector-builder.h: New file.
23912         * rtx-vector-builder.c: Likewise.
23913         * rtl.h (rtx_def::u2): Add a const_vector field.
23914         (CONST_VECTOR_NPATTERNS): New macro.
23915         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
23916         (CONST_VECTOR_DUPLICATE_P): Likewise.
23917         (CONST_VECTOR_STEPPED_P): Likewise.
23918         (CONST_VECTOR_ENCODED_ELT): Likewise.
23919         (const_vec_duplicate_p): Check for a duplicated vector encoding.
23920         (unwrap_const_vec_duplicate): Likewise.
23921         (const_vec_series_p): Check for a non-duplicated vector encoding.
23922         Say that the function only returns true for integer vectors.
23923         * emit-rtl.c: Include rtx-vector-builder.h.
23924         (gen_const_vec_duplicate_1): Delete.
23925         (gen_const_vector): Call gen_const_vec_duplicate instead of
23926         gen_const_vec_duplicate_1.
23927         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
23928         (gen_const_vec_duplicate): Use rtx_vector_builder.
23929         (gen_const_vec_series): Likewise.
23930         (gen_rtx_CONST_VECTOR): Likewise.
23931         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
23932         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
23933         Build a new vector rather than modifying a CONST_VECTOR in-place.
23934         (handle_special_swappables): Update call accordingly.
23935         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
23936         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
23937         Build a new vector rather than modifying a CONST_VECTOR in-place.
23938         (handle_special_swappables): Update call accordingly.
23940 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23942         * simplify-rtx.c (simplify_const_binary_operation): Use
23943         CONST_VECTOR_ELT instead of XVECEXP.
23945 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23947         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
23948         the selector elements to be different from the data elements
23949         if the selector is a VECTOR_CST.
23950         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
23951         ssizetype for the selector.
23953 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23955         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
23956         before testing each element individually.
23957         * tree-vect-generic.c (lower_vec_perm): Likewise.
23959 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23961         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
23962         * selftest-run-tests.c (selftest::run_tests): Call it.
23963         * vector-builder.h (vector_builder::operator ==): New function.
23964         (vector_builder::operator !=): Likewise.
23965         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
23966         (vec_perm_indices::all_from_input_p): New function.
23967         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
23968         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
23969         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
23970         instead of reading the VECTOR_CST directly.  Detect whether both
23971         vector inputs are the same before constructing the vec_perm_indices,
23972         and update the number of inputs argument accordingly.  Use the
23973         utility functions added above.  Only construct sel2 if we need to.
23975 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23977         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
23978         the broadcast of the low byte.
23979         (expand_mult_highpart): Use an explicit encoding for the permutes.
23980         * optabs-query.c (can_mult_highpart_p): Likewise.
23981         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
23982         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23983         (vectorizable_bswap): Likewise.
23984         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
23985         explicit encoding for the power-of-2 permutes.
23986         (vect_permute_store_chain): Likewise.
23987         (vect_grouped_load_supported): Likewise.
23988         (vect_permute_load_chain): Likewise.
23990 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23992         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
23993         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
23994         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
23995         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
23996         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
23997         (vect_gen_perm_mask_any): Likewise.
23999 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24001         * int-vector-builder.h: New file.
24002         * vec-perm-indices.h: Include int-vector-builder.h.
24003         (vec_perm_indices): Redefine as an int_vector_builder.
24004         (auto_vec_perm_indices): Delete.
24005         (vec_perm_builder): Redefine as a stand-alone class.
24006         (vec_perm_indices::vec_perm_indices): New function.
24007         (vec_perm_indices::clamp): Likewise.
24008         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
24009         (vec_perm_indices::new_vector): New function.
24010         (vec_perm_indices::new_expanded_vector): Update for new
24011         vec_perm_indices class.
24012         (vec_perm_indices::rotate_inputs): New function.
24013         (vec_perm_indices::all_in_range_p): Operate directly on the
24014         encoded form, without computing elided elements.
24015         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
24016         encoding.  Update for new vec_perm_indices class.
24017         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
24018         the given vec_perm_builder.
24019         (expand_vec_perm_var): Update vec_perm_builder constructor.
24020         (expand_mult_highpart): Use vec_perm_builder instead of
24021         auto_vec_perm_indices.
24022         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
24023         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
24024         or double series encoding as appropriate.
24025         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
24026         vec_perm_indices instead of auto_vec_perm_indices.
24027         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24028         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24029         (vect_permute_store_chain): Likewise.
24030         (vect_grouped_load_supported): Likewise.
24031         (vect_permute_load_chain): Likewise.
24032         (vect_shift_permute_load_chain): Likewise.
24033         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
24034         (vect_transform_slp_perm_load): Likewise.
24035         (vect_schedule_slp_instance): Likewise.
24036         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24037         (vectorizable_mask_load_store): Likewise.
24038         (vectorizable_bswap): Likewise.
24039         (vectorizable_store): Likewise.
24040         (vectorizable_load): Likewise.
24041         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
24042         vec_perm_indices instead of auto_vec_perm_indices.  Use
24043         tree_to_vec_perm_builder to read the vector from a tree.
24044         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
24045         vec_perm_builder instead of a vec_perm_indices.
24046         (have_whole_vector_shift): Use vec_perm_builder and
24047         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
24048         truncation to calc_vec_perm_mask_for_shift.
24049         (vect_create_epilog_for_reduction): Likewise.
24050         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
24051         from auto_vec_perm_indices to vec_perm_indices.
24052         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
24053         instead of changing individual elements.
24054         (aarch64_vectorize_vec_perm_const): Use new_vector to install
24055         the vector in d.perm.
24056         * config/arm/arm.c (expand_vec_perm_d::perm): Change
24057         from auto_vec_perm_indices to vec_perm_indices.
24058         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
24059         instead of changing individual elements.
24060         (arm_vectorize_vec_perm_const): Use new_vector to install
24061         the vector in d.perm.
24062         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
24063         Update vec_perm_builder constructor.
24064         (rs6000_expand_interleave): Likewise.
24065         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
24066         (rs6000_expand_interleave): Likewise.
24068 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24070         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
24071         to qimode could truncate the indices.
24072         * optabs.c (expand_vec_perm_var): Likewise.
24074 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24076         * Makefile.in (OBJS): Add vec-perm-indices.o.
24077         * vec-perm-indices.h: New file.
24078         * vec-perm-indices.c: Likewise.
24079         * target.h (vec_perm_indices): Replace with a forward class
24080         declaration.
24081         (auto_vec_perm_indices): Move to vec-perm-indices.h.
24082         * optabs.h: Include vec-perm-indices.h.
24083         (expand_vec_perm): Delete.
24084         (selector_fits_mode_p, expand_vec_perm_var): Declare.
24085         (expand_vec_perm_const): Declare.
24086         * target.def (vec_perm_const_ok): Replace with...
24087         (vec_perm_const): ...this new hook.
24088         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
24089         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
24090         * doc/tm.texi: Regenerate.
24091         * optabs.def (vec_perm_const): Delete.
24092         * doc/md.texi (vec_perm_const): Likewise.
24093         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
24094         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
24095         expand_vec_perm for constant permutation vectors.  Assert that
24096         the mode of variable permutation vectors is the integer equivalent
24097         of the mode that is being permuted.
24098         * optabs-query.h (selector_fits_mode_p): Declare.
24099         * optabs-query.c: Include vec-perm-indices.h.
24100         (selector_fits_mode_p): New function.
24101         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
24102         is defined, instead of checking whether the vec_perm_const_optab
24103         exists.  Use targetm.vectorize.vec_perm_const instead of
24104         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
24105         fit in the vector mode before using a variable permute.
24106         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
24107         vec_perm_indices instead of an rtx.
24108         (expand_vec_perm): Replace with...
24109         (expand_vec_perm_const): ...this new function.  Take the selector
24110         as a vec_perm_indices rather than an rtx.  Also take the mode of
24111         the selector.  Update call to shift_amt_for_vec_perm_mask.
24112         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
24113         Use vec_perm_indices::new_expanded_vector to expand the original
24114         selector into bytes.  Check whether the indices fit in the vector
24115         mode before using a variable permute.
24116         (expand_vec_perm_var): Make global.
24117         (expand_mult_highpart): Use expand_vec_perm_const.
24118         * fold-const.c: Includes vec-perm-indices.h.
24119         * tree-ssa-forwprop.c: Likewise.
24120         * tree-vect-data-refs.c: Likewise.
24121         * tree-vect-generic.c: Likewise.
24122         * tree-vect-loop.c: Likewise.
24123         * tree-vect-slp.c: Likewise.
24124         * tree-vect-stmts.c: Likewise.
24125         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
24126         Delete.
24127         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
24128         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
24129         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
24130         (aarch64_vectorize_vec_perm_const): ...this new function.
24131         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24132         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24133         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
24134         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
24135         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24136         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24137         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
24138         into...
24139         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
24140         check for NEON modes.
24141         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
24142         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
24143         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
24144         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
24145         into...
24146         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
24147         the old VEC_PERM_CONST conditions.
24148         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
24149         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
24150         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
24151         (ia64_vectorize_vec_perm_const_ok): Merge into...
24152         (ia64_vectorize_vec_perm_const): ...this new function.
24153         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
24154         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
24155         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
24156         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
24157         * config/mips/mips.c (mips_expand_vec_perm_const)
24158         (mips_vectorize_vec_perm_const_ok): Merge into...
24159         (mips_vectorize_vec_perm_const): ...this new function.
24160         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
24161         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
24162         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
24163         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
24164         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
24165         (rs6000_expand_vec_perm_const): Delete.
24166         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
24167         Delete.
24168         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24169         (altivec_expand_vec_perm_const_le): Take each operand individually.
24170         Operate on constant selectors rather than rtxes.
24171         (altivec_expand_vec_perm_const): Likewise.  Update call to
24172         altivec_expand_vec_perm_const_le.
24173         (rs6000_expand_vec_perm_const): Delete.
24174         (rs6000_vectorize_vec_perm_const_ok): Delete.
24175         (rs6000_vectorize_vec_perm_const): New function.
24176         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
24177         an element count and rtx array.
24178         (rs6000_expand_extract_even): Update call accordingly.
24179         (rs6000_expand_interleave): Likewise.
24180         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
24181         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
24182         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
24183         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
24184         (rs6000_expand_vec_perm_const): Delete.
24185         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24186         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24187         (altivec_expand_vec_perm_const_le): Take each operand individually.
24188         Operate on constant selectors rather than rtxes.
24189         (altivec_expand_vec_perm_const): Likewise.  Update call to
24190         altivec_expand_vec_perm_const_le.
24191         (rs6000_expand_vec_perm_const): Delete.
24192         (rs6000_vectorize_vec_perm_const_ok): Delete.
24193         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
24194         reference to the SPE evmerge intructions.
24195         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
24196         an element count and rtx array.
24197         (rs6000_expand_extract_even): Update call accordingly.
24198         (rs6000_expand_interleave): Likewise.
24199         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
24200         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
24201         new function.
24202         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24204 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24206         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
24207         vector mode and that that mode matches the mode of the data
24208         being permuted.
24209         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
24210         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
24211         directly using expand_vec_perm_1 when forcing selectors into
24212         registers.
24213         (expand_vec_perm_var): New function, split out from expand_vec_perm.
24215 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24217         * optabs-query.h (can_vec_perm_p): Delete.
24218         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
24219         * optabs-query.c (can_vec_perm_p): Split into...
24220         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
24221         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
24222         particular selector is valid.
24223         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24224         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24225         (vect_grouped_load_supported): Likewise.
24226         (vect_shift_permute_load_chain): Likewise.
24227         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
24228         (vect_transform_slp_perm_load): Likewise.
24229         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24230         (vectorizable_bswap): Likewise.
24231         (vect_gen_perm_mask_checked): Likewise.
24232         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
24233         implementations of variable permutation vectors into account
24234         when deciding which selector to use.
24235         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
24236         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
24237         with a false third argument.
24238         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
24239         to test whether the constant selector is valid and can_vec_perm_var_p
24240         to test whether a variable selector is valid.
24242 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24244         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
24245         * optabs-query.c (can_vec_perm_p): Likewise.
24246         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
24247         instead of vec_perm_indices.
24248         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
24249         (vect_gen_perm_mask_checked): Likewise,
24250         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
24251         (vect_gen_perm_mask_checked): Likewise,
24253 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24255         * optabs-query.h (qimode_for_vec_perm): Declare.
24256         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
24257         (qimode_for_vec_perm): ...this new function.
24258         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
24260 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
24262         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
24263         does not have a conditional at the top.
24265 2018-01-02  Richard Biener  <rguenther@suse.de>
24267         * ipa-inline.c (big_speedup_p): Fix expression.
24269 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
24271         PR target/81616
24272         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
24273         for generic 4->6.
24275 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
24277         PR target/81616
24278         Generic tuning.
24279         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
24280         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
24281         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
24282         cond_taken_branch_cost 3->4.
24284 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
24286         PR tree-optimization/83581
24287         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
24288         TODO_cleanup_cfg if any changes have been made.
24290         PR middle-end/83608
24291         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
24292         convert_modes if target mode has the right side, but different mode
24293         class.
24295         PR middle-end/83609
24296         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
24297         last argument when extracting from CONCAT.  If either from_real or
24298         from_imag is NULL, use expansion through memory.  If result is not
24299         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
24300         the parts directly to inner mode, if even that fails, use expansion
24301         through memory.
24303         PR middle-end/83623
24304         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
24305         check for bswap in mode rather than HImode and use that in expand_unop
24306         too.
24308 Copyright (C) 2018 Free Software Foundation, Inc.
24310 Copying and distribution of this file, with or without modification,
24311 are permitted in any medium without royalty provided the copyright
24312 notice and this notice are preserved.