Port edge_growth_cache to call_summary.
[official-gcc.git] / gcc / ChangeLog
blob7c231a0fc1703161424b9647a76cb25bfc11f347
1 2018-06-08  Martin Liska  <mliska@suse.cz>
3         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
4         (initialize_growth_caches): Remove.
5         (free_growth_caches): Likewise.
6         (do_estimate_edge_time): Use edge_growth_cache.
7         (do_estimate_edge_size): Likewise.
8         (do_estimate_edge_hints): Likewise.
9         * ipa-inline.c (reset_edge_caches): Likewise.
10         (recursive_inlining): Likewise.
11         (inline_small_functions): Likewise.
12         * ipa-inline.h (initialize_growth_caches): Remove.
13         (estimate_edge_size): Likewise.
14         (estimate_edge_time): Likewise.
15         (estimate_edge_hints): Likewise.
16         (reset_edge_growth_cache): Likewise.
17         * symbol-summary.h (call_summary::remove): New method.
19 2018-06-08  Martin Liska  <mliska@suse.cz>
21         * ipa-cp.c (class edge_clone_summary): New summary.
22         (grow_edge_clone_vectors): Remove.
23         (ipcp_edge_duplication_hook): Remove.
24         (class edge_clone_summary_t): New call_summary class.
25         (ipcp_edge_removal_hook): Remove.
26         (edge_clone_summary_t::duplicate): New function.
27         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
28         (create_specialized_node): Likewise.
29         (ipcp_driver): Initialize edge_clone_summaries and do not
30         register hooks.
32 2018-06-08  Martin Liska  <mliska@suse.cz>
34         * symbol-summary.h (get): New function.
35         (call_summary::m_initialize_when_cloning): New class member.
37 2018-06-08  Martin Liska  <mliska@suse.cz>
39         * cgraph.c (cgraph_node::remove): Do not recycle uid.
40         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
41         (symbol_table::allocate_cgraph_symbol): Do not set uid.
42         * passes.c (uid_hash_t): Record removed_nodes by their uids.
43         (remove_cgraph_node_from_order): Use the removed_nodes set.
44         (do_per_function_toporder): Likwise.
45         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
46         instead of summary_uid.
47         (symtab_removal): Likewise.
48         (symtab_duplication): Likewise.
50 2018-06-08  Martin Liska  <mliska@suse.cz>
52         * ipa-cp.c (ipcp_store_bits_results): Use
53         ipcp_transformation_sum.
54         (ipcp_store_vr_results): Likewise.
55         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
56         to ...
57         (ipcp_transformation_initialize): ... this.
58         (ipa_set_node_agg_value_chain):
59         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
60         (write_ipcp_transformation_info): Likewise.
61         (read_ipcp_transformation_info): Likewise.
62         (ipcp_update_bits): Likewise.
63         (ipcp_update_vr): Likewise.
64         (ipcp_transform_function): Likewise.
65         * ipa-prop.h: Rename ipcp_transformation_summary to
66         ipcp_transformation.
67         (class ipcp_transformation_t): New function summary.
68         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
69         (ipa_get_agg_replacements_for_node): Likewise.
71 2018-06-08  Martin Liska  <mliska@suse.cz>
73         * ipa-pure-const.c (struct funct_state_d): Do it class instead
74         of struct.
75         (class funct_state_summary_t): New function_summary class.
76         (has_function_state): Remove.
77         (get_function_state): Likewise.
78         (set_function_state): Likewise.
79         (add_new_function): Likewise.
80         (funct_state_summary_t::insert): New function.
81         (duplicate_node_data): Remove.
82         (remove_node_data): Remove.
83         (funct_state_summary_t::duplicate): New function.
84         (register_hooks): Create new funct_state_summaries.
85         (pure_const_generate_summary): Use it.
86         (pure_const_write_summary): Likewise.
87         (pure_const_read_summary): Likewise.
88         (propagate_pure_const): Likewise.
89         (propagate_nothrow): Likewise.
90         (dump_malloc_lattice): Likewise.
91         (propagate_malloc): Likewise.
92         (execute): Do not register hooks, just remove summary
93         instead.
94         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
95         constructor.
97 2018-06-08  Martin Liska  <mliska@suse.cz>
99         * ipa-reference.c (remove_node_data): Remove.
100         (duplicate_node_data): Likewise.
101         (class ipa_ref_var_info_summary_t): New class.
102         (class ipa_ref_opt_summary_t): Likewise.
103         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
104         (get_reference_optimization_summary): Use
105         ipa_ref_opt_sum_summaries.
106         (set_reference_vars_info): Remove.
107         (set_reference_optimization_summary): Likewise.
108         (ipa_init): Create summaries.
109         (init_function_info): Use function summary.
110         (ipa_ref_opt_summary_t::duplicate): New function.
111         (ipa_ref_opt_summary_t::remove): New function.
112         (get_read_write_all_from_node): Fix GNU coding style.
113         (propagate): Use function summary.
114         (write_node_summary_p): Fix GNU coding style.
115         (stream_out_bitmap): Likewise.
116         (ipa_reference_read_optimization_summary): Use function summary.
117         (ipa_reference_c_finalize): Do not release hooks.
119 2018-06-08  Martin Liska  <mliska@suse.cz>
121         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
122         (analyze_function_body): Extract multiple calls of get_create.
123         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
124         * ipa-inline.c (recursive_inlining): Use ::get method.
125         * ipa-inline.h (estimate_edge_growth): Likewise.
127 2018-06-08  Martin Liska  <mliska@suse.cz>
129         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
130         HSA_INVALID.
131         (hsa_function_summary::hsa_function_summary): Use the new enum
132         value.
133         (hsa_gpu_implementation_p): Use hsa_summaries::get.
134         * hsa-gen.c (hsa_get_host_function): Likewise.
135         (get_brig_function_name): Likewise.
136         * ipa-hsa.c (process_hsa_functions): Likewise.
137         (ipa_hsa_write_summary): Likewise.
138         * symbol-summary.h (symtab_duplication): Use ::get function/
139         (get): New function.
141 2018-06-08  Martin Liska  <mliska@suse.cz>
143         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
144         of get.
145         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
146         (hsa_register_kernel): Likewise.
147         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
148         * hsa-gen.c (hsa_get_host_function): Likewise.
149         (get_brig_function_name): Likewise.
150         (generate_hsa): Likewise.
151         (pass_gen_hsail::execute): Likewise.
152         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
153         (devirtualization_time_bonus): Likewise.
154         (ipcp_propagate_stage): Likewise.
155         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
156         (edge_set_predicate): Likewise.
157         (evaluate_conditions_for_known_args): Likewise.
158         (evaluate_properties_for_edge): Likewise.
159         (ipa_fn_summary::reset): Likewise.
160         (ipa_fn_summary_t::duplicate): Likewise.
161         (dump_ipa_call_summary): Likewise.
162         (ipa_dump_fn_summary): Likewise.
163         (analyze_function_body): Likewise.
164         (compute_fn_summary): Likewise.
165         (estimate_edge_devirt_benefit): Likewise.
166         (estimate_edge_size_and_time): Likewise.
167         (estimate_calls_size_and_time): Likewise.
168         (estimate_node_size_and_time): Likewise.
169         (inline_update_callee_summaries): Likewise.
170         (remap_edge_change_prob): Likewise.
171         (remap_edge_summaries): Likewise.
172         (ipa_merge_fn_summary_after_inlining): Likewise.
173         (ipa_update_overall_fn_summary): Likewise.
174         (read_ipa_call_summary): Likewise.
175         (inline_read_section): Likewise.
176         (write_ipa_call_summary): Likewise.
177         (ipa_fn_summary_write): Likewise.
178         (ipa_free_fn_summary): Likewise.
179         * ipa-hsa.c (process_hsa_functions): Likewise.
180         (ipa_hsa_write_summary): Likewise.
181         (ipa_hsa_read_section): Likewise.
182         * ipa-icf.c (sem_function::merge): Likewise.
183         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
184         (do_estimate_edge_time): Likewise.
185         (estimate_size_after_inlining): Likewise.
186         (estimate_growth): Likewise.
187         (growth_likely_positive): Likewise.
188         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
189         (inline_call): Likewise.
190         * ipa-inline.c (caller_growth_limits): Likewise.
191         (can_inline_edge_p): Likewise.
192         (can_inline_edge_by_limits_p): Likewise.
193         (compute_uninlined_call_time): Likewise.
194         (compute_inlined_call_time): Likewise.
195         (want_inline_small_function_p): Likewise.
196         (edge_badness): Likewise.
197         (update_caller_keys): Likewise.
198         (update_callee_keys): Likewise.
199         (recursive_inlining): Likewise.
200         (inline_small_functions): Likewise.
201         (inline_to_all_callers_1): Likewise.
202         (dump_overall_stats): Likewise.
203         (early_inline_small_functions): Likewise.
204         (early_inliner): Likewise.
205         * ipa-inline.h (estimate_edge_growth): Likewise.
206         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
207         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
208         * ipa-prop.h (IPA_NODE_REF): Likewise.
209         (IPA_EDGE_REF): Likewise.
210         * ipa-pure-const.c (malloc_candidate_p): Likewise.
211         (propagate_malloc): Likewise.
212         * ipa-split.c (execute_split_functions): Likewise.
213         * symbol-summary.h: Rename get to get_create.
214         (get): Likewise.
215         (get_create): Likewise.
216         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
218 2018-06-08  Martin Liska  <mliska@suse.cz>
220         * symbol-summary.h (release): Move definition out of class
221         declaration.
222         (symtab_removal): Likewise.
223         (symtab_duplication): Likewise.
225 2018-06-08  Martin Liska  <mliska@suse.cz>
227         * symbol-summary.h (function_summary): Move constructor
228         implementation out of class declaration.
229         (release): Likewise.
230         (symtab_insertion): Likewise.
231         (symtab_removal): Likewise.
232         (symtab_duplication): Likewise.
233         (get): Likewise.
235 2018-06-08  Martin Liska  <mliska@suse.cz>
237         * Makefile.in: Remove support for MPX (macros, related functions,
238         fields in cgraph_node, ...).
239         * builtin-types.def (BT_BND): Likewise.
240         (BT_FN_BND_CONST_PTR): Likewise.
241         (BT_FN_CONST_PTR_BND): Likewise.
242         (BT_FN_VOID_PTR_BND): Likewise.
243         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
244         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
245         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
246         (expand_builtin_mempcpy_with_bounds): Likewise.
247         (expand_builtin_memset_with_bounds): Likewise.
248         (expand_builtin_memset_args): Likewise.
249         (std_expand_builtin_va_start): Likewise.
250         (expand_builtin): Likewise.
251         (expand_builtin_with_bounds): Likewise.
252         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
253         (DEF_LIB_BUILTIN_CHKP): Likewise.
254         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
255         (DEF_CHKP_BUILTIN): Likewise.
256         (BUILT_IN_MEMCPY): Likewise.
257         (BUILT_IN_MEMMOVE): Likewise.
258         (BUILT_IN_MEMPCPY): Likewise.
259         (BUILT_IN_MEMSET): Likewise.
260         (BUILT_IN_STPCPY): Likewise.
261         (BUILT_IN_STRCAT): Likewise.
262         (BUILT_IN_STRCHR): Likewise.
263         (BUILT_IN_STRCPY): Likewise.
264         (BUILT_IN_STRLEN): Likewise.
265         (BUILT_IN_MEMCPY_CHK): Likewise.
266         (BUILT_IN_MEMMOVE_CHK): Likewise.
267         (BUILT_IN_MEMPCPY_CHK): Likewise.
268         (BUILT_IN_MEMSET_CHK): Likewise.
269         (BUILT_IN_STPCPY_CHK): Likewise.
270         (BUILT_IN_STRCAT_CHK): Likewise.
271         (BUILT_IN_STRCPY_CHK): Likewise.
272         * calls.c (store_bounds): Likewise.
273         (emit_call_1): Likewise.
274         (special_function_p): Likewise.
275         (maybe_warn_nonstring_arg): Likewise.
276         (initialize_argument_information): Likewise.
277         (finalize_must_preallocate): Likewise.
278         (compute_argument_addresses): Likewise.
279         (expand_call): Likewise.
280         * cfgexpand.c (expand_call_stmt): Likewise.
281         (expand_return): Likewise.
282         (expand_gimple_stmt_1): Likewise.
283         (pass_expand::execute): Likewise.
284         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
285         (cgraph_node::remove): Likewise.
286         (cgraph_node::dump): Likewise.
287         (cgraph_node::verify_node): Likewise.
288         * cgraph.h (chkp_function_instrumented_p): Likewise.
289         (symtab_node::get_alias_target): Likewise.
290         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
291         (cgraph_local_p): Likewise.
292         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
293         (cgraph_edge::rebuild_references): Likewise.
294         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
295         (walk_polymorphic_call_targets): Likewise.
296         (cgraph_node::expand_thunk): Likewise.
297         (symbol_table::output_weakrefs): Likewise.
298         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
299         (ix86_handle_option): Likewise.
300         * config/i386/constraints.md: Likewise.
301         * config/i386/i386-builtin-types.def (BND): Likewise.
302         (VOID): Likewise.
303         (PVOID): Likewise.
304         (ULONG): Likewise.
305         * config/i386/i386-builtin.def (BDESC_END): Likewise.
306         (BDESC_FIRST): Likewise.
307         (BDESC): Likewise.
308         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
309         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
310         * config/i386/i386.c (enum reg_class): Likewise.
311         (ix86_target_string): Likewise.
312         (ix86_option_override_internal): Likewise.
313         (ix86_conditional_register_usage): Likewise.
314         (ix86_valid_target_attribute_inner_p): Likewise.
315         (ix86_set_indirect_branch_type): Likewise.
316         (ix86_set_current_function): Likewise.
317         (ix86_function_arg_regno_p): Likewise.
318         (init_cumulative_args): Likewise.
319         (ix86_function_arg_advance): Likewise.
320         (ix86_function_arg): Likewise.
321         (ix86_pass_by_reference): Likewise.
322         (ix86_function_value_regno_p): Likewise.
323         (ix86_function_value_1): Likewise.
324         (ix86_function_value_bounds): Likewise.
325         (ix86_return_in_memory): Likewise.
326         (ix86_setup_incoming_vararg_bounds): Likewise.
327         (ix86_va_start): Likewise.
328         (indirect_thunk_need_prefix): Likewise.
329         (print_reg): Likewise.
330         (ix86_print_operand): Likewise.
331         (ix86_expand_call): Likewise.
332         (ix86_output_function_return): Likewise.
333         (reg_encoded_number): Likewise.
334         (BDESC_VERIFYS): Likewise.
335         (ix86_init_mpx_builtins): Likewise.
336         (ix86_init_builtins): Likewise.
337         (ix86_emit_cmove): Likewise.
338         (ix86_emit_move_max): Likewise.
339         (ix86_expand_builtin): Likewise.
340         (ix86_builtin_mpx_function): Likewise.
341         (ix86_get_arg_address_for_bt): Likewise.
342         (ix86_load_bounds): Likewise.
343         (ix86_store_bounds): Likewise.
344         (ix86_load_returned_bounds): Likewise.
345         (ix86_store_returned_bounds): Likewise.
346         (ix86_class_likely_spilled_p): Likewise.
347         (ix86_hard_regno_mode_ok): Likewise.
348         (x86_order_regs_for_local_alloc): Likewise.
349         (ix86_mitigate_rop): Likewise.
350         (ix86_bnd_prefixed_insn_p): Likewise.
351         (ix86_mpx_bound_mode): Likewise.
352         (ix86_make_bounds_constant): Likewise.
353         (ix86_initialize_bounds): Likewise.
354         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
355         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
356         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
357         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
358         (TARGET_CHKP_BOUND_MODE): Likewise.
359         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
360         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
361         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
362         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
363         * config/i386/i386.h (TARGET_MPX): Likewise.
364         (TARGET_MPX_P): Likewise.
365         (VALID_BND_REG_MODE): Likewise.
366         (FIRST_BND_REG): Likewise.
367         (LAST_BND_REG): Likewise.
368         (enum reg_class): Likewise.
369         (BND_REG_P): Likewise.
370         (BND_REGNO_P): Likewise.
371         (BNDmode): Likewise.
372         (ADJUST_INSN_LENGTH): Likewise.
373         * config/i386/i386.md: Likewise.
374         * config/i386/i386.opt: Likewise.
375         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
376         (defined): Likewise.
377         (LINK_MPX): Likewise.
378         (MPX_SPEC): Likewise.
379         (LIBMPX_SPEC): Likewise.
380         (LIBMPXWRAPPERS_SPEC): Likewise.
381         (CHKP_SPEC): Likewise.
382         * config/i386/predicates.md: Likewise.
383         * dbxout.c (dbxout_type): Likewise.
384         * doc/extend.texi: Likewise.
385         * doc/invoke.texi: Likewise.
386         * doc/md.texi: Likewise.
387         * doc/tm.texi: Likewise.
388         * doc/tm.texi.in: Likewise.
389         * dwarf2out.c (is_base_type): Likewise.
390         (gen_formal_types_die): Likewise.
391         (gen_subprogram_die): Likewise.
392         (gen_type_die_with_usage): Likewise.
393         (gen_decl_die): Likewise.
394         (dwarf2out_late_global_decl): Likewise.
395         * expr.c (expand_assignment): Likewise.
396         (emit_storent_insn): Likewise.
397         (store_expr_with_bounds): Likewise.
398         (store_expr): Likewise.
399         (expand_expr_real_1): Likewise.
400         * expr.h (store_expr_with_bounds): Likewise.
401         * function.c (use_register_for_decl): Likewise.
402         (struct bounds_parm_data): Likewise.
403         (assign_parms_augmented_arg_list): Likewise.
404         (assign_parm_find_entry_rtl): Likewise.
405         (assign_parm_is_stack_parm): Likewise.
406         (assign_parm_load_bounds): Likewise.
407         (assign_bounds): Likewise.
408         (assign_parms): Likewise.
409         (expand_function_start): Likewise.
410         * gcc.c (CHKP_SPEC): Likewise.
411         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
412         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
413         (wrestrict_dom_walker::check_call): Likewise.
414         * gimple.c (gimple_build_call_from_tree): Likewise.
415         * gimple.h (enum gf_mask): Likewise.
416         (gimple_call_with_bounds_p): Likewise.
417         (gimple_call_set_with_bounds): Likewise.
418         * gimplify.c (gimplify_init_constructor): Likewise.
419         * ipa-cp.c (initialize_node_lattices): Likewise.
420         (propagate_constants_across_call): Likewise.
421         (find_more_scalar_values_for_callers_subset): Likewise.
422         * ipa-hsa.c (process_hsa_functions): Likewise.
423         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
424         * ipa-icf.c (sem_function::merge): Likewise.
425         * ipa-inline.c (early_inliner): Likewise.
426         * ipa-pure-const.c (warn_function_noreturn): Likewise.
427         (warn_function_cold): Likewise.
428         (propagate_pure_const): Likewise.
429         * ipa-ref.h (enum GTY): Likewise.
430         * ipa-split.c (find_retbnd): Likewise.
431         (consider_split): Likewise.
432         (split_function): Likewise.
433         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
434         * ipa.c (walk_polymorphic_call_targets): Likewise.
435         (symbol_table::remove_unreachable_nodes): Likewise.
436         (process_references): Likewise.
437         (cgraph_build_static_cdtor_1): Likewise.
438         * lto-cgraph.c (lto_output_node): Likewise.
439         (output_refs): Likewise.
440         (compute_ltrans_boundary): Likewise.
441         (input_overwrite_node): Likewise.
442         (input_node): Likewise.
443         (input_cgraph_1): Likewise.
444         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
445         * passes.c (pass_manager::execute_early_local_passes): Likewise.
446         (class pass_chkp_instrumentation_passes): Likewise.
447         (make_pass_chkp_instrumentation_passes): Likewise.
448         * passes.def: Likewise.
449         * rtl.h (struct GTY): Likewise.
450         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
451         * stor-layout.c (layout_type): Likewise.
452         * symtab.c: Likewise.
453         * target.def: Likewise.
454         * targhooks.c (default_chkp_bound_type): Likewise.
455         (default_chkp_bound_mode): Likewise.
456         (default_builtin_chkp_function): Likewise.
457         (default_chkp_function_value_bounds): Likewise.
458         (default_chkp_make_bounds_constant): Likewise.
459         (default_chkp_initialize_bounds): Likewise.
460         * targhooks.h (default_chkp_bound_type): Likewise.
461         (default_chkp_bound_mode): Likewise.
462         (default_builtin_chkp_function): Likewise.
463         (default_chkp_function_value_bounds): Likewise.
464         (default_chkp_make_bounds_constant): Likewise.
465         (default_chkp_initialize_bounds): Likewise.
466         * toplev.c (compile_file): Likewise.
467         (process_options): Likewise.
468         * tree-core.h (DEF_BUILTIN): Likewise.
469         (DEF_BUILTIN_CHKP): Likewise.
470         * tree-inline.c (declare_return_variable): Likewise.
471         (remap_gimple_stmt): Likewise.
472         (copy_bb): Likewise.
473         (initialize_inlined_parameters): Likewise.
474         (expand_call_inline): Likewise.
475         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
476         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
477         (make_pass_ipa_chkp_produce_thunks): Likewise.
478         (make_pass_chkp): Likewise.
479         (make_pass_chkp_opt): Likewise.
480         (make_pass_chkp_instrumentation_passes): Likewise.
481         * tree-pretty-print.c (dump_generic_node): Likewise.
482         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
483         * tree-ssa-dce.c (propagate_necessity): Likewise.
484         (eliminate_unnecessary_stmts): Likewise.
485         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
486         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
487         * tree-ssa-sccvn.h: Likewise.
488         * tree-ssa-strlen.c (get_string_length): Likewise.
489         (valid_builtin_call): Likewise.
490         (adjust_last_stmt): Likewise.
491         (handle_builtin_strchr): Likewise.
492         (handle_builtin_strcpy): Likewise.
493         (handle_builtin_stxncpy): Likewise.
494         (handle_builtin_memcpy): Likewise.
495         (handle_builtin_strcat): Likewise.
496         (strlen_check_and_optimize_stmt): Likewise.
497         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
498         * tree-streamer-in.c: Likewise.
499         * tree-streamer.c (record_common_node): Likewise.
500         * tree.c (tree_code_size): Likewise.
501         (wide_int_to_tree_1): Likewise.
502         (type_contains_placeholder_1): Likewise.
503         (build_common_tree_nodes): Likewise.
504         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
505         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
506         (POINTER_BOUNDS_P): Likewise.
507         (BOUNDED_TYPE_P): Likewise.
508         (BOUNDED_P): Likewise.
509         (CALL_WITH_BOUNDS_P): Likewise.
510         (pointer_bounds_type_node): Likewise.
511         * value-prof.c (gimple_ic): Likewise.
512         * var-tracking.c (vt_add_function_parameters): Likewise.
513         * varasm.c (make_decl_rtl): Likewise.
514         (assemble_start_function): Likewise.
515         (output_constant): Likewise.
516         (maybe_assemble_visibility): Likewise.
517         * varpool.c (ctor_for_folding): Likewise.
518         * chkp-builtins.def: Remove.
519         * ipa-chkp.c: Remove.
520         * ipa-chkp.h: Remove.
521         * rtl-chkp.c: Remove.
522         * rtl-chkp.h: Remove.
523         * tree-chkp-opt.c: Remove.
524         * tree-chkp.c: Remove.
525         * tree-chkp.h: Remove.
527 2018-06-07  Carl Love  <cel@us.ibm.com>
529         * gcc/config/rs6000/vsx.md (vextract_fp_from_shorth,
530         vextract_fp_from_shortl): Add BE support.
532 2018-06-07  Paul Koning  <ni1d@arrl.net>
534         * compare-elim.c (try_merge_compare): Don't merge compare if
535         address contains a side effect.
536         (try_eliminate_compare): Likewise.
538 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
540         * config.gcc: Support "tremont".
541         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
542         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
543         PROCESSOR_TREMONT.
544         * config/i386/i386.c (m_TREMONT): Define.
545         (processor_target_table): Add "tremont".
546         (PTA_TREMONT): Define.
547         (ix86_lea_outperforms): Add TARGET_TREMONT.
548         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
549         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
550         and M_INTEL_GOLDMONT_PLUS.
551         (fold_builtin_cpu): Add "tremont".
552         (ix86_add_stmt_cost): Add TARGET_TREMONT.
553         (ix86_option_override_internal): Add "tremont".
554         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
555         (processor_type): Add PROCESSOR_TREMONT.
556         * config/i386/x86-tune.def: Add m_TREMONT.
557         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
559 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
561         * gcc/config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
562         symbol defined for msp430i* devices to be lower case.
564         gcc/testsuite/gcc.target/msp430/
565         * msp430i-device-symbol.c: New test.
566         * msp430f-device-symbol.c: New test.
567         * msp430.h: New test header file.
569 2018-06-07  Richard Biener  <rguenther@suse.de>
571         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
572         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
573         Properly wrap signed arithmetic if overflow wraps.
575 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
577         PR tree-optimization/69615
578         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
579         of a cast from a same precision integral SSA_NAME in a bb dominated
580         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
581         cast to utype if rhs2 has already a compatible type.
583 2018-06-07  Richard Biener  <rguenther@suse.de>
585         PR tree-optimization/85935
586         * graphite-scop-detection.c (find_params_in_bb): Analyze
587         condition operands with respect to the correct loop.  Assert
588         the analysis doesn't fail.
590 2018-06-04  Carl Love  <cel@us.ibm.com>
592         * gcc/config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
593         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
594         as it is slightly cheaper.
595         (first_match_or_eos_index_<mode>):
596         Calculate index using natural element order.
597         (first_match_index_<mode>):
598         Calculate index using natural element order.
599         (first_match_or_eos_index_<mode>):
600         Calculate index using natural order.
601         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
602         for BE and LE modes.
603         * gcc/config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
604         P9V_BUILTIN_VCLZLSBB_V16QI.
605         * gcc/config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
606         specific.
608 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
610         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
611         indentation and line wrap for many prototypes.  Add missing
612         @smallexample directives around block of prototypes for vec_xl and
613         vec_xst.
615 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
617         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
618         track if we pass or return IEEE 128-bit floating point.
619         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
620         C++ mangling that is compatible with GCC 8.1.
621         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
622         (init_cumulative_args): Note if we pass or return IEEE 128-bit
623         floating point types.
624         (rs6000_function_arg_advance_1): Likewise.
625         (rs6000_mangle_type): Optionally generate mangled names that match
626         what GCC 8.1 generated for IEEE 128-bit floating point types.
627         (rs6000_globalize_decl_name): If we have an external function that
628         passes or returns IEEE 128-bit types, generate a weak reference
629         from the mangled name used in GCC 8.1 to the current mangled
630         name.
631         (rs6000_init_builtins): Make __ibm128 use the long double type if
632         long double is IBM extended double.  Make __float128 use the long
633         double type if long double is IEEE 128-bit.
635         PR target/85657
636         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
637         macro for __ibm128 built-in functions.
638         (PACK_IF): Add __ibm128 pack/unpack functions.
639         (UNPACK_IF): Likewise.
640         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
641         enable long double built-in functions if long double is IEEE
642         128-bit floating point.
643         (rs6000_invalid_builtin): Update long double built-in function
644         error message.
645         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
646         functions, adjust the built-in function to use the long double
647         built-in function if __ibm128 and long double are the same type.
648         * doc/extend.texi (PowerPC builtins): Update documention for
649         __builtin_{,un}pack_longdouble.  Add documentation for
650         __builtin_{,un}pack_ibm128.
652 2018-06-06  Jim Wilson  <jimw@sifive.com>
654         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
655         (struct machine_function): New field interrupt_mode.
656         (riscv_handle_type_attribute): New function.  Add forward declaration.
657         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
658         (riscv_expand_epilogue): Check interrupt_mode field.
659         (riscv_set_current_function): Check interrupt attribute args and
660         set interrupt_mode field.
661         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
662         (riscv_sret, riscv_uret): New.
663         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
664         new arguments to interrupt attribute.
666 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
668         PR target/63177
669         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
670         Don't handle -mcpu=power8 if -mpower9-vector is also used.
672 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
674         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
675         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
676         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
677         several redundant entries.
679 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
681         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
682         type from "rtx" to "rtx_insn *".
683         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
684         for local "call_insn", removing cast.
685         (ix86_expand_call): Likewise, introducing a "call_insn" local.
687 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
689         PR tree-optimization/86066
690         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
691         for BIT_INSERT_EXPR stores.
693 2018-06-06  Richard Biener  <rguenther@suse.de>
695         PR tree-optimization/86062
696         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
697         component refs ontop
698         of to be offsetted base.
700 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
702         * gcc/config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
703         to be static and remove check on interrupt attribute name.
705         gcc/testsuite/gcc.target/msp430/
706         * function-attributes-4.c: New test.
707         * static-interrupts.c: New test.
709 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
711         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
712         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
714 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
716         PR target/79924
717         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
718         second argument.
719         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
720         Remove second argument, change how error is called.
721         (aarch64_layout_arg): Remove second argument from
722         aarch64_err_no_fpadvsimd call.
723         (aarch64_init_cumulative_args): Ditto.
724         (aarch64_gimplify_va_arg_expr): Ditto.
725         * config/aarch64/aarch64.md (mov<mode>): Ditto.
727 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
729         * config/i386/i386.md (simple_return_indirect_internal): New expander.
730         (*simple_return_indirect_internal<mode>): Rename from
731         simple_return_indirect_internal.  Use W mode iterator.
732         (rstorssp): New expander.
733         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
734         (clrssbsy): New expander.
735         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
737 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
739         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
740         __typeof__.
741         (cmse_check_pointed_object): Likewise.
743 2018-06-05  Martin Liska  <mliska@suse.cz>
745         PR gcov-profile/47618
746         * doc/invoke.texi: Document how -fprofile-dir format
747         is extended.
749 2018-06-05  Richard Biener  <rguenther@suse.de>
751         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
752         removal pretend DOM info isn't available so we do not update
753         it and only remove edges, not dominated blocks.  Actually free
754         DOM info in case we removed something.  Remove unreachable blocks.
755         (mfb_keep_latches): Work with either DOM info or marked backedges.
756         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
757         first.  Mark backedges if DOM info isn't available.
758         (Re-)compute DOM info after cleanup_control_flow_pre.
760 2018-06-05  Richard Biener  <rguenther@suse.de>
762         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
763         (locus_discrim_hasher::hash): Adjust.
764         (locus_discrim_hasher::equal): Likewise.
765         (next_discriminator_for_locus): Work on line directly.
766         (same_line_p): Pass in expanded locus1 as well.
767         (assign_discriminators): Avoid redundant location expansions.
769 2018-06-05  Richard Biener  <rguenther@suse.de>
771         PR tree-optimization/86046
772         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
773         if required after clearing TREE_ADDRESSABLE.
775 2018-06-05  Richard Biener  <rguenther@suse.de>
777         PR tree-optimization/86047
778         * tree-ssa-loop.c (for_each_index): Glob handling of all
779         decls and constants and really handle all of them.
781 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
783         PR target/81497
784         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
785         qualifier_void_pointer and qualifier_const_void_pointer.
786         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
787         (arm_init_builtins): Handle the above.
788         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
789         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
790         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
791         void intrinsics.
793 2018-06-05  Martin Liska  <mliska@suse.cz>
795         * auto-profile.c (read_autofdo_file): Do not use
796         gcov_ctr_summary struct.
797         (afdo_callsite_hot_enough_for_early_inline): Likewise.
798         * coverage.c (struct counts_entry): Likewise.
799         (read_counts_file): Read just single summary entry.
800         (get_coverage_counts): Use gcov_summary struct.
801         * coverage.h (get_coverage_counts): Likewise.
802         * gcov-dump.c (dump_working_sets): Likewise.
803         (tag_summary): Dump just single summary.
804         * gcov-io.c (gcov_write_summary): Write just histogram
805         summary.
806         (gcov_read_summary): Read just single summary.
807         (compute_working_sets): Use gcov_summary struct.
808         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
809         of GCOV_COUNTERS_SUMMABLE.
810         (GCOV_COUNTERS_SUMMABLE): Remove.
811         (GCOV_FIRST_VALUE_COUNTER): Replace with
812         GCOV_COUNTER_V_INTERVAL.
813         (struct gcov_ctr_summary): Remove.
814         (struct gcov_summary): Directly use fields of former
815         gcov_ctr_summary.
816         (compute_working_sets): Use gcov_summary struct.
817         * gcov.c (read_count_file): Do not use ctrs fields.
818         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
819         struct.
820         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
821         struct.
822         * profile.c: Likewise.
823         * profile.h: Likewise.
825 2018-06-05  Martin Liska  <mliska@suse.cz>
827         PR gcov-profile/84846
828         * gcov.c (output_lines): Print working directory only
829         in intermediate format.
831 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
833         * config/s390/s390-builtin-types.def: Add void function type.
834         * config/s390/s390-builtins.def: Use the function type for the
835         tbeginc builtin.
837 2018-06-04  Jim Wilson  <jimw@sifive.com>
839         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
840         to int.
841         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
842         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
843         handle EH_RETURN_DATA_REGNO registers properly.
844         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
845         (riscv_expand_epilogue): Update comment.  Change argument name and
846         type.  Update code to use new name and type.  Pass new args to
847         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
848         EXCEPTION_RETURN.
849         * config/riscv/riscv.md (NORMAL_RETURN): New.
850         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
851         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
852         (eh_return): Call gen_eh_return_internal and emit barrier.
853         (eh_return_internal): Call riscv_expand_epilogue.
855 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
857         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
858         bit_insertion field and declare can_be_merged_into method.
859         (merged_store_group::can_be_merged_into): New method.
860         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
861         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
862         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
864 2018-06-04  Richard Biener  <rguenther@suse.de>
866         PR tree-optimization/85955
867         * builtins.c (fold_builtin_sincos): Convert pointers to
868         destination to appropriate type before dereferencing.
870 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
872         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
874 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
876         * expr.c (expand_expr_real_1): Force the operand into memory if
877         its TYPE_MODE is BLKmode and if there is no integer mode for
878         the number of bits being extracted.
880 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
882         PR target/85832
883         PR target/86036
884         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
885         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
887 2018-06-04  Richard Biener  <rguenther@suse.de>
889         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
890         (cleanup_tree_cfg_noloop): ... single caller.  Do
891         start_recording_case_labels later.
893 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
895         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
896         to _IMMINTRIN_H_INCLUDED.
897         * config/i386/pconfigintrin.h: Ditto.
898         * config/i386/waitpkgintrin.h: Ditto.
899         * config/i386/immintrin.h: Add includes for sgxintrin.h,
900         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
901         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
902         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
903         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
904         waitpkgintrin.h and cldemoteintrin.h.
906 2018-06-04  Richard Biener  <rguenther@suse.de>
908         PR tree-optimization/86038
909         * tracer.c (find_best_successor): Check probability for
910         being initialized, bail out if not.
912 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
914         PR target/86003
915         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
916         of bits to ignore when comparing architectures.
918 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
920         PR tree-optimization/69615
921         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
922         maximum or minimum of the type, try to merge it also as if
923         range1 is + [-, x - 1] or + [x + 1, -].
925         PR c++/86025
926         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
928 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
930         PR tree-optimization/86034
931         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
932         the unsigned bitfield type in a bit insertion sequence if it does not
933         have a larger precision than the bitfield size.
934         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
936 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
938         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
940 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
942         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
943         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
944         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
945         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
947 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
949         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
950         Disable -fdelete-null-pointer-checks for ELF toolchain.
952 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
953             Kito Cheng  <kito.cheng@gmail.com>
955         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
956         (nds32le-*-*, nds32be-*-*): Integrate checking process.
957         (nds32*-*-*): Add glibc and uclibc conditions.
958         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
959         (TARGET_EXCEPT_UNWIND_INFO): Define.
960         * config/nds32/elf.h: New file.
961         * config/nds32/linux.h: New file.
962         * config/nds32/nds32-elf.opt: New file.
963         * config/nds32/nds32-linux.opt: New file.
964         * config/nds32/nds32-fp-as-gp.c
965         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
966         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
967         TARGET_LINUX_ABI.
968         (nds32_asm_file_end): Ditto.
969         (nds32_print_operand): Ditto.
970         (nds32_insert_attributes): Ditto.
971         (nds32_init_libfuncs): New function.
972         (TARGET_HAVE_TLS): Define.
973         (TARGET_INIT_LIBFUNCS): Define.
974         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
975         spec content.
976         (TARGET_ELF): Apply different mcmodel setting.
977         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
978         been migrated into elf.h and linux.h files.
979         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
980         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
981         (mcmodel): The content has been migrated into nds32-elf.opt and
982         nds32-linux.opt files.
983         * config/nds32/t-elf: New file.
984         * config/nds32/t-linux: New file.
986 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
987             Shiva Chen  <shiva0217@gmail.com>
989         * config/nds32/constants.md (unspec_volatile_element): Add
990         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
991         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
992         optimization.
993         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
994         (make_pass_nds32_fp_as_gp): Declare.
995         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
996         optmization pass.
997         (nds32_asm_function_end_prologue): Remove unused asm output.
998         (nds32_asm_function_begin_epilogue): Remove unused asm output.
999         (nds32_asm_file_start): Output necessary fp_as_gp information.
1000         (nds32_option_override): Adjust register usage.
1001         (nds32_expand_prologue): Consider fp_as_gp situation.
1002         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
1003         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
1004         (epilogue): Ditto.
1005         (return): Ditto.
1006         (simple_return): Ditto.
1007         (omit_fp_begin): Output special directive for fp_as_gp.
1008         (omit_fp_end): Output special directive for fp_as_gp.
1009         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
1010         mforbid-fp-as-gp): New options.
1012 2018-06-01  Mark Wielaard  <mark@klomp.org>
1014         * dwarf2out.c (dwarf2out_finish): Remove generation of
1015         DW_AT_loclists_base.
1017 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
1019         * gimple-ssa-store-merging.c: Include gimple-fold.h.
1020         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
1021         (struct merged_store_group): Add bit_insertion field.
1022         (dump_char_array): Use standard hexadecimal format.
1023         (merged_store_group::merged_store_group): Set bit_insertion to false.
1024         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
1025         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
1026         also print the mask in the dump file.
1027         (pass_store_merging::gate): Minor tweak.
1028         (imm_store_chain_info::coalesce_immediate): Fix wrong association
1029         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
1030         stores with INTEGER_CST stores.
1031         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
1032         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
1033         and use it throughout.  Generate bit insertion sequences if need be.
1034         (pass_store_merging::process_store): Remove redundant condition.
1035         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
1037 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
1039         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
1040         the 128-bit floating point types.  Fix function comment.
1042 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1044         * config/aarch64/aarch64-simd.md
1045         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
1046         mnemonics.
1047         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
1048         mnemonics.
1050 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
1052         PR tree-optimization/85989
1053         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
1054         variable.
1055         (backprop::intersect_uses): Check it when deciding whether this
1056         is a backedge reference.
1057         (backprop::process_block): Add each phi to m_visited_phis
1058         after visiting it, then clear it at the end.
1060 2018-06-01  Richard Biener  <rguenther@suse.de>
1062         * tree-vectorizer.h (vect_dr_stmt): New function.
1063         (vect_get_load_cost): Adjust.
1064         (vect_get_store_cost): Likewise.
1065         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
1066         Use vect_dr_stmt instead of DR_SMTT.
1067         (vect_record_base_alignments): Likewise.
1068         (vect_calculate_target_alignment): Likewise.
1069         (vect_compute_data_ref_alignment): Likewise and make static.
1070         (vect_update_misalignment_for_peel): Likewise.
1071         (vect_verify_datarefs_alignment): Likewise.
1072         (vector_alignment_reachable_p): Likewise.
1073         (vect_get_data_access_cost): Likewise.  Pass down
1074         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
1075         (vect_get_peeling_costs_all_drs): Likewise.
1076         (vect_peeling_hash_get_lowest_cost): Likewise.
1077         (vect_enhance_data_refs_alignment): Likewise.
1078         (vect_find_same_alignment_drs): Likewise.
1079         (vect_analyze_data_refs_alignment): Likewise.
1080         (vect_analyze_group_access_1): Likewise.
1081         (vect_analyze_group_access): Likewise.
1082         (vect_analyze_data_ref_access): Likewise.
1083         (vect_analyze_data_ref_accesses): Likewise.
1084         (vect_vfa_segment_size): Likewise.
1085         (vect_small_gap_p): Likewise.
1086         (vectorizable_with_step_bound_p): Likewise.
1087         (vect_prune_runtime_alias_test_list): Likewise.
1088         (vect_analyze_data_refs): Likewise.
1089         (vect_supportable_dr_alignment): Likewise.
1090         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
1091         (vect_gen_prolog_loop_niters): Likewise.
1092         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1093         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
1094         modify DR_STMT.
1095         (vect_recog_mask_conversion_pattern): Likewise.
1096         (vect_try_gather_scatter_pattern): Likewise.
1097         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
1098         to vect_get_store_cost.
1099         (vect_get_store_cost): Get stmt_info instead of DR.
1100         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
1101         (vect_get_load_cost): Get stmt_info instead of DR.
1103 2018-06-01  Richard Biener  <rguenther@suse.de>
1105         PR middle-end/86017
1106         * gimple-fold.c (var_decl_component_p): Also allow offsetted
1107         vars wrapped in MEM_REFs.
1109 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
1111         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
1112         Fix subreg tests so that we only return a choice between
1113         GENERAL_REGS and FP_REGS if the original classes included both.
1115 2018-06-01  Richard Biener  <rguenther@suse.de>
1117         PR ipa/85960
1118         * tree-ssa-structalias.c (get_function_part_constraint):
1119         Handle NULL fi->decl.
1120         (find_func_aliases_for_call): Properly handle indirect
1121         fi from direct call.
1122         (find_func_clobbers): Likewise.
1123         (ipa_pta_execute): Likewise.
1124         (create_variable_info_for): For functions that are ifunc_resolver
1125         resolve to a varinfo that contains the result of the resolver call.
1126         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
1127         aliases.
1129 2018-05-31  Michael Collison  <michael.collison@arm.com>
1131         * config/aarch64/aarch64.md:
1132         (*fix_to_zero_extenddfdi2): New pattern.
1133         * gcc.target/aarch64/fix_extend1.c: New testcase.
1135 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
1137         PR middle-end/78809
1138         PR middle-end/83026
1139         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
1140         and BUILT_IN_STRNCMP_EQ.
1141         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
1142         BUILT_IN_STRNCMP_EQ.
1143         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
1144         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
1145         (gimple_fold_builtin): Likewise.
1146         * tree-ssa-strlen.c (compute_string_length): New function.
1147         (determine_min_obsize): New function.
1148         (handle_builtin_string_cmp): New function to handle calls to
1149         string compare functions.
1150         (strlen_optimize_stmt): Add handling to builtin string compare
1151         calls.
1152         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
1153         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
1154         * tree.c (build_common_builtin_nodes): Add new defines of
1155         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
1157 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
1159         PR target/85984
1160         * bb-reorder.c (pass_partition_blocks::gate): Return false for
1161         functions with naked attribute.
1163 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
1165         * config/i386/sse.md (avx_vec_concat<mode>):
1166         Substitute concat_tg_mode mode attribute with xtg_mode.
1167         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
1168         (concat_tg_mode): Remove mode attribute.
1170 2018-05-31  Martin Sebor  <msebor@redhat.com>
1172         PR c/82063
1173         * calls.c (alloc_max_size): Correct a logic error/typo.
1174         Treat excessive arguments as infinite.  Warn for invalid arguments.
1175         * doc/invoke.texi (-Walloc-size-larger-than): Update.
1177 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
1179         PR target/85829
1180         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
1181         and movx for Haswell.
1183 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
1184             Cesar Philippidis  <cesar@codesourcery.com>
1186         PR middle-end/85879
1187         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
1188         when emitting error on private/firstprivate reductions.
1189         * omp-low.c (lower_omp_target): Avoid reference-type processing
1190         on pointers for firstprivate clause.
1192 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
1194         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
1195         (st1x2): Likewise.
1196         (st1x3): Likewise.
1197         * config/aarch64/aarch64-simd.md
1198         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
1199         (aarch64_ld1_x3_<mode>): Likewise
1200         (aarch64_st1x2<VALLDIF:mode>): Likewise
1201         (aarch64_st1_x2_<mode>): Likewise
1202         (aarch64_st1x3<VALLDIF:mode>): Likewise
1203         (aarch64_st1_x3_<mode>): Likewise
1204         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
1205         (vld1_s8_x3): Likewise.
1206         (vld1_u16_x3): Likewise.
1207         (vld1_s16_x3): Likewise.
1208         (vld1_u32_x3): Likewise.
1209         (vld1_s32_x3): Likewise.
1210         (vld1_u64_x3): Likewise.
1211         (vld1_s64_x3): Likewise.
1212         (vld1_f16_x3): Likewise.
1213         (vld1_f32_x3): Likewise.
1214         (vld1_f64_x3): Likewise.
1215         (vld1_p8_x3): Likewise.
1216         (vld1_p16_x3): Likewise.
1217         (vld1_p64_x3): Likewise.
1218         (vld1q_u8_x3): Likewise.
1219         (vld1q_s8_x3): Likewise.
1220         (vld1q_u16_x3): Likewise.
1221         (vld1q_s16_x3): Likewise.
1222         (vld1q_u32_x3): Likewise.
1223         (vld1q_s32_x3): Likewise.
1224         (vld1q_u64_x3): Likewise.
1225         (vld1q_s64_x3): Likewise.
1226         (vld1q_f16_x3): Likewise.
1227         (vld1q_f32_x3): Likewise.
1228         (vld1q_f64_x3): Likewise.
1229         (vld1q_p8_x3): Likewise.
1230         (vld1q_p16_x3): Likewise.
1231         (vld1q_p64_x3): Likewise.
1232         (vst1_s64_x2): Likewise.
1233         (vst1_u64_x2): Likewise.
1234         (vst1_f64_x2): Likewise.
1235         (vst1_s8_x2): Likewise.
1236         (vst1_p8_x2): Likewise.
1237         (vst1_s16_x2): Likewise.
1238         (vst1_p16_x2): Likewise.
1239         (vst1_s32_x2): Likewise.
1240         (vst1_u8_x2): Likewise.
1241         (vst1_u16_x2): Likewise.
1242         (vst1_u32_x2): Likewise.
1243         (vst1_f16_x2): Likewise.
1244         (vst1_f32_x2): Likewise.
1245         (vst1_p64_x2): Likewise.
1246         (vst1q_s8_x2): Likewise.
1247         (vst1q_p8_x2): Likewise.
1248         (vst1q_s16_x2): Likewise.
1249         (vst1q_p16_x2): Likewise.
1250         (vst1q_s32_x2): Likewise.
1251         (vst1q_s64_x2): Likewise.
1252         (vst1q_u8_x2): Likewise.
1253         (vst1q_u16_x2): Likewise.
1254         (vst1q_u32_x2): Likewise.
1255         (vst1q_u64_x2): Likewise.
1256         (vst1q_f16_x2): Likewise.
1257         (vst1q_f32_x2): Likewise.
1258         (vst1q_f64_x2): Likewise.
1259         (vst1q_p64_x2): Likewise.
1260         (vst1_s64_x3): Likewise.
1261         (vst1_u64_x3): Likewise.
1262         (vst1_f64_x3): Likewise.
1263         (vst1_s8_x3): Likewise.
1264         (vst1_p8_x3): Likewise.
1265         (vst1_s16_x3): Likewise.
1266         (vst1_p16_x3): Likewise.
1267         (vst1_s32_x3): Likewise.
1268         (vst1_u8_x3): Likewise.
1269         (vst1_u16_x3): Likewise.
1270         (vst1_u32_x3): Likewise.
1271         (vst1_f16_x3): Likewise.
1272         (vst1_f32_x3): Likewise.
1273         (vst1_p64_x3): Likewise.
1274         (vst1q_s8_x3): Likewise.
1275         (vst1q_p8_x3): Likewise.
1276         (vst1q_s16_x3): Likewise.
1277         (vst1q_p16_x3): Likewise.
1278         (vst1q_s32_x3): Likewise.
1279         (vst1q_s64_x3): Likewise.
1280         (vst1q_u8_x3): Likewise.
1281         (vst1q_u16_x3): Likewise.
1282         (vst1q_u32_x3): Likewise.
1283         (vst1q_u64_x3): Likewise.
1284         (vst1q_f16_x3): Likewise.
1285         (vst1q_f32_x3): Likewise.
1286         (vst1q_f64_x3): Likewise.
1287         (vst1q_p64_x3): Likewise.
1289 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1291         * config/msp430/msp430.c (msp430_output_labelref): Prepend
1292         user_label_prefix to name.
1294         * tree-core.h: Update comment about the format of NAME string
1295         passed to handler in attribute_spec.
1297         * config/msp430/msp430.md: Remove erroneous subreg expression from
1298         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
1299         zero_extend{q,h}isi2.
1301 2018-05-30  Borislav Petkov  <bp@suse.de>
1303         * doc/extend.texi: Document some architecture specific
1304         constraints and sort entries.
1306 2018-05-30  Martin Sebor  <msebor@redhat.com>
1308         PR middle-end/85369
1309         * builtins.c (expand_builtin_stpcpy_1): New function.
1310         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
1311         only if the former succeeds.
1313 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
1315         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
1316         in saphira.
1318 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
1320         * doc/invoke.texi (-flinker-output): Document
1322 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
1324         * passes.c (ipa_write_summaries): Only modify statements if body
1325         is in memory.
1326         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
1327         incrementally linking.
1328         (ipa_passes): Likewise.
1329         * lto-cgraph.c (lto_output_node): When incrementally linking do not
1330         pass down resolution info.
1331         * common.opt (flag_incremental_link): Update info.
1332         * gcc.c (plugin specs): Turn flinker-output=* to
1333         -plugin-opt=-linker-output-known
1334         * toplev.c (compile_file): Also cut compilation when doing incremental
1335         link.
1336         * flag-types. (enum lto_partition_model): Add
1337         LTO_LINKER_OUTPUT_NOLTOREL.
1338         (invoke.texi): Add -flinker-output docs.
1339         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
1340         link same way as WPA; do not stream in dead initializers.
1342         * dwarf2out.c (dwarf2out_die_ref_for_decl,
1343         darf2out_register_external_decl): Support incremental link.
1345 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
1347         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
1349 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
1351         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
1352         it down to simple_object_copy_lto_debug_sections.
1353         (run_gcc): Determine incremental LTO link time and configure
1354         lto1 into non-wpa mode, disable renaming of debug sections.
1356 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1358         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
1359         descriptions of various incorrectly documented functions.
1361 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
1363         Revert:
1364         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
1365         address check not strict.
1367 2018-05-30  Richard Biener  <rguenther@suse.de>
1369         PR tree-optimization/85964
1370         * tracer.c (better_p): Drop initialized count check, we only
1371         call the function with initialized counts now.
1372         (find_best_successor): Do find a best edge if one
1373         has uninitialized count.
1374         (find_best_predecessor): Likewise.  Do BB frequency check only
1375         if count is initialized.
1377 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
1379         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
1380         (aarch64_ldrstr_offset_compare): New.
1381         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
1382         load/store orderings.
1383         (aarch64_gen_adjusted_ldpstp): Likewise.
1385 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
1387         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
1388         Check for subset of GENERAL_REGS and FP_REGS.
1389         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
1390         r=w alternative.
1392 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
1394         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
1395         and wi::to_poly_offset.  Add the current offset and then check
1396         whether the sum fits, rather than using an unchecked addition of
1397         a checked term.  Check for a shwi rather than a uhwi.
1398         * expr.c (get_bit_range): Use tree_to_poly_uint64.
1399         (store_constructor): Use poly_int_tree_p.
1400         (expand_expr_real_1): Likewise.
1401         * function.c (assign_temp): Likewise.
1402         * fold-const.c (const_binop): Use poly_int_tree_p and
1403         wi::to_poly_offset.
1404         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
1405         division.
1406         * ipa-icf-gimple.c (func_checker::compare_operand): Use
1407         to_poly_offset for MEM offsets.
1408         * ipa-icf.c (sem_variable::equals): Likewise.
1409         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
1410         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
1411         wi::to_poly_offset for BIT_FIELD_REF offsets.
1412         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
1413         wi::to_poly_offset.
1414         * var-tracking.c (emit_note_insn_var_location): Use
1415         tree_to_poly_uint64.
1417 2018-05-29  Jim Wilson  <jimw@sifive.com>
1419         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
1421 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
1423         PR target/85950
1424         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
1425         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
1426         sequence.
1427         (sse4_1_round<mode>2): Use nonimmediate_operand
1428         for operand 1 predicate.
1430 2018-05-29  Martin Sebor  <msebor@redhat.com>
1431             Richard Biener  <rguenther@suse.de>
1433         PR testsuite/85888
1434         * calls.c (get_size_range): Call determine_value_range instead
1435         of get_value_range..
1436         * tree-vrp.h (determine_value_range): Declared new function.
1437         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
1439 2018-05-29  Richard Biener  <rguenther@suse.de>
1441         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
1442         sure to use non-pattern stmts for get_earlier_stmt arguments.
1443         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
1444         called on pattern stmts.
1445         (get_later_stmt): Likewise.
1447 2018-05-29  Martin Liska  <mliska@suse.cz>
1449         PR gcov-profile/85759
1450         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
1451         env variables.
1453 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
1455         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
1456         VEC_UNPACK_*_EXPR.
1457         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
1458         VEC_PACK_*_EXPR.
1460         PR target/85918
1461         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
1462         VEC_PACK_FLOAT_EXPR): New tree codes.
1463         * tree-pretty-print.c (op_code_prio): Handle
1464         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
1465         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
1466         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
1467         * tree-inline.c (estimate_operator_cost): Likewise.
1468         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
1469         * fold-const.c (const_binop): Likewise.
1470         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
1471         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
1472         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
1473         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
1474         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
1475         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
1476         * expr.c (expand_expr_real_2): Likewise.
1477         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
1478         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
1479         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
1480         optabs.
1481         * optabs.c (expand_widen_pattern_expr): For
1482         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
1483         sign from result type rather than operand's type.
1484         (expand_binop_directly): For vec_packu_float_optab and
1485         vec_packs_float_optab allow result type to be different from operand's
1486         type.
1487         * optabs-tree.c (optab_for_tree_code): Handle
1488         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
1489         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
1490         * tree-vect-generic.c (expand_vector_operations_1):  Handle
1491         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
1492         VEC_PACK_FLOAT_EXPR.
1493         * tree-vect-stmts.c (supportable_widening_operation): Handle
1494         FIX_TRUNC_EXPR.
1495         (supportable_narrowing_operation): Handle FLOAT_EXPR.
1496         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
1497         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
1498         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
1499         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
1500         mode attributes.
1501         (vec_pack<floatprefix>_float_<mode>): New expander.
1502         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
1503         attributes.
1504         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
1505         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
1506         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
1507         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
1508         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
1509         Document.
1510         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
1511         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
1512         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
1513         VEC_PACK_FLOAT_EXPR): Document.
1515 2018-05-29  Richard Biener  <rguenther@suse.de>
1517         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
1518         member.
1519         (stmt_vec_info_vec): Make pointer.
1520         (init_stmt_vec_info_vec): Remove.
1521         (free_stmt_vec_info_vec): Likewise.
1522         (set_stmt_vec_info_vec): New function.
1523         (free_stmt_vec_infos): Likewise.
1524         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
1525         (set_vinfo_for_stmt): Likewise.
1526         (get_earlier_stmt): Likewise.
1527         (get_later_stmt): Likewise.
1528         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
1529         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
1530         (vec_info::~vec_info): Free stmt_vec_infos.
1531         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
1532         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
1533         (pass_slp_vectorize::execute): Likewise.
1534         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
1535         (free_stmt_vec_info_vec): Likewise.
1536         (set_stmt_vec_info_vec): New function.
1537         (free_stmt_vec_infos): Likewise.
1538         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
1539         the global stmt_vec_info_vec.
1540         * tree-parloops.c (gather_scalar_reductions): Use
1541         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
1542         vector.
1544 2018-05-29  Richard Biener  <rguenther@suse.de>
1546         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
1548 2018-05-29  Martin Liska  <mliska@suse.cz>
1549             David Malcolm  <dmalcolm@redhat.com>
1551         * vec.c (test_reverse): New.
1552         (vec_c_tests): Add new test.
1553         * vec.h (vl_ptr>::reverse): New function.
1555 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
1557         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
1559         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
1560         and later.
1562 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1564         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
1566 2018-05-28  Richard Biener  <rguenther@suse.de>
1568         PR tree-optimization/85933
1569         * tree-vect-data-refs.c (vect_record_base_alignments): Only
1570         look at stmts marked as vectorizable.
1572 2018-05-28  Richard Biener  <rguenther@suse.de>
1574         PR tree-optimization/85934
1575         * tree-vect-generic.c (expand_vector_operations_1): Hoist
1576         vector boolean check before scalar optimization.
1578 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
1580         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
1581         for armv5te.
1583 2018-05-28  Mark Wielaard  <mark@klomp.org>
1585         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
1586         if it is an expression containing a minus sign.
1588 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
1590         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
1592 2018-05-27  Paul Koning  <ni1d@arrl.net>
1594         * config/pdp11/pdp11.md (truncsihi2): Remove.
1596 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
1597             Chung-Ju Wu  <jasonwucj@gmail.com>
1599         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
1600         implementation.
1601         (unaligned_store_dw): Ditto.
1602         * config/nds32/nds32-memory-manipulation.c
1603         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
1604         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
1605         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
1606         (emit_setmem_word_loop): Rename to ...
1607         (emit_setmem_doubleword_loop): ... this.
1608         (nds32_gen_dup_4_byte_to_word_value): New function.
1609         (nds32_gen_dup_8_byte_to_double_word_value): New function.
1610         (nds32_expand_setmem_loop): Refine implementation.
1611         (nds32_expand_setmem_loop_v3m): Ditto.
1612         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
1613         pattern.
1615 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
1617         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
1619 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
1621         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
1622         (nds32_init_machine_status): Initialize machine->attr_naked_p and
1623         machine->attr_no_prologue_p.
1624         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
1625         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
1626         (nds32_expand_epilogue): Consider attr_naked_p.
1627         (nds32_expand_epilogue_v3pop): Likewise.
1628         (nds32_can_use_return_insn): Likewise.
1629         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
1630         attr_no_prologue_p fields.
1631         * config/nds32/nds32.opt (mret-in-naked-func): New option.
1633 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
1635         PR target/85918
1636         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
1637         attributes.
1638         * config/i386/sse.md
1639         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
1640         Rename to ...
1641         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
1642         ... this.
1643         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
1644         Rename to ...
1645         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
1646         ... this.
1647         (*<floatsuffix>floatv2div2sf2): Rename to ...
1648         (*float<floatunssuffix>v2div2sf2): ... this.
1649         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
1650         (float<floatunssuffix>v2div2sf2_mask): ... this.
1651         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
1652         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
1653         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
1654         to ...
1655         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
1656         ... this.
1657         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
1658         Rename to ...
1659         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
1660         ... this.
1661         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
1662         Rename to ...
1663         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
1664         ... this.
1665         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
1666         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
1667         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
1668         gen_ufix_truncv8dfv8si2.
1669         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
1670         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
1671         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
1672         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
1673         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
1674         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
1675         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
1676         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
1678 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
1680         PR target/85900
1681         PR target/85345
1682         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
1684 2018-05-25  Jim Wilson  <jimw@sifive.com>
1686         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
1687         * config/riscv/riscv.c (struct machine_function): Add
1688         interrupt_handler_p and attribute_checked_p fields.
1689         (riscv_attribute_table): Add interrupt.
1690         (riscv_interrupt_type_p): New.
1691         (riscv_save_reg_p): Save extra regs for interrupt handler.
1692         (riscv_use_save_libcall): Return false  for interrupt handler.
1693         (riscv_first_stack_step): Add forward declaration.
1694         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
1695         for interrupt handler with large frame.  Use it for saved reg list.
1696         (riscv_expand_prologue): Move flag_stack_usage_info support to
1697         eliminate duplication.
1698         (riscv_expand_epilogue): Generate mret for interrupt handler.
1699         (riscv_epilogue_uses): New.
1700         (riscv_can_use_return_insn): Return false for interrupt handler.
1701         (riscv_function_ok_for_sibcall): Likewise.
1702         (riscv_set_current_function): Add interrupt handler support.
1703         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
1704         * config/riscv/riscv.md (UNSPECV_MRET): New.
1705         (GP_REGNUM): New.
1706         (riscv_frflags, riscv_fsflags): Use tab after opcode.
1707         (riscv_mret): New.
1708         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
1710 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
1712         PR tree-optimization/85712
1713         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
1714         this candidate has already been replaced in-situ by a copy.
1716 2018-05-25  Jason Merrill  <jason@redhat.com>
1718         PR c++/80485 - inline function non-zero address.
1719         * symtab.c (nonzero_address): Check DECL_COMDAT.
1721 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
1723         PR target/83628
1724         * config/alpha/alpha.md (ashlsi3): New insn pattern.
1725         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
1726         extension of SImode operation.  Use const123_operand predicate.
1727         (*saddsi_1): Remove.
1728         (*saddl_se_1): Ditto.
1729         (*ssubsi_1): Ditto.
1730         (*ssubl_se_1): Ditto.
1731         * config/alpha/predicates.md (const123_operand): New predicate.
1732         * config/alpha/constraints.md (P): Use IN_RANGE.
1734 2018-05-25  Richard Biener  <rguenther@suse.de>
1736         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
1737         defaulted to true.
1738         (ref_maybe_used_by_stmt_p): Likewise.
1739         (stmt_may_clobber_ref_p): Likewise.
1740         (stmt_may_clobber_ref_p_1): Likewise.
1741         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
1742         and pass it along.
1743         (ref_maybe_used_by_stmt_p): Likewise.
1744         (stmt_may_clobber_ref_p): Likewise.
1745         (stmt_may_clobber_ref_p_1): Likewise.
1746         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
1747         the alias oracle to disambiguate DRs with stmts DR analysis
1748         couldn't handle.
1749         (vect_analyze_data_refs): Do not give up on not analyzable
1750         DRs for BB vectorization.  Remove code truncating the dataref
1751         vector.
1753 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
1755         PR target/85832
1756         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
1757         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
1758         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
1760 2018-05-25  Richard Biener  <rguenther@suse.de>
1762         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
1763         function, combining stmt data ref gathering and fatal analysis
1764         parts.
1765         (vect_analyze_data_refs): Remove now redudnant code and simplify.
1766         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
1767         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
1768         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
1769         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
1771 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
1773         PR tree-optimization/85720
1774         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
1775         SCC if all partitions are builtins.
1776         (version_loop_by_alias_check): New parameter.  Generate cancelable
1777         runtime alias check if all partitions are builtins.
1778         (distribute_loop): Update call to above function.
1780 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
1782         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
1783         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
1784         (parm_default_def_partition_arg): Ditto.
1785         (set_parm_default_def_partition): Ditto.
1786         (get_parm_default_def_partitions): Ditto and make it static.
1787         (get_undefined_value_partitions): Ditto and make it static.
1788         (remove_ssa_form): Refactor call to init_var_map here.
1789         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
1790         computation for loop region.
1791         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
1792         (register_default_def): Delete.
1793         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
1794         (parm_default_def_partition_arg): Ditto.
1795         (set_parm_default_def_partition): Ditto.
1796         (get_parm_default_def_partitions): Ditto and make it static.
1797         (get_undefined_value_partitions): Ditto and make it static.
1798         (coalesce_with_default, coalesce_with_default): Update comment.
1799         (create_coalesce_list_for_region): New func factored out from
1800         create_outofssa_var_map.
1801         (populate_coalesce_list_for_outofssa): New func factored out from
1802         create_outofssa_var_map and coalesce_ssa_name.
1803         (create_outofssa_var_map): Delete.
1804         (coalesce_ssa_name): Refactor to support live range computation.
1805         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
1806         (get_parm_default_def_partitions): Delete.
1807         (get_undefined_value_partitions): Ditto.
1808         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
1809         computation for loop region.
1810         (new_tree_live_info, loe_visit_block): Ditto.
1811         (live_worklist, set_var_live_on_entry): Ditto.
1812         (calculate_live_on_exit, verify_live_on_entry): Ditto.
1813         * tree-ssa-live.h (struct _var_map): New fields.
1814         (init_var_map): Change decl.
1815         (region_contains_p): New.
1817 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
1819         * tree-ssa-live.h (live_merge_and_clear): Delete.
1821 2018-05-25  Richard Biener  <rguenther@suse.de>
1823         PR c++/85912
1824         * tree-dump.c (dequeue_and_dump): Remove access to removed
1825         operand 2 of a SWITCH_EXPR.
1827 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
1829         * doc/sourcebuild.texi (vect_double_cond_arith): Include
1830         multiplication and division.
1831         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
1832         (cond_udiv@var{m}, cond_umod@var{m}): Document.
1833         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
1834         (cond_udiv_optab, cond_umod_optab): New optabs.
1835         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
1836         (IFN_COND_RDIV): New internal functions.
1837         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
1838         TRUNC_MOD_EXPR and RDIV_EXPR.
1839         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
1840         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
1841         New unspecs.
1842         (SVE_INT_BINARY): Include mult.
1843         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
1844         (optab, sve_int_op): Handle mult.
1845         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
1846         UNSPEC_COND_DIV.
1847         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
1848         for SVE_INT_BINARY_SD.
1850 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
1852         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
1853         (optab, sve_int_op): Handle div and udiv.
1854         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
1855         for SVE_INT_BINARY_SD.
1856         (*<optab><mode>3): New insn for the same.
1858 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
1860         * tree-vect-patterns.c: Include predict.h.
1861         (vect_recog_divmod_pattern): Restrict check for division support
1862         to when optimizing for size.
1864 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
1866         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
1867         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
1868         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
1869         (gimple_match_op::set_op): Likewise.
1870         (gimple_resimplify4): Declare.
1871         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
1872         (expr::gen_transform): Likewise.
1873         (decision_tree::gen): Generate a simplification routine for 4 operands.
1874         * gimple-match-head.c (gimple_simplify): Add an overload for
1875         4 operands.  In the top-level function, handle up to 4 call
1876         arguments and call gimple_resimplify4.
1877         (gimple_resimplify4): New function.
1878         (build_call_internal): Pass a fourth operand.
1879         (maybe_push_to_seq): Likewise.
1880         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
1881         Fold VEC_COND_EXPRs of an operation and a default value into
1882         an IFN_COND_* function if possible.
1883         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
1884         New unspecs.
1885         (SVE_COND_FP_BINARY): Include them.
1886         (optab, sve_fp_op): Handle them.
1887         (SVE_INT_BINARY_REV): New code iterator.
1888         (SVE_COND_FP_BINARY_REV): New int iterator.
1889         (commutative): New int attribute.
1890         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
1891         Declare.
1892         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
1893         function.
1894         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
1895         (*cond_<optab><mode>): New patterns for reversed operands.
1897 2018-05-25  Richard Biener  <rguenther@suse.de>
1899         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
1900         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
1901         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
1902         (STMT_VINFO_GROUPED_ACCESS): Adjust.
1903         * tree-vect-data-refs.c (everywhere): Adjust users.
1904         * tree-vect-loop.c (everywhere): Likewise.
1905         * tree-vect-slp.c (everywhere): Likewise.
1906         * tree-vect-stmts.c (everywhere): Likewise.
1907         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
1909 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1911         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
1912         Rename to...
1913         (gcc_cv_as_section_exclude): ... this.
1914         Try Solaris as #exclude syntax.
1915         * configure: Regenerate.
1916         * config.in: Regenerate.
1917         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
1918         SECTION_EXCLUDE.
1919         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
1920         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
1922         * varasm.c (default_elf_asm_named_section): Don't check if
1923         HAVE_GAS_SECTION_EXCLUDE is defined.
1925 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
1927         * doc/md.texi: Update the documentation of the cond_* optabs
1928         to mention the new final operand.  Fix GET_MODE_NUNITS call.
1929         Describe the scalar case too.
1930         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
1931         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
1932         instead of 2.
1933         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
1934         (get_conditional_internal_fn): Update comment.
1935         * tree-vect-loop.c (vectorizable_reduction): Pass the original
1936         accumulator value as a final argument to conditional functions.
1937         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
1938         a define_expand and add an "else" operand.  Assert for now that
1939         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
1940         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
1941         (*cond_<optab><mode>): New patterns.
1942         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
1943         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
1944         (UNSPEC_COND_EOR): Delete.
1945         (optab): Remove associated mappings.
1946         (SVE_INT_BINARY): New code iterator.
1947         (sve_int_op): Remove int attribute and add "minus" to the code
1948         attribute.
1949         (SVE_COND_INT_OP): Delete.
1950         (SVE_COND_FP_OP): Rename to...
1951         (SVE_COND_FP_BINARY): ...this.
1953 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
1955         * optabs.c (can_reuse_operands_p): New function.
1956         (maybe_legitimize_operands): Try to reuse the results for
1957         earlier operands.
1959 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
1961         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
1962         Add {q} suffix to insn mnemonic.
1964 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1966         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
1967         (msp430_warn_func_return): New.
1969 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
1971         * fold-const.c (tree_nonzero_bits): New function.
1972         * fold-const.h (tree_nonzero_bits): Likewise.
1973         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
1974         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
1976 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
1978         PR target/85900
1979         PR target/85345
1980         * varasm.c (assemble_alias): Check ifunc_resolver only on
1981         FUNCTION_DECL.
1983 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
1985         PR target/85903
1986         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
1987         when memory input operand is handled.
1989 2018-05-24  Luis Machado  <luis.machado@linaro.org>
1991         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
1992         global.
1993         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
1995 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
1997         * match.pd: Delay FMA folds until after vectorization.
1999 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2001         PR target/83009
2002         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
2003         address check not strict.
2005 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
2007         * gimple-match.h (gimple_match_op): New class.
2008         (mprts_hook): Replace parameters with a gimple_match_op *.
2009         (maybe_build_generic_op): Likewise.
2010         (gimple_simplified_result_is_gimple_val): Replace parameters with
2011         a const gimple_match_op *.
2012         (gimple_simplify): Replace code_helper * and tree * parameters with
2013         a gimple_match_op * parameter.
2014         (gimple_resimplify1): Replace code_helper *, tree and tree *
2015         parameters with a gimple_match_op * parameter.
2016         (gimple_resimplify2): Likewise.
2017         (gimple_resimplify3): Likewise.
2018         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
2019         parameters with a gimple_match_op * parameter.
2020         * gimple-match-head.c (gimple_simplify): Change prototypes of
2021         auto-generated functions to take a gimple_match_op * instead of
2022         separate code_helper * and tree * parameters.  Make the same
2023         change in the top-level overload and update calls to the
2024         gimple_resimplify routines.  Update calls to the auto-generated
2025         functions and to maybe_push_res_to_seq in the publicly-facing
2026         operation-specific gimple_simplify overloads.
2027         (gimple_match_op::MAX_NUM_OPS): Define.
2028         (gimple_resimplify1): Replace rcode and ops with a single res_op
2029         parameter.  Update call to gimple_simplify.
2030         (gimple_resimplify2): Likewise.
2031         (gimple_resimplify3): Likewise.
2032         (mprts_hook): Replace parameters with a gimple_match_op *.
2033         (maybe_build_generic_op): Likewise.
2034         (build_call_internal): Replace type, nargs and ops with
2035         a gimple_match_op *.
2036         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
2037         with a single gimple_match_op *.  Update calls to mprts_hook,
2038         build_call_internal and gimple_simplified_result_is_gimple_val.
2039         Factor out code that is common to the tree_code and combined_fn cases.
2040         * genmatch.c (expr::gen_transform): Replace tem_code and
2041         tem_ops with a gimple_match_op called tem_op.  Update calls
2042         to the gimple_resimplify functions and maybe_push_res_to_seq.
2043         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
2044         res_ops.  Update call to the gimple_resimplify functions.
2045         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
2046         (decision_tree::gen): Make the functions take a gimple_match_op *
2047         called res_op instead of separate res_code and res_ops parameters.
2048         Update call accordingly.
2049         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
2050         and ops with a single res_op parameter.  Update calls to
2051         maybe_build_generic_op and maybe_push_res_to_seq.
2052         (fold_stmt_1): Update calls to gimple_simplify and
2053         replace_stmt_with_simplification.
2054         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
2055         and gimple_simplified_result_is_gimple_val.
2056         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
2057         gimple_simplify.
2058         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
2059         with a gimple_match_op *.
2060         (vn_nary_build_or_lookup): Likewise.  Update call to
2061         vn_nary_build_or_lookup_1.
2062         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
2063         gimple_match_op *.  Update calls to the gimple_resimplify routines
2064         and to gimple_simplified_result_is_gimple_val.
2065         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
2066         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
2067         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
2068         (visit_nary_op): Likewise.
2069         (visit_reference_op_load): Likewise.
2071 2018-05-23  Luis Machado  <luis.machado@linaro.org>
2073         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
2074         modifier for printing the step amount.
2076 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
2078         PR target/78849
2079         * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
2080         types.
2082 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
2084         * doc/sourcebuild.texi (Endianness): New subsubsection.
2086 2018-05-23  Luis Machado  <luis.machado@linaro.org>
2088         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2089         <prefetch_dynamic_strides>: New const bool field.
2090         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2091         prefetch_dynamic_strides.
2092         (exynosm1_prefetch_tune): Likewise.
2093         (thunderxt88_prefetch_tune): Likewise.
2094         (thunderx_prefetch_tune): Likewise.
2095         (thunderx2t99_prefetch_tune): Likewise.
2096         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
2097         false.
2098         (aarch64_override_options_internal): Update to set
2099         PARAM_PREFETCH_DYNAMIC_STRIDES.
2100         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
2101         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
2102         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
2103         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
2104         prefetch-dynamic-strides setting.
2106 2018-05-23  Luis Machado  <luis.machado@linaro.org>
2108         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2109         <minimum_stride>: New const int field.
2110         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2111         minimum_stride field defaulting to -1.
2112         (exynosm1_prefetch_tune): Likewise.
2113         (thunderxt88_prefetch_tune): Likewise.
2114         (thunderx_prefetch_tune): Likewise.
2115         (thunderx2t99_prefetch_tune): Likewise.
2116         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
2117         <default_opt_level>: Set to 3.
2118         (aarch64_override_options_internal): Update to set
2119         PARAM_PREFETCH_MINIMUM_STRIDE.
2120         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
2121         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
2122         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
2123         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
2124         stride is constant and is below the minimum stride threshold.
2126 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2128         * config/arm/arm-cpus.in (mode26): Delete.
2129         (armv4): Delete mode26 reference.
2130         * config/arm/arm.c (arm_configure_build_target): Delete use of
2131         isa_bit_mode26.
2133 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
2135         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
2136         New insn pattern.
2137         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
2138         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
2139         for non-SSE modes.
2140         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
2141         (floatunsdidf2): Ditto.
2143 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
2145         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
2146         (fixuns_trunc<mode>si2_avx512f): Ditto.
2147         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
2148         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
2149         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
2151 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
2153         PR rtl-optimization/79985
2154         * df-scan.c (df_insn_refs_collect): Remove special case for
2155         global registers and asm statements.
2157 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
2159         * extend.texi (Global Register Variables): Rewrite the bullet list.
2160         Note that the register is available for allocation. Note that access
2161         via inline asm must use constraints. Add note about async-signal
2162         handlers. Remove paragraph about automagic register selection.
2164 2018-05-23  Richard Biener  <rguenther@suse.de>
2166         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
2167         of fixed offset from memset VN.
2169 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
2171         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
2172         first_interp field.
2173         (alloc_cand_and_find_basis): Initialize first_interp field.
2174         (slsr_process_mul): Modify first_interp field.
2175         (slsr_process_add): Likewise.
2176         (slsr_process_cast): Modify first_interp field for each new
2177         interpretation.
2178         (slsr_process_copy): Likewise.
2179         (dump_candidate): Dump first_interp field.
2180         (replace_mult_candidate): Process all interpretations, not just
2181         subsequent ones.
2182         (replace_rhs_if_not_dup): Likewise.
2183         (replace_one_candidate): Likewise.
2185 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
2187         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
2188         Add new boolean.
2189         (aarch64_needs_frame_chain): New function.
2190         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
2192 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
2194         PR target/84882
2195         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
2196         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
2197         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
2198         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
2199         as true for strict-align.
2200         (aarch64_can_inline_p): Perform checks even when callee has no
2201         attributes to check for strict alignment.
2202         * doc/extend.texi (AArch64 Function Attributes): Document
2203         no-strict-align.
2204         * doc/invoke.texi: (AArch64 Options): Likewise.
2206 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
2208         PR tree-optimization/85853
2209         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
2210         the handling of the root of the node to...
2211         (vect_slp_analyze_node_operations_1): ...this new function,
2212         and run the whole thing with the child nodes' def types
2213         set according to their SLP node's def type.
2215 2018-05-23  Richard Biener  <rguenther@suse.de>
2217         PR middle-end/85874
2218         * tree-data-ref.c (create_runtime_alias_checks): Defer
2219         and ignore overflow warnings.
2221 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
2223         PR tree-optimization/85822
2224         * tree-vrp.c (is_masked_range_test): Fix handling of negative
2225         constants.
2227 2018-05-23  Richard Biener  <rguenther@suse.de>
2229         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
2230         memset constants via native_interpret_expr.
2232 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
2234         PR target/85345
2235         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
2236         attribute.
2237         (cgraph_node::create_alias): Likewise.
2238         (cgraph_node::get_availability): Check ifunc_resolver instead
2239         of looking up ifunc attribute.
2240         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
2241         * varasm.c (do_assemble_alias): Likewise.
2242         (assemble_alias): Likewise.
2243         (default_binds_local_p_3): Likewise.
2244         * cgraph.h (cgraph_node): Add ifunc_resolver.
2245         (cgraph_node::only_called_directly_or_aliased_p): Return false
2246         for IFUNC resolver.
2247         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
2248         attribute.
2249         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
2250         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
2251         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
2252         instead of looking up ifunc attribute.
2254 2018-05-22  Luis Machado  <luis.machado@linaro.org>
2256         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
2258 2018-05-22  Martin Sebor  <msebor@redhat.com>
2260         PR middle-end/85359
2261         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
2262         only when expasion succeeds.
2263         (expand_builtin_strcmp): Same.
2264         (expand_builtin_strncmp): Same.
2266 2018-05-22  Martin Sebor  <msebor@redhat.com>
2268         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
2270 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
2271             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2273         * config/aarch64/aarch64-ldpstp.md: Replace uses of
2274         aarch64_mem_pair_operand with memory_operand and delete operand swapping
2275         code.
2276         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
2277         Add check for legitimate_address.
2278         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
2279         (aarch64_swap_ldrstr_operands): New.
2280         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
2281         Define prototype.
2283 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
2284             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2286         * config/aarch64/aarch64.md: New patterns to generate stp
2287         and ldp.
2288         (store_pair_sw, store_pair_dw): New patterns to generate stp for
2289         single words and double words.
2290         (load_pair_sw, load_pair_dw): Likewise.
2291         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
2292         Delete.
2293         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
2294         Delete.
2295         * config/aarch64/aarch64-ldpstp.md: Modify peephole
2296         for different mode ldpstp and add peephole for merged zero stores.
2297         Likewise for loads.
2298         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
2299         Add size check.
2300         (aarch64_gen_store_pair): Rename calls to match new patterns.
2301         (aarch64_gen_load_pair): Rename calls to match new patterns.
2302         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
2303         (load_pair<DREG:mode><DREG2:mode>): ... This.
2304         (store_pair<mode>): Rename to...
2305         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
2306         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
2307         New mode iterators.
2308         (V_INT_EQUIV): Handle SImode.
2309         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
2310         New predicate.
2312 2018-05-22  Martin Sebor  <msebor@redhat.com>
2314         PR c/85623
2315         * calls.c (maybe_warn_nonstring_arg): Use string length to set
2316         or ajust the presumed bound on an operation to avoid unnecessary
2317         warnings.
2319 2018-05-22  Martin Sebor  <msebor@redhat.com>
2321         PR tree-optimization/85826
2322         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
2323         assuming that a DECL necesarily has a constant size.
2325 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
2327         PR middle-end/85862
2328         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
2330 2018-05-22  Richard Biener  <rguenther@suse.de>
2332         PR tree-optimization/85834
2333         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
2334         non-constant and non-zero memset arguments.
2336 2018-05-22  Martin Liska  <mliska@suse.cz>
2338         PR ipa/85607
2339         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
2341 2018-05-22  Richard Biener  <rguenther@suse.de>
2343         PR tree-optimization/85863
2344         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
2345         comparisons when vectype is specified.
2346         (vectorizable_condition): Do not specify vectype for
2347         vect_is_simple_cond when SLP vectorizing.
2349 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
2351         PR target/85657
2352         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
2353         define __ibm128 as long double.
2354         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
2355         as a distinct type when IEEE 128-bit support is enabled.
2356         (init_float128_ieee): Fix up conversions between IFmode and IEEE
2357         128-bit types to use the correct functions.
2358         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
2359         convert between 128-bit floating point types that have different
2360         modes but the same representation, instead of using gen_lowpart to
2361         makean alias.
2362         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
2363         KFmode.
2364         (IFKF_reg): New attributes to give the register constraints for
2365         IFmode and KFmode.
2366         (extend<mode>tf2_internal): New insns to mark an explicit
2367         conversion between 128-bit floating point types that have a
2368         different mode but share the same representation.
2370 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
2372         PR tree-optimization/85814
2373         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
2374         a null return from get_strinfo when unsharing the next
2375         strinfo in the chain.
2377 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
2379         PR gcc/84923
2380         * varasm.c (weak_finish): Clean up weak_decls.
2382 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2384         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
2385         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
2386         UNSPEC_UADALP values.
2387         * config/aarch64/iterators.md (ABAL): New int iterator.
2388         (ABDL2): Likewise.
2389         (ADALP): Likewise.
2390         (sur): Add mappings for the above.
2391         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
2392         New define_insn.
2393         (aarch64_<sur>abal<mode>_4): Likewise.
2394         (aarch64_<sur>adalp<mode>_3): Likewise.
2395         (<sur>sadv16qi): New define_expand.
2397 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
2399         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
2400         (*movdf_internal): Ditto.
2401         (*rcpsf2_sse): Ditto.
2402         (*rsqrtsf2_sse): Ditto.
2403         (*sqrt<mode>2_sse): Ditto.
2405 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
2407         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
2408         eor3q<mode>4.
2409         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
2410         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
2411         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
2412         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
2413         vbcaxq_s64): New.
2414         * config/aarch64/arm_neon.h: Likewise.
2415         * config/aarch64/iterators.md (VQ_I): New.
2417 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
2419         * config.gcc: Add arc/t-multilib-linux to tmake_file for
2420         arc*-*-linux*.
2421         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
2422         MULTILIB_DIRNAMES
2424 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
2426         * config/nds32/constraints.md (S): New constraint.
2427         * config/nds32/nds32.md (call_internal): Use constraint S.
2428         (call_value_internal): Likewise.
2429         (sibcall_internal): Likewise.
2430         (sibcall_value_internal): Likewise.
2432 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
2433             Chung-Ju Wu  <jasonwucj@gmail.com>
2435         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
2436         into consideration.
2438 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
2439             Chung-Ju Wu  <jasonwucj@gmail.com>
2441         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
2442         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
2443         (nds32_rtx_costs_impl): Simplify.
2444         (nds32_address_cost_impl): Simplify.
2445         (nds32_init_rtx_costs): New function.
2446         (nds32_rtx_costs_speed_prefer): Likewise.
2447         (nds32_rtx_costs_size_prefer): Likewise.
2448         (nds32_address_cost_speed_prefer): Likewise.
2449         (nds32_address_cost_speed_fwprop): Likewise.
2450         (nds32_address_cost_size_prefer): Likewise.
2451         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
2452         * config/nds32/nds32.c (nds32_option_override): Use
2453         nds32_init_rtx_costs function.
2455 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
2457         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
2458         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
2459         (TARGET_PIPELINE_N8): Likewise.
2460         (TARGET_PIPELINE_N10): Likewise.
2461         (TARGET_PIPELINE_N13): Likewise.
2462         (TARGET_PIPELINE_GRAYWOLF): Likewise.
2464 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
2466         * config/nds32/nds32-fpu.md: Update copyright year.
2468 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
2470         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
2472 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
2474         * config/nds32/nds32.c
2475         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
2476         * config/nds32/nds32.opt (minline-asm-r15): New option.
2478 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
2480         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
2481         MASK_HW_ABS.
2482         * config/nds32/nds32.md (abssi2): New pattern.
2484 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
2486         * config/i386/i386.md (rex64namesuffix): New mode attribute.
2487         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
2488         Merge insn pattern from sse_cvtsi2ss<round_name> and
2489         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
2490         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
2491         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
2492         using SWI48 mode iterator.
2493         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
2494         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
2495         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
2496         pattern from sse_cvttss2si<round_saeonly_name>
2497         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
2498         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
2499         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
2500         using SWI48 mode iterator.
2501         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
2502         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
2503         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
2504         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
2505         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
2506         using SWI48 mode iterator.
2507         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
2508         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
2509         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
2510         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
2511         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
2512         SWI48 mode iterator.
2513         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
2514         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
2515         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
2516         pattern from sse_cvttsd2si<round_saeonly_name>
2517         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
2519 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
2521         * config/nds32/nds32-md-auxiliary.c
2522         (nds32_valid_smw_lwm_base_p): Refine.
2523         (nds32_output_smw_single_word): Refine.
2524         (nds32_output_smw_double_word): New.
2525         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
2527 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
2529         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
2530         (nds32_output_stack_pop): Refine.
2531         (nds32_expand_unaligned_load): Refine.
2532         (nds32_expand_unaligned_store): Refine.
2534 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
2535             Chung-Ju Wu  <jasonwucj@gmail.com>
2537         * config/nds32/constants.md: Add TP_REGNUM constant.
2538         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
2539         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
2540         UNSPEC_ADD32.
2541         * config/nds32/nds32-doubleword.md: Consider flag_pic.
2542         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
2543         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
2544         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
2545         and PIC code generation.
2546         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
2547         code generation.
2548         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
2549         optimization.
2550         * config/nds32/nds32.md: Support TLS and PIC.
2551         * config/nds32/nds32.c: Support TLS and PIC.
2552         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
2553         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
2554         predicate.
2556 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
2558         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
2559         mode with E_ prefix.
2561 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
2562             Chung-Ju Wu  <jasonwucj@gmail.com>
2564         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
2565         * config/nds32/nds32-md-auxiliary.c
2566         (symbolic_reference_mentioned_p): New.
2567         (nds32_legitimize_ict_address): New.
2568         (nds32_expand_ict_move): New.
2569         (nds32_indirect_call_referenced_p): New.
2570         (nds32_symbol_binds_local_p): Delete.
2571         (nds32_long_call_p): Modify.
2572         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
2573         * config/nds32/nds32-protos.h
2574         (symbolic_reference_mentioned_p): Declare.
2575         (nds32_legitimize_ict_address): Declare.
2576         (nds32_expand_ict_move): Declare.
2577         (nds32_indirect_call_referenced_p): Declare.
2578         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
2579         (nds32_relax_group): Use nds32_ict_const_p as condition.
2580         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
2581         (nds32_asm_file_start): Output ict_model directive in asm code.
2582         (nds32_legitimate_address_p): Consider indirect call.
2583         (nds32_print_operand): Consider indirect call.
2584         (nds32_print_operand_address): Consider indirect call.
2585         (nds32_insert_attributes): Handle "indirect_call" attribute.
2586         (TARGET_LEGITIMATE_ADDRESS_P): Define.
2587         (TARGET_LEGITIMATE_CONSTANT_P): Define.
2588         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
2589         (TARGET_DELEGITIMIZE_ADDRESS): Define.
2590         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
2591         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
2592         (TARGET_ICT_MODEL_SMALL): Define.
2593         (TARGET_ICT_MODEL_LARGE): Define.
2594         * config/nds32/nds32.md (movsi): Consider ict model.
2595         (call, call_value): Consider ict model.
2596         (sibcall, sibcall_value): Consider ict model.
2597         * config/nds32/nds32.opt (mict-model): New option.
2598         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
2599         model.
2601 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
2602             Monk Chiang  <sh.chiang04@gmail.com>
2603             Jim Wilson <jimw@sifive.com>
2605         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
2606         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
2607         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
2608         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
2609         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
2610         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
2611         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
2612         compute save_libcall_adjustment properly.
2613         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
2614         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
2615         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
2616         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
2617         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
2618         (ABI_SPEC): Handle mabi=ilp32e.
2619         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
2620         (RVE): Add RVE mask.
2621         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
2622         <-march>: Add rv32e as an example.
2624 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
2626         PR c++/82899
2627         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
2628         (intra_create_variable_infos): Handle C++ constructors.
2630 2018-05-18  Martin Liska  <mliska@suse.cz>
2632         * passes.def: Remove a redundant pass.
2634 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
2636         PR bootstrap/85838
2637         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
2639 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2641         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
2642         (ARMv4): Update.
2643         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
2644         (ARMv6m): Update.
2645         (armv2, armv2a, armv3, armv3m): Delete architectures.
2646         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
2647         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
2648         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
2649         Delete cpus.
2650         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
2651         (*mulsidi3adddi): Likewise.
2652         (mulsidi3): Likewise.
2653         (*mulsidi3_nov6): Likewise.
2654         (umulsidi3): Likewise.
2655         (umulsidi3_nov6): Likewise.
2656         (umaddsidi4): Likewise.
2657         (*umulsidi3adddi): Likewise.
2658         (smulsi3_highpart): Likewise.
2659         (*smulsi3_highpart_nov6): Likewise.
2660         (umulsi3_highpart): Likewise.
2661         (*umulsi3_highpart_nov6): Likewise.
2662         * config/arm/arm.h (arm_arch3m): Delete.
2663         * config/arm/arm.c (arm_arch3m): Delete.
2664         (arm_option_override_internal): Update armv3-related comment.
2665         (arm_configure_build_target): Delete use of isa_bit_mode32.
2666         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
2667         (arm_rtx_costs_internal): Delete check of arm_arch3m.
2668         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
2669         (mulsa3): Likewise.
2670         (mulusa3): Likewise.
2671         * config/arm/arm-protos.h (arm_arch3m): Delete.
2672         * config/arm/arm-tables.opt: Regenerate.
2673         * config/arm/arm-tune.md: Likewise.
2674         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
2675         deleted architectures.
2677 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2679         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
2680         (armv5t, armv5te): New features.
2681         (ARMv5, ARMv5e): Delete fgroups.
2682         (ARMv5t, ARMv5te): Adjust for above changes.
2683         (ARMv6m): Likewise.
2684         (armv5, armv5e): Delete arches.
2685         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
2686         arm_arch5.
2687         (*call_reg_arm): Likewise.
2688         (*call_value_reg_armv5): Likewise.
2689         (*call_value_reg_arm): Likewise.
2690         (*call_symbol): Likewise.
2691         (*call_value_symbol): Likewise.
2692         (*sibcall_insn): Likewise.
2693         (*sibcall_value_insn): Likewise.
2694         (clzsi2): Likewise.
2695         (prefetch): Likewise.
2696         (define_split and define_peephole2 dependent on arm_arch5):
2697         Likewise.
2698         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
2699         arm_arch5e.
2700         (TARGET_ARM_QBIT): Likewise.
2701         (TARGET_DSP_MULTIPLY): Likewise.
2702         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
2703         (arm_arch5, arm_arch5e): Delete.
2704         (arm_arch5t, arm_arch5te): Declare.
2705         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
2706         (arm_arch5t): Declare.
2707         (arm_option_reconfigure_globals): Update for the above.
2708         (arm_options_perform_arch_sanity_checks): Update comment, replace
2709         use of arm_arch5 with arm_arch5t.
2710         (use_return_insn): Likewise.
2711         (arm_emit_call_insn): Likewise.
2712         (output_return_instruction): Likewise.
2713         (arm_final_prescan_insn): Likewise.
2714         (arm_coproc_builtin_available): Likewise.
2715         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
2716         arm_arch5e with arm_arch5t and arm_arch5te.
2717         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
2718         (arm_arch5t, arm_arch5te): Declare.
2719         * config/arm/arm-tables.opt: Regenerate.
2720         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
2721         * config/arm/t-multilib: Likewise.
2722         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
2723         instead of arm_arch5.
2724         (*call_reg_thumb1): Likewise.
2725         (*call_value_reg_thumb1_v5): Likewise.
2726         (*call_value_reg_thumb1): Likewise.
2727         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
2728         unreachable path.
2729         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
2731 2018-05-18  Martin Liska  <mliska@suse.cz>
2733         PR gcov-profile/84846
2734         * doc/gcov.texi: Document -t option of gcov tool.
2736 2018-05-18  Martin Liska  <mliska@suse.cz>
2738         PR gcov-profile/84846
2739         * gcov.c (print_usage): Add new -t option.
2740         (process_args): Handle the option.
2741         (generate_results): Use stdout as output when requested by
2742         the option.
2744 2018-05-18  Martin Liska  <mliska@suse.cz>
2746         PR gcov-profile/84846
2747         * coverage.c (coverage_init): Write PWD to .gcno file.
2748         * doc/gcov.texi: Document how working directory is printed.
2749         * gcov-dump.c (dump_gcov_file): Print PWD.
2750         * gcov.c (output_intermediate_file): Likewise.
2751         (read_graph_file): Read PWD string.
2752         (output_lines): Print PWD.
2754 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2756         PR middle-end/85817
2757         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
2758         for retval and return false if all args to phi are zero.
2760 2018-05-18  Richard Biener  <rguenther@suse.de>
2762         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
2763         method.
2764         (evrp_dom_walker::before_dom_children): Call it.
2766 2018-05-18  Richard Biener  <rguenther@suse.de>
2768         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
2769         results when processing array refs with variable index.
2771 2018-05-18  Toon Moene  <toon@moene.org>
2773         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
2774         directly after that of -floop-interchange. Indicate that both
2775         options are enabled by default when specifying -O3.
2777 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2779         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
2780         iterator.  Delete separate integer-mode vec_set<mode> expander.
2781         (aarch64_simd_vec_setv2di): Delete.
2782         (vec_setv2di): Delete.
2783         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
2784         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
2785         the "w, r" alternative.
2787 2018-05-18  Martin Liska  <mliska@suse.cz>
2789         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
2790         * tree-pass.h (make_pass_lower_switch_O0): New function.
2791         * tree-switch-conversion.c (node_has_low_bound): Remove.
2792         (node_has_high_bound): Likewise.
2793         (node_is_bounded): Likewise.
2794         (class pass_lower_switch): Make it a template type and create
2795         two instances.
2796         (pass_lower_switch::execute): Add template argument.
2797         (make_pass_lower_switch): New function.
2798         (make_pass_lower_switch_O0): New function.
2799         (do_jump_if_equal): Remove.
2800         (emit_case_nodes): Simplify to just handle all 3 cases and leave
2801         all the hard work to tree optimization passes.
2803 2018-05-18  Martin Liska  <mliska@suse.cz>
2805         * dbgcnt.c (limit_low): Renamed from limit.
2806         (limit_high): New variable.
2807         (dbg_cnt_is_enabled): Check for upper limit.
2808         (dbg_cnt): Adjust dumping.
2809         (dbg_cnt_set_limit_by_index): Add new argument for high
2810         value.
2811         (dbg_cnt_set_limit_by_name): Likewise.
2812         (dbg_cnt_process_single_pair): Parse new format.
2813         (dbg_cnt_process_opt): Use strtok.
2814         (dbg_cnt_list_all_counters): Remove 'value' and add
2815         'limit_high'.
2816         * doc/invoke.texi: Document changes.
2818 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
2820         * doc/sourcebuild.texi (scalar_all_fma): Document.
2821         * tree.def (FMA_EXPR): Delete.
2822         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
2823         * internal-fn.c (ternary_direct): New macro.
2824         (expand_ternary_optab_fn): Likewise.
2825         (direct_ternary_optab_supported_p): Likewise.
2826         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
2827         * builtins.c (fold_builtin_fma): Delete.
2828         (fold_builtin_3): Don't call it.
2829         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
2830         * expr.c (expand_expr_real_2): Likewise.
2831         * fold-const.c (operand_equal_p): Likewise.
2832         (fold_ternary_loc): Likewise.
2833         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
2834         * gimple.c (DEFTREECODE): Likewise.
2835         * gimplify.c (gimplify_expr): Likewise.
2836         * optabs-tree.c (optab_for_tree_code): Likewise.
2837         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
2838         * tree-eh.c (operation_could_trap_p): Likewise.
2839         (stmt_could_throw_1_p): Likewise.
2840         * tree-inline.c (estimate_operator_cost): Likewise.
2841         * tree-pretty-print.c (dump_generic_node): Likewise.
2842         (op_code_prio): Likewise.
2843         * tree-ssa-loop-im.c (stmt_cost): Likewise.
2844         * tree-ssa-operands.c (get_expr_operands): Likewise.
2845         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
2846         * fold-const-call.h (fold_fma): Delete.
2847         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
2848         CFN_FNMA and CFN_FNMS.
2849         (fold_fma): Delete.
2850         * genmatch.c (combined_fn): New enum.
2851         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
2852         (commutative_op): New function.
2853         (commutate): Use it.  Handle more than 2 operands.
2854         (dt_operand::gen_gimple_expr): Use commutative_op.
2855         (parser::parse_expr): Allow :c to be used with non-binary
2856         operators if the commutative operand is known.
2857         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
2858         CFN_FMS, CFN_FNMA and CFN_FNMS.
2859         (backprop::process_assign_use): Remove FMA_EXPR handling.
2860         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
2861         (gen_hsa_fma): New function.
2862         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
2863         IFN_FNMA and IFN_FNMS.
2864         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
2865         * gimple-fold.h (follow_all_ssa_edges): Declare.
2866         * gimple-fold.c (follow_all_ssa_edges): New function.
2867         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
2868         gimple_build interface and use follow_all_ssa_edges to fold the result.
2869         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
2870         instead of checking for optabs directly.
2871         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
2872         rather than FMA_EXPRs.
2873         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
2874         call to IFN_FMA instead of an FMA_EXPR.
2876 2018-05-17  Jim Wilson  <jimw@sifive.com>
2878         * expr.c (do_tablejump): When converting index to Pmode, if we have a
2879         sign extended promoted subreg, and the range does not have the sign bit
2880         set, then do a sign extend.
2882         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
2883         test, check for sign extended subreg and/or constant operands, and
2884         do a sign extend in that case.
2886 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
2888         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
2889         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
2890         Add untyped.
2891         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
2892         Change logics_shift_reg to logics_shift_imm.
2893         (thunderx2t99_fp_loadpair_basic): Delete.
2894         (thunderx2t99_fp_storepair_basic): Delete.
2895         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
2896         (thunderx2t99_asimd_polynomial): Delete.
2897         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
2898         and neon_fp_mul_d_scalar_q.
2899         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
2900         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
2901         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
2902         (thunderx2t99_asimd_lut): Add missing tbl types.
2903         (thunderx2t99_asimd_ext): Delete.
2904         (thunderx2t99_asimd_load1_1_mult): Delete.
2905         (thunderx2t99_asimd_load1_2_mult): Delete.
2906         (thunderx2t99_asimd_load1_ldp): New.
2907         (thunderx2t99_asimd_load1): New.
2908         (thunderx2t99_asimd_load2): Add missing *load2* types.
2909         (thunderx2t99_asimd_load3): New.
2910         (thunderx2t99_asimd_load4): New.
2911         (thunderx2t99_asimd_store1_1_mult): Delete.
2912         (thunderx2t99_asimd_store1_2_mult): Delete.
2913         (thunderx2t99_asimd_store2_mult): Delete.
2914         (thunderx2t99_asimd_store2_onelane): Delete.
2915         (thunderx2t99_asimd_store_stp): New.
2916         (thunderx2t99_asimd_store1): New.
2917         (thunderx2t99_asimd_store2): New.
2918         (thunderx2t99_asimd_store3): New.
2919         (thunderx2t99_asimd_store4): New.
2921 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
2923         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
2924         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
2926 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
2927             Segher Boessenkool  <segher@kernel.crashing.org>
2929         PR target/85698
2930         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
2931         operand.
2933 2018-05-17  Richard Biener  <rguenther@suse.de>
2935         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
2936         for pruning loop and prune defs feeding only already visited PHIs.
2938 2018-05-17  Richard Biener  <rguenther@suse.de>
2940         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
2942 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
2943             Richard Biener  <rguenther@suse.de>
2945         PR tree-optimization/85793
2946         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
2947         for VMAT_ELEMENTWISE.
2949 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
2951         * internal-fn.h (lookup_internal_fn): Declare
2952         * internal-fn.c (lookup_internal_fn): New function.
2953         * gimple.c (gimple_build_call_from_tree): Handle calls to
2954         internal functions.
2955         * gimple-pretty-print.c (dump_gimple_call): Print "." before
2956         internal function names.
2957         * tree-pretty-print.c (dump_generic_node): Likewise.
2958         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
2960 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
2962         * gimple-fold.h (gimple_build): Make the function forms take
2963         combined_fn rather than built_in_function.
2964         (gimple_simplify): Likewise.
2965         * gimple-match-head.c (gimple_simplify): Likewise.
2966         * gimple-fold.c (gimple_build): Likewise.
2967         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
2968         rather than gimple_build_call_internal.
2969         (get_initial_defs_for_reduction): Likewise.
2970         (vect_create_epilog_for_reduction): Likewise.
2971         (vectorizable_live_operation): Likewise.
2973 2018-05-17  Martin Liska  <mliska@suse.cz>
2975         * gimple-ssa-sprintf.c (format_directive): Do not use
2976         space in between 'G_' and '('.
2978 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
2980         PR target/85323
2981         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
2982         even if the mask is not all ones.
2984         PR target/85323
2985         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
2986         vector.
2987         (ix86_gimple_fold_builtin): Likewise.
2989         PR target/85323
2990         * config/i386/i386.c: Include tree-vector-builder.h.
2991         (ix86_vector_shift_count): New function.
2992         (ix86_fold_builtin): Fold shift builtins by scalar count.
2993         (ix86_gimple_fold_builtin): Likewise.
2995         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
2996         _mm512_setzero): New intrinsics.
2998 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
2999             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3001         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
3002         code generation for cases where splatting a value is not useful.
3003         * simplify-rtx.c (simplify_ternary_operation): Simplify
3004         vec_merge across a vec_duplicate and a paradoxical subreg forming
3005         a vector mode to a vec_concat.
3007 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
3009         * config.gcc: Support "goldmont-plus".
3010         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
3011         "goldmont-plus".
3012         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
3013         PROCESSOR_GOLDMONT_PLUS.
3014         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
3015         (processor_target_table): Add "goldmont-plus".
3016         (PTA_GOLDMONT_PLUS): Define.
3017         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
3018         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
3019         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
3020         (fold_builtin_cpu): Add "goldmont-plus".
3021         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
3022         (ix86_option_override_internal): Add "goldmont-plus".
3023         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
3024         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
3025         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
3026         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
3028 2018-05-17  Richard Biener  <rguenther@suse.de>
3030         PR tree-optimization/85757
3031         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
3032         remove defs that only feed that PHI from further processing.
3034 2018-05-16  Jim Wilson  <jimw@sifive.com>
3036         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
3037         asterisk to name.
3038         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
3040 2018-05-16  Mark Wielaard  <mark@klomp.org>
3042         * dwarf2out.c (count_index_strings): New function.
3043         (output_indirect_strings): Call count_index_strings and generate
3044         header for dwarf_version >= 5.
3046 2018-05-16  Mark Wielaard  <mark@klomp.org>
3048         * dwarf2out.c (dwarf_FORM): New function.
3049         (set_indirect_string): Use dwarf_FORM.
3050         (reset_indirect_string): Likewise.
3051         (size_of_die): Likewise.
3052         (value_format): Likewise.
3053         (output_die): Likewise.
3054         (add_skeleton_AT_string): Likewise.
3055         (output_macinfo_op): Likewise.
3056         (index_string): Likewise.
3057         (output_index_string_offset): Likewise.
3058         (output_index_string): Likewise.
3059         (count_index_strings): Likewise.
3061 2018-05-16  Carl Love  <cel@us.ibm.com>
3063         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
3064         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
3066 2018-05-16  Martin Jambor  <mjambor@suse.cz>
3068         * ipa-prop.c (ipa_free_all_edge_args): Remove.
3069         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
3071 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
3073         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
3074         (fnma<mode>4): Likewise.
3075         (fms<mode>4): Likewise.
3076         (fnms<mode>4): Likewise.
3077         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
3078         (aarch64_fnma<mode>4): Likewise.
3079         (aarch64_fms<mode>4): Likewise.
3080         (aarch64_fnms<mode>4): Likewise.
3081         (aarch64_fnmadd<mode>4): Likewise.
3083 2018-05-16  Jason Merrill  <jason@redhat.com>
3085         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
3087 2018-05-16  Richard Biener  <rguenther@suse.de>
3089         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
3090         (dump_stmt_cost): Declare.
3091         (add_stmt_cost): Dump cost we add.
3092         (add_stmt_costs): New function.
3093         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
3094         No longer exported.
3095         (vect_analyze_stmt): Adjust prototype.
3096         (vectorizable_condition): Likewise.
3097         (vectorizable_live_operation): Likewise.
3098         (vectorizable_reduction): Likewise.
3099         (vectorizable_induction): Likewise.
3100         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
3101         cost vector to pass to vectorizable_ and record afterwards.
3102         (vect_model_reduction_cost): Take cost vector argument and adjust.
3103         (vect_model_induction_cost): Likewise.
3104         (vectorizable_reduction): Likewise.
3105         (vectorizable_induction): Likewise.
3106         (vectorizable_live_operation): Likewise.
3107         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
3108         SLP_TREE_NUMBER_OF_VEC_STMTS.
3109         (vect_analyze_slp_cost_1): Remove.
3110         (vect_analyze_slp_cost): Likewise.
3111         (vect_slp_analyze_node_operations): Take visited args and
3112         a target cost vector.  Avoid processing already visited stmt sets.
3113         (vect_slp_analyze_operations): Use a local cost vector to gather
3114         costs and register those of non-discarded instances.
3115         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
3116         (vect_schedule_slp_instance): Remove copying of
3117         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
3118         zero.
3119         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
3120         adding cost.  Record cost entry location.
3121         (vect_prologue_cost_for_slp_op): Function to compute cost of
3122         a constant or invariant generated for SLP vect in the prologue,
3123         split out from vect_analyze_slp_cost_1.
3124         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
3125         (vect_model_promotion_demotion_cost): Likewise.
3126         (vect_model_store_cost): Likewise, make static.
3127         (vect_model_load_cost): Likewise.
3128         (vectorizable_bswap): Add cost vector arg and adjust.
3129         (vectorizable_call): Likewise.
3130         (vectorizable_simd_clone_call): Likewise.
3131         (vectorizable_conversion): Likewise.
3132         (vectorizable_assignment): Likewise.
3133         (vectorizable_shift): Likewise.
3134         (vectorizable_operation): Likewise.
3135         (vectorizable_store): Likewise.
3136         (vectorizable_load): Likewise.
3137         (vectorizable_condition): Likewise.
3138         (vectorizable_comparison): Likewise.
3139         (can_vectorize_live_stmts): Likewise.
3140         (vect_analyze_stmt): Likewise.
3141         (vect_transform_stmt): Adjust calls to vectorizable_*.
3142         * tree-vectorizer.c: Include gimple-pretty-print.h.
3143         (dump_stmt_cost): New function.
3145 2018-05-16  Richard Biener  <rguenther@suse.de>
3147         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
3148         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
3149         * tree-ssa-dse.c: Include tree-ssa-loop.h.
3150         (check_name): New callback.
3151         (dse_classify_store): Track cycles via a visited bitmap of PHI
3152         defs and simplify handling of in-loop and across loop dead stores
3153         and properly fail for loop-variant refs.  Handle byte-tracking with
3154         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
3155         limiting the walk.
3157 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
3159         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
3160         (vect_get_mask_type_for_stmt): Likewise.
3161         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
3162         split out from...
3163         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
3164         to determine the statement's vector type and the vector type that
3165         should be used for calculating nunits.  Deal with cases in which
3166         the type has to be deferred.
3167         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
3168         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
3169         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
3170         (vect_determine_vf_for_stmt): New functions, split out from...
3171         (vect_determine_vectorization_factor): ...here.
3172         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
3173         (vect_get_mask_type_for_stmt): New functions, split out from
3174         vect_determine_vectorization_factor.
3176 2018-05-16  Richard Biener  <rguenther@suse.de>
3178         * tree-cfg.c (verify_gimple_assign_ternary): Properly
3179         verify the [VEC_]COND_EXPR embedded comparison.
3181 2018-05-15  Martin Sebor  <msebor@redhat.com>
3183         PR tree-optimization/85753
3184         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
3185         RECORD_TYPE in addition to ARRAY_TYPE.
3187 2018-05-15  Martin Sebor  <msebor@redhat.com>
3189         PR middle-end/85643
3190         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
3192 2018-05-15  Richard Biener  <rguenther@suse.de>
3194         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
3195         add by_clobber_p one.  Change algorithm to collect all defs
3196         representing uses we need to walk and try reducing them to
3197         a single one before failing.
3198         (dse_dom_walker::dse_optimize_stmt): Adjust.
3200 2018-05-13  Mark Wielaard  <mark@klomp.org>
3202         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
3203         (size_of_loc_descr): Likewise.
3204         (output_loc_operands): Likewise.
3205         (output_loc_operands_raw): Likewise.
3206         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
3207         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
3208         (hash_loc_operands): Likewise.
3209         (compare_loc_operands): Likewise.
3211 2018-05-14  Mark Wielaard  <mark@klomp.org>
3213         * dwarf2out.c (count_index_addrs): New function.
3214         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
3216 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3218         PR tree-optimization/83648
3219         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
3220         return value as malloc candidate.
3222 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3224         PR ipa/85734
3225         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
3226         param as true in call to suggest_attribute.
3228 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
3230         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
3231         -mreadonly-in-sdata.
3233 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3235         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
3236         New pattern.
3237         (aarch64_crypto_aesd_fused): Likewise.
3239 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
3241         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
3242         (movsi_aarch64): Likewise.
3243         (load_pairsi): Likewise.
3244         (load_pairdi): Likewise.
3245         (store_pairsi): Likewise.
3246         (store_pairdi): Likewise.
3247         (load_pairsf): Likewise.
3248         (load_pairdf): Likewise.
3249         (store_pairsf): Likewise.
3250         (store_pairdf): Likewise.
3251         (zero_extend): Likewise.
3252         (trunc): Swap alternatives.
3253         (fcvt_target): Add '?' to prefer w over r.
3255 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
3257         PR target/85756
3258         * config/i386/i386.md: Disallow non-commutative arithmetics in
3259         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
3260         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
3261         in the peephole2 before it.
3263 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
3265         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
3266         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
3267         (ix86_handle_option): Handle -mcldemote.
3268         * config.gcc: New header.
3269         * config/i386/cldemoteintrin.h: New file.
3270         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
3271         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
3272         -mcldemote.
3273         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
3274         OPTION_MASK_ISA_CLDEMOTE.
3275         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
3276         (ix86_valid_target_attribute_inner_p): Ditto.
3277         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
3278         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
3279         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
3280         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
3281         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
3282         (cldemote): New.
3283         * config/i386/i386.opt: Add -mcldemote.
3284         * config/i386/x86intrin.h: New header.
3285         * doc/invoke.texi: Add -mcldemote.
3287 2018-05-14  Richard Biener  <rguenther@suse.de>
3289         * doc/match-and-simplify.texi: Adjust :s documentation.
3291 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
3293         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
3294         intended memcpy size.
3295         (REORDER_45): Likewise.
3297 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
3299         * sort.cc: New file.
3300         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
3301         * vec.c (qsort_chk): Use gcc_qsort.
3302         * Makefile.in (OBJS-libcommon): Add sort.o.
3303         (build/sort.o): New target.  Use it...
3304         (BUILD_RTL): ... here, and...
3305         (build/gencfn-macros): ... here, and...
3306         (build/genmatch): ... here.
3308 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
3309             Chung-Ju Wu  <jasonwucj@gmail.com>
3311         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
3312         * config/nds32/nds32-graywolf.md: New file.
3313         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
3314         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
3315         pipeline.
3316         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
3317         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
3318         * config/nds32/nds32.md (pipeline_model): Add graywolf.
3319         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
3320         * config/nds32/pipelines.md: Include n15 settings.
3322 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
3323             Chung-Ju Wu  <jasonwucj@gmail.com>
3325         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
3326         * config/nds32/nds32-n13.md: New file.
3327         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
3328         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
3329         pipeline.
3330         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
3331         * config/nds32/nds32.md (pipeline_model): Add n13.
3332         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
3333         * config/nds32/pipelines.md: Include n13 settings.
3335 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
3336             Chung-Ju Wu  <jasonwucj@gmail.com>
3338         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
3339         * config/nds32/nds32-n10.md: New file.
3340         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
3341         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
3342         pipeline.
3343         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
3344         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
3345         * config/nds32/nds32.md (pipeline_model): Add n10.
3346         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
3347         * config/nds32/pipelines.md: Include n10 settings.
3349 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
3350             Kito Cheng  <kito.cheng@gmail.com>
3351             Chung-Ju Wu  <jasonwucj@gmail.com>
3353         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
3354         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
3355         Add enum values for DSP extension instructions.
3356         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
3357         New constraints.
3358         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
3359         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
3360         New code iterators.
3361         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
3362         * config/nds32/nds32-dspext.md: New file for DSP implementation.
3363         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
3364         * config/nds32/nds32-intrinsic.md: Likewise.
3365         * config/nds32/nds32_intrinsic.h: Likewise.
3366         * config/nds32/nds32-md-auxiliary.c: Likewise.
3367         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
3368         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
3369         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
3370         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
3371         * config/nds32/nds32-protos.h: New declarations for DSP extension.
3372         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
3373         TYPE_DMAC in switch statement.
3374         * config/nds32/nds32.c: New checking and implementation for DSP
3375         extension instructions.
3376         * config/nds32/nds32.h: Likewise.
3377         * config/nds32/nds32.md: Likewise.
3378         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
3379         * config/nds32/predicates.md: Implement new predicates for DSP
3380         extension.
3382 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
3384         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
3385         Reformat alternatives and attributes so it is easier to identify
3386         which constraints/attributes go with which instruction.
3387         (mov<mode>_hardfloat32, FMOVE64): Likewise.
3388         (mov<mode>_softfloat32, FMOVE64): Likewise.
3389         (mov<mode>_hardfloat64, FMOVE64): Likewise.
3390         (mov<mode>_softfloat64, FMOVE64): Likewise.
3392 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3394         * doc/extend.texi (PowerPC Built-in Functions): Rename this
3395         subsection.
3396         (Basic PowerPC Built-in Functions): The new name of the
3397         subsection previously known as "PowerPC Built-in Functions".
3398         (Basic PowerPC Built-in Functions Available on all Configurations):
3399         New subsubsection.
3400         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
3401         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
3402         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
3403         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
3405 2018-05-11  Martin Jambor  <mjambor@suse.cz>
3407         PR ipa/85655
3408         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
3409         single const.
3411 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
3413         PR target/85733
3414         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
3416 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
3418         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
3419         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
3420         (ix86_handle_option): Handle -mwaitpkg.
3421         * config.gcc: New header.
3422         * config/i386/cpuid.h (bit_WAITPKG): New bit.
3423         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
3424         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
3425         function type.
3426         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
3427         OPTION_MASK_ISA_WAITPKG.
3428         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
3429         (ix86_option_override_internal): Add PTA_WAITPKG.
3430         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
3431         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
3432         IX86_BUILTIN_TPAUSE.
3433         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
3434         __builtin_ia32_umwait and __builtin_ia32_tpause.
3435         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
3436         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
3437         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
3438         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
3439         UNSPECV_TPAUSE): New.
3440         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
3441         * config/i386/i386.opt: Add -mwaitpkg.
3442         * config/i386/waitpkgintrin.h: New file.
3443         * config/i386/x86intrin.h: New header.
3444         * doc/invoke.texi: Add -mwaitpkg.
3446 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
3448         PR target/85606
3449         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
3450         equivalent.
3451         (cortex-m0): Use armv6s-m isa.
3452         (cortex-m0plus): Likewise.
3453         (cortex-m1): Likewise.
3454         (cortex-m0.small-multiply): Likewise.
3455         (cortex-m0plus.small-multiply): Likewise.
3456         (cortex-m1.small-multiply): Likewise.
3458 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
3459             Jakub Jelinek  <jakub@redhat.com>
3461         PR tree-optimization/85692
3462         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
3463         source permute as well.
3465 2018-05-11  Martin Liska  <mliska@suse.cz>
3467         PR sanitizer/85556
3468         * doc/extend.texi: Document LLVM style format for no_sanitize
3469         attribute.
3471 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
3473         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
3474         mode_supports_vsx_dform_quad to mode_supports_dq_form.
3475         (mode_supports_vsx_dform_quad): Likewise.
3476         (mode_supports_vmx_dform): Move these functions to be next to the
3477         other mode_supports functions.
3478         (mode_supports_dq_form): Likewise.
3479         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
3480         mode_supports_dq_form.
3481         (reg_offset_addressing_ok_p): Likewise.
3482         (offsettable_ok_by_alignment): Likewise.
3483         (rs6000_legitimate_offset_address_p): Likewise.
3484         (legitimate_lo_sum_address_p): Likewise.
3485         (rs6000_legitimize_address): Likewise.
3486         (rs6000_legitimize_reload_address): Likewise.
3487         (rs6000_secondary_reload_inner): Likewise.
3488         (rs6000_preferred_reload_class): Likewise.
3489         (rs6000_output_move_128bit): Likewise.
3491 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
3493         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
3494         Generate SImode target register for null target.
3495         <case IX86_BUILTIN_XGETBV>: Ditto.
3496         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
3497         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
3499 2018-05-10  Carl Love  <cel@us.ibm.com>
3501         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
3502         dcbtt and dcbtstt if operands[2] is 0.
3504 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
3506         PR target/85693
3507         * config/i386/sse.md (usadv64qi): New expander.
3509 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
3511         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
3512         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
3513         -maltivec=be support.
3514         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
3515         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
3516         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
3517         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
3518         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
3519         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
3520         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
3521         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
3522         altivec_vsumsws): Adjust.
3523         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
3524         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
3525         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
3526         support.
3527         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
3528         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
3529         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
3530         (altivec_lve<VI_char>x): Delete expand.
3531         (*altivec_lve<VI_char>x_internal): Rename to...
3532         (altivec_lve<VI_char>x): ... this.
3533         (altivec_lvxl_<mode>): Delete expand.
3534         (*altivec_lvxl_<mode>_internal): Rename to ...
3535         (altivec_lvxl_<mode>): ... this.
3536         (altivec_stvxl_<mode>): Delete expand.
3537         (*altivec_stvxl_<mode>_internal): Rename to ...
3538         (altivec_stvxl_<mode>): ... this.
3539         (altivec_stve<VI_char>x): Delete expand.
3540         (*altivec_stve<VI_char>x_internal): Rename to ...
3541         (altivec_stve<VI_char>x): ... this.
3542         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
3543         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
3544         reduc_plus_scal_<mode>): Adjust.
3545         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
3546         comment.
3547         (rs6000_cpu_cpp_builtins): Adjust.
3548         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
3549         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
3550         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
3551         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
3552         -maltivec=be support.
3553         (rs6000_split_vec_extract_var): Adjust.
3554         (rs6000_split_v4si_init): Adjust.
3555         (swap_selector_for_mode): Delete.
3556         (altivec_expand_lvx_be, altivec_expand_stvx_be,
3557         altivec_expand_stvex_be): Delete.
3558         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
3559         -maltivec=be support.
3560         (rs6000_gimple_fold_builtin): Ditto.
3561         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
3562         Adjust.
3563         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
3564         (TARGET_DIRECT_MOVE_64BIT): Adjust.
3565         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
3566         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
3567         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
3568         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
3569         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
3570         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
3571         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
3572         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
3573         anonymous split): Adjust.
3574         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
3575         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
3577 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
3579         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
3580         when --with-gxx-include-dir is also specified.
3581         * configure: Regenerate.
3583 2018-05-09  Jim Wilson  <jimw@sifive.com>
3585         PR target/84797
3586         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
3587         * config/riscv/t-withmultilib: New.
3588         * config/riscv/withmultilib.h: New.
3589         * doc/install.texi: Document RISC-V --with-multilib-list support.
3591 2018-05-09  Richard Biener  <rguenther@suse.de>
3593         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
3594         vector.
3595         (vect_bb_vectorization_profitable_p): Adjust.  Compute
3596         actual scalar cost using the cost vector and the add_stmt_cost
3597         machinery.
3599 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
3601         PR rtl-optimization/85645
3602         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
3603         in the REG_CFA_REGISTER note for LR, don't leave it empty.
3605 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
3607         PR rtl-optimization/85645
3608         * shrink-wrap.c (spread_components): Return a boolean saying if
3609         anything was changed.
3610         (try_shrink_wrapping_separate): Iterate spread_components until
3611         nothing changes anymore.
3613 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
3615         PR rtl-optimization/85645
3616         * regrename.c (build_def_use): Also kill the chains that include the
3617         destination of a REG_CFA_REGISTER note.
3619 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
3621         PR rtl-optimization/85645
3622         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
3623         insn that has a REG_CFA_REGISTER note.
3625 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
3627         * cfgexpand.c (expand_clobber): New function.
3628         (expand_gimple_stmt_1): Use it.
3629         * tree-vect-stmts.c (vect_clobber_variable): New function,
3630         split out from...
3631         (vectorizable_simd_clone_call): ...here.
3632         (vectorizable_store): Emit a clobber either side of an
3633         IFN_STORE_LANES sequence.
3634         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
3636 2018-05-09  Tom de Vries  <tom@codesourcery.com>
3638         PR target/85626
3639         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
3640         (define_insn "trap_if_false"): Add exit after trap.
3642 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
3644         PR rtl-optimization/85638
3645         * bb-reorder.c: Include common/common-target.h.
3646         (create_forwarder_block): New function extracted from...
3647         (fix_up_crossing_landing_pad): ...here.  Rename into...
3648         (dw2_fix_up_crossing_landing_pad): ...this.
3649         (sjlj_fix_up_crossing_landing_pad): New function.
3650         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
3651         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
3652         from both partitions and exit the loop after one iteration.
3654 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3656         Revert:
3657         * doc/extend.texi (PowerPC Built-in Functions): Rename this
3658         subsection.
3659         (Basic PowerPC Built-in Functions): The new name of the
3660         subsection previously known as "PowerPC Built-in Functions".
3661         (Basic PowerPC Built-in Functions Available on all Configurations):
3662         New subsubsection.
3663         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
3664         subsubsection.
3665         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
3666         subsubsection.
3667         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
3668         subsubsection.
3669         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
3670         subsubsection.
3672 2018-05-08  Jim Wilson  <jimw@sifive.com>
3674         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
3675         (LD_EMUL_SUFFIX): New.
3676         (LINK_SPEC): Use it.
3678 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3680         * doc/extend.texi (PowerPC Built-in Functions): Rename this
3681         subsection.
3682         (Basic PowerPC Built-in Functions): The new name of the
3683         subsection previously known as "PowerPC Built-in Functions".
3684         (Basic PowerPC Built-in Functions Available on all Configurations):
3685         New subsubsection.
3686         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
3687         subsubsection.
3688         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
3689         subsubsection.
3690         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
3691         subsubsection.
3692         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
3693         subsubsection.
3695 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
3697         PR target/85683
3698         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
3699         after cmpelim optimization.
3701 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
3703         * config.gcc: Support "goldmont".
3704         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
3705         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
3706         PROCESSOR_GOLDMONT.
3707         * config/i386/i386.c (m_GOLDMONT): Define.
3708         (processor_target_table): Add "goldmont".
3709         (PTA_GOLDMONT): Define.
3710         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
3711         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
3712         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
3713         (fold_builtin_cpu): Add "goldmont".
3714         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
3715         (ix86_option_override_internal): Add "goldmont".
3716         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
3717         (processor_type): Add PROCESSOR_GOLDMONT.
3718         * config/i386/i386.md: Add CPU "glm".
3719         * config/i386/glm.md: New file.
3720         * config/i386/x86-tune.def: Add m_GOLDMONT.
3721         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
3723 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
3725         PR target/85572
3726         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
3727         E_V4DImode.
3728         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
3729         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
3730         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
3732         PR target/85317
3733         * config/i386/i386.c (ix86_fold_builtin): Handle
3734         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
3736         PR target/85480
3737         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
3738         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
3740 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
3742         PR target/85658
3743         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
3744         (check_arch): Likewise.
3745         (check_fpu): Return the result rather than printing it.
3746         (end arch): Fix operator precedence.
3747         (end cpu): Likewise.
3748         (END): Print the result from check_fpu.
3750 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
3751             Alan Hayward  <alan.hayward@arm.com>
3752             David Sherwood  <david.sherwood@arm.com>
3754         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
3755         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
3756         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
3757         (*fcmuo<mode>_and): New patterns.
3759 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
3761         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
3762         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
3763         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
3764         (cmp_op, sve_imm_con): New code attributes.
3765         (SVE_COND_INT_CMP, imm_con): Delete.
3766         (cmp_op): Remove above unspecs from int attribute.
3767         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
3768         to...
3769         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
3770         comparison-specific unspecs.
3771         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
3772         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
3773         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
3774         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
3775         (*vec_fcm<cmp_op><mode>): Rename to...
3776         (*fcm<cmp_op><mode>): ...this and adjust likewise.
3777         (*vec_fcmuo<mode>): Rename to...
3778         (*fcmuo<mode>): ...this and adjust likewise.
3779         (*pred_fcm<cmp_op><mode>): New pattern.
3780         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
3781         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
3782         functions.
3783         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
3784         and UNORDERED.
3785         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
3786         (aarch64_emit_sve_predicated_cond): New function.
3787         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
3788         (aarch64_emit_unspec_cond_or): Replace with...
3789         (aarch64_emit_sve_or_conds): ...this new function.  Use
3790         aarch64_emit_sve_ptrue_op for the individual comparisons and
3791         aarch64_emit_binop to OR them together.
3792         (aarch64_emit_inverted_unspec_cond): Replace with...
3793         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
3794         aarch64_emit_sve_ptrue_op for the comparison and
3795         aarch64_emit_unop to invert the result.
3796         (aarch64_expand_sve_vec_cmp_float): Update after the above
3797         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
3799 2018-05-07  Nathan Sidwell  <nathan@acm.org>
3801         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
3802         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
3803         (Backwards Compatibility): Likewise.
3805 2018-05-07  Luis Machado  <luis.machado@linaro.org>
3807         PR bootstrap/85681
3808         Revert:
3809         2018-05-07  Luis Machado  <luis.machado@linaro.org>
3811         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
3812         <prefetch_dynamic_strides>: New const bool field.
3813         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
3814         prefetch_dynamic_strides.
3815         (exynosm1_prefetch_tune): Likewise.
3816         (thunderxt88_prefetch_tune): Likewise.
3817         (thunderx_prefetch_tune): Likewise.
3818         (thunderx2t99_prefetch_tune): Likewise.
3819         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
3820         to false.
3821         (aarch64_override_options_internal): Update to set
3822         PARAM_PREFETCH_DYNAMIC_STRIDES.
3823         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
3824         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
3825         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
3826         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
3827         prefetch-dynamic-strides setting.
3829         2018-05-07  Luis Machado  <luis.machado@linaro.org>
3831         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
3832         <minimum_stride>: New const int field.
3833         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
3834         minimum_stride field.
3835         (exynosm1_prefetch_tune): Likewise.
3836         (thunderxt88_prefetch_tune): Likewise.
3837         (thunderx_prefetch_tune): Likewise.
3838         (thunderx2t99_prefetch_tune): Likewise.
3839         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
3840         (aarch64_override_options_internal): Update to set
3841         PARAM_PREFETCH_MINIMUM_STRIDE.
3842         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
3843         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
3844         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
3845         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
3846         stride is constant and is below the minimum stride threshold.
3848 2018-05-07  Luis Machado  <luis.machado@linaro.org>
3850         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
3851         to 512.
3853 2018-05-07  Luis Machado  <luis.machado@linaro.org>
3855         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
3856         <prefetch_dynamic_strides>: New const bool field.
3857         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
3858         prefetch_dynamic_strides.
3859         (exynosm1_prefetch_tune): Likewise.
3860         (thunderxt88_prefetch_tune): Likewise.
3861         (thunderx_prefetch_tune): Likewise.
3862         (thunderx2t99_prefetch_tune): Likewise.
3863         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
3864         to false.
3865         (aarch64_override_options_internal): Update to set
3866         PARAM_PREFETCH_DYNAMIC_STRIDES.
3867         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
3868         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
3869         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
3870         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
3871         prefetch-dynamic-strides setting.
3873 2018-05-07  Luis Machado  <luis.machado@linaro.org>
3875         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
3876         <minimum_stride>: New const int field.
3877         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
3878         minimum_stride field.
3879         (exynosm1_prefetch_tune): Likewise.
3880         (thunderxt88_prefetch_tune): Likewise.
3881         (thunderx_prefetch_tune): Likewise.
3882         (thunderx2t99_prefetch_tune): Likewise.
3883         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
3884         (aarch64_override_options_internal): Update to set
3885         PARAM_PREFETCH_MINIMUM_STRIDE.
3886         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
3887         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
3888         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
3889         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
3890         stride is constant and is below the minimum stride threshold.
3892 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
3894         PR c++/85659
3895         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
3896         the type is addressable.  Don't force op into register if it has
3897         BLKmode.
3899 2018-05-05  Roland McGrath  <mcgrathr@google.com>
3901         PR other/77609
3902         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
3903         any section for which we don't know a specific type it should have,
3904         regardless of name.  Previously this was done only for the exact
3905         names ".init_array", ".fini_array", and ".preinit_array".
3906         (default_elf_asm_named_section): Add comment about
3907         relationship with default_section_type_flags and SECTION_NOTYPE.
3908         (get_section): Don't consider it a type conflict if one side has
3909         SECTION_NOTYPE and the other doesn't, as long as neither has the
3910         SECTION_BSS et al used in the default_section_type_flags logic.
3912 2018-05-05  Tom de Vries  <tom@codesourcery.com>
3914         PR target/85653
3915         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
3916         (workaround_barsyncs): New function.
3917         (nvptx_reorg): Use workaround_barsyncs.
3918         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
3919         (define_expand "nvptx_membar_cta"): New define_expand.
3920         (define_insn "*nvptx_membar_cta"): New insn.
3922 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
3924         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
3925         To improve optimization opportunities.
3926         * builtin-types.def: The new needed builtin types for the above.
3928 2018-05-04  Richard Biener  <rguenther@suse.de>
3930         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
3931         * gimple-ssa-store-merging.c
3932         (imm_store_chain_info::output_merged_store): Remove redundant create,
3933         release split_store vector contents on failure.
3934         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
3935         scalar stmt vector on cache hit.
3937 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
3939         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
3940         Xilinx FP support.
3941         * config.gcc (powerpc-xilinx-eabi*): Remove.
3942         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
3943         support.
3944         (fusion_addis_mem_combo_load): Ditto.
3945         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
3946         FP support.
3947         (rs6000_cpu_cpp_builtins): Ditto.
3948         * config/rs6000/rs6000-linux.c
3949         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
3950         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
3951         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
3952         support.
3953         (rs6000_setup_reg_addr_masks): Ditto.
3954         (rs6000_init_hard_regno_mode_ok): Ditto.
3955         (rs6000_option_override_internal): Ditto.
3956         (legitimate_lo_sum_address_p): Ditto.
3957         (rs6000_legitimize_address): Ditto.
3958         (rs6000_legitimize_reload_address): Ditto.
3959         (rs6000_legitimate_address_p): Ditto.
3960         (abi_v4_pass_in_fpr): Ditto.
3961         (setup_incoming_varargs): Ditto.
3962         (rs6000_gimplify_va_arg): Ditto.
3963         (rs6000_split_multireg_move): Ditto.
3964         (rs6000_savres_strategy): Ditto.
3965         (rs6000_emit_prologue_components): Ditto.
3966         (rs6000_emit_epilogue_components): Ditto.
3967         (rs6000_emit_prologue): Ditto.
3968         (rs6000_emit_epilogue): Ditto.
3969         (rs6000_elf_file_end): Ditto.
3970         (rs6000_function_value): Ditto.
3971         (rs6000_libcall_value): Ditto.
3972         * config/rs6000/rs6000.h: Ditto.
3973         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
3974         (TARGET_MINMAX): ... this.  New.
3975         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
3976         * config/rs6000/rs6000.md: Remove Xilinx FP support.
3977         (*movsi_internal1_single): Delete.
3978         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
3979         mfpu=, mxilinx-fpu): Delete.
3980         * config/rs6000/singlefp.h: Delete.
3981         * config/rs6000/sysv4.h: Remove Xilinx FP support.
3982         * config/rs6000/t-rs6000: Ditto.
3983         * config/rs6000/t-xilinx: Delete.
3984         * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
3985         * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
3986         (VStype_simple): Delete.
3987         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
3988         * config/rs6000/xfpu.h: Delete.
3989         * config/rs6000/xfpu.md: Delete.
3990         * config/rs6000/xilinx.h: Delete.
3991         * config/rs6000/xilinx.opt: Delete.
3992         * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
3993         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
3995 2018-05-04  Tom de Vries  <tom@codesourcery.com>
3997         PR libgomp/85639
3998         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
3999         if ignore == 0.
4001 2018-05-04  Richard Biener  <rguenther@suse.de>
4003         PR middle-end/85627
4004         * tree-complex.c (update_complex_assignment): We are always in SSA form.
4005         (expand_complex_div_wide): Likewise.
4006         (expand_complex_operations_1): Likewise.
4007         (expand_complex_libcall): Preserve EH info of the original stmt.
4008         (tree_lower_complex): Handle removed blocks.
4009         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
4010         on complex multiplication and division libcall builtins.
4012 2018-05-04  Richard Biener  <rguenther@suse.de>
4014         PR middle-end/85574
4015         * fold-const.c (negate_expr_p): Restrict negation of operand
4016         zero of a division to when we know that can happen without
4017         overflow.
4018         (fold_negate_expr_1): Likewise.
4020 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
4022         PR libstdc++/85466
4023         * real.h (real_nextafter): Declare.
4024         * real.c (real_nextafter): New function.
4025         * fold-const-call.c (fold_const_nextafter): New function.
4026         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
4027         CASE_CFN_NEXTTOWARD.
4028         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
4029         even when arg1_mode is different from arg0_mode.
4031 2018-05-03  Nathan Sidwell  <nathan@acm.org>
4033         * doc/extend.texi (Deprecated Features): Remove
4034         -ffriend-injection.
4035         (Backwards Compatibility): Likewise.
4036         * doc/invoke.texi (C++ Language Options): Likewise.
4037         (C++ Dialect Options): Likewise.
4039 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
4041         PR target/85530
4042         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
4043         _mm512_mask_mullox_epi64): New intrinsics.
4045 2018-05-03  Tom de Vries  <tom@codesourcery.com>
4047         PR testsuite/85106
4048         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
4049         dump files): Add offload-tree.
4051 2018-05-03  Richard Biener  <rguenther@suse.de>
4053         PR tree-optimization/85615
4054         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
4055         to loops not nested in BBs loop father to avoid creating multi-entry
4056         loops.
4058 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4060         PR tree-optimization/70291
4061         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
4062         arguments.  Change return type to tree.  Emit libcall as a new
4063         statement rather than replacing existing one when inplace_p is true.
4064         (expand_complex_multiplication_components): New function.
4065         (expand_complex_multiplication): Expand floating-point complex
4066         multiplication using the above.
4067         (expand_complex_division): Rename inner_type parameter to type.
4068         Update expand_complex_libcall call-site.
4069         (expand_complex_operations_1): Update expand_complex_multiplication
4070         and expand_complex_division call-sites.
4072 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
4074         PR target/85582
4075         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
4076         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
4077         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
4078         the highest significant bit of the shift count mask is clear.  In
4079         check whether and[sq]i3 is needed verify that all significant bits
4080         of the shift count other than the highest are set.
4082 2018-05-02  Tom de Vries  <tom@codesourcery.com>
4084         PR libgomp/82428
4085         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
4086         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
4087         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
4088         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
4089         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
4090         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
4091         __builtin_goacc_parlevel_size.
4093 2018-05-02  Richard Biener  <rguenther@suse.de>
4095         PR tree-optimization/85597
4096         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
4097         do not use split vect_get_vec_defs call but call vect_get_slp_defs
4098         directly.
4100 2018-05-02  Tom de Vries  <tom@codesourcery.com>
4102         PR testsuite/85106
4103         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
4104         dump files): Add ltrans-tree.
4106 2018-05-02  Tom de Vries  <tom@codesourcery.com>
4108         PR testsuite/85106
4109         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
4110         dump files): Add wpa-ipa.
4112 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
4114         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
4115         powerpc*-*-linux*paired* target.
4116         * config/rs6000/750cl.h: Delete.
4117         * config/rs6000/paired.h: Delete.
4118         * config/rs6000/paired.md: Delete.
4119         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
4120         float support.
4121         * config/rs6000/rs6000-builtin.def: Remove paired float support.
4122         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
4123         comment.  Remove paired float support.
4124         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
4125         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
4126         VECTOR_PAIRED.
4127         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
4128         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
4129         declarations.
4130         * config/rs6000/rs6000.c: Remove paired float support.
4131         (paired_expand_vector_init, paired_expand_vector_move,
4132         paired_emit_vector_compare, paired_emit_vector_cond_expr,
4133         (paired_expand_lv_builtin, paired_expand_stv_builtin,
4134         paired_expand_builtin, paired_expand_predicate_builtin,
4135         paired_init_builtins): Delete.
4136         * config/rs6000/rs6000.h: Remove paired float support.
4137         * config/rs6000/rs6000.md: Remove paired float support.
4138         (move_from_CR_ov_bit): Delete.
4139         * config/rs6000/rs6000.opt (mpaired): Delete.
4140         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
4141         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
4143 2018-05-02  Richard Biener  <rguenther@suse.de>
4145         PR middle-end/85567
4146         * gimplify.c (gimplify_save_expr): When in SSA form allow
4147         SAVE_EXPRs to compute to SSA vars.
4149 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
4151         PR target/85582
4152         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
4153         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
4154         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
4155         clobber operands[2], instead use a new pseudo.  Formatting fixes.
4157 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
4159         PR tree-optimization/85586
4160         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
4161         exit early for statements in the same group if the accesses are
4162         not strided.
4164 2018-05-02  Tom de Vries  <tom@codesourcery.com>
4166         PR lto/85451
4167         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
4168         error message.
4170 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
4172         PR tree-optimization/85143
4173         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
4175 2018-05-01  Tom de Vries  <tom@codesourcery.com>
4177         PR lto/85451
4178         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
4179         not found" error message.
4181 2018-05-01  Tom de Vries  <tom@codesourcery.com>
4183         PR other/83786
4184         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
4185         * vec.c (test_ordered_remove_if): New function.
4186         (vec_c_tests): Call test_ordered_remove_if.
4187         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
4188         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
4189         * tree-vect-patterns.c (vect_pattern_recog_1): Use
4190         VEC_ORDERED_REMOVE_IF.
4192 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4194         PR tree-optimization/82665
4195         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
4196         pointer subtraction where arguments come from a memchr call.
4198 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
4200         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
4201         --push-state --as-needed and --pop-state instead of --as-needed and
4202         --no-as-needed if ld supports it.
4203         * configure: Regenerated.
4205         PR web/85578
4206         * doc/install.texi2html: Replace _002d with - and _002a with * in
4207         generated html files using sed.
4209 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
4211         PR c++/85523
4212         * gcc-rich-location.c (blank_line_before_p): New function.
4213         (use_new_line): New function.
4214         (gcc_rich_location::add_fixit_insert_formatted): New function.
4215         * gcc-rich-location.h
4216         (gcc_rich_location::add_fixit_insert_formatted): New function.
4218 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
4220         * selftest.c (assert_streq): Rename "expected" and "actual" to
4221         "val1" and "val2".  Extend NULL-handling to cover both inputs
4222         symmetrically, while still requiring both to be non-NULL for a pass.
4223         * selftest.h (assert_streq): Rename "expected" and "actual" to
4224         "val1" and "val2".
4225         (ASSERT_EQ): Likewise.
4226         (ASSERT_EQ_AT): Likewise.
4227         (ASSERT_KNOWN_EQ): Likewise.
4228         (ASSERT_KNOWN_EQ_AT): Likewise.
4229         (ASSERT_NE): Likewise.
4230         (ASSERT_MAYBE_NE): Likewise.
4231         (ASSERT_MAYBE_NE_AT): Likewise.
4232         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
4233         the assertion to pass.
4234         (ASSERT_STREQ_AT): Likewise.
4236 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
4238         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
4239         interaction with -pie.
4241 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
4243         * selftest.h: Fix alphabetization of per-source-file selftest
4244         declarations.
4246 2018-04-30  Jason Merrill  <jason@redhat.com>
4248         PR c++/61982 - dead stores to destroyed objects.
4249         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
4250         of clobber.
4252 2018-04-30  Jason Merrill  <jason@redhat.com>
4254         * tree.c (build_clobber): New.
4255         * tree.h: Declare it.
4256         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
4258 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
4260         * diagnostic-show-locus.c (layout::layout): Update for
4261         location_get_source_line returning a char_span.
4262         (struct char_span): Move to input.h.
4263         (struct correction): Update for fields in char_span becoming
4264         private.
4265         (struct source_line): Update for location_get_source_line
4266         returning a char_span.
4267         (layout::print_line): Likewise.
4268         * edit-context.c (edited_file::print_content): Likewise.
4269         (edited_file::print_diff_hunk): Likewise.
4270         (edited_file::print_run_of_changed_lines): Likewise.
4271         (edited_file::get_num_lines): Likewise.
4272         (edited_line::edited_line): Likewise.
4273         * final.c (asm_show_source): Likewise.
4274         * input.c (location_get_source_line): Convert return type
4275         from const char * to char_span, losing the final "line_len"
4276         param.
4277         (dump_location_info): Update for the above.
4278         (get_substring_ranges_for_loc): Likewise.  Use a char_span
4279         when handling the literal within the line.
4280         (test_reading_source_line): Update for location_get_source_line
4281         returning a char_span.
4282         * input.h (class char_span): Move here from
4283         diagnostic-show-locus.c, converting from a struct to a class.
4284         Make data members private.
4285         (char_span::operator bool): New.
4286         (char_span::length): New.
4287         (char_span::get_buffer): New.
4288         (char_span::operator[]): New.
4289         (char_span::subspan): Make const.
4290         (char_span::xstrdup): New.
4291         (location_get_source_line): Convert return type from const char *
4292         to char_span, losing the final "line_size" param.
4294 2018-04-30  Jan Hubicka  <jh@suse.cz>
4296         * lto-wrapper.c (ltrans_priorities): New static var.
4297         (cmp_priority): New.
4298         (run_gcc): Read priorities and if doing parallel build order
4299         the Makefile by them.
4301 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
4303         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
4305 2018-04-30  Richard Biener  <rguenther@suse.de>
4307         * tree-cfg.c (verify_address): Remove base argument, add
4308         flag whether to check TREE_ADDRESSABLE and do that.
4309         (verify_expr): Remove.
4310         (verify_types_in_gimple_reference): Add pieces from verify_expr.
4311         (verify_gimple_assign_single): Likewise.
4312         (verify_gimple_switch): Likewise.
4313         (verify_expr_location_1): Dereference tp once.  Add (disabled)
4314         piece from verify_expr.
4315         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
4317 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
4319         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
4321 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
4323         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
4324         (small_data_pattern): Likewise.
4325         (arc_rewrite_small_data): Likewise.
4326         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
4327         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
4328         (get_symbol_alignment): New function.
4329         (legitimate_small_data_address_p): Likewise.
4330         (legitimate_scaled_address): Update, call
4331         legitimate_small_data_address_p.
4332         (output_sdata): New static variable.
4333         (arc_print_operand): Update how we handle small data operands.
4334         (arc_print_operand_address): Likewise.
4335         (arc_legitimate_address_p): Update, use
4336         legitimate_small_data_address_p.
4337         (arc_rewrite_small_data_p): Remove.
4338         (arc_rewrite_small_data_1): Likewise.
4339         (arc_rewrite_small_data): Likewise.
4340         (small_data_pattern): Likewise.
4341         (compact_sda_memory_operand): Update to use
4342         legitimate_small_data_address_p and get_symbol_alignment.
4343         (prepare_move_operands): Don't rewite sdata pattern.
4344         (prepare_extend_operands): Remove.
4345         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
4346         pattern.
4347         (zero_extendqisi2): Likewise.
4348         (zero_extendhisi2): Likewise.
4349         (extendqihi2): Likewise.
4350         (extendqisi2): Likewise.
4351         (extendhisi2): Likewise.
4352         (addsi3): Likewise.
4353         (subsi3): Likewise.
4354         (andsi3): Likewise.
4355         * config/arc/constraints.md (Usd): Change it to memory constraint.
4357 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
4359         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
4360         as source of std instructions.
4361         * config/arc/arc.md (movsi_insn): Update pattern predicate to
4362         allow 6-bit constants as source for store instructions.
4363         (movdi_insn): Update instruction pattern to allow 6-bit constants
4364         as source for store instructions.
4366 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
4368         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
4370 2018-04-30  Nathan Sidwell  <nathan@acm.org>
4371             Sandra Loosemore <sandra@codesourcery.com>
4373         * dumpfile.c (dump_open): Allow '-' for stdout.
4374         * doc/invoke.texi (Developer Options): Document dump filename
4375         determination early.  Document stdin/stdout selection.
4377 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
4379         Microblaze Target: PIC data text relative
4381         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
4382         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
4383         Add declaration.
4384         * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
4385         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
4386         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
4387         New addressing mode for data-text relative position indepenedent code.
4388         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
4389         'ADDRESS_SYMBOLIC_TXT_REL'.
4390         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
4391         (microblaze_legitimate_pic_operand): Exclude function calls from
4392         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
4393         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
4394         addresses cases.
4395         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
4396         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
4397         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
4398         for 'address + offset'.
4399         (microblaze_expand_prologue): Add new function prologue call for
4400         'r20' assignation.
4401         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
4402         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
4403         table in case of TARGET_PIC_DATA_TEXT_REL.
4404         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
4405         * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
4406         Add new macros 'UNSPEC_TEXT',
4407         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
4408         + exclude function calls from 'UNSPEC_PLT' in case of data text
4409         relative mode.
4410         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
4411         new target hook for generating address diff vector tables in case of
4412         flag_pic.
4413         * doc/tm.texi : Regenerate.
4414         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
4415         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
4416         of addr diff vector generation.
4417         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
4418         target hook definition.
4419         * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
4420         Add default function for generate_pic_addr_diff_vec -> flag_pic.
4421         * doc/invoke.texi (Add new pic option): Add new microblaze pic
4422         option for data text relative.
4424 2018-04-30  Richard Biener  <rguenther@suse.de>
4426         * tree-chrec.h (evolution_function_is_constant_p): Remove
4427         redundant check.
4428         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
4430 2018-04-30  Richard Biener  <rguenther@suse.de>
4432         PR bootstrap/85571
4433         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
4435 2018-04-30  Richard Biener  <rguenther@suse.de>
4437         PR tree-optimization/28364
4438         PR tree-optimization/85275
4439         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
4440         copying first exit test.
4442 2018-04-28  Mark Wielaard  <mark@klomp.org>
4444         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
4445         dwarf_version >= 5.
4446         (dwarf_AT): Handle DW_AT_addr_base.
4447         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
4449 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
4451         PR target/84431
4452         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
4453         (*ashl<dwi>3_doubleword_mask_1): Ditto.
4454         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
4455         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
4457 2018-04-28  Richard Biener  <rguenther@suse.de>
4459         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
4460         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
4461         to reflect use.  Only add interesting stmts.
4463 2018-04-27  Martin Jambor  <mjambor@suse.cz>
4465         PR ipa/85549
4466         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
4467         the jump function allows for passing through aggregate values.
4469 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
4471         * input.h (in_system_header_at): Convert from macro to inline
4472         function.
4473         (from_macro_expansion_at): Likewise.
4474         (from_macro_definition_at): Likewise.
4476 2018-04-27  Jeff Law  <law@redhat.com>
4478         * config.gcc: Mark tile* targets as deprecated/obsolete.
4480 2018-04-27  Richard Biener  <rguenther@suse.de>
4482         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
4483         fix for ILP32.
4485 2018-04-27  Richard Biener  <rguenther@suse.de>
4487         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
4489 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
4491         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
4492         with Yd constraint. Set "preferred_for_speed" attribute from
4493         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
4494         with Yd constraint.
4495         (*movdi_internal): Ditto.
4496         (movti_interunit splitters): Remove
4497         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
4498         (movdi_interunit splitters): Ditto.
4499         * config/i386/constraints.md (Ye): Remove.
4500         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
4502 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4504         PR target/85512
4505         * config/aarch64/constraints.md (Usg): Limit to 31.
4506         (Usj): Limit to 63.
4508 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
4510         PR tree-optimization/85529
4511         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
4512         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
4513         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
4514         zero extension or masking of the MSB bit.
4515         (optimize_range_tests): Add FIRST_BB argument, pass it through
4516         to optimize_range_tests_var_bound.
4517         (maybe_optimize_range_tests, reassociate_bb): Adjust
4518         optimize_range_tests callers.
4520 2018-04-26  Richard Biener  <rguenther@suse.de>
4521             Jakub Jelinek  <jakub@redhat.com>
4523         * cgraph.h (symbol_table): Just declare debug method here.
4524         * symtab.c (symbol_table::debug): Define.
4526 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
4528         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
4530 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
4532         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
4533         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
4534         (*movdi_internal): Substitute Yi and Yj constraint with x
4535         and Ym and Yn constraint with y constraint.  Update "isa"
4536         attribute and set "preferred_for_speed" attribute from
4537         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
4538         (*movsi_internal): Ditto.
4539         (*movdf_internal): Ditto.
4540         (*movsf_internal): Ditto.
4541         (*zero_extendsidi2): Ditto.
4542         * config/i386/sse.md (vec_set<mode>_0): Ditto.
4543         (sse2_loadld): Ditto.
4544         (*vec_extract<ssevecmodelower>_0): Ditto.
4545         (*vec_extractv4si_0_zext_sse4): Ditto.
4546         (vec_concatv2di): Ditto.
4547         (*vec_dup<mode>): Ditto.
4548         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
4549         * config/i386/constraints.md (Yi): Remove.
4550         (Yj): Remove.
4551         (Ym): Remove.
4552         (Yn): Remove.
4554 2018-04-26  Nathan Sidwell  <nathan@acm.org>
4556         * dumpfile.c (dump_open): New.
4557         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
4558         (dump_finish): Detect stdio/stderr by value not name.
4560 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
4562         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
4564 2018-04-26  Tom de Vries  <tom@codesourcery.com>
4566         PR target/84952
4567         * config/nvptx/nvptx.c (verify_neutering_jumps)
4568         (verify_neutering_labels): New function
4569         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
4571 2018-04-26  Tom de Vries  <tom@codesourcery.com>
4573         PR target/84025
4574         * config/nvptx/nvptx.c (needs_neutering_p): New function.
4575         (nvptx_single): Use needs_neutering_p to skip over insns that do not
4576         need neutering.
4578 2018-04-26  Richard Biener <rguenther@suse.de>
4579             Tom de Vries  <tom@codesourcery.com>
4581         PR lto/85422
4582         * lto-streamer-out.c (output_function): Fixup loops if required to match
4583         discovery done in the reader.
4585 2018-04-26  Richard Biener  <rguenther@suse.de>
4587         PR tree-optimization/85116
4588         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
4589         have a loop exit from the single latch predecessor.  Remove
4590         case of header with just condition.
4591         (ch_base::copy_headers): Exclude infinite loops from any
4592         processing.
4593         (pass_ch::execute): Record exits.
4595 2018-04-26  Richard Biener  <rguenther@suse.de>
4597         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
4598         prologue cost vector and pass it to vect_get_load_cost.
4599         (vect_get_peeling_costs_all_drs): Likewise.
4600         (vect_peeling_hash_get_lowest_cost): Likewise.
4601         (vect_enhance_data_refs_alignment): Likewise.
4603 2018-04-26  Richard Biener  <rguenther@suse.de>
4605         PR middle-end/85450
4606         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
4607         checking of integer<->pointer conversions.
4608         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
4609         sign-/zero-extending pointer types.
4610         (expand_omp_for_static_chunk): Likewise.
4612 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
4613             Jean Lee  <xiaoyur347@gmail.com>
4615         * config/mips/mips.c (mips_asan_shadow_offset): New function.
4616         (TARGET_ASAN_SHADOW_OFFSET): Define.
4617         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
4618         true for -fsanitize=address.
4620 2018-04-25  Mark Wielaard  <mark@klomp.org>
4622         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
4623         shorter ones.
4625 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
4627         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
4628         than "alu", remove explicit "memory" and "imm_disp" attributes.
4629         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
4631         PR middle-end/85414
4632         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
4633         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
4634         gen_lowpart_no_emit.
4636 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
4638         PR target/85473
4639         * config/i386/i386.c (ix86_expand_builtin): Change memory
4640         operand to XI, extend p0 to Pmode.
4641         * config/i386/i386.md: Change unspec volatile and operand
4642         1 mode to XI, change operand 0 mode to P.
4644 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
4646         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
4647         GET_MODE_MASK before any checking.
4648         (nds32_can_use_bset_p): Likewise.
4649         (nds32_can_use_btgl_p): Likewise.
4651 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
4653         * config/nds32/nds32-doubleword.md: New define_split pattern for
4654         illegal register number.
4656 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
4658         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
4660 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
4662         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
4664 2018-04-25  Richard Biener  <rguenther@suse.de>
4666         * lto-streamer.h (LTO_major_version): Bump to 8.
4668 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
4670         * BASE-VER: Set to 9.0.0.
4672 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
4674         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
4675         in __abskf2 and __powikf2.
4677 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4679         PR target/85512
4680         * config/aarch64/constraints.md (Usg, Usj): New constraints.
4681         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
4682         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
4683         Use the above on operand 2.  Reindent.
4684         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
4686 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
4688         PR target/85485
4689         * common/config/i386/i386-common.c (ix86_handle_option): Don't
4690         handle OPT_mcet.
4691         * config/i386/i386.opt (mcet): Removed.
4692         * doc/install.texi: Remove -mcet documentation.
4693         * doc/invoke.texi: Likewise.
4695 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
4697         PR target/85485
4698         * doc/install.texi: Remove -mcet from bootstrap-cet.
4700 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
4702         PR target/85511
4703         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
4704         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
4705         if TARGET_64BIT.
4707         PR target/85503
4708         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
4709         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
4710         containing a CONST_VECTOR.
4712 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
4714         * doc/install.texi: Update newlib dependency for nvptx.
4716 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
4718         PR target/85508
4719         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
4720         instead of INTVAL when shifting x left.
4722 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
4724         PR tree-optimization/85478
4725         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
4726         vect_grouped_store_supported for single element vectors.
4728 2018-04-24  Richard Biener  <rguenther@suse.de>
4730         PR target/85491
4731         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
4732         load cost increase to the case of non-constant step.
4734 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
4736         PR target/84828
4737         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
4738         destination if any_malformed_asm.
4740 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
4742         PR middle-end/85496
4743         * expr.c (store_field): In the bitfield case, if the value comes from
4744         a function call and is returned in registers by means of a PARALLEL,
4745         do not change the mode of the temporary unless BLKmode and VOIDmode.
4747 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
4749         PR rtl-optimization/85423
4750         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
4751         dependencies to debug insns when the previous insn is non-debug.
4753 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
4755         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
4756         enums into a single definition.
4757         (fls): Fix predicates and printing.
4758         (seti): Likewise.
4760 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
4762         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
4763         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
4764         and short u6 immediate.
4765         (check_if_valid_sleep_operand): Remove.
4766         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
4768 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
4770         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
4771         flag_always_save_lp condition.
4772         * config/nds32/nds32.opt (malways-save-lp): New option.
4774 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
4776         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
4777         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
4778         * config/nds32/nds32.h
4779         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
4780         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
4782 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
4784         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
4785         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
4787 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
4788             Chung-Ju Wu  <jasonwucj@gmail.com>
4790         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
4791         Declare.
4792         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
4793         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
4795 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
4797         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
4799 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
4801         * config/nds32/nds32-protos.h (nds32_data_alignment,
4802         nds32_local_alignment): Declare.
4803         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
4804         nds32_local_alignment): New functions.
4805         (TARGET_CONSTANT_ALIGNMENT): Define.
4806         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
4808 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
4810         * config/nds32/nds32.c
4811         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
4812         (TARGET_MODES_TIEABLE_P): Likewise.
4814 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
4816         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
4817         level Ofast and Og.
4819 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
4820             Chung-Ju Wu  <jasonwucj@gmail.com>
4822         * config/nds32/constants.md (unspec_volatile_element): Add enum values
4823         for unaligned access.
4824         * config/nds32/nds32-intrinsic.c: Implementation of expanding
4825         unaligned access.
4826         * config/nds32/nds32-intrinsic.md: Likewise.
4827         * config/nds32/nds32_intrinsic.h: Likewise.
4828         * config/nds32/nds32.h (nds32_builtins): Likewise.
4829         * config/nds32/nds32.opt (munaligned-access): New option.
4830         * config/nds32/nds32.c (nds32_asm_file_start): Display
4831         flag_unaligned_access status.
4833 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
4835         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
4836         -mno-relax is present.
4837         * config/riscv/linux.h (LINK_SPEC): Ditto.
4839 2018-04-20  Martin Sebor  <msebor@redhat.com>
4841         PR c/85365
4842         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
4843         for null pointers.
4844         (gimple_fold_builtin_stxcpy_chk): Same.
4845         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
4847 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
4849         PR target/85456
4850         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
4851         __powikf2 when long double is IEEE 128-bit.
4853 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
4855         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
4856         step to make sure stack always aligned.
4858 2018-04-20  Carl Love  <cel@us.ibm.com>
4860         PR target/83402
4861         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
4862         size check for arg0.
4864 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
4865             Tom de Vries  <tom@codesourcery.com>
4867         PR target/85445
4868         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
4869         Emit insns for calls too.
4870         (nvptx_find_par): Always look for worker-level predecessor insn.
4871         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
4872         calls.
4873         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
4874         (nvptx_process_pars): Propagate frames for calls.
4876 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
4878         PR target/85469
4879         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
4880         Removed.
4881         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
4882         (ix86_handle_option): Don't handle OPT_mibt.
4883         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
4884         __SHSTK__.
4885         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
4886         has_ibt and ibt.
4887         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
4888         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
4889         (ix86_target_macros): Define __CET__ with flag_cf_protection
4890         for -fcf-protection.
4891         * config/i386/i386.c (isa2_opts): Remove -mibt.
4892         * config/i386/i386.h (TARGET_IBT): Removed.
4893         (TARGET_IBT_P): Likewise.
4894         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
4895         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
4896         * config/i386/i386.opt (mcet): Update help message.
4897         (mshstk): Likewise.
4898         (mibt): Removed.
4899         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
4900         -mcet as an alias for -mshstk.
4902 2018-04-20  Richard Biener <rguenther@suse.de>
4904         PR middle-end/85475
4905         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
4906         complexity by forcing a single use of the multiply operand.
4908 2018-04-20  Martin Jambor  <mjambor@suse.cz>
4910         ipa/85449
4911         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
4912         recursion dependency to only apply to non-clones.
4914 2018-04-20  Martin Jambor  <mjambor@suse.cz>
4916         ipa/85447
4917         * ipa-cp.c (create_specialized_node): Check that clones of
4918         self-recursive edges exist during IPA-CP.
4920 2018-04-19  Toon Moene  <toon@moene.org>
4922         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
4923         by -O3.
4925 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
4927         PR tree-optimization/85467
4928         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
4929         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
4930         VECTOR_CST element to type.
4932 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
4934         PR target/85397
4935         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
4936         * config/i386/i386.md (builtin_setjmp_setup): Removed.
4937         (builtin_longjmp): Likewise.
4938         (save_stack_nonlocal): New pattern.
4939         (restore_stack_nonlocal): Likewise.
4941 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
4943         PR target/85404
4944         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
4945         Replace ASM_OUTPUT_LABEL with fprintf.
4947 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
4949         PR target/85417
4950         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
4951         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
4952         * config/i386/i386-c.c (ix86_target_macros_internal): Also
4953         define __IBT__ and __SHSTK__ for -fcf-protection.
4954         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
4955         TARGET_IBT.
4956         (ix86_trampoline_init): Likewise.
4957         (x86_output_mi_thunk): Likewise.
4958         (ix86_notrack_prefixed_insn_p): Likewise.
4959         (ix86_option_override_internal): Don't disallow -fcf-protection.
4960         * config/i386/i386.md (rdssp<mode>): Also enable for
4961         -fcf-protection.
4962         (incssp<mode>): Likewise.
4963         (nop_endbr): Likewise.
4964         * config/i386/i386.opt (mcet): Change help message to built-in
4965         functions only.
4966         (mibt): Likewise.
4967         (mshstk): Likewise.
4968         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
4969         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
4970         enable CET built-in functions.
4972 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
4974         * common/config/i386/i386-common.c
4975         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
4976         OPTION_MASK_ISA_MOVDIRI_UNSET,
4977         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
4978         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
4979         * config.gcc (movdirintrin.h): New header.
4980         * config/i386/cpuid.h (bit_MOVDIRI,
4981         bit_MOVDIR64B): New bits.
4982         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
4983         and -mmvodir64b.
4984         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
4985         (VOID, PVOID, PCVOID)): New function types.
4986         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
4987         __builtin_ia32_directstoreu_u64,
4988         __builtin_ia32_movdir64b): New builtins.
4989         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
4990         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
4991         and -mmovdiri.
4992         (ix86_valid_target_attribute_inner_p): Ditto.
4993         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
4994         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
4995         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
4996         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
4997         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
4998         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
4999         (movdiri<mode>, movdir64b_<mode>): New.
5000         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
5001         * config/i386/immintrin.h: Include movdirintrin.h.
5002         * config/i386/movdirintrin.h: New file.
5003         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
5005 2018-04-19  Richard Biener  <rguenther@suse.de>
5007         PR middle-end/85455
5008         * cfg.c (clear_bb_flags): When loop state says we have
5009         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
5011 2018-04-19  Richard Biener  <rguenther@suse.de>
5013         PR tree-optimization/84737
5014         * tree-vect-data-refs.c (vect_copy_ref_info): New function
5015         copying restrict info.
5016         (vect_setup_realignment): Use it.
5017         * tree-vectorizer.h (vect_copy_ref_info): Declare.
5018         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
5019         the first DR to all generated stores.
5020         (vectorizable_load): Likewise for loads.
5022 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
5024         PR tree-optimization/85446
5025         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
5026         the integral and pointer types to have the same precision.
5028         * doc/install.texi: Document --disable-cet being the default and
5029         --enable-cet=auto.
5031 2018-04-18  Martin Liska  <mliska@suse.cz>
5033         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
5034         style.
5036 2018-04-18  Martin Liska  <mliska@suse.cz>
5038         Revert
5039         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
5041         PR ipa/83983
5042         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
5043         arguments if they are comparable.
5045 2018-04-18  Martin Liska  <mliska@suse.cz>
5047         Revert
5048         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
5050         PR lto/84805
5051         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
5052         incomplete types.
5054 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
5056         PR target/85388
5057         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
5058         ENDBR after calling __morestack.
5060 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
5062         PR jit/85384
5063         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
5064         by using gcc_base_ver to generate a gcc_driver_version, and use
5065         it when generating GCC_DRIVER_NAME.
5066         * configure: Regenerate.
5068 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
5070         PR target/81084
5071         * config.gcc: Obsolete powerpc*-*-*spe*.
5073 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
5075         PR debug/84637
5076         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
5077         (stabstr_D): Change type of unum from unsigned int to
5078         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
5079         type.
5081 2018-04-17  Jim Wilson  <jimw@sifive.com>
5083         PR 84856
5084         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
5085         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
5086         Set arg_pointer_offset after using pretend_args_size.
5088 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
5090         PR rtl-optimization/85431
5091         * dse.c (record_store): Ignore zero width stores.
5093         PR sanitizer/85230
5094         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
5095         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
5096         __builtin_stack_restore rather than after it.
5097         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
5098         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
5099         argument instead of virtual_dynamic_stack_rtx.
5101 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5103         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
5104         New prototype.
5105         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
5106         Add note to error message to explain internal mapping of overloaded
5107         built-in function name to non-overloaded built-in function name.
5108         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
5109         function.
5111 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
5113         PR target/85424
5114         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
5115         where the inputs overlap with the output.
5117 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
5119         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
5120         (=v, v) alternative and explicit "memory" attribute.
5121         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
5122         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
5123         attributes.
5124         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
5125         "sselog1" type instead of "sselog".
5126         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
5127         "sselog".  Remove explicit "memory" attribute.
5128         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
5129         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
5130         attributes.
5131         (vec_extract_hi_v32hi): Merge all alternatives into one, use
5132         "sselog1" type instead of "sselog".  Remove explicit "memory"
5133         attribute.
5134         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
5135         use "sselog1" type instead of "sselog".  Remove explicit "memory"
5136         attribute.
5137         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
5138         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
5139         attributes.
5140         (vec_extract_hi_v64qi): Merge all alternatives into one, use
5141         "sselog1" type instead of "sselog".  Remove explicit "memory"
5142         attribute.
5143         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
5144         use "sselog1" type instead of "sselog".  Remove explicit "memory"
5145         attribute.
5147         PR target/85430
5148         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
5150         PR middle-end/85414
5151         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
5152         on a SUBREG.
5154 2018-04-17  Martin Jambor  <mjambor@suse.cz>
5156         PR ipa/85421
5157         * ipa-cp.c (create_specialized_node): Call
5158         expand_all_artificial_thunks if necessary.
5160 2018-04-17  Martin Liska  <mliska@suse.cz>
5162         PR lto/85405
5163         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
5164         in message, remote space in between '_G' and '('.
5166 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
5168         PR target/85281
5169         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
5170         avx512f_vmcmp<mode>3<round_saeonly_name>,
5171         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
5172         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
5173         avx512f_rndscale<mode><round_saeonly_name>,
5174         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
5175         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
5176         Use %<iptr>2 instead of %2 for -masm=intel.
5177         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
5178         avx512f_vcvttss2usi<round_saeonly_name>,
5179         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
5180         -masm=intel.
5181         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
5182         avx512f_vcvttsd2usi<round_saeonly_name>,
5183         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
5184         Use %q1 instead of %1 for -masm=intel.
5185         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
5186         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
5187         of %3 for -masm=intel.
5188         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
5189         -masm=intel.
5190         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
5191         -masm=intel.
5192         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
5193         -masm=intel.
5194         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
5195         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
5196         %g1.
5197         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
5198         -masm=intel.
5199         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
5200         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
5201         %g1 and one with %0 and %1.
5202         (avx512er_vmrcp28<mode><round_saeonly_name>,
5203         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
5204         %1 for -masm=intel.
5205         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
5206         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
5207         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
5208         of %0 and %{%4%} for -masm=intel.
5209         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
5210         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
5211         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
5212         order of %0 and %{%5%}%{z%} for -masm=intel.
5214 2018-04-17  Jan Hubicka  <jh@suse.cz>
5216         PR lto/85405
5217         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
5219 2018-04-17  Martin Liska  <mliska@suse.cz>
5221         PR ipa/85329
5222         * multiple_target.c (create_dispatcher_calls): Set apostrophes
5223         for target_clone error message.  Make default implementation
5224         clone to be a local declaration.
5225         (separate_attrs): Add new argument and check for an empty
5226         string.
5227         (expand_target_clones): Handle it.
5228         (ipa_target_clone): Make redirection just for target_clones
5229         functions.
5231 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
5232             Tom de Vries  <tom@codesourcery.com>
5234         PR middle-end/84955
5235         * omp-expand.c (expand_oacc_for): Add dummy false branch for
5236         tiled basic blocks without omp continue statements.
5238 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
5240         PR target/83660
5241         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
5242         vec_extract expression as having side effects to make sure it gets
5243         a cleanup point.
5245 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
5247         PR target/85403
5248         * config/i386/i386.c (get_builtin_code_for_version): Check
5249         error_mark_node.
5251 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
5253         PR target/84331
5254         * gcc/config.gcc: Support "skylake".
5255         * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
5256         PROCESSOR_SKYLAKE.
5257         * gcc/config/i386/i386.c (m_SKYLAKE): Define.
5258         (processor_target_table): Add "skylake".
5259         (ix86_option_override_internal): Add "skylake".
5260         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
5261         PROCESSOR_CANNONLAKE.
5262         (get_builtin_code_for_version): Fix priority for
5263         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
5264         PROCESSOR_SKYLAKE-AVX512.
5265         * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
5266         (processor_type): Add PROCESSOR_SKYLAKE.
5268 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
5269             Jason Merrill  <jason@redhat.com>
5271         PR c++/85112
5272         * convert.c (convert_to_integer_1): Use direct recursion for
5273         enumeral types and types with a precision less than the number
5274         of bits in their mode.
5276 2018-04-16  Julia Koval  <julia.koval@intel.com>
5278         PR target/84413
5279         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
5280         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
5282 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
5284         PR target/85293
5285         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
5286         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
5287         and -mno-direct-move.
5289 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
5291         PR target/83402
5292         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
5293         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
5294         Ensure negative shifts result in {0}.
5296 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
5298         PR rtl-optimization/79916
5299         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
5300         regs (if any) to define how to gnerate SD moves when LRA is in
5301         progress.
5303 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
5305         PR rtl-optimization/85393
5306         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
5307         * except.c (expand_dw2_landing_pad_for_region): Make static.
5308         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
5309         a label and unconditional jump to old_bb, rather than
5310         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
5311         basic block.
5313         PR rtl-optimization/85376
5314         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
5315         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
5316         instead of a specific value.
5318 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
5319             Bin Cheng  <bin.cheng@arm.com>
5321         PR tree-optimization/82965
5322         PR tree-optimization/83991
5323         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
5324         by_profile_only parameter.
5325         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
5326         information if the loop was predicted to iterate too many times.
5327         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
5329 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
5331         PR lto/71991
5332         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
5333         always inline.
5335 2018-04-13  Martin Liska  <mliska@suse.cz>
5336             Jakub Jelinek  <jakub@redhat.com>
5338         PR middle-end/81657
5339         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
5340         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
5341         * builtins.c (expand_builtin_memory_copy_args): Use
5342         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
5343         handle dest_addr == pc_rtx.
5345 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
5347         PR target/85291
5348         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
5349         asked to not generate direct moves.
5350         (fix_trunc<mode>si2_stfiwx): Similar.
5351         (fix_trunc<mode>si2_internal): Similar.
5353 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
5355         PR debug/83157
5356         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
5357         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
5358         lookup if dest in some wider mode is known to be const0_rtx and
5359         if so, record permanent equivalence for it to be ZERO_EXTEND of
5360         the narrower mode destination.
5362 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
5364         * lto-streamer-out.c (output_function): Revert 259346.
5365         * omp-expand.c (expand_oacc_for): Likewise.
5367 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
5369         PR rtl-optimization/85354
5370         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
5371         * sel-sched.c (sel_global_init): ... here.
5373 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
5375         PR target/85238
5376         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
5377         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
5378         mode for PE-COFF targets.
5379         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
5380         (i386_pe_asm_lto_end): Likewise.
5381         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
5382         (TARGET_ASM_LTO_END): Likewise.
5383         * config/i386/winnt.c (saved_debug_info_level): New static variable.
5384         (i386_pe_asm_lto_start): New function.
5385         (i386_pe_asm_lto_end): Likewise.
5387 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
5388             Richard Biener  <rguenther@suse.de>
5390         PR middle-end/84955
5391         * lto-streamer-out.c (output_function): Fix CFG loop state before
5392         streaming out.
5393         * omp-expand.c (expand_oacc_for): Handle calls to internal
5394         functions like regular functions.
5396 2018-04-12  Richard Biener  <rguenther@suse.de>
5398         PR lto/85371
5399         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
5400         for the early LTO debug to properly generate references to it
5401         during DIE emission.  Do not re-use that for the skeleton for
5402         split-dwarf.
5403         (dwarf2out_early_finish): Likewise.
5405 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
5407         PR target/85328
5408         * config/i386/sse.md
5409         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
5410         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
5411         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
5412         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
5413         and output is a reg, avoid creating invalid lowpart subreg, but
5414         instead split into a 512-bit move.  Don't split if not AVX512VL,
5415         input is xmm16+ reg and output is a mem.
5416         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
5417         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
5418         xmm16+ reg and output is a mem.
5420 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
5422         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
5423         also for flag_dwarf2_cfi_asm.
5425 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
5427         PR rtl-optimization/85342
5428         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
5429         a bool scalar var inside of the loop instead.  Don't try to update
5430         recog_data.operand after failed apply_change_group.
5432 2018-04-12  Tom de Vries  <tom@codesourcery.com>
5434         PR target/85296
5435         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
5436         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
5437         array with flexible array member as array without given dimension.
5438         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
5439         argument for undefined param to true.
5441 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
5443         PR target/85321
5444         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
5445         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
5446         from PowerPC section.
5447         * config/rs6000/sysv4.opt (mcall-): Improve help text.
5448         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
5449         help text that is too long.
5450         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
5451         help text that is too long.
5452         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
5453         help text that is too long.
5455 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
5457         * config/alpha/alpha.md (stack_probe_internal): Rename
5458         from "probe_stack".  Update all callers.
5460 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
5462         PR rtl-optimization/84566
5463         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
5464         sched_macro_fuse_insns.
5466 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
5468         PR target/84301
5469         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
5470         (compute_block_dependences): ... from here.
5472 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
5474         PR tree-optimization/85331
5475         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
5476         from int to HOST_WIDE_INT.
5478 2018-04-11  Martin Jambor  <mjambor@suse.cz>
5480         PR ipa/84149
5481         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
5482         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
5483         not the same as the source val.
5484         (cgraph_edge_brings_value_p): New parameter.
5485         (gather_edges_for_value): Pass destination value to
5486         cgraph_edge_brings_value_p.
5487         (perhaps_add_new_callers): Likewise.
5488         (get_info_about_necessary_edges): Likewise and exclude values brought
5489         only by self-recursive edges.
5490         (create_specialized_node): Redirect only clones of self-calling edges.
5491         (+self_recursive_pass_through_p): New function.
5492         (find_more_scalar_values_for_callers_subset): Use it.
5493         (find_aggregate_values_for_callers_subset): Likewise.
5494         (known_aggs_to_agg_replacement_list): Removed.
5495         (decide_whether_version_node): Re-calculate known constants for all
5496         remaining context clones.
5498 2018-04-11  Richard Biener  <rguenther@suse.de>
5500         PR lto/85339
5501         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
5502         from early DWARF output.
5503         (dwarf2out_early_finish): Output line info unconditionally into
5504         early DWARF and add reference to it.
5506 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
5508         PR target/85281
5509         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
5510         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
5511         other than V2DFmode using iptr mode attribute.
5512         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
5514 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
5516         PR rtl-optimization/84659
5517         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
5519 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
5521         PR debug/85302
5522         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
5523         SIZEP is NULL.
5524         (output_loc_list): Pass address of a dummy size variable even in the
5525         locview handling loop.
5526         (index_location_lists): Add comment on why skip_loc_list_entry can't
5527         call size_of_locs.
5529 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
5531         PR target/85261
5532         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
5533         into register.
5535 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
5537         PR target/85321
5538         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
5539         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
5540         and -mstring-compare-inline-limit.
5542 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
5544         PR target/85287
5545         * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
5546         for stack clash protection in a register whenever we need it to be in
5547         a register.
5549 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
5551         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
5552         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
5554 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
5556         PR target/85321
5557         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
5558         the help text.
5559         (mlong-double-): Ditto.
5560         * config/rs6000/sysv4.opt (msdata=): Ditto.
5561         (mtls-size=): Ditto.
5563 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5565         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
5566         erroneous entries for
5567         "vector int vec_ldl (int, long int *)", and
5568         "vector unsigned int vec_ldl (int, unsigned long int *)".
5569         Add comments and entries for
5570         "vector bool char vec_ldl (int, bool char *)",
5571         "vector bool short vec_ldl (int, bool short *)",
5572         "vector bool int vec_ldl (int, bool int *)",
5573         "vector bool long long vec_ldl (int, bool long long *)",
5574         "vector pixel vec_ldl (int, pixel *)",
5575         "vector long long vec_ldl (int, long long *)",
5576         "vector unsigned long long vec_ldl (int, unsigned long long *)".
5577         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
5578         type tree bool_long_long_type_node and correct definition of
5579         bool_V2DI_type_node to make reference to this new type tree.
5580         (rs6000_mangle_type): Replace erroneous reference to
5581         bool_long_type_node with bool_long_long_type_node.
5582         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
5583         comments to emphasize sign distinctions for char and int types and
5584         replace RS6000_BTI_bool_long constant with
5585         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
5586         use of RS6000_BTI_pixel.
5587         (bool_long_type_node): Remove this macro definition.
5588         (bool_long_long_type_node): New macro definition
5590 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
5592         PR rtl-optimization/85300
5593         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
5594         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
5595         simplify_unary_operation fails.
5597 2018-04-10  Martin Liska  <mliska@suse.cz>
5599         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
5600         cgraph_edge and ipa_ref.
5602 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
5604         PR target/85177
5605         PR target/85255
5606         * config/i386/sse.md
5607         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
5608         computation of the VEC_MERGE selector from mask.
5609         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
5610         Fix decoding of the VEC_MERGE selector into mask.
5612 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
5614         PR tree-optimization/85286
5615         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
5617 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
5619         * final.c (final_1): Set insn_last_address as well as
5620         insn_current_address.
5622 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5624         PR target/85173
5625         * explow.c (emit_stack_probe): Call validize_mem on memory location
5626         before passing it to gen_probe_stack.  Create address operand and
5627         legitimize it for the probe_stack_address case.
5629 2018-04-09  Jan Hubicka  <jh@suse.cz>
5631         PR lto/85078
5632         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
5633         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
5634         * tree.c (free_lang_data_in_type): Fix handling of binfos;
5635         walk basetypes.
5636         (free_lang_data): Rebuild type inheritance graph.
5638 2018-04-09  Martin Sebor  <msebor@redhat.com>
5640         * invoke.texi (-finline-small-functions): Mention other optimization
5641         options.
5642         (-findirect-inlining, -fpartial-inlining): Same.
5643         (-finline-functions-called-once): Same.
5644         (-freorder-blocks-and-partition): Same.
5646 2018-04-09  Jan Hubicka  <jh@suse.cz>
5648         PR rtl/84058
5649         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
5650         jumps; choose last target that matches the criteria (i.e.
5651         no partition changes for non-crossing jumps).
5652         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
5653         support for redirecting crossing jumps to non-crossing.
5655 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
5657         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
5658         also for naked functions.
5660 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
5662         * config/arc/arc.md (add_shift): New pattern.
5663         (add_shift2): Likewise.
5664         (sub_shift): Likewise.
5665         (sub_shift_cmp0_noout): Likewise.
5666         (compare_si_ashiftsi): Likewise.
5667         (xbfu_cmp0_noout): New combine pattern.
5668         (xbfu_cmp0"): Likewise.
5669         (movsi_set_cc_insn): Place the predicable variant first.
5670         (commutative_binary_cmp0_noout): Remove clobber.
5671         (commutative_binary_cmp0): New pattern.
5672         (noncommutative_binary_cmp0): Likewise.
5673         (noncommutative_binary_cmp0_noout): Likewise.
5674         (noncommutative_binary_comparison_result_used): Removed.
5675         (rsub_cmp0): New pattern.
5676         (rsub_cmp0_noout): Likewise.
5677         (extzvsi): Changed, keep only meaningful variants.
5678         (SQH, SEZ): New iterators.
5679         (SQH_postfix): New mode attribute.
5680         (SEZ_prefix): New code attribute.
5681         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
5682         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
5683         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
5684         of numerical value.
5685         (noncommutative_operator): Check the availability of barrel
5686         shifter option.
5688 2018-04-09  Richard Biener  <rguenther@suse.de>
5690         PR tree-optimization/85284
5691         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
5692         Only use the niter constraining form of simple_iv when the exit
5693         is always executed.
5695 2018-04-09  Tom de Vries  <tom@codesourcery.com>
5697         PR target/84041
5698         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
5699         (define_expand "*memory_barrier"): New define_expand.
5700         (define_insn "memory_barrier"): New insn.
5702 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
5704         PR rtl-optimization/80463
5705         PR rtl-optimization/83972
5706         PR rtl-optimization/83480
5708         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
5709         correct producer for the insn.
5710         (tidy_control_flow): Fixup seqnos in case of debug insns.
5712 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
5714         PR rtl-optimization/83913
5716         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
5717         different sched-times when merging exprs.
5719 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
5721         PR rtl-optimization/83962
5723         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
5724         tidy_fallthru_edge and tidy_control_flow.
5726 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
5728         PR rtl-optimization/83530
5730         * sel-sched.c (force_next_insn): New global variable.
5731         (remove_insn_for_debug): When force_next_insn is true, also leave only
5732         next insn in the ready list.
5733         (sel_sched_region): When the region wasn't scheduled, make another pass
5734         over it with force_next_insn set to 1.
5736 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
5738         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
5739         into tm_file.
5740         * config/nds32/constants.md (unspec_volatile_element): Add enum values
5741         for interrupt control.
5742         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
5743         functions for interrupt control.
5744         * config/nds32/nds32-intrinsic.md: Likewise.
5745         * config/nds32/nds32_intrinsic.h: Likewise.
5746         * config/nds32/nds32.h (nds32_builtins): Likewise.
5748 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
5750         * config/nds32/nds32.c (nds32_init_machine_status,
5751         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
5752         strict_aligned_p field.
5753         (nds32_expand_to_rtl_hook): New function.
5754         (TARGET_EXPAND_TO_RTL_HOOK): Define.
5755         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
5757 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
5758             Chung-Ju Wu  <jasonwucj@gmail.com>
5760         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
5761         * config/nds32/nds32-n7.md: New file.
5762         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
5763         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
5764         pipeline.
5765         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
5766         * config/nds32/nds32.md (pipeline_model): Add n7.
5767         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
5768         * config/nds32/pipelines.md: Include n7 settings.
5770 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
5771             Chung-Ju Wu  <jasonwucj@gmail.com>
5773         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
5774         * config/nds32/nds32-e8.md: New file.
5775         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
5776         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
5777         pipeline.
5778         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
5779         * config/nds32/nds32.md (pipeline_model): Add e8.
5780         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
5781         * config/nds32/pipelines.md: Include e8 settings.
5783 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
5784             Chung-Ju Wu  <jasonwucj@gmail.com>
5786         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
5787         * config/nds32/nds32-n8.md: New file.
5788         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
5789         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
5790         pipeline.
5791         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
5792         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
5793         * config/nds32/nds32.md (pipeline_model): Add n8.
5794         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
5795         * config/nds32/pipelines.md: Include n8 settings.
5797 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
5798             Chung-Ju Wu  <jasonwucj@gmail.com>
5800         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
5801         * config/nds32/nds32-n9-2r1w.md: New file.
5802         * config/nds32/nds32-n9-3r2w.md: New file.
5803         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
5804         nds32_register_ports): New or modify for cpu n9.
5805         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
5806         pipeline.
5807         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
5808         * config/nds32/nds32-utils.c: New file.
5809         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
5810         TARGET_MUL_SLOW): Define.
5811         * config/nds32/nds32.md (pipeline_model): New attribute.
5812         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
5813         New options that support cpu n9.
5814         * config/nds32/pipelines.md: Include n9 settings.
5815         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
5817 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
5819         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
5820         information if necessary.
5821         (output_cond_branch_compare_zero): Likewise.
5822         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
5823         (nds32_target_alignment): Refine for alignment.
5824         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
5825         (FUNCTION_BOUNDARY): Modify.
5826         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
5827         align case.
5828         * config/nds32/nds32.opt (malways-align, malign-functions): New.
5830 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
5832         * config/nds32/constants.md (unspec_volatile_element): Add values for
5833         TLB operation and data prefetch.
5834         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
5835         functions for TLB operation and data prefetch.
5836         * config/nds32/nds32-intrinsic.md: Likewise.
5837         * config/nds32/nds32_intrinsic.h: Likewise.
5838         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
5839         (nds32_print_operand): Likewise.
5840         * config/nds32/nds32.h (nds32_builtins): Likewise.
5842 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
5843         Andrew Pinski <pinsika@gcc.gnu.org>
5845         PR middle-end/82976
5846         * match.pd: Use constant_boolean_node of correct type instead of
5847         boolean_true_node or boolean_false_node for simplifying
5848         pointer comparisons to zero.
5850 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
5852         PR tree-optimization/80021
5853         * tree.c (verify_type_variant): Make error call in verify_variant_match
5854         translatable and remove final full stop.
5856 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
5858         * config/nds32/constants.md (unspec_volatile_element): Add
5859         UNSPEC_VOLATILE_EH_RETURN.
5860         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
5861         nds32_output_stack_pop): Support dwarf exception handling process.
5862         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
5863         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
5864         exception handling process.
5865         (nds32_compute_stack_frame): Likewise.
5866         (nds32_return_addr_rtx): Likewise.
5867         (nds32_initial_elimination_offset): Likewise.
5868         (nds32_expand_prologue): Likewise.
5869         (nds32_expand_epilogue): Likewise.
5870         (nds32_dynamic_chain_address): New function.
5871         * config/nds32/nds32.h (machine_function): Add fields for dwarf
5872         exception handling.
5873         (DYNAMIC_CHAIN_ADDRESS): Define.
5874         (EH_RETURN_DATA_REGNO): Define.
5875         (EH_RETURN_STACKADJ_RTX): Define.
5876         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
5877         patterns for dwarf exception handling.
5879 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
5881         * config/nds32/nds32.h: Clean up obsolete macros.
5883 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
5885         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
5886         Add enum values for particular instructions.
5887         * config/nds32/nds32-intrinsic.c: Implementation of expanding
5888         particular intrinsic functions.
5889         * config/nds32/nds32-intrinsic.md: Likewise.
5890         * config/nds32/nds32_intrinsic.h: Likewise.
5891         * config/nds32/nds32.h (nds32_builtins): Likewise.
5892         * config/nds32/nds32.md (type): Add pbsad and pbsada.
5893         (btst, ave): New patterns for particular instructions.
5895 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
5897         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
5898         Add enum values for atomic load/store and memory sync.
5899         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
5900         and memory sync.
5901         * config/nds32/nds32-intrinsic.md: Likewise.
5902         * config/nds32/nds32_intrinsic.h: Likewise.
5903         * config/nds32/nds32.h (nds32_builtins): Likewise.
5905 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
5907         PR tree-optimization/85257
5908         * fold-const.c (native_encode_vector): If not all elts could fit
5909         and off is -1, return 0 rather than offset.
5910         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
5911         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
5912         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
5913         adjust buffer in native_interpret_expr call.
5915 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
5917         * config/nds32/constants.md (unspec_volatile_element): Add cache
5918         control enum values.
5919         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
5920         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
5921         * config/nds32/nds32.c (nds32_cctl_names): New.
5922         (nds32_print_operand): Handle cache control register names.
5923         * config/nds32/nds32.h (nds32_builtins): New enum values.
5924         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
5925         macros.
5926         * config/nds32/nds32.md (type): Add mmu.
5927         * config/nds32/pipelines.md (simple_insn): Add mmu.
5929 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
5931         * config/nds32/nds32.md (type): Remove call.
5932         * config/nds32/pipelines.md (simple_insn): Likewise.
5934 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
5936         * config/nds32/constants.md (unspec_volatile_element): Add
5937         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
5938         UNSPEC_VOLATILE_FMFCFG.
5939         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
5940         description for fmfcfg and fmfcsr.
5941         (bdesc_1arg): Add fmtcsr.
5942         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
5943         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
5944         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
5945         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
5946         unspec_fmfcfg): New patterns.
5947         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
5948         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
5949         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
5950         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
5951         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
5952         __nds32__fmfcfg): Define.
5954 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
5956         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
5957         intrinsic register names.
5958         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
5959         intrinsic register enum values and macros.
5961 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
5963         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
5964         for load/store addressing form.
5965         (nds32_print_operand_address): Likewise.
5967 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
5969         PR target/85196
5970         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
5971         based on LABEL_REF.  Remove useless assertion.
5972         (pic_address_needs_scratch): Fix formatting.
5973         (sparc_legitimize_pic_address): Minor tweaks.
5974         (sparc_delegitimize_address): Adjust assertion accordingly.
5975         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
5976         into symbolic_operand.
5977         (movsi_high_pic_label_ref): Likewise.
5978         (movsi_lo_sum_pic_label_ref): Likewise.
5979         (movdi_pic_label_ref): Likewise.
5980         (movdi_high_pic_label_ref): Likewise.
5981         (movdi_lo_sum_pic_label_ref): Likewise.
5983 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
5985         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
5986         custom LIB_SPEC setup.
5988 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
5989             Kito Cheng  <kito.cheng@gmail.com>
5991         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
5992         * config/riscv/freebsd.h: New.
5994 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
5996         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
5997         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
5998         file.
6000 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
6001             Kito Cheng  <kito.cheng@gmail.com>
6003         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
6004         nds32_output_call, nds32_symbol_binds_local_p): New functions.
6005         * config/nds32/nds32-protos.h (nds32_output_call,
6006         nds32_output_return): Declare.
6007         * config/nds32/nds32.md: Refine all the call and return patterns.
6009 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
6011         PR debug/85252
6012         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
6013         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
6015         PR rtl-optimization/84872
6016         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
6017         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
6018         EDGE_CROSSING edge.
6020 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
6022         * expr.c (copy_blkmode_to_reg): Revert 254862.
6023         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
6025 2018-04-06  Richard Biener  <rguenther@suse.de>
6027         PR middle-end/85244
6028         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
6029         after seeing a component reference with an adjacent field.  Treat
6030         refs to arrays at struct end of external decls similar to
6031         refs to unconstrained commons.
6033 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
6035         PR sanitizer/85213
6036         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
6037         look through SAVE_EXPRs with non-side-effects argument.  Adjust
6038         recursive calls.
6039         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
6040         save_p here.
6042 2018-04-06  Richard Biener  <rguenther@suse.de>
6044         PR middle-end/85180
6045         * alias.c (find_base_term): New wrapper around find_base_term
6046         unwinding CSELIB_VAL_PTR changes.
6047         (find_base_term): Do not restore CSELIB_VAL_PTR during the
6048         recursion.
6050 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
6052         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
6053         instructions.
6054         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
6055         constant definitions.
6056         ("nop"): lr 0,0 -> nopr r0
6057         ("nop_lr0", "nop_lr1"): New insn definitions.
6059 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
6061         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
6062         NDS32_V3PUSH_AVAILABLE_P macro.
6064 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
6065             Chung-Ju Wu  <jasonwucj@gmail.com>
6067         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
6068         (nds32*-*-*): Add float and fpu_config into supported_defaults.
6069         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
6070         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
6071         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
6072         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
6073         * config/nds32/constraints.md: New constraints and checking for hard
6074         float configuration.
6075         * config/nds32/iterators.md: New mode iterator and attribute for hard
6076         float configuration.
6077         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
6078         patterns.
6079         * config/nds32/nds32-fpu.md: New file.
6080         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
6081         deal with hard float code generation.
6082         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
6083         ARCH_V3S.
6084         (abi_type, float_reg_number): New enum type.
6085         * config/nds32/nds32-predicates.c: New predicates for hard float.
6086         * config/nds32/nds32-protos.h: Declare functions for hard float.
6087         * config/nds32/nds32.c: Implementation for hard float configuration.
6088         * config/nds32/nds32.h: Definitions for hard float configuration.
6089         * config/nds32/nds32.md: Include hard float machine description and
6090         modify patterns for hard float configuration.
6091         * config/nds32/nds32.opt: New options for hard float configuration.
6092         * config/nds32/predicates.md: New predicates for hard float
6093         configuration.
6095 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
6097         * common/config/nds32/nds32-common.c
6098         (nds32_option_optimization_table): Enable -mreleax-hint by default.
6100 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
6102         PR middle-end/85195
6103         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
6104         CONSTRUCTOR_ELT (ctor, ...)->value.
6106 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
6108         PR target/85193
6109         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
6111 2018-04-05  Tom de Vries  <tom@codesourcery.com>
6113         PR target/85204
6114         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
6115         cond jump.
6117 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
6118             Kito Cheng  <kito.cheng@gmail.com>
6120         * config/nds32/constraints.md (U33): Fine-tune checking condition.
6121         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
6122         * config/nds32/nds32.h (nds32_16bit_address_type): Add
6123         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
6125 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
6126             Kito Cheng  <kito.cheng@gmail.com>
6128         * config/nds32/constraints.md (Ufe): New memory constraint.
6129         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
6130         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
6131         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
6132         operands.
6133         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
6134         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
6136 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
6138         * config/nds32/nds32.md: Use optimize_size in the condition for
6139         alu-shift instructions.
6141 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
6143         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
6145 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
6147         * config/nds32/nds32.md (negsi2): Refine pattern.
6149 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
6150             Chung-Ju Wu  <jasonwucj@gmail.com>
6152         * config/nds32/iterators.md (shift_rotate): New code iterator.
6153         (shift): New code attribute.
6154         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
6155         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
6156         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
6157         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
6158         bit-wise operations.
6159         (andsi3, *andsi3): Ditto.
6160         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
6161         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
6162         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
6163         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
6164         nds32_ior_operand, nds32_xor_operand): New predicates.
6166 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
6168         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
6169         (addsi3, subsi3): ... this.
6171 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
6173         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
6175 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
6177         * config/nds32/nds32.md: Adjust indention.
6179 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
6181         * config/nds32/nds32.md (feature): New attribute.
6183 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
6185         * config/nds32/nds32.md (subtype): New attribute.
6187 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
6189         PR target/85203
6190         * config/arm/arm-builtins.c (arm_expand_builtin): Change
6191         expansion to perform a bitwise AND of the argument followed by a
6192         boolean negation of the result.
6194 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
6196         PR rtl-optimization/84878
6197         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
6198         the basic block.  Assert the use reference is not artificial and that
6199         it has an associated insn.
6201 2018-04-04  Michael Matz  <matz@suse.de>
6203         * builtins.c (compute_objsize): Pass correct operand
6204         to array_at_struct_end_p.
6206 2018-04-04  Richard Biener  <rguenther@suse.de>
6208         PR lto/85176
6209         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
6210         from contexts for DINFO_LEVEL_TERSE and below.
6212 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
6214         * config/nds32/nds32-doubleword.md (move_<mode>): Require
6215         resiter_operand condition.
6216         * config/nds32/nds32.md (*move<mode>): Ditto.
6218 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
6219             Monk Chiang  <sh.chiang04@gmail.com>
6221         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
6223 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
6225         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
6227 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
6228             Kito Cheng  <kito.cheng@gmail.com>
6230         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
6231         nds32_cond_code_str, output_cond_branch,
6232         output_cond_branch_compare_zero, nds32_expand_cbranch,
6233         nds32_expand_cstore, nds32_expand_movcc,
6234         nds32_output_cbranchsi4_equality_zero,
6235         nds32_output_cbranchsi4_equality_reg,
6236         nds32_output_cbranchsi4_equality_reg_or_const_int,
6237         nds32_output_cbranchsi4_greater_less_zero: New functions.
6238         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
6239         nds32_expand_cstore, nds32_expand_movcc,
6240         nds32_output_cbranchsi4_equality_zero,
6241         nds32_output_cbranchsi4_equality_reg,
6242         nds32_output_cbranchsi4_equality_reg_or_const_int,
6243         nds32_output_cbranchsi4_greater_less_zero): Declare.
6244         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
6245         nds32_rimm11s_operand): New predicates.
6246         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
6247         * config/nds32/nds32.md: Rewrite all the branch and conditional move
6248         patterns.
6250 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
6252         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
6253         * config/nds32/nds32.md: Ditto.
6254         * config/nds32/pipelines.md: Ditto.
6256 2018-04-04  Richard Biener  <rguenther@suse.de>
6258         PR tree-optimization/85168
6259         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
6260         propagating abnormals.
6262 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
6264         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
6266 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
6267             Kito Cheng  <kito.cheng@gmail.com>
6269         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
6270         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
6271         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
6272         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
6273         * config/nds32/nds32.md (sibcall_internal): New.
6274         (sibcall_register): Remove.
6275         (sibcall_immediate): Remove.
6276         (sibcall_value_internal): New.
6277         (sibcall_value_register): Remove.
6278         (sibcall_value_immediate): Remove.
6279         * config/nds32/predicates.md (nds32_general_register_operand): New.
6280         (nds32_call_address_operand): New.
6282 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
6284         PR rtl-optimization/85167
6285         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
6286         bb_defs if *split_p, instead preinitialize it to NULL.
6288         PR tree-optimization/85156
6289         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
6290         evaluating the argument multiple times.
6292 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
6294         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
6295         than vector.
6296         (_mm_cvtpd_ps): Likewise.
6297         (_mm_cvttpd_epi32): Likewise.
6298         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
6299         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
6300         vector, pixel, and bool following altivec.h include.
6302 2018-04-03  Martin Sebor  <msebor@redhat.com>
6304         * doc/extend.texi (Common Function Attributes): Clarify.
6305         (const attribute): Likewise.
6306         (pure attribute): Likewise.
6308 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
6310         PR target/85169
6311         * config/i386/i386.c (ix86_expand_vector_set): Use
6312         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
6314 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
6316         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
6317         instructions when changing rounding bits to preserve precision bits
6318         in the x87 control word.
6320 2018-04-03  Martin Liska  <mliska@suse.cz>
6322         PR tree-optimization/82491
6323         * rtl.h (strip_offset_and_add): Replace += suboffset with
6324         poly_uint64 () + suboffset.
6326 2018-03-29  Martin Liska  <mliska@suse.cz>
6327             Martin Jambor  <mjambor@suse.cz>
6329         PR ipa/84947
6330         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
6331         param_type is not an integral or pointer type.
6333 2018-04-03  Richard Biener  <rguenther@suse.de>
6335         * sese.h (recompute_all_dominators): Remove.
6337 2018-04-02  Martin Sebor  <msebor@redhat.com>
6339         * doc/invoke.texi (-Wrestrict): Fix typos.
6341 2018-04-02  Jim Wilson  <jimw@sifive.com>
6343         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
6344         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
6345         (<optab>di3, <optab>si3_extend): Likewise.
6346         (<optab>si3_mask, <optab>si3_mask_1): New.
6347         (<optab>di3_mask, <optab>di3_mask_1): New.
6348         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
6349         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
6350         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
6352 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
6354         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
6355         example.
6357 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
6359         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
6360         (nds32_canonicalize_comparison): New function.
6362 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
6363             Kito Cheng  <kito.cheng@gmail.com>
6364             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
6366         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
6367         * config/nds32/constants.md (unspec_volatile_element): Add
6368         UNSPEC_VOLATILE_RELAX_GROUP.
6369         * config/nds32/nds32-relax-opt.c: New file.
6370         * config/nds32/nds32-predicates.c
6371         (nds32_symbol_load_store_p): New function.
6372         * config/nds32/nds32-protos.h
6373         (nds32_symbol_load_store_p): Declare function.
6374         (make_pass_nds32_relax_opt): Declare new rtl pass function.
6375         * config/nds32/nds32.c
6376         (nds32_register_pass): New function to register pass.
6377         (nds32_register_passes): New function to register passes.
6378         * config/nds32/nds32.md (relax_group): New pattern.
6379         * config/nds32/nds32.opt (mrelax-hint): New option.
6380         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
6382 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
6384         * config/nds32/t-nds32: Modify files dependency.
6386 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
6388         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
6389         (PROFILE_HOOK): Define its implementation.
6391 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
6393         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
6394         type and 32-bit size.
6396 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
6398         PR middle-end/85090
6399         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
6400         (V_128_256): New mode iterator.
6401         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
6402         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
6403         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
6404         of V.
6405         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
6406         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
6408 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
6410         PR target/83315
6411         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
6412         NaN inputs correctly.
6414 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
6416         PR target/80546
6417         * config/rs6000/vsx.md (??r): New mode attribute.
6418         (*vsx_mov<mode>_64bit): Use it.
6419         (*vsx_mov<mode>_32bit): Likewise.
6421 2018-03-30  Martin Sebor  <msebor@redhat.com>
6423         PR tree-optimization/84818
6424         * builtins.c (check_access): Use warning_n.
6426 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
6428         PR target/83822
6429         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
6430         condition.
6431         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
6432         condition.
6434 2018-03-30  Julia Koval  <julia.koval@intel.com>
6436         PR target/84413
6437         * x86-tune.def (movx, partial_reg_dependency): Enable for
6438         m_SKYLAKE_AVX512.
6440 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
6442         PR inline-asm/84985
6443         * lra-constraints.c (process_alt_operands): Move setting
6444         this_alternative_matches below.
6446 2018-03-29  Martin Liska  <mliska@suse.cz>
6448         PR lto/84995.
6449         * doc/invoke.texi: Document how LTO works with debug info.
6450         Describe auto-load support of binutils.  Mention 'x86-64'
6451         as valid option value of -march option.
6453 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
6455         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
6457         PR c/85094
6458         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
6459         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
6460         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
6461         checking.
6463 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
6465         PR target/84912
6466         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
6467         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
6468         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
6469         for RS6000_BTM_POWERPC64.
6470         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
6471         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
6472         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
6473         definition.
6474         (DIVDE): Use it.
6475         (DIVDEU): Likewise.
6477 2018-03-28 Carl Love  <cel@us.ibm.com>
6479         Revert
6480         2017-09-27  Carl Love  <cel@us.ibm.com>
6482         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
6483         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
6484         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
6485         fctiw instruction.
6487 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
6489         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
6490         instead of __vector bool.
6491         (_mm_max_pu8): Likewise.
6492         (_mm_min_pi16): Likewise.
6494 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
6496         PR target/84912
6497         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
6498         (DIVWEUO): Likewise.
6499         (DIVDEO): Likewise.
6500         (DIVDEUO): Likewise.
6501         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
6502         DIVWEUO and DIVDEUO.
6503         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
6504         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
6505         (div_extend): Likewise.
6506         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
6507         builtin function.
6508         (__builtin_divweuo): Likewise.
6509         (__builtin_divdeo): Likewise.
6510         (__builtin_divdeuo): Likewise.
6512 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
6514         PR target/85095
6515         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
6516         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
6518         PR tree-optimization/82004
6519         * gimple-match-head.c (optimize_pow_to_exp): New function.
6520         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
6521         Don't fold to exp if optimize_pow_to_exp is false.
6523 2018-03-28  Martin Liska  <mliska@suse.cz>
6525         PR other/84819
6526         * calls.c (initialize_argument_information): Fix trailing space.
6527         * common.opt: Fix typo and provide better explanation for
6528         -fsanitize-coverage option.
6529         * config/i386/i386.opt: Fix typo.
6531 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
6532             Martin Liska  <mliska@suse.cz>
6534         PR sanitizer/85081
6535         * gimplify.c (asan_poison_variable): Don't do the check for
6536         gimplify_omp_ctxp here.
6537         (gimplify_decl_expr): Do it here.
6538         (gimplify_target_expr): Likewise.
6540 2018-03-28  Martin Liska  <mliska@suse.cz>
6542         PR target/84988
6543         * config/i386/i386.c (ix86_function_arg_advance): Do not call
6544         chkp_type_bounds_count if MPX is not enabled.
6546 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
6548         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
6550 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
6552         PR target/84914
6553         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
6554         function to create the function decl for complex long double
6555         multiply and divide for -mabi=ieeelongdouble.
6556         (init_float128_ieee): Call it.
6558 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
6560         PR target/85044
6561         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
6562         -fcf-protection=branch -mibt.
6563         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
6565 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
6567         PR target/81863
6568         * config/arm/arm.c (arm_valid_symbolic_address): Handle
6569         arm_word_relocations.
6571 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
6573         PR target/85056
6574         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
6575         extern array declarations.
6577 2018-03-27  Richard Biener  <rguenther@suse.de>
6579         PR middle-end/84067
6580         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
6581         explicit single_use checks.
6583 2018-03-27  Richard Biener  <rguenther@suse.de>
6585         PR tree-optimization/85082
6586         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
6587         Valueize the VUSE.
6589 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
6591         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
6592         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
6593         Turn on fasynchronous-unwind-tables and funwind-tables.
6595 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
6597         PR target/85073
6598         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
6599         (*bmi_blsr_<mode>_ccz): Ditto.
6601 2018-03-26  Tom de Vries  <tom@codesourcery.com>
6603         PR tree-optimization/85063
6604         * omp-general.c (offloading_function_p): New function.  Factor out
6605         of ...
6606         * omp-offload.c (pass_omp_target_link::gate): ... here.
6607         * omp-general.h (offloading_function_p): Declare.
6608         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
6609         with attribute omp declare target for offloading functions.
6611 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
6613         PR tree-optimization/84005
6614         * tree-data-ref.h (get_base_for_alignment): Declare.
6615         * tree-data-ref.c (get_base_for_alignment_1): New function.
6616         (get_base_for_alignment): Likewise.
6617         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
6618         get_base_for_alignment to find a suitable base object, instead
6619         of always using drb->base_address.
6621 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
6623         PR inline-asm/85022
6624         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
6625         known size by default.
6627 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
6629         PR inline-asm/85030
6630         * lra-constraints.c (process_alt_operands): Don't match BLKmode
6631         and non BLKmode operands.
6633 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6635         PR target/85026
6636         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
6637         Clean up attributes.
6639 2018-03-23  Richard Biener  <rguenther@suse.de>
6641         PR debug/85020
6642         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
6643         we are going to emit early debug for LTO.
6645 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
6647         PR inline-asm/85034
6648         * function.c (match_asm_constraints_1): Don't optimize if input
6649         doesn't satisfy general_operand predicate for output's mode.
6651         PR inline-asm/85022
6652         * alias.c (write_dependence_p): Don't require for x_canonicalized
6653         non-VOIDmode if x has VOIDmode.
6655         PR sanitizer/85029
6656         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
6657         just don't try to optimize it rather than assert it never happens.
6659 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6661         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
6662         macro expansions for definition of ST_INTERNAL_<mode> and
6663         LD_INTERNAL_<mode> builtins.
6664         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
6665         Remove prototype.
6666         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
6667         function.
6668         (altivec_expand_st_builtin): Likewise.
6669         (altivec_expand_builtin): Remove calls to deleted functions.
6670         (rs6000_address_for_altivec): Delete this function.
6671         * config/rs6000/vector.md: Remove expands for
6672         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
6674 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
6676         PR target/84826
6677         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
6678         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
6679         re-computing once computed.
6680         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
6681         (arm_init_machine_status): Initialize
6682         machine->static_chain_stack_bytes.
6684 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6686         PR target/84760
6687         * doc/extend.texi: Add four new prototypes for vec_ld.
6688         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
6689         definitions for more logical presentation.
6690         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
6691         entries for V1TI variants of __builtin_altivec_ld builtin.
6692         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
6693         handling of V1TI variant of LVX icode pattern.
6694         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
6695         (rs6000_gimple_fold_builtin): Likewise.
6696         (altivec_init_builtins): Add code to define
6697         __builtin_altivec_lvx_v1ti function.
6699 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
6701         PR inline-asm/84941
6702         * function.c (match_asm_constraints_1): Don't do the optimization
6703         if input isn't a REG, SUBREG, MEM or constant.
6705 2018-03-22  Tom de Vries  <tom@codesourcery.com>
6707         PR tree-optimization/84956
6708         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
6709         bb_has_abnormal_pred.
6711 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
6713         PR sanitizer/85018
6714         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
6715         DECL_INITIAL (decl) to decl at the end.
6716         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
6717         adjust the comment.
6719 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
6721         * doc/extend.texi (__builtin_tgmath): Document when complex
6722         integer types are treated as _Complex _Float64.
6724 2018-03-21  Tom de Vries  <tom@codesourcery.com>
6726         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
6728 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
6730         PR tree-optimization/84960
6731         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
6732         if it is ENTRY block, move them into single succ of ENTRY in that case.
6734 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
6736         PR tree-optimization/84811
6737         * poly-int.h (poly_span_traits): Remove the T3 parameter and
6738         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
6739         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
6740         (known_subrange_p): Update accordingly.  Cast each value involved
6741         in the size comparison, rather than casting the result of the
6742         subtraction.
6744 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
6746         PR tree-optimization/84982
6747         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
6748         by flipping the least significant bit rather than all bits from
6749         bitpos to bitpos + bitsize - 1.
6751 2018-03-21  Nathan Sidwell  <nathan@acm.org>
6753         * doc/extend.texi (Deprecated Features): Remove mention of
6754         long-deleted deprecations.
6756 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6758         PR jit/84288
6759         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
6760         * configure: Regenerate.
6762 2018-03-21  Tom de Vries  <tom@codesourcery.com>
6764         PR tree-optimization/83126
6765         * tree-parloops.c (num_phis): New function.
6766         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
6768 2018-03-21  Nathan Sidwell  <nathan@acm.org>
6770         * doc/extend.texi (Deprecated Features): Update deprecated flags,
6771         mention anon-struct/union members and trailing attributes.
6773 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
6775         PR tree-optimization/84969
6776         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
6777         builtin memset partitions if they set different rhs values.
6779 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
6781         PR rtl-optimization/84989
6782         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
6783         VEC_DUPLICATE with scalar result mode.
6785 2018-03-21  Martin Liska  <mliska@suse.cz>
6787         PR ipa/84963
6788         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
6789         not intended return statement.
6791 2018-03-21  Martin Liska  <mliska@suse.cz>
6793         PR target/84988
6794         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
6795         (chkp_find_bound_slots_1): Limit number of iterations.
6797 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
6799         PR target/84838
6800         * Minor grammar fixes for x86 options.
6802 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
6804         PR debug/84875
6805         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
6806         holding REG_CFA_RESTORE notes, instead turn them into a USE.
6808 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
6810         PR target/83789
6811         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
6812         (altivec_lvx_<mode>_1op): Likewise.
6813         (altivec_stvx_<mode>_2op): Likewise.
6814         (altivec_stvx_<mode>_1op): Likewise.
6815         (altivec_lvx_<VM2:mode>): New define_expand.
6816         (altivec_stvx_<VM2:mode>): Likewise.
6817         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
6818         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
6819         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
6820         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
6821         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
6822         (rs6000_gen_lvx): Likewise.
6823         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
6824         (altivec_expand_stv_builtin): Likewise.
6825         (altivec_expand_builtin): Likewise.
6826         * config/rs6000/vector.md: Likewise.
6828 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6830         PR target/82518
6831         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
6832         BYTES_BIG_ENDIAN.
6834 2018-03-20  Richard Biener  <rguenther@suse.de>
6836         PR target/84986
6837         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
6838         sign-conversions as zero, fall back to standard scalar_stmt
6839         cost for the rest.
6841 2018-03-20  Martin Liska  <mliska@suse.cz>
6843         PR ipa/84825
6844         * predict.c (rebuild_frequencies): Handle case when we have
6845         PROFILE_ABSENT, but flag_guess_branch_prob is false.
6847 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
6849         PR target/84990
6850         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
6851         flag_section_anchors.
6852         * varasm.c (use_blocks_for_decl_p): Remove hack for
6853         dw2_force_const_mem.
6855         PR target/84845
6856         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
6857         to ...
6858         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
6859         be created, use lowpart_subreg of operands[0] rather than operands[0]
6860         itself.
6861         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
6862         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
6863         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
6864         and n constraint instead of aarch64_shift_imm_di and Usd.
6865         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
6866         (*aarch64_<optab>_reg_minus<mode>3): ... this.
6868 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
6870         PR target/82989
6871         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
6872         to favor GPR over NEON registers.
6873         (<shift>di3_neon): Likewise.
6875 2018-03-20  Tom de Vries  <tom@codesourcery.com>
6877         PR target/84952
6878         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
6879         (nvptx_process_pars): Emit bar.sync asap and alap.
6881 2018-03-20  Tom de Vries  <tom@codesourcery.com>
6883         PR target/84954
6884         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
6885         seen_label if seen_label is already set.
6887 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
6889         PR target/84945
6890         * config/i386/i386.c (fold_builtin_cpu): For features above 31
6891         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
6892         Use 1U instead of 1.  Formatting fixes.
6894         PR c/84953
6895         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
6896         instead of TREE_TYPE (s1) for the return value.
6898 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
6900         PR tree-optimization/84946
6901         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
6902         bitsize + bitsize in poly_uint64 rather than poly_int64.
6904         PR sanitizer/78651
6905         * dwarf2asm.c: Include fold-const.c.
6906         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
6907         of decl rather than decl itself.
6909         PR rtl-optimization/84643
6910         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
6912 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
6914         PR sanitizer/78651
6915         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
6916         calling assemble_variable.
6918 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
6920         PR target/81647
6921         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
6922         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
6924 2018-03-19  Jim Wilson  <jimw@sifive.com>
6926         PR bootstrap/84856
6927         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
6928         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
6929         (riscv_first_stack_step): Likewise.
6930         (riscv_option_override): Use STACK_BOUNDARY instead of
6931         MIN_STACK_BOUNDARY.
6932         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
6933         MIN_STACK_BOUNDARY.
6934         (BIGGEST_ALIGNMENT): Set to 128.
6935         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
6936         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
6937         STACK_BOUNDARY.
6939 2018-03-19  Richard Biener  <rguenther@suse.de>
6941         PR tree-optimization/84933
6942         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
6943         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
6945 2018-03-19  Richard Biener  <rguenther@suse.de>
6947         PR tree-optimization/84859
6948         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
6949         (cond_if_else_store_replacement): Perform sinking operation on
6950         single-store BBs regardless of MAX_STORES_TO_SINK setting.
6951         Generalize what a BB with a single eligible store is.
6953 2018-03-19  Richard Biener  <rguenther@suse.de>
6955         PR tree-optimization/84929
6956         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
6957         chrec_is_positive against non-chrec arg.
6959 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
6961         PR target/84711
6962         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
6964 2018-03-18  Martin Liska  <mliska@suse.cz>
6966         PR rtl-optimization/84635
6967         * regrename.c (build_def_use): Use matches_mode only when
6968         matches >= 0.
6970 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
6972         PR tree-optimization/84913
6973         * tree-vect-loop.c (vectorizable_reduction): Don't try to
6974         vectorize chains of COND_EXPRs.
6976 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
6978         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
6980 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
6982         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
6984 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
6986         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
6988 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
6989             Kito Cheng  <kito.cheng@gmail.com>
6991         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
6992         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
6993         (nds32_adjust_reg_alloc_order): New function.
6994         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
6996 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
6998         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
6999         nds32_print_operand, nds32_print_operand_address): Use
7000         HOST_WIDE_INT_PRINT_DEC instead.
7002 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
7004         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
7006 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
7008         PR target/84902
7009         * config/i386/i386.c (initial_ix86_tune_features,
7010         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
7011         unsigned long long.
7012         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
7013         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
7014         rather than 1u << ix86_tune.  Formatting fix.
7015         (ix86_option_override_internal): Change ix86_arch_mask from
7016         unsigned int to unsigned HOST_WIDE_INT, initialize to
7017         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
7018         (ix86_function_specific_restore): Likewise.
7020 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
7022         PR target/84899
7023         * postreload.c (reload_combine_recognize_pattern): Perform
7024         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
7025         truncate_int_for_mode the result for the destination's mode.
7027         PR c/84909
7028         * hsa-gen.c (mem_type_for_type): Fix comment typo.
7029         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
7030         Likewise.
7031         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
7032         Likewise.
7034 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
7036         PR target/84876
7037         * lra-assigns.c (lra_split_hard_reg_for): Don't use
7038         regno_allocno_class_array and sorted_pseudos.
7039         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
7040         insns where regno is used.
7042 2018-03-16  Martin Liska  <mliska@suse.cz>
7044         PR ipa/84833
7045         * multiple_target.c (create_dispatcher_calls): Redirect
7046         reference in the symbol table.
7048 2018-03-16  Martin Liska  <mliska@suse.cz>
7050         PR ipa/84722
7051         * multiple_target.c (create_dispatcher_calls): Redirect also
7052         an alias.
7054 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
7056         PR c++/79937
7057         PR c++/82410
7058         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
7059         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
7060         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
7062 2018-03-16  Julia Koval  <julia.koval@intel.com>
7064         * doc/invoke.texi (Skylake Server): Add CLWB.
7065         Cannonlake): Remove CLWB.
7067 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
7069         PR tree-optimization/84841
7070         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
7071         1 << 3.
7072         (FLOAT_ONE_CONST_TYPE): Define.
7073         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
7074         (sort_by_operand_rank): Put entries with higher constant_type last
7075         rather than first to match comments.
7077 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
7079         * config/nios2/nios2.md (movsi_internal): Fix thinko in
7080         split predicate.
7082 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
7084         PR c++/79085
7085         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
7086         check and use address of target always.
7088 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
7090         PR target/84574
7091         * config/i386/i386.c (indirect_thunk_needed): Update comments.
7092         (indirect_thunk_bnd_needed): Likewise.
7093         (indirect_thunks_used): Likewise.
7094         (indirect_thunks_bnd_used): Likewise.
7095         (indirect_return_needed): New.
7096         (indirect_return_bnd_needed): Likewise.
7097         (output_indirect_thunk_function): Add a bool argument for
7098         function return.
7099         (output_indirect_thunk_function): Don't generate alias for
7100         function return thunk.
7101         (ix86_code_end): Call output_indirect_thunk_function to generate
7102         function return thunks.
7103         (ix86_output_function_return): Set indirect_return_bnd_needed
7104         and indirect_return_needed instead of indirect_thunk_bnd_needed
7105         and indirect_thunk_needed.
7107 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
7109         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
7110         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
7111         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
7113 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
7114             Paul Hua <paul.hua.gm@gmail.com>
7116         PR c/84852
7117         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
7119 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
7121         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
7122         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
7123         resp. SFmode cases.
7125 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
7127         PR target/84711
7128         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
7129         instead of GET_MODE_SIZE when comparing Units.
7131 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
7133         PR target/68256
7134         * varasm.c (hash_section): Return an unchangeble hash value
7135         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
7136         Return !aarch64_can_use_per_function_literal_pools_p ().
7138 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
7140         PR target/84860
7141         * optabs.c (emit_conditional_move): Pass address of cmode's copy
7142         rather than address of cmode as last argument to prepare_cmp_insn.
7144 2018-03-15  Julia Koval  <julia.koval@intel.com>
7146         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
7147         F_AVX512VNNI, F_AVX512BITALG): New.
7149 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
7151         PR target/83451
7152         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
7153         insn for floating-point loads and stores.
7155 2018-03-14  Carl Love  <cel@us.ibm.com>
7157         * config/rs6000/rs6000-c.c: Add macro definitions for
7158         ALTIVEC_BUILTIN_VEC_PERMXOR.
7159         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
7160         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
7161         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
7162         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
7163         UNSPEC_VPERMXOR.
7164         * config/doc/extend.texi: Add prototypes for vec_permxor.
7166 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
7168         PR c/84852
7169         * diagnostic-show-locus.c (class layout_point): Convert m_line
7170         from int to linenum_type.
7171         (line_span::comparator): Use linenum "compare" function when
7172         comparing line numbers.
7173         (test_line_span): New function.
7174         (layout_range::contains_point): Convert param "row" from int to
7175         linenum_type.
7176         (layout_range::intersects_line_p): Likewise.
7177         (layout::will_show_line_p): Likewise.
7178         (layout::print_source_line): Likewise.
7179         (layout::should_print_annotation_line_p): Likewise.
7180         (layout::print_annotation_line): Likewise.
7181         (layout::print_leading_fixits): Likewise.
7182         (layout::annotation_line_showed_range_p): Likewise.
7183         (struct line_corrections): Likewise for field m_row.
7184         (line_corrections::line_corrections): Likewise for param "row".
7185         (layout::print_trailing_fixits): Likewise.
7186         (layout::get_state_at_point): Likewise.
7187         (layout::get_x_bound_for_row): Likewise.
7188         (layout::print_line): Likewise.
7189         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
7190         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
7191         * input.c (selftest::test_linenum_comparisons): New function.
7192         (selftest::input_c_tests): Call it.
7193         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
7194         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
7195         * selftest.h (ASSERT_GT): New macro.
7196         (ASSERT_GT_AT): New macro.
7197         (ASSERT_LT): New macro.
7198         (ASSERT_LT_AT): New macro.
7200 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
7202         PR rtl-optimization/84780
7203         * combine.c (distribute_links): Don't make a link based on pc_rtx.
7205 2018-03-14  Martin Liska  <mliska@suse.cz>
7207         * tree.c (record_node_allocation_statistics): Use
7208         get_stats_node_kind.
7209         (get_stats_node_kind): New function extracted from
7210         record_node_allocation_statistics.
7211         (free_node): Use get_stats_node_kind.
7213 2018-03-14  Richard Biener  <rguenther@suse.de>
7215         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
7216         that the value-set of ANTIC_IN doesn't grow.
7218         Revert
7219         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
7220         member.
7221         (BB_VISITED_WITH_VISITED_SUCCS): New define.
7222         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
7224 2018-03-14  Julia Koval  <julia.koval@intel.com>
7226         * config.gcc (icelake-client, icelake-server): New.
7227         (icelake): Remove.
7228         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
7229         (initial_ix86_arch_features): Ditto.
7230         (PTA_SKYLAKE): Add SGX.
7231         (PTA_ICELAKE): Remove.
7232         (PTA_ICELAKE_CLIENT): New.
7233         (PTA_ICELAKE_SERVER): New.
7234         (ix86_option_override_internal): Split up icelake on icelake client and
7235         icelake server.
7236         (get_builtin_code_for_version): Ditto.
7237         (fold_builtin_cpu): Ditto.
7238         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
7239         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
7240         * config/i386/i386.h (processor_type): Ditto.
7241         * doc/invoke.texi: Ditto.
7243 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
7245         PR sanitizer/83392
7246         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
7247         INTEGER_CST offset, add it together with bitpos / 8 and
7248         sign extend based on POINTER_SIZE.
7250         PR target/84844
7251         Revert
7252         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
7254         PR target/78090
7255         * config/i386/constraints.md (Yc): New register constraint.
7256         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
7257         Use Yc constraint for alternative 2 of operand 0.  Remove
7258         preferred_for_speed attribute.
7260 2018-03-14  Richard Biener  <rguenther@suse.de>
7262         PR tree-optimization/84830
7263         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
7264         with the old one to avoid oscillations.
7266 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
7268         PR target/83712
7269         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
7270         pseudos.
7271         (assign_by_spills): Return a flag of reload assignment failure.
7272         Do not process the reload assignment failures.  Do not spill other
7273         reload pseudos if they has the same reg class.  Update n if
7274         necessary.
7275         (lra_assign): Add a return arg.  Set up from the result of
7276         assign_by_spills call.
7277         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
7278         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
7279         usage_insns if it is not NULL.
7280         (spill_hard_reg_in_range): New function.
7281         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
7282         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
7283         function prototypes.
7284         (lra_assign): Change prototype.
7285         * lra.c (lra): Add code to deal with fails by splitting hard reg
7286         live ranges.
7288 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
7290         * config/riscv/riscv.opt (mrelax): New option.
7291         * config/riscv/riscv.c (riscv_file_start): Emit ".option
7292         "norelax" when riscv_mrelax is disabled.
7293         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
7295 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
7297         PR target/84743
7298         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
7299         reassociation for int modes.
7301 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
7303         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
7304         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
7305         for big-endian.
7306         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
7307         * config/aarch64/aarch64-sve.md
7308         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
7309         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
7310         (*extend<mode><Vwide>2): Rename to...
7311         (aarch64_sve_extend<mode><Vwide>2): ...this.
7312         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
7313         renaming the old pattern to...
7314         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
7315         unsigned packs.
7316         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
7317         define_expand, renaming the old pattern to...
7318         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
7319         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
7320         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
7321         account when deciding which SVE instruction the optab should use.
7322         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
7324 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
7326         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
7327         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
7328         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
7329         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
7330         (tlsdesc_small_<mode>): Turn a define_expand and use
7331         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
7332         (tlsdesc_small_advsimd_<mode>): ...this.
7333         (tlsdesc_small_sve_<mode>): New pattern.
7335 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
7337         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
7338         (UNSPEC_UMUL_HIGHPART): New constants.
7339         (MUL_HIGHPART): New int iteraor.
7340         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
7341         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
7342         define_expand.
7343         (*<su>mul<mode>3_highpart): New define_insn.
7345 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
7347         PR lto/84805
7348         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
7349         incomplete types.
7351 2018-03-13  Martin Liska  <mliska@suse.cz>
7353         PR ipa/84658.
7354         * (sem_item_optimizer::sem_item_optimizer): Initialize new
7355         vector.
7356         (sem_item_optimizer::~sem_item_optimizer): Release it.
7357         (sem_item_optimizer::merge_classes): Register variable aliases.
7358         (sem_item_optimizer::fixup_pt_set): New function.
7359         (sem_item_optimizer::fixup_points_to_sets): Likewise.
7360         * ipa-icf.h: Declare new variables and functions.
7362 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
7364         PR middle-end/84834
7365         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
7366         integer_pow2p@2 and test integer_pow2p in condition.
7367         (A < 0 ? C : 0): Similarly for @1.
7369         PR middle-end/84831
7370         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
7371         characters starting at p contain '\0' character, don't look beyond
7372         that.
7374         PR target/84827
7375         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
7376         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
7378         PR target/84828
7379         * reg-stack.c (change_stack): Change update_end var from int to
7380         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
7381         also call set_block_for_insn on the newly added insns and rescan.
7383         PR target/84786
7384         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
7385         on the last operand.
7387         PR c++/84704
7388         * tree.c (stabilize_reference_1): Return save_expr (e) for
7389         STATEMENT_LIST even if it doesn't have side-effects.
7391 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
7393         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
7395 2018-03-12  Renlin Li  <renlin.li@arm.com>
7397         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
7398         aarch64_output_scalar_simd_mov_immediate.
7400 2018-03-12  Martin Sebor  <msebor@redhat.com>
7402         PR tree-optimization/83456
7403         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
7404         for perfectly overlapping calls to memcpy.
7405         (gimple_fold_builtin_memory_chk): Same.
7406         (gimple_fold_builtin_strcpy): Handle no-warning.
7407         (gimple_fold_builtin_stxcpy_chk): Same.
7408         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
7410 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
7412         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
7413         parameter.  Use it for SFmode.
7414         (rs6000_function_arg_advance_1): Adjust.
7415         (rs6000_function_arg): Adjust.
7416         (rs6000_gimplify_va_arg): Pass false for that new parameter.
7418 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
7420         PR rtl-optimization/84169
7421         PR rtl-optimization/84780
7422         * combine.c (can_combine_p): Check for a 2-insn combination whether
7423         the destination register is used between the two insns, too.
7425 2018-03-12  Richard Biener  <rguenther@suse.de>
7427         PR tree-optimization/84803
7428         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
7429         for refs DR analysis didn't process.
7431 2018-03-12  Richard Biener  <rguenther@suse.de>
7433         PR tree-optimization/84777
7434         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
7435         force-vectorize loops ignore whether we are optimizing for size.
7437 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
7439         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
7440         (TARGET_MD_ASM_ADJUST): Define.
7442 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
7443             Kito Cheng  <kito.cheng@gmail.com>
7444             Chung-Ju Wu  <jasonwucj@gmail.com>
7446         * config/nds32/nds32.c (nds32_compute_stack_frame,
7447         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
7448         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
7449         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
7450         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
7451         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
7452         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
7453         * config/nds32/nds32.md (prologue, epilogue): Use macro
7454         NDS32_V3PUSH_AVAILABLE_P to do checking.
7456 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
7458         PR debug/58150
7459         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
7460         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
7461         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
7462         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
7463         addition of most attributes on !orig_type_die or the attribute not
7464         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
7466 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
7467             Chung-Ju Wu  <jasonwucj@gmail.com>
7469         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
7470         __NDS32_VH__ macro.
7471         * config/nds32/nds32.opt (mvh): New option.
7473 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
7474             Chung-Ju Wu  <jasonwucj@gmail.com>
7476         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
7477         function.
7478         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
7479         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
7480         definition.
7482 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
7483             Chung-Ju Wu  <jasonwucj@gmail.com>
7485         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
7486         function.
7487         * config/nds32/nds32-multiple.md (strlensi): New pattern.
7488         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
7490 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
7491             Kito Cheng  <kito.cheng@gmail.com>
7492             Chung-Ju Wu  <jasonwucj@gmail.com>
7494         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
7495         UNSPEC_FFMISM and UNSPEC_FLMISM.
7496         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
7497         for ffb, ffmism and flmism.
7498         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
7499         (unspec_ffmism): Ditto.
7500         (unspec_flmism): Ditto.
7501         (nds32_expand_builtin_impl): Check if string extension is available.
7502         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
7503         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
7505 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
7507         Reverting patch:
7508         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
7510         PR target/83712
7511         * lra-assigns.c (assign_by_spills): Return a flag of reload
7512         assignment failure.  Do not process the reload assignment
7513         failures.  Do not spill other reload pseudos if they has the same
7514         reg class.
7515         (lra_assign): Add a return arg.  Set up from the result of
7516         assign_by_spills call.
7517         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
7518         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
7519         usage_insns if it is not NULL.
7520         (spill_hard_reg_in_range): New function.
7521         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
7522         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
7523         function prototypes.
7524         (lra_assign): Change prototype.
7525         * lra.c (lra): Add code to deal with fails by splitting hard reg
7526         live ranges.
7528 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
7530         PR target/84807
7531         * config/i386/i386.opt: Replace Enforcment with Enforcement.
7533 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
7535         PR debug/84620
7536         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
7537         (dw_val_node): Add val_symbolic_view.
7538         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
7539         (symview_upper_bound): New.
7540         (new_line_info_table): Initialize symviews_since_reset.
7541         (dwarf2out_source_line): Count symviews_since_reset and set
7542         symview_upper_bound.
7543         (dw_val_equal_p): Handle symview.
7544         (add_AT_symview): New.
7545         (print_dw_val): Handle symview.
7546         (attr_checksum, attr_checksum_ordered): Likewise.
7547         (same_dw_val_p, size_of_die): Likewise.
7548         (value_format, output_die): Likewise.
7549         (add_high_low_attributes): Use add_AT_symview for entry_view.
7550         (dwarf2out_finish): Reset symview_upper_bound, clear
7551         zero_view_p.
7553 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
7555         PR target/83969
7556         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
7557         Add strict argument and use it.
7558         (rs6000_split_multireg_move): Update for new strict argument.
7559         (mem_operand_gpr): Disallow all non-offsettable addresses.
7560         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
7562 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
7564         PR target/84772
7565         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
7566         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
7567         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
7569         PR c++/84767
7570         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
7571         decl, use remap_type if we want to use the type.
7573 2018-03-09  Martin Sebor  <msebor@redhat.com>
7575         PR tree-optimization/84526
7576         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
7577         Remove dead code.
7578         (builtin_access::generic_overlap): Be prepared to handle non-array
7579         base objects.
7581 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
7583         PR rtl-optimization/84682
7584         * lra-constraints.c (process_address_1): Check is_address flag
7585         for address constraints.
7586         (process_alt_operands): Likewise.
7587         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
7588         preprocess_constraints.
7589         * recog.h (preprocess_constraints): Add oploc parameter.
7590         Adjust callers.
7591         * recog.c (preprocess_constraints): Test address_operand for
7592         CT_ADDRESS constraints.
7594 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
7596         PR target/83712
7597         * lra-assigns.c (assign_by_spills): Return a flag of reload
7598         assignment failure.  Do not process the reload assignment
7599         failures.  Do not spill other reload pseudos if they has the same
7600         reg class.
7601         (lra_assign): Add a return arg.  Set up from the result of
7602         assign_by_spills call.
7603         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
7604         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
7605         usage_insns if it is not NULL.
7606         (spill_hard_reg_in_range): New function.
7607         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
7608         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
7609         function prototypes.
7610         (lra_assign): Change prototype.
7611         * lra.c (lra): Add code to deal with fails by splitting hard reg
7612         live ranges.
7614 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7616         PR target/83193
7617         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
7618         Accept complain bool parameter.  Only emit errors if it is true.
7619         (arm_parse_cpu_option_name): Likewise.
7620         (arm_target_thumb_only): Adjust callers of the above.
7621         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
7622         prototype to take a default true bool parameter.
7623         (arm_parse_arch_option_name): Likewise.
7625 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
7626             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
7628         PR jit/64089
7629         PR jit/84288
7630         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
7631         * configure: Regenerate.
7632         * configure.ac ("linker --version-script option"): New.
7633         ("linker soname option"): New.
7635 2018-03-09  Richard Biener  <rguenther@suse.de>
7637         PR tree-optimization/84775
7638         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
7639         immediate uses of predicate stmts and mark them modified.
7641         Revert
7642         PR tree-optimization/84178
7643         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
7644         to caller.
7645         (version_loop_for_if_conversion): Delay update_ssa call.
7646         (tree_if_conversion): Delay update_ssa until after predicate
7647         insertion.
7649 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
7651         PR target/84763
7652         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
7653         when the function accesses prior frames.
7655 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
7657         PR debug/84456
7658         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
7659         gen_llsym, otherwise call maybe_gen_llsym.
7661         PR inline-asm/84742
7662         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
7663         has ',' character inside of it.
7665 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7667         PR target/84748
7668         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
7669         as clobbering CC_REGNUM.
7671 2018-03-08  Richard Biener  <rguenther@suse.de>
7673         PR middle-end/84552
7674         * tree-scalar-evolution.c: Include tree-into-ssa.h.
7675         (follow_copies_to_constant): Do not follow SSA names registered
7676         for update.
7678 2018-03-08  Richard Biener  <rguenther@suse.de>
7680         PR tree-optimization/84178
7681         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
7682         to caller.
7683         (version_loop_for_if_conversion): Delay update_ssa call.
7684         (tree_if_conversion): Delay update_ssa until after predicate
7685         insertion.
7687 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
7689         PR tree-optimization/84178
7690         * tree-if-conv.c (release_bb_predicate): Remove the
7691         the assertion that the stmts have NULL use_ops.
7692         Discard the statements, asserting that they haven't
7693         yet been added to a BB.
7695 2018-03-08  Richard Biener  <rguenther@suse.de>
7697         PR tree-optimization/84746
7698         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
7699         (phi_translate): Pass in destination ANTIC_OUT set.
7700         (phi_translate_1): Likewise.  For a simplified result lookup
7701         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
7702         (phi_translate_set): Adjust.
7703         (do_pre_regular_insertion): Likewise.
7704         (do_pre_partial_partial_insertion): Likewise.
7706 2018-03-08  Martin Liska  <mliska@suse.cz>
7708         PR gcov-profile/84735
7709         * doc/gcov.texi: Document usage of profile files.
7710         * gcov-io.h: Document changes in the format.
7712 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
7714         PR debug/84404
7715         PR debug/84408
7716         * dwarf2out.c (struct dw_line_info_table): Update comments for
7717         view == -1.
7718         (FORCE_RESET_NEXT_VIEW): New.
7719         (FORCE_RESETTING_VIEW_P): New.
7720         (RESETTING_VIEW_P): Check for -1 too.
7721         (ZERO_VIEW_P): Likewise.
7722         (new_line_info_table): Force-reset next view.
7723         (dwarf2out_begin_function): Likewise.
7724         (dwarf2out_source_line): Simplify zero_view_p initialization.
7725         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
7726         view directly.  Omit view when omitting .loc at line 0.
7728 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
7730         PR tree-optimization/84740
7731         * tree-switch-conversion.c (process_switch): Call build_constructors
7732         only if info.phi_count is non-zero.
7734         PR tree-optimization/84739
7735         * tree-tailcall.c (find_tail_calls): Check call arguments against
7736         DECL_ARGUMENTS (current_function_decl) rather than
7737         DECL_ARGUMENTS (func) when checking for tail recursion.
7739 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
7741         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
7742         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
7743         Volker Reichelt's entry and add entries for people that perform
7744         GCC fuzzy testing and report numerous bugs.
7746 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
7748         PR target/82411
7749         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
7750         readonly data in sdata, if that is disabled.
7751         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
7752         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
7753         -mreadonly-in-sdata option.
7755 2018-03-07  Martin Sebor  <msebor@redhat.com>
7757         PR tree-optimization/84468
7758         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
7759         basic block when looking for nul assignment.
7761 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
7763         PR target/84277
7764         * except.h (output_function_exception_table): Adjust prototype.
7765         * except.c (output_function_exception_table): Remove FNNAME parameter
7766         and add SECTION parameter.  Ouput one part of the table at a time.
7767         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
7768         the first part of the exception table and emit unwind directives.
7769         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
7770         (i386_pe_seh_cold_init): Likewise.
7771         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
7772         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
7773         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
7774         (ix86_output_call_insn): Emit a nop in one more case for SEH.
7775         * config/i386/winnt.c: Include except.h.
7776         (struct seh_frame_state): Add reg_offset, after_prologue and
7777         in_cold_section fields.
7778         (i386_pe_seh_end_prologue): Set seh->after_prologue.
7779         (i386_pe_seh_cold_init): New function.
7780         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
7781         to seh->in_cold_section.
7782         (seh_emit_push): Record the offset of the push.
7783         (seh_emit_save): Record the offet of the save.
7784         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
7785         Test seh->after_prologue to disregard the epilogue.
7786         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
7787         (i386_pe_end_cold_function): New function.
7789 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
7791         PR fortran/84565
7792         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
7793         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
7795         PR c++/84704
7796         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
7797         on tmp_var.
7798         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
7799         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
7801         PR middle-end/84723
7802         * multiple_target.c: Include tree-inline.h and intl.h.
7803         (expand_target_clones): Diagnose and fail if node->definition and
7804         !tree_versionable_function_p (node->decl).
7806 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
7808         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
7809         sprint_ul.
7810         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
7811         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
7812         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
7814 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
7816         PR target/84710
7817         * combine.c (try_combine): Use reg_or_subregno instead of handling
7818         just paradoxical SUBREGs and REGs.
7820 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
7822         * config/arc/arc.c (arc_finalize_pic): Remove function.
7823         (arc_must_save_register): We use single base PIC register, remove
7824         checks to save/restore the PIC register.
7825         (arc_expand_prologue): Likewise.
7826         * config/arc/arc-protos.h (arc_set_default_type_attributes):
7827         Remove.
7828         (arc_verify_short): Likewise.
7829         (arc_attr_type): Likewise.
7830         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
7831         (walk_stores): Likewise.
7832         (arc_address_cost): Make it static.
7833         (arc_verify_short): Likewise.
7834         (branch_dest): Likewise.
7835         (arc_attr_type): Likewise.
7836         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
7837         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
7838         (arc_final_prescan_insn): Remove inserting the nops due to
7839         hardware hazards.  It is done in reorg step.
7840         (insn_length_variant_t): Remove.
7841         (insn_length_parameters_t): Likewise.
7842         (arc_insn_length_parameters): Likewise.
7843         (arc_get_insn_variants): Likewise.
7844         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
7846 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
7848         PR inline-asm/84683
7849         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
7850         assertion failure.
7852         PR tree-optimization/84687
7853         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
7854         on new_node->decl.
7855         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
7857 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
7859         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
7860         Rename to ppc_speculation_barrier.
7861         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
7862         __builtin_ppc_speculation_barrier.
7864 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
7866         PR target/84700
7867         * combine.c (combine_simplify_rtx): Don't try to simplify if
7868         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
7869         are equal to x.
7871 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
7873         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
7874         to 32 bytes when compiling for POWER9.
7876 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
7878         PR target/84564
7879         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
7880         regparm >= 3 with no arg reg available also for calls with
7881         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
7883         PR target/84524
7884         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
7885         orig,vex.
7886         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
7888 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
7890         PR target/84264
7891         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
7893 2018-03-05  Richard Biener  <rguenther@suse.de>
7895         PR tree-optimization/84486
7896         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
7897         When inserting a __builtin_assume_aligned call set the LHS
7898         SSA name alignment info accordingly.
7900 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
7902         PR tree-optimization/84114
7903         * config/aarch64/aarch64.c (aarch64_reassociation_width)
7904         Avoid reassociation of FLOAT_MODE addition.
7906 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
7908         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
7909         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
7910         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
7911         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
7912         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
7913         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
7914         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
7915         and -mwbnoinvd.
7916         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
7917         __builtin_ia32_wbinvd): New builtins.
7918         (SPECIAL_ARGS2): New.
7919         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
7920         (SPECIAL_ARGS2): New.
7921         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
7922         (ix86_valid_target_attribute_inner_p): Ditto.
7923         (ix86_init_mmx_sse_builtins): Add special_args2.
7924         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
7925         TARGET_WBNOINVD_P): New.
7926         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
7927         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
7928         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
7929         * config/i386/immintrin.h (_wbinvd): New intrinsic.
7930         * config/i386/pconfigintrin.h: New file.
7931         * config/i386/wbnoinvdintrin.h: Ditto.
7932         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
7933         wbnoinvdintrin.h.
7934         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
7936 2018-03-05  Richard Biener  <rguenther@suse.de>
7938         PR tree-optimization/84670
7939         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
7940         member.
7941         (BB_VISITED_WITH_VISITED_SUCCS): New define.
7942         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
7943         (compute_antic_aux): Only assert the number of values in ANTIC_IN
7944         doesn't grow if all successors (recursively) were visited at least
7945         once.
7947 2018-03-05  Richard Biener  <rguenther@suse.de>
7949         PR tree-optimization/84650
7950         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
7951         if executed in the loop pipeline.
7953 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
7955         * doc/configfiles.texi (Configuration Files): Move info about
7956         conditionalizing $target-protos.h to...
7957         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
7958         differs from $target-protos.h.
7960 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
7961             Chung-Ju Wu  <jasonwucj@gmail.com>
7963         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
7964         * config/nds32/nds32-multiple.md (setmemsi): Define.
7965         * config/nds32/nds32-memory-manipulation.c
7966         (nds32_gen_dup_4_byte_to_word_value): New.
7967         (emit_setmem_word_loop): New.
7968         (emit_setmem_byte_loop): New.
7969         (nds32_expand_setmem_loop): New.
7970         (nds32_expand_setmem_loop_v3m): New.
7971         (nds32_expand_setmem_unroll): New.
7972         (nds32_expand_setmem): New.
7974 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
7975             Chung-Ju Wu  <jasonwucj@gmail.com>
7977         * config/nds32/nds32-memory-manipulation.c
7978         (nds32_emit_load_store): New.
7979         (nds32_emit_post_inc_load_store): New.
7980         (nds32_emit_mem_move): New.
7981         (nds32_emit_mem_move_block): New.
7982         (nds32_expand_movmemsi_loop_unknown_size): New.
7983         (nds32_expand_movmemsi_loop_known_size): New.
7984         (nds32_expand_movmemsi_loop): New.
7985         (nds32_expand_movmemsi_unroll): New.
7986         (nds32_expand_movmemqi): Rename ...
7987         (nds32_expand_movmemsi): ... to this.
7988         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
7989         (movmemsi): ... to this.
7990         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
7991         (nds32_expand_movmemsi): ... to this.
7993 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
7994             Monk Chiang  <sh.chiang04@gmail.com>
7995             Chung-Ju Wu  <jasonwucj@gmail.com>
7997         * config/nds32/nds32-protos.h
7998         (nds32_expand_load_multiple): New arguments.
7999         (nds32_expand_store_multiple): Ditto.
8000         (nds32_valid_multiple_load_store): Rename ...
8001         (nds32_valid_multiple_load_store_p): ... to this.
8002         * config/nds32/nds32-memory-manipulation.c
8003         (nds32_expand_load_multiple): Refine implementation.
8004         (nds32_expand_store_multiple): Ditto.
8005         * config/nds32/nds32-multiple.md
8006         (load_multiple): Update nds32_expand_load_multiple interface.
8007         (store_multiple): Update nds32_expand_store_multiple interface.
8008         * config/nds32/nds32-predicates.c
8009         (nds32_valid_multiple_load_store): Rename ...
8010         (nds32_valid_multiple_load_store_p): ... to this and refine
8011         implementation.
8012         * config/nds32/predicates.md
8013         (nds32_load_multiple_and_update_address_operation): New predicate.
8014         (nds32_store_multiple_and_update_address_operation): New predicate.
8016 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
8017             Chung-Ju Wu  <jasonwucj@gmail.com>
8019         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
8020         (combo): New attribute.
8021         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
8023 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
8025         * config/nds32/nds32.opt: Change -mcmodel= default value.
8027 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
8028             Monk Chiang  <sh.chiang04@gmail.com>
8029             Chung-Ju Wu  <jasonwucj@gmail.com>
8031         * config/nds32/constants.md (unspec_element): New enum.
8032         * config/nds32/constraints.md (Umw): New constraint.
8033         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
8034         * config/nds32/nds32-intrinsic.md: Likewise.
8035         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
8036         (nds32_valid_smw_lwm_base_p): New.
8037         (nds32_output_smw_single_word): New.
8038         (nds32_output_lmw_single_word): New.
8039         (nds32_expand_unaligned_load): New.
8040         (nds32_expand_unaligned_store): New.
8041         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
8042         (nds32_output_smw_single_word): Declare.
8043         (nds32_output_lmw_single_word): Declare.
8044         (nds32_expand_unaligned_load): Declare.
8045         (nds32_expand_unaligned_store): Declare.
8046         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
8047         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
8048         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
8049         NDS32_BUILTIN_UASTORE_DW.
8050         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
8051         predicate.
8053 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
8054             Kito Cheng  <kito.cheng@gmail.com>
8055             Chung-Ju Wu  <jasonwucj@gmail.com>
8057         * config/nds32/nds32-intrinsic.c
8058         (nds32_expand_builtin_null_ftype_reg): Delete.
8059         (nds32_expand_builtin_reg_ftype_imm): Ditto.
8060         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
8061         (nds32_read_argument): New.
8062         (nds32_legitimize_target): Ditto.
8063         (nds32_legitimize_argument): Ditto.
8064         (nds32_check_constant_argument): Ditto.
8065         (nds32_expand_unop_builtin): Ditto.
8066         (nds32_expand_unopimm_builtin): Ditto.
8067         (nds32_expand_binop_builtin): Ditto.
8068         (nds32_builtin_decl_impl): Ditto.
8069         (builtin_description): Ditto.
8070         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
8071         (nds32_init_builtins_impl): Ditto.
8072         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
8073         (nds32_builtin_decl): New.
8074         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
8075         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
8077 2018-03-02  Jeff Law  <law@redhat.com>
8079         * reorg.c (stop_search_p): Handle DEBUG_INSN.
8080         (redundant_insn, fill_simple_delay_slots): Likewise.
8081         (fill_slots_from_thread): Likewise.
8082         * resource.c (mark_referenced_resources): Likewise.
8083         (mark_set_resources, find_dead_or_set_registers): Likewise.
8085 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
8087         * substring-locations.h (format_warning_va): Formatting fix for
8088         ATTRIBUTE_GCC_DIAG.
8089         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
8090         argument.
8091         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
8092         * substring-locations.c: Include intl.h.
8093         (format_warning_va): Turned into small wrapper around
8094         format_warning_n_va, renamed to ...
8095         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
8096         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
8097         use ngettext.
8098         (format_warning_at_substring_n): New function.
8099         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
8100         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
8101         format_warning_at_substring with just a shorter name instead of
8102         const function pointer.
8103         (fmtwarn_n): New function.
8104         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
8105         appropriate, get rid of all the fmtstr temporaries, move conditionals
8106         with G_() wrapped string literals directly into fmtwarn arguments,
8107         cast dir.len to (int), formatting fixes.
8109 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
8111         * doc/invoke.texi: Remove "Cilk Plus" references.
8113 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
8114             Richard Biener  <rguenther@suse.de>
8116         PR ipa/84628
8117         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
8118         for error or warning attributes if CALL_FROM_THUNK_P is set.
8119         Formatting fixes.
8121 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
8123         PR target/56540
8124         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
8125         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
8127         PR target/56540
8128         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
8129         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
8131         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
8132         instead of -1U in last predictors element's probability member.
8134 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
8136         PR ipa/83983
8137         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
8138         arguments if they are comparable.
8140 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
8142         PR tree-optimization/84634
8143         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
8144         masks and masked_loop_p with a single loop_masks, making sure it's
8145         null for bb vectorization.
8147 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
8149         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
8150         (vect_analyze_data_ref_access): Use loop->safe_len rather than
8151         loop->force_vectorize to check whether there is no alias.
8153 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
8155         PR target/84614
8156         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
8157         prototypes.
8158         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
8159         comments.
8160         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
8161         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
8162         instead of a loop around prev_real_insn.
8163         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
8164         prev_real_insn.
8166         PR inline-asm/84625
8167         * config/i386/i386.c (ix86_print_operand): Use conditional
8168         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
8169         zero vector.
8171 2018-03-02  Richard Biener  <rguenther@suse.de>
8173         PR tree-optimization/84427
8174         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
8175         (bitmap_set_subtract_values): Rewrite to handle multiple
8176         exprs per value.
8177         (clean): Likewise.
8178         (prune_clobbered_mems): Likewise.
8179         (phi_translate): Take edge instead of pred/phiblock.
8180         (phi_translate_1): Likewise.
8181         (phi_translate_set): Likewise.  Insert all translated
8182         exprs for a value into the set, keeping possibly multiple
8183         expressions per value.
8184         (compute_antic_aux): Adjust for phi_translate changes.
8185         When intersecting union the expressions and prune those
8186         not in the final value set, keeping possibly multiple
8187         expressions per value.  Do not use value-insertion
8188         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
8189         all expressions.  Add verification that the value-sets
8190         only shrink during iteration.
8191         (compute_partial_antic_aux): Adjust for the phi_translate changes.
8192         (do_pre_regular_insertion): Likewise.
8193         (do_pre_partial_partial_insertion): Likewise.
8195 2018-03-02  Richard Biener  <rguenther@suse.de>
8197         PR target/82005
8198         * config/darwin.c (saved_debug_info_level): New static global.
8199         (darwin_asm_lto_start): Disable debug info generation for LTO out.
8200         (darwin_asm_lto_end): Restore debug info generation settings.
8202 2018-03-01  Martin Liska  <mliska@suse.cz>
8204         PR sanitizer/82484
8205         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
8206         volatile arguments.
8208 2018-03-01  Richard Biener  <rguenther@suse.de>
8210         PR debug/84645
8211         * dwarf2out.c (gen_variable_die): Properly handle late VLA
8212         type annotation with LTO when debug was disabled at compile-time.
8214 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
8216         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
8217         XINT with INTVAL.
8218         (mips_final_postscan_insn): Likewise.
8220 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
8222         PR rtl-optimization/84528
8223         * alias.c (init_alias_target): Add commentary.
8224         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
8225         a unique base value if the frame pointer is not eliminated
8226         to the stack pointer.
8228 2018-03-01  Tom de Vries  <tom@codesourcery.com>
8230         PR rtl-optimization/83327
8231         * lra-int.h (hard_regs_spilled_into): Declare.
8232         * lra.c (hard_regs_spilled_into): Define.
8233         (init_reg_info): Init hard_regs_spilled_into.
8234         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
8235         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
8236         (process_bb_lives): Handle hard_regs_spilled_into.
8237         (lra_create_live_ranges_1): Before doing liveness propagation, clear
8238         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
8240 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
8242         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
8243         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
8244         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
8245         * config/rs6000/aix72.h: New file.
8247 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
8249         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
8250         instead of warning_at with conditional singular and plural messages
8251         where possible.
8253         PR target/52991
8254         * stor-layout.c (update_alignment_for_field): For
8255         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
8256         && !DECL_PACKED (field), do the alignment update, just use
8257         only desired_align instead of MAX (type_align, desired_align)
8258         as the alignment.
8259         (place_field): Don't do known_align < desired_align handling
8260         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
8261         is non-NULL, instead do it after rli->prev_field handling and
8262         only if not within a bitfield word.  For DECL_PACKED (field)
8263         use type_align of BITS_PER_UNIT.
8265 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
8267         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
8268         superfluous parentheses and trailing spaces.
8270 2018-02-28  Richard Biener  <rguenther@suse.de>
8272         PR tree-optimization/84584
8273         * graphite-scop-detection.c (scop_detection::add_scop): Discard
8274         SCoPs with fake exit edge.
8276 2018-02-28  Martin Liska  <mliska@suse.cz>
8278         PR testsuite/84597
8279         * timevar.c (timer::print): Fix format to properly print 100%
8280         values.
8282 2018-02-28  Richard Biener  <rguenther@suse.de>
8284         PR middle-end/84607
8285         * genmatch.c (capture_info::walk_match): Do not mark
8286         captured expressions without operands as expr_p given
8287         they act more like predicates and should be subject to
8288         "lost tail" side-effect preserving.
8290 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
8292         PR rtl-optimization/81611
8293         * auto-inc-dec.c (attempt_change): Move dead note from
8294         mem_insn if it's the next use of regno
8295         (find_address): Take address use of reg holding
8296         non-incremented value.  Add parm to limit search to the named
8297         reg only.
8298         (merge_in_block): Attempt to use a mem insn that is the next
8299         use of the original regno.
8301 2018-02-27  Martin Sebor  <msebor@redhat.com>
8303         PR c++/83871
8304         * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
8305         * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
8307 2018-02-27  Martin Sebor  <msebor@redhat.com>
8309         PR translation/84207
8310         * diagnostic-core.h (warning_n, error_n, inform_n): Change
8311         n argument to unsigned HOST_WIDE_INT.
8312         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
8313         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
8314         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
8315         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
8317 2018-02-27  Richard Biener  <rguenther@suse.de>
8319         PR tree-optimization/84512
8320         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
8321         Do not use the estimate returned from record_stmt_cost for
8322         the scalar iteration cost but sum properly using add_stmt_cost.
8324 2018-02-27  Richard Biener  <rguenther@suse.de>
8326         PR tree-optimization/84466
8327         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
8328         Adjust last change to less strictly validate use operands.
8330 2018-02-27  Martin Liska  <mliska@suse.cz>
8332         PR gcov-profile/84548
8333         * gcov.c (process_file): Allow partial overlap and consider it
8334         also as group functions.
8335         (output_lines): Properly calculate range of lines for a group.
8337 2018-02-27  Martin Liska  <mliska@suse.cz>
8339         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
8340         'ggc' suffixes.  Change first column width.
8341         (timer::print): Fix formatting of the column.
8343 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
8345         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
8346         preserve inline entry blocks for the sake of debug inline
8347         entry point markers alone.
8348         (remove_unused_locals): Suggest in comments a better place to
8349         force the preservation of inline entry blocks that are
8350         otherwise unused, but do not preserve them.
8352 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
8354         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
8356 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
8358         PR target/84039
8359         * config/i386/constraints.md (Bs): Replace
8360         ix86_indirect_branch_register with
8361         TARGET_INDIRECT_BRANCH_REGISTER.
8362         (Bw): Likewise.
8363         * config/i386/i386.md (indirect_jump): Likewise.
8364         (tablejump): Likewise.
8365         (*sibcall_memory): Likewise.
8366         (*sibcall_value_memory): Likewise.
8367         Peepholes of indirect call and jump via memory: Likewise.
8368         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
8369         (*sibcall_value_GOT_32): Likewise.
8370         * config/i386/predicates.md (indirect_branch_operand): Likewise.
8371         (GOT_memory_operand): Likewise.
8372         (call_insn_operand): Likewise.
8373         (sibcall_insn_operand): Likewise.
8374         (GOT32_symbol_operand): Likewise.
8375         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
8377 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
8379         PR rtl-optimization/83496
8380         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
8381         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
8382         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
8383         redundant insn, if any.
8384         (relax_delay_slots): Likewise.
8385         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
8387 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
8389         PR tree-optimization/83965
8390         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
8391         that grouped statements are part of a reduction chain.  Return
8392         true if the statement is not marked as a reduction itself but
8393         is part of a group.
8394         (vect_recog_dot_prod_pattern): Don't check whether the statement
8395         is part of a group here.
8396         (vect_recog_sad_pattern): Likewise.
8397         (vect_recog_widen_sum_pattern): Likewise.
8399 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
8401         PR debug/84545
8402         * final.c (rest_of_clean_state): Also look for calls inside sequences.
8404 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
8406         PR target/84530
8407         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
8408         the bool argument.
8409         (ix86_output_indirect_function_return): New prototype.
8410         (ix86_split_simple_return_pop_internal): Likewise.
8411         * config/i386/i386.c (indirect_return_via_cx): New.
8412         (indirect_return_via_cx_bnd): Likewise.
8413         (indirect_thunk_name): Handle return va CX_REG.
8414         (output_indirect_thunk_function): Create alias for
8415         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
8416         (ix86_output_indirect_jmp): Remove the bool argument.
8417         (ix86_output_indirect_function_return): New function.
8418         (ix86_split_simple_return_pop_internal): Likewise.
8419         * config/i386/i386.md (*indirect_jump): Don't pass false
8420         to ix86_output_indirect_jmp.
8421         (*tablejump_1): Likewise.
8422         (simple_return_pop_internal): Change it to define_insn_and_split.
8423         Call ix86_split_simple_return_pop_internal to split it for
8424         -mfunction-return=.
8425         (simple_return_indirect_internal): Call
8426         ix86_output_indirect_function_return instead of
8427         ix86_output_indirect_jmp.
8429 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
8431         PR bootstrap/84405
8432         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
8433         memset and value initialization afterwards.
8435 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
8437         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
8439 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
8441         PR target/84521
8442         * common/config/aarch64/aarch64-common.c
8443         (aarch_option_optimization_table[]): Switch
8444         off fomit-frame-pointer
8446 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
8447             Chung-Ju Wu  <jasonwucj@gmail.com>
8449         * config/nds32/nds32-multiple.md (load_multiple): Disallow
8450         volatile memory.
8451         (store_multiple): Ditto.
8453 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
8455         * config.gcc: Add --with-cpu support for nds32 target.
8456         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
8457         * config/nds32/nds32.opt: Add -mcpu= option.
8459 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
8461         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
8462         isel=yes): Warn for these deprecated options.
8464 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
8466         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
8467         ISA_2_5_MASKS_EMBEDDED.
8469 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
8471         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
8472         p->max as pointers rather than using iterative_hash_expr.
8474 2018-02-23  Carl Love  <cel@us.ibm.com>
8476         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
8477         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
8478         BU_P8V_OVERLOAD_2.
8479         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
8480         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
8481         P8V_BUILTIN_VEC_VUNSIGNED2.
8483 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
8485         PR target/81572
8486         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
8487         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
8488         LRA_UNKNOWN_ALT.
8489         * lra-constraints.c (curr_insn_transform): Set up
8490         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
8491         LRA_UNKNOWN_ALT.
8492         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
8493         * lra-eliminations.c (spill_pseudos): Ditto.
8494         (process_insn_for_elimination): Ditto.
8495         * lra-lives.c (reg_early_clobber_p): Use the new macros.
8496         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
8497         LRA_NON_CLOBBERED_ALT.
8499 2018-02-22  Martin Sebor  <msebor@redhat.com>
8501         PR tree-optimization/84480
8502         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
8503         to maybe_diag_stxncpy_trunc.  Call it.
8504         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
8505         from gimple_fold_builtin_strcpy.  Print inlining stack.
8506         (handle_builtin_stxncpy): Print inlining stack.
8507         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
8509 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
8511         PR target/84176
8512         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
8513         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
8514         and -fcheck-pointer-bounds are used together.
8515         (indirect_thunk_prefix): New enum.
8516         (indirect_thunk_need_prefix): New function.
8517         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
8518         "_nt" instead of "_bnd" for NOTRACK prefix.
8519         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
8520         (output_indirect_thunk_function): Likewise.
8521         (): Likewise.
8522         (ix86_code_end): Update output_indirect_thunk_function calls.
8523         (ix86_output_indirect_branch_via_reg): Replace
8524         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
8525         (ix86_output_indirect_branch_via_push): Likewise.
8526         (ix86_output_function_return): Likewise.
8527         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
8528         incompatible with -fcf-protection=branch and
8529         -fcheck-pointer-bounds.
8531 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
8533         PR target/83335
8534         * config/aarch64/aarch64.c (aarch64_print_address_internal):
8535         Change gcc_assert call to output_operand_lossage.
8537 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
8539         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
8541 2018-02-22  DJ Delorie  <dj@redhat.com>
8542             Sebastian Perta  <sebastian.perta@renesas.com>
8543             Oleg Endo  <olegendo@gcc.gnu.org>
8545         * config/rx/rx.c (rx_rtx_costs): New function.
8546         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
8548 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
8550         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
8552 2018-02-22  Martin Liska  <mliska@suse.cz>
8554         PR driver/83193
8555         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
8556         Add "native" as a possible value.
8558 2018-02-22  Martin Liska  <mliska@suse.cz>
8560         PR driver/83193
8561         * config/i386/i386.c (ix86_option_override_internal):
8562         Add "native" as a possible value for -march and -mtune.
8564 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
8566         PR target/84502
8567         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
8568         to all type variants.
8570         PR tree-optimization/84503
8571         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
8572         width as info->bitpos + info->bitsize - start.
8573         (merged_store_group::merge_overlapping): Simplify width computation.
8574         (check_no_overlap): New function.
8575         (imm_store_chain_info::try_coalesce_bswap): Compute expected
8576         start + width and last_order of the group, fail if check_no_overlap
8577         fails.
8578         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
8579         to group if check_no_overlap fails.
8581 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
8583         * config/rs6000/altivec.md: Delete contraint arguments to
8584         define_expand, define_split, and define_peephole2, and in
8585         define_insn_and_split if always unused.
8586         * config/rs6000/darwin.md: Ditto.
8587         * config/rs6000/dfp.md: Ditto.
8588         * config/rs6000/rs6000.md: Ditto.
8589         * config/rs6000/sync.md: Ditto.
8590         * config/rs6000/vector.md: Ditto.
8591         * config/rs6000/vsx.md: Ditto.
8593 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
8595         * config/rs6000/altivec.md: Write output control strings as braced
8596         blocks instead of double-quoted strings.
8597         * config/rs6000/darwin.md: Ditto.
8598         * config/rs6000/rs6000.md: Ditto.
8599         * config/rs6000/vector.md: Ditto.
8600         * config/rs6000/vsx.md: Ditto.
8602 2018-02-21  Jason Merrill  <jason@redhat.com>
8604         PR c++/84314 - ICE with templates and fastcall attribute.
8605         * attribs.c (build_type_attribute_qual_variant): Remove assert.
8607 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
8609         * ipa-cp.c (determine_versionability): Fix comment typos.
8611 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
8613         PR c/84229
8614         * ipa-cp.c (determine_versionability): Do not version functions caling
8615         va_arg_pack.
8617 2018-02-21  Martin Liska  <mliska@suse.cz>
8619         PR driver/83193
8620         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
8621         Add "native" as a possible value.
8622         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
8623         the macro when native cpu detection is available.
8625 2018-02-21  Martin Liska  <mliska@suse.cz>
8627         PR driver/83193
8628         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
8629         Add "native" as a possible value.
8630         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
8631         when native cpu detection is available.
8633 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
8634             Martin Sebor  <msebor@redhat.com>
8636         PR tree-optimization/84478
8637         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
8638         false.
8639         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
8640         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
8641         support which is conservatively correct, for 2 only stay conservative
8642         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
8643         argument to the 2 argument get_range_strlen, adjust 6 arg
8644         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
8645         false.
8646         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
8647         (gimple_fold_builtin_strlen): Pass true as last argument to
8648         get_range_strlen.
8650 2018-02-20  Martin Sebor  <msebor@redhat.com>
8652         PR middle-end/84095
8653         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
8654         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
8655         (builtin_memref::builtin_memref): Factor out parts into
8656         set_base_and_offset and call it.
8658 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
8660         PR middle-end/84406
8661         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
8662         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
8663         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
8664         search at the associated MODE_INT.
8666 2018-02-20  Jeff Law  <law@redhat.com>
8668         PR middle-end/82123
8669         PR tree-optimization/81592
8670         PR middle-end/79257
8671         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
8672         for range data rather than using global data.
8673         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
8674         range data rather than using global data.
8675         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
8676         pass it to children as needed.
8677         (struct directive::fmtresult): Similarly.
8678         (struct directive::set_width): Similarly.
8679         (struct directive::set_precision): Similarly.
8680         (format_integer, format_directive, parse_directive): Similarly.
8681         (format_none): Accept unnamed vr_values parameter.
8682         (format_percent, format_floating, format_character): Similarly.
8683         (format_string, format_plain): Similarly.
8684         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
8685         the EVRP range analyzer for range data rather than using global data.
8686         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
8687         gimple-ssa-evrp-analyze.h
8688         (class sprintf_dom_walker): Add after_dom_children member function.
8689         Add evrp_range_analyzer member.
8690         (sprintf_dom_walker::before_dom_children): Call into the EVRP
8691         range analyzer as needed.
8692         (sprintf_dom_walker::after_dom_children): New member function.
8693         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
8694         if not optimizing.
8695         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
8696         (evrp_range_analyzer::pop_to_marker): Likewise.
8698 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
8700         PR tree-optimization/84419
8701         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
8702         with the required type if its current type is compatible but
8703         different.
8705 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
8707         PR middle-end/82004
8708         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
8709         after vectorization.
8711 2018-02-20  Martin Liska  <mliska@suse.cz>
8713         PR driver/83193
8714         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
8715         possible values if we don't have a hint.
8717 2018-02-20  Martin Liska  <mliska@suse.cz>
8719         PR c/84310
8720         PR target/79747
8721         * final.c (shorten_branches): Build align_tab array with one
8722         more element.
8723         * opts.c (finish_options): Add alignment option limit check.
8724         (MAX_CODE_ALIGN): Likewise.
8725         (MAX_CODE_ALIGN_VALUE): Likewise.
8726         * doc/invoke.texi: Document maximum allowed option value for
8727         all -falign-* options.
8729 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
8731         PR target/84146
8732         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
8733         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
8734         * var-tracking.c (emit_note_insn_var_location): Remove all references
8735         to NOTE_INSN_CALL_ARG_LOCATION.
8736         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
8737         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
8738         Use copy_rtx_if_shared.
8739         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
8740         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
8741         (dwarf2out_var_location): Remove handling of
8742         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
8743         on call_insn.
8744         * final.c (final_scan_insn): Remove all references to
8745         NOTE_INSN_CALL_ARG_LOCATION.
8746         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
8747         before dumping final insns.
8748         * except.c (emit_note_eh_region_end): Remove all references to
8749         NOTE_INSN_CALL_ARG_LOCATION.
8750         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
8751         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
8752         * config/arc/arc.c (hwloop_optimize): Likewise.
8753         * config/arm/arm.c (create_fix_barrier): Likewise.
8754         * config/s390/s390.c (s390_chunkify_start): Likewise.
8755         * config/sh/sh.c (find_barrier): Likewise.
8756         * config/i386/i386.c (rest_of_insert_endbranch,
8757         ix86_seh_fixup_eh_fallthru): Likewise.
8758         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
8759         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
8760         * config/frv/frv.c (frv_function_prologue): Likewise.
8761         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
8762         reg note.
8763         (note_outside_basic_block_p): Remove all references to
8764         NOTE_INSN_CALL_ARG_LOCATION.
8765         * gengtype.c (adjust_field_rtx_def): Likewise.
8766         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
8767         Likewise.
8768         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
8769         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
8771         PR c++/84444
8772         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
8773         is ADDR_EXPR.
8775         PR tree-optimization/84452
8776         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
8777         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
8778         is NULL.
8780 2018-02-19  Martin Liska  <mliska@suse.cz>
8782         PR sanitizer/82183
8783         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
8785 2018-02-19  Martin Liska  <mliska@suse.cz>
8786             Richard Sandiford  <richard.sandiford@linaro.org>
8788         PR tree-optimization/82491
8789         * gimple-fold.c (get_base_constructor): Make earlier bail out
8790         to prevent ubsan.
8792 2018-02-19  Carl Love  <cel@us.ibm.com>
8794         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
8795         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
8796         BU_P8V_OVERLOAD_1.
8797         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
8798         P8V_BUILTIN_VEC_NEG.
8800 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
8802         * config/rl78/rl78.md (movdf): New define expand.
8804 2018-02-19  Martin Liska  <mliska@suse.cz>
8806         PR other/80589
8807         * doc/invoke.texi: Fix typo.
8808         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
8810 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
8812         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
8813         handle rs6000_single_float and rs6000_double_float specially for
8814         e500 family CPUs.
8816 2018-02-16  Jeff Law  <law@redhat.com>
8818         * config/rx/rx.c (add_pop_cfi_notes): New function.;
8819         (pop_regs): Use it.
8821 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
8823         PR ipa/84425
8824         * ipa-inline.c (inline_small_functions): Fix a typo.
8826 2018-02-16  Nathan Sidwell  <nathan@acm.org>
8828         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
8830 2018-02-16  Carl Love  <cel@us.ibm.com>
8832         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
8833         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
8834         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
8835         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
8836         expansion to P8V_BUILTIN_VEC_FLOAT2.
8838 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
8840         PR rtl-optimization/70023
8841         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
8842         src_regno into account.
8844 2018-02-16  Carl Love  <cel@us.ibm.com>
8846         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
8847         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
8848         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
8849         * config/rs6000/rs6000.c: Remove case statements for
8850         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
8851         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
8852         and P9V_BUILTIN_VEC_VINSERT4B.
8853         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
8854         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
8855         * config/rs6000/vsx.md:
8856         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
8857         vec_insert4b.
8859 2018-02-16  Carl Love  <cel@us.ibm.com>
8861         * config/rs6000/altivec.h: Add builtin names vec_extract4b
8862         vec_insert4b.
8863         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
8864         definitions.
8865         * config/rs6000/rs6000-c.c: Add the definitions for
8866         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
8867         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
8868         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
8869         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
8870         definition for insert4b and define insn *insert3b_internal.
8871         * doc/extend.texi: Add documentation for vec_extract4b.
8873 2018-02-16  Nathan Sidwell  <nathan@acm.org>
8875         * doc/extend.texi (Backwards Compatibility): Mention friend
8876         injection.  Note for-scope is deprecated.
8877         * doc/invoke.texi (-ffriend-injection): Deprecate.
8879 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
8881         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
8882         that moved to I2, also allow destinations that are a paradoxical
8883         subreg (instead of a normal reg).
8885 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
8887         PR target/83831
8888         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
8889         to QImode.
8891 2018-02-16  Richard Biener  <rguenther@suse.de>
8893         PR tree-optimization/84037
8894         PR tree-optimization/84016
8895         PR target/82862
8896         * config/i386/i386.c (ix86_builtin_vectorization_cost):
8897         Adjust vec_construct for the fact we need additional higher latency
8898         128bit inserts for AVX256 and AVX512 vector builds.
8899         (ix86_add_stmt_cost): Scale vector construction cost for
8900         elementwise loads.
8902 2018-02-16  Richard Biener  <rguenther@suse.de>
8904         PR tree-optimization/84417
8905         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
8906         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
8907         (non_rewritable_lvalue_p): Likewise, use poly-ints.
8909 2018-02-16  Martin Liska  <mliska@suse.cz>
8911         PR sanitizer/84307
8912         * internal-fn.def (ASAN_CHECK): Set proper flags.
8913         (ASAN_MARK): Likewise.
8915 2018-02-16  Julia Koval  <julia.koval@intel.com>
8917         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
8918         from PTA_CANNONLAKE.
8920 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
8922         PR target/84272
8923         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
8924         Use ++iter rather than iter++ for std::list iterators.
8925         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
8926         defer deleting them until all nodes in the forest are processed.  Do
8927         free even leaf nodes.  Change to_process into auto_vec.
8929         PR bootstrap/84405
8930         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
8931         * vec.h (vec_default_construct): Use memset instead of placement new
8932         if BROKEN_VALUE_INITIALIZATION is defined.
8933         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
8934         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
8935         is defined.
8937         PR rtl-optimization/83723
8938         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
8939         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
8940         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
8941         recursive calls.
8942         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
8943         callers.
8944         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
8946 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
8948         PR rtl-optimization/81443
8949         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
8950         from inner REGs to paradoxical SUBREGs.
8952 2018-02-16  Richard Biener  <rguenther@suse.de>
8954         PR tree-optimization/84399
8955         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
8956         For operands we can analyze at their definition make sure we can
8957         analyze them at each use as well.
8959 2018-02-16  Richard Biener  <rguenther@suse.de>
8961         PR tree-optimization/84190
8962         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
8963         volatile accesses if the decl isn't volatile.
8965 2018-02-15  Jason Merrill  <jason@redhat.com>
8967         PR c++/84314 - ICE with templates and fastcall attribute.
8968         * attribs.c (build_type_attribute_qual_variant): Don't clobber
8969         TYPE_CANONICAL on an existing type.
8971 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
8973         PR tree-optimization/84383
8974         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
8975         dstoff nor call operand_equal_p if dstbase is NULL.
8977         PR tree-optimization/84334
8978         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
8979         also a CONSTANT_CLASS_P, punt.
8981 2018-02-14  Jim Wilson  <jimw@sifive.com>
8983         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
8984         first SMALL_OPERAND check.  New local min_second_step.  Move assert
8985         to where locals are set.  Add TARGET_RVC support.
8986         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
8988 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
8990         * doc/invoke.texi: Correct -Wformat-overflow code sample.
8992 2018-02-14  Martin Sebor  <msebor@redhat.com>
8994         PR tree-optimization/83698
8995         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
8996         arrays constrain the offset range to their bounds.
8997         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
8998         (builtin_access::overlap): Avoid setting the size of overlap if it's
8999         already been set.
9000         (maybe_diag_overlap): Also consider arrays when deciding what values
9001         of offsets to include in diagnostics.
9003 2018-02-14  Martin Sebor  <msebor@redhat.com>
9005         PR c/84108
9006         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
9007         that correspond to the kind of a declaration.
9009 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
9011         PR target/83984
9012         * config/pa/pa.md: Load address of PIC label using the linkage table
9013         if the label is nonlocal.
9015 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9017         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
9018         warning message if user requests -maltivec=be.
9019         * doc/invoke.texi: Document deprecation of -maltivec=be.
9021 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
9023         PR target/84220
9024         * config/rs6000/rs6000-c.c: Update definitions for
9025         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
9026         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
9028 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
9030         PR target/84239
9031         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
9032         add _get_ssp intrinsics. Remove argument from
9033         __builtin_ia32_rdssp[d|q].
9034         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
9035         * config/i386/i386-builtin.def: Remove argument from
9036         __builtin_ia32_rdssp[d|q].
9037         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
9038         ix86_expand_special_args_builtin for _rdssp[d|q].
9039         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
9040         Clear register before usage.
9041         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
9042         Add documentation for new _get_ssp and _inc_ssp intrinsics.
9044 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
9046         PR tree-optimization/84357
9047         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
9048         operand 1 of an ARRAY_REF too.
9050 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
9052         PR target/83831
9053         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
9054         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
9055         declarations.
9056         (set_of_reg): New struct.
9057         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
9058         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
9059         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
9060         functions.
9061         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
9062         Split into bitclr, bitset, bitinvert patterns if appropriate.
9063         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
9064         use rx_fuse_in_memory_bitop.
9065         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
9066         to named insn, correct maximum insn length.
9068 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
9070         PR target/79242
9071         * machmode.def: Define a complex mode for PARTIAL_INT.
9072         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
9073         MODE_PARTIAL_INT.
9074         * doc/rtl.texi: Document CSPImode.
9075         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
9076         handling.
9077         (msp430_hard_regno_nregs_with_padding): Likewise.
9079 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
9081         PR target/84279
9082         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
9084 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
9086         PR rtl-optimization/84169
9087         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
9088         we generated a parallel as new i3 and we split that to new i2 and i3
9089         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
9090         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
9091         those to i2, not i1.  Partially rewrite this scan code.
9093 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
9095         PR c/82210
9096         * stor-layout.c (place_field): For variable length fields, adjust
9097         offset_align afterwards not just based on the field's alignment,
9098         but also on the size.
9100         PR middle-end/84309
9101         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
9102         of exps and logs in the use_exp2 case.
9104 2018-02-13  Jeff Law  <law@redhat.com>
9106         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
9107         entry for "vector".
9109         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
9110         ARGS as unused.
9112 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
9114         PR debug/84342
9115         PR debug/84319
9116         * common.opt (gas-loc-support, gas-locview-support): New.
9117         (ginline-points, ginternal-reset-location-views): New.
9118         * doc/invoke.texi: Document them.  Use @itemx where intended.
9119         (gvariable-location-views): Adjust.
9120         * target.def (reset_location_view): New.
9121         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
9122         (TARGET_RESET_LOCATION_VIEW): New.
9123         * doc/tm.texi: Rebuilt.
9124         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
9125         (dwarf2out_default_as_locview_support): New.
9126         (output_asm_line_debug_info): Use option variables.
9127         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
9128         (output_loc_list): Likewise.
9129         (add_high_low_attributes): Check option variables.
9130         Don't output entry view attribute in strict mode.
9131         (gen_inlined_subroutine_die): Check option variables.
9132         (dwarf2out_inline_entry): Likewise.
9133         (init_sections_and_labels): Likewise.
9134         (dwarf2out_early_finish): Likewise.
9135         (maybe_reset_location_view): New, from...
9136         (dwarf2out_var_location): ... here.  Call it.
9137         * debug.h (dwarf2out_default_as_loc_support): Declare.
9138         (dwarf2out_default_as_locview_support): Declare.
9139         * hooks.c (hook_int_rtx_insn_0): New.
9140         * hooks.h (hook_int_rtx_insn_0): Declare.
9141         * toplev.c (process_options): Take -gas-loc-support and
9142         -gas-locview-support from dwarf2out.  Enable
9143         -gvariable-location-views by default only with locview
9144         assembler support.  Enable -ginternal-reset-location-views by
9145         default only if the target defines the corresponding hook.
9146         Enable -ginline-points by default if location views are
9147         enabled; force it disabled if statement frontiers are
9148         disabled.
9149         * tree-inline.c (expand_call_inline): Check option variables.
9150         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
9152 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
9154         PR tree-optimization/84321
9155         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
9156         handling.  Also check whether the anti-range contains any values
9157         that satisfy the mask; switch to a VR_RANGE if not.
9159 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
9161         PR sanitizer/84340
9162         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
9164 2018-02-13  Martin Jambor  <mjambor@suse.cz>
9166         PR c++/83990
9167         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
9168         of call statements, also set location of a load to a temporary.
9170 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
9172         * config/rl78/rl78.c (add_vector_labels): New function.
9173         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
9174         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
9175         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
9176         which checks that no arguments are passed.
9177         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
9178         * doc/extend.texi: Documentation for the new attribute.
9180 2018-02-13  Andreas Schwab  <schwab@suse.de>
9182         * config/riscv/linux.h (CPP_SPEC): Define.
9184 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
9186         PR target/84335
9187         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
9188         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
9189         OPTION_MASK_ISA_AES as first argument to def_builtin_const
9190         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
9191         instead of OPTION_MASK_ISA_PCLMUL as first argument to
9192         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
9193         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
9194         temporarily for AES and PCLMUL builtins.
9196         PR tree-optimization/84339
9197         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
9198         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
9199         Formatting fixes.
9201         PR middle-end/84309
9202         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
9203         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
9204         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
9205         inline function.
9206         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
9207         inline function.
9208         * omp-simd-clone.h: New file.
9209         * omp-simd-clone.c: Include omp-simd-clone.h.
9210         (expand_simd_clones): No longer static.
9211         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
9212         cgraph.h and omp-simd-clone.h.
9213         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
9214         (vect_recog_widen_shift_pattern): Formatting fix.
9215         (vect_pattern_recog_1): Don't check optab for calls.
9217         PR target/84336
9218         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
9219         operands[2] into a REG before using gen_lowpart on it.
9221 2018-02-12  Jeff Law  <law@redhat.com>
9223         PR target/83760
9224         * config/sh/sh.c (find_barrier): Consider a sibling call
9225         a barrier as well.
9227         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
9228         successfully back substituting a reg.
9230 2018-02-12  Richard Biener  <rguenther@suse.de>
9232         PR tree-optimization/84037
9233         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
9234         parameter, move visited init to caller.
9235         (vect_slp_analyze_operations): Separate cost from validity
9236         check, initialize visited once for all instances.
9237         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
9238         for all instances.
9239         * tree-vect-stmts.c (vect_model_simple_cost): Make early
9240         out an assert.
9241         (vect_model_promotion_demotion_cost): Likewise.
9242         (vectorizable_bswap): Guard cost modeling with !slp_node
9243         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
9244         SLP stmts.
9245         (vectorizable_call): Likewise.
9246         (vectorizable_conversion): Likewise.
9247         (vectorizable_assignment): Likewise.
9248         (vectorizable_shift): Likewise.
9249         (vectorizable_operation): Likewise.
9250         (vectorizable_store): Likewise.
9251         (vectorizable_load): Likewise.
9252         (vectorizable_condition): Likewise.
9253         (vectorizable_comparison): Likewise.
9255 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
9257         PR sanitizer/84307
9258         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
9259         (ASAN_MARK): Fix fnspec to account for return value, change pointer
9260         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
9262 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
9264         PR middle-end/83665
9265         * params.def (inline-min-speedup): Increase from 8 to 15.
9266         (max-inline-insns-auto): Decrease from 40 to 30.
9267         * ipa-split.c (consider_split): Add some buffer for function to
9268         be considered inlining candidate.
9269         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
9270         default values.
9272 2018-02-12  Richard Biener  <rguenther@suse.de>
9274         PR tree-optimization/84037
9275         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
9276         matched stmts if we cannot swap the non-matched ones.
9278 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
9280         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
9281         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
9282         _mm_maskz_scalef_round_ss): New intrinsics.
9283         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
9284         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
9285         __builtin_ia32_scalefss_round): Remove.
9286         (__builtin_ia32_scalefsd_mask_round,
9287         __builtin_ia32_scalefss_mask_round): New intrinsics.
9288         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
9289         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
9290         ((match_operand:VF_128 2 "<round_nimm_predicate>"
9291         "<round_constraint>")): Changed to ...
9292         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
9293         "<round_scalar_constraint>")): ... this.
9294         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
9295         %0, %1, %2<round_op3>}"): Changed to ...
9296         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
9297         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
9298         %2<round_scalar_mask_op3>}"): ... this.
9299         * config/i386/subst.md (round_scalar_nimm_predicate): New.
9301 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
9303         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
9304         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
9305         (_mm_maskz_sqrt_round_ss): New intrinsics.
9306         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
9307         (__builtin_ia32_sqrtsd_mask_round)
9308         (__builtin_ia32_sqrtss_mask_round): New builtins.
9309         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
9310         (__builtin_ia32_sqrtss_round): Remove.
9311         (__builtin_ia32_sqrtsd_mask_round)
9312         (__builtin_ia32_sqrtss_mask_round): New builtins.
9313         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
9314         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
9315         ((match_operand:VF_128 1 "vector_operand"
9316         "xBm,<round_constraint>")): Changed to ...
9317         ((match_operand:VF_128 1 "vector_operand"
9318         "xBm,<round_scalar_constraint>")): ... this.
9319         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
9320         %0, %2, %<iptr>1<round_op3>}): Changed to ...
9321         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
9322         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
9323         %<iptr>1<round_scalar_mask_op3>}): ... this.
9324         ((set_attr "prefix" "<round_prefix>")): Changed to ...
9325         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
9327 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
9329         PR target/84266
9330         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
9331         Cast vec_cmpeq result to correct type.
9332         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
9333         Cast vec_cmpgt result to correct type.
9335 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
9337         * final.c (final_scan_insn_1): Renamed from...
9338         (final_scan_insn): ... this.  New wrapper, to recover
9339         seen from the outermost call in recursive ones.
9340         * config/sparc/sparc.c (output_return): Drop seen from call.
9341         (output_sibcall): Likewise.
9342         * config/visium/visium.c (output_branch): Likewise.
9344 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
9346         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
9347         function label.
9349 2018-02-10  Alan Modra  <amodra@gmail.com>
9351         PR target/84300
9352         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
9353         Specify LR as an input.
9355 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
9357         PR sanitizer/83987
9358         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
9359         remove_member_access_dummy_vars): New functions.
9360         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
9361         lower_omp_1, execute_lower_omp): Use them.
9363         PR rtl-optimization/84308
9364         * shrink-wrap.c (spread_components): Release todo vector.
9366 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
9368         PR rtl-optimization/57193
9369         * ira-color.c (struct allocno_color_data): Add member
9370         conflict_allocno_hard_prefs.
9371         (update_conflict_allocno_hard_prefs): New.
9372         (bucket_allocno_compare_func): Add a preference based on
9373         conflict_allocno_hard_prefs.
9374         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
9375         (color_allocnos): Remove a dead code.  Initiate
9376         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
9378 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
9380         PR target/84226
9381         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
9382         constraint from =wa to wa.  Avoid a subreg on the output operand,
9383         instead use a pseudo and subreg it in a move.
9384         (p9_xxbrd_<mode>): Changed to ...
9385         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
9386         (p9_xxbrd_v2df): New expander.
9387         (p9_xxbrw_<mode>): Changed to ...
9388         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
9389         (p9_xxbrw_v4sf): New expander.
9391 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
9393         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
9395 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
9397         PR target/83926
9398         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
9399         multiply in 32-bit mode.
9400         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
9401         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
9402         mode.
9404 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
9406         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
9407         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
9408         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
9409         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
9411 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
9413         PR lto/84213
9414         * dwarf2out.c (is_trivial_indirect_ref): New function.
9415         (dwarf2out_late_global_decl): Do not generate a location
9416         attribute for variables that have a non-trivial DECL_VALUE_EXPR
9417         and that are not defined in the current unit.
9419 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
9421         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
9422         instead of a libcall for UNORDERED.
9424 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
9426         PR target/82641
9427         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
9428         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
9430 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9432         PR target/PR84295
9433         * config/s390/s390.c (s390_set_current_function): Invoke
9434         s390_indirect_branch_settings also if fndecl didn't change.
9436 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
9438         * config/rs6000/rs6000.md (blockage): Set length to zero.
9440 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
9442         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
9444 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
9446         PR sanitizer/84285
9447         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
9448         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
9449         -static-lib*san.
9451         PR debug/84252
9452         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
9453         PARALLEL incoming that failed vt_get_decl_and_offset check.
9455         PR middle-end/84237
9456         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
9457         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
9458         TREE_READONLY bit.
9459         (get_variable_section): For decls in named .bss* sections pass true as
9460         second argument to bss_initializer_p.
9462 2018-02-09  Marek Polacek  <polacek@redhat.com>
9463             Jakub Jelinek  <jakub@redhat.com>
9465         PR c++/83659
9466         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
9467         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
9468         Sync some changes from cxx_fold_indirect_ref.
9470 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
9472         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
9473         markers.
9474         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
9475         (BLOCK_INLINE_ENTRY_LABEL): New.
9476         (dwarf2out_var_location): Disregard inline entry markers.
9477         (inline_entry_data): New struct.
9478         (inline_entry_data_hasher): New hashtable type.
9479         (inline_entry_data_hasher::hash): New.
9480         (inline_entry_data_hasher::equal): New.
9481         (inline_entry_data_table): New variable.
9482         (add_high_low_attributes): Add DW_AT_entry_pc and
9483         DW_AT_GNU_entry_view attributes if a pending entry is found
9484         in inline_entry_data_table.  Add old entry_pc attribute only
9485         if debug nonbinding markers are disabled.
9486         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
9487         markers are enabled.
9488         (block_within_block_p, dwarf2out_inline_entry): New.
9489         (dwarf2out_finish): Check that no entries remained in
9490         inline_entry_data_table.
9491         * final.c (reemit_insn_block_notes): Handle inline entry notes.
9492         (final_scan_insn, notice_source_line): Likewise.
9493         (rest_of_clean_state): Skip inline entry markers.
9494         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
9495         markers.
9496         * gimple.c (gimple_build_debug_inline_entry): New.
9497         * gimple.h (enum gimple_debug_subcode): Add
9498         GIMPLE_DEBUG_INLINE_ENTRY.
9499         (gimple_build_debug_inline_entry): Declare.
9500         (gimple_debug_inline_entry_p): New.
9501         (gimple_debug_nonbind_marker_p): Adjust.
9502         * insn-notes.def (INLINE_ENTRY): New.
9503         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
9504         inline entry marker notes.
9505         (print_insn): Likewise.
9506         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
9507         (INSN_DEBUG_MARKER_KIND): Likewise.
9508         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
9509         * tree-inline.c (expand_call_inline): Build and insert
9510         debug_inline_entry stmt.
9511         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
9512         inline entry blocks early, if nonbind markers are enabled.
9513         (dump_scope_block): Dump fragment info.
9514         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
9515         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
9516         (gimple_build_debug_inline_entry): New.
9517         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
9518         Enable/disable inline entry points too.
9519         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
9520         (DEBUG_INSN): Describe inline entry markers.
9522         * common.opt (gvariable-location-views): New.
9523         (gvariable-location-views=incompat5): New.
9524         * config.in: Rebuilt.
9525         * configure: Rebuilt.
9526         * configure.ac: Test assembler for view support.
9527         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
9528         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
9529         * dwarf2out.c (var_loc_view): New typedef.
9530         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
9531         (dwarf2out_locviews_in_attribute): New.
9532         (dwarf2out_locviews_in_loclist): New.
9533         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
9534         (enum dw_line_info_opcode): Add LI_adv_address.
9535         (struct dw_line_info_table): Add view.
9536         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
9537         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
9538         (zero_view_p): New variable.
9539         (ZERO_VIEW_P): New macro.
9540         (output_asm_line_debug_info): New.
9541         (struct var_loc_node): Add view.
9542         (add_AT_view_list, AT_loc_list): New.
9543         (add_var_loc_to_decl): Add view param.  Test it against last.
9544         (new_loc_list): Add view params.  Record them.
9545         (AT_loc_list_ptr): Handle loc and view lists.
9546         (view_list_to_loc_list_val_node): New.
9547         (print_dw_val): Handle dw_val_class_view_list.
9548         (size_of_die): Likewise.
9549         (value_format): Likewise.
9550         (loc_list_has_views): New.
9551         (gen_llsym): Set vl_symbol too.
9552         (maybe_gen_llsym, skip_loc_list_entry): New.
9553         (dwarf2out_maybe_output_loclist_view_pair): New.
9554         (output_loc_list): Output view list or entries too.
9555         (output_view_list_offset): New.
9556         (output_die): Handle dw_val_class_view_list.
9557         (output_dwarf_version): New.
9558         (output_compilation_unit_header): Use it.
9559         (output_skeleton_debug_sections): Likewise.
9560         (output_rnglists, output_line_info): Likewise.
9561         (output_pubnames, output_aranges): Update version comments.
9562         (output_one_line_info_table): Output view numbers in asm comments.
9563         (dw_loc_list): Determine current endview, pass it to new_loc_list.
9564         Call maybe_gen_llsym.
9565         (loc_list_from_tree_1): Adjust.
9566         (add_AT_location_description): Create view list attribute if
9567         needed, check it's absent otherwise.
9568         (convert_cfa_to_fb_loc_list): Adjust.
9569         (maybe_emit_file): Call output_asm_line_debug_info for test.
9570         (dwarf2out_var_location): Reset views as needed.  Precompute
9571         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
9572         attribute.  Set view.
9573         (new_line_info_table): Reset next view.
9574         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
9575         (dwarf2out_source_line): Likewise.  Output view resets and labels to
9576         the assembler, or select appropriate line info opcodes.
9577         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
9578         (optimize_string_length): Catch it.  Adjust.
9579         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
9580         dw_val_class_view_list, and remove it if no longer needed.
9581         (hash_loc_list): Hash view numbers.
9582         (loc_list_hasher::equal): Compare them.
9583         (optimize_location_lists): Check whether a view list symbol is
9584         needed, and whether the locview attribute is present, and
9585         whether they match.  Remove the locview attribute if no longer
9586         needed.
9587         (index_location_lists): Call skip_loc_list_entry for test.
9588         (dwarf2out_finish): Call output_asm_line_debug_info for test.
9589         Use output_dwarf_version.
9590         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
9591         (struct dw_val_node): Add val_view_list.
9592         * final.c (SEEN_NEXT_VIEW): New.
9593         (set_next_view_needed): New.
9594         (clear_next_view_needed): New.
9595         (maybe_output_next_view): New.
9596         (final_start_function): Rename to...
9597         (final_start_function_1): ... this.  Take pointer to FIRST,
9598         add SEEN parameter.  Emit param bindings in the initial view.
9599         (final_start_function): Reintroduce SEEN-less interface.
9600         (final): Rename to...
9601         (final_1): ... this.  Take SEEN parameter.  Output final pending
9602         next view at the end.
9603         (final): Reintroduce seen-less interface.
9604         (final_scan_insn): Output pending next view before switching
9605         sections or ending a block.  Mark the next view as needed when
9606         outputting variable locations.  Notify debug backend of section
9607         changes, and of location view changes.
9608         (rest_of_handle_final): Adjust.
9609         * toplev.c (process_options): Autodetect value for debug variable
9610         location views option.  Warn on incompat5 without -gdwarf-5.
9611         * doc/invoke.texi (gvariable-location-views): New.
9612         (gvariable-location-views=incompat5): New.
9613         (gno-variable-location-views): New.
9615 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
9617         PR tree-optimization/84136
9618         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
9619         that the result of find_edge is non-NULL.
9621 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
9623         PR target/83008
9624         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
9625         storing integer register in SImode.  Fix cost of 256 and 512
9626         byte aligned SSE register store.
9628 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
9630         * config/i386/i386.c (ix86_multiplication_cost): Fix
9631         multiplication cost for TARGET_AVX512DQ.
9633 2018-02-08  Marek Polacek  <polacek@redhat.com>
9635         PR tree-optimization/84238
9636         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
9637         get_range_strlen.
9639 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
9641         PR tree-optimization/84265
9642         * tree-vect-stmts.c (vectorizable_store): Don't treat
9643         VMAT_CONTIGUOUS accesses as grouped.
9644         (vectorizable_load): Likewise.
9646 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
9648         PR tree-optimization/81635
9649         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
9650         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
9651         (test_round_for_mask): New functions.
9652         (wide_int_cc_tests): Call test_round_for_mask.
9653         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
9654         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
9655         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
9656         range returned by get_range_info.
9658 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
9660         PR ipa/81360
9661         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
9662         * symtab.c: Include builtins.h
9663         (symtab_node::output_to_lto_symbol_table_p): Move here
9664         from lto-streamer-out.c:output_symbol_p.
9665         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
9666         (output_symbol_p): Move all logic to symtab.c
9667         (produce_symtab): Update.
9669 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9671         * config/s390/s390-opts.h (enum indirect_branch): Define.
9672         * config/s390/s390-protos.h (s390_return_addr_from_memory)
9673         (s390_indirect_branch_via_thunk)
9674         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
9675         (enum s390_indirect_branch_type): Define.
9676         * config/s390/s390.c (struct s390_frame_layout, struct
9677         machine_function): Remove.
9678         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
9679         (indirect_branch_table_label_no, indirect_branch_table_name):
9680         Define variables.
9681         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
9682         (enum s390_indirect_branch_option): Define.
9683         (s390_return_addr_from_memory): New function.
9684         (s390_handle_string_attribute): New function.
9685         (s390_attribute_table): Add new attribute handler.
9686         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
9687         (s390_indirect_branch_via_thunk): New function.
9688         (s390_indirect_branch_via_inline_thunk): New function.
9689         (s390_function_ok_for_sibcall): When jumping via thunk disallow
9690         sibling call optimization for non z10 compiles.
9691         (s390_emit_call): Force indirect branch target to be a single
9692         register.  Add r1 clobber for non-z10 compiles.
9693         (s390_emit_epilogue): Emit return jump via return_use expander.
9694         (s390_reorg): Handle JUMP_INSNs as execute targets.
9695         (s390_option_override_internal): Perform validity checks for the
9696         new command line options.
9697         (s390_indirect_branch_attrvalue): New function.
9698         (s390_indirect_branch_settings): New function.
9699         (s390_set_current_function): Invoke s390_indirect_branch_settings.
9700         (s390_output_indirect_thunk_function):  New function.
9701         (s390_code_end): Implement target hook.
9702         (s390_case_values_threshold): Implement target hook.
9703         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
9704         macros.
9705         * config/s390/s390.h (struct s390_frame_layout)
9706         (struct machine_function): Move here from s390.c.
9707         (TARGET_INDIRECT_BRANCH_NOBP_RET)
9708         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
9709         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
9710         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
9711         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
9712         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
9713         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
9714         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
9715         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
9716         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
9717         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
9718         (mnemonic attribute): Add values which aren't recognized
9719         automatically.
9720         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
9721         pattern for branch conversion.  Fix mnemonic attribute.
9722         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
9723         indirect branch via thunk if requested.
9724         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
9725         ("*indirect_jump"): Disable for branch conversion using out of
9726         line thunks.
9727         ("indirect_jump_via_thunk<mode>_z10")
9728         ("indirect_jump_via_thunk<mode>")
9729         ("indirect_jump_via_inlinethunk<mode>_z10")
9730         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
9731         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
9732         ("casesi_jump_via_inlinethunk<mode>_z10")
9733         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
9734         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
9735         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
9736         ("*indirect2_jump"): Disable for branch conversion.
9737         ("casesi_jump"): Turn into expander and expand patterns for branch
9738         conversion.
9739         ("return_use"): New expander.
9740         ("*return"): Emit return via thunk and rename it to ...
9741         ("*return<mode>"): ... this one.
9742         * config/s390/s390.opt: Add new options and and enum for the
9743         option values.
9745 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
9747         * lra-constraints.c (match_reload): Unconditionally use
9748         gen_lowpart_SUBREG, rather than selecting between that
9749         and equivalent gen_rtx_SUBREG code.
9751 2018-02-08  Richard Biener  <rguenther@suse.de>
9753         PR tree-optimization/84233
9754         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
9755         changed flag instead of boguously re-using phi_inserted.
9757 2018-02-08  Martin Jambor  <mjambor@suse.cz>
9759         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
9760         static local variables.
9762 2018-02-08  Richard Biener  <rguenther@suse.de>
9764         PR tree-optimization/84278
9765         * tree-vect-stmts.c (vectorizable_store): When looking for
9766         smaller vector types to perform grouped strided loads/stores
9767         make sure the mode is supported by the target.
9768         (vectorizable_load): Likewise.
9770 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
9772         * config/aarch64/aarch64.c (aarch64_components_for_bb):
9773         Increase LDP/STP opportunities by adding adjacent callee-saves.
9775 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
9777         PR rtl-optimization/84068
9778         PR rtl-optimization/83459
9779         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
9781 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
9783         PR tree-optimization/84224
9784         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
9785         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
9786         non-zero arguments.
9788 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
9790         PR target/84113
9791         * config/rs6000/altivec.md (*restore_world): Remove LR use.
9792         * config/rs6000/predicates.md (restore_world_operation): Adjust op
9793         count, remove one USE.
9795 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
9797         * doc/install.texi (Configuration): Document the
9798         --with-long-double-format={ibm,ieee} PowerPC configuration
9799         options.
9801         PR target/84154
9802         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
9803         Convert from define_expand to be define_insn_and_split.  Rework
9804         float/double/_Float128 conversions to QI/HI/SImode to work with
9805         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
9806         conversions to QI/HImode types did a store and then a load to
9807         truncate the value.  For conversions to VSX registers, don't split
9808         the insn, instead emit the code directly.  Use the code iterator
9809         any_fix to combine signed and unsigned conversions.
9810         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
9811         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
9812         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
9813         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
9814         (fix_<mode>di2_hw): Likewise.
9815         (fixuns_<mode>di2_hw): Likewise.
9816         (fix_<mode>si2_hw): Likewise.
9817         (fixuns_<mode>si2_hw): Likewise.
9818         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
9819         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
9820         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
9821         fix<uns>_trunc<SFDF:mode>si2_p8.
9822         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
9823         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
9824         (fix<uns>_<mode>_mem): Likewise.
9825         (fctiw<u>z_<mode>_mem): Likewise.
9826         (fix<uns>_<mode>_mem): Likewise.
9827         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
9828         the register allocator from doing a direct move to the GPRs to do
9829         a store, and instead use the ISA 3.0 store byte/half-word from
9830         vector register instruction.  For IEEE 128-bit floating point,
9831         also optimize stores of 32-bit ints.
9832         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
9834 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
9836         * genextract.c (push_pathstr_operand): New function to support
9837         [a-zA-Z].
9838         (walk_rtx): Call push_pathstr_operand.
9839         (print_path): Support [a-zA-Z].
9841 2018-02-07  Richard Biener  <rguenther@suse.de>
9843         PR tree-optimization/84037
9844         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
9845         (cse_and_gimplify_to_preheader): Declare.
9846         (vect_get_place_in_interleaving_chain): Likewise.
9847         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
9848         ivexpr_map.
9849         (_loop_vec_info::~_loop_vec_info): Delete it.
9850         (cse_and_gimplify_to_preheader): New function.
9851         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
9852         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
9853         (vectorizable_load): Likewise.  For grouped stores always base
9854         the IV on the first element.
9855         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
9856         condition before gimplifying.
9858 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
9860         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
9861         *DIV_EXPR and *MOD_EXPR.
9863 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
9865         PR target/84248
9866         * config/i386/i386.c (ix86_option_override_internal): Mask out
9867         the CF_SET bit when checking -fcf-protection.
9869 2018-02-07  Tom de Vries  <tom@codesourcery.com>
9871         PR libgomp/84217
9872         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
9873         enough.
9875 2018-02-07  Richard Biener  <rguenther@suse.de>
9877         PR tree-optimization/84204
9878         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
9879         this place.
9881         PR tree-optimization/84205
9882         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
9883         special-case isl_ast_op_zdiv_r.
9885         PR tree-optimization/84223
9886         * graphite-scop-detection.c (gather_bbs::before_dom_children):
9887         Only add conditions from within the region.
9888         (gather_bbs::after_dom_children): Adjust.
9890 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
9892         PR target/84209
9893         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
9894         * config/avr/avr.md: Only post-reload split REG-REG moves if
9895         either register is GENERAL_REG_P.
9897 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
9899         PR tree-optimization/84235
9900         * tree-ssa-scopedtables.c
9901         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
9902         if the subtraction is performed in floating point type where NaNs are
9903         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
9904         build 1.  Formatting fix.
9906 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
9908         PR target/84146
9909         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
9910         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
9911         and skip it regardless of bb boundaries.  Use CALL_P macro,
9912         don't test INSN_P (insn) together with CALL_P or JUMP_P check
9913         unnecessarily, formatting fix.
9915 2018-02-06  Michael Collison  <michael.collison@arm.com>
9917         * config/arm/thumb2.md:
9918         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
9919         (*thumb_mov_notscc): Ditto.
9921 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
9923         PR target/84154
9924         * config/rs6000/rs6000.md (su code attribute): Use "u" for
9925         unsigned_fix, not "s".
9927 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9929         * configure.ac (gcc_fn_eh_frame_ro): New function.
9930         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
9931         correct .eh_frame permissions.
9932         * configure: Regenerate.
9934 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
9936         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
9937         irrelevant options.
9939 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9941         * config/rs6000/rs6000.c (rs6000_option_override_internal):
9942         Display warning message for -mno-speculate-indirect-jumps.
9944 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
9946         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
9947         Undocumented.
9948         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
9950 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
9952         PR tree-optimization/84225
9953         * tree-eh.c (find_trapping_overflow): Only call
9954         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
9956 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
9958         PR target/84145
9959         * config/i386/i386.c: Reimplement the check of possible options
9960         -mibt/-mshstk conbination. Change error messages.
9961         * doc/invoke.texi: Fix a typo: remove extra '='.
9963 2018-02-06  Marek Polacek  <polacek@redhat.com>
9965         PR tree-optimization/84228
9966         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
9968 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
9970         PR target/82641
9971         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
9972         emitted arch directives.
9973         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
9974         __ARM_FEATURE_COPROC before changing architectures.
9976 2018-02-06  Richard Biener  <rguenther@suse.de>
9978         * config/i386/i386.c (print_reg): Fix typo.
9979         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
9981 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
9983         * configure: Regenerate.
9985 2018-02-05  Martin Sebor  <msebor@redhat.com>
9987         PR tree-optimization/83369
9988         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
9989         inlining context.
9991 2018-02-05  Martin Liska  <mliska@suse.cz>
9993         * doc/invoke.texi: Cherry-pick upstream r323995.
9995 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
9997         * ira.c (ira_init_register_move_cost): Adjust comment.
9999 2018-02-05  Martin Liska  <mliska@suse.cz>
10001         PR gcov-profile/84137
10002         * doc/gcov.texi: Fix typo in documentation.
10004 2018-02-05  Martin Liska  <mliska@suse.cz>
10006         PR gcov-profile/83879
10007         * doc/gcov.texi: Document necessity of --dynamic-list-data when
10008         using dlopen functionality.
10010 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
10012         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
10013         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
10014         _mm_maskz_range_ss, _mm_mask_range_round_ss,
10015         _mm_maskz_range_round_ss): New intrinsics.
10016         (__builtin_ia32_rangesd128_round)
10017         (__builtin_ia32_rangess128_round): Remove.
10018         (__builtin_ia32_rangesd128_mask_round,
10019         __builtin_ia32_rangess128_mask_round): New builtins.
10020         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
10021         __builtin_ia32_rangess128_round): Remove.
10022         (__builtin_ia32_rangesd128_mask_round,
10023         __builtin_ia32_rangess128_mask_round): New builtins.
10024         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
10025         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
10026         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
10027         "<round_saeonly_constraint>")): Changed to ...
10028         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
10029         "<round_saeonly_scalar_constraint>")): ... this.
10030         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
10031         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
10032         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
10033         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
10034         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
10036 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
10038         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
10039         options.
10040         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
10041         Remove all values except native, 8540 and 8548.
10043 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
10045         * config/i386/i386.c (ix86_output_function_return): Pass
10046         INVALID_REGNUM, instead of -1, as invalid register number to
10047         indirect_thunk_name and output_indirect_thunk.
10049 2018-02-02  Julia Koval  <julia.koval@intel.com>
10051         * config.gcc: Add -march=icelake.
10052         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
10053         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
10054         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
10055         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
10056         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
10057         (processor_target_table): Add icelake.
10058         (ix86_option_override_internal): Handle new PTAs.
10059         (get_builtin_code_for_version): Handle icelake.
10060         (M_INTEL_COREI7_ICELAKE): New.
10061         (fold_builtin_cpu): Handle icelake.
10062         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
10063         * doc/invoke.texi: Add -march=icelake.
10065 2018-02-02  Julia Koval  <julia.koval@intel.com>
10067         * config/i386/i386.c (ix86_option_override_internal): Change flags type
10068         to wide_int_bitmask.
10069         * wide-int-bitmask.h: New.
10071 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
10073         PR target/84066
10074         * config/i386/i386.md: Replace Pmode with word_mode in
10075         builtin_setjmp_setup and builtin_longjmp to support x32.
10077 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
10079         PR target/56010
10080         PR target/83743
10081         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
10082         #include "opts.h".
10083         (rs6000_supported_cpu_names): New static variable.
10084         (linux_cpu_translation_table): Likewise.
10085         (elf_platform) <cpu>: Define new static variable and use it.
10086         Translate kernel AT_PLATFORM name to canonical name if needed.
10087         Error if platform name is unknown.
10089 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
10091         PR target/84089
10092         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
10094 2018-02-01  Jeff Law  <law@redhat.com>
10096         PR target/84128
10097         * config/i386/i386.c (release_scratch_register_on_entry): Add new
10098         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
10099         the scratch if RELEASE_VIA_POP is false.
10100         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
10101         If we have to save a temporary register, decrement SIZE appropriately.
10102         Pass new arguments to release_scratch_register_on_entry.
10103         (ix86_adjust_stack_and_probe): Likewise.
10104         (ix86_emit_probe_stack_range): Pass new arguments to
10105         release_scratch_register_on_entry.
10107 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
10109         PR rtl-optimization/84157
10110         * combine.c (change_zero_ext): Use REG_P predicate in
10111         front of HARD_REGISTER_P predicate.
10113 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
10115         * config/avr/avr.c (avr_option_override): Move disabling of
10116         -fdelete-null-pointer-checks to...
10117         * common/config/avr/avr-common.c (avr_option_optimization_table):
10118         ...here.
10120 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
10122         PR tree-optimization/81635
10123         * tree-data-ref.c (split_constant_offset_1): For types that
10124         wrap on overflow, try to use range info to prove that wrapping
10125         cannot occur.
10127 2018-02-01  Renlin Li  <renlin.li@arm.com>
10129         PR target/83370
10130         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
10131         TAILCALL_ADDR_REGS.
10132         (aarch64_register_move_cost): Likewise.
10133         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
10134         TAILCALL_ADDR_REGS.
10135         (REG_CLASS_NAMES): Likewise.
10136         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
10137         TAILCALL_ADDR_REGS. Remove IP registers.
10138         * config/aarch64/aarch64.md (Ucs): Update register constraint.
10140 2018-02-01  Richard Biener  <rguenther@suse.de>
10142         * domwalk.h (dom_walker::dom_walker): Add additional constructor
10143         for specifying RPO order and allow NULL for that.
10144         * domwalk.c (dom_walker::dom_walker): Likewise.
10145         (dom_walker::walk): Handle NULL RPO order.
10146         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
10147         in RPO order.
10148         (rewrite_update_dom_walker): Likewise.
10149         (mark_def_dom_walker): Likewise.
10151 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
10153         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
10154         (aarch64_maybe_expand_sve_subreg_move): Declare.
10155         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
10156         * config/aarch64/predicates.md (aarch64_any_register_operand): New
10157         predicate.
10158         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
10159         that are semantically a reverse operation.
10160         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
10161         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
10162         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
10163         functions.
10164         (aarch64_can_change_mode_class): For big-endian, forbid changes
10165         between two SVE modes if they have different element sizes.
10167 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
10169         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
10170         the TImode handling for big-endian targets.
10172 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
10174         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
10175         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
10176         not just bytes.
10177         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
10178         Remove BSWAP handing for big-endian targets and use the form of
10179         LD1RQ appropariate for the mode.
10181 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
10183         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
10184         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
10185         duplicated element.
10187 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
10189         PR tearget/83845
10190         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
10191         check for operands that need to go through aarch64_sve_reload_be.
10193 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
10195         PR tree-optimization/81661
10196         PR tree-optimization/84117
10197         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
10198         * tree-eh.c: Include gimplify.h.
10199         (find_trapping_overflow, replace_trapping_overflow,
10200         rewrite_to_non_trapping_overflow): New functions.
10201         * tree-vect-loop.c: Include tree-eh.h.
10202         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
10203         * tree-data-ref.c: Include tree-eh.h.
10204         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
10206 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
10208         PR rtl-optimization/84123
10209         * combine.c (change_zero_ext): Check if hard register satisfies
10210         can_change_dest_mode before calling gen_lowpart_SUBREG.
10212 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
10214         PR target/82444
10215         * ira.c (ira_init_register_move_cost): Remove assert.
10217 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
10219         PR rtl-optimization/84071
10220         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
10221         * doc/tm.texi: Regenerate.
10223 2018-01-31  Richard Biener  <rguenther@suse.de>
10225         PR tree-optimization/84132
10226         * tree-data-ref.c (analyze_miv_subscript): Properly
10227         check whether evolution_function_is_affine_multivariate_p
10228         before calling gcd_of_steps_may_divide_p.
10230 2018-01-31  Julia Koval  <julia.koval@intel.com>
10232         PR target/83618
10233         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
10234         * config/i386/i386.md (rdpid_rex64) New.
10235         (rdpid): Make 32bit only.
10237 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
10239         PR lto/84105
10240         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
10241         an IDENTIFIER_NODE for FUNCTION_TYPE's.
10243 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
10245         Revert
10246         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
10248         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
10250 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
10252         PR rtl-optimization/84071
10253         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
10254         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
10256 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
10258         * config/arc/arc.c (arc_handle_aux_attribute): New function.
10259         (arc_attribute_table): Add 'aux' attribute.
10260         (arc_in_small_data_p): Consider aux like variables.
10261         (arc_is_aux_reg_p): New function.
10262         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
10263         (arc_get_aux_arg): New function.
10264         (prepare_move_operands): Handle aux-register access.
10265         (arc_handle_aux_attribute): New function.
10266         * doc/extend.texi (ARC Variable attributes): Add subsection.
10268 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
10270         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
10271         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
10272         (arc_attribute_table): Add 'uncached' attribute.
10273         (arc_print_operand): Print '.di' flag for uncached memory
10274         accesses.
10275         (arc_in_small_data_p): Do not consider for small data the uncached
10276         types.
10277         (arc_is_uncached_mem_p): New function.
10278         * config/arc/predicates.md (compact_store_memory_operand): Check
10279         for uncached memory accesses.
10280         (nonvol_nonimm_operand): Likewise.
10281         * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
10283 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
10285         PR c/84100
10286         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
10287         falign-loops=): Add Optimization flag.
10289 2018-01-30  Jeff Law  <law@redhat.com>
10291         PR target/84064
10292         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
10293         INT_REGISTERS_SAVED.  Check it prior to calling
10294         get_scratch_register_on_entry.
10295         (ix86_adjust_stack_and_probe): Similarly.
10296         (ix86_emit_probe_stack_range): Similarly.
10297         (ix86_expand_prologue): Corresponding changes.
10299 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10301         PR target/40411
10302         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
10303         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
10305 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
10307         PR target/84112
10308         * lra-constraints.c (curr_insn_transform): Process AND in the
10309         address.
10311 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
10313         PR rtl-optimization/83986
10314         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
10315         dependence against last_pending_memory_flush in addition to
10316         pending_jump_insns.
10318 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
10320         PR tree-optimization/81611
10321         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
10322         copies.
10324 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
10326         PR target/83758
10327         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
10328         a reg rtx.
10330 2018-01-30  Richard Biener  <rguenther@suse.de>
10331             Jakub Jelinek  <jakub@redhat.com>
10333         PR tree-optimization/84111
10334         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
10335         inner loops added during recursion, as they don't have up-to-date
10336         SSA form.
10338 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
10340         PR ipa/81360
10341         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
10342         (can_inline_edge_by_limits_p): ... here.
10343         (can_early_inline_edge_p, check_callers,
10344         update_caller_keys, update_callee_keys, recursive_inlining,
10345         add_new_edges_to_heap, speculation_useful_p,
10346         inline_small_functions,
10347         inline_small_functions, flatten_function,
10348         inline_to_all_callers_1): Update.
10350 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
10352         * profile-count.c (profile_count::combine_with_ipa_count): Handle
10353         zeros correctly.
10355 2018-01-30  Richard Biener  <rguenther@suse.de>
10357         PR tree-optimization/83008
10358         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
10359         invariant and constant vector uses in stmts when they need
10360         more than one stmt.
10362 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10364         PR bootstrap/84017
10365         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
10366         * configure: Regenerate.
10368 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
10370         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
10371         pattern.
10372         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
10373         Use gen_rtx_REG rather than gen_lowpart.
10375 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
10377         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
10378         rather than 0 when creating partial subregs.
10380 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
10382         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
10383         of usage.
10385 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
10387         PR target/81550
10388         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
10389         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
10390         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
10391         flags.  This restores the settings used before the 2017-07-24.
10392         Turning off pre increment/decrement/modify allows IVOPTS to
10393         optimize DF/SF loops where the index is an int.
10395 2018-01-29  Richard Biener  <rguenther@suse.de>
10396             Kelvin Nilsen  <kelvin@gcc.gnu.org>
10398         PR bootstrap/80867
10399         * tree-vect-stmts.c (vectorizable_call): Don't call
10400         targetm.vectorize_builtin_md_vectorized_function if callee is
10401         NULL.
10403 2018-01-22  Carl Love  <cel@us.ibm.com>
10405         * doc/extend.tex: Fix typo in second arg in
10406         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
10408 2018-01-29  Richard Biener  <rguenther@suse.de>
10410         PR tree-optimization/84086
10411         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
10412         (flush_ssaname_freelist): When SSA names were released reset
10413         the SCEV hash table.
10415 2018-01-29  Richard Biener  <rguenther@suse.de>
10417         PR tree-optimization/84057
10418         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
10419         removed paths when removing edges.
10421 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
10423         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
10424         -mfunction-return=@var{choice}.
10426 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10428         PR diagnostic/84034
10429         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
10430         Handle CR like TAB.
10431         (layout::print_source_line): Likewise.
10432         (test_get_line_width_without_trailing_whitespace): Add test cases.
10434 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
10436         PR middle-end/84040
10437         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
10438         debug insns.
10440 2018-01-26  Jim Wilson  <jimw@sifive.com>
10442         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
10444         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
10445         specified.
10447 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10449         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
10450         and CMP + SUB-immediate -> SUBS.
10452 2018-01-26  Martin Sebor  <msebor@redhat.com>
10454         PR tree-optimization/83896
10455         * tree-ssa-strlen.c (get_string_len): Rename...
10456         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
10457         Avoid assuming length is constant.
10458         (handle_char_store): Use HOST_WIDE_INT for string length.
10460 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
10462         PR target/81763
10463         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
10464         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
10466 2018-01-26  Richard Biener  <rguenther@suse.de>
10468         PR rtl-optimization/84003
10469         * dse.c (record_store): Only record redundant stores when
10470         the earlier store aliases at least all accesses the later one does.
10472 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
10474         PR rtl-optimization/83985
10475         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
10476         REG_CFA_RESTORE insns.
10477         (delete_unmarked_insns): Don't ignore separate shrink wrapping
10478         REG_CFA_RESTORE insns here.
10480         PR c/83989
10481         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
10482         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
10484 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
10486         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
10487         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
10488         (arc_init): Likewise.
10489         (arc_override_options): Likewise.
10490         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
10491         value.
10492         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
10493         support.
10494         * config/arc/arc.h (TARGET_DBNZ): Define.
10495         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
10496         properly set the tune attribute.
10497         (dbnz): Use TARGET_DBNZ guard.
10498         * config/arc/arc.opt (mtune): Add core3 option.
10500 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
10502         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
10503         recognize new pic like addresses.
10504         (arc_delegitimize_address): Clean up.
10506 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
10508         * config/arc/arc-arches.def: Option mrf16 valid for all
10509         architectures.
10510         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
10511         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
10512         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
10513         * config/arc/arc-tables.opt: Regenerate.
10514         * config/arc/arc.c (arc_conditional_register_usage): Handle
10515         reduced register file case.
10516         (arc_file_start): Set must have build attributes.
10517         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
10518         mrf16 option value.
10519         * config/arc/arc.opt (mrf16): Add new option.
10520         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
10521         * config/arc/genmultilib.awk: Handle new mrf16 option.
10522         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
10523         * config/arc/t-multilib: Regenerate.
10524         * doc/invoke.texi (ARC Options): Document mrf16 option.
10526 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
10528         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
10529         * config/arc/arc.c (arc_handle_secure_attribute): New function.
10530         (arc_attribute_table): Add 'secure_call' attribute.
10531         (arc_print_operand): Print secure call operand.
10532         (arc_function_ok_for_sibcall): Don't optimize tail calls when
10533         secure.
10534         (arc_is_secure_call_p): New function.  * config/arc/arc.md
10535         (call_i): Add support for sjli instruction.
10536         (call_value_i): Likewise.
10537         * config/arc/constraints.md (Csc): New constraint.
10539 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
10540             John Eric Martin  <John.Martin@emmicro-us.com>
10542         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
10543         * config/arc/arc.c (_arc_jli_section): New struct.
10544         (arc_jli_section): New type.
10545         (rc_jli_sections): New static variable.
10546         (arc_handle_jli_attribute): New function.
10547         (arc_attribute_table): Add jli_always and jli_fixed attribute.
10548         (arc_file_end): New function.
10549         (TARGET_ASM_FILE_END): Define.
10550         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
10551         (arc_add_jli_section): New function.
10552         (jli_call_scan): Likewise.
10553         (arc_reorg): Call jli_call_scan.
10554         (arc_output_addsi): Remove 'S' from printing asm operand.
10555         (arc_is_jli_call_p): New function.
10556         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
10557         operand.
10558         (movhi_insn): Likewise.
10559         (movsi_insn): Likewise.
10560         (movsi_set_cc_insn): Likewise.
10561         (loadqi_update): Likewise.
10562         (load_zeroextendqisi_update): Likewise.
10563         (load_signextendqisi_update): Likewise.
10564         (loadhi_update): Likewise.
10565         (load_zeroextendhisi_update): Likewise.
10566         (load_signextendhisi_update): Likewise.
10567         (loadsi_update): Likewise.
10568         (loadsf_update): Likewise.
10569         (movsicc_insn): Likewise.
10570         (bset_insn): Likewise.
10571         (bxor_insn): Likewise.
10572         (bclr_insn): Likewise.
10573         (bmsk_insn): Likewise.
10574         (bicsi3_insn): Likewise.
10575         (cmpsi_cc_c_insn): Likewise.
10576         (movsi_ne): Likewise.
10577         (movsi_cond_exec): Likewise.
10578         (clrsbsi2): Likewise.
10579         (norm_f): Likewise.
10580         (normw): Likewise.
10581         (swap): Likewise.
10582         (divaw): Likewise.
10583         (flag): Likewise.
10584         (sr): Likewise.
10585         (kflag): Likewise.
10586         (ffs): Likewise.
10587         (ffs_f): Likewise.
10588         (fls): Likewise.
10589         (call_i): Remove 'S' asm letter, add jli instruction.
10590         (call_value_i): Likewise.
10591         * config/arc/arc.op (mjli-always): New option.
10592         * config/arc/constraints.md (Cji): New constraint.
10593         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
10594         operand.
10595         (subsf3_fpx): Likewise.
10596         (mulsf3_fpx): Likewise.
10597         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
10598         asm operand.
10599         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
10600         function attrbutes.
10601         * doc/invoke.texi (ARC): Document mjli-always option.
10603 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
10605         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
10606         avoid addition with 0 and use incw and decw where possible.
10608 2018-01-26  Richard Biener  <rguenther@suse.de>
10610         PR tree-optimization/81082
10611         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
10612         association if it requires casting to unsigned.
10613         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
10614         from fold_plusminus_mult_expr to catch important cases late when
10615         range info is available.
10617 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10619         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
10620         * configure.ac (hidden_linkonce): New test.
10621         * configure: Regenerate.
10622         * config.in: Regenerate.
10624 2018-01-26  Julia Koval  <julia.koval@intel.com>
10626         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
10627         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
10628         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
10629         _mm_mask_bitshuffle_epi64_mask): Fix type.
10630         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
10631         USI_FTYPE_V4DI_V4DI_USI): Remove.
10632         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
10633         __builtin_ia32_vpshufbitqmb256_mask,
10634         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
10635         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
10636         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
10638 2018-01-26  Alan Modra  <amodra@gmail.com>
10640         PR target/84033
10641         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
10642         UNSPEC_VBPERMQ.  Sort other unspecs.
10644 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
10646         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
10648 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
10650         PR middle-end/83055
10651         * predict.c (drop_profile): Do not push/pop cfun; update also
10652         node->count.
10653         (handle_missing_profiles): Fix logic looking for zero profiles.
10655 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
10657         PR middle-end/83977
10658         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
10659         on functions with #pragma omp declare simd or functions with simd
10660         attribute.
10661         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
10662         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
10663         Remove trailing \n from warning_at calls.
10665 2018-01-25  Tom de Vries  <tom@codesourcery.com>
10667         PR target/84028
10668         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
10669         for neutered workers.
10671 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
10673         PR target/68467
10674         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
10675         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
10677 2018-01-24  Jeff Law  <law@redhat.com>
10679         PR target/83994
10680         * i386.c (get_probe_interval): Move to earlier point.
10681         (ix86_compute_frame_layout): If -fstack-clash-protection and
10682         the frame is larger than the probe interval, then use pushes
10683         to save registers rather than reg->mem moves.
10684         (ix86_expand_prologue): Remove conditional for int_registers_saved
10685         assertion.
10687 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
10689         PR target/84014
10690         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
10691         min/max for never referenced object.
10693 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
10695         PR middle-end/83977
10696         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
10697         here.
10698         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
10699         attributes from DECL_ATTRIBUTES (decl) without affecting
10700         DECL_ATTRIBUTES (current_function_decl).
10701         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
10702         functions with non-NULL DECL_ABSTRACT_ORIGIN.
10704 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
10706         PR tree-optimization/83979
10707         * fold-const.c (fold_comparison): Use constant_boolean_node
10708         instead of boolean_{true,false}_node.
10710 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
10712         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
10713         with zero counts.
10715 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
10717         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
10718         Simplify the clause that sets the length attribute.
10719         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
10720         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
10721         clause that sets the length attribute.
10722         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
10724 2018-01-24  Tom de Vries  <tom@codesourcery.com>
10726         PR target/83589
10727         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
10728         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
10729         Add strict parameter.
10730         (prevent_branch_around_nothing): Insert dummy insn between branch to
10731         label and label with no ptx insn inbetween.
10732         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
10734 2018-01-24  Tom de Vries  <tom@codesourcery.com>
10736         PR target/81352
10737         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
10738         for neutered threads in warp.
10739         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
10741 2018-01-24  Richard Biener  <rguenther@suse.de>
10743         PR tree-optimization/83176
10744         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
10745         operands.
10747 2018-01-24  Richard Biener  <rguenther@suse.de>
10749         PR tree-optimization/82819
10750         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
10751         code generating pluses that are no-ops in the target precision.
10753 2018-01-24  Richard Biener  <rguenther@suse.de>
10755         PR middle-end/84000
10756         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
10758 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
10760         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
10761         to merge probabilities.
10762         * predict.c (probably_never_executed): Also mark as cold functions
10763         with global 0 profile and guessed local profile.
10764         * profile-count.c (profile_probability::combine_with_count): New
10765         member function.
10766         * profile-count.h (profile_probability::operator*,
10767         profile_probability::operator*=, profile_probability::operator/,
10768         profile_probability::operator/=): Reduce precision to adjusted
10769         and set value to guessed on contradictory divisions.
10770         (profile_probability::combine_with_freq): Remove.
10771         (profile_probability::combine_wiht_count): Declare.
10772         (profile_count::force_nonzero):: Set to adjusted.
10773         (profile_count::probability_in):: Set quality to adjusted.
10774         * tree-ssa-tail-merge.c (replace_block_by): Use
10775         combine_with_count.
10777 2018-01-23  Andrew Waterman  <andrew@sifive.com>
10778             Jim Wilson  <jimw@sifive.com>
10780         * config/riscv/riscv.c (riscv_stack_boundary): New.
10781         (riscv_option_override): Set riscv_stack_boundary.  Handle
10782         riscv_preferred_stack_boundary_arg.
10783         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
10784         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
10785         (STACK_BOUNDARY): Set to riscv_stack_boundary.
10786         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
10787         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
10788         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
10790 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
10792         PR target/83905
10793         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
10794         of struct ix86_frame.
10795         (ix86_expand_epilogue): Likewise.  Add a local variable for
10796         the reg_save_offset field in struct ix86_frame.
10798 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
10800         PR tree-optimization/82604
10801         * tree-loop-distribution.c (enum partition_kind): New enum item
10802         PKIND_PARTIAL_MEMSET.
10803         (partition_builtin_p): Support above new enum item.
10804         (generate_code_for_partition): Ditto.
10805         (compute_access_range): Differentiate cases that equality can be
10806         proven at all loops, the innermost loops or no loops.
10807         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
10808         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
10809         (finalize_partitions, distribute_loop): Don't fuse partition of
10810         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
10811         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
10812         parloop is enabled.
10814 2018-01-23  Martin Liska  <mliska@suse.cz>
10816         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
10817         order to ignore the predictor.
10818         (PRED_POLYMORPHIC_CALL): Likewise.
10819         (PRED_RECURSIVE_CALL): Likewise.
10821 2018-01-23  Martin Liska  <mliska@suse.cz>
10823         * tree-profile.c (tree_profiling): Print function header to
10824         aware reader which function we are working on.
10825         * value-prof.c (gimple_find_values_to_profile): Do not print
10826         not interesting value histograms.
10828 2018-01-23  Martin Liska  <mliska@suse.cz>
10830         * profile-count.h (enum profile_quality): Add
10831         profile_uninitialized as the first value. Do not number values
10832         as they are zero based.
10833         (profile_count::verify): Update sanity check.
10834         (profile_probability::verify): Likewise.
10836 2018-01-23  Nathan Sidwell  <nathan@acm.org>
10838         * doc/invoke.texi (ffor-scope): Deprecate.
10840 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
10842         PR tree-optimization/83510
10843         * domwalk.c (set_all_edges_as_executable): New function.
10844         (dom_walker::dom_walker): Convert bool param
10845         "skip_unreachable_blocks" to enum reachability.  Move setup of
10846         edge flags to set_all_edges_as_executable and only do it when
10847         reachability is REACHABLE_BLOCKS.
10848         * domwalk.h (enum dom_walker::reachability): New enum.
10849         (dom_walker::dom_walker): Convert bool param
10850         "skip_unreachable_blocks" to enum reachability.
10851         (set_all_edges_as_executable): New decl.
10852         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
10853         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
10854         "reachability".
10855         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
10856         but converting true to REACHABLE_BLOCKS.
10857         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
10858         * tree-vrp.c
10859         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
10860         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
10861         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
10862         REACHABLE_BLOCKS.
10863         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
10864         if check_all_array_refs will be called.
10866 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
10868         * tree.c (selftest::test_location_wrappers): Add more test
10869         coverage.
10871 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
10873         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
10874         (selftest::test_bit_in_range): Likewise.
10876 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
10878         PR testsuite/83888
10879         * doc/sourcebuild.texi (vect_float): Say that the selector
10880         only describes the situation when -funsafe-math-optimizations is on.
10881         (vect_float_strict): Document.
10883 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
10885         PR tree-optimization/83965
10886         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
10887         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
10888         instead of checking only for a reduction.
10889         (vect_recog_widen_sum_pattern): Likewise.
10891 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
10893         * predict.c (probably_never_executed): Only use precise profile info.
10894         (compute_function_frequency): Skip after inlining hack since we now
10895         have quality checking.
10897 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
10899         * profile-count.h (profile_probability::very_unlikely,
10900         profile_probability::unlikely, profile_probability::even): Set
10901         precision to guessed.
10903 2018-01-23  Richard Biener  <rguenther@suse.de>
10905         PR tree-optimization/83963
10906         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
10907         Properly terminate dominator walk when crossing the exit edge not
10908         when visiting its source block.
10910 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
10912         PR c++/83918
10913         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
10914         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
10916 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
10918         PR tree-optimization/83957
10919         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
10920         semicolon after for body surrounded by braces.
10922         PR tree-optimization/83081
10923         * profile-count.h (profile_probability::split): New method.
10924         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
10925         Use profile_probability::split.
10926         (do_compare_rtx_and_jump): Fix adjustment of probabilities
10927         when splitting a single conditional jump into 2.
10929 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
10931         PR tree-optimization/69452
10932         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
10933         decl.
10935 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
10937         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
10938         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
10939         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
10941 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
10943         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
10944         declaration.
10945         * config/rl78/rl78.md (movdi): New define_expand.
10946         * config/rl78/rl78.c (rl78_split_movdi): New function.
10948 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
10950         PR target/83862
10951         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
10952         no longer used.
10953         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
10954         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
10955         128-bit to produce an UNSPEC move to get the double word with the
10956         signbit and then a shift directly to do signbit.
10957         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
10958         implementation with a new version that just does either a direct
10959         move or a regular move.  Move memory interface to separate insns.
10960         Move insns so they are next to the expander.
10961         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
10962         with signbit move.  Split big and little endian case.
10963         (signbit<mode>2_dm_mem_le): Likewise.
10964         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
10965         (signbit<mode>2_dm2): Likewise.
10967 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
10969         * config/rl78/rl78.md (anddi3): New define_expand.
10971 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
10973         * config/rl78/rl78.md (umindi3): New define_expand.
10975 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
10977         * config/rl78/rl78.md (smindi3): New define_expand.
10979 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
10981         * config/rl78/rl78.md (smaxdi3): New define_expand.
10983 2018-01-22  Carl Love  <cel@us.ibm.com>
10985         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
10986         LVX_V1TI): Add macro expansion.
10987         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
10988         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
10989         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
10990         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
10991         Change check to determine if the instruction is a byte reversing
10992         entry.  Fix typo in comment.
10993         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
10994         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
10995         Add def_builtin calls for new builtins.
10996         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
10997         Add define_insn expansion.
10999 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
11001         * config/rl78/rl78.md (umaxdi3): New define_expand.
11003 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
11005         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
11006         for non-QImode registers.
11008 2018-01-22  Richard Biener  <rguenther@suse.de>
11010         PR tree-optimization/83963
11011         * graphite-scop-detection.c (scop_detection::get_sese): Delay
11012         including the loop exit block.
11013         (scop_detection::merge_sese): Likewise.
11014         (scop_detection::add_scop): Do it here instead.
11016 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11018         * doc/sourcebuild.texi (arm_softfloat): Document.
11020 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
11022         PR gcc/77734
11023         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
11024         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
11025         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
11027 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
11028             David Edelsohn  <dje.gcc@gmail.com>
11030         PR target/83946
11031         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
11032         Change "crset eq" to "crset 2".
11033         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
11034         (*call_indirect_aix<mode>_nospec): Likewise.
11035         (*call_value_indirect_aix<mode>_nospec): Likewise.
11036         (*call_indirect_elfv2<mode>_nospec): Likewise.
11037         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
11038         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
11039         change assembly output from . to $.
11040         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
11041         (indirect_jump<mode>_nospec): Change assembly output from . to $.
11042         (*tablejump<mode>_internal1_nospec): Likewise.
11044 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
11046         PR target/80870
11047         * config/sh/sh_optimize_sett_clrt.cc:
11048         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
11050 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
11052         PR tree-optimization/83940
11053         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
11054         offset_dt to vect_constant_def rather than vect_unknown_def_type.
11055         (vect_check_load_store_mask): Add a mask_dt_out parameter and
11056         use it to pass back the definition type.
11057         (vect_check_store_rhs): Likewise rhs_dt_out.
11058         (vect_build_gather_load_calls): Add a mask_dt argument and use
11059         it instead of a call to vect_is_simple_use.
11060         (vectorizable_store): Update calls to vect_check_load_store_mask
11061         and vect_check_store_rhs.  Use the dt returned by the latter instead
11062         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
11063         instead of calls to vect_is_simple_use.  Pass the scalar rather
11064         than the vector operand to vect_is_simple_use when handling
11065         second and subsequent copies of an rhs value.
11066         (vectorizable_load): Update calls to vect_check_load_store_mask
11067         and vect_build_gather_load_calls.  Use the cached mask_dt and
11068         gs_info.offset_dt instead of calls to vect_is_simple_use.
11070 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
11072         PR middle-end/83945
11073         * tree-emutls.c: Include gimplify.h.
11074         (lower_emutls_2): New function.
11075         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
11076         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
11077         it before further processing.
11079         PR target/83930
11080         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
11081         UINTVAL (trueop1) instead of INTVAL (op1).
11083 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
11085         PR debug/81570
11086         PR debug/83728
11087         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
11088         INCOMING_FRAME_SP_OFFSET if not defined.
11089         (scan_trace): Add ENTRY argument.  If true and
11090         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
11091         emit a note to adjust the CFA offset.
11092         (create_cfi_notes): Adjust scan_trace callers.
11093         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
11094         INCOMING_FRAME_SP_OFFSET in the CIE.
11095         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
11096         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
11097         Likewise.
11098         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
11099         * doc/tm.texi: Regenerated.
11101 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11103         PR rtl-optimization/83147
11104         * lra-constraints.c (remove_inheritance_pseudos): Use
11105         lra_substitute_pseudo_within_insn.
11107 2018-01-19  Tom de Vries  <tom@codesourcery.com>
11108             Cesar Philippidis  <cesar@codesourcery.com>
11110         PR target/83920
11111         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
11113 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
11115         PR target/83790
11116         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
11117         spaces for function labels.
11119 2018-01-19  Martin Liska  <mliska@suse.cz>
11121         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
11122         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
11123         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
11124         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
11125         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
11126         (PRED_CONST_RETURN): Change from 69 to 65.
11127         (PRED_NULL_RETURN): Change from 91 to 71.
11128         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
11129         (PRED_LOOP_GUARD): Change from 66 to 73.
11131 2018-01-19  Martin Liska  <mliska@suse.cz>
11133         * predict.c (predict_insn_def): Add new assert.
11134         (struct branch_predictor): Change type to signed integer.
11135         (test_prediction_value_range): Amend test to cover
11136         PROB_UNINITIALIZED.
11137         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
11138         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
11139         (PRED_LOOP_ITERATIONS_MAX): Likewise.
11140         (PRED_LOOP_IV_COMPARE): Likewise.
11141         * predict.h (PROB_UNINITIALIZED): Define new constant.
11143 2018-01-19  Martin Liska  <mliska@suse.cz>
11145         * predict.c (dump_prediction): Add new format for
11146         analyze_brprob.py script which is enabled with -details
11147         suboption.
11148         * profile-count.h (precise_p): New function.
11150 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
11152         PR tree-optimization/83922
11153         * tree-vect-loop.c (vect_verify_full_masking): Return false if
11154         there are no statements that need masking.
11155         (vect_active_double_reduction_p): New function.
11156         (vect_analyze_loop_operations): Use it when handling phis that
11157         are not in the loop header.
11159 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
11161         PR tree-optimization/83914
11162         * tree-vect-loop.c (vectorizable_induction): Don't convert
11163         init_expr or apply the peeling adjustment for inductions
11164         that are nested within the vectorized loop.
11166 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11168         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
11169         instead of NEG.
11171 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
11173         PR sanitizer/81715
11174         PR testsuite/83882
11175         * function.h (gimplify_parameters): Add gimple_seq * argument.
11176         * function.c: Include gimple.h and options.h.
11177         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
11178         for the added local temporaries if needed.
11179         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
11180         if there are any parameter cleanups, wrap whole body into a
11181         try/finally with the cleanups.
11183 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
11185         PR target/82964
11186         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
11187         Use GET_MODE_CLASS for scalar floating point.
11189 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
11191         PR ipa/82256
11192         patch by PaX Team
11193         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
11194         Fix call of call_cgraph_insertion_hooks.
11196 2018-01-18  Martin Sebor  <msebor@redhat.com>
11198         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
11200 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
11202         PR ipa/83619
11203         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
11204         frequencies.
11206 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
11208         PR other/70268
11209         * common.opt: (-ffile-prefix-map): New option.
11210         * opts.c (common_handle_option): Defer it.
11211         * opts-global.c (handle_common_deferred_options): Handle it.
11212         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
11213         * file-prefix-map.h: New file.
11214         (remap_debug_filename, add_debug_prefix_map): ...here.
11215         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
11216         * final.c (debug_prefix_map, add_debug_prefix_map
11217         remap_debug_filename): Move to...
11218         * file-prefix-map.c: New file.
11219         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
11220         generalize, get rid of alloca(), use strrchr() instead of strchr().
11221         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
11222         Implement in terms of add_prefix_map().
11223         (remap_macro_filename, remap_debug_filename): Implement in term of
11224         remap_filename().
11225         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
11226         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
11227         * dbxout.c: Include file-prefix-map.h.
11228         * varasm.c: Likewise.
11229         * vmsdbgout.c: Likewise.
11230         * xcoffout.c: Likewise.
11231         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
11232         * doc/cppopts.texi (-fmacro-prefix-map): Document.
11233         * doc/invoke.texi (-ffile-prefix-map): Document.
11234         (-fdebug-prefix-map): Update description.
11236 2018-01-18  Martin Liska  <mliska@suse.cz>
11238         * config/i386/i386.c (indirect_thunk_name): Document that also
11239         lfence is emitted.
11240         (output_indirect_thunk): Document why both instructions
11241         (pause and lfence) are generated.
11243 2018-01-18  Richard Biener  <rguenther@suse.de>
11245         PR tree-optimization/83887
11246         * graphite-scop-detection.c
11247         (scop_detection::get_nearest_dom_with_single_entry): Remove.
11248         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
11249         (scop_detection::merge_sese): Re-implement with a flood-fill
11250         algorithm that properly finds a SESE region if it exists.
11252 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
11254         PR c/61240
11255         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
11256         pointer_diff optimizations use view_convert instead of convert.
11258 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
11260         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
11261         Generate different code for -mno-speculate-indirect-jumps.
11262         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
11263         (*call_indirect_aix<mode>): Disable for
11264         -mno-speculate-indirect-jumps.
11265         (*call_indirect_aix<mode>_nospec): New define_insn.
11266         (*call_value_indirect_aix<mode>): Disable for
11267         -mno-speculate-indirect-jumps.
11268         (*call_value_indirect_aix<mode>_nospec): New define_insn.
11269         (*sibcall_nonlocal_sysv<mode>): Generate different code for
11270         -mno-speculate-indirect-jumps.
11271         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
11273 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
11275         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
11276         long double type, set the flags for noting the default long double
11277         type, even if we don't pass or return a long double type.
11279 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
11281         PR ipa/83051
11282         * ipa-inline.c (flatten_function): Do not overwrite final inlining
11283         failure.
11285 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
11287         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
11288         support for merge[hl].
11289         (fold_mergehl_helper): New helper function.
11290         (tree-vector-builder.h): New #include for tree_vector_builder usage.
11291         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
11292         (altivec_vmrglw_direct): Add xxmrglw insn.
11294 2018-01-17  Andrew Waterman  <andrew@sifive.com>
11296         * config/riscv/riscv.c (riscv_conditional_register_usage): If
11297         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
11299 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
11301         PR lto/83121
11302         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
11303         call the lto_location_cache before reading the
11304         DECL_SOURCE_LOCATION of the types.
11306 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
11307             Richard Sandiford  <richard.sandiford@linaro.org>
11309         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
11310         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
11311         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
11312         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
11313         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
11314         Add declaration.
11315         * config/aarch64/constraints.md (aarch64_movti_operand):
11316         Limit immediates.
11317         * config/aarch64/predicates.md (Uti): Add new constraint.
11319 2018-01-17 Carl Love  <cel@us.ibm.com>
11321         * config/rs6000/vsx.md (define_expand xl_len_r,
11322         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
11323         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
11324         lxvll.
11325         (define_expand, define_insn): Move the shift left from  the
11326         define_insn to the define_expand for lxvl and stxvl instructions.
11327         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
11328         and XL_LEN_R definitions to PURE.
11330 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
11332         * config/i386/i386.c (indirect_thunk_name): Declare regno
11333         as unsigned int.  Compare regno with INVALID_REGNUM.
11334         (output_indirect_thunk): Ditto.
11335         (output_indirect_thunk_function): Ditto.
11336         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
11337         in the call to output_indirect_thunk_function.
11339 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
11341         PR middle-end/83884
11342         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
11343         rather than the size of inner_type to determine the stack slot size
11344         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
11346 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
11348         PR target/83546
11349         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
11350         to PTA_SILVERMONT.
11352 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
11354         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
11355         endian Linux systems to optionally enable multilibs for selecting
11356         the long double type if the user configured an explicit type.
11357         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
11358         have no long double multilibs if not defined.
11359         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
11360         warn if the user used -mabi={ieee,ibm}longdouble and we built
11361         multilibs for long double.
11362         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
11363         appropriate multilib option.
11364         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
11365         multilib options.
11366         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
11367         for building long double multilibs.
11368         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
11370 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
11372         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
11373         copies.
11375         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
11376         64 bits.
11377         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
11378         128 bits.
11380         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
11381         variables.
11383         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
11384         return value.
11386 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
11388         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
11389         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
11391 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11393         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
11394         different rtl trees depending on TARGET_64BIT.
11395         (rs6000_gen_lvx): Likewise.
11397 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
11399         * config/visium/visium.md (nop): Tweak comment.
11400         (hazard_nop): Likewise.
11402 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
11404         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
11405         -mspeculate-indirect-jumps.
11406         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
11407         for -mno-speculate-indirect-jumps.
11408         (*call_indirect_elfv2<mode>_nospec): New define_insn.
11409         (*call_value_indirect_elfv2<mode>): Disable for
11410         -mno-speculate-indirect-jumps.
11411         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
11412         (indirect_jump): Emit different RTL for
11413         -mno-speculate-indirect-jumps.
11414         (*indirect_jump<mode>): Disable for
11415         -mno-speculate-indirect-jumps.
11416         (*indirect_jump<mode>_nospec): New define_insn.
11417         (tablejump): Emit different RTL for
11418         -mno-speculate-indirect-jumps.
11419         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
11420         (tablejumpsi_nospec): New define_expand.
11421         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
11422         (tablejumpdi_nospec): New define_expand.
11423         (*tablejump<mode>_internal1): Disable for
11424         -mno-speculate-indirect-jumps.
11425         (*tablejump<mode>_internal1_nospec): New define_insn.
11426         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
11427         option.
11429 2018-01-16  Artyom Skrobov tyomitch@gmail.com
11431         * caller-save.c (insert_save): Drop unnecessary parameter.  All
11432         callers updated.
11434 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
11435             Richard Biener  <rguenth@suse.de>
11437         PR libgomp/83590
11438         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
11439         return early, inline manually is_gimple_sizepos.  Make sure if we
11440         call gimplify_expr we don't end up with a gimple constant.
11441         * tree.c (variably_modified_type_p): Don't return true for
11442         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
11443         * gimplify.h (is_gimple_sizepos): Remove.
11445 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
11447         PR tree-optimization/83857
11448         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
11449         vectorizable_live_operation for pure SLP statements.
11450         (vectorizable_live_operation): Handle PHIs.
11452 2018-01-16  Richard Biener  <rguenther@suse.de>
11454         PR tree-optimization/83867
11455         * tree-vect-stmts.c (vect_transform_stmt): Precompute
11456         nested_in_vect_loop_p since the scalar stmt may get invalidated.
11458 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
11460         PR c/83844
11461         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
11462         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
11463         If off is not INTEGER_CST, issue a may not be aligned warning
11464         rather than isn't aligned.  Use isn%'t rather than isn't.
11465         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
11466         into MULT_EXPR.
11467         <case MULT_EXPR>: Improve the case when bottom and one of the
11468         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
11469         operand, in that case check if the other operand is multiple of
11470         bottom divided by the INTEGER_CST operand.
11472 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
11474         PR target/83858
11475         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
11476         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
11477         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
11478         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
11479         * config/pa/pa.c (pa_function_arg_advance): Likewise.
11480         (pa_function_arg, pa_arg_partial_bytes): Likewise.
11481         (pa_function_arg_size): New function.
11483 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
11485         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
11486         in a separate statement.
11488 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
11490         PR tree-optimization/83847
11491         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
11492         group gathers and scatters.
11494 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
11496         PR rtl-optimization/86620
11497         * params.def (max-sched-ready-insns): Bump minimum value to 1.
11499         PR rtl-optimization/83213
11500         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
11501         to last if both are JUMP_INSNs.
11503         PR tree-optimization/83843
11504         * gimple-ssa-store-merging.c
11505         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
11506         store_immediate_info for bswap/nop orig_stores.
11508 2018-01-15  Andrew Waterman  <andrew@sifive.com>
11510         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
11511         !TARGET_MUL.
11512         <UDIV>: Increase cost if !TARGET_DIV.
11514 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
11516         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
11517         (define_attr "cr_logical_3op"): New.
11518         (cceq_ior_compare): Adjust.
11519         (cceq_ior_compare_complement): Adjust.
11520         (*cceq_rev_compare): Adjust.
11521         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
11522         (is_cracked_insn): Adjust.
11523         (insn_must_be_first_in_group): Adjust.
11524         * config/rs6000/40x.md: Adjust.
11525         * config/rs6000/440.md: Adjust.
11526         * config/rs6000/476.md: Adjust.
11527         * config/rs6000/601.md: Adjust.
11528         * config/rs6000/603.md: Adjust.
11529         * config/rs6000/6xx.md: Adjust.
11530         * config/rs6000/7450.md: Adjust.
11531         * config/rs6000/7xx.md: Adjust.
11532         * config/rs6000/8540.md: Adjust.
11533         * config/rs6000/cell.md: Adjust.
11534         * config/rs6000/e300c2c3.md: Adjust.
11535         * config/rs6000/e500mc.md: Adjust.
11536         * config/rs6000/e500mc64.md: Adjust.
11537         * config/rs6000/e5500.md: Adjust.
11538         * config/rs6000/e6500.md: Adjust.
11539         * config/rs6000/mpc.md: Adjust.
11540         * config/rs6000/power4.md: Adjust.
11541         * config/rs6000/power5.md: Adjust.
11542         * config/rs6000/power6.md: Adjust.
11543         * config/rs6000/power7.md: Adjust.
11544         * config/rs6000/power8.md: Adjust.
11545         * config/rs6000/power9.md: Adjust.
11546         * config/rs6000/rs64.md: Adjust.
11547         * config/rs6000/titan.md: Adjust.
11549 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
11551         * config/i386/predicates.md (indirect_branch_operand): Rewrite
11552         ix86_indirect_branch_register logic.
11554 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
11556         * config/i386/constraints.md (Bs): Update
11557         ix86_indirect_branch_register check.  Don't check
11558         ix86_indirect_branch_register with GOT_memory_operand.
11559         (Bw): Likewise.
11560         * config/i386/predicates.md (GOT_memory_operand): Don't check
11561         ix86_indirect_branch_register here.
11562         (GOT32_symbol_operand): Likewise.
11564 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
11566         * config/i386/predicates.md (constant_call_address_operand):
11567         Rewrite ix86_indirect_branch_register logic.
11568         (sibcall_insn_operand): Likewise.
11570 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
11572         * config/i386/constraints.md (Bs): Replace
11573         ix86_indirect_branch_thunk_register with
11574         ix86_indirect_branch_register.
11575         (Bw): Likewise.
11576         * config/i386/i386.md (indirect_jump): Likewise.
11577         (tablejump): Likewise.
11578         (*sibcall_memory): Likewise.
11579         (*sibcall_value_memory): Likewise.
11580         Peepholes of indirect call and jump via memory: Likewise.
11581         * config/i386/i386.opt: Likewise.
11582         * config/i386/predicates.md (indirect_branch_operand): Likewise.
11583         (GOT_memory_operand): Likewise.
11584         (call_insn_operand): Likewise.
11585         (sibcall_insn_operand): Likewise.
11586         (GOT32_symbol_operand): Likewise.
11588 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
11590         PR middle-end/83837
11591         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
11592         type rather than type addr's type points to.
11593         (expand_omp_atomic_mutex): Likewise.
11594         (expand_omp_atomic): Likewise.
11596 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
11598         PR target/83839
11599         * config/i386/i386.c (output_indirect_thunk_function): Use
11600         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
11601         for  __x86_return_thunk.
11603 2018-01-15  Richard Biener  <rguenther@suse.de>
11605         PR middle-end/83850
11606         * expmed.c (extract_bit_field_1): Fix typo.
11608 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11610         PR target/83687
11611         * config/arm/iterators.md (VF): New mode iterator.
11612         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
11613         Remove integer-related logic from pattern.
11614         (neon_vabd<mode>_3): Likewise.
11616 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
11618         PR middle-end/82694
11619         * common.opt (fstrict-overflow): No longer an alias.
11620         (fwrapv-pointer): New option.
11621         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
11622         also for pointer types based on flag_wrapv_pointer.
11623         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
11624         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
11625         opts->x_flag_wrapv got set.
11626         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
11627         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
11628         POINTER_TYPE_OVERFLOW_UNDEFINED.
11629         * match.pd: Likewise in address comparison pattern.
11630         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
11632 2018-01-15  Richard Biener  <rguenther@suse.de>
11634         PR lto/83804
11635         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
11636         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
11637         Reset type names to their identifier if their TYPE_DECL doesn't
11638         have linkage (and thus is used for ODR and devirt).
11639         (save_debug_info_for_decl): Remove.
11640         (save_debug_info_for_type): Likewise.
11641         (add_tree_to_fld_list): Adjust.
11642         * tree-pretty-print.c (dump_generic_node): Make dumping of
11643         type names more robust.
11645 2018-01-15  Richard Biener  <rguenther@suse.de>
11647         * BASE-VER: Bump to 8.0.1.
11649 2018-01-14  Martin Sebor  <msebor@redhat.com>
11651         PR other/83508
11652         * builtins.c (check_access): Avoid warning when the no-warning bit
11653         is set.
11655 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
11657         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
11658         * ira-color (allocno_hard_regs_compare): Likewise.
11660 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
11662         PR target/83013
11663         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
11664         Use .pushsection/.popsection.
11666 2018-01-14  Martin Sebor  <msebor@redhat.com>
11668         PR c++/81327
11669         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
11671 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
11673         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
11674         entry from extra_headers.
11675         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
11676         extra_headers, make the list bitwise identical to the i?86-*-* one.
11678 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
11680         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
11681         -mcmodel=large with -mindirect-branch=thunk,
11682         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
11683         -mfunction-return=thunk-extern.
11684         * doc/invoke.texi: Document -mcmodel=large is incompatible with
11685         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
11686         -mfunction-return=thunk and -mfunction-return=thunk-extern.
11688 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
11690         * config/i386/i386.c (print_reg): Print the name of the full
11691         integer register without '%'.
11692         (ix86_print_operand): Handle 'V'.
11693         * doc/extend.texi: Document 'V' modifier.
11695 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
11697         * config/i386/constraints.md (Bs): Disallow memory operand for
11698         -mindirect-branch-register.
11699         (Bw): Likewise.
11700         * config/i386/predicates.md (indirect_branch_operand): Likewise.
11701         (GOT_memory_operand): Likewise.
11702         (call_insn_operand): Likewise.
11703         (sibcall_insn_operand): Likewise.
11704         (GOT32_symbol_operand): Likewise.
11705         * config/i386/i386.md (indirect_jump): Call convert_memory_address
11706         for -mindirect-branch-register.
11707         (tablejump): Likewise.
11708         (*sibcall_memory): Likewise.
11709         (*sibcall_value_memory): Likewise.
11710         Disallow peepholes of indirect call and jump via memory for
11711         -mindirect-branch-register.
11712         (*call_pop): Replace m with Bw.
11713         (*call_value_pop): Likewise.
11714         (*sibcall_pop_memory): Replace m with Bs.
11715         * config/i386/i386.opt (mindirect-branch-register): New option.
11716         * doc/invoke.texi: Document -mindirect-branch-register option.
11718 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
11720         * config/i386/i386-protos.h (ix86_output_function_return): New.
11721         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
11722         set function_return_type.
11723         (indirect_thunk_name): Add ret_p to indicate thunk for function
11724         return.
11725         (output_indirect_thunk_function): Pass false to
11726         indirect_thunk_name.
11727         (ix86_output_indirect_branch_via_reg): Likewise.
11728         (ix86_output_indirect_branch_via_push): Likewise.
11729         (output_indirect_thunk_function): Create alias for function
11730         return thunk if regno < 0.
11731         (ix86_output_function_return): New function.
11732         (ix86_handle_fndecl_attribute): Handle function_return.
11733         (ix86_attribute_table): Add function_return.
11734         * config/i386/i386.h (machine_function): Add
11735         function_return_type.
11736         * config/i386/i386.md (simple_return_internal): Use
11737         ix86_output_function_return.
11738         (simple_return_internal_long): Likewise.
11739         * config/i386/i386.opt (mfunction-return=): New option.
11740         (indirect_branch): Mention -mfunction-return=.
11741         * doc/extend.texi: Document function_return function attribute.
11742         * doc/invoke.texi: Document -mfunction-return= option.
11744 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
11746         * config/i386/i386-opts.h (indirect_branch): New.
11747         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
11748         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
11749         with local indirect jump when converting indirect call and jump.
11750         (ix86_set_indirect_branch_type): New.
11751         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
11752         (indirectlabelno): New.
11753         (indirect_thunk_needed): Likewise.
11754         (indirect_thunk_bnd_needed): Likewise.
11755         (indirect_thunks_used): Likewise.
11756         (indirect_thunks_bnd_used): Likewise.
11757         (INDIRECT_LABEL): Likewise.
11758         (indirect_thunk_name): Likewise.
11759         (output_indirect_thunk): Likewise.
11760         (output_indirect_thunk_function): Likewise.
11761         (ix86_output_indirect_branch_via_reg): Likewise.
11762         (ix86_output_indirect_branch_via_push): Likewise.
11763         (ix86_output_indirect_branch): Likewise.
11764         (ix86_output_indirect_jmp): Likewise.
11765         (ix86_code_end): Call output_indirect_thunk_function if needed.
11766         (ix86_output_call_insn): Call ix86_output_indirect_branch if
11767         needed.
11768         (ix86_handle_fndecl_attribute): Handle indirect_branch.
11769         (ix86_attribute_table): Add indirect_branch.
11770         * config/i386/i386.h (machine_function): Add indirect_branch_type
11771         and has_local_indirect_jump.
11772         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
11773         to true.
11774         (tablejump): Likewise.
11775         (*indirect_jump): Use ix86_output_indirect_jmp.
11776         (*tablejump_1): Likewise.
11777         (simple_return_indirect_internal): Likewise.
11778         * config/i386/i386.opt (mindirect-branch=): New option.
11779         (indirect_branch): New.
11780         (keep): Likewise.
11781         (thunk): Likewise.
11782         (thunk-inline): Likewise.
11783         (thunk-extern): Likewise.
11784         * doc/extend.texi: Document indirect_branch function attribute.
11785         * doc/invoke.texi: Document -mindirect-branch= option.
11787 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
11789         PR ipa/83051
11790         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
11792 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
11794         * ipa-inline.c (want_inline_small_function_p): Return false if
11795         inlining has already failed with CIF_FINAL_ERROR.
11796         (update_caller_keys): Call want_inline_small_function_p before
11797         can_inline_edge_p.
11798         (update_callee_keys): Likewise.
11800 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11802         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
11803         New function.
11804         (rs6000_quadword_masked_address_p): Likewise.
11805         (quad_aligned_load_p): Likewise.
11806         (quad_aligned_store_p): Likewise.
11807         (const_load_sequence_p): Add comment to describe the outer-most loop.
11808         (mimic_memory_attributes_and_flags): New function.
11809         (rs6000_gen_stvx): Likewise.
11810         (replace_swapped_aligned_store): Likewise.
11811         (rs6000_gen_lvx): Likewise.
11812         (replace_swapped_aligned_load): Likewise.
11813         (replace_swapped_load_constant): Capitalize argument name in
11814         comment describing this function.
11815         (rs6000_analyze_swaps): Add a third pass to search for vector loads
11816         and stores that access quad-word aligned addresses and replace
11817         with stvx or lvx instructions when appropriate.
11818         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
11819         New function prototype.
11820         (rs6000_quadword_masked_address_p): Likewise.
11821         (rs6000_gen_lvx): Likewise.
11822         (rs6000_gen_stvx): Likewise.
11823         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
11824         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
11825         when memory address is aligned.
11826         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
11827         this split to select lvx instruction when memory address is aligned.
11828         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
11829         instruction when memory address is aligned.
11830         (*vsx_le_perm_load_v16qi): Likewise.
11831         (four unnamed splitters): Modify to select the stvx instruction
11832         when memory is aligned.
11834 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
11836         * predict.c (determine_unlikely_bbs): Handle correctly BBs
11837         which appears in the queue multiple times.
11839 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11840             Alan Hayward  <alan.hayward@arm.com>
11841             David Sherwood  <david.sherwood@arm.com>
11843         * tree-vectorizer.h (vec_lower_bound): New structure.
11844         (_loop_vec_info): Add check_nonzero and lower_bounds.
11845         (LOOP_VINFO_CHECK_NONZERO): New macro.
11846         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
11847         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
11848         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
11849         fields.  Make seg_len the distance travelled, not including the
11850         access size.
11851         (dr_direction_indicator): Declare.
11852         (dr_zero_step_indicator): Likewise.
11853         (dr_known_forward_stride_p): Likewise.
11854         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
11855         tree-ssanames.h.
11856         (runtime_alias_check_p): Allow runtime alias checks with
11857         variable strides.
11858         (operator ==): Compare access_size and align.
11859         (prune_runtime_alias_test_list): Rework for new distinction between
11860         the access_size and seg_len.
11861         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
11862         segment lengths.
11863         (get_segment_min_max): New function.
11864         (create_intersect_range_checks): Use it.
11865         (dr_step_indicator): New function.
11866         (dr_direction_indicator): Likewise.
11867         (dr_zero_step_indicator): Likewise.
11868         (dr_known_forward_stride_p): Likewise.
11869         * tree-loop-distribution.c (data_ref_segment_size): Return
11870         DR_STEP * (niters - 1).
11871         (compute_alias_check_pairs): Update call to the dr_with_seg_len
11872         constructor.
11873         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
11874         (vect_preserves_scalar_order_p): New function, split out from...
11875         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
11876         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
11877         (vect_vfa_access_size): New function.
11878         (vect_vfa_align): Likewise.
11879         (vect_compile_time_alias): Take access_size_a and access_b arguments.
11880         (dump_lower_bound): New function.
11881         (vect_check_lower_bound): Likewise.
11882         (vect_small_gap_p): Likewise.
11883         (vectorizable_with_step_bound_p): Likewise.
11884         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
11885         depencies if the vectorization factor is 1.  Convert the checks
11886         for nonzero steps into checks on the bounds of DR_STEP.  Try using
11887         a bunds check for variable steps if the minimum required step is
11888         relatively small. Update calls to the dr_with_seg_len
11889         constructor and to vect_compile_time_alias.
11890         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
11891         function.
11892         (vect_loop_versioning): Call it.
11893         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
11894         when retrying.
11895         (vect_estimate_min_profitable_iters): Account for any bounds checks.
11897 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11898             Alan Hayward  <alan.hayward@arm.com>
11899             David Sherwood  <david.sherwood@arm.com>
11901         * doc/sourcebuild.texi (vect_scatter_store): Document.
11902         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
11903         optabs.
11904         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
11905         Document.
11906         * genopinit.c (main): Add supports_vec_scatter_store and
11907         supports_vec_scatter_store_cached to target_optabs.
11908         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
11909         IFN_MASK_SCATTER_STORE.
11910         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
11911         functions.
11912         * internal-fn.h (internal_store_fn_p): Declare.
11913         (internal_fn_stored_value_index): Likewise.
11914         * internal-fn.c (scatter_store_direct): New macro.
11915         (expand_scatter_store_optab_fn): New function.
11916         (direct_scatter_store_optab_supported_p): New macro.
11917         (internal_store_fn_p): New function.
11918         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
11919         IFN_MASK_SCATTER_STORE.
11920         (internal_fn_mask_index): Likewise.
11921         (internal_fn_stored_value_index): New function.
11922         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
11923         for scatter stores.
11924         * optabs-query.h (supports_vec_scatter_store_p): Declare.
11925         * optabs-query.c (supports_vec_scatter_store_p): New function.
11926         * tree-vectorizer.h (vect_get_store_rhs): Declare.
11927         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
11928         true for scatter stores.
11929         (vect_gather_scatter_fn_p): Handle scatter stores too.
11930         (vect_check_gather_scatter): Consider using scatter stores if
11931         supports_vec_scatter_store_p.
11932         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
11933         scatter stores too.
11934         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
11935         internal_fn_stored_value_index.
11936         (check_load_store_masking): Handle scatter stores too.
11937         (vect_get_store_rhs): Make public.
11938         (vectorizable_call): Use internal_store_fn_p.
11939         (vectorizable_store): Handle scatter store internal functions.
11940         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
11941         when deciding whether the end of the group has been reached.
11942         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
11943         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
11944         (mask_scatter_store<mode>): New insns.
11946 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11947             Alan Hayward  <alan.hayward@arm.com>
11948             David Sherwood  <david.sherwood@arm.com>
11950         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
11951         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
11952         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
11953         function.
11954         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
11955         Use vect_truncate_gather_scatter_offset if we can't treat the
11956         operation as a normal gather load or scatter store.
11957         (get_group_load_store_type): Take the gather_scatter_info
11958         as argument.  Try using a gather load or scatter store for
11959         single-element groups.
11960         (get_load_store_type): Update calls to get_group_load_store_type
11961         and vect_use_strided_gather_scatters_p.
11963 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11964             Alan Hayward  <alan.hayward@arm.com>
11965             David Sherwood  <david.sherwood@arm.com>
11967         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
11968         optional tree argument.
11969         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
11970         null target hooks.
11971         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
11972         but continue to use the current value as a fallback.
11973         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
11974         to compare the updates.
11975         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
11976         (get_load_store_type): Use it when handling a strided access.
11977         (vect_get_strided_load_store_ops): New function.
11978         (vect_get_data_ptr_increment): Likewise.
11979         (vectorizable_load): Handle strided gather loads.  Always pass
11980         a step to vect_create_data_ref_ptr and bump_vector_ptr.
11982 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11983             Alan Hayward  <alan.hayward@arm.com>
11984             David Sherwood  <david.sherwood@arm.com>
11986         * doc/md.texi (gather_load@var{m}): Document.
11987         (mask_gather_load@var{m}): Likewise.
11988         * genopinit.c (main): Add supports_vec_gather_load and
11989         supports_vec_gather_load_cached to target_optabs.
11990         * optabs-tree.c (init_tree_optimization_optabs): Use
11991         ggc_cleared_alloc to allocate target_optabs.
11992         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
11993         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
11994         functions.
11995         * internal-fn.h (internal_load_fn_p): Declare.
11996         (internal_gather_scatter_fn_p): Likewise.
11997         (internal_fn_mask_index): Likewise.
11998         (internal_gather_scatter_fn_supported_p): Likewise.
11999         * internal-fn.c (gather_load_direct): New macro.
12000         (expand_gather_load_optab_fn): New function.
12001         (direct_gather_load_optab_supported_p): New macro.
12002         (direct_internal_fn_optab): New function.
12003         (internal_load_fn_p): Likewise.
12004         (internal_gather_scatter_fn_p): Likewise.
12005         (internal_fn_mask_index): Likewise.
12006         (internal_gather_scatter_fn_supported_p): Likewise.
12007         * optabs-query.c (supports_at_least_one_mode_p): New function.
12008         (supports_vec_gather_load_p): Likewise.
12009         * optabs-query.h (supports_vec_gather_load_p): Declare.
12010         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
12011         and memory_type field.
12012         (NUM_PATTERNS): Bump to 15.
12013         * tree-vect-data-refs.c: Include internal-fn.h.
12014         (vect_gather_scatter_fn_p): New function.
12015         (vect_describe_gather_scatter_call): Likewise.
12016         (vect_check_gather_scatter): Try using internal functions for
12017         gather loads.  Recognize existing calls to a gather load function.
12018         (vect_analyze_data_refs): Consider using gather loads if
12019         supports_vec_gather_load_p.
12020         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
12021         (vect_get_gather_scatter_offset_type): Likewise.
12022         (vect_convert_mask_for_vectype): Likewise.
12023         (vect_add_conversion_to_patterm): Likewise.
12024         (vect_try_gather_scatter_pattern): Likewise.
12025         (vect_recog_gather_scatter_pattern): New pattern recognizer.
12026         (vect_vect_recog_func_ptrs): Add it.
12027         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
12028         internal_fn_mask_index and internal_gather_scatter_fn_p.
12029         (check_load_store_masking): Take the gather_scatter_info as an
12030         argument and handle gather loads.
12031         (vect_get_gather_scatter_ops): New function.
12032         (vectorizable_call): Check internal_load_fn_p.
12033         (vectorizable_load): Likewise.  Handle gather load internal
12034         functions.
12035         (vectorizable_store): Update call to check_load_store_masking.
12036         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
12037         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
12038         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
12039         (aarch64_gather_scale_operand_d): New predicates.
12040         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
12041         (mask_gather_load<mode>): New insns.
12043 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
12044             Alan Hayward  <alan.hayward@arm.com>
12045             David Sherwood  <david.sherwood@arm.com>
12047         * optabs.def (fold_left_plus_optab): New optab.
12048         * doc/md.texi (fold_left_plus_@var{m}): Document.
12049         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
12050         * internal-fn.c (fold_left_direct): Define.
12051         (expand_fold_left_optab_fn): Likewise.
12052         (direct_fold_left_optab_supported_p): Likewise.
12053         * fold-const-call.c (fold_const_fold_left): New function.
12054         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
12055         * tree-parloops.c (valid_reduction_p): New function.
12056         (gather_scalar_reductions): Use it.
12057         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
12058         (vect_finish_replace_stmt): Declare.
12059         * tree-vect-loop.c (fold_left_reduction_fn): New function.
12060         (needs_fold_left_reduction_p): New function, split out from...
12061         (vect_is_simple_reduction): ...here.  Accept reductions that
12062         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
12063         (vect_force_simple_reduction): Also store the reduction type in
12064         the assignment's STMT_VINFO_REDUC_TYPE.
12065         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
12066         (merge_with_identity): New function.
12067         (vect_expand_fold_left): Likewise.
12068         (vectorize_fold_left_reduction): Likewise.
12069         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
12070         scalar phi in place for it.  Check for target support and reject
12071         cases that would reassociate the operation.  Defer the transform
12072         phase to vectorize_fold_left_reduction.
12073         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
12074         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
12075         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
12077 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
12079         * tree-if-conv.c (predicate_mem_writes): Remove redundant
12080         call to ifc_temp_var.
12082 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
12083             Alan Hayward  <alan.hayward@arm.com>
12084             David Sherwood  <david.sherwood@arm.com>
12086         * target.def (legitimize_address_displacement): Take the original
12087         offset as a poly_int.
12088         * targhooks.h (default_legitimize_address_displacement): Update
12089         accordingly.
12090         * targhooks.c (default_legitimize_address_displacement): Likewise.
12091         * doc/tm.texi: Regenerate.
12092         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
12093         as an argument, moving assert of ad->disp == ad->disp_term to...
12094         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
12095         Try calling targetm.legitimize_address_displacement before expanding
12096         the address rather than afterwards, and adjust for the new interface.
12097         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
12098         Match the new hook interface.  Handle SVE addresses.
12099         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
12100         new hook interface.
12102 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
12104         * Makefile.in (OBJS): Add early-remat.o.
12105         * target.def (select_early_remat_modes): New hook.
12106         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
12107         * doc/tm.texi: Regenerate.
12108         * targhooks.h (default_select_early_remat_modes): Declare.
12109         * targhooks.c (default_select_early_remat_modes): New function.
12110         * timevar.def (TV_EARLY_REMAT): New timevar.
12111         * passes.def (pass_early_remat): New pass.
12112         * tree-pass.h (make_pass_early_remat): Declare.
12113         * early-remat.c: New file.
12114         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
12115         function.
12116         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
12118 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
12119             Alan Hayward  <alan.hayward@arm.com>
12120             David Sherwood  <david.sherwood@arm.com>
12122         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
12123         vfm1 with a bound_epilog parameter.
12124         (vect_do_peeling): Update calls accordingly, and move the prologue
12125         call earlier in the function.  Treat the base bound_epilog as 0 for
12126         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
12127         this base when peeling for gaps.
12128         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
12129         with fully-masked loops.
12130         (vect_estimate_min_profitable_iters): Handle the single peeled
12131         iteration in that case.
12133 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
12134             Alan Hayward  <alan.hayward@arm.com>
12135             David Sherwood  <david.sherwood@arm.com>
12137         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
12138         single-element interleaving even if the size is not a power of 2.
12139         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
12140         accesses for single-element interleaving if the group size is
12141         not a power of 2.
12143 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
12144             Alan Hayward  <alan.hayward@arm.com>
12145             David Sherwood  <david.sherwood@arm.com>
12147         * doc/md.texi (fold_extract_last_@var{m}): Document.
12148         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
12149         * optabs.def (fold_extract_last_optab): New optab.
12150         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
12151         * internal-fn.c (fold_extract_direct): New macro.
12152         (expand_fold_extract_optab_fn): Likewise.
12153         (direct_fold_extract_optab_supported_p): Likewise.
12154         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
12155         * tree-vect-loop.c (vect_model_reduction_cost): Handle
12156         EXTRACT_LAST_REDUCTION.
12157         (get_initial_def_for_reduction): Do not create an initial vector
12158         for EXTRACT_LAST_REDUCTION reductions.
12159         (vectorizable_reduction): Leave the scalar phi in place for
12160         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
12161         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
12162         epilogue code for EXTRACT_LAST_REDUCTION and defer the
12163         transform phase to vectorizable_condition.
12164         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
12165         split out from...
12166         (vect_finish_stmt_generation): ...here.
12167         (vect_finish_replace_stmt): New function.
12168         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
12169         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
12170         pattern.
12171         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
12173 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
12174             Alan Hayward  <alan.hayward@arm.com>
12175             David Sherwood  <david.sherwood@arm.com>
12177         * doc/md.texi (extract_last_@var{m}): Document.
12178         * optabs.def (extract_last_optab): New optab.
12179         * internal-fn.def (EXTRACT_LAST): New internal function.
12180         * internal-fn.c (cond_unary_direct): New macro.
12181         (expand_cond_unary_optab_fn): Likewise.
12182         (direct_cond_unary_optab_supported_p): Likewise.
12183         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
12184         loops using EXTRACT_LAST.
12185         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
12186         (extract_last_<mode>): ...this optab.
12187         (vec_extract<mode><Vel>): Update accordingly.
12189 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
12190             Alan Hayward  <alan.hayward@arm.com>
12191             David Sherwood  <david.sherwood@arm.com>
12193         * target.def (empty_mask_is_expensive): New hook.
12194         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
12195         * doc/tm.texi: Regenerate.
12196         * targhooks.h (default_empty_mask_is_expensive): Declare.
12197         * targhooks.c (default_empty_mask_is_expensive): New function.
12198         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
12199         if the target says that empty masks are expensive.
12200         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
12201         New function.
12202         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
12204 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
12205             Alan Hayward  <alan.hayward@arm.com>
12206             David Sherwood  <david.sherwood@arm.com>
12208         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
12209         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
12210         (vect_use_loop_mask_for_alignment_p): New function.
12211         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
12212         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
12213         niters_skip argument.  Make sure that the first niters_skip elements
12214         of the first iteration are inactive.
12215         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
12216         Update call to vect_set_loop_masks_directly.
12217         (get_misalign_in_elems): New function, split out from...
12218         (vect_gen_prolog_loop_niters): ...here.
12219         (vect_update_init_of_dr): Take a code argument that specifies whether
12220         the adjustment should be added or subtracted.
12221         (vect_update_init_of_drs): Likewise.
12222         (vect_prepare_for_masked_peels): New function.
12223         (vect_do_peeling): Skip prologue peeling if we're using a mask
12224         instead.  Update call to vect_update_inits_of_drs.
12225         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
12226         mask_skip_niters.
12227         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
12228         alignment.  Do not include the number of peeled iterations in
12229         the minimum threshold in that case.
12230         (vectorizable_induction): Adjust the start value down by
12231         LOOP_VINFO_MASK_SKIP_NITERS iterations.
12232         (vect_transform_loop): Call vect_prepare_for_masked_peels.
12233         Take the number of skipped iterations into account when calculating
12234         the loop bounds.
12235         * tree-vect-stmts.c (vect_gen_while_not): New function.
12237 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
12238             Alan Hayward  <alan.hayward@arm.com>
12239             David Sherwood  <david.sherwood@arm.com>
12241         * doc/sourcebuild.texi (vect_fully_masked): Document.
12242         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
12243         default value to 0.
12244         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
12245         split out from...
12246         (vect_analyze_loop_2): ...here. Don't check the vectorization
12247         factor against the number of loop iterations if the loop is
12248         fully-masked.
12250 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
12251             Alan Hayward  <alan.hayward@arm.com>
12252             David Sherwood  <david.sherwood@arm.com>
12254         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
12255         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
12256         (dump_groups): Update accordingly.
12257         (iv_use::mem_type): New member variable.
12258         (address_p): New function.
12259         (record_use): Add a mem_type argument and initialize the new
12260         mem_type field.
12261         (record_group_use): Add a mem_type argument.  Use address_p.
12262         Remove obsolete null checks of base_object.  Update call to record_use.
12263         (find_interesting_uses_op): Update call to record_group_use.
12264         (find_interesting_uses_cond): Likewise.
12265         (find_interesting_uses_address): Likewise.
12266         (get_mem_type_for_internal_fn): New function.
12267         (find_address_like_use): Likewise.
12268         (find_interesting_uses_stmt): Try find_address_like_use before
12269         calling find_interesting_uses_op.
12270         (addr_offset_valid_p): Use the iv mem_type field as the type
12271         of the addressed memory.
12272         (add_autoinc_candidates): Likewise.
12273         (get_address_cost): Likewise.
12274         (split_small_address_groups_p): Use address_p.
12275         (split_address_groups): Likewise.
12276         (add_iv_candidate_for_use): Likewise.
12277         (autoinc_possible_for_pair): Likewise.
12278         (rewrite_groups): Likewise.
12279         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
12280         (determine_group_iv_cost): Update after split of USE_ADDRESS.
12281         (get_alias_ptr_type_for_ptr_address): New function.
12282         (rewrite_use_address): Rewrite address uses in calls that were
12283         identified by find_address_like_use.
12285 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
12286             Alan Hayward  <alan.hayward@arm.com>
12287             David Sherwood  <david.sherwood@arm.com>
12289         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
12290         TARGET_MEM_REFs.
12291         * gimple-expr.h (is_gimple_addressable: Likewise.
12292         * gimple-expr.c (is_gimple_address): Likewise.
12293         * internal-fn.c (expand_call_mem_ref): New function.
12294         (expand_mask_load_optab_fn): Use it.
12295         (expand_mask_store_optab_fn): Likewise.
12297 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
12298             Alan Hayward  <alan.hayward@arm.com>
12299             David Sherwood  <david.sherwood@arm.com>
12301         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
12302         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
12303         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
12304         (cond_umax@var{mode}): Document.
12305         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
12306         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
12307         (cond_umin_optab, cond_umax_optab): New optabs.
12308         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
12309         (COND_IOR, COND_XOR): New internal functions.
12310         * internal-fn.h (get_conditional_internal_fn): Declare.
12311         * internal-fn.c (cond_binary_direct): New macro.
12312         (expand_cond_binary_optab_fn): Likewise.
12313         (direct_cond_binary_optab_supported_p): Likewise.
12314         (get_conditional_internal_fn): New function.
12315         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
12316         Cope with reduction statements that are vectorized as calls rather
12317         than assignments.
12318         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
12319         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
12320         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
12321         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
12322         (UNSPEC_COND_EOR): New unspecs.
12323         (optab): Add mappings for them.
12324         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
12325         (sve_int_op, sve_fp_op): New int attributes.
12327 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
12328             Alan Hayward  <alan.hayward@arm.com>
12329             David Sherwood  <david.sherwood@arm.com>
12331         * optabs.def (while_ult_optab): New optab.
12332         * doc/md.texi (while_ult@var{m}@var{n}): Document.
12333         * internal-fn.def (WHILE_ULT): New internal function.
12334         * internal-fn.h (direct_internal_fn_supported_p): New override
12335         that takes two types as argument.
12336         * internal-fn.c (while_direct): New macro.
12337         (expand_while_optab_fn): New function.
12338         (convert_optab_supported_p): Likewise.
12339         (direct_while_optab_supported_p): New macro.
12340         * wide-int.h (wi::udiv_ceil): New function.
12341         * tree-vectorizer.h (rgroup_masks): New structure.
12342         (vec_loop_masks): New typedef.
12343         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
12344         and fully_masked_p.
12345         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
12346         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
12347         (vect_max_vf): New function.
12348         (slpeel_make_loop_iterate_ntimes): Delete.
12349         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
12350         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
12351         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
12352         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
12353         internal-fn.h, stor-layout.h and optabs-query.h.
12354         (vect_set_loop_mask): New function.
12355         (add_preheader_seq): Likewise.
12356         (add_header_seq): Likewise.
12357         (interleave_supported_p): Likewise.
12358         (vect_maybe_permute_loop_masks): Likewise.
12359         (vect_set_loop_masks_directly): Likewise.
12360         (vect_set_loop_condition_masked): Likewise.
12361         (vect_set_loop_condition_unmasked): New function, split out from
12362         slpeel_make_loop_iterate_ntimes.
12363         (slpeel_make_loop_iterate_ntimes): Rename to..
12364         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
12365         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
12366         (vect_do_peeling): Update call accordingly.
12367         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
12368         loops.
12369         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
12370         mask_compare_type, can_fully_mask_p and fully_masked_p.
12371         (release_vec_loop_masks): New function.
12372         (_loop_vec_info): Use it to free the loop masks.
12373         (can_produce_all_loop_masks_p): New function.
12374         (vect_get_max_nscalars_per_iter): Likewise.
12375         (vect_verify_full_masking): Likewise.
12376         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
12377         retries, and free the mask rgroups before retrying.  Check loop-wide
12378         reasons for disallowing fully-masked loops.  Make the final decision
12379         about whether use a fully-masked loop or not.
12380         (vect_estimate_min_profitable_iters): Do not assume that peeling
12381         for the number of iterations will be needed for fully-masked loops.
12382         (vectorizable_reduction): Disable fully-masked loops.
12383         (vectorizable_live_operation): Likewise.
12384         (vect_halve_mask_nunits): New function.
12385         (vect_double_mask_nunits): Likewise.
12386         (vect_record_loop_mask): Likewise.
12387         (vect_get_loop_mask): Likewise.
12388         (vect_transform_loop): Handle the case in which the final loop
12389         iteration might handle a partial vector.  Call vect_set_loop_condition
12390         instead of slpeel_make_loop_iterate_ntimes.
12391         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
12392         (check_load_store_masking): New function.
12393         (prepare_load_store_mask): Likewise.
12394         (vectorizable_store): Handle fully-masked loops.
12395         (vectorizable_load): Likewise.
12396         (supportable_widening_operation): Use vect_halve_mask_nunits for
12397         booleans.
12398         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
12399         (vect_gen_while): New function.
12400         * config/aarch64/aarch64.md (umax<mode>3): New expander.
12401         (aarch64_uqdec<mode>): New insn.
12403 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
12404             Alan Hayward  <alan.hayward@arm.com>
12405             David Sherwood  <david.sherwood@arm.com>
12407         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
12408         (reduc_xor_scal_optab): New optabs.
12409         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
12410         (reduc_xor_scal_@var{m}): Document.
12411         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
12412         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
12413         internal functions.
12414         * fold-const-call.c (fold_const_call): Handle them.
12415         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
12416         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
12417         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
12418         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
12419         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
12420         (UNSPEC_XORV): New unspecs.
12421         (optab): Add entries for them.
12422         (BITWISEV): New int iterator.
12423         (bit_reduc_op): New int attributes.
12425 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
12426             Alan Hayward  <alan.hayward@arm.com>
12427             David Sherwood  <david.sherwood@arm.com>
12429         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
12430         * internal-fn.def (VEC_SHL_INSERT): New internal function.
12431         * optabs.def (vec_shl_insert_optab): New optab.
12432         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
12433         (duplicate_and_interleave): Likewise.
12434         * tree-vect-loop.c: Include internal-fn.h.
12435         (neutral_op_for_slp_reduction): New function, split out from
12436         get_initial_defs_for_reduction.
12437         (get_initial_def_for_reduction): Handle option 2 for variable-length
12438         vectors by loading the neutral value into a vector and then shifting
12439         the initial value into element 0.
12440         (get_initial_defs_for_reduction): Replace the code argument with
12441         the neutral value calculated by neutral_op_for_slp_reduction.
12442         Use gimple_build_vector for constant-length vectors.
12443         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
12444         but the first group_size elements have a neutral value.
12445         Use duplicate_and_interleave otherwise.
12446         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
12447         Update call to get_initial_defs_for_reduction.  Handle SLP
12448         reductions for variable-length vectors by creating one vector
12449         result for each scalar result, with the elements associated
12450         with other scalar results stubbed out with the neutral value.
12451         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
12452         Require IFN_VEC_SHL_INSERT for double reductions on
12453         variable-length vectors, or SLP reductions that have
12454         a neutral value.  Require can_duplicate_and_interleave_p
12455         support for variable-length unchained SLP reductions if there
12456         is no neutral value, such as for MIN/MAX reductions.  Also require
12457         the number of vector elements to be a multiple of the number of
12458         SLP statements when doing variable-length unchained SLP reductions.
12459         Update call to vect_create_epilog_for_reduction.
12460         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
12461         and remove initial values.
12462         (duplicate_and_interleave): Make public.
12463         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
12464         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
12466 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
12467             Alan Hayward  <alan.hayward@arm.com>
12468             David Sherwood  <david.sherwood@arm.com>
12470         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
12471         (can_duplicate_and_interleave_p): New function.
12472         (vect_get_and_check_slp_defs): Take the vector of statements
12473         rather than just the current one.  Remove excess parentheses.
12474         Restriction rejectinon of vect_constant_def and vect_external_def
12475         for variable-length vectors to boolean types, or types for which
12476         can_duplicate_and_interleave_p is false.
12477         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
12478         (duplicate_and_interleave): New function.
12479         (vect_get_constant_vectors): Use gimple_build_vector for
12480         constant-length vectors and suitable variable-length constant
12481         vectors.  Use duplicate_and_interleave for other variable-length
12482         vectors.  Don't defer the update when inserting new statements.
12484 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
12485             Alan Hayward  <alan.hayward@arm.com>
12486             David Sherwood  <david.sherwood@arm.com>
12488         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
12489         min_profitable_iters doesn't go negative.
12491 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
12492             Alan Hayward  <alan.hayward@arm.com>
12493             David Sherwood  <david.sherwood@arm.com>
12495         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
12496         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
12497         * optabs.def (vec_mask_load_lanes_optab): New optab.
12498         (vec_mask_store_lanes_optab): Likewise.
12499         * internal-fn.def (MASK_LOAD_LANES): New internal function.
12500         (MASK_STORE_LANES): Likewise.
12501         * internal-fn.c (mask_load_lanes_direct): New macro.
12502         (mask_store_lanes_direct): Likewise.
12503         (expand_mask_load_optab_fn): Handle masked operations.
12504         (expand_mask_load_lanes_optab_fn): New macro.
12505         (expand_mask_store_optab_fn): Handle masked operations.
12506         (expand_mask_store_lanes_optab_fn): New macro.
12507         (direct_mask_load_lanes_optab_supported_p): Likewise.
12508         (direct_mask_store_lanes_optab_supported_p): Likewise.
12509         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
12510         parameter.
12511         (vect_load_lanes_supported): Likewise.
12512         * tree-vect-data-refs.c (strip_conversion): New function.
12513         (can_group_stmts_p): Likewise.
12514         (vect_analyze_data_ref_accesses): Use it instead of checking
12515         for a pair of assignments.
12516         (vect_store_lanes_supported): Take a masked_p parameter.
12517         (vect_load_lanes_supported): Likewise.
12518         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
12519         vect_store_lanes_supported and vect_load_lanes_supported.
12520         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
12521         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
12522         parameter.  Don't allow gaps for masked accesses.
12523         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
12524         and vect_load_lanes_supported.
12525         (get_load_store_type): Take a masked_p parameter and update
12526         call to get_group_load_store_type.
12527         (vectorizable_store): Update call to get_load_store_type.
12528         Handle IFN_MASK_STORE_LANES.
12529         (vectorizable_load): Update call to get_load_store_type.
12530         Handle IFN_MASK_LOAD_LANES.
12532 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
12533             Alan Hayward  <alan.hayward@arm.com>
12534             David Sherwood  <david.sherwood@arm.com>
12536         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
12537         modes for SVE.
12538         * config/aarch64/aarch64-protos.h
12539         (aarch64_sve_struct_memory_operand_p): Declare.
12540         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
12541         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
12542         (VPRED, vpred): Handle SVE structure modes.
12543         * config/aarch64/constraints.md (Utx): New constraint.
12544         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
12545         (aarch64_sve_struct_nonimmediate_operand): New predicates.
12546         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
12547         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
12548         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
12549         structure modes.  Split into pieces after RA.
12550         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
12551         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
12552         New patterns.
12553         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
12554         SVE structure modes.
12555         (aarch64_classify_address): Likewise.
12556         (sizetochar): Move earlier in file.
12557         (aarch64_print_operand): Handle SVE register lists.
12558         (aarch64_array_mode): New function.
12559         (aarch64_sve_struct_memory_operand_p): Likewise.
12560         (TARGET_ARRAY_MODE): Redefine.
12562 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
12563             Alan Hayward  <alan.hayward@arm.com>
12564             David Sherwood  <david.sherwood@arm.com>
12566         * target.def (array_mode): New target hook.
12567         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
12568         * doc/tm.texi: Regenerate.
12569         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
12570         * hooks.c (hook_optmode_mode_uhwi_none): New function.
12571         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
12572         targetm.array_mode.
12573         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
12574         type sizes.
12576 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
12577             Alan Hayward  <alan.hayward@arm.com>
12578             David Sherwood  <david.sherwood@arm.com>
12580         * fold-const.c (fold_binary_loc): Check the argument types
12581         rather than the result type when testing for a vector operation.
12583 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
12585         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
12586         * doc/tm.texi: Regenerate.
12588 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
12589             Alan Hayward  <alan.hayward@arm.com>
12590             David Sherwood  <david.sherwood@arm.com>
12592         * doc/invoke.texi (-msve-vector-bits=): Document new option.
12593         (sve): Document new AArch64 extension.
12594         * doc/md.texi (w): Extend the description of the AArch64
12595         constraint to include SVE vectors.
12596         (Upl, Upa): Document new AArch64 predicate constraints.
12597         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
12598         enum.
12599         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
12600         (msve-vector-bits=): New option.
12601         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
12602         SVE when these are disabled.
12603         (sve): New extension.
12604         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
12605         modes.  Adjust their number of units based on aarch64_sve_vg.
12606         (MAX_BITSIZE_MODE_ANY_MODE): Define.
12607         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
12608         aarch64_addr_query_type.
12609         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
12610         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
12611         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
12612         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
12613         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
12614         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
12615         (aarch64_simd_imm_zero_p): Delete.
12616         (aarch64_check_zero_based_sve_index_immediate): Declare.
12617         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
12618         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
12619         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
12620         (aarch64_sve_float_mul_immediate_p): Likewise.
12621         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
12622         rather than an rtx.
12623         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
12624         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
12625         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
12626         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
12627         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
12628         (aarch64_regmode_natural_size): Likewise.
12629         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
12630         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
12631         left one place.
12632         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
12633         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
12634         for VG and the SVE predicate registers.
12635         (V_ALIASES): Add a "z"-prefixed alias.
12636         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
12637         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
12638         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
12639         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
12640         (REG_CLASS_NAMES): Add entries for them.
12641         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
12642         and the predicate registers.
12643         (aarch64_sve_vg): Declare.
12644         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
12645         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
12646         (REGMODE_NATURAL_SIZE): Define.
12647         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
12648         SVE macros.
12649         * config/aarch64/aarch64.c: Include cfgrtl.h.
12650         (simd_immediate_info): Add a constructor for series vectors,
12651         and an associated step field.
12652         (aarch64_sve_vg): New variable.
12653         (aarch64_dbx_register_number): Handle VG and the predicate registers.
12654         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
12655         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
12656         (VEC_ANY_DATA, VEC_STRUCT): New constants.
12657         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
12658         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
12659         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
12660         (aarch64_get_mask_mode): New functions.
12661         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
12662         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
12663         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
12664         predicate modes and predicate registers.  Explicitly restrict
12665         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
12666         to store a vector mode if it is recognized by
12667         aarch64_classify_vector_mode.
12668         (aarch64_regmode_natural_size): New function.
12669         (aarch64_hard_regno_caller_save_mode): Return the original mode
12670         for predicates.
12671         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
12672         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
12673         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
12674         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
12675         functions.
12676         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
12677         does not overlap dest if the function is frame-related.  Handle
12678         SVE constants.
12679         (aarch64_split_add_offset): New function.
12680         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
12681         them aarch64_add_offset.
12682         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
12683         and update call to aarch64_sub_sp.
12684         (aarch64_add_cfa_expression): New function.
12685         (aarch64_expand_prologue): Pass extra temporary registers to the
12686         functions above.  Handle the case in which we need to emit new
12687         DW_CFA_expressions for registers that were originally saved
12688         relative to the stack pointer, but now have to be expressed
12689         relative to the frame pointer.
12690         (aarch64_output_mi_thunk): Pass extra temporary registers to the
12691         functions above.
12692         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
12693         IP0 and IP1 values for SVE frames.
12694         (aarch64_expand_vec_series): New function.
12695         (aarch64_expand_sve_widened_duplicate): Likewise.
12696         (aarch64_expand_sve_const_vector): Likewise.
12697         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
12698         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
12699         into the register, rather than emitting a SET directly.
12700         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
12701         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
12702         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
12703         (offset_9bit_signed_scaled_p): New functions.
12704         (aarch64_replicate_bitmask_imm): New function.
12705         (aarch64_bitmask_imm): Use it.
12706         (aarch64_cannot_force_const_mem): Reject expressions involving
12707         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
12708         (aarch64_classify_index): Handle SVE indices, by requiring
12709         a plain register index with a scale that matches the element size.
12710         (aarch64_classify_address): Handle SVE addresses.  Assert that
12711         the mode of the address is VOIDmode or an integer mode.
12712         Update call to aarch64_classify_symbol.
12713         (aarch64_classify_symbolic_expression): Update call to
12714         aarch64_classify_symbol.
12715         (aarch64_const_vec_all_in_range_p): New function.
12716         (aarch64_print_vector_float_operand): Likewise.
12717         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
12718         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
12719         and the FP immediates 1.0 and 0.5.
12720         (aarch64_print_address_internal): Handle SVE addresses.
12721         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
12722         (aarch64_regno_regclass): Handle predicate registers.
12723         (aarch64_secondary_reload): Handle big-endian reloads of SVE
12724         data modes.
12725         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
12726         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
12727         (aarch64_convert_sve_vector_bits): New function.
12728         (aarch64_override_options): Use it to handle -msve-vector-bits=.
12729         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
12730         rather than an rtx.
12731         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
12732         Handle SVE vector and predicate modes.  Accept VL-based constants
12733         that need only one temporary register, and VL offsets that require
12734         no temporary registers.
12735         (aarch64_conditional_register_usage): Mark the predicate registers
12736         as fixed if SVE isn't available.
12737         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
12738         Return true for SVE vector and predicate modes.
12739         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
12740         rather than an unsigned int.  Handle SVE modes.
12741         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
12742         SVE modes.
12743         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
12744         if SVE is enabled.
12745         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
12746         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
12747         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
12748         (aarch64_sve_float_mul_immediate_p): New functions.
12749         (aarch64_sve_valid_immediate): New function.
12750         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
12751         Explicitly reject structure modes.  Check for INDEX constants.
12752         Handle PTRUE and PFALSE constants.
12753         (aarch64_check_zero_based_sve_index_immediate): New function.
12754         (aarch64_simd_imm_zero_p): Delete.
12755         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
12756         vector modes.  Accept constants in the range of CNT[BHWD].
12757         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
12758         ask for an Advanced SIMD mode.
12759         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
12760         (aarch64_simd_vector_alignment): Handle SVE predicates.
12761         (aarch64_vectorize_preferred_vector_alignment): New function.
12762         (aarch64_simd_vector_alignment_reachable): Use it instead of
12763         the vector size.
12764         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
12765         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
12766         functions.
12767         (MAX_VECT_LEN): Delete.
12768         (expand_vec_perm_d): Add a vec_flags field.
12769         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
12770         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
12771         (aarch64_evpc_ext): Don't apply a big-endian lane correction
12772         for SVE modes.
12773         (aarch64_evpc_rev): Rename to...
12774         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
12775         (aarch64_evpc_rev_global): New function.
12776         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
12777         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
12778         MAX_VECT_LEN.
12779         (aarch64_evpc_sve_tbl): New function.
12780         (aarch64_expand_vec_perm_const_1): Update after rename of
12781         aarch64_evpc_rev.  Handle SVE permutes too, trying
12782         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
12783         than aarch64_evpc_tbl.
12784         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
12785         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
12786         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
12787         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
12788         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
12789         (aarch64_expand_sve_vcond): New functions.
12790         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
12791         of aarch64_vector_mode_p.
12792         (aarch64_dwarf_poly_indeterminate_value): New function.
12793         (aarch64_compute_pressure_classes): Likewise.
12794         (aarch64_can_change_mode_class): Likewise.
12795         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
12796         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
12797         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
12798         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
12799         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
12800         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
12801         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
12802         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
12803         constraints.
12804         (Dn, Dl, Dr): Accept const as well as const_vector.
12805         (Dz): Likewise.  Compare against CONST0_RTX.
12806         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
12807         of "vector" where appropriate.
12808         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
12809         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
12810         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
12811         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
12812         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
12813         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
12814         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
12815         (v_int_equiv): Extend to SVE modes.
12816         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
12817         mode attributes.
12818         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
12819         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
12820         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
12821         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
12822         (SVE_COND_FP_CMP): New int iterators.
12823         (perm_hilo): Handle the new unpack unspecs.
12824         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
12825         attributes.
12826         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
12827         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
12828         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
12829         (aarch64_equality_operator, aarch64_constant_vector_operand)
12830         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
12831         (aarch64_sve_nonimmediate_operand): Likewise.
12832         (aarch64_sve_general_operand): Likewise.
12833         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
12834         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
12835         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
12836         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
12837         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
12838         (aarch64_sve_float_arith_immediate): Likewise.
12839         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
12840         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
12841         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
12842         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
12843         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
12844         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
12845         (aarch64_sve_float_arith_operand): Likewise.
12846         (aarch64_sve_float_arith_with_sub_operand): Likewise.
12847         (aarch64_sve_float_mul_operand): Likewise.
12848         (aarch64_sve_vec_perm_operand): Likewise.
12849         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
12850         (aarch64_mov_operand): Accept const_poly_int and const_vector.
12851         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
12852         as well as const_vector.
12853         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
12854         in file.  Use CONST0_RTX and CONSTM1_RTX.
12855         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
12856         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
12857         Use aarch64_simd_imm_zero.
12858         * config/aarch64/aarch64-sve.md: New file.
12859         * config/aarch64/aarch64.md: Include it.
12860         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
12861         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
12862         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
12863         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
12864         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
12865         (sve): New attribute.
12866         (enabled): Disable instructions with the sve attribute unless
12867         TARGET_SVE.
12868         (movqi, movhi): Pass CONST_POLY_INT operaneds through
12869         aarch64_expand_mov_immediate.
12870         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
12871         CNT[BHSD] immediates.
12872         (movti): Split CONST_POLY_INT moves into two halves.
12873         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
12874         Split additions that need a temporary here if the destination
12875         is the stack pointer.
12876         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
12877         (*add<mode>3_poly_1): New instruction.
12878         (set_clobber_cc): New expander.
12880 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
12882         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
12883         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
12884         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
12885         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
12886         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
12887         Change innermode from fixed_mode_size to machine_mode.
12888         (simplify_subreg): Update call accordingly.  Handle a constant-sized
12889         subreg of a variable-length CONST_VECTOR.
12891 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
12892             Alan Hayward  <alan.hayward@arm.com>
12893             David Sherwood  <david.sherwood@arm.com>
12895         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
12896         (add_offset_to_base): New function, split out from...
12897         (create_mem_ref): ...here.  When handling a scale other than 1,
12898         check first whether the address is valid without the offset.
12899         Add it into the base if so, leaving the index and scale as-is.
12901 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
12903         PR c++/83778
12904         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
12905         fold_for_warn before checking if arg2 is INTEGER_CST.
12907 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
12909         * config/rs6000/predicates.md (load_multiple_operation): Delete.
12910         (store_multiple_operation): Delete.
12911         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
12912         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
12913         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
12914         guarded by TARGET_STRING.
12915         (rs6000_output_load_multiple): Delete.
12916         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
12917         OPTION_MASK_STRING / TARGET_STRING handling.
12918         (print_operand) <'N', 'O'>: Add comment that these are unused now.
12919         (const rs6000_opt_masks) <"string">: Change mask to 0.
12920         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
12921         (MASK_STRING): Delete.
12922         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
12923         parts.  Simplify.
12924         (load_multiple): Delete.
12925         (*ldmsi8): Delete.
12926         (*ldmsi7): Delete.
12927         (*ldmsi6): Delete.
12928         (*ldmsi5): Delete.
12929         (*ldmsi4): Delete.
12930         (*ldmsi3): Delete.
12931         (store_multiple): Delete.
12932         (*stmsi8): Delete.
12933         (*stmsi7): Delete.
12934         (*stmsi6): Delete.
12935         (*stmsi5): Delete.
12936         (*stmsi4): Delete.
12937         (*stmsi3): Delete.
12938         (movmemsi_8reg): Delete.
12939         (corresponding unnamed define_insn): Delete.
12940         (movmemsi_6reg): Delete.
12941         (corresponding unnamed define_insn): Delete.
12942         (movmemsi_4reg): Delete.
12943         (corresponding unnamed define_insn): Delete.
12944         (movmemsi_2reg): Delete.
12945         (corresponding unnamed define_insn): Delete.
12946         (movmemsi_1reg): Delete.
12947         (corresponding unnamed define_insn): Delete.
12948         * config/rs6000/rs6000.opt (mno-string): New.
12949         (mstring): Replace by deprecation warning stub.
12950         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
12952 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
12954         * regrename.c (regrename_do_replace): If replacing the same
12955         reg multiple times, try to reuse last created gen_raw_REG.
12957         PR debug/81155
12958         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
12959         main to workaround a bug in GDB.
12961 2018-01-12  Tom de Vries  <tom@codesourcery.com>
12963         PR target/83737
12964         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
12966 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
12968         PR rtl-optimization/80481
12969         * ira-color.c (get_cap_member): New function.
12970         (allocnos_conflict_by_live_ranges_p): Use it.
12971         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
12972         (setup_slot_coalesced_allocno_live_ranges): Ditto.
12974 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
12976         PR target/83628
12977         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
12978         (*saddl_se_1): Ditto.
12979         (*ssubsi_1): Ditto.
12980         (*ssubl_se_1): Ditto.
12982 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
12984         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
12985         rather than wi::to_widest for DR_INITs.
12986         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
12987         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
12988         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
12989         INTEGER_CSTs.
12990         (vect_analyze_group_access_1): Note that here.
12992 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
12994         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
12995         polynomial type sizes.
12997 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
12999         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
13000         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
13001         (gimple_add_tmp_var): Likewise.
13003 2018-01-12  Martin Liska  <mliska@suse.cz>
13005         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
13006         (gimple_alloc_sizes): Likewise.
13007         (dump_gimple_statistics): Use PRIu64 in printf format.
13008         * gimple.h: Change uint64_t to int.
13010 2018-01-12  Martin Liska  <mliska@suse.cz>
13012         * tree-core.h: Use uint64_t instead of int.
13013         * tree.c (tree_node_counts): Likewise.
13014         (tree_node_sizes): Likewise.
13015         (dump_tree_statistics): Use PRIu64 in printf format.
13017 2018-01-12  Martin Liska  <mliska@suse.cz>
13019         * Makefile.in: As qsort_chk is implemented in vec.c, add
13020         vec.o to linkage of gencfn-macros.
13021         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
13022         passing the info to record_node_allocation_statistics.
13023         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
13024         and pass the info.
13025         * ggc-common.c (struct ggc_usage): Add operator== and use
13026         it in operator< and compare function.
13027         * mem-stats.h (struct mem_usage): Likewise.
13028         * vec.c (struct vec_usage): Remove operator< and compare
13029         function. Can be simply inherited.
13031 2018-01-12  Martin Jambor  <mjambor@suse.cz>
13033         PR target/81616
13034         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
13035         * tree-ssa-math-opts.c: Include domwalk.h.
13036         (convert_mult_to_fma_1): New function.
13037         (fma_transformation_info): New type.
13038         (fma_deferring_state): Likewise.
13039         (cancel_fma_deferring): New function.
13040         (result_of_phi): Likewise.
13041         (last_fma_candidate_feeds_initial_phi): Likewise.
13042         (convert_mult_to_fma): Added deferring logic, split actual
13043         transformation to convert_mult_to_fma_1.
13044         (math_opts_dom_walker): New type.
13045         (math_opts_dom_walker::after_dom_children): New method, body moved
13046         here from pass_optimize_widening_mul::execute, added deferring logic
13047         bits.
13048         (pass_optimize_widening_mul::execute): Moved most of code to
13049         math_opts_dom_walker::after_dom_children.
13050         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
13051         * config/i386/i386.c (ix86_option_override_internal): Added
13052         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
13054 2018-01-12  Richard Biener  <rguenther@suse.de>
13056         PR debug/83157
13057         * dwarf2out.c (gen_variable_die): Do not reset old_die for
13058         inline instance vars.
13060 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
13062         PR target/81819
13063         * config/rx/rx.c (rx_is_restricted_memory_address):
13064         Handle SUBREG case.
13066 2018-01-12  Richard Biener  <rguenther@suse.de>
13068         PR tree-optimization/80846
13069         * target.def (split_reduction): New target hook.
13070         * targhooks.c (default_split_reduction): New function.
13071         * targhooks.h (default_split_reduction): Declare.
13072         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
13073         target requests first reduce vectors by combining low and high
13074         parts.
13075         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
13076         (get_vectype_for_scalar_type_and_size): Export.
13077         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
13078         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
13079         * doc/tm.texi: Regenerate.
13080         * config/i386/i386.c (ix86_split_reduction): Implement
13081         TARGET_VECTORIZE_SPLIT_REDUCTION.
13083 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
13085         PR target/83368
13086         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
13087         in PIC mode except for TARGET_VXWORKS_RTP.
13088         * config/sparc/sparc.c: Include cfgrtl.h.
13089         (TARGET_INIT_PIC_REG): Define.
13090         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
13091         (sparc_pic_register_p): New predicate.
13092         (sparc_legitimate_address_p): Use it.
13093         (sparc_legitimize_pic_address): Likewise.
13094         (sparc_delegitimize_address): Likewise.
13095         (sparc_mode_dependent_address_p): Likewise.
13096         (gen_load_pcrel_sym): Remove 4th parameter.
13097         (load_got_register): Adjust call to above.  Remove obsolete stuff.
13098         (sparc_expand_prologue): Do not call load_got_register here.
13099         (sparc_flat_expand_prologue): Likewise.
13100         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
13101         (sparc_use_pseudo_pic_reg): New function.
13102         (sparc_init_pic_reg): Likewise.
13103         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
13104         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
13106 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
13108         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
13109         Add item for branch_cost.
13111 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
13113         PR rtl-optimization/83565
13114         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
13115         not extend the result to a larger mode for rotate operations.
13116         (num_sign_bit_copies1): Likewise.
13118 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13120         PR target/40411
13121         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
13122         -symbolic.
13123         Use values-Xc.o for -pedantic.
13124         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
13126 2018-01-12  Martin Liska  <mliska@suse.cz>
13128         PR ipa/83054
13129         * ipa-devirt.c (final_warning_record::grow_type_warnings):
13130         New function.
13131         (possible_polymorphic_call_targets): Use it.
13132         (ipa_devirt): Likewise.
13134 2018-01-12  Martin Liska  <mliska@suse.cz>
13136         * profile-count.h (enum profile_quality): Use 0 as invalid
13137         enum value of profile_quality.
13139 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
13141         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
13142         -mext-string options.
13144 2018-01-12  Richard Biener  <rguenther@suse.de>
13146         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
13147         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
13148         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
13149         Likewise.
13150         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
13152 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
13154         * configure.ac (--with-long-double-format): Add support for the
13155         configuration option to change the default long double format on
13156         PowerPC systems.
13157         * config.gcc (powerpc*-linux*-*): Likewise.
13158         * configure: Regenerate.
13159         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
13160         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
13161         used without modification.
13163 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13165         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
13166         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
13167         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
13168         MISC_BUILTIN_SPEC_BARRIER.
13169         (rs6000_init_builtins): Likewise.
13170         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
13171         enum value.
13172         (speculation_barrier): New define_insn.
13173         * doc/extend.texi: Document __builtin_speculation_barrier.
13175 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
13177         PR target/83203
13178         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
13179         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
13180         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
13181         iterators.
13182         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
13183         integral modes instead of "ss" and "sd".
13184         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
13185         vectors with 32-bit and 64-bit elements.
13186         (vecdupssescalarmodesuffix): New mode attribute.
13187         (vec_dup<mode>): Use it.
13189 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
13191         PR target/83330
13192         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
13193         frame if argument is passed on stack.
13195 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
13197         PR target/82682
13198         * ree.c (combine_reaching_defs): Optimize also
13199         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
13200         reg2=any_extend(exp); reg1=reg2;, formatting fix.
13202 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
13204         PR middle-end/83189
13205         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
13207 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
13209         PR middle-end/83718
13210         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
13211         after they are computed.
13213 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
13215         PR tree-optimization/83695
13216         * gimple-loop-linterchange.cc
13217         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
13218         reset cached scev information after interchange.
13219         (pass_linterchange::execute): Remove call to scev_reset_htab.
13221 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13223         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
13224         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
13225         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
13226         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
13227         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
13228         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
13229         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
13230         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
13231         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
13232         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
13233         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
13234         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
13235         (V_lane_reg): Likewise.
13236         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
13237         New define_expand.
13238         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
13239         (vfmal_lane_low<mode>_intrinsic,
13240         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
13241         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
13242         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
13243         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
13244         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
13245         vfmsl_lane_high<mode>_intrinsic): New define_insns.
13247 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13249         * config/arm/arm-cpus.in (fp16fml): New feature.
13250         (ALL_SIMD): Add fp16fml.
13251         (armv8.2-a): Add fp16fml as an option.
13252         (armv8.3-a): Likewise.
13253         (armv8.4-a): Add fp16fml as part of fp16.
13254         * config/arm/arm.h (TARGET_FP16FML): Define.
13255         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
13256         when appropriate.
13257         * config/arm/arm-modes.def (V2HF): Define.
13258         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
13259         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
13260         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
13261         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
13262         vfmsl_low, vfmsl_high): New set of builtins.
13263         * config/arm/iterators.md (PLUSMINUS): New code iterator.
13264         (vfml_op): New code attribute.
13265         (VFMLHALVES): New int iterator.
13266         (VFML, VFMLSEL): New mode attributes.
13267         (V_reg): Define mapping for V2HF.
13268         (V_hi, V_lo): New mode attributes.
13269         (VF_constraint): Likewise.
13270         (vfml_half, vfml_half_selector): New int attributes.
13271         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
13272         define_expand.
13273         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
13274         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
13275         New define_insn.
13276         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
13277         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
13278         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
13279         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
13280         documentation.
13281         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
13282         Document new effective target and option set.
13284 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13286         * config/arm/arm-cpus.in (armv8_4): New feature.
13287         (ARMv8_4a): New fgroup.
13288         (armv8.4-a): New arch.
13289         * config/arm/arm-tables.opt: Regenerate.
13290         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
13291         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
13292         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
13293         Add matching rules for -march=armv8.4-a and extensions.
13294         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
13296 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
13298         PR target/81821
13299         * config/rx/rx.md (BW): New mode attribute.
13300         (sync_lock_test_and_setsi): Add mode suffix to insn output.
13302 2018-01-11  Richard Biener  <rguenther@suse.de>
13304         PR tree-optimization/83435
13305         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
13306         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
13307         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
13309 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
13310             Alan Hayward  <alan.hayward@arm.com>
13311             David Sherwood  <david.sherwood@arm.com>
13313         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
13314         field.
13315         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
13316         (aarch64_print_address_internal): Use it to check for a zero offset.
13318 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
13319             Alan Hayward  <alan.hayward@arm.com>
13320             David Sherwood  <david.sherwood@arm.com>
13322         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
13323         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
13324         Return a poly_int64 rather than a HOST_WIDE_INT.
13325         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
13326         rather than a HOST_WIDE_INT.
13327         * config/aarch64/aarch64.h (aarch64_frame): Protect with
13328         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
13329         hard_fp_offset, frame_size, initial_adjust, callee_offset and
13330         final_offset from HOST_WIDE_INT to poly_int64.
13331         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
13332         to_constant when getting the number of units in an Advanced SIMD
13333         mode.
13334         (aarch64_builtin_vectorized_function): Check for a constant number
13335         of units.
13336         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
13337         GET_MODE_SIZE.
13338         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
13339         attribute instead of GET_MODE_NUNITS.
13340         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
13341         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
13342         GET_MODE_SIZE for fixed-size registers.
13343         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
13344         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
13345         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
13346         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
13347         (aarch64_print_operand, aarch64_print_address_internal)
13348         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
13349         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
13350         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
13351         Handle polynomial GET_MODE_SIZE.
13352         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
13353         wider than SImode without modification.
13354         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
13355         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
13356         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
13357         passing and returning SVE modes.
13358         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
13359         rather than GEN_INT.
13360         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
13361         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
13362         (aarch64_allocate_and_probe_stack_space): Likewise.
13363         (aarch64_layout_frame): Cope with polynomial offsets.
13364         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
13365         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
13366         polynomial offsets.
13367         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
13368         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
13369         poly_int64 rather than a HOST_WIDE_INT.
13370         (aarch64_get_separate_components, aarch64_process_components)
13371         (aarch64_expand_prologue, aarch64_expand_epilogue)
13372         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
13373         (aarch64_anchor_offset): New function, split out from...
13374         (aarch64_legitimize_address): ...here.
13375         (aarch64_builtin_vectorization_cost): Handle polynomial
13376         TYPE_VECTOR_SUBPARTS.
13377         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
13378         GET_MODE_NUNITS.
13379         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
13380         number of elements from the PARALLEL rather than the mode.
13381         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
13382         rather than GET_MODE_BITSIZE.
13383         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
13384         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
13385         (aarch64_expand_vec_perm_const_1): Handle polynomial
13386         d->perm.length () and d->perm elements.
13387         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
13388         Apply to_constant to d->perm elements.
13389         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
13390         polynomial CONST_VECTOR_NUNITS.
13391         (aarch64_move_pointer): Take amount as a poly_int64 rather
13392         than an int.
13393         (aarch64_progress_pointer): Avoid temporary variable.
13394         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
13395         the mode attribute instead of GET_MODE.
13397 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
13398             Alan Hayward  <alan.hayward@arm.com>
13399             David Sherwood  <david.sherwood@arm.com>
13401         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
13402         x exists before using it.
13403         (aarch64_add_constant_internal): Rename to...
13404         (aarch64_add_offset_1): ...this.  Replace regnum with separate
13405         src and dest rtxes.  Handle the case in which they're different,
13406         including when the offset is zero.  Replace scratchreg with an rtx.
13407         Use 2 additions if there is no spare register into which we can
13408         move a 16-bit constant.
13409         (aarch64_add_constant): Delete.
13410         (aarch64_add_offset): Replace reg with separate src and dest
13411         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
13412         Use aarch64_add_offset_1.
13413         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
13414         an rtx rather than an int.  Take the delta as a poly_int64
13415         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
13416         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
13417         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
13418         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
13419         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
13420         and aarch64_add_sp.
13421         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
13422         aarch64_add_constant.
13424 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
13426         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
13427         Use scalar_float_mode.
13429 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
13431         * config/aarch64/aarch64-simd.md
13432         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
13433         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
13434         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
13435         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
13436         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
13437         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
13438         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
13439         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
13440         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
13441         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
13443 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
13445         PR target/83514
13446         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
13447         targ_options->x_arm_arch_string is non NULL.
13449 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
13451         * config/aarch64/aarch64.h
13452         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
13454 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
13456         PR target/82096
13457         * expmed.c (emit_store_flag_force): Swap if const op0
13458         and change VOIDmode to mode of op0.
13460 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
13462         PR rtl-optimization/83761
13463         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
13464         than bytes to mode_for_size.
13466 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
13468         PR middle-end/83189
13469         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
13470         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
13471         profile.
13473 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
13475         PR middle-end/83575
13476         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
13477         when in layout mode.
13478         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
13479         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
13480         partition fixup.
13482 2018-01-10  Michael Collison  <michael.collison@arm.com>
13484         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
13485         * config/aarch64/aarch64-option-extension.def: Add
13486         AARCH64_OPT_EXTENSION of 'fp16fml'.
13487         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
13488         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
13489         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
13490         * config/aarch64/constraints.md (Ui7): New constraint.
13491         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
13492         (VFMLA_SEL_W): Ditto.
13493         (f16quad): Ditto.
13494         (f16mac1): Ditto.
13495         (VFMLA16_LOW): New int iterator.
13496         (VFMLA16_HIGH): Ditto.
13497         (UNSPEC_FMLAL): New unspec.
13498         (UNSPEC_FMLSL): Ditto.
13499         (UNSPEC_FMLAL2): Ditto.
13500         (UNSPEC_FMLSL2): Ditto.
13501         (f16mac): New code attribute.
13502         * config/aarch64/aarch64-simd-builtins.def
13503         (aarch64_fmlal_lowv2sf): Ditto.
13504         (aarch64_fmlsl_lowv2sf): Ditto.
13505         (aarch64_fmlalq_lowv4sf): Ditto.
13506         (aarch64_fmlslq_lowv4sf): Ditto.
13507         (aarch64_fmlal_highv2sf): Ditto.
13508         (aarch64_fmlsl_highv2sf): Ditto.
13509         (aarch64_fmlalq_highv4sf): Ditto.
13510         (aarch64_fmlslq_highv4sf): Ditto.
13511         (aarch64_fmlal_lane_lowv2sf): Ditto.
13512         (aarch64_fmlsl_lane_lowv2sf): Ditto.
13513         (aarch64_fmlal_laneq_lowv2sf): Ditto.
13514         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
13515         (aarch64_fmlalq_lane_lowv4sf): Ditto.
13516         (aarch64_fmlsl_lane_lowv4sf): Ditto.
13517         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
13518         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
13519         (aarch64_fmlal_lane_highv2sf): Ditto.
13520         (aarch64_fmlsl_lane_highv2sf): Ditto.
13521         (aarch64_fmlal_laneq_highv2sf): Ditto.
13522         (aarch64_fmlsl_laneq_highv2sf): Ditto.
13523         (aarch64_fmlalq_lane_highv4sf): Ditto.
13524         (aarch64_fmlsl_lane_highv4sf): Ditto.
13525         (aarch64_fmlalq_laneq_highv4sf): Ditto.
13526         (aarch64_fmlsl_laneq_highv4sf): Ditto.
13527         * config/aarch64/aarch64-simd.md:
13528         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
13529         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
13530         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
13531         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
13532         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
13533         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
13534         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
13535         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
13536         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
13537         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
13538         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
13539         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
13540         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
13541         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
13542         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
13543         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
13544         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
13545         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
13546         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
13547         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
13548         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
13549         (vfmlsl_low_u32): Ditto.
13550         (vfmlalq_low_u32): Ditto.
13551         (vfmlslq_low_u32): Ditto.
13552         (vfmlal_high_u32): Ditto.
13553         (vfmlsl_high_u32): Ditto.
13554         (vfmlalq_high_u32): Ditto.
13555         (vfmlslq_high_u32): Ditto.
13556         (vfmlal_lane_low_u32): Ditto.
13557         (vfmlsl_lane_low_u32): Ditto.
13558         (vfmlal_laneq_low_u32): Ditto.
13559         (vfmlsl_laneq_low_u32): Ditto.
13560         (vfmlalq_lane_low_u32): Ditto.
13561         (vfmlslq_lane_low_u32): Ditto.
13562         (vfmlalq_laneq_low_u32): Ditto.
13563         (vfmlslq_laneq_low_u32): Ditto.
13564         (vfmlal_lane_high_u32): Ditto.
13565         (vfmlsl_lane_high_u32): Ditto.
13566         (vfmlal_laneq_high_u32): Ditto.
13567         (vfmlsl_laneq_high_u32): Ditto.
13568         (vfmlalq_lane_high_u32): Ditto.
13569         (vfmlslq_lane_high_u32): Ditto.
13570         (vfmlalq_laneq_high_u32): Ditto.
13571         (vfmlslq_laneq_high_u32): Ditto.
13572         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
13573         (AARCH64_FL_FOR_ARCH8_4): New.
13574         (AARCH64_ISA_F16FML): New ISA flag.
13575         (TARGET_F16FML): New feature flag for fp16fml.
13576         (doc/invoke.texi): Document new fp16fml option.
13578 2018-01-10  Michael Collison  <michael.collison@arm.com>
13580         * config/aarch64/aarch64-builtins.c:
13581         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
13582         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
13583         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
13584         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
13585         (AARCH64_ISA_SHA3): New ISA flag.
13586         (TARGET_SHA3): New feature flag for sha3.
13587         * config/aarch64/iterators.md (sha512_op): New int attribute.
13588         (CRYPTO_SHA512): New int iterator.
13589         (UNSPEC_SHA512H): New unspec.
13590         (UNSPEC_SHA512H2): Ditto.
13591         (UNSPEC_SHA512SU0): Ditto.
13592         (UNSPEC_SHA512SU1): Ditto.
13593         * config/aarch64/aarch64-simd-builtins.def
13594         (aarch64_crypto_sha512hqv2di): New builtin.
13595         (aarch64_crypto_sha512h2qv2di): Ditto.
13596         (aarch64_crypto_sha512su0qv2di): Ditto.
13597         (aarch64_crypto_sha512su1qv2di): Ditto.
13598         (aarch64_eor3qv8hi): Ditto.
13599         (aarch64_rax1qv2di): Ditto.
13600         (aarch64_xarqv2di): Ditto.
13601         (aarch64_bcaxqv8hi): Ditto.
13602         * config/aarch64/aarch64-simd.md:
13603         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
13604         (aarch64_crypto_sha512su0qv2di): Ditto.
13605         (aarch64_crypto_sha512su1qv2di): Ditto.
13606         (aarch64_eor3qv8hi): Ditto.
13607         (aarch64_rax1qv2di): Ditto.
13608         (aarch64_xarqv2di): Ditto.
13609         (aarch64_bcaxqv8hi): Ditto.
13610         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
13611         (vsha512h2q_u64): Ditto.
13612         (vsha512su0q_u64): Ditto.
13613         (vsha512su1q_u64): Ditto.
13614         (veor3q_u16): Ditto.
13615         (vrax1q_u64): Ditto.
13616         (vxarq_u64): Ditto.
13617         (vbcaxq_u16): Ditto.
13618         * config/arm/types.md (crypto_sha512): New type attribute.
13619         (crypto_sha3): Ditto.
13620         (doc/invoke.texi): Document new sha3 option.
13622 2018-01-10  Michael Collison  <michael.collison@arm.com>
13624         * config/aarch64/aarch64-builtins.c:
13625         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
13626         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
13627         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
13628         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
13629         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
13630         (AARCH64_ISA_SM4): New ISA flag.
13631         (TARGET_SM4): New feature flag for sm4.
13632         * config/aarch64/aarch64-simd-builtins.def
13633         (aarch64_sm3ss1qv4si): Ditto.
13634         (aarch64_sm3tt1aq4si): Ditto.
13635         (aarch64_sm3tt1bq4si): Ditto.
13636         (aarch64_sm3tt2aq4si): Ditto.
13637         (aarch64_sm3tt2bq4si): Ditto.
13638         (aarch64_sm3partw1qv4si): Ditto.
13639         (aarch64_sm3partw2qv4si): Ditto.
13640         (aarch64_sm4eqv4si): Ditto.
13641         (aarch64_sm4ekeyqv4si): Ditto.
13642         * config/aarch64/aarch64-simd.md:
13643         (aarch64_sm3ss1qv4si): Ditto.
13644         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
13645         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
13646         (aarch64_sm4eqv4si): Ditto.
13647         (aarch64_sm4ekeyqv4si): Ditto.
13648         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
13649         (sm3part_op): Ditto.
13650         (CRYPTO_SM3TT): Ditto.
13651         (CRYPTO_SM3PART): Ditto.
13652         (UNSPEC_SM3SS1): New unspec.
13653         (UNSPEC_SM3TT1A): Ditto.
13654         (UNSPEC_SM3TT1B): Ditto.
13655         (UNSPEC_SM3TT2A): Ditto.
13656         (UNSPEC_SM3TT2B): Ditto.
13657         (UNSPEC_SM3PARTW1): Ditto.
13658         (UNSPEC_SM3PARTW2): Ditto.
13659         (UNSPEC_SM4E): Ditto.
13660         (UNSPEC_SM4EKEY): Ditto.
13661         * config/aarch64/constraints.md (Ui2): New constraint.
13662         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
13663         * config/arm/types.md (crypto_sm3): New type attribute.
13664         (crypto_sm4): Ditto.
13665         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
13666         (vsm3tt1aq_u32): Ditto.
13667         (vsm3tt1bq_u32): Ditto.
13668         (vsm3tt2aq_u32): Ditto.
13669         (vsm3tt2bq_u32): Ditto.
13670         (vsm3partw1q_u32): Ditto.
13671         (vsm3partw2q_u32): Ditto.
13672         (vsm4eq_u32): Ditto.
13673         (vsm4ekeyq_u32): Ditto.
13674         (doc/invoke.texi): Document new sm4 option.
13676 2018-01-10  Michael Collison  <michael.collison@arm.com>
13678         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
13679         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
13680         (AARCH64_FL_FOR_ARCH8_4): New.
13681         (AARCH64_FL_V8_4): New flag.
13682         (doc/invoke.texi): Document new armv8.4-a option.
13684 2018-01-10  Michael Collison  <michael.collison@arm.com>
13686         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
13687         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
13688         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
13689         * config/aarch64/aarch64-option-extension.def: Add
13690         AARCH64_OPT_EXTENSION of 'sha2'.
13691         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
13692         (crypto): Disable sha2 and aes if crypto disabled.
13693         (crypto): Enable aes and sha2 if enabled.
13694         (simd): Disable sha2 and aes if simd disabled.
13695         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
13696         New flags.
13697         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
13698         (TARGET_SHA2): New feature flag for sha2.
13699         (TARGET_AES): New feature flag for aes.
13700         * config/aarch64/aarch64-simd.md:
13701         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
13702         conditional on TARGET_AES.
13703         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
13704         (aarch64_crypto_sha1hsi): Make pattern conditional
13705         on TARGET_SHA2.
13706         (aarch64_crypto_sha1hv4si): Ditto.
13707         (aarch64_be_crypto_sha1hv4si): Ditto.
13708         (aarch64_crypto_sha1su1v4si): Ditto.
13709         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
13710         (aarch64_crypto_sha1su0v4si): Ditto.
13711         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
13712         (aarch64_crypto_sha256su0v4si): Ditto.
13713         (aarch64_crypto_sha256su1v4si): Ditto.
13714         (doc/invoke.texi): Document new aes and sha2 options.
13716 2018-01-10  Martin Sebor  <msebor@redhat.com>
13718         PR tree-optimization/83781
13719         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
13720         as string arrays.
13722 2018-01-11  Martin Sebor  <msebor@gmail.com>
13723             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
13725         PR tree-optimization/83501
13726         PR tree-optimization/81703
13728         * tree-ssa-strlen.c (get_string_cst): Rename...
13729         (get_string_len): ...to this.  Handle global constants.
13730         (handle_char_store): Adjust.
13732 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
13733             Jim Wilson  <jimw@sifive.com>
13735         * config/riscv/riscv-protos.h (riscv_output_return): New.
13736         * config/riscv/riscv.c (struct machine_function): New naked_p field.
13737         (riscv_attribute_table, riscv_output_return),
13738         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
13739         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
13740         (riscv_compute_frame_info): Only compute frame->mask if not a naked
13741         function.
13742         (riscv_expand_prologue): Add early return for naked function.
13743         (riscv_expand_epilogue): Likewise.
13744         (riscv_function_ok_for_sibcall): Return false for naked function.
13745         (riscv_set_current_function): New.
13746         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
13747         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
13748         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
13749         * doc/extend.texi (RISC-V Function Attributes): New.
13751 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
13753         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
13754         check for 128-bit long double before checking TCmode.
13755         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
13756         128-bit long doubles before checking TFmode or TCmode.
13757         (FLOAT128_IBM_P): Likewise.
13759 2018-01-10  Martin Sebor  <msebor@redhat.com>
13761         PR tree-optimization/83671
13762         * builtins.c (c_strlen): Unconditionally return zero for the empty
13763         string.
13764         Use -Warray-bounds for warnings.
13765         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
13766         for non-constant array indices with COMPONENT_REF, arrays of
13767         arrays, and pointers to arrays.
13768         (gimple_fold_builtin_strlen): Determine and set length range for
13769         non-constant character arrays.
13771 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
13773         PR middle-end/81897
13774         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
13775         empty blocks.
13777 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
13779         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
13781 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
13783         PR target/83399
13784         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
13785         VECTOR_MEM_ALTIVEC_OR_VSX_P.
13786         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
13787         indexed_or_indirect_operand predicate.
13788         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
13789         (*vsx_le_perm_load_v8hi): Likewise.
13790         (*vsx_le_perm_load_v16qi): Likewise.
13791         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
13792         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
13793         (*vsx_le_perm_store_v8hi): Likewise.
13794         (*vsx_le_perm_store_v16qi): Likewise.
13795         (eight unnamed splitters): Likewise.
13797 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
13799         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
13800         * config/rs6000/emmintrin.h: Likewise.
13801         * config/rs6000/mmintrin.h: Likewise.
13802         * config/rs6000/xmmintrin.h: Likewise.
13804 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
13806         PR c++/43486
13807         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
13808         "public_flag".
13809         * tree.c (tree_nop_conversion): Return true for location wrapper
13810         nodes.
13811         (maybe_wrap_with_location): New function.
13812         (selftest::check_strip_nops): New function.
13813         (selftest::test_location_wrappers): New function.
13814         (selftest::tree_c_tests): Call it.
13815         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
13816         (maybe_wrap_with_location): New decl.
13817         (EXPR_LOCATION_WRAPPER_P): New macro.
13818         (location_wrapper_p): New inline function.
13819         (tree_strip_any_location_wrapper): New inline function.
13821 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
13823         PR target/83735
13824         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
13825         stack_realign_offset for the largest alignment of stack slot
13826         actually used.
13827         (ix86_find_max_used_stack_alignment): New function.
13828         (ix86_finalize_stack_frame_flags): Use it.  Set
13829         max_used_stack_alignment if we don't realign stack.
13830         * config/i386/i386.h (machine_function): Add
13831         max_used_stack_alignment.
13833 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
13835         * config/arm/arm.opt (-mbranch-cost): New option.
13836         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
13837         account.
13839 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
13841         PR target/83629
13842         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
13843         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
13845 2018-01-10  Richard Biener  <rguenther@suse.de>
13847         PR debug/83765
13848         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
13849         early out so it also covers the case where we have a non-NULL
13850         origin.
13852 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
13854         PR tree-optimization/83753
13855         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
13856         for non-strided grouped accesses if the number of elements is 1.
13858 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
13860         PR target/81616
13861         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
13862         * i386.h (TARGET_USE_GATHER): Define.
13863         * x86-tune.def (X86_TUNE_USE_GATHER): New.
13865 2018-01-10  Martin Liska  <mliska@suse.cz>
13867         PR bootstrap/82831
13868         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
13869         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
13870         partitioning.
13871         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
13872         CLEANUP_NO_PARTITIONING is not set.
13874 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
13876         * doc/rtl.texi: Remove documentation of (const ...) wrappers
13877         for vectors, as a partial revert of r254296.
13878         * rtl.h (const_vec_p): Delete.
13879         (const_vec_duplicate_p): Don't test for vector CONSTs.
13880         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
13881         * expmed.c (make_tree): Likewise.
13883         Revert:
13884         * common.md (E, F): Use CONSTANT_P instead of checking for
13885         CONST_VECTOR.
13886         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
13887         checking for CONST_VECTOR.
13889 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
13891         PR middle-end/83575
13892         * predict.c (force_edge_cold): Handle in more sane way edges
13893         with no prediction.
13895 2018-01-09  Carl Love  <cel@us.ibm.com>
13897         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
13898         V4SI, V4SF types.
13899         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
13900         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
13901         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
13902         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
13903         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
13904         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
13905         * config/rs6000/rs6000-protos.h: Add extern defition for
13906         rs6000_generate_float2_double_code.
13907         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
13908         function.
13909         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
13910         (float2_v2df): Add define_expand.
13912 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
13914         PR target/83628
13915         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
13916         op_mode in the force_to_mode call.
13918 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
13920         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
13921         instead of checking each element individually.
13922         (aarch64_evpc_uzp): Likewise.
13923         (aarch64_evpc_zip): Likewise.
13924         (aarch64_evpc_ext): Likewise.
13925         (aarch64_evpc_rev): Likewise.
13926         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
13927         instead of checking each element individually.  Return true without
13928         generating rtl if
13929         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
13930         whether all selected elements come from the same input, instead of
13931         checking each element individually.  Remove calls to gen_rtx_REG,
13932         start_sequence and end_sequence and instead assert that no rtl is
13933         generated.
13935 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
13937         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
13938         order of HIGH and CONST checks.
13940 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
13942         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
13943         if the destination isn't an SSA_NAME.
13945 2018-01-09  Richard Biener  <rguenther@suse.de>
13947         PR tree-optimization/83668
13948         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
13949         move prologue...
13950         (canonicalize_loop_form): ... here, renamed from ...
13951         (canonicalize_loop_closed_ssa_form): ... this and amended to
13952         swap successor edges for loop exit blocks to make us use
13953         the RPO order we need for initial schedule generation.
13955 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
13957         PR tree-optimization/64811
13958         * match.pd: When optimizing comparisons with Inf, avoid
13959         introducing or losing exceptions from comparisons with NaN.
13961 2018-01-09  Martin Liska  <mliska@suse.cz>
13963         PR sanitizer/82517
13964         * asan.c (shadow_mem_size): Add gcc_assert.
13966 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
13968         Don't save registers in main().
13970         PR target/83738
13971         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
13972         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
13973         * config/avr/avr.c (avr_set_current_function): Don't error if
13974         naked, OS_task or OS_main are specified at the same time.
13975         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
13976         OS_main.
13977         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
13978         attribute.
13979         * common/config/avr/avr-common.c (avr_option_optimization_table):
13980         Switch on -mmain-is-OS_task for optimizing compilations.
13982 2018-01-09  Richard Biener  <rguenther@suse.de>
13984         PR tree-optimization/83572
13985         * graphite.c: Include cfganal.h.
13986         (graphite_transform_loops): Connect infinite loops to exit
13987         and remove fake edges at the end.
13989 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
13991         * ipa-inline.c (edge_badness): Revert accidental checkin.
13993 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
13995         PR ipa/80763
13996         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
13997         symbols; not inline clones.
13999 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
14001         PR target/83507
14002         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
14003         hard registers.  Formatting fixes.
14005         PR preprocessor/83722
14006         * gcc.c (try_generate_repro): Pass
14007         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
14008         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
14009         do_report_bug.
14011 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
14012             Kito Cheng  <kito.cheng@gmail.com>
14014         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
14015         (riscv_leaf_function_p): Delete.
14016         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
14018 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14020         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
14021         function.
14022         (do_ifelse): New function.
14023         (do_isel): New function.
14024         (do_sub3): New function.
14025         (do_add3): New function.
14026         (do_load_mask_compare): New function.
14027         (do_overlap_load_compare): New function.
14028         (expand_compare_loop): New function.
14029         (expand_block_compare): Call expand_compare_loop() when appropriate.
14030         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
14031         option description.
14032         (-mblock-compare-inline-loop-limit): New option.
14034 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14036         PR target/83677
14037         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
14038         Reverse order of second and third operands in first alternative.
14039         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
14040         of first and second elements in UNSPEC_VPERMR vector.
14041         (altivec_expand_vec_perm_le): Likewise.
14043 2018-01-08  Jeff Law  <law@redhat.com>
14045         PR rtl-optimizatin/81308
14046         * tree-switch-conversion.c (cfg_altered): New file scoped static.
14047         (process_switch): If group_case_labels makes a change, then set
14048         cfg_altered.
14049         (pass_convert_switch::execute): If a switch is converted, then
14050         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
14052         PR rtl-optimization/81308
14053         * recog.c (split_all_insns): Conditionally cleanup the CFG after
14054         splitting insns.
14056 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
14058         PR target/83663 - Revert r255946
14059         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
14060         generation for cases where splatting a value is not useful.
14061         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
14062         across a vec_duplicate and a paradoxical subreg forming a vector
14063         mode to a vec_concat.
14065 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14067         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
14068         -march=armv8.3-a variants.
14069         * config/arm/t-multilib: Likewise.
14070         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
14072 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14074         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
14075         to generate rtl.
14076         (cceq_ior_compare_complement): Give it a name so I can use it, and
14077         change boolean_or_operator predicate to boolean_operator so it can
14078         be used to generate a crand.
14079         (eqne): New code iterator.
14080         (bd/bd_neg): New code_attrs.
14081         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
14082         a single define_insn.
14083         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
14084         decrement (bdnzt/bdnzf/bdzt/bdzf).
14085         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
14086         with the new names of the branch decrement patterns, and added the
14087         names of the branch decrement conditional patterns.
14089 2018-01-08  Richard Biener  <rguenther@suse.de>
14091         PR tree-optimization/83563
14092         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
14093         cache.
14095 2018-01-08  Richard Biener  <rguenther@suse.de>
14097         PR middle-end/83713
14098         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
14100 2018-01-08  Richard Biener  <rguenther@suse.de>
14102         PR tree-optimization/83685
14103         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
14104         references to abnormals.
14106 2018-01-08  Richard Biener  <rguenther@suse.de>
14108         PR lto/83719
14109         * dwarf2out.c (output_indirect_strings): Handle empty
14110         skeleton_debug_str_hash.
14111         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
14113 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
14115         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
14116         (emit_store_direct): Likewise.
14117         (arc_trampoline_adjust_address): Likewise.
14118         (arc_asm_trampoline_template): New function.
14119         (arc_initialize_trampoline): Use asm_trampoline_template.
14120         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
14121         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
14122         * config/arc/arc.md (flush_icache): Delete pattern.
14124 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
14126         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
14127         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
14128         munaligned-access.
14130 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
14132         PR target/83681
14133         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
14134         by not USED_FOR_TARGET.
14135         (make_pass_resolve_sw_modes): Likewise.
14137 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
14139         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
14140         USED_FOR_TARGET.
14142 2018-01-08  Richard Biener  <rguenther@suse.de>
14144         PR middle-end/83580
14145         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
14147 2018-01-08  Richard Biener  <rguenther@suse.de>
14149         PR middle-end/83517
14150         * match.pd ((t * 2) / 2) -> t): Add missing :c.
14152 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
14154         PR middle-end/81897
14155         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
14156         basic blocks with a small number of successors.
14157         (convert_control_dep_chain_into_preds): Improve handling of
14158         forwarder blocks.
14159         (dump_predicates): Split apart into...
14160         (dump_pred_chain): ...here...
14161         (dump_pred_info): ...and here.
14162         (can_one_predicate_be_invalidated_p): Add debugging printfs.
14163         (can_chain_union_be_invalidated_p): Improve check for invalidation
14164         of paths.
14165         (uninit_uses_cannot_happen): Avoid unnecessary if
14166         convert_control_dep_chain_into_preds yielded nothing.
14168 2018-01-06  Martin Sebor  <msebor@redhat.com>
14170         PR tree-optimization/83640
14171         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
14172         subtracting negative offset from size.
14173         (builtin_access::overlap): Adjust offset bounds of the access to fall
14174         within the size of the object if possible.
14176 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
14178         PR rtl-optimization/83699
14179         * expmed.c (extract_bit_field_1): Restrict the vector usage of
14180         extract_bit_field_as_subreg to cases in which the extracted
14181         value is also a vector.
14183         * lra-constraints.c (process_alt_operands): Test for the equivalence
14184         substitutions when detecting a possible reload cycle.
14186 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
14188         PR debug/83480
14189         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
14190         by default if flag_selective_schedling{,2}.  Formatting fixes.
14192         PR rtl-optimization/83682
14193         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
14194         if it has non-VECTOR_MODE element mode.
14195         (vec_duplicate_p): Likewise.
14197         PR middle-end/83694
14198         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
14199         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
14201 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
14203         PR target/83604
14204         * config/i386/i386-builtin.def
14205         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
14206         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
14207         Require also OPTION_MASK_ISA_AVX512F in addition to
14208         OPTION_MASK_ISA_GFNI.
14209         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
14210         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
14211         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
14212         to OPTION_MASK_ISA_GFNI.
14213         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
14214         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
14215         OPTION_MASK_ISA_AVX512BW.
14216         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
14217         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
14218         addition to OPTION_MASK_ISA_GFNI.
14219         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
14220         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
14221         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
14222         to OPTION_MASK_ISA_GFNI.
14223         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
14224         a requirement for all ISAs rather than any of them with a few
14225         exceptions.
14226         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
14227         processing.
14228         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
14229         bitmasks to be enabled with 3 exceptions, instead of requiring any
14230         enabled ISA with lots of exceptions.
14231         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
14232         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
14233         Change avx512bw in isa attribute to avx512f.
14234         * config/i386/sgxintrin.h: Add license boilerplate.
14235         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
14236         to __AVX512F__ and __AVX512VL to __AVX512VL__.
14237         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
14238         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
14239         defined.
14240         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
14241         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
14242         temporarily sse2 rather than sse if not enabled already.
14244         PR target/83604
14245         * config/i386/sse.md (VI248_VLBW): Rename to ...
14246         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
14247         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
14248         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
14249         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
14250         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
14251         mode iterator instead of VI248_VLBW.
14253 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
14255         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
14256         (record_modified): Skip clobbers; add debug output.
14257         (param_change_prob): Use sreal frequencies.
14259 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
14261         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
14262         punt for user-aligned variables.
14264 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
14266         * tree-chrec.c (chrec_contains_symbols): Return true for
14267         POLY_INT_CST.
14269 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
14271         PR target/82439
14272         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
14273         of (x|y) == x for BICS pattern.
14275 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
14277         PR tree-optimization/83605
14278         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
14279         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
14280         can throw.
14282 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
14284         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
14285         * config/epiphany/rtems.h: New file.
14287 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
14288             Uros Bizjak  <ubizjak@gmail.com>
14290         PR target/83554
14291         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
14292         QIreg_operand instead of register_operand predicate.
14293         * config/i386/i386.c (ix86_rop_should_change_byte_p,
14294         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
14295         comments instead of -fmitigate[-_]rop.
14297 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14299         PR bootstrap/81926
14300         * cgraphunit.c (symbol_table::compile): Switch to text_section
14301         before calling assembly_start debug hook.
14302         * run-rtl-passes.c (run_rtl_passes): Likewise.
14303         Include output.h.
14305 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
14307         * tree-vrp.c (extract_range_from_binary_expr_1): Check
14308         range_int_cst_p rather than !symbolic_range_p before calling
14309         extract_range_from_multiplicative_op_1.
14311 2018-01-04  Jeff Law  <law@redhat.com>
14313         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
14314         redundant test in assertion.
14316 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
14318         * doc/rtl.texi: Document machine_mode wrapper classes.
14320 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
14322         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
14323         using tree_to_uhwi.
14325 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
14327         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
14328         the VEC_PERM_EXPR fold to fail.
14330 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
14332         PR debug/83585
14333         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
14334         to switched_sections.
14336 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
14338         PR target/83680
14339         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
14340         test for d.testing.
14342 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
14344         PR target/83387
14345         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
14346         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
14348 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
14350         PR debug/83666
14351         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
14352         is BLKmode and bitpos not zero or mode change is needed.
14354 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
14356         PR target/83675
14357         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
14358         TARGET_VIS2.
14360 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
14362         PR target/83628
14363         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
14364         instead of MULT rtx.  Update all corresponding splitters.
14365         (*saddl_se): Ditto.
14366         (*ssub<modesuffix>): Ditto.
14367         (*ssubl_se): Ditto.
14368         (*cmp_sadd_di): Update split patterns.
14369         (*cmp_sadd_si): Ditto.
14370         (*cmp_sadd_sidi): Ditto.
14371         (*cmp_ssub_di): Ditto.
14372         (*cmp_ssub_si): Ditto.
14373         (*cmp_ssub_sidi): Ditto.
14374         * config/alpha/predicates.md (const23_operand): New predicate.
14375         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
14376         Look for ASHIFT, not MULT inner operand.
14377         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
14379 2018-01-04  Martin Liska  <mliska@suse.cz>
14381         PR gcov-profile/83669
14382         * gcov.c (output_intermediate_file): Add version to intermediate
14383         gcov file.
14384         * doc/gcov.texi: Document new field 'version' in intermediate
14385         file format. Fix location of '-k' option of gcov command.
14387 2018-01-04  Martin Liska  <mliska@suse.cz>
14389         PR ipa/82352
14390         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
14392 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
14394         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
14396 2018-01-03  Martin Sebor  <msebor@redhat.com>
14398         PR tree-optimization/83655
14399         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
14400         checking calls with invalid arguments.
14402 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14404         * tree-vect-stmts.c (vect_get_store_rhs): New function.
14405         (vectorizable_mask_load_store): Delete.
14406         (vectorizable_call): Return false for masked loads and stores.
14407         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
14408         instead of gimple_assign_rhs1.
14409         (vectorizable_load): Handle IFN_MASK_LOAD.
14410         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
14412 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14414         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
14415         split out from..,
14416         (vectorizable_mask_load_store): ...here.
14417         (vectorizable_load): ...and here.
14419 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14421         * tree-vect-stmts.c (vect_build_all_ones_mask)
14422         (vect_build_zero_merge_argument): New functions, split out from...
14423         (vectorizable_load): ...here.
14425 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14427         * tree-vect-stmts.c (vect_check_store_rhs): New function,
14428         split out from...
14429         (vectorizable_mask_load_store): ...here.
14430         (vectorizable_store): ...and here.
14432 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14434         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
14435         split out from...
14436         (vectorizable_mask_load_store): ...here.
14438 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14440         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
14441         (vect_model_store_cost): Take a vec_load_store_type instead of a
14442         vect_def_type.
14443         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
14444         (vect_model_store_cost): Take a vec_load_store_type instead of a
14445         vect_def_type.
14446         (vectorizable_mask_load_store): Update accordingly.
14447         (vectorizable_store): Likewise.
14448         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
14450 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14452         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
14453         IFN_MASK_LOAD calls here rather than...
14454         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
14456 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14457             Alan Hayward  <alan.hayward@arm.com>
14458             David Sherwood  <david.sherwood@arm.com>
14460         * expmed.c (extract_bit_field_1): For vector extracts,
14461         fall back to extract_bit_field_as_subreg if vec_extract
14462         isn't available.
14464 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14465             Alan Hayward  <alan.hayward@arm.com>
14466             David Sherwood  <david.sherwood@arm.com>
14468         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
14469         they are variable or constant sized.
14470         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
14471         slots for constant-sized data.
14473 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14474             Alan Hayward  <alan.hayward@arm.com>
14475             David Sherwood  <david.sherwood@arm.com>
14477         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
14478         handling COND_EXPRs with boolean comparisons, try to find a better
14479         basis for the mask type than the boolean itself.
14481 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14483         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
14484         is calculated and how it can be overridden.
14485         * genmodes.c (max_bitsize_mode_any_mode): New variable.
14486         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
14487         if defined.
14488         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
14489         if nonzero.
14491 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14492             Alan Hayward  <alan.hayward@arm.com>
14493             David Sherwood  <david.sherwood@arm.com>
14495         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
14496         Remove the mode argument.
14497         (aarch64_simd_valid_immediate): Remove the mode and inverse
14498         arguments.
14499         * config/aarch64/iterators.md (bitsize): New iterator.
14500         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
14501         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
14502         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
14503         aarch64_simd_valid_immediate.
14504         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
14505         (aarch64_reg_or_bic_imm): Likewise.
14506         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
14507         with an insn_type enum and msl with a modifier_type enum.
14508         Replace element_width with a scalar_mode.  Change the shift
14509         to unsigned int.  Add constructors for scalar_float_mode and
14510         scalar_int_mode elements.
14511         (aarch64_vect_float_const_representable_p): Delete.
14512         (aarch64_can_const_movi_rtx_p)
14513         (aarch64_simd_scalar_immediate_valid_for_move)
14514         (aarch64_simd_make_constant): Update call to
14515         aarch64_simd_valid_immediate.
14516         (aarch64_advsimd_valid_immediate_hs): New function.
14517         (aarch64_advsimd_valid_immediate): Likewise.
14518         (aarch64_simd_valid_immediate): Remove mode and inverse
14519         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
14520         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
14521         and aarch64_float_const_representable_p on the result.
14522         (aarch64_output_simd_mov_immediate): Remove mode argument.
14523         Update call to aarch64_simd_valid_immediate and use of
14524         simd_immediate_info.
14525         (aarch64_output_scalar_simd_mov_immediate): Update call
14526         accordingly.
14528 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14529             Alan Hayward  <alan.hayward@arm.com>
14530             David Sherwood  <david.sherwood@arm.com>
14532         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
14533         (mode_nunits): Likewise CONST_MODE_NUNITS.
14534         * machmode.def (ADJUST_NUNITS): Document.
14535         * genmodes.c (mode_data::need_nunits_adj): New field.
14536         (blank_mode): Update accordingly.
14537         (adj_nunits): New variable.
14538         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
14539         parameter.
14540         (emit_mode_size_inline): Set need_bytesize_adj for all modes
14541         listed in adj_nunits.
14542         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
14543         listed in adj_nunits.  Don't emit case statements for such modes.
14544         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
14545         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
14546         nothing if adj_nunits is nonnull.
14547         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
14548         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
14549         (emit_mode_fbit): Update use of print_maybe_const_decl.
14550         (emit_move_size): Likewise.  Treat the array as non-const
14551         if adj_nunits.
14552         (emit_mode_adjustments): Handle adj_nunits.
14554 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14556         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
14557         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
14558         (VECTOR_MODES): Use it.
14559         (make_vector_modes): Take the prefix as an argument.
14561 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14562             Alan Hayward  <alan.hayward@arm.com>
14563             David Sherwood  <david.sherwood@arm.com>
14565         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
14566         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
14567         for MODE_VECTOR_BOOL.
14568         * machmode.def (VECTOR_BOOL_MODE): Document.
14569         * genmodes.c (VECTOR_BOOL_MODE): New macro.
14570         (make_vector_bool_mode): New function.
14571         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
14572         MODE_VECTOR_BOOL.
14573         * lto-streamer-in.c (lto_input_mode_table): Likewise.
14574         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
14575         Likewise.
14576         * stor-layout.c (int_mode_for_mode): Likewise.
14577         * tree.c (build_vector_type_for_mode): Likewise.
14578         * varasm.c (output_constant_pool_2): Likewise.
14579         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
14580         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
14581         for MODE_VECTOR_BOOL.
14582         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
14583         of mode class checks.
14584         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
14585         instead of a list of mode class checks.
14586         (expand_vector_scalar_condition): Likewise.
14587         (type_for_widest_vector_mode): Handle BImode as an inner mode.
14589 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14590             Alan Hayward  <alan.hayward@arm.com>
14591             David Sherwood  <david.sherwood@arm.com>
14593         * machmode.h (mode_size): Change from unsigned short to
14594         poly_uint16_pod.
14595         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
14596         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
14597         or if measurement_type is not polynomial.
14598         (fixed_size_mode::includes_p): Check for constant-sized modes.
14599         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
14600         return a poly_uint16 rather than an unsigned short.
14601         (emit_mode_size): Change the type of mode_size from unsigned short
14602         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
14603         (emit_mode_adjustments): Cope with polynomial vector sizes.
14604         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
14605         for GET_MODE_SIZE.
14606         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
14607         for GET_MODE_SIZE.
14608         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
14609         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
14610         * caller-save.c (setup_save_areas): Likewise.
14611         (replace_reg_with_saved_mem): Likewise.
14612         * calls.c (emit_library_call_value_1): Likewise.
14613         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
14614         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
14615         (gen_lowpart_for_combine): Likewise.
14616         * convert.c (convert_to_integer_1): Likewise.
14617         * cse.c (equiv_constant, cse_insn): Likewise.
14618         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
14619         (cselib_subst_to_values): Likewise.
14620         * dce.c (word_dce_process_block): Likewise.
14621         * df-problems.c (df_word_lr_mark_ref): Likewise.
14622         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
14623         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
14624         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
14625         (rtl_for_decl_location): Likewise.
14626         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
14627         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
14628         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
14629         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
14630         (expand_expr_real_1): Likewise.
14631         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
14632         (pad_below): Likewise.
14633         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
14634         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
14635         * ira.c (get_subreg_tracking_sizes): Likewise.
14636         * ira-build.c (ira_create_allocno_objects): Likewise.
14637         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
14638         (ira_sort_regnos_for_alter_reg): Likewise.
14639         * ira-costs.c (record_operand_costs): Likewise.
14640         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
14641         (resolve_simple_move): Likewise.
14642         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
14643         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
14644         (lra_constraints): Likewise.
14645         (CONST_POOL_OK_P): Reject variable-sized modes.
14646         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
14647         (add_pseudo_to_slot, lra_spill): Likewise.
14648         * omp-low.c (omp_clause_aligned_alignment): Likewise.
14649         * optabs-query.c (get_best_extraction_insn): Likewise.
14650         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
14651         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
14652         (expand_mult_highpart, valid_multiword_target_p): Likewise.
14653         * recog.c (offsettable_address_addr_space_p): Likewise.
14654         * regcprop.c (maybe_mode_change): Likewise.
14655         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
14656         * regrename.c (build_def_use): Likewise.
14657         * regstat.c (dump_reg_info): Likewise.
14658         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
14659         (find_reloads, find_reloads_subreg_address): Likewise.
14660         * reload1.c (eliminate_regs_1): Likewise.
14661         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
14662         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
14663         (simplify_binary_operation_1, simplify_subreg): Likewise.
14664         * targhooks.c (default_function_arg_padding): Likewise.
14665         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
14666         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
14667         (verify_gimple_assign_ternary): Likewise.
14668         * tree-inline.c (estimate_move_cost): Likewise.
14669         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14670         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
14671         (get_address_cost_ainc): Likewise.
14672         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
14673         (vect_supportable_dr_alignment): Likewise.
14674         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
14675         (vectorizable_reduction): Likewise.
14676         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
14677         (vectorizable_operation, vectorizable_load): Likewise.
14678         * tree.c (build_same_sized_truth_vector_type): Likewise.
14679         * valtrack.c (cleanup_auto_inc_dec): Likewise.
14680         * var-tracking.c (emit_note_insn_var_location): Likewise.
14681         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
14682         (ADDR_VEC_ALIGN): Likewise.
14684 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14685             Alan Hayward  <alan.hayward@arm.com>
14686             David Sherwood  <david.sherwood@arm.com>
14688         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
14689         unsigned short.
14690         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
14691         or if measurement_type is polynomial.
14692         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
14693         * combine.c (make_extraction): Likewise.
14694         * dse.c (find_shift_sequence): Likewise.
14695         * dwarf2out.c (mem_loc_descriptor): Likewise.
14696         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
14697         (extract_bit_field, extract_low_bits): Likewise.
14698         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
14699         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
14700         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
14701         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
14702         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
14703         * reload.c (find_reloads): Likewise.
14704         * reload1.c (alter_reg): Likewise.
14705         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
14706         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
14707         * tree-if-conv.c (predicate_mem_writes): Likewise.
14708         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
14709         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
14710         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
14711         * valtrack.c (dead_debug_insert_temp): Likewise.
14712         * varasm.c (mergeable_constant_section): Likewise.
14713         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
14715 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14716             Alan Hayward  <alan.hayward@arm.com>
14717             David Sherwood  <david.sherwood@arm.com>
14719         * expr.c (expand_assignment): Cope with polynomial mode sizes
14720         when assigning to a CONCAT.
14722 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14723             Alan Hayward  <alan.hayward@arm.com>
14724             David Sherwood  <david.sherwood@arm.com>
14726         * machmode.h (mode_precision): Change from unsigned short to
14727         poly_uint16_pod.
14728         (mode_to_precision): Return a poly_uint16 rather than an unsigned
14729         short.
14730         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
14731         or if measurement_type is not polynomial.
14732         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
14733         in which the mode is already known to be a scalar_int_mode.
14734         * genmodes.c (emit_mode_precision): Change the type of mode_precision
14735         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
14736         initializer.
14737         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
14738         for GET_MODE_PRECISION.
14739         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
14740         for GET_MODE_PRECISION.
14741         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
14742         as polynomial.
14743         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
14744         (expand_field_assignment, make_extraction): Likewise.
14745         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
14746         (get_last_value): Likewise.
14747         * convert.c (convert_to_integer_1): Likewise.
14748         * cse.c (cse_insn): Likewise.
14749         * expr.c (expand_expr_real_1): Likewise.
14750         * lra-constraints.c (simplify_operand_subreg): Likewise.
14751         * optabs-query.c (can_atomic_load_p): Likewise.
14752         * optabs.c (expand_atomic_load): Likewise.
14753         (expand_atomic_store): Likewise.
14754         * ree.c (combine_reaching_defs): Likewise.
14755         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
14756         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
14757         * tree.h (type_has_mode_precision_p): Likewise.
14758         * ubsan.c (instrument_si_overflow): Likewise.
14760 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14761             Alan Hayward  <alan.hayward@arm.com>
14762             David Sherwood  <david.sherwood@arm.com>
14764         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
14765         polynomial numbers of units.
14766         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
14767         (valid_vector_subparts_p): New function.
14768         (build_vector_type): Remove temporary shim and take the number
14769         of units as a poly_uint64 rather than an int.
14770         (build_opaque_vector_type): Take the number of units as a
14771         poly_uint64 rather than an int.
14772         * tree.c (build_vector_from_ctor): Handle polynomial
14773         TYPE_VECTOR_SUBPARTS.
14774         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
14775         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
14776         (build_vector_from_val): If the number of units is variable,
14777         use build_vec_duplicate_cst for constant operands and
14778         VEC_DUPLICATE_EXPR otherwise.
14779         (make_vector_type): Remove temporary is_constant ().
14780         (build_vector_type, build_opaque_vector_type): Take the number of
14781         units as a poly_uint64 rather than an int.
14782         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
14783         VECTOR_CST_NELTS.
14784         * cfgexpand.c (expand_debug_expr): Likewise.
14785         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
14786         (store_constructor, expand_expr_real_1): Likewise.
14787         (const_scalar_mask_from_tree): Likewise.
14788         * fold-const-call.c (fold_const_reduction): Likewise.
14789         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
14790         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
14791         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
14792         (fold_relational_const): Likewise.
14793         (native_interpret_vector): Likewise.  Change the size from an
14794         int to an unsigned int.
14795         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
14796         TYPE_VECTOR_SUBPARTS.
14797         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
14798         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
14799         duplicating a non-constant operand into a variable-length vector.
14800         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
14801         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
14802         * ipa-icf.c (sem_variable::equals): Likewise.
14803         * match.pd: Likewise.
14804         * omp-simd-clone.c (simd_clone_subparts): Likewise.
14805         * print-tree.c (print_node): Likewise.
14806         * stor-layout.c (layout_type): Likewise.
14807         * targhooks.c (default_builtin_vectorization_cost): Likewise.
14808         * tree-cfg.c (verify_gimple_comparison): Likewise.
14809         (verify_gimple_assign_binary): Likewise.
14810         (verify_gimple_assign_ternary): Likewise.
14811         (verify_gimple_assign_single): Likewise.
14812         * tree-pretty-print.c (dump_generic_node): Likewise.
14813         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14814         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
14815         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
14816         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
14817         (vect_shift_permute_load_chain): Likewise.
14818         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
14819         (expand_vector_condition, optimize_vector_constructor): Likewise.
14820         (lower_vec_perm, get_compute_type): Likewise.
14821         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
14822         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
14823         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
14824         (vect_recog_mask_conversion_pattern): Likewise.
14825         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
14826         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
14827         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14828         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
14829         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
14830         (vectorizable_shift, vectorizable_operation, vectorizable_store)
14831         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
14832         (supportable_widening_operation): Likewise.
14833         (supportable_narrowing_operation): Likewise.
14834         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
14835         Likewise.
14836         * varasm.c (output_constant): Likewise.
14838 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14839             Alan Hayward  <alan.hayward@arm.com>
14840             David Sherwood  <david.sherwood@arm.com>
14842         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
14843         so that both the length == 3 and length != 3 cases set up their
14844         own permute vectors.  Add comments explaining why we know the
14845         number of elements is constant.
14846         (vect_permute_load_chain): Likewise.
14848 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14849             Alan Hayward  <alan.hayward@arm.com>
14850             David Sherwood  <david.sherwood@arm.com>
14852         * machmode.h (mode_nunits): Change from unsigned char to
14853         poly_uint16_pod.
14854         (ONLY_FIXED_SIZE_MODES): New macro.
14855         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
14856         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
14857         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
14858         New typedefs.
14859         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
14860         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
14861         or if measurement_type is not polynomial.
14862         * genmodes.c (ZERO_COEFFS): New macro.
14863         (emit_mode_nunits_inline): Make mode_nunits_inline return a
14864         poly_uint16.
14865         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
14866         Use ZERO_COEFFS when emitting initializers.
14867         * data-streamer.h (bp_pack_poly_value): New function.
14868         (bp_unpack_poly_value): Likewise.
14869         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
14870         for GET_MODE_NUNITS.
14871         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
14872         for GET_MODE_NUNITS.
14873         * tree.c (make_vector_type): Remove temporary shim and make
14874         the real function take the number of units as a poly_uint64
14875         rather than an int.
14876         (build_vector_type_for_mode): Handle polynomial nunits.
14877         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
14878         * emit-rtl.c (const_vec_series_p_1): Likewise.
14879         (gen_rtx_CONST_VECTOR): Likewise.
14880         * fold-const.c (test_vec_duplicate_folding): Likewise.
14881         * genrecog.c (validate_pattern): Likewise.
14882         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
14883         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
14884         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
14885         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
14886         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
14887         * rtlanal.c (subreg_get_info): Likewise.
14888         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
14889         (vect_grouped_load_supported): Likewise.
14890         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
14891         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
14892         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
14893         (simplify_const_unary_operation, simplify_binary_operation_1)
14894         (simplify_const_binary_operation, simplify_ternary_operation)
14895         (test_vector_ops_duplicate, test_vector_ops): Likewise.
14896         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
14897         instead of CONST_VECTOR_NUNITS.
14898         * varasm.c (output_constant_pool_2): Likewise.
14899         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
14900         explicit-encoded elements in the XVEC for variable-length vectors.
14902 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14904         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
14906 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14907             Alan Hayward  <alan.hayward@arm.com>
14908             David Sherwood  <david.sherwood@arm.com>
14910         * coretypes.h (fixed_size_mode): Declare.
14911         (fixed_size_mode_pod): New typedef.
14912         * builtins.h (target_builtins::x_apply_args_mode)
14913         (target_builtins::x_apply_result_mode): Change type to
14914         fixed_size_mode_pod.
14915         * builtins.c (apply_args_size, apply_result_size, result_vector)
14916         (expand_builtin_apply_args_1, expand_builtin_apply)
14917         (expand_builtin_return): Update accordingly.
14919 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14921         * cse.c (hash_rtx_cb): Hash only the encoded elements.
14922         * cselib.c (cselib_hash_rtx): Likewise.
14923         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
14924         CONST_VECTOR encoding.
14926 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
14927             Jeff Law  <law@redhat.com>
14929         PR target/83641
14930         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
14931         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
14932         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
14933         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
14935         PR target/83641
14936         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
14937         explicitly probe *sp in a noreturn function if there were any callee
14938         register saves or frame pointer is needed.
14940 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
14942         PR debug/83621
14943         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
14944         BLKmode for ternary, binary or unary expressions.
14946         PR debug/83645
14947         * var-tracking.c (delete_vta_debug_insn): New inline function.
14948         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
14949         insns from get_insns () to NULL instead of each bb separately.
14950         Use delete_vta_debug_insn.  No longer static.
14951         (vt_debug_insns_local, variable_tracking_main_1): Adjust
14952         delete_vta_debug_insns callers.
14953         * rtl.h (delete_vta_debug_insns): Declare.
14954         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
14955         instead of variable_tracking_main.
14957 2018-01-03  Martin Sebor  <msebor@redhat.com>
14959         PR tree-optimization/83603
14960         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
14961         arguments past the endof the argument list in functions declared
14962         without a prototype.
14963         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
14964         Avoid checking when arguments are null.
14966 2018-01-03  Martin Sebor  <msebor@redhat.com>
14968         PR c/83559
14969         * doc/extend.texi (attribute const): Fix a typo.
14970         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
14971         issuing -Wsuggest-attribute for void functions.
14973 2018-01-03  Martin Sebor  <msebor@redhat.com>
14975         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
14976         offset_int::from instead of wide_int::to_shwi.
14977         (maybe_diag_overlap): Remove assertion.
14978         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
14979         * gimple-ssa-sprintf.c (format_directive): Same.
14980         (parse_directive): Same.
14981         (sprintf_dom_walker::compute_format_length): Same.
14982         (try_substitute_return_value): Same.
14984 2018-01-03  Jeff Law  <law@redhat.com>
14986         PR middle-end/83654
14987         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
14988         non-constant residual for zero at runtime and avoid probing in
14989         that case.  Reorganize code for trailing problem to mirror handling
14990         of the residual.
14992 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
14994         PR tree-optimization/83501
14995         * tree-ssa-strlen.c (get_string_cst): New.
14996         (handle_char_store): Call get_string_cst.
14998 2018-01-03  Martin Liska  <mliska@suse.cz>
15000         PR tree-optimization/83593
15001         * tree-ssa-strlen.c: Include tree-cfg.h.
15002         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
15003         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
15004         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
15005         to false.
15006         (strlen_dom_walker::before_dom_children): Call
15007         gimple_purge_dead_eh_edges. Dump tranformation with details
15008         dump flags.
15009         (strlen_dom_walker::before_dom_children): Update call by adding
15010         new argument cleanup_eh.
15011         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
15013 2018-01-03  Martin Liska  <mliska@suse.cz>
15015         PR ipa/83549
15016         * cif-code.def (VARIADIC_THUNK): New enum value.
15017         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
15018         thunks.
15020 2018-01-03  Jan Beulich  <jbeulich@suse.com>
15022         * sse.md (mov<mode>_internal): Tighten condition for when to use
15023         vmovdqu<ssescalarsize> for TI and OI modes.
15025 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
15027         Update copyright years.
15029 2018-01-03  Martin Liska  <mliska@suse.cz>
15031         PR ipa/83594
15032         * ipa-visibility.c (function_and_variable_visibility): Skip
15033         functions with noipa attribure.
15035 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
15037         * gcc.c (process_command): Update copyright notice dates.
15038         * gcov-dump.c (print_version): Ditto.
15039         * gcov.c (print_version): Ditto.
15040         * gcov-tool.c (print_version): Ditto.
15041         * gengtype.c (create_file): Ditto.
15042         * doc/cpp.texi: Bump @copying's copyright year.
15043         * doc/cppinternals.texi: Ditto.
15044         * doc/gcc.texi: Ditto.
15045         * doc/gccint.texi: Ditto.
15046         * doc/gcov.texi: Ditto.
15047         * doc/install.texi: Ditto.
15048         * doc/invoke.texi: Ditto.
15050 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15052         * vector-builder.h (vector_builder::m_full_nelts): Change from
15053         unsigned int to poly_uint64.
15054         (vector_builder::full_nelts): Update prototype accordingly.
15055         (vector_builder::new_vector): Likewise.
15056         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
15057         (vector_builder::operator ==): Likewise.
15058         (vector_builder::finalize): Likewise.
15059         * int-vector-builder.h (int_vector_builder::int_vector_builder):
15060         Take the number of elements as a poly_uint64 rather than an
15061         unsigned int.
15062         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
15063         from unsigned int to poly_uint64.
15064         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
15065         (vec_perm_indices::new_vector): Likewise.
15066         (vec_perm_indices::length): Likewise.
15067         (vec_perm_indices::nelts_per_input): Likewise.
15068         (vec_perm_indices::input_nelts): Likewise.
15069         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
15070         number of elements per input as a poly_uint64 rather than an
15071         unsigned int.  Use the original encoding for variable-length
15072         vectors, rather than clamping each individual element.
15073         For the second and subsequent elements in each pattern,
15074         clamp the step and base before clamping their sum.
15075         (vec_perm_indices::series_p): Handle polynomial element counts.
15076         (vec_perm_indices::all_in_range_p): Likewise.
15077         (vec_perm_indices_to_tree): Likewise.
15078         (vec_perm_indices_to_rtx): Likewise.
15079         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
15080         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
15081         (tree_vector_builder::new_binary_operation): Handle polynomial
15082         element counts.  Return false if we need to know the number
15083         of elements at compile time.
15084         * fold-const.c (fold_vec_perm): Punt if the number of elements
15085         isn't known at compile time.
15087 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15089         * vec-perm-indices.h (vec_perm_builder): Change element type
15090         from HOST_WIDE_INT to poly_int64.
15091         (vec_perm_indices::element_type): Update accordingly.
15092         (vec_perm_indices::clamp): Handle polynomial element_types.
15093         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
15094         (vec_perm_indices::all_in_range_p): Likewise.
15095         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
15096         than shwi trees.
15097         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
15098         polynomial vec_perm_indices element types.
15099         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
15100         * fold-const.c (fold_vec_perm): Likewise.
15101         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
15102         * tree-vect-generic.c (lower_vec_perm): Likewise.
15103         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
15104         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
15105         element type to HOST_WIDE_INT.
15107 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15108             Alan Hayward  <alan.hayward@arm.com>
15109             David Sherwood  <david.sherwood@arm.com>
15111         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
15112         rather than an int.  Use plus_constant.
15113         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
15114         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
15116 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15117             Alan Hayward  <alan.hayward@arm.com>
15118             David Sherwood  <david.sherwood@arm.com>
15120         * calls.c (emit_call_1, expand_call): Change struct_value_size from
15121         a HOST_WIDE_INT to a poly_int64.
15123 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15124             Alan Hayward  <alan.hayward@arm.com>
15125             David Sherwood  <david.sherwood@arm.com>
15127         * calls.c (load_register_parameters): Cope with polynomial
15128         mode sizes.  Require a constant size for BLKmode parameters
15129         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
15130         forces a parameter to be padded at the lsb end in order to
15131         fill a complete number of words, require the parameter size
15132         to be ordered wrt UNITS_PER_WORD.
15134 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15135             Alan Hayward  <alan.hayward@arm.com>
15136             David Sherwood  <david.sherwood@arm.com>
15138         * reload1.c (spill_stack_slot_width): Change element type
15139         from unsigned int to poly_uint64_pod.
15140         (alter_reg): Treat mode sizes as polynomial.
15142 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15143             Alan Hayward  <alan.hayward@arm.com>
15144             David Sherwood  <david.sherwood@arm.com>
15146         * reload.c (complex_word_subreg_p): New function.
15147         (reload_inner_reg_of_subreg, push_reload): Use it.
15149 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15150             Alan Hayward  <alan.hayward@arm.com>
15151             David Sherwood  <david.sherwood@arm.com>
15153         * lra-constraints.c (process_alt_operands): Reject matched
15154         operands whose sizes aren't ordered.
15155         (match_reload): Refer to this check here.
15157 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15158             Alan Hayward  <alan.hayward@arm.com>
15159             David Sherwood  <david.sherwood@arm.com>
15161         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
15162         that the mode size is in the set {1, 2, 4, 8, 16}.
15164 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15165             Alan Hayward  <alan.hayward@arm.com>
15166             David Sherwood  <david.sherwood@arm.com>
15168         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
15169         Use plus_constant instead of gen_rtx_PLUS.
15171 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15172             Alan Hayward  <alan.hayward@arm.com>
15173             David Sherwood  <david.sherwood@arm.com>
15175         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
15176         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
15177         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
15178         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
15179         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
15180         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
15181         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
15182         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
15183         * config/i386/i386.c (ix86_push_rounding): ...this new function.
15184         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
15185         a poly_int64.
15186         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
15187         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
15188         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
15189         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
15190         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
15191         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
15192         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
15193         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
15194         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
15195         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
15196         function.
15197         * expr.c (emit_move_resolve_push): Treat the input and result
15198         of PUSH_ROUNDING as a poly_int64.
15199         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
15200         (emit_push_insn): Likewise.
15201         * lra-eliminations.c (mark_not_eliminable): Likewise.
15202         * recog.c (push_operand): Likewise.
15203         * reload1.c (elimination_effects): Likewise.
15204         * rtlanal.c (nonzero_bits1): Likewise.
15205         * calls.c (store_one_arg): Likewise.  Require the padding to be
15206         known at compile time.
15208 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15209             Alan Hayward  <alan.hayward@arm.com>
15210             David Sherwood  <david.sherwood@arm.com>
15212         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
15213         Use plus_constant instead of gen_rtx_PLUS.
15215 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15216             Alan Hayward  <alan.hayward@arm.com>
15217             David Sherwood  <david.sherwood@arm.com>
15219         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
15220         rather than an int.
15222 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15223             Alan Hayward  <alan.hayward@arm.com>
15224             David Sherwood  <david.sherwood@arm.com>
15226         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
15227         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
15228         via stack temporaries.  Treat the mode size as polynomial too.
15230 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15231             Alan Hayward  <alan.hayward@arm.com>
15232             David Sherwood  <david.sherwood@arm.com>
15234         * expr.c (expand_expr_real_2): When handling conversions involving
15235         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
15236         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
15237         as a poly_uint64 too.
15239 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15240             Alan Hayward  <alan.hayward@arm.com>
15241             David Sherwood  <david.sherwood@arm.com>
15243         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
15245 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15246             Alan Hayward  <alan.hayward@arm.com>
15247             David Sherwood  <david.sherwood@arm.com>
15249         * combine.c (can_change_dest_mode): Handle polynomial
15250         REGMODE_NATURAL_SIZE.
15251         * expmed.c (store_bit_field_1): Likewise.
15252         * expr.c (store_constructor): Likewise.
15253         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
15254         and polynomial REGMODE_NATURAL_SIZE.
15255         (gen_lowpart_common): Likewise.
15256         * reginfo.c (record_subregs_of_mode): Likewise.
15257         * rtlanal.c (read_modify_subreg_p): Likewise.
15259 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15260             Alan Hayward  <alan.hayward@arm.com>
15261             David Sherwood  <david.sherwood@arm.com>
15263         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
15264         numbers of elements.
15266 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15267             Alan Hayward  <alan.hayward@arm.com>
15268             David Sherwood  <david.sherwood@arm.com>
15270         * match.pd: Cope with polynomial numbers of vector elements.
15272 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15273             Alan Hayward  <alan.hayward@arm.com>
15274             David Sherwood  <david.sherwood@arm.com>
15276         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
15277         in a POINTER_PLUS_EXPR.
15279 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15280             Alan Hayward  <alan.hayward@arm.com>
15281             David Sherwood  <david.sherwood@arm.com>
15283         * omp-simd-clone.c (simd_clone_subparts): New function.
15284         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
15285         (ipa_simd_modify_function_body): Likewise.
15287 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15288             Alan Hayward  <alan.hayward@arm.com>
15289             David Sherwood  <david.sherwood@arm.com>
15291         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
15292         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
15293         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
15294         (expand_vector_condition, vector_element): Likewise.
15295         (subparts_gt): New function.
15296         (get_compute_type): Use subparts_gt.
15297         (count_type_subparts): Delete.
15298         (expand_vector_operations_1): Use subparts_gt instead of
15299         count_type_subparts.
15301 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15302             Alan Hayward  <alan.hayward@arm.com>
15303             David Sherwood  <david.sherwood@arm.com>
15305         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
15306         (vect_compile_time_alias): ...this new function.  Do the calculation
15307         on poly_ints rather than trees.
15308         (vect_prune_runtime_alias_test_list): Update call accordingly.
15310 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15311             Alan Hayward  <alan.hayward@arm.com>
15312             David Sherwood  <david.sherwood@arm.com>
15314         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
15315         numbers of units.
15316         (vect_schedule_slp_instance): Likewise.
15318 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15319             Alan Hayward  <alan.hayward@arm.com>
15320             David Sherwood  <david.sherwood@arm.com>
15322         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
15323         constant and extern definitions for variable-length vectors.
15324         (vect_get_constant_vectors): Note that the number of units
15325         is known to be constant.
15327 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15328             Alan Hayward  <alan.hayward@arm.com>
15329             David Sherwood  <david.sherwood@arm.com>
15331         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
15332         of units as polynomial.  Choose between WIDE and NARROW based
15333         on multiple_p.
15335 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15336             Alan Hayward  <alan.hayward@arm.com>
15337             David Sherwood  <david.sherwood@arm.com>
15339         * tree-vect-stmts.c (simd_clone_subparts): New function.
15340         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
15342 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15343             Alan Hayward  <alan.hayward@arm.com>
15344             David Sherwood  <david.sherwood@arm.com>
15346         * tree-vect-stmts.c (vectorizable_call): Treat the number of
15347         vectors as polynomial.  Use build_index_vector for
15348         IFN_GOMP_SIMD_LANE.
15350 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15351             Alan Hayward  <alan.hayward@arm.com>
15352             David Sherwood  <david.sherwood@arm.com>
15354         * tree-vect-stmts.c (get_load_store_type): Treat the number of
15355         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
15356         for variable-length vectors.
15357         (vectorizable_mask_load_store): Treat the number of units as
15358         polynomial, asserting that it is constant if the condition has
15359         already been enforced.
15360         (vectorizable_store, vectorizable_load): Likewise.
15362 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15363             Alan Hayward  <alan.hayward@arm.com>
15364             David Sherwood  <david.sherwood@arm.com>
15366         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
15367         of units as polynomial.  Punt if we can't tell at compile time
15368         which vector contains the final result.
15370 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15371             Alan Hayward  <alan.hayward@arm.com>
15372             David Sherwood  <david.sherwood@arm.com>
15374         * tree-vect-loop.c (vectorizable_induction): Treat the number
15375         of units as polynomial.  Punt on SLP inductions.  Use an integer
15376         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
15377         cast of such a series for variable-length floating-point
15378         reductions.
15380 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15381             Alan Hayward  <alan.hayward@arm.com>
15382             David Sherwood  <david.sherwood@arm.com>
15384         * tree.h (build_index_vector): Declare.
15385         * tree.c (build_index_vector): New function.
15386         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
15387         of units as polynomial, forcibly converting it to a constant if
15388         vectorizable_reduction has already enforced the condition.
15389         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
15390         to create a {1,2,3,...} vector.
15391         (vectorizable_reduction): Treat the number of units as polynomial.
15392         Choose vectype_in based on the largest scalar element size rather
15393         than the smallest number of units.  Enforce the restrictions
15394         relied on above.
15396 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15397             Alan Hayward  <alan.hayward@arm.com>
15398             David Sherwood  <david.sherwood@arm.com>
15400         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
15401         number of units as polynomial.
15403 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15404             Alan Hayward  <alan.hayward@arm.com>
15405             David Sherwood  <david.sherwood@arm.com>
15407         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
15408         * target.def (autovectorize_vector_sizes): Return the vector sizes
15409         by pointer, using vector_sizes rather than a bitmask.
15410         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
15411         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
15412         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
15413         Likewise.
15414         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
15415         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
15416         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
15417         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
15418         * omp-general.c (omp_max_vf): Likewise.
15419         * omp-low.c (omp_clause_aligned_alignment): Likewise.
15420         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
15421         * tree-vect-loop.c (vect_analyze_loop): Likewise.
15422         * tree-vect-slp.c (vect_slp_bb): Likewise.
15423         * doc/tm.texi: Regenerate.
15424         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
15425         to a poly_uint64.
15426         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
15427         the vector size as a poly_uint64 rather than an unsigned int.
15428         (current_vector_size): Change from an unsigned int to a poly_uint64.
15429         (get_vectype_for_scalar_type): Update accordingly.
15430         * tree.h (build_truth_vector_type): Take the size and number of
15431         units as a poly_uint64 rather than an unsigned int.
15432         (build_vector_type): Add a temporary overload that takes
15433         the number of units as a poly_uint64 rather than an unsigned int.
15434         * tree.c (make_vector_type): Likewise.
15435         (build_truth_vector_type): Take the number of units as a poly_uint64
15436         rather than an unsigned int.
15438 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15439             Alan Hayward  <alan.hayward@arm.com>
15440             David Sherwood  <david.sherwood@arm.com>
15442         * target.def (get_mask_mode): Take the number of units and length
15443         as poly_uint64s rather than unsigned ints.
15444         * targhooks.h (default_get_mask_mode): Update accordingly.
15445         * targhooks.c (default_get_mask_mode): Likewise.
15446         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
15447         * doc/tm.texi: Regenerate.
15449 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15450             Alan Hayward  <alan.hayward@arm.com>
15451             David Sherwood  <david.sherwood@arm.com>
15453         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
15454         * omp-general.c (omp_max_vf): Likewise.
15455         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
15456         (expand_omp_simd): Handle polynomial safelen.
15457         * omp-low.c (omplow_simd_context): Add a default constructor.
15458         (omplow_simd_context::max_vf): Change from int to poly_uint64.
15459         (lower_rec_simd_input_clauses): Update accordingly.
15460         (lower_rec_input_clauses): Likewise.
15462 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15463             Alan Hayward  <alan.hayward@arm.com>
15464             David Sherwood  <david.sherwood@arm.com>
15466         * tree-vectorizer.h (vect_nunits_for_cost): New function.
15467         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
15468         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
15469         (vect_analyze_slp_cost): Likewise.
15470         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
15471         (vect_model_load_cost): Likewise.
15473 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15474             Alan Hayward  <alan.hayward@arm.com>
15475             David Sherwood  <david.sherwood@arm.com>
15477         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
15478         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
15479         from an unsigned int * to a poly_uint64_pod *.
15480         (calculate_unrolling_factor): New function.
15481         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
15483 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15484             Alan Hayward  <alan.hayward@arm.com>
15485             David Sherwood  <david.sherwood@arm.com>
15487         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
15488         from an unsigned int to a poly_uint64.
15489         (_loop_vec_info::slp_unrolling_factor): Likewise.
15490         (_loop_vec_info::vectorization_factor): Change from an int
15491         to a poly_uint64.
15492         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
15493         (vect_get_num_vectors): New function.
15494         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
15495         (vect_get_num_copies): Use vect_get_num_vectors.
15496         (vect_analyze_data_ref_dependences): Change max_vf from an int *
15497         to an unsigned int *.
15498         (vect_analyze_data_refs): Change min_vf from an int * to a
15499         poly_uint64 *.
15500         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
15501         than an unsigned HOST_WIDE_INT.
15502         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
15503         (vect_analyze_data_ref_dependence): Change max_vf from an int *
15504         to an unsigned int *.
15505         (vect_analyze_data_ref_dependences): Likewise.
15506         (vect_compute_data_ref_alignment): Handle polynomial vf.
15507         (vect_enhance_data_refs_alignment): Likewise.
15508         (vect_prune_runtime_alias_test_list): Likewise.
15509         (vect_shift_permute_load_chain): Likewise.
15510         (vect_supportable_dr_alignment): Likewise.
15511         (dependence_distance_ge_vf): Take the vectorization factor as a
15512         poly_uint64 rather than an unsigned HOST_WIDE_INT.
15513         (vect_analyze_data_refs): Change min_vf from an int * to a
15514         poly_uint64 *.
15515         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
15516         vfm1 as a poly_uint64 rather than an int.  Make the same change
15517         for the returned bound_scalar.
15518         (vect_gen_vector_loop_niters): Handle polynomial vf.
15519         (vect_do_peeling): Likewise.  Update call to
15520         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
15521         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
15522         be constant.
15523         * tree-vect-loop.c (vect_determine_vectorization_factor)
15524         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
15525         (vect_get_known_peeling_cost): Likewise.
15526         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
15527         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
15528         (vect_transform_loop): Likewise.  Use the lowest possible VF when
15529         updating the upper bounds of the loop.
15530         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
15531         rather than an int.
15532         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
15533         polynomial unroll factors.
15534         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
15535         (vect_make_slp_decision): Likewise.
15536         (vect_supported_load_permutation_p): Likewise, and polynomial
15537         vf too.
15538         (vect_analyze_slp_cost): Handle polynomial vf.
15539         (vect_slp_analyze_node_operations): Likewise.
15540         (vect_slp_analyze_bb_1): Likewise.
15541         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
15542         than an unsigned HOST_WIDE_INT.
15543         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
15544         (vectorizable_load): Handle polynomial vf.
15545         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
15546         a poly_uint64.
15547         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
15549 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15550             Alan Hayward  <alan.hayward@arm.com>
15551             David Sherwood  <david.sherwood@arm.com>
15553         * match.pd: Handle bit operations involving three constants
15554         and try to fold one pair.
15556 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15558         * tree-vect-loop-manip.c: Include gimple-fold.h.
15559         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
15560         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
15561         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
15562         Add a path that uses a step of VF instead of 1, but disable it
15563         for now.
15564         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
15565         and niters_no_overflow parameters.  Update calls to
15566         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
15567         Create a new SSA name if the latter choses to use a ste other
15568         than zero, and return it via niters_vector_mult_vf_var.
15569         * tree-vect-loop.c (vect_transform_loop): Update calls to
15570         vect_do_peeling, vect_gen_vector_loop_niters and
15571         slpeel_make_loop_iterate_ntimes.
15572         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
15573         (vect_gen_vector_loop_niters): Update declarations after above changes.
15575 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
15577         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
15578         128-bit round to integer instructions.
15579         (ceil<mode>2): Likewise.
15580         (btrunc<mode>2): Likewise.
15581         (round<mode>2): Likewise.
15583 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
15585         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
15586         unaligned VSX load/store on P8/P9.
15587         (expand_block_clear): Allow the use of unaligned VSX
15588         load/store on P8/P9.
15590 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15592         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
15593         New function.
15594         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
15595         swap associated with both a load and a store.
15597 2018-01-02  Andrew Waterman  <andrew@sifive.com>
15599         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
15600         * config/riscv/riscv.md (clear_cache): Use it.
15602 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
15604         * web.c: Remove out-of-date comment.
15606 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
15608         * expr.c (fixup_args_size_notes): Check that any existing
15609         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
15610         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
15611         (emit_single_push_insn): ...here.
15613 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
15615         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
15616         (const_vector_encoded_nelts): New function.
15617         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
15618         (const_vector_int_elt, const_vector_elt): Declare.
15619         * emit-rtl.c (const_vector_int_elt_1): New function.
15620         (const_vector_elt): Likewise.
15621         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
15622         of CONST_VECTOR_ELT.
15624 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
15626         * expr.c: Include rtx-vector-builder.h.
15627         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
15628         directly on the tree encoding.
15629         (const_vector_from_tree): Likewise.
15630         * optabs.c: Include rtx-vector-builder.h.
15631         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
15632         sequence of "u" values.
15633         * vec-perm-indices.c: Include rtx-vector-builder.h.
15634         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
15635         directly on the vec_perm_indices encoding.
15637 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
15639         * doc/rtl.texi (const_vector): Describe new encoding scheme.
15640         * Makefile.in (OBJS): Add rtx-vector-builder.o.
15641         * rtx-vector-builder.h: New file.
15642         * rtx-vector-builder.c: Likewise.
15643         * rtl.h (rtx_def::u2): Add a const_vector field.
15644         (CONST_VECTOR_NPATTERNS): New macro.
15645         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
15646         (CONST_VECTOR_DUPLICATE_P): Likewise.
15647         (CONST_VECTOR_STEPPED_P): Likewise.
15648         (CONST_VECTOR_ENCODED_ELT): Likewise.
15649         (const_vec_duplicate_p): Check for a duplicated vector encoding.
15650         (unwrap_const_vec_duplicate): Likewise.
15651         (const_vec_series_p): Check for a non-duplicated vector encoding.
15652         Say that the function only returns true for integer vectors.
15653         * emit-rtl.c: Include rtx-vector-builder.h.
15654         (gen_const_vec_duplicate_1): Delete.
15655         (gen_const_vector): Call gen_const_vec_duplicate instead of
15656         gen_const_vec_duplicate_1.
15657         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
15658         (gen_const_vec_duplicate): Use rtx_vector_builder.
15659         (gen_const_vec_series): Likewise.
15660         (gen_rtx_CONST_VECTOR): Likewise.
15661         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
15662         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
15663         Build a new vector rather than modifying a CONST_VECTOR in-place.
15664         (handle_special_swappables): Update call accordingly.
15665         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
15666         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
15667         Build a new vector rather than modifying a CONST_VECTOR in-place.
15668         (handle_special_swappables): Update call accordingly.
15670 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
15672         * simplify-rtx.c (simplify_const_binary_operation): Use
15673         CONST_VECTOR_ELT instead of XVECEXP.
15675 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
15677         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
15678         the selector elements to be different from the data elements
15679         if the selector is a VECTOR_CST.
15680         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
15681         ssizetype for the selector.
15683 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
15685         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
15686         before testing each element individually.
15687         * tree-vect-generic.c (lower_vec_perm): Likewise.
15689 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
15691         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
15692         * selftest-run-tests.c (selftest::run_tests): Call it.
15693         * vector-builder.h (vector_builder::operator ==): New function.
15694         (vector_builder::operator !=): Likewise.
15695         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
15696         (vec_perm_indices::all_from_input_p): New function.
15697         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
15698         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
15699         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
15700         instead of reading the VECTOR_CST directly.  Detect whether both
15701         vector inputs are the same before constructing the vec_perm_indices,
15702         and update the number of inputs argument accordingly.  Use the
15703         utility functions added above.  Only construct sel2 if we need to.
15705 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
15707         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
15708         the broadcast of the low byte.
15709         (expand_mult_highpart): Use an explicit encoding for the permutes.
15710         * optabs-query.c (can_mult_highpart_p): Likewise.
15711         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
15712         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
15713         (vectorizable_bswap): Likewise.
15714         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
15715         explicit encoding for the power-of-2 permutes.
15716         (vect_permute_store_chain): Likewise.
15717         (vect_grouped_load_supported): Likewise.
15718         (vect_permute_load_chain): Likewise.
15720 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
15722         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
15723         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
15724         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
15725         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
15726         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
15727         (vect_gen_perm_mask_any): Likewise.
15729 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
15731         * int-vector-builder.h: New file.
15732         * vec-perm-indices.h: Include int-vector-builder.h.
15733         (vec_perm_indices): Redefine as an int_vector_builder.
15734         (auto_vec_perm_indices): Delete.
15735         (vec_perm_builder): Redefine as a stand-alone class.
15736         (vec_perm_indices::vec_perm_indices): New function.
15737         (vec_perm_indices::clamp): Likewise.
15738         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
15739         (vec_perm_indices::new_vector): New function.
15740         (vec_perm_indices::new_expanded_vector): Update for new
15741         vec_perm_indices class.
15742         (vec_perm_indices::rotate_inputs): New function.
15743         (vec_perm_indices::all_in_range_p): Operate directly on the
15744         encoded form, without computing elided elements.
15745         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
15746         encoding.  Update for new vec_perm_indices class.
15747         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
15748         the given vec_perm_builder.
15749         (expand_vec_perm_var): Update vec_perm_builder constructor.
15750         (expand_mult_highpart): Use vec_perm_builder instead of
15751         auto_vec_perm_indices.
15752         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
15753         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
15754         or double series encoding as appropriate.
15755         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
15756         vec_perm_indices instead of auto_vec_perm_indices.
15757         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
15758         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
15759         (vect_permute_store_chain): Likewise.
15760         (vect_grouped_load_supported): Likewise.
15761         (vect_permute_load_chain): Likewise.
15762         (vect_shift_permute_load_chain): Likewise.
15763         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
15764         (vect_transform_slp_perm_load): Likewise.
15765         (vect_schedule_slp_instance): Likewise.
15766         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
15767         (vectorizable_mask_load_store): Likewise.
15768         (vectorizable_bswap): Likewise.
15769         (vectorizable_store): Likewise.
15770         (vectorizable_load): Likewise.
15771         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
15772         vec_perm_indices instead of auto_vec_perm_indices.  Use
15773         tree_to_vec_perm_builder to read the vector from a tree.
15774         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
15775         vec_perm_builder instead of a vec_perm_indices.
15776         (have_whole_vector_shift): Use vec_perm_builder and
15777         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
15778         truncation to calc_vec_perm_mask_for_shift.
15779         (vect_create_epilog_for_reduction): Likewise.
15780         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
15781         from auto_vec_perm_indices to vec_perm_indices.
15782         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
15783         instead of changing individual elements.
15784         (aarch64_vectorize_vec_perm_const): Use new_vector to install
15785         the vector in d.perm.
15786         * config/arm/arm.c (expand_vec_perm_d::perm): Change
15787         from auto_vec_perm_indices to vec_perm_indices.
15788         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
15789         instead of changing individual elements.
15790         (arm_vectorize_vec_perm_const): Use new_vector to install
15791         the vector in d.perm.
15792         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
15793         Update vec_perm_builder constructor.
15794         (rs6000_expand_interleave): Likewise.
15795         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
15796         (rs6000_expand_interleave): Likewise.
15798 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
15800         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
15801         to qimode could truncate the indices.
15802         * optabs.c (expand_vec_perm_var): Likewise.
15804 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
15806         * Makefile.in (OBJS): Add vec-perm-indices.o.
15807         * vec-perm-indices.h: New file.
15808         * vec-perm-indices.c: Likewise.
15809         * target.h (vec_perm_indices): Replace with a forward class
15810         declaration.
15811         (auto_vec_perm_indices): Move to vec-perm-indices.h.
15812         * optabs.h: Include vec-perm-indices.h.
15813         (expand_vec_perm): Delete.
15814         (selector_fits_mode_p, expand_vec_perm_var): Declare.
15815         (expand_vec_perm_const): Declare.
15816         * target.def (vec_perm_const_ok): Replace with...
15817         (vec_perm_const): ...this new hook.
15818         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
15819         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
15820         * doc/tm.texi: Regenerate.
15821         * optabs.def (vec_perm_const): Delete.
15822         * doc/md.texi (vec_perm_const): Likewise.
15823         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
15824         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
15825         expand_vec_perm for constant permutation vectors.  Assert that
15826         the mode of variable permutation vectors is the integer equivalent
15827         of the mode that is being permuted.
15828         * optabs-query.h (selector_fits_mode_p): Declare.
15829         * optabs-query.c: Include vec-perm-indices.h.
15830         (selector_fits_mode_p): New function.
15831         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
15832         is defined, instead of checking whether the vec_perm_const_optab
15833         exists.  Use targetm.vectorize.vec_perm_const instead of
15834         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
15835         fit in the vector mode before using a variable permute.
15836         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
15837         vec_perm_indices instead of an rtx.
15838         (expand_vec_perm): Replace with...
15839         (expand_vec_perm_const): ...this new function.  Take the selector
15840         as a vec_perm_indices rather than an rtx.  Also take the mode of
15841         the selector.  Update call to shift_amt_for_vec_perm_mask.
15842         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
15843         Use vec_perm_indices::new_expanded_vector to expand the original
15844         selector into bytes.  Check whether the indices fit in the vector
15845         mode before using a variable permute.
15846         (expand_vec_perm_var): Make global.
15847         (expand_mult_highpart): Use expand_vec_perm_const.
15848         * fold-const.c: Includes vec-perm-indices.h.
15849         * tree-ssa-forwprop.c: Likewise.
15850         * tree-vect-data-refs.c: Likewise.
15851         * tree-vect-generic.c: Likewise.
15852         * tree-vect-loop.c: Likewise.
15853         * tree-vect-slp.c: Likewise.
15854         * tree-vect-stmts.c: Likewise.
15855         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
15856         Delete.
15857         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
15858         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
15859         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
15860         (aarch64_vectorize_vec_perm_const): ...this new function.
15861         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
15862         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
15863         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
15864         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
15865         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
15866         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
15867         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
15868         into...
15869         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
15870         check for NEON modes.
15871         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
15872         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
15873         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
15874         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
15875         into...
15876         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
15877         the old VEC_PERM_CONST conditions.
15878         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
15879         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
15880         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
15881         (ia64_vectorize_vec_perm_const_ok): Merge into...
15882         (ia64_vectorize_vec_perm_const): ...this new function.
15883         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
15884         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
15885         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
15886         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
15887         * config/mips/mips.c (mips_expand_vec_perm_const)
15888         (mips_vectorize_vec_perm_const_ok): Merge into...
15889         (mips_vectorize_vec_perm_const): ...this new function.
15890         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
15891         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
15892         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
15893         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
15894         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
15895         (rs6000_expand_vec_perm_const): Delete.
15896         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
15897         Delete.
15898         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
15899         (altivec_expand_vec_perm_const_le): Take each operand individually.
15900         Operate on constant selectors rather than rtxes.
15901         (altivec_expand_vec_perm_const): Likewise.  Update call to
15902         altivec_expand_vec_perm_const_le.
15903         (rs6000_expand_vec_perm_const): Delete.
15904         (rs6000_vectorize_vec_perm_const_ok): Delete.
15905         (rs6000_vectorize_vec_perm_const): New function.
15906         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
15907         an element count and rtx array.
15908         (rs6000_expand_extract_even): Update call accordingly.
15909         (rs6000_expand_interleave): Likewise.
15910         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
15911         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
15912         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
15913         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
15914         (rs6000_expand_vec_perm_const): Delete.
15915         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
15916         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
15917         (altivec_expand_vec_perm_const_le): Take each operand individually.
15918         Operate on constant selectors rather than rtxes.
15919         (altivec_expand_vec_perm_const): Likewise.  Update call to
15920         altivec_expand_vec_perm_const_le.
15921         (rs6000_expand_vec_perm_const): Delete.
15922         (rs6000_vectorize_vec_perm_const_ok): Delete.
15923         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
15924         reference to the SPE evmerge intructions.
15925         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
15926         an element count and rtx array.
15927         (rs6000_expand_extract_even): Update call accordingly.
15928         (rs6000_expand_interleave): Likewise.
15929         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
15930         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
15931         new function.
15932         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
15934 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
15936         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
15937         vector mode and that that mode matches the mode of the data
15938         being permuted.
15939         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
15940         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
15941         directly using expand_vec_perm_1 when forcing selectors into
15942         registers.
15943         (expand_vec_perm_var): New function, split out from expand_vec_perm.
15945 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
15947         * optabs-query.h (can_vec_perm_p): Delete.
15948         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
15949         * optabs-query.c (can_vec_perm_p): Split into...
15950         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
15951         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
15952         particular selector is valid.
15953         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
15954         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
15955         (vect_grouped_load_supported): Likewise.
15956         (vect_shift_permute_load_chain): Likewise.
15957         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
15958         (vect_transform_slp_perm_load): Likewise.
15959         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
15960         (vectorizable_bswap): Likewise.
15961         (vect_gen_perm_mask_checked): Likewise.
15962         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
15963         implementations of variable permutation vectors into account
15964         when deciding which selector to use.
15965         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
15966         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
15967         with a false third argument.
15968         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
15969         to test whether the constant selector is valid and can_vec_perm_var_p
15970         to test whether a variable selector is valid.
15972 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
15974         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
15975         * optabs-query.c (can_vec_perm_p): Likewise.
15976         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
15977         instead of vec_perm_indices.
15978         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
15979         (vect_gen_perm_mask_checked): Likewise,
15980         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
15981         (vect_gen_perm_mask_checked): Likewise,
15983 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
15985         * optabs-query.h (qimode_for_vec_perm): Declare.
15986         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
15987         (qimode_for_vec_perm): ...this new function.
15988         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
15990 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
15992         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
15993         does not have a conditional at the top.
15995 2018-01-02  Richard Biener  <rguenther@suse.de>
15997         * ipa-inline.c (big_speedup_p): Fix expression.
15999 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
16001         PR target/81616
16002         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
16003         for generic 4->6.
16005 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
16007         PR target/81616
16008         Generic tuning.
16009         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
16010         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
16011         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
16012         cond_taken_branch_cost 3->4.
16014 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
16016         PR tree-optimization/83581
16017         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
16018         TODO_cleanup_cfg if any changes have been made.
16020         PR middle-end/83608
16021         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
16022         convert_modes if target mode has the right side, but different mode
16023         class.
16025         PR middle-end/83609
16026         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
16027         last argument when extracting from CONCAT.  If either from_real or
16028         from_imag is NULL, use expansion through memory.  If result is not
16029         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
16030         the parts directly to inner mode, if even that fails, use expansion
16031         through memory.
16033         PR middle-end/83623
16034         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
16035         check for bswap in mode rather than HImode and use that in expand_unop
16036         too.
16038 Copyright (C) 2018 Free Software Foundation, Inc.
16040 Copying and distribution of this file, with or without modification,
16041 are permitted in any medium without royalty provided the copyright
16042 notice and this notice are preserved.