1 2018-06-08 Martin Liska <mliska@suse.cz>
3 * cgraph.c (symbol_table::create_edge): Always assign a new
5 (symbol_table::free_edge): Do not recycle numbers.
6 * cgraph.h (cgraph_edge::get): New method.
7 * symbol-summary.h (symtab_removal): Use it.
8 (symtab_duplication): Likewise.
9 (call_summary::hashable_uid): Remove.
11 2018-06-08 Martin Liska <mliska@suse.cz>
13 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
14 (initialize_growth_caches): Remove.
15 (free_growth_caches): Likewise.
16 (do_estimate_edge_time): Use edge_growth_cache.
17 (do_estimate_edge_size): Likewise.
18 (do_estimate_edge_hints): Likewise.
19 * ipa-inline.c (reset_edge_caches): Likewise.
20 (recursive_inlining): Likewise.
21 (inline_small_functions): Likewise.
22 * ipa-inline.h (initialize_growth_caches): Remove.
23 (estimate_edge_size): Likewise.
24 (estimate_edge_time): Likewise.
25 (estimate_edge_hints): Likewise.
26 (reset_edge_growth_cache): Likewise.
27 * symbol-summary.h (call_summary::remove): New method.
29 2018-06-08 Martin Liska <mliska@suse.cz>
31 * ipa-cp.c (class edge_clone_summary): New summary.
32 (grow_edge_clone_vectors): Remove.
33 (ipcp_edge_duplication_hook): Remove.
34 (class edge_clone_summary_t): New call_summary class.
35 (ipcp_edge_removal_hook): Remove.
36 (edge_clone_summary_t::duplicate): New function.
37 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
38 (create_specialized_node): Likewise.
39 (ipcp_driver): Initialize edge_clone_summaries and do not
42 2018-06-08 Martin Liska <mliska@suse.cz>
44 * symbol-summary.h (get): New function.
45 (call_summary::m_initialize_when_cloning): New class member.
47 2018-06-08 Martin Liska <mliska@suse.cz>
49 * cgraph.c (cgraph_node::remove): Do not recycle uid.
50 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
51 (symbol_table::allocate_cgraph_symbol): Do not set uid.
52 * passes.c (uid_hash_t): Record removed_nodes by their uids.
53 (remove_cgraph_node_from_order): Use the removed_nodes set.
54 (do_per_function_toporder): Likwise.
55 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
56 instead of summary_uid.
57 (symtab_removal): Likewise.
58 (symtab_duplication): Likewise.
60 2018-06-08 Martin Liska <mliska@suse.cz>
62 * ipa-cp.c (ipcp_store_bits_results): Use
63 ipcp_transformation_sum.
64 (ipcp_store_vr_results): Likewise.
65 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
67 (ipcp_transformation_initialize): ... this.
68 (ipa_set_node_agg_value_chain):
69 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
70 (write_ipcp_transformation_info): Likewise.
71 (read_ipcp_transformation_info): Likewise.
72 (ipcp_update_bits): Likewise.
73 (ipcp_update_vr): Likewise.
74 (ipcp_transform_function): Likewise.
75 * ipa-prop.h: Rename ipcp_transformation_summary to
77 (class ipcp_transformation_t): New function summary.
78 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
79 (ipa_get_agg_replacements_for_node): Likewise.
81 2018-06-08 Martin Liska <mliska@suse.cz>
83 * ipa-pure-const.c (struct funct_state_d): Do it class instead
85 (class funct_state_summary_t): New function_summary class.
86 (has_function_state): Remove.
87 (get_function_state): Likewise.
88 (set_function_state): Likewise.
89 (add_new_function): Likewise.
90 (funct_state_summary_t::insert): New function.
91 (duplicate_node_data): Remove.
92 (remove_node_data): Remove.
93 (funct_state_summary_t::duplicate): New function.
94 (register_hooks): Create new funct_state_summaries.
95 (pure_const_generate_summary): Use it.
96 (pure_const_write_summary): Likewise.
97 (pure_const_read_summary): Likewise.
98 (propagate_pure_const): Likewise.
99 (propagate_nothrow): Likewise.
100 (dump_malloc_lattice): Likewise.
101 (propagate_malloc): Likewise.
102 (execute): Do not register hooks, just remove summary
104 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
107 2018-06-08 Martin Liska <mliska@suse.cz>
109 * ipa-reference.c (remove_node_data): Remove.
110 (duplicate_node_data): Likewise.
111 (class ipa_ref_var_info_summary_t): New class.
112 (class ipa_ref_opt_summary_t): Likewise.
113 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
114 (get_reference_optimization_summary): Use
115 ipa_ref_opt_sum_summaries.
116 (set_reference_vars_info): Remove.
117 (set_reference_optimization_summary): Likewise.
118 (ipa_init): Create summaries.
119 (init_function_info): Use function summary.
120 (ipa_ref_opt_summary_t::duplicate): New function.
121 (ipa_ref_opt_summary_t::remove): New function.
122 (get_read_write_all_from_node): Fix GNU coding style.
123 (propagate): Use function summary.
124 (write_node_summary_p): Fix GNU coding style.
125 (stream_out_bitmap): Likewise.
126 (ipa_reference_read_optimization_summary): Use function summary.
127 (ipa_reference_c_finalize): Do not release hooks.
129 2018-06-08 Martin Liska <mliska@suse.cz>
131 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
132 (analyze_function_body): Extract multiple calls of get_create.
133 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
134 * ipa-inline.c (recursive_inlining): Use ::get method.
135 * ipa-inline.h (estimate_edge_growth): Likewise.
137 2018-06-08 Martin Liska <mliska@suse.cz>
139 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
141 (hsa_function_summary::hsa_function_summary): Use the new enum
143 (hsa_gpu_implementation_p): Use hsa_summaries::get.
144 * hsa-gen.c (hsa_get_host_function): Likewise.
145 (get_brig_function_name): Likewise.
146 * ipa-hsa.c (process_hsa_functions): Likewise.
147 (ipa_hsa_write_summary): Likewise.
148 * symbol-summary.h (symtab_duplication): Use ::get function/
151 2018-06-08 Martin Liska <mliska@suse.cz>
153 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
155 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
156 (hsa_register_kernel): Likewise.
157 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
158 * hsa-gen.c (hsa_get_host_function): Likewise.
159 (get_brig_function_name): Likewise.
160 (generate_hsa): Likewise.
161 (pass_gen_hsail::execute): Likewise.
162 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
163 (devirtualization_time_bonus): Likewise.
164 (ipcp_propagate_stage): Likewise.
165 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
166 (edge_set_predicate): Likewise.
167 (evaluate_conditions_for_known_args): Likewise.
168 (evaluate_properties_for_edge): Likewise.
169 (ipa_fn_summary::reset): Likewise.
170 (ipa_fn_summary_t::duplicate): Likewise.
171 (dump_ipa_call_summary): Likewise.
172 (ipa_dump_fn_summary): Likewise.
173 (analyze_function_body): Likewise.
174 (compute_fn_summary): Likewise.
175 (estimate_edge_devirt_benefit): Likewise.
176 (estimate_edge_size_and_time): Likewise.
177 (estimate_calls_size_and_time): Likewise.
178 (estimate_node_size_and_time): Likewise.
179 (inline_update_callee_summaries): Likewise.
180 (remap_edge_change_prob): Likewise.
181 (remap_edge_summaries): Likewise.
182 (ipa_merge_fn_summary_after_inlining): Likewise.
183 (ipa_update_overall_fn_summary): Likewise.
184 (read_ipa_call_summary): Likewise.
185 (inline_read_section): Likewise.
186 (write_ipa_call_summary): Likewise.
187 (ipa_fn_summary_write): Likewise.
188 (ipa_free_fn_summary): Likewise.
189 * ipa-hsa.c (process_hsa_functions): Likewise.
190 (ipa_hsa_write_summary): Likewise.
191 (ipa_hsa_read_section): Likewise.
192 * ipa-icf.c (sem_function::merge): Likewise.
193 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
194 (do_estimate_edge_time): Likewise.
195 (estimate_size_after_inlining): Likewise.
196 (estimate_growth): Likewise.
197 (growth_likely_positive): Likewise.
198 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
199 (inline_call): Likewise.
200 * ipa-inline.c (caller_growth_limits): Likewise.
201 (can_inline_edge_p): Likewise.
202 (can_inline_edge_by_limits_p): Likewise.
203 (compute_uninlined_call_time): Likewise.
204 (compute_inlined_call_time): Likewise.
205 (want_inline_small_function_p): Likewise.
206 (edge_badness): Likewise.
207 (update_caller_keys): Likewise.
208 (update_callee_keys): Likewise.
209 (recursive_inlining): Likewise.
210 (inline_small_functions): Likewise.
211 (inline_to_all_callers_1): Likewise.
212 (dump_overall_stats): Likewise.
213 (early_inline_small_functions): Likewise.
214 (early_inliner): Likewise.
215 * ipa-inline.h (estimate_edge_growth): Likewise.
216 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
217 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
218 * ipa-prop.h (IPA_NODE_REF): Likewise.
219 (IPA_EDGE_REF): Likewise.
220 * ipa-pure-const.c (malloc_candidate_p): Likewise.
221 (propagate_malloc): Likewise.
222 * ipa-split.c (execute_split_functions): Likewise.
223 * symbol-summary.h: Rename get to get_create.
225 (get_create): Likewise.
226 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
228 2018-06-08 Martin Liska <mliska@suse.cz>
230 * symbol-summary.h (release): Move definition out of class
232 (symtab_removal): Likewise.
233 (symtab_duplication): Likewise.
235 2018-06-08 Martin Liska <mliska@suse.cz>
237 * symbol-summary.h (function_summary): Move constructor
238 implementation out of class declaration.
240 (symtab_insertion): Likewise.
241 (symtab_removal): Likewise.
242 (symtab_duplication): Likewise.
245 2018-06-08 Martin Liska <mliska@suse.cz>
247 * Makefile.in: Remove support for MPX (macros, related functions,
248 fields in cgraph_node, ...).
249 * builtin-types.def (BT_BND): Likewise.
250 (BT_FN_BND_CONST_PTR): Likewise.
251 (BT_FN_CONST_PTR_BND): Likewise.
252 (BT_FN_VOID_PTR_BND): Likewise.
253 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
254 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
255 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
256 (expand_builtin_mempcpy_with_bounds): Likewise.
257 (expand_builtin_memset_with_bounds): Likewise.
258 (expand_builtin_memset_args): Likewise.
259 (std_expand_builtin_va_start): Likewise.
260 (expand_builtin): Likewise.
261 (expand_builtin_with_bounds): Likewise.
262 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
263 (DEF_LIB_BUILTIN_CHKP): Likewise.
264 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
265 (DEF_CHKP_BUILTIN): Likewise.
266 (BUILT_IN_MEMCPY): Likewise.
267 (BUILT_IN_MEMMOVE): Likewise.
268 (BUILT_IN_MEMPCPY): Likewise.
269 (BUILT_IN_MEMSET): Likewise.
270 (BUILT_IN_STPCPY): Likewise.
271 (BUILT_IN_STRCAT): Likewise.
272 (BUILT_IN_STRCHR): Likewise.
273 (BUILT_IN_STRCPY): Likewise.
274 (BUILT_IN_STRLEN): Likewise.
275 (BUILT_IN_MEMCPY_CHK): Likewise.
276 (BUILT_IN_MEMMOVE_CHK): Likewise.
277 (BUILT_IN_MEMPCPY_CHK): Likewise.
278 (BUILT_IN_MEMSET_CHK): Likewise.
279 (BUILT_IN_STPCPY_CHK): Likewise.
280 (BUILT_IN_STRCAT_CHK): Likewise.
281 (BUILT_IN_STRCPY_CHK): Likewise.
282 * calls.c (store_bounds): Likewise.
283 (emit_call_1): Likewise.
284 (special_function_p): Likewise.
285 (maybe_warn_nonstring_arg): Likewise.
286 (initialize_argument_information): Likewise.
287 (finalize_must_preallocate): Likewise.
288 (compute_argument_addresses): Likewise.
289 (expand_call): Likewise.
290 * cfgexpand.c (expand_call_stmt): Likewise.
291 (expand_return): Likewise.
292 (expand_gimple_stmt_1): Likewise.
293 (pass_expand::execute): Likewise.
294 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
295 (cgraph_node::remove): Likewise.
296 (cgraph_node::dump): Likewise.
297 (cgraph_node::verify_node): Likewise.
298 * cgraph.h (chkp_function_instrumented_p): Likewise.
299 (symtab_node::get_alias_target): Likewise.
300 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
301 (cgraph_local_p): Likewise.
302 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
303 (cgraph_edge::rebuild_references): Likewise.
304 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
305 (walk_polymorphic_call_targets): Likewise.
306 (cgraph_node::expand_thunk): Likewise.
307 (symbol_table::output_weakrefs): Likewise.
308 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
309 (ix86_handle_option): Likewise.
310 * config/i386/constraints.md: Likewise.
311 * config/i386/i386-builtin-types.def (BND): Likewise.
315 * config/i386/i386-builtin.def (BDESC_END): Likewise.
316 (BDESC_FIRST): Likewise.
318 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
319 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
320 * config/i386/i386.c (enum reg_class): Likewise.
321 (ix86_target_string): Likewise.
322 (ix86_option_override_internal): Likewise.
323 (ix86_conditional_register_usage): Likewise.
324 (ix86_valid_target_attribute_inner_p): Likewise.
325 (ix86_set_indirect_branch_type): Likewise.
326 (ix86_set_current_function): Likewise.
327 (ix86_function_arg_regno_p): Likewise.
328 (init_cumulative_args): Likewise.
329 (ix86_function_arg_advance): Likewise.
330 (ix86_function_arg): Likewise.
331 (ix86_pass_by_reference): Likewise.
332 (ix86_function_value_regno_p): Likewise.
333 (ix86_function_value_1): Likewise.
334 (ix86_function_value_bounds): Likewise.
335 (ix86_return_in_memory): Likewise.
336 (ix86_setup_incoming_vararg_bounds): Likewise.
337 (ix86_va_start): Likewise.
338 (indirect_thunk_need_prefix): Likewise.
339 (print_reg): Likewise.
340 (ix86_print_operand): Likewise.
341 (ix86_expand_call): Likewise.
342 (ix86_output_function_return): Likewise.
343 (reg_encoded_number): Likewise.
344 (BDESC_VERIFYS): Likewise.
345 (ix86_init_mpx_builtins): Likewise.
346 (ix86_init_builtins): Likewise.
347 (ix86_emit_cmove): Likewise.
348 (ix86_emit_move_max): Likewise.
349 (ix86_expand_builtin): Likewise.
350 (ix86_builtin_mpx_function): Likewise.
351 (ix86_get_arg_address_for_bt): Likewise.
352 (ix86_load_bounds): Likewise.
353 (ix86_store_bounds): Likewise.
354 (ix86_load_returned_bounds): Likewise.
355 (ix86_store_returned_bounds): Likewise.
356 (ix86_class_likely_spilled_p): Likewise.
357 (ix86_hard_regno_mode_ok): Likewise.
358 (x86_order_regs_for_local_alloc): Likewise.
359 (ix86_mitigate_rop): Likewise.
360 (ix86_bnd_prefixed_insn_p): Likewise.
361 (ix86_mpx_bound_mode): Likewise.
362 (ix86_make_bounds_constant): Likewise.
363 (ix86_initialize_bounds): Likewise.
364 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
365 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
366 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
367 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
368 (TARGET_CHKP_BOUND_MODE): Likewise.
369 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
370 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
371 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
372 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
373 * config/i386/i386.h (TARGET_MPX): Likewise.
374 (TARGET_MPX_P): Likewise.
375 (VALID_BND_REG_MODE): Likewise.
376 (FIRST_BND_REG): Likewise.
377 (LAST_BND_REG): Likewise.
378 (enum reg_class): Likewise.
379 (BND_REG_P): Likewise.
380 (BND_REGNO_P): Likewise.
382 (ADJUST_INSN_LENGTH): Likewise.
383 * config/i386/i386.md: Likewise.
384 * config/i386/i386.opt: Likewise.
385 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
387 (LINK_MPX): Likewise.
388 (MPX_SPEC): Likewise.
389 (LIBMPX_SPEC): Likewise.
390 (LIBMPXWRAPPERS_SPEC): Likewise.
391 (CHKP_SPEC): Likewise.
392 * config/i386/predicates.md: Likewise.
393 * dbxout.c (dbxout_type): Likewise.
394 * doc/extend.texi: Likewise.
395 * doc/invoke.texi: Likewise.
396 * doc/md.texi: Likewise.
397 * doc/tm.texi: Likewise.
398 * doc/tm.texi.in: Likewise.
399 * dwarf2out.c (is_base_type): Likewise.
400 (gen_formal_types_die): Likewise.
401 (gen_subprogram_die): Likewise.
402 (gen_type_die_with_usage): Likewise.
403 (gen_decl_die): Likewise.
404 (dwarf2out_late_global_decl): Likewise.
405 * expr.c (expand_assignment): Likewise.
406 (emit_storent_insn): Likewise.
407 (store_expr_with_bounds): Likewise.
408 (store_expr): Likewise.
409 (expand_expr_real_1): Likewise.
410 * expr.h (store_expr_with_bounds): Likewise.
411 * function.c (use_register_for_decl): Likewise.
412 (struct bounds_parm_data): Likewise.
413 (assign_parms_augmented_arg_list): Likewise.
414 (assign_parm_find_entry_rtl): Likewise.
415 (assign_parm_is_stack_parm): Likewise.
416 (assign_parm_load_bounds): Likewise.
417 (assign_bounds): Likewise.
418 (assign_parms): Likewise.
419 (expand_function_start): Likewise.
420 * gcc.c (CHKP_SPEC): Likewise.
421 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
422 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
423 (wrestrict_dom_walker::check_call): Likewise.
424 * gimple.c (gimple_build_call_from_tree): Likewise.
425 * gimple.h (enum gf_mask): Likewise.
426 (gimple_call_with_bounds_p): Likewise.
427 (gimple_call_set_with_bounds): Likewise.
428 * gimplify.c (gimplify_init_constructor): Likewise.
429 * ipa-cp.c (initialize_node_lattices): Likewise.
430 (propagate_constants_across_call): Likewise.
431 (find_more_scalar_values_for_callers_subset): Likewise.
432 * ipa-hsa.c (process_hsa_functions): Likewise.
433 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
434 * ipa-icf.c (sem_function::merge): Likewise.
435 * ipa-inline.c (early_inliner): Likewise.
436 * ipa-pure-const.c (warn_function_noreturn): Likewise.
437 (warn_function_cold): Likewise.
438 (propagate_pure_const): Likewise.
439 * ipa-ref.h (enum GTY): Likewise.
440 * ipa-split.c (find_retbnd): Likewise.
441 (consider_split): Likewise.
442 (split_function): Likewise.
443 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
444 * ipa.c (walk_polymorphic_call_targets): Likewise.
445 (symbol_table::remove_unreachable_nodes): Likewise.
446 (process_references): Likewise.
447 (cgraph_build_static_cdtor_1): Likewise.
448 * lto-cgraph.c (lto_output_node): Likewise.
449 (output_refs): Likewise.
450 (compute_ltrans_boundary): Likewise.
451 (input_overwrite_node): Likewise.
452 (input_node): Likewise.
453 (input_cgraph_1): Likewise.
454 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
455 * passes.c (pass_manager::execute_early_local_passes): Likewise.
456 (class pass_chkp_instrumentation_passes): Likewise.
457 (make_pass_chkp_instrumentation_passes): Likewise.
458 * passes.def: Likewise.
459 * rtl.h (struct GTY): Likewise.
460 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
461 * stor-layout.c (layout_type): Likewise.
462 * symtab.c: Likewise.
463 * target.def: Likewise.
464 * targhooks.c (default_chkp_bound_type): Likewise.
465 (default_chkp_bound_mode): Likewise.
466 (default_builtin_chkp_function): Likewise.
467 (default_chkp_function_value_bounds): Likewise.
468 (default_chkp_make_bounds_constant): Likewise.
469 (default_chkp_initialize_bounds): Likewise.
470 * targhooks.h (default_chkp_bound_type): Likewise.
471 (default_chkp_bound_mode): Likewise.
472 (default_builtin_chkp_function): Likewise.
473 (default_chkp_function_value_bounds): Likewise.
474 (default_chkp_make_bounds_constant): Likewise.
475 (default_chkp_initialize_bounds): Likewise.
476 * toplev.c (compile_file): Likewise.
477 (process_options): Likewise.
478 * tree-core.h (DEF_BUILTIN): Likewise.
479 (DEF_BUILTIN_CHKP): Likewise.
480 * tree-inline.c (declare_return_variable): Likewise.
481 (remap_gimple_stmt): Likewise.
483 (initialize_inlined_parameters): Likewise.
484 (expand_call_inline): Likewise.
485 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
486 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
487 (make_pass_ipa_chkp_produce_thunks): Likewise.
488 (make_pass_chkp): Likewise.
489 (make_pass_chkp_opt): Likewise.
490 (make_pass_chkp_instrumentation_passes): Likewise.
491 * tree-pretty-print.c (dump_generic_node): Likewise.
492 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
493 * tree-ssa-dce.c (propagate_necessity): Likewise.
494 (eliminate_unnecessary_stmts): Likewise.
495 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
496 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
497 * tree-ssa-sccvn.h: Likewise.
498 * tree-ssa-strlen.c (get_string_length): Likewise.
499 (valid_builtin_call): Likewise.
500 (adjust_last_stmt): Likewise.
501 (handle_builtin_strchr): Likewise.
502 (handle_builtin_strcpy): Likewise.
503 (handle_builtin_stxncpy): Likewise.
504 (handle_builtin_memcpy): Likewise.
505 (handle_builtin_strcat): Likewise.
506 (strlen_check_and_optimize_stmt): Likewise.
507 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
508 * tree-streamer-in.c: Likewise.
509 * tree-streamer.c (record_common_node): Likewise.
510 * tree.c (tree_code_size): Likewise.
511 (wide_int_to_tree_1): Likewise.
512 (type_contains_placeholder_1): Likewise.
513 (build_common_tree_nodes): Likewise.
514 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
515 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
516 (POINTER_BOUNDS_P): Likewise.
517 (BOUNDED_TYPE_P): Likewise.
518 (BOUNDED_P): Likewise.
519 (CALL_WITH_BOUNDS_P): Likewise.
520 (pointer_bounds_type_node): Likewise.
521 * value-prof.c (gimple_ic): Likewise.
522 * var-tracking.c (vt_add_function_parameters): Likewise.
523 * varasm.c (make_decl_rtl): Likewise.
524 (assemble_start_function): Likewise.
525 (output_constant): Likewise.
526 (maybe_assemble_visibility): Likewise.
527 * varpool.c (ctor_for_folding): Likewise.
528 * chkp-builtins.def: Remove.
529 * ipa-chkp.c: Remove.
530 * ipa-chkp.h: Remove.
531 * rtl-chkp.c: Remove.
532 * rtl-chkp.h: Remove.
533 * tree-chkp-opt.c: Remove.
534 * tree-chkp.c: Remove.
535 * tree-chkp.h: Remove.
537 2018-06-07 Carl Love <cel@us.ibm.com>
539 * gcc/config/rs6000/vsx.md (vextract_fp_from_shorth,
540 vextract_fp_from_shortl): Add BE support.
542 2018-06-07 Paul Koning <ni1d@arrl.net>
544 * compare-elim.c (try_merge_compare): Don't merge compare if
545 address contains a side effect.
546 (try_eliminate_compare): Likewise.
548 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
550 * config.gcc: Support "tremont".
551 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
552 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
554 * config/i386/i386.c (m_TREMONT): Define.
555 (processor_target_table): Add "tremont".
556 (PTA_TREMONT): Define.
557 (ix86_lea_outperforms): Add TARGET_TREMONT.
558 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
559 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
560 and M_INTEL_GOLDMONT_PLUS.
561 (fold_builtin_cpu): Add "tremont".
562 (ix86_add_stmt_cost): Add TARGET_TREMONT.
563 (ix86_option_override_internal): Add "tremont".
564 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
565 (processor_type): Add PROCESSOR_TREMONT.
566 * config/i386/x86-tune.def: Add m_TREMONT.
567 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
569 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
571 * gcc/config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
572 symbol defined for msp430i* devices to be lower case.
574 gcc/testsuite/gcc.target/msp430/
575 * msp430i-device-symbol.c: New test.
576 * msp430f-device-symbol.c: New test.
577 * msp430.h: New test header file.
579 2018-06-07 Richard Biener <rguenther@suse.de>
581 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
582 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
583 Properly wrap signed arithmetic if overflow wraps.
585 2018-06-07 Jakub Jelinek <jakub@redhat.com>
587 PR tree-optimization/69615
588 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
589 of a cast from a same precision integral SSA_NAME in a bb dominated
590 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
591 cast to utype if rhs2 has already a compatible type.
593 2018-06-07 Richard Biener <rguenther@suse.de>
595 PR tree-optimization/85935
596 * graphite-scop-detection.c (find_params_in_bb): Analyze
597 condition operands with respect to the correct loop. Assert
598 the analysis doesn't fail.
600 2018-06-04 Carl Love <cel@us.ibm.com>
602 * gcc/config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
603 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
604 as it is slightly cheaper.
605 (first_match_or_eos_index_<mode>):
606 Calculate index using natural element order.
607 (first_match_index_<mode>):
608 Calculate index using natural element order.
609 (first_match_or_eos_index_<mode>):
610 Calculate index using natural order.
611 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
613 * gcc/config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
614 P9V_BUILTIN_VCLZLSBB_V16QI.
615 * gcc/config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
618 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
620 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
621 indentation and line wrap for many prototypes. Add missing
622 @smallexample directives around block of prototypes for vec_xl and
625 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
627 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
628 track if we pass or return IEEE 128-bit floating point.
629 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
630 C++ mangling that is compatible with GCC 8.1.
631 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
632 (init_cumulative_args): Note if we pass or return IEEE 128-bit
633 floating point types.
634 (rs6000_function_arg_advance_1): Likewise.
635 (rs6000_mangle_type): Optionally generate mangled names that match
636 what GCC 8.1 generated for IEEE 128-bit floating point types.
637 (rs6000_globalize_decl_name): If we have an external function that
638 passes or returns IEEE 128-bit types, generate a weak reference
639 from the mangled name used in GCC 8.1 to the current mangled
641 (rs6000_init_builtins): Make __ibm128 use the long double type if
642 long double is IBM extended double. Make __float128 use the long
643 double type if long double is IEEE 128-bit.
646 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
647 macro for __ibm128 built-in functions.
648 (PACK_IF): Add __ibm128 pack/unpack functions.
649 (UNPACK_IF): Likewise.
650 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
651 enable long double built-in functions if long double is IEEE
652 128-bit floating point.
653 (rs6000_invalid_builtin): Update long double built-in function
655 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
656 functions, adjust the built-in function to use the long double
657 built-in function if __ibm128 and long double are the same type.
658 * doc/extend.texi (PowerPC builtins): Update documention for
659 __builtin_{,un}pack_longdouble. Add documentation for
660 __builtin_{,un}pack_ibm128.
662 2018-06-06 Jim Wilson <jimw@sifive.com>
664 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
665 (struct machine_function): New field interrupt_mode.
666 (riscv_handle_type_attribute): New function. Add forward declaration.
667 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
668 (riscv_expand_epilogue): Check interrupt_mode field.
669 (riscv_set_current_function): Check interrupt attribute args and
670 set interrupt_mode field.
671 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
672 (riscv_sret, riscv_uret): New.
673 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
674 new arguments to interrupt attribute.
676 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
679 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
680 Don't handle -mcpu=power8 if -mpower9-vector is also used.
682 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
684 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
685 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
686 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
687 several redundant entries.
689 2018-06-06 David Malcolm <dmalcolm@redhat.com>
691 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
692 type from "rtx" to "rtx_insn *".
693 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
694 for local "call_insn", removing cast.
695 (ix86_expand_call): Likewise, introducing a "call_insn" local.
697 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
699 PR tree-optimization/86066
700 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
701 for BIT_INSERT_EXPR stores.
703 2018-06-06 Richard Biener <rguenther@suse.de>
705 PR tree-optimization/86062
706 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
708 of to be offsetted base.
710 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
712 * gcc/config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
713 to be static and remove check on interrupt attribute name.
715 gcc/testsuite/gcc.target/msp430/
716 * function-attributes-4.c: New test.
717 * static-interrupts.c: New test.
719 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
721 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
722 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
724 2018-06-05 Steve Ellcey <sellcey@cavium.com>
727 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
729 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
730 Remove second argument, change how error is called.
731 (aarch64_layout_arg): Remove second argument from
732 aarch64_err_no_fpadvsimd call.
733 (aarch64_init_cumulative_args): Ditto.
734 (aarch64_gimplify_va_arg_expr): Ditto.
735 * config/aarch64/aarch64.md (mov<mode>): Ditto.
737 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
739 * config/i386/i386.md (simple_return_indirect_internal): New expander.
740 (*simple_return_indirect_internal<mode>): Rename from
741 simple_return_indirect_internal. Use W mode iterator.
742 (rstorssp): New expander.
743 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
744 (clrssbsy): New expander.
745 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
747 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
749 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
751 (cmse_check_pointed_object): Likewise.
753 2018-06-05 Martin Liska <mliska@suse.cz>
755 PR gcov-profile/47618
756 * doc/invoke.texi: Document how -fprofile-dir format
759 2018-06-05 Richard Biener <rguenther@suse.de>
761 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
762 removal pretend DOM info isn't available so we do not update
763 it and only remove edges, not dominated blocks. Actually free
764 DOM info in case we removed something. Remove unreachable blocks.
765 (mfb_keep_latches): Work with either DOM info or marked backedges.
766 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
767 first. Mark backedges if DOM info isn't available.
768 (Re-)compute DOM info after cleanup_control_flow_pre.
770 2018-06-05 Richard Biener <rguenther@suse.de>
772 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
773 (locus_discrim_hasher::hash): Adjust.
774 (locus_discrim_hasher::equal): Likewise.
775 (next_discriminator_for_locus): Work on line directly.
776 (same_line_p): Pass in expanded locus1 as well.
777 (assign_discriminators): Avoid redundant location expansions.
779 2018-06-05 Richard Biener <rguenther@suse.de>
781 PR tree-optimization/86046
782 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
783 if required after clearing TREE_ADDRESSABLE.
785 2018-06-05 Richard Biener <rguenther@suse.de>
787 PR tree-optimization/86047
788 * tree-ssa-loop.c (for_each_index): Glob handling of all
789 decls and constants and really handle all of them.
791 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
794 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
795 qualifier_void_pointer and qualifier_const_void_pointer.
796 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
797 (arm_init_builtins): Handle the above.
798 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
799 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
800 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
803 2018-06-05 Martin Liska <mliska@suse.cz>
805 * auto-profile.c (read_autofdo_file): Do not use
806 gcov_ctr_summary struct.
807 (afdo_callsite_hot_enough_for_early_inline): Likewise.
808 * coverage.c (struct counts_entry): Likewise.
809 (read_counts_file): Read just single summary entry.
810 (get_coverage_counts): Use gcov_summary struct.
811 * coverage.h (get_coverage_counts): Likewise.
812 * gcov-dump.c (dump_working_sets): Likewise.
813 (tag_summary): Dump just single summary.
814 * gcov-io.c (gcov_write_summary): Write just histogram
816 (gcov_read_summary): Read just single summary.
817 (compute_working_sets): Use gcov_summary struct.
818 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
819 of GCOV_COUNTERS_SUMMABLE.
820 (GCOV_COUNTERS_SUMMABLE): Remove.
821 (GCOV_FIRST_VALUE_COUNTER): Replace with
822 GCOV_COUNTER_V_INTERVAL.
823 (struct gcov_ctr_summary): Remove.
824 (struct gcov_summary): Directly use fields of former
826 (compute_working_sets): Use gcov_summary struct.
827 * gcov.c (read_count_file): Do not use ctrs fields.
828 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
830 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
832 * profile.c: Likewise.
833 * profile.h: Likewise.
835 2018-06-05 Martin Liska <mliska@suse.cz>
837 PR gcov-profile/84846
838 * gcov.c (output_lines): Print working directory only
839 in intermediate format.
841 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
843 * config/s390/s390-builtin-types.def: Add void function type.
844 * config/s390/s390-builtins.def: Use the function type for the
847 2018-06-04 Jim Wilson <jimw@sifive.com>
849 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
851 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
852 and maybe_eh_return. Change regno to unsigned int. Use new args to
853 handle EH_RETURN_DATA_REGNO registers properly.
854 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
855 (riscv_expand_epilogue): Update comment. Change argument name and
856 type. Update code to use new name and type. Pass new args to
857 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
859 * config/riscv/riscv.md (NORMAL_RETURN): New.
860 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
861 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
862 (eh_return): Call gen_eh_return_internal and emit barrier.
863 (eh_return_internal): Call riscv_expand_epilogue.
865 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
867 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
868 bit_insertion field and declare can_be_merged_into method.
869 (merged_store_group::can_be_merged_into): New method.
870 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
871 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
872 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
874 2018-06-04 Richard Biener <rguenther@suse.de>
876 PR tree-optimization/85955
877 * builtins.c (fold_builtin_sincos): Convert pointers to
878 destination to appropriate type before dereferencing.
880 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
882 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
884 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
886 * expr.c (expand_expr_real_1): Force the operand into memory if
887 its TYPE_MODE is BLKmode and if there is no integer mode for
888 the number of bits being extracted.
890 2018-06-04 Jakub Jelinek <jakub@redhat.com>
894 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
895 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
897 2018-06-04 Richard Biener <rguenther@suse.de>
899 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
900 (cleanup_tree_cfg_noloop): ... single caller. Do
901 start_recording_case_labels later.
903 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
905 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
906 to _IMMINTRIN_H_INCLUDED.
907 * config/i386/pconfigintrin.h: Ditto.
908 * config/i386/waitpkgintrin.h: Ditto.
909 * config/i386/immintrin.h: Add includes for sgxintrin.h,
910 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
911 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
912 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
913 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
914 waitpkgintrin.h and cldemoteintrin.h.
916 2018-06-04 Richard Biener <rguenther@suse.de>
918 PR tree-optimization/86038
919 * tracer.c (find_best_successor): Check probability for
920 being initialized, bail out if not.
922 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
925 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
926 of bits to ignore when comparing architectures.
928 2018-06-04 Jakub Jelinek <jakub@redhat.com>
930 PR tree-optimization/69615
931 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
932 maximum or minimum of the type, try to merge it also as if
933 range1 is + [-, x - 1] or + [x + 1, -].
936 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
938 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
940 PR tree-optimization/86034
941 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
942 the unsigned bitfield type in a bit insertion sequence if it does not
943 have a larger precision than the bitfield size.
944 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
946 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
948 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
950 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
952 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
953 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
954 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
955 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
957 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
959 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
960 Disable -fdelete-null-pointer-checks for ELF toolchain.
962 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
963 Kito Cheng <kito.cheng@gmail.com>
965 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
966 (nds32le-*-*, nds32be-*-*): Integrate checking process.
967 (nds32*-*-*): Add glibc and uclibc conditions.
968 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
969 (TARGET_EXCEPT_UNWIND_INFO): Define.
970 * config/nds32/elf.h: New file.
971 * config/nds32/linux.h: New file.
972 * config/nds32/nds32-elf.opt: New file.
973 * config/nds32/nds32-linux.opt: New file.
974 * config/nds32/nds32-fp-as-gp.c
975 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
976 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
978 (nds32_asm_file_end): Ditto.
979 (nds32_print_operand): Ditto.
980 (nds32_insert_attributes): Ditto.
981 (nds32_init_libfuncs): New function.
982 (TARGET_HAVE_TLS): Define.
983 (TARGET_INIT_LIBFUNCS): Define.
984 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
986 (TARGET_ELF): Apply different mcmodel setting.
987 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
988 been migrated into elf.h and linux.h files.
989 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
990 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
991 (mcmodel): The content has been migrated into nds32-elf.opt and
992 nds32-linux.opt files.
993 * config/nds32/t-elf: New file.
994 * config/nds32/t-linux: New file.
996 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
997 Shiva Chen <shiva0217@gmail.com>
999 * config/nds32/constants.md (unspec_volatile_element): Add
1000 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
1001 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
1003 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
1004 (make_pass_nds32_fp_as_gp): Declare.
1005 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
1007 (nds32_asm_function_end_prologue): Remove unused asm output.
1008 (nds32_asm_function_begin_epilogue): Remove unused asm output.
1009 (nds32_asm_file_start): Output necessary fp_as_gp information.
1010 (nds32_option_override): Adjust register usage.
1011 (nds32_expand_prologue): Consider fp_as_gp situation.
1012 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
1013 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
1016 (simple_return): Ditto.
1017 (omit_fp_begin): Output special directive for fp_as_gp.
1018 (omit_fp_end): Output special directive for fp_as_gp.
1019 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
1020 mforbid-fp-as-gp): New options.
1022 2018-06-01 Mark Wielaard <mark@klomp.org>
1024 * dwarf2out.c (dwarf2out_finish): Remove generation of
1025 DW_AT_loclists_base.
1027 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
1029 * gimple-ssa-store-merging.c: Include gimple-fold.h.
1030 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
1031 (struct merged_store_group): Add bit_insertion field.
1032 (dump_char_array): Use standard hexadecimal format.
1033 (merged_store_group::merged_store_group): Set bit_insertion to false.
1034 (merged_store_group::apply_stores): Use optimal buffer size. Deal
1035 with BIT_INSERT_EXPR stores. Move up code updating the mask and
1036 also print the mask in the dump file.
1037 (pass_store_merging::gate): Minor tweak.
1038 (imm_store_chain_info::coalesce_immediate): Fix wrong association
1039 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
1040 stores with INTEGER_CST stores.
1041 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
1042 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
1043 and use it throughout. Generate bit insertion sequences if need be.
1044 (pass_store_merging::process_store): Remove redundant condition.
1045 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
1047 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
1049 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
1050 the 128-bit floating point types. Fix function comment.
1052 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1054 * config/aarch64/aarch64-simd.md
1055 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
1057 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
1060 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
1062 PR tree-optimization/85989
1063 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
1065 (backprop::intersect_uses): Check it when deciding whether this
1066 is a backedge reference.
1067 (backprop::process_block): Add each phi to m_visited_phis
1068 after visiting it, then clear it at the end.
1070 2018-06-01 Richard Biener <rguenther@suse.de>
1072 * tree-vectorizer.h (vect_dr_stmt): New function.
1073 (vect_get_load_cost): Adjust.
1074 (vect_get_store_cost): Likewise.
1075 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
1076 Use vect_dr_stmt instead of DR_SMTT.
1077 (vect_record_base_alignments): Likewise.
1078 (vect_calculate_target_alignment): Likewise.
1079 (vect_compute_data_ref_alignment): Likewise and make static.
1080 (vect_update_misalignment_for_peel): Likewise.
1081 (vect_verify_datarefs_alignment): Likewise.
1082 (vector_alignment_reachable_p): Likewise.
1083 (vect_get_data_access_cost): Likewise. Pass down
1084 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
1085 (vect_get_peeling_costs_all_drs): Likewise.
1086 (vect_peeling_hash_get_lowest_cost): Likewise.
1087 (vect_enhance_data_refs_alignment): Likewise.
1088 (vect_find_same_alignment_drs): Likewise.
1089 (vect_analyze_data_refs_alignment): Likewise.
1090 (vect_analyze_group_access_1): Likewise.
1091 (vect_analyze_group_access): Likewise.
1092 (vect_analyze_data_ref_access): Likewise.
1093 (vect_analyze_data_ref_accesses): Likewise.
1094 (vect_vfa_segment_size): Likewise.
1095 (vect_small_gap_p): Likewise.
1096 (vectorizable_with_step_bound_p): Likewise.
1097 (vect_prune_runtime_alias_test_list): Likewise.
1098 (vect_analyze_data_refs): Likewise.
1099 (vect_supportable_dr_alignment): Likewise.
1100 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
1101 (vect_gen_prolog_loop_niters): Likewise.
1102 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1103 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
1105 (vect_recog_mask_conversion_pattern): Likewise.
1106 (vect_try_gather_scatter_pattern): Likewise.
1107 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
1108 to vect_get_store_cost.
1109 (vect_get_store_cost): Get stmt_info instead of DR.
1110 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
1111 (vect_get_load_cost): Get stmt_info instead of DR.
1113 2018-06-01 Richard Biener <rguenther@suse.de>
1116 * gimple-fold.c (var_decl_component_p): Also allow offsetted
1117 vars wrapped in MEM_REFs.
1119 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
1121 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
1122 Fix subreg tests so that we only return a choice between
1123 GENERAL_REGS and FP_REGS if the original classes included both.
1125 2018-06-01 Richard Biener <rguenther@suse.de>
1128 * tree-ssa-structalias.c (get_function_part_constraint):
1129 Handle NULL fi->decl.
1130 (find_func_aliases_for_call): Properly handle indirect
1131 fi from direct call.
1132 (find_func_clobbers): Likewise.
1133 (ipa_pta_execute): Likewise.
1134 (create_variable_info_for): For functions that are ifunc_resolver
1135 resolve to a varinfo that contains the result of the resolver call.
1136 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
1139 2018-05-31 Michael Collison <michael.collison@arm.com>
1141 * config/aarch64/aarch64.md:
1142 (*fix_to_zero_extenddfdi2): New pattern.
1143 * gcc.target/aarch64/fix_extend1.c: New testcase.
1145 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
1149 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
1150 and BUILT_IN_STRNCMP_EQ.
1151 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
1152 BUILT_IN_STRNCMP_EQ.
1153 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
1154 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
1155 (gimple_fold_builtin): Likewise.
1156 * tree-ssa-strlen.c (compute_string_length): New function.
1157 (determine_min_obsize): New function.
1158 (handle_builtin_string_cmp): New function to handle calls to
1159 string compare functions.
1160 (strlen_optimize_stmt): Add handling to builtin string compare
1162 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
1163 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
1164 * tree.c (build_common_builtin_nodes): Add new defines of
1165 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
1167 2018-05-31 Jakub Jelinek <jakub@redhat.com>
1170 * bb-reorder.c (pass_partition_blocks::gate): Return false for
1171 functions with naked attribute.
1173 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
1175 * config/i386/sse.md (avx_vec_concat<mode>):
1176 Substitute concat_tg_mode mode attribute with xtg_mode.
1177 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
1178 (concat_tg_mode): Remove mode attribute.
1180 2018-05-31 Martin Sebor <msebor@redhat.com>
1183 * calls.c (alloc_max_size): Correct a logic error/typo.
1184 Treat excessive arguments as infinite. Warn for invalid arguments.
1185 * doc/invoke.texi (-Walloc-size-larger-than): Update.
1187 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
1190 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
1191 and movx for Haswell.
1193 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
1194 Cesar Philippidis <cesar@codesourcery.com>
1197 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
1198 when emitting error on private/firstprivate reductions.
1199 * omp-low.c (lower_omp_target): Avoid reference-type processing
1200 on pointers for firstprivate clause.
1202 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
1204 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
1207 * config/aarch64/aarch64-simd.md
1208 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
1209 (aarch64_ld1_x3_<mode>): Likewise
1210 (aarch64_st1x2<VALLDIF:mode>): Likewise
1211 (aarch64_st1_x2_<mode>): Likewise
1212 (aarch64_st1x3<VALLDIF:mode>): Likewise
1213 (aarch64_st1_x3_<mode>): Likewise
1214 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
1215 (vld1_s8_x3): Likewise.
1216 (vld1_u16_x3): Likewise.
1217 (vld1_s16_x3): Likewise.
1218 (vld1_u32_x3): Likewise.
1219 (vld1_s32_x3): Likewise.
1220 (vld1_u64_x3): Likewise.
1221 (vld1_s64_x3): Likewise.
1222 (vld1_f16_x3): Likewise.
1223 (vld1_f32_x3): Likewise.
1224 (vld1_f64_x3): Likewise.
1225 (vld1_p8_x3): Likewise.
1226 (vld1_p16_x3): Likewise.
1227 (vld1_p64_x3): Likewise.
1228 (vld1q_u8_x3): Likewise.
1229 (vld1q_s8_x3): Likewise.
1230 (vld1q_u16_x3): Likewise.
1231 (vld1q_s16_x3): Likewise.
1232 (vld1q_u32_x3): Likewise.
1233 (vld1q_s32_x3): Likewise.
1234 (vld1q_u64_x3): Likewise.
1235 (vld1q_s64_x3): Likewise.
1236 (vld1q_f16_x3): Likewise.
1237 (vld1q_f32_x3): Likewise.
1238 (vld1q_f64_x3): Likewise.
1239 (vld1q_p8_x3): Likewise.
1240 (vld1q_p16_x3): Likewise.
1241 (vld1q_p64_x3): Likewise.
1242 (vst1_s64_x2): Likewise.
1243 (vst1_u64_x2): Likewise.
1244 (vst1_f64_x2): Likewise.
1245 (vst1_s8_x2): Likewise.
1246 (vst1_p8_x2): Likewise.
1247 (vst1_s16_x2): Likewise.
1248 (vst1_p16_x2): Likewise.
1249 (vst1_s32_x2): Likewise.
1250 (vst1_u8_x2): Likewise.
1251 (vst1_u16_x2): Likewise.
1252 (vst1_u32_x2): Likewise.
1253 (vst1_f16_x2): Likewise.
1254 (vst1_f32_x2): Likewise.
1255 (vst1_p64_x2): Likewise.
1256 (vst1q_s8_x2): Likewise.
1257 (vst1q_p8_x2): Likewise.
1258 (vst1q_s16_x2): Likewise.
1259 (vst1q_p16_x2): Likewise.
1260 (vst1q_s32_x2): Likewise.
1261 (vst1q_s64_x2): Likewise.
1262 (vst1q_u8_x2): Likewise.
1263 (vst1q_u16_x2): Likewise.
1264 (vst1q_u32_x2): Likewise.
1265 (vst1q_u64_x2): Likewise.
1266 (vst1q_f16_x2): Likewise.
1267 (vst1q_f32_x2): Likewise.
1268 (vst1q_f64_x2): Likewise.
1269 (vst1q_p64_x2): Likewise.
1270 (vst1_s64_x3): Likewise.
1271 (vst1_u64_x3): Likewise.
1272 (vst1_f64_x3): Likewise.
1273 (vst1_s8_x3): Likewise.
1274 (vst1_p8_x3): Likewise.
1275 (vst1_s16_x3): Likewise.
1276 (vst1_p16_x3): Likewise.
1277 (vst1_s32_x3): Likewise.
1278 (vst1_u8_x3): Likewise.
1279 (vst1_u16_x3): Likewise.
1280 (vst1_u32_x3): Likewise.
1281 (vst1_f16_x3): Likewise.
1282 (vst1_f32_x3): Likewise.
1283 (vst1_p64_x3): Likewise.
1284 (vst1q_s8_x3): Likewise.
1285 (vst1q_p8_x3): Likewise.
1286 (vst1q_s16_x3): Likewise.
1287 (vst1q_p16_x3): Likewise.
1288 (vst1q_s32_x3): Likewise.
1289 (vst1q_s64_x3): Likewise.
1290 (vst1q_u8_x3): Likewise.
1291 (vst1q_u16_x3): Likewise.
1292 (vst1q_u32_x3): Likewise.
1293 (vst1q_u64_x3): Likewise.
1294 (vst1q_f16_x3): Likewise.
1295 (vst1q_f32_x3): Likewise.
1296 (vst1q_f64_x3): Likewise.
1297 (vst1q_p64_x3): Likewise.
1299 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1301 * config/msp430/msp430.c (msp430_output_labelref): Prepend
1302 user_label_prefix to name.
1304 * tree-core.h: Update comment about the format of NAME string
1305 passed to handler in attribute_spec.
1307 * config/msp430/msp430.md: Remove erroneous subreg expression from
1308 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
1309 zero_extend{q,h}isi2.
1311 2018-05-30 Borislav Petkov <bp@suse.de>
1313 * doc/extend.texi: Document some architecture specific
1314 constraints and sort entries.
1316 2018-05-30 Martin Sebor <msebor@redhat.com>
1319 * builtins.c (expand_builtin_stpcpy_1): New function.
1320 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
1321 only if the former succeeds.
1323 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
1325 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
1328 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
1330 * doc/invoke.texi (-flinker-output): Document
1332 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
1334 * passes.c (ipa_write_summaries): Only modify statements if body
1336 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
1337 incrementally linking.
1338 (ipa_passes): Likewise.
1339 * lto-cgraph.c (lto_output_node): When incrementally linking do not
1340 pass down resolution info.
1341 * common.opt (flag_incremental_link): Update info.
1342 * gcc.c (plugin specs): Turn flinker-output=* to
1343 -plugin-opt=-linker-output-known
1344 * toplev.c (compile_file): Also cut compilation when doing incremental
1346 * flag-types. (enum lto_partition_model): Add
1347 LTO_LINKER_OUTPUT_NOLTOREL.
1348 (invoke.texi): Add -flinker-output docs.
1349 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
1350 link same way as WPA; do not stream in dead initializers.
1352 * dwarf2out.c (dwarf2out_die_ref_for_decl,
1353 darf2out_register_external_decl): Support incremental link.
1355 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
1357 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
1359 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
1361 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
1362 it down to simple_object_copy_lto_debug_sections.
1363 (run_gcc): Determine incremental LTO link time and configure
1364 lto1 into non-wpa mode, disable renaming of debug sections.
1366 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
1368 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
1369 descriptions of various incorrectly documented functions.
1371 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
1374 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
1375 address check not strict.
1377 2018-05-30 Richard Biener <rguenther@suse.de>
1379 PR tree-optimization/85964
1380 * tracer.c (better_p): Drop initialized count check, we only
1381 call the function with initialized counts now.
1382 (find_best_successor): Do find a best edge if one
1383 has uninitialized count.
1384 (find_best_predecessor): Likewise. Do BB frequency check only
1385 if count is initialized.
1387 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
1389 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
1390 (aarch64_ldrstr_offset_compare): New.
1391 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
1392 load/store orderings.
1393 (aarch64_gen_adjusted_ldpstp): Likewise.
1395 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
1397 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
1398 Check for subset of GENERAL_REGS and FP_REGS.
1399 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
1402 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
1404 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
1405 and wi::to_poly_offset. Add the current offset and then check
1406 whether the sum fits, rather than using an unchecked addition of
1407 a checked term. Check for a shwi rather than a uhwi.
1408 * expr.c (get_bit_range): Use tree_to_poly_uint64.
1409 (store_constructor): Use poly_int_tree_p.
1410 (expand_expr_real_1): Likewise.
1411 * function.c (assign_temp): Likewise.
1412 * fold-const.c (const_binop): Use poly_int_tree_p and
1414 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
1416 * ipa-icf-gimple.c (func_checker::compare_operand): Use
1417 to_poly_offset for MEM offsets.
1418 * ipa-icf.c (sem_variable::equals): Likewise.
1419 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
1420 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
1421 wi::to_poly_offset for BIT_FIELD_REF offsets.
1422 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
1424 * var-tracking.c (emit_note_insn_var_location): Use
1425 tree_to_poly_uint64.
1427 2018-05-29 Jim Wilson <jimw@sifive.com>
1429 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
1431 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
1434 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
1435 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
1437 (sse4_1_round<mode>2): Use nonimmediate_operand
1438 for operand 1 predicate.
1440 2018-05-29 Martin Sebor <msebor@redhat.com>
1441 Richard Biener <rguenther@suse.de>
1444 * calls.c (get_size_range): Call determine_value_range instead
1445 of get_value_range..
1446 * tree-vrp.h (determine_value_range): Declared new function.
1447 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
1449 2018-05-29 Richard Biener <rguenther@suse.de>
1451 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
1452 sure to use non-pattern stmts for get_earlier_stmt arguments.
1453 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
1454 called on pattern stmts.
1455 (get_later_stmt): Likewise.
1457 2018-05-29 Martin Liska <mliska@suse.cz>
1459 PR gcov-profile/85759
1460 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
1463 2018-05-29 Jakub Jelinek <jakub@redhat.com>
1465 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
1467 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
1471 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
1472 VEC_PACK_FLOAT_EXPR): New tree codes.
1473 * tree-pretty-print.c (op_code_prio): Handle
1474 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
1475 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
1476 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
1477 * tree-inline.c (estimate_operator_cost): Likewise.
1478 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
1479 * fold-const.c (const_binop): Likewise.
1480 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
1481 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
1482 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
1483 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
1484 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
1485 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
1486 * expr.c (expand_expr_real_2): Likewise.
1487 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
1488 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
1489 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
1491 * optabs.c (expand_widen_pattern_expr): For
1492 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
1493 sign from result type rather than operand's type.
1494 (expand_binop_directly): For vec_packu_float_optab and
1495 vec_packs_float_optab allow result type to be different from operand's
1497 * optabs-tree.c (optab_for_tree_code): Handle
1498 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
1499 VEC_PACK_FLOAT_EXPR. Formatting fixes.
1500 * tree-vect-generic.c (expand_vector_operations_1): Handle
1501 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
1502 VEC_PACK_FLOAT_EXPR.
1503 * tree-vect-stmts.c (supportable_widening_operation): Handle
1505 (supportable_narrowing_operation): Handle FLOAT_EXPR.
1506 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
1507 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
1508 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
1509 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
1511 (vec_pack<floatprefix>_float_<mode>): New expander.
1512 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
1514 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
1515 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
1516 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
1517 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
1518 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
1520 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
1521 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
1522 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
1523 VEC_PACK_FLOAT_EXPR): Document.
1525 2018-05-29 Richard Biener <rguenther@suse.de>
1527 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
1529 (stmt_vec_info_vec): Make pointer.
1530 (init_stmt_vec_info_vec): Remove.
1531 (free_stmt_vec_info_vec): Likewise.
1532 (set_stmt_vec_info_vec): New function.
1533 (free_stmt_vec_infos): Likewise.
1534 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
1535 (set_vinfo_for_stmt): Likewise.
1536 (get_earlier_stmt): Likewise.
1537 (get_later_stmt): Likewise.
1538 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
1539 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
1540 (vec_info::~vec_info): Free stmt_vec_infos.
1541 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
1542 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
1543 (pass_slp_vectorize::execute): Likewise.
1544 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
1545 (free_stmt_vec_info_vec): Likewise.
1546 (set_stmt_vec_info_vec): New function.
1547 (free_stmt_vec_infos): Likewise.
1548 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
1549 the global stmt_vec_info_vec.
1550 * tree-parloops.c (gather_scalar_reductions): Use
1551 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
1554 2018-05-29 Richard Biener <rguenther@suse.de>
1556 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
1558 2018-05-29 Martin Liska <mliska@suse.cz>
1559 David Malcolm <dmalcolm@redhat.com>
1561 * vec.c (test_reverse): New.
1562 (vec_c_tests): Add new test.
1563 * vec.h (vl_ptr>::reverse): New function.
1565 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
1567 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
1569 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
1572 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
1574 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
1576 2018-05-28 Richard Biener <rguenther@suse.de>
1578 PR tree-optimization/85933
1579 * tree-vect-data-refs.c (vect_record_base_alignments): Only
1580 look at stmts marked as vectorizable.
1582 2018-05-28 Richard Biener <rguenther@suse.de>
1584 PR tree-optimization/85934
1585 * tree-vect-generic.c (expand_vector_operations_1): Hoist
1586 vector boolean check before scalar optimization.
1588 2018-05-28 Jakub Jelinek <jakub@redhat.com>
1590 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
1593 2018-05-28 Mark Wielaard <mark@klomp.org>
1595 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
1596 if it is an expression containing a minus sign.
1598 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
1600 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
1602 2018-05-27 Paul Koning <ni1d@arrl.net>
1604 * config/pdp11/pdp11.md (truncsihi2): Remove.
1606 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
1607 Chung-Ju Wu <jasonwucj@gmail.com>
1609 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
1611 (unaligned_store_dw): Ditto.
1612 * config/nds32/nds32-memory-manipulation.c
1613 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
1614 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
1615 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
1616 (emit_setmem_word_loop): Rename to ...
1617 (emit_setmem_doubleword_loop): ... this.
1618 (nds32_gen_dup_4_byte_to_word_value): New function.
1619 (nds32_gen_dup_8_byte_to_double_word_value): New function.
1620 (nds32_expand_setmem_loop): Refine implementation.
1621 (nds32_expand_setmem_loop_v3m): Ditto.
1622 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
1625 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
1627 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
1629 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
1631 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
1632 (nds32_init_machine_status): Initialize machine->attr_naked_p and
1633 machine->attr_no_prologue_p.
1634 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
1635 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
1636 (nds32_expand_epilogue): Consider attr_naked_p.
1637 (nds32_expand_epilogue_v3pop): Likewise.
1638 (nds32_can_use_return_insn): Likewise.
1639 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
1640 attr_no_prologue_p fields.
1641 * config/nds32/nds32.opt (mret-in-naked-func): New option.
1643 2018-05-27 Jakub Jelinek <jakub@redhat.com>
1646 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
1648 * config/i386/sse.md
1649 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
1651 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
1653 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
1655 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
1657 (*<floatsuffix>floatv2div2sf2): Rename to ...
1658 (*float<floatunssuffix>v2div2sf2): ... this.
1659 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
1660 (float<floatunssuffix>v2div2sf2_mask): ... this.
1661 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
1662 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
1663 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
1665 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
1667 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
1669 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
1671 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
1673 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
1675 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
1676 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
1677 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
1678 gen_ufix_truncv8dfv8si2.
1679 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
1680 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
1681 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
1682 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
1683 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
1684 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
1685 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
1686 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
1688 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
1692 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
1694 2018-05-25 Jim Wilson <jimw@sifive.com>
1696 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
1697 * config/riscv/riscv.c (struct machine_function): Add
1698 interrupt_handler_p and attribute_checked_p fields.
1699 (riscv_attribute_table): Add interrupt.
1700 (riscv_interrupt_type_p): New.
1701 (riscv_save_reg_p): Save extra regs for interrupt handler.
1702 (riscv_use_save_libcall): Return false for interrupt handler.
1703 (riscv_first_stack_step): Add forward declaration.
1704 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
1705 for interrupt handler with large frame. Use it for saved reg list.
1706 (riscv_expand_prologue): Move flag_stack_usage_info support to
1707 eliminate duplication.
1708 (riscv_expand_epilogue): Generate mret for interrupt handler.
1709 (riscv_epilogue_uses): New.
1710 (riscv_can_use_return_insn): Return false for interrupt handler.
1711 (riscv_function_ok_for_sibcall): Likewise.
1712 (riscv_set_current_function): Add interrupt handler support.
1713 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
1714 * config/riscv/riscv.md (UNSPECV_MRET): New.
1716 (riscv_frflags, riscv_fsflags): Use tab after opcode.
1718 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
1720 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
1722 PR tree-optimization/85712
1723 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
1724 this candidate has already been replaced in-situ by a copy.
1726 2018-05-25 Jason Merrill <jason@redhat.com>
1728 PR c++/80485 - inline function non-zero address.
1729 * symtab.c (nonzero_address): Check DECL_COMDAT.
1731 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
1734 * config/alpha/alpha.md (ashlsi3): New insn pattern.
1735 (*ashlsi_se): Rename from *ashldi_se. Define as sign
1736 extension of SImode operation. Use const123_operand predicate.
1737 (*saddsi_1): Remove.
1738 (*saddl_se_1): Ditto.
1740 (*ssubl_se_1): Ditto.
1741 * config/alpha/predicates.md (const123_operand): New predicate.
1742 * config/alpha/constraints.md (P): Use IN_RANGE.
1744 2018-05-25 Richard Biener <rguenther@suse.de>
1746 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
1748 (ref_maybe_used_by_stmt_p): Likewise.
1749 (stmt_may_clobber_ref_p): Likewise.
1750 (stmt_may_clobber_ref_p_1): Likewise.
1751 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
1753 (ref_maybe_used_by_stmt_p): Likewise.
1754 (stmt_may_clobber_ref_p): Likewise.
1755 (stmt_may_clobber_ref_p_1): Likewise.
1756 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
1757 the alias oracle to disambiguate DRs with stmts DR analysis
1759 (vect_analyze_data_refs): Do not give up on not analyzable
1760 DRs for BB vectorization. Remove code truncating the dataref
1763 2018-05-25 Jakub Jelinek <jakub@redhat.com>
1766 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
1767 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
1768 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
1770 2018-05-25 Richard Biener <rguenther@suse.de>
1772 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
1773 function, combining stmt data ref gathering and fatal analysis
1775 (vect_analyze_data_refs): Remove now redudnant code and simplify.
1776 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
1777 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
1778 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
1779 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
1781 2018-05-25 Bin Cheng <bin.cheng@arm.com>
1783 PR tree-optimization/85720
1784 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
1785 SCC if all partitions are builtins.
1786 (version_loop_by_alias_check): New parameter. Generate cancelable
1787 runtime alias check if all partitions are builtins.
1788 (distribute_loop): Update call to above function.
1790 2018-05-25 Bin Cheng <bin.cheng@arm.com>
1792 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
1793 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.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 (remove_ssa_form): Refactor call to init_var_map here.
1799 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
1800 computation for loop region.
1801 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
1802 (register_default_def): Delete.
1803 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
1804 (parm_default_def_partition_arg): Ditto.
1805 (set_parm_default_def_partition): Ditto.
1806 (get_parm_default_def_partitions): Ditto and make it static.
1807 (get_undefined_value_partitions): Ditto and make it static.
1808 (coalesce_with_default, coalesce_with_default): Update comment.
1809 (create_coalesce_list_for_region): New func factored out from
1810 create_outofssa_var_map.
1811 (populate_coalesce_list_for_outofssa): New func factored out from
1812 create_outofssa_var_map and coalesce_ssa_name.
1813 (create_outofssa_var_map): Delete.
1814 (coalesce_ssa_name): Refactor to support live range computation.
1815 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
1816 (get_parm_default_def_partitions): Delete.
1817 (get_undefined_value_partitions): Ditto.
1818 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
1819 computation for loop region.
1820 (new_tree_live_info, loe_visit_block): Ditto.
1821 (live_worklist, set_var_live_on_entry): Ditto.
1822 (calculate_live_on_exit, verify_live_on_entry): Ditto.
1823 * tree-ssa-live.h (struct _var_map): New fields.
1824 (init_var_map): Change decl.
1825 (region_contains_p): New.
1827 2018-05-25 Bin Cheng <bin.cheng@arm.com>
1829 * tree-ssa-live.h (live_merge_and_clear): Delete.
1831 2018-05-25 Richard Biener <rguenther@suse.de>
1834 * tree-dump.c (dequeue_and_dump): Remove access to removed
1835 operand 2 of a SWITCH_EXPR.
1837 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
1839 * doc/sourcebuild.texi (vect_double_cond_arith): Include
1840 multiplication and division.
1841 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
1842 (cond_udiv@var{m}, cond_umod@var{m}): Document.
1843 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
1844 (cond_udiv_optab, cond_umod_optab): New optabs.
1845 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
1846 (IFN_COND_RDIV): New internal functions.
1847 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
1848 TRUNC_MOD_EXPR and RDIV_EXPR.
1849 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
1850 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
1852 (SVE_INT_BINARY): Include mult.
1853 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
1854 (optab, sve_int_op): Handle mult.
1855 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
1857 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
1858 for SVE_INT_BINARY_SD.
1860 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
1862 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
1863 (optab, sve_int_op): Handle div and udiv.
1864 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
1865 for SVE_INT_BINARY_SD.
1866 (*<optab><mode>3): New insn for the same.
1868 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
1870 * tree-vect-patterns.c: Include predict.h.
1871 (vect_recog_divmod_pattern): Restrict check for division support
1872 to when optimizing for size.
1874 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
1876 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
1877 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
1878 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
1879 (gimple_match_op::set_op): Likewise.
1880 (gimple_resimplify4): Declare.
1881 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
1882 (expr::gen_transform): Likewise.
1883 (decision_tree::gen): Generate a simplification routine for 4 operands.
1884 * gimple-match-head.c (gimple_simplify): Add an overload for
1885 4 operands. In the top-level function, handle up to 4 call
1886 arguments and call gimple_resimplify4.
1887 (gimple_resimplify4): New function.
1888 (build_call_internal): Pass a fourth operand.
1889 (maybe_push_to_seq): Likewise.
1890 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
1891 Fold VEC_COND_EXPRs of an operation and a default value into
1892 an IFN_COND_* function if possible.
1893 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
1895 (SVE_COND_FP_BINARY): Include them.
1896 (optab, sve_fp_op): Handle them.
1897 (SVE_INT_BINARY_REV): New code iterator.
1898 (SVE_COND_FP_BINARY_REV): New int iterator.
1899 (commutative): New int attribute.
1900 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
1902 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
1904 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
1905 (*cond_<optab><mode>): New patterns for reversed operands.
1907 2018-05-25 Richard Biener <rguenther@suse.de>
1909 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
1910 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
1911 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
1912 (STMT_VINFO_GROUPED_ACCESS): Adjust.
1913 * tree-vect-data-refs.c (everywhere): Adjust users.
1914 * tree-vect-loop.c (everywhere): Likewise.
1915 * tree-vect-slp.c (everywhere): Likewise.
1916 * tree-vect-stmts.c (everywhere): Likewise.
1917 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
1919 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1921 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
1923 (gcc_cv_as_section_exclude): ... this.
1924 Try Solaris as #exclude syntax.
1925 * configure: Regenerate.
1926 * config.in: Regenerate.
1927 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
1929 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
1930 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
1932 * varasm.c (default_elf_asm_named_section): Don't check if
1933 HAVE_GAS_SECTION_EXCLUDE is defined.
1935 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
1937 * doc/md.texi: Update the documentation of the cond_* optabs
1938 to mention the new final operand. Fix GET_MODE_NUNITS call.
1939 Describe the scalar case too.
1940 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
1941 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
1943 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
1944 (get_conditional_internal_fn): Update comment.
1945 * tree-vect-loop.c (vectorizable_reduction): Pass the original
1946 accumulator value as a final argument to conditional functions.
1947 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
1948 a define_expand and add an "else" operand. Assert for now that
1949 the else operand is equal to operand 2. Use SVE_INT_BINARY and
1950 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
1951 (*cond_<optab><mode>): New patterns.
1952 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
1953 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
1954 (UNSPEC_COND_EOR): Delete.
1955 (optab): Remove associated mappings.
1956 (SVE_INT_BINARY): New code iterator.
1957 (sve_int_op): Remove int attribute and add "minus" to the code
1959 (SVE_COND_INT_OP): Delete.
1960 (SVE_COND_FP_OP): Rename to...
1961 (SVE_COND_FP_BINARY): ...this.
1963 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
1965 * optabs.c (can_reuse_operands_p): New function.
1966 (maybe_legitimize_operands): Try to reuse the results for
1969 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
1971 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
1972 Add {q} suffix to insn mnemonic.
1974 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1976 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
1977 (msp430_warn_func_return): New.
1979 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
1981 * fold-const.c (tree_nonzero_bits): New function.
1982 * fold-const.h (tree_nonzero_bits): Likewise.
1983 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
1984 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
1986 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
1990 * varasm.c (assemble_alias): Check ifunc_resolver only on
1993 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
1996 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
1997 when memory input operand is handled.
1999 2018-05-24 Luis Machado <luis.machado@linaro.org>
2001 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
2003 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
2005 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
2007 * match.pd: Delay FMA folds until after vectorization.
2009 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
2012 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
2013 address check not strict.
2015 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
2017 * gimple-match.h (gimple_match_op): New class.
2018 (mprts_hook): Replace parameters with a gimple_match_op *.
2019 (maybe_build_generic_op): Likewise.
2020 (gimple_simplified_result_is_gimple_val): Replace parameters with
2021 a const gimple_match_op *.
2022 (gimple_simplify): Replace code_helper * and tree * parameters with
2023 a gimple_match_op * parameter.
2024 (gimple_resimplify1): Replace code_helper *, tree and tree *
2025 parameters with a gimple_match_op * parameter.
2026 (gimple_resimplify2): Likewise.
2027 (gimple_resimplify3): Likewise.
2028 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
2029 parameters with a gimple_match_op * parameter.
2030 * gimple-match-head.c (gimple_simplify): Change prototypes of
2031 auto-generated functions to take a gimple_match_op * instead of
2032 separate code_helper * and tree * parameters. Make the same
2033 change in the top-level overload and update calls to the
2034 gimple_resimplify routines. Update calls to the auto-generated
2035 functions and to maybe_push_res_to_seq in the publicly-facing
2036 operation-specific gimple_simplify overloads.
2037 (gimple_match_op::MAX_NUM_OPS): Define.
2038 (gimple_resimplify1): Replace rcode and ops with a single res_op
2039 parameter. Update call to gimple_simplify.
2040 (gimple_resimplify2): Likewise.
2041 (gimple_resimplify3): Likewise.
2042 (mprts_hook): Replace parameters with a gimple_match_op *.
2043 (maybe_build_generic_op): Likewise.
2044 (build_call_internal): Replace type, nargs and ops with
2045 a gimple_match_op *.
2046 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
2047 with a single gimple_match_op *. Update calls to mprts_hook,
2048 build_call_internal and gimple_simplified_result_is_gimple_val.
2049 Factor out code that is common to the tree_code and combined_fn cases.
2050 * genmatch.c (expr::gen_transform): Replace tem_code and
2051 tem_ops with a gimple_match_op called tem_op. Update calls
2052 to the gimple_resimplify functions and maybe_push_res_to_seq.
2053 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
2054 res_ops. Update call to the gimple_resimplify functions.
2055 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
2056 (decision_tree::gen): Make the functions take a gimple_match_op *
2057 called res_op instead of separate res_code and res_ops parameters.
2058 Update call accordingly.
2059 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
2060 and ops with a single res_op parameter. Update calls to
2061 maybe_build_generic_op and maybe_push_res_to_seq.
2062 (fold_stmt_1): Update calls to gimple_simplify and
2063 replace_stmt_with_simplification.
2064 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
2065 and gimple_simplified_result_is_gimple_val.
2066 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
2068 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
2069 with a gimple_match_op *.
2070 (vn_nary_build_or_lookup): Likewise. Update call to
2071 vn_nary_build_or_lookup_1.
2072 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
2073 gimple_match_op *. Update calls to the gimple_resimplify routines
2074 and to gimple_simplified_result_is_gimple_val.
2075 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
2076 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
2077 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
2078 (visit_nary_op): Likewise.
2079 (visit_reference_op_load): Likewise.
2081 2018-05-23 Luis Machado <luis.machado@linaro.org>
2083 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
2084 modifier for printing the step amount.
2086 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
2089 * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
2092 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
2094 * doc/sourcebuild.texi (Endianness): New subsubsection.
2096 2018-05-23 Luis Machado <luis.machado@linaro.org>
2098 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2099 <prefetch_dynamic_strides>: New const bool field.
2100 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2101 prefetch_dynamic_strides.
2102 (exynosm1_prefetch_tune): Likewise.
2103 (thunderxt88_prefetch_tune): Likewise.
2104 (thunderx_prefetch_tune): Likewise.
2105 (thunderx2t99_prefetch_tune): Likewise.
2106 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
2108 (aarch64_override_options_internal): Update to set
2109 PARAM_PREFETCH_DYNAMIC_STRIDES.
2110 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
2111 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
2112 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
2113 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
2114 prefetch-dynamic-strides setting.
2116 2018-05-23 Luis Machado <luis.machado@linaro.org>
2118 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2119 <minimum_stride>: New const int field.
2120 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2121 minimum_stride field defaulting to -1.
2122 (exynosm1_prefetch_tune): Likewise.
2123 (thunderxt88_prefetch_tune): Likewise.
2124 (thunderx_prefetch_tune): Likewise.
2125 (thunderx2t99_prefetch_tune): Likewise.
2126 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
2127 <default_opt_level>: Set to 3.
2128 (aarch64_override_options_internal): Update to set
2129 PARAM_PREFETCH_MINIMUM_STRIDE.
2130 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
2131 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
2132 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
2133 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
2134 stride is constant and is below the minimum stride threshold.
2136 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2138 * config/arm/arm-cpus.in (mode26): Delete.
2139 (armv4): Delete mode26 reference.
2140 * config/arm/arm.c (arm_configure_build_target): Delete use of
2143 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
2145 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
2147 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
2148 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
2150 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
2151 (floatunsdidf2): Ditto.
2153 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
2155 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
2156 (fixuns_trunc<mode>si2_avx512f): Ditto.
2157 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
2158 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
2159 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
2161 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
2163 PR rtl-optimization/79985
2164 * df-scan.c (df_insn_refs_collect): Remove special case for
2165 global registers and asm statements.
2167 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
2169 * extend.texi (Global Register Variables): Rewrite the bullet list.
2170 Note that the register is available for allocation. Note that access
2171 via inline asm must use constraints. Add note about async-signal
2172 handlers. Remove paragraph about automagic register selection.
2174 2018-05-23 Richard Biener <rguenther@suse.de>
2176 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
2177 of fixed offset from memset VN.
2179 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
2181 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
2183 (alloc_cand_and_find_basis): Initialize first_interp field.
2184 (slsr_process_mul): Modify first_interp field.
2185 (slsr_process_add): Likewise.
2186 (slsr_process_cast): Modify first_interp field for each new
2188 (slsr_process_copy): Likewise.
2189 (dump_candidate): Dump first_interp field.
2190 (replace_mult_candidate): Process all interpretations, not just
2192 (replace_rhs_if_not_dup): Likewise.
2193 (replace_one_candidate): Likewise.
2195 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
2197 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
2199 (aarch64_needs_frame_chain): New function.
2200 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
2202 2018-05-23 Sudakshina Das <sudi.das@arm.com>
2205 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
2206 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
2207 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
2208 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
2209 as true for strict-align.
2210 (aarch64_can_inline_p): Perform checks even when callee has no
2211 attributes to check for strict alignment.
2212 * doc/extend.texi (AArch64 Function Attributes): Document
2214 * doc/invoke.texi: (AArch64 Options): Likewise.
2216 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
2218 PR tree-optimization/85853
2219 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
2220 the handling of the root of the node to...
2221 (vect_slp_analyze_node_operations_1): ...this new function,
2222 and run the whole thing with the child nodes' def types
2223 set according to their SLP node's def type.
2225 2018-05-23 Richard Biener <rguenther@suse.de>
2228 * tree-data-ref.c (create_runtime_alias_checks): Defer
2229 and ignore overflow warnings.
2231 2018-05-23 Yury Gribov <tetra2005@gmail.com>
2233 PR tree-optimization/85822
2234 * tree-vrp.c (is_masked_range_test): Fix handling of negative
2237 2018-05-23 Richard Biener <rguenther@suse.de>
2239 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
2240 memset constants via native_interpret_expr.
2242 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
2245 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
2247 (cgraph_node::create_alias): Likewise.
2248 (cgraph_node::get_availability): Check ifunc_resolver instead
2249 of looking up ifunc attribute.
2250 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
2251 * varasm.c (do_assemble_alias): Likewise.
2252 (assemble_alias): Likewise.
2253 (default_binds_local_p_3): Likewise.
2254 * cgraph.h (cgraph_node): Add ifunc_resolver.
2255 (cgraph_node::only_called_directly_or_aliased_p): Return false
2257 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
2259 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
2260 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
2261 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
2262 instead of looking up ifunc attribute.
2264 2018-05-22 Luis Machado <luis.machado@linaro.org>
2266 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
2268 2018-05-22 Martin Sebor <msebor@redhat.com>
2271 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
2272 only when expasion succeeds.
2273 (expand_builtin_strcmp): Same.
2274 (expand_builtin_strncmp): Same.
2276 2018-05-22 Martin Sebor <msebor@redhat.com>
2278 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
2280 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
2281 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2283 * config/aarch64/aarch64-ldpstp.md: Replace uses of
2284 aarch64_mem_pair_operand with memory_operand and delete operand swapping
2286 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
2287 Add check for legitimate_address.
2288 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
2289 (aarch64_swap_ldrstr_operands): New.
2290 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
2293 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
2294 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2296 * config/aarch64/aarch64.md: New patterns to generate stp
2298 (store_pair_sw, store_pair_dw): New patterns to generate stp for
2299 single words and double words.
2300 (load_pair_sw, load_pair_dw): Likewise.
2301 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
2303 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
2305 * config/aarch64/aarch64-ldpstp.md: Modify peephole
2306 for different mode ldpstp and add peephole for merged zero stores.
2308 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
2310 (aarch64_gen_store_pair): Rename calls to match new patterns.
2311 (aarch64_gen_load_pair): Rename calls to match new patterns.
2312 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
2313 (load_pair<DREG:mode><DREG2:mode>): ... This.
2314 (store_pair<mode>): Rename to...
2315 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
2316 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
2318 (V_INT_EQUIV): Handle SImode.
2319 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
2322 2018-05-22 Martin Sebor <msebor@redhat.com>
2325 * calls.c (maybe_warn_nonstring_arg): Use string length to set
2326 or ajust the presumed bound on an operation to avoid unnecessary
2329 2018-05-22 Martin Sebor <msebor@redhat.com>
2331 PR tree-optimization/85826
2332 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
2333 assuming that a DECL necesarily has a constant size.
2335 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
2338 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
2340 2018-05-22 Richard Biener <rguenther@suse.de>
2342 PR tree-optimization/85834
2343 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
2344 non-constant and non-zero memset arguments.
2346 2018-05-22 Martin Liska <mliska@suse.cz>
2349 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
2351 2018-05-22 Richard Biener <rguenther@suse.de>
2353 PR tree-optimization/85863
2354 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
2355 comparisons when vectype is specified.
2356 (vectorizable_condition): Do not specify vectype for
2357 vect_is_simple_cond when SLP vectorizing.
2359 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
2362 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
2363 define __ibm128 as long double.
2364 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
2365 as a distinct type when IEEE 128-bit support is enabled.
2366 (init_float128_ieee): Fix up conversions between IFmode and IEEE
2367 128-bit types to use the correct functions.
2368 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
2369 convert between 128-bit floating point types that have different
2370 modes but the same representation, instead of using gen_lowpart to
2372 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
2374 (IFKF_reg): New attributes to give the register constraints for
2376 (extend<mode>tf2_internal): New insns to mark an explicit
2377 conversion between 128-bit floating point types that have a
2378 different mode but share the same representation.
2380 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
2382 PR tree-optimization/85814
2383 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
2384 a null return from get_strinfo when unsharing the next
2385 strinfo in the chain.
2387 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
2390 * varasm.c (weak_finish): Clean up weak_decls.
2392 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2394 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
2395 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
2396 UNSPEC_UADALP values.
2397 * config/aarch64/iterators.md (ABAL): New int iterator.
2400 (sur): Add mappings for the above.
2401 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
2403 (aarch64_<sur>abal<mode>_4): Likewise.
2404 (aarch64_<sur>adalp<mode>_3): Likewise.
2405 (<sur>sadv16qi): New define_expand.
2407 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
2409 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
2410 (*movdf_internal): Ditto.
2411 (*rcpsf2_sse): Ditto.
2412 (*rsqrtsf2_sse): Ditto.
2413 (*sqrt<mode>2_sse): Ditto.
2415 2018-05-21 Tamar Christina <tamar.christina@arm.com>
2417 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
2419 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
2420 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
2421 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
2422 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
2424 * config/aarch64/arm_neon.h: Likewise.
2425 * config/aarch64/iterators.md (VQ_I): New.
2427 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
2429 * config.gcc: Add arc/t-multilib-linux to tmake_file for
2431 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
2434 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
2436 * config/nds32/constraints.md (S): New constraint.
2437 * config/nds32/nds32.md (call_internal): Use constraint S.
2438 (call_value_internal): Likewise.
2439 (sibcall_internal): Likewise.
2440 (sibcall_value_internal): Likewise.
2442 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
2443 Chung-Ju Wu <jasonwucj@gmail.com>
2445 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
2448 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
2449 Chung-Ju Wu <jasonwucj@gmail.com>
2451 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
2452 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
2453 (nds32_rtx_costs_impl): Simplify.
2454 (nds32_address_cost_impl): Simplify.
2455 (nds32_init_rtx_costs): New function.
2456 (nds32_rtx_costs_speed_prefer): Likewise.
2457 (nds32_rtx_costs_size_prefer): Likewise.
2458 (nds32_address_cost_speed_prefer): Likewise.
2459 (nds32_address_cost_speed_fwprop): Likewise.
2460 (nds32_address_cost_size_prefer): Likewise.
2461 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
2462 * config/nds32/nds32.c (nds32_option_override): Use
2463 nds32_init_rtx_costs function.
2465 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
2467 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
2468 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
2469 (TARGET_PIPELINE_N8): Likewise.
2470 (TARGET_PIPELINE_N10): Likewise.
2471 (TARGET_PIPELINE_N13): Likewise.
2472 (TARGET_PIPELINE_GRAYWOLF): Likewise.
2474 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
2476 * config/nds32/nds32-fpu.md: Update copyright year.
2478 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
2480 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
2482 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
2484 * config/nds32/nds32.c
2485 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
2486 * config/nds32/nds32.opt (minline-asm-r15): New option.
2488 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
2490 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
2492 * config/nds32/nds32.md (abssi2): New pattern.
2494 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
2496 * config/i386/i386.md (rex64namesuffix): New mode attribute.
2497 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
2498 Merge insn pattern from sse_cvtsi2ss<round_name> and
2499 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
2500 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
2501 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
2502 using SWI48 mode iterator.
2503 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
2504 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
2505 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
2506 pattern from sse_cvttss2si<round_saeonly_name>
2507 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
2508 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
2509 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
2510 using SWI48 mode iterator.
2511 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
2512 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
2513 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
2514 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
2515 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
2516 using SWI48 mode iterator.
2517 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
2518 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
2519 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
2520 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
2521 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
2522 SWI48 mode iterator.
2523 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
2524 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
2525 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
2526 pattern from sse_cvttsd2si<round_saeonly_name>
2527 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
2529 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
2531 * config/nds32/nds32-md-auxiliary.c
2532 (nds32_valid_smw_lwm_base_p): Refine.
2533 (nds32_output_smw_single_word): Refine.
2534 (nds32_output_smw_double_word): New.
2535 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
2537 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
2539 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
2540 (nds32_output_stack_pop): Refine.
2541 (nds32_expand_unaligned_load): Refine.
2542 (nds32_expand_unaligned_store): Refine.
2544 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2545 Chung-Ju Wu <jasonwucj@gmail.com>
2547 * config/nds32/constants.md: Add TP_REGNUM constant.
2548 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
2549 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
2551 * config/nds32/nds32-doubleword.md: Consider flag_pic.
2552 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
2553 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
2554 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
2555 and PIC code generation.
2556 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
2558 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
2560 * config/nds32/nds32.md: Support TLS and PIC.
2561 * config/nds32/nds32.c: Support TLS and PIC.
2562 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
2563 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
2566 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
2568 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
2569 mode with E_ prefix.
2571 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2572 Chung-Ju Wu <jasonwucj@gmail.com>
2574 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
2575 * config/nds32/nds32-md-auxiliary.c
2576 (symbolic_reference_mentioned_p): New.
2577 (nds32_legitimize_ict_address): New.
2578 (nds32_expand_ict_move): New.
2579 (nds32_indirect_call_referenced_p): New.
2580 (nds32_symbol_binds_local_p): Delete.
2581 (nds32_long_call_p): Modify.
2582 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
2583 * config/nds32/nds32-protos.h
2584 (symbolic_reference_mentioned_p): Declare.
2585 (nds32_legitimize_ict_address): Declare.
2586 (nds32_expand_ict_move): Declare.
2587 (nds32_indirect_call_referenced_p): Declare.
2588 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
2589 (nds32_relax_group): Use nds32_ict_const_p as condition.
2590 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
2591 (nds32_asm_file_start): Output ict_model directive in asm code.
2592 (nds32_legitimate_address_p): Consider indirect call.
2593 (nds32_print_operand): Consider indirect call.
2594 (nds32_print_operand_address): Consider indirect call.
2595 (nds32_insert_attributes): Handle "indirect_call" attribute.
2596 (TARGET_LEGITIMATE_ADDRESS_P): Define.
2597 (TARGET_LEGITIMATE_CONSTANT_P): Define.
2598 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
2599 (TARGET_DELEGITIMIZE_ADDRESS): Define.
2600 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
2601 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
2602 (TARGET_ICT_MODEL_SMALL): Define.
2603 (TARGET_ICT_MODEL_LARGE): Define.
2604 * config/nds32/nds32.md (movsi): Consider ict model.
2605 (call, call_value): Consider ict model.
2606 (sibcall, sibcall_value): Consider ict model.
2607 * config/nds32/nds32.opt (mict-model): New option.
2608 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
2611 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
2612 Monk Chiang <sh.chiang04@gmail.com>
2613 Jim Wilson <jimw@sifive.com>
2615 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
2616 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
2617 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
2618 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
2619 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
2620 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
2621 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
2622 compute save_libcall_adjustment properly.
2623 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
2624 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
2625 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
2626 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
2627 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
2628 (ABI_SPEC): Handle mabi=ilp32e.
2629 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
2630 (RVE): Add RVE mask.
2631 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
2632 <-march>: Add rv32e as an example.
2634 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
2637 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
2638 (intra_create_variable_infos): Handle C++ constructors.
2640 2018-05-18 Martin Liska <mliska@suse.cz>
2642 * passes.def: Remove a redundant pass.
2644 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
2647 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
2649 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2651 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
2653 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
2655 (armv2, armv2a, armv3, armv3m): Delete architectures.
2656 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
2657 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
2658 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
2660 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
2661 (*mulsidi3adddi): Likewise.
2662 (mulsidi3): Likewise.
2663 (*mulsidi3_nov6): Likewise.
2664 (umulsidi3): Likewise.
2665 (umulsidi3_nov6): Likewise.
2666 (umaddsidi4): Likewise.
2667 (*umulsidi3adddi): Likewise.
2668 (smulsi3_highpart): Likewise.
2669 (*smulsi3_highpart_nov6): Likewise.
2670 (umulsi3_highpart): Likewise.
2671 (*umulsi3_highpart_nov6): Likewise.
2672 * config/arm/arm.h (arm_arch3m): Delete.
2673 * config/arm/arm.c (arm_arch3m): Delete.
2674 (arm_option_override_internal): Update armv3-related comment.
2675 (arm_configure_build_target): Delete use of isa_bit_mode32.
2676 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
2677 (arm_rtx_costs_internal): Delete check of arm_arch3m.
2678 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
2680 (mulusa3): Likewise.
2681 * config/arm/arm-protos.h (arm_arch3m): Delete.
2682 * config/arm/arm-tables.opt: Regenerate.
2683 * config/arm/arm-tune.md: Likewise.
2684 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
2685 deleted architectures.
2687 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2689 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
2690 (armv5t, armv5te): New features.
2691 (ARMv5, ARMv5e): Delete fgroups.
2692 (ARMv5t, ARMv5te): Adjust for above changes.
2694 (armv5, armv5e): Delete arches.
2695 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
2697 (*call_reg_arm): Likewise.
2698 (*call_value_reg_armv5): Likewise.
2699 (*call_value_reg_arm): Likewise.
2700 (*call_symbol): Likewise.
2701 (*call_value_symbol): Likewise.
2702 (*sibcall_insn): Likewise.
2703 (*sibcall_value_insn): Likewise.
2705 (prefetch): Likewise.
2706 (define_split and define_peephole2 dependent on arm_arch5):
2708 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
2710 (TARGET_ARM_QBIT): Likewise.
2711 (TARGET_DSP_MULTIPLY): Likewise.
2712 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
2713 (arm_arch5, arm_arch5e): Delete.
2714 (arm_arch5t, arm_arch5te): Declare.
2715 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
2716 (arm_arch5t): Declare.
2717 (arm_option_reconfigure_globals): Update for the above.
2718 (arm_options_perform_arch_sanity_checks): Update comment, replace
2719 use of arm_arch5 with arm_arch5t.
2720 (use_return_insn): Likewise.
2721 (arm_emit_call_insn): Likewise.
2722 (output_return_instruction): Likewise.
2723 (arm_final_prescan_insn): Likewise.
2724 (arm_coproc_builtin_available): Likewise.
2725 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
2726 arm_arch5e with arm_arch5t and arm_arch5te.
2727 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
2728 (arm_arch5t, arm_arch5te): Declare.
2729 * config/arm/arm-tables.opt: Regenerate.
2730 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
2731 * config/arm/t-multilib: Likewise.
2732 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
2733 instead of arm_arch5.
2734 (*call_reg_thumb1): Likewise.
2735 (*call_value_reg_thumb1_v5): Likewise.
2736 (*call_value_reg_thumb1): Likewise.
2737 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
2739 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
2741 2018-05-18 Martin Liska <mliska@suse.cz>
2743 PR gcov-profile/84846
2744 * doc/gcov.texi: Document -t option of gcov tool.
2746 2018-05-18 Martin Liska <mliska@suse.cz>
2748 PR gcov-profile/84846
2749 * gcov.c (print_usage): Add new -t option.
2750 (process_args): Handle the option.
2751 (generate_results): Use stdout as output when requested by
2754 2018-05-18 Martin Liska <mliska@suse.cz>
2756 PR gcov-profile/84846
2757 * coverage.c (coverage_init): Write PWD to .gcno file.
2758 * doc/gcov.texi: Document how working directory is printed.
2759 * gcov-dump.c (dump_gcov_file): Print PWD.
2760 * gcov.c (output_intermediate_file): Likewise.
2761 (read_graph_file): Read PWD string.
2762 (output_lines): Print PWD.
2764 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2767 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
2768 for retval and return false if all args to phi are zero.
2770 2018-05-18 Richard Biener <rguenther@suse.de>
2772 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
2774 (evrp_dom_walker::before_dom_children): Call it.
2776 2018-05-18 Richard Biener <rguenther@suse.de>
2778 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
2779 results when processing array refs with variable index.
2781 2018-05-18 Toon Moene <toon@moene.org>
2783 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
2784 directly after that of -floop-interchange. Indicate that both
2785 options are enabled by default when specifying -O3.
2787 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2789 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
2790 iterator. Delete separate integer-mode vec_set<mode> expander.
2791 (aarch64_simd_vec_setv2di): Delete.
2792 (vec_setv2di): Delete.
2793 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
2794 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
2795 the "w, r" alternative.
2797 2018-05-18 Martin Liska <mliska@suse.cz>
2799 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
2800 * tree-pass.h (make_pass_lower_switch_O0): New function.
2801 * tree-switch-conversion.c (node_has_low_bound): Remove.
2802 (node_has_high_bound): Likewise.
2803 (node_is_bounded): Likewise.
2804 (class pass_lower_switch): Make it a template type and create
2806 (pass_lower_switch::execute): Add template argument.
2807 (make_pass_lower_switch): New function.
2808 (make_pass_lower_switch_O0): New function.
2809 (do_jump_if_equal): Remove.
2810 (emit_case_nodes): Simplify to just handle all 3 cases and leave
2811 all the hard work to tree optimization passes.
2813 2018-05-18 Martin Liska <mliska@suse.cz>
2815 * dbgcnt.c (limit_low): Renamed from limit.
2816 (limit_high): New variable.
2817 (dbg_cnt_is_enabled): Check for upper limit.
2818 (dbg_cnt): Adjust dumping.
2819 (dbg_cnt_set_limit_by_index): Add new argument for high
2821 (dbg_cnt_set_limit_by_name): Likewise.
2822 (dbg_cnt_process_single_pair): Parse new format.
2823 (dbg_cnt_process_opt): Use strtok.
2824 (dbg_cnt_list_all_counters): Remove 'value' and add
2826 * doc/invoke.texi: Document changes.
2828 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2830 * doc/sourcebuild.texi (scalar_all_fma): Document.
2831 * tree.def (FMA_EXPR): Delete.
2832 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
2833 * internal-fn.c (ternary_direct): New macro.
2834 (expand_ternary_optab_fn): Likewise.
2835 (direct_ternary_optab_supported_p): Likewise.
2836 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
2837 * builtins.c (fold_builtin_fma): Delete.
2838 (fold_builtin_3): Don't call it.
2839 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
2840 * expr.c (expand_expr_real_2): Likewise.
2841 * fold-const.c (operand_equal_p): Likewise.
2842 (fold_ternary_loc): Likewise.
2843 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
2844 * gimple.c (DEFTREECODE): Likewise.
2845 * gimplify.c (gimplify_expr): Likewise.
2846 * optabs-tree.c (optab_for_tree_code): Likewise.
2847 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
2848 * tree-eh.c (operation_could_trap_p): Likewise.
2849 (stmt_could_throw_1_p): Likewise.
2850 * tree-inline.c (estimate_operator_cost): Likewise.
2851 * tree-pretty-print.c (dump_generic_node): Likewise.
2852 (op_code_prio): Likewise.
2853 * tree-ssa-loop-im.c (stmt_cost): Likewise.
2854 * tree-ssa-operands.c (get_expr_operands): Likewise.
2855 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
2856 * fold-const-call.h (fold_fma): Delete.
2857 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
2858 CFN_FNMA and CFN_FNMS.
2860 * genmatch.c (combined_fn): New enum.
2861 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
2862 (commutative_op): New function.
2863 (commutate): Use it. Handle more than 2 operands.
2864 (dt_operand::gen_gimple_expr): Use commutative_op.
2865 (parser::parse_expr): Allow :c to be used with non-binary
2866 operators if the commutative operand is known.
2867 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
2868 CFN_FMS, CFN_FNMA and CFN_FNMS.
2869 (backprop::process_assign_use): Remove FMA_EXPR handling.
2870 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
2871 (gen_hsa_fma): New function.
2872 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
2873 IFN_FNMA and IFN_FNMS.
2874 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
2875 * gimple-fold.h (follow_all_ssa_edges): Declare.
2876 * gimple-fold.c (follow_all_ssa_edges): New function.
2877 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
2878 gimple_build interface and use follow_all_ssa_edges to fold the result.
2879 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
2880 instead of checking for optabs directly.
2881 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
2882 rather than FMA_EXPRs.
2883 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
2884 call to IFN_FMA instead of an FMA_EXPR.
2886 2018-05-17 Jim Wilson <jimw@sifive.com>
2888 * expr.c (do_tablejump): When converting index to Pmode, if we have a
2889 sign extended promoted subreg, and the range does not have the sign bit
2890 set, then do a sign extend.
2892 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
2893 test, check for sign extended subreg and/or constant operands, and
2894 do a sign extend in that case.
2896 2018-05-17 Steve Ellcey <sellcey@cavium.com>
2898 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
2899 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
2901 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
2902 Change logics_shift_reg to logics_shift_imm.
2903 (thunderx2t99_fp_loadpair_basic): Delete.
2904 (thunderx2t99_fp_storepair_basic): Delete.
2905 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
2906 (thunderx2t99_asimd_polynomial): Delete.
2907 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
2908 and neon_fp_mul_d_scalar_q.
2909 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
2910 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
2911 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
2912 (thunderx2t99_asimd_lut): Add missing tbl types.
2913 (thunderx2t99_asimd_ext): Delete.
2914 (thunderx2t99_asimd_load1_1_mult): Delete.
2915 (thunderx2t99_asimd_load1_2_mult): Delete.
2916 (thunderx2t99_asimd_load1_ldp): New.
2917 (thunderx2t99_asimd_load1): New.
2918 (thunderx2t99_asimd_load2): Add missing *load2* types.
2919 (thunderx2t99_asimd_load3): New.
2920 (thunderx2t99_asimd_load4): New.
2921 (thunderx2t99_asimd_store1_1_mult): Delete.
2922 (thunderx2t99_asimd_store1_2_mult): Delete.
2923 (thunderx2t99_asimd_store2_mult): Delete.
2924 (thunderx2t99_asimd_store2_onelane): Delete.
2925 (thunderx2t99_asimd_store_stp): New.
2926 (thunderx2t99_asimd_store1): New.
2927 (thunderx2t99_asimd_store2): New.
2928 (thunderx2t99_asimd_store3): New.
2929 (thunderx2t99_asimd_store4): New.
2931 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
2933 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
2934 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
2936 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
2937 Segher Boessenkool <segher@kernel.crashing.org>
2940 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
2943 2018-05-17 Richard Biener <rguenther@suse.de>
2945 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
2946 for pruning loop and prune defs feeding only already visited PHIs.
2948 2018-05-17 Richard Biener <rguenther@suse.de>
2950 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
2952 2018-05-17 Bin Cheng <bin.cheng@arm.com>
2953 Richard Biener <rguenther@suse.de>
2955 PR tree-optimization/85793
2956 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
2957 for VMAT_ELEMENTWISE.
2959 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2961 * internal-fn.h (lookup_internal_fn): Declare
2962 * internal-fn.c (lookup_internal_fn): New function.
2963 * gimple.c (gimple_build_call_from_tree): Handle calls to
2965 * gimple-pretty-print.c (dump_gimple_call): Print "." before
2966 internal function names.
2967 * tree-pretty-print.c (dump_generic_node): Likewise.
2968 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
2970 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2972 * gimple-fold.h (gimple_build): Make the function forms take
2973 combined_fn rather than built_in_function.
2974 (gimple_simplify): Likewise.
2975 * gimple-match-head.c (gimple_simplify): Likewise.
2976 * gimple-fold.c (gimple_build): Likewise.
2977 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
2978 rather than gimple_build_call_internal.
2979 (get_initial_defs_for_reduction): Likewise.
2980 (vect_create_epilog_for_reduction): Likewise.
2981 (vectorizable_live_operation): Likewise.
2983 2018-05-17 Martin Liska <mliska@suse.cz>
2985 * gimple-ssa-sprintf.c (format_directive): Do not use
2986 space in between 'G_' and '('.
2988 2018-05-17 Jakub Jelinek <jakub@redhat.com>
2991 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
2992 even if the mask is not all ones.
2995 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
2997 (ix86_gimple_fold_builtin): Likewise.
3000 * config/i386/i386.c: Include tree-vector-builder.h.
3001 (ix86_vector_shift_count): New function.
3002 (ix86_fold_builtin): Fold shift builtins by scalar count.
3003 (ix86_gimple_fold_builtin): Likewise.
3005 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
3006 _mm512_setzero): New intrinsics.
3008 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
3009 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3011 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
3012 code generation for cases where splatting a value is not useful.
3013 * simplify-rtx.c (simplify_ternary_operation): Simplify
3014 vec_merge across a vec_duplicate and a paradoxical subreg forming
3015 a vector mode to a vec_concat.
3017 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
3019 * config.gcc: Support "goldmont-plus".
3020 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
3022 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
3023 PROCESSOR_GOLDMONT_PLUS.
3024 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
3025 (processor_target_table): Add "goldmont-plus".
3026 (PTA_GOLDMONT_PLUS): Define.
3027 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
3028 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
3029 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
3030 (fold_builtin_cpu): Add "goldmont-plus".
3031 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
3032 (ix86_option_override_internal): Add "goldmont-plus".
3033 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
3034 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
3035 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
3036 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
3038 2018-05-17 Richard Biener <rguenther@suse.de>
3040 PR tree-optimization/85757
3041 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
3042 remove defs that only feed that PHI from further processing.
3044 2018-05-16 Jim Wilson <jimw@sifive.com>
3046 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
3048 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
3050 2018-05-16 Mark Wielaard <mark@klomp.org>
3052 * dwarf2out.c (count_index_strings): New function.
3053 (output_indirect_strings): Call count_index_strings and generate
3054 header for dwarf_version >= 5.
3056 2018-05-16 Mark Wielaard <mark@klomp.org>
3058 * dwarf2out.c (dwarf_FORM): New function.
3059 (set_indirect_string): Use dwarf_FORM.
3060 (reset_indirect_string): Likewise.
3061 (size_of_die): Likewise.
3062 (value_format): Likewise.
3063 (output_die): Likewise.
3064 (add_skeleton_AT_string): Likewise.
3065 (output_macinfo_op): Likewise.
3066 (index_string): Likewise.
3067 (output_index_string_offset): Likewise.
3068 (output_index_string): Likewise.
3069 (count_index_strings): Likewise.
3071 2018-05-16 Carl Love <cel@us.ibm.com>
3073 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
3074 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
3076 2018-05-16 Martin Jambor <mjambor@suse.cz>
3078 * ipa-prop.c (ipa_free_all_edge_args): Remove.
3079 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
3081 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
3083 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
3084 (fnma<mode>4): Likewise.
3085 (fms<mode>4): Likewise.
3086 (fnms<mode>4): Likewise.
3087 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
3088 (aarch64_fnma<mode>4): Likewise.
3089 (aarch64_fms<mode>4): Likewise.
3090 (aarch64_fnms<mode>4): Likewise.
3091 (aarch64_fnmadd<mode>4): Likewise.
3093 2018-05-16 Jason Merrill <jason@redhat.com>
3095 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
3097 2018-05-16 Richard Biener <rguenther@suse.de>
3099 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
3100 (dump_stmt_cost): Declare.
3101 (add_stmt_cost): Dump cost we add.
3102 (add_stmt_costs): New function.
3103 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
3105 (vect_analyze_stmt): Adjust prototype.
3106 (vectorizable_condition): Likewise.
3107 (vectorizable_live_operation): Likewise.
3108 (vectorizable_reduction): Likewise.
3109 (vectorizable_induction): Likewise.
3110 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
3111 cost vector to pass to vectorizable_ and record afterwards.
3112 (vect_model_reduction_cost): Take cost vector argument and adjust.
3113 (vect_model_induction_cost): Likewise.
3114 (vectorizable_reduction): Likewise.
3115 (vectorizable_induction): Likewise.
3116 (vectorizable_live_operation): Likewise.
3117 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
3118 SLP_TREE_NUMBER_OF_VEC_STMTS.
3119 (vect_analyze_slp_cost_1): Remove.
3120 (vect_analyze_slp_cost): Likewise.
3121 (vect_slp_analyze_node_operations): Take visited args and
3122 a target cost vector. Avoid processing already visited stmt sets.
3123 (vect_slp_analyze_operations): Use a local cost vector to gather
3124 costs and register those of non-discarded instances.
3125 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
3126 (vect_schedule_slp_instance): Remove copying of
3127 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
3129 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
3130 adding cost. Record cost entry location.
3131 (vect_prologue_cost_for_slp_op): Function to compute cost of
3132 a constant or invariant generated for SLP vect in the prologue,
3133 split out from vect_analyze_slp_cost_1.
3134 (vect_model_simple_cost): Make static. Adjust for SLP costing.
3135 (vect_model_promotion_demotion_cost): Likewise.
3136 (vect_model_store_cost): Likewise, make static.
3137 (vect_model_load_cost): Likewise.
3138 (vectorizable_bswap): Add cost vector arg and adjust.
3139 (vectorizable_call): Likewise.
3140 (vectorizable_simd_clone_call): Likewise.
3141 (vectorizable_conversion): Likewise.
3142 (vectorizable_assignment): Likewise.
3143 (vectorizable_shift): Likewise.
3144 (vectorizable_operation): Likewise.
3145 (vectorizable_store): Likewise.
3146 (vectorizable_load): Likewise.
3147 (vectorizable_condition): Likewise.
3148 (vectorizable_comparison): Likewise.
3149 (can_vectorize_live_stmts): Likewise.
3150 (vect_analyze_stmt): Likewise.
3151 (vect_transform_stmt): Adjust calls to vectorizable_*.
3152 * tree-vectorizer.c: Include gimple-pretty-print.h.
3153 (dump_stmt_cost): New function.
3155 2018-05-16 Richard Biener <rguenther@suse.de>
3157 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
3158 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
3159 * tree-ssa-dse.c: Include tree-ssa-loop.h.
3160 (check_name): New callback.
3161 (dse_classify_store): Track cycles via a visited bitmap of PHI
3162 defs and simplify handling of in-loop and across loop dead stores
3163 and properly fail for loop-variant refs. Handle byte-tracking with
3164 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
3167 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
3169 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
3170 (vect_get_mask_type_for_stmt): Likewise.
3171 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
3173 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
3174 to determine the statement's vector type and the vector type that
3175 should be used for calculating nunits. Deal with cases in which
3176 the type has to be deferred.
3177 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
3178 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
3179 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
3180 (vect_determine_vf_for_stmt): New functions, split out from...
3181 (vect_determine_vectorization_factor): ...here.
3182 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
3183 (vect_get_mask_type_for_stmt): New functions, split out from
3184 vect_determine_vectorization_factor.
3186 2018-05-16 Richard Biener <rguenther@suse.de>
3188 * tree-cfg.c (verify_gimple_assign_ternary): Properly
3189 verify the [VEC_]COND_EXPR embedded comparison.
3191 2018-05-15 Martin Sebor <msebor@redhat.com>
3193 PR tree-optimization/85753
3194 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
3195 RECORD_TYPE in addition to ARRAY_TYPE.
3197 2018-05-15 Martin Sebor <msebor@redhat.com>
3200 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
3202 2018-05-15 Richard Biener <rguenther@suse.de>
3204 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
3205 add by_clobber_p one. Change algorithm to collect all defs
3206 representing uses we need to walk and try reducing them to
3207 a single one before failing.
3208 (dse_dom_walker::dse_optimize_stmt): Adjust.
3210 2018-05-13 Mark Wielaard <mark@klomp.org>
3212 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
3213 (size_of_loc_descr): Likewise.
3214 (output_loc_operands): Likewise.
3215 (output_loc_operands_raw): Likewise.
3216 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
3217 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
3218 (hash_loc_operands): Likewise.
3219 (compare_loc_operands): Likewise.
3221 2018-05-14 Mark Wielaard <mark@klomp.org>
3223 * dwarf2out.c (count_index_addrs): New function.
3224 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
3226 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3228 PR tree-optimization/83648
3229 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
3230 return value as malloc candidate.
3232 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3235 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
3236 param as true in call to suggest_attribute.
3238 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
3240 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
3241 -mreadonly-in-sdata.
3243 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3245 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
3247 (aarch64_crypto_aesd_fused): Likewise.
3249 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
3251 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
3252 (movsi_aarch64): Likewise.
3253 (load_pairsi): Likewise.
3254 (load_pairdi): Likewise.
3255 (store_pairsi): Likewise.
3256 (store_pairdi): Likewise.
3257 (load_pairsf): Likewise.
3258 (load_pairdf): Likewise.
3259 (store_pairsf): Likewise.
3260 (store_pairdf): Likewise.
3261 (zero_extend): Likewise.
3262 (trunc): Swap alternatives.
3263 (fcvt_target): Add '?' to prefer w over r.
3265 2018-05-14 Jakub Jelinek <jakub@redhat.com>
3268 * config/i386/i386.md: Disallow non-commutative arithmetics in
3269 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
3270 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
3271 in the peephole2 before it.
3273 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
3275 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
3276 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
3277 (ix86_handle_option): Handle -mcldemote.
3278 * config.gcc: New header.
3279 * config/i386/cldemoteintrin.h: New file.
3280 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
3281 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
3283 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
3284 OPTION_MASK_ISA_CLDEMOTE.
3285 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
3286 (ix86_valid_target_attribute_inner_p): Ditto.
3287 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
3288 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
3289 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
3290 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
3291 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
3293 * config/i386/i386.opt: Add -mcldemote.
3294 * config/i386/x86intrin.h: New header.
3295 * doc/invoke.texi: Add -mcldemote.
3297 2018-05-14 Richard Biener <rguenther@suse.de>
3299 * doc/match-and-simplify.texi: Adjust :s documentation.
3301 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
3303 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
3304 intended memcpy size.
3305 (REORDER_45): Likewise.
3307 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
3309 * sort.cc: New file.
3310 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
3311 * vec.c (qsort_chk): Use gcc_qsort.
3312 * Makefile.in (OBJS-libcommon): Add sort.o.
3313 (build/sort.o): New target. Use it...
3314 (BUILD_RTL): ... here, and...
3315 (build/gencfn-macros): ... here, and...
3316 (build/genmatch): ... here.
3318 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
3319 Chung-Ju Wu <jasonwucj@gmail.com>
3321 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
3322 * config/nds32/nds32-graywolf.md: New file.
3323 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
3324 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
3326 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
3327 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
3328 * config/nds32/nds32.md (pipeline_model): Add graywolf.
3329 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
3330 * config/nds32/pipelines.md: Include n15 settings.
3332 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
3333 Chung-Ju Wu <jasonwucj@gmail.com>
3335 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
3336 * config/nds32/nds32-n13.md: New file.
3337 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
3338 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
3340 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
3341 * config/nds32/nds32.md (pipeline_model): Add n13.
3342 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
3343 * config/nds32/pipelines.md: Include n13 settings.
3345 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
3346 Chung-Ju Wu <jasonwucj@gmail.com>
3348 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
3349 * config/nds32/nds32-n10.md: New file.
3350 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
3351 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
3353 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
3354 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
3355 * config/nds32/nds32.md (pipeline_model): Add n10.
3356 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
3357 * config/nds32/pipelines.md: Include n10 settings.
3359 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
3360 Kito Cheng <kito.cheng@gmail.com>
3361 Chung-Ju Wu <jasonwucj@gmail.com>
3363 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
3364 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
3365 Add enum values for DSP extension instructions.
3366 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
3368 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
3369 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
3371 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
3372 * config/nds32/nds32-dspext.md: New file for DSP implementation.
3373 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
3374 * config/nds32/nds32-intrinsic.md: Likewise.
3375 * config/nds32/nds32_intrinsic.h: Likewise.
3376 * config/nds32/nds32-md-auxiliary.c: Likewise.
3377 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
3378 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
3379 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
3380 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
3381 * config/nds32/nds32-protos.h: New declarations for DSP extension.
3382 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
3383 TYPE_DMAC in switch statement.
3384 * config/nds32/nds32.c: New checking and implementation for DSP
3385 extension instructions.
3386 * config/nds32/nds32.h: Likewise.
3387 * config/nds32/nds32.md: Likewise.
3388 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
3389 * config/nds32/predicates.md: Implement new predicates for DSP
3392 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
3394 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
3395 Reformat alternatives and attributes so it is easier to identify
3396 which constraints/attributes go with which instruction.
3397 (mov<mode>_hardfloat32, FMOVE64): Likewise.
3398 (mov<mode>_softfloat32, FMOVE64): Likewise.
3399 (mov<mode>_hardfloat64, FMOVE64): Likewise.
3400 (mov<mode>_softfloat64, FMOVE64): Likewise.
3402 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
3404 * doc/extend.texi (PowerPC Built-in Functions): Rename this
3406 (Basic PowerPC Built-in Functions): The new name of the
3407 subsection previously known as "PowerPC Built-in Functions".
3408 (Basic PowerPC Built-in Functions Available on all Configurations):
3410 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
3411 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
3412 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
3413 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
3415 2018-05-11 Martin Jambor <mjambor@suse.cz>
3418 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
3421 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
3424 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
3426 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
3428 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
3429 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
3430 (ix86_handle_option): Handle -mwaitpkg.
3431 * config.gcc: New header.
3432 * config/i386/cpuid.h (bit_WAITPKG): New bit.
3433 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
3434 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
3436 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
3437 OPTION_MASK_ISA_WAITPKG.
3438 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
3439 (ix86_option_override_internal): Add PTA_WAITPKG.
3440 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
3441 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
3442 IX86_BUILTIN_TPAUSE.
3443 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
3444 __builtin_ia32_umwait and __builtin_ia32_tpause.
3445 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
3446 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
3447 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
3448 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
3449 UNSPECV_TPAUSE): New.
3450 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
3451 * config/i386/i386.opt: Add -mwaitpkg.
3452 * config/i386/waitpkgintrin.h: New file.
3453 * config/i386/x86intrin.h: New header.
3454 * doc/invoke.texi: Add -mwaitpkg.
3456 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
3459 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
3461 (cortex-m0): Use armv6s-m isa.
3462 (cortex-m0plus): Likewise.
3463 (cortex-m1): Likewise.
3464 (cortex-m0.small-multiply): Likewise.
3465 (cortex-m0plus.small-multiply): Likewise.
3466 (cortex-m1.small-multiply): Likewise.
3468 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
3469 Jakub Jelinek <jakub@redhat.com>
3471 PR tree-optimization/85692
3472 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
3473 source permute as well.
3475 2018-05-11 Martin Liska <mliska@suse.cz>
3478 * doc/extend.texi: Document LLVM style format for no_sanitize
3481 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
3483 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
3484 mode_supports_vsx_dform_quad to mode_supports_dq_form.
3485 (mode_supports_vsx_dform_quad): Likewise.
3486 (mode_supports_vmx_dform): Move these functions to be next to the
3487 other mode_supports functions.
3488 (mode_supports_dq_form): Likewise.
3489 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
3490 mode_supports_dq_form.
3491 (reg_offset_addressing_ok_p): Likewise.
3492 (offsettable_ok_by_alignment): Likewise.
3493 (rs6000_legitimate_offset_address_p): Likewise.
3494 (legitimate_lo_sum_address_p): Likewise.
3495 (rs6000_legitimize_address): Likewise.
3496 (rs6000_legitimize_reload_address): Likewise.
3497 (rs6000_secondary_reload_inner): Likewise.
3498 (rs6000_preferred_reload_class): Likewise.
3499 (rs6000_output_move_128bit): Likewise.
3501 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
3503 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
3504 Generate SImode target register for null target.
3505 <case IX86_BUILTIN_XGETBV>: Ditto.
3506 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
3507 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
3509 2018-05-10 Carl Love <cel@us.ibm.com>
3511 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
3512 dcbtt and dcbtstt if operands[2] is 0.
3514 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
3517 * config/i386/sse.md (usadv64qi): New expander.
3519 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
3521 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
3522 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
3523 -maltivec=be support.
3524 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
3525 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
3526 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
3527 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
3528 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
3529 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
3530 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
3531 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
3532 altivec_vsumsws): Adjust.
3533 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
3534 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
3535 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
3537 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
3538 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
3539 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
3540 (altivec_lve<VI_char>x): Delete expand.
3541 (*altivec_lve<VI_char>x_internal): Rename to...
3542 (altivec_lve<VI_char>x): ... this.
3543 (altivec_lvxl_<mode>): Delete expand.
3544 (*altivec_lvxl_<mode>_internal): Rename to ...
3545 (altivec_lvxl_<mode>): ... this.
3546 (altivec_stvxl_<mode>): Delete expand.
3547 (*altivec_stvxl_<mode>_internal): Rename to ...
3548 (altivec_stvxl_<mode>): ... this.
3549 (altivec_stve<VI_char>x): Delete expand.
3550 (*altivec_stve<VI_char>x_internal): Rename to ...
3551 (altivec_stve<VI_char>x): ... this.
3552 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
3553 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
3554 reduc_plus_scal_<mode>): Adjust.
3555 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
3557 (rs6000_cpu_cpp_builtins): Adjust.
3558 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
3559 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
3560 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
3561 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
3562 -maltivec=be support.
3563 (rs6000_split_vec_extract_var): Adjust.
3564 (rs6000_split_v4si_init): Adjust.
3565 (swap_selector_for_mode): Delete.
3566 (altivec_expand_lvx_be, altivec_expand_stvx_be,
3567 altivec_expand_stvex_be): Delete.
3568 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
3569 -maltivec=be support.
3570 (rs6000_gimple_fold_builtin): Ditto.
3571 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
3573 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
3574 (TARGET_DIRECT_MOVE_64BIT): Adjust.
3575 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
3576 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
3577 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
3578 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
3579 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
3580 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
3581 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
3582 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
3583 anonymous split): Adjust.
3584 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
3585 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
3587 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
3589 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
3590 when --with-gxx-include-dir is also specified.
3591 * configure: Regenerate.
3593 2018-05-09 Jim Wilson <jimw@sifive.com>
3596 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
3597 * config/riscv/t-withmultilib: New.
3598 * config/riscv/withmultilib.h: New.
3599 * doc/install.texi: Document RISC-V --with-multilib-list support.
3601 2018-05-09 Richard Biener <rguenther@suse.de>
3603 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
3605 (vect_bb_vectorization_profitable_p): Adjust. Compute
3606 actual scalar cost using the cost vector and the add_stmt_cost
3609 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
3611 PR rtl-optimization/85645
3612 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
3613 in the REG_CFA_REGISTER note for LR, don't leave it empty.
3615 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
3617 PR rtl-optimization/85645
3618 * shrink-wrap.c (spread_components): Return a boolean saying if
3619 anything was changed.
3620 (try_shrink_wrapping_separate): Iterate spread_components until
3621 nothing changes anymore.
3623 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
3625 PR rtl-optimization/85645
3626 * regrename.c (build_def_use): Also kill the chains that include the
3627 destination of a REG_CFA_REGISTER note.
3629 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
3631 PR rtl-optimization/85645
3632 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
3633 insn that has a REG_CFA_REGISTER note.
3635 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
3637 * cfgexpand.c (expand_clobber): New function.
3638 (expand_gimple_stmt_1): Use it.
3639 * tree-vect-stmts.c (vect_clobber_variable): New function,
3641 (vectorizable_simd_clone_call): ...here.
3642 (vectorizable_store): Emit a clobber either side of an
3643 IFN_STORE_LANES sequence.
3644 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
3646 2018-05-09 Tom de Vries <tom@codesourcery.com>
3649 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
3650 (define_insn "trap_if_false"): Add exit after trap.
3652 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
3654 PR rtl-optimization/85638
3655 * bb-reorder.c: Include common/common-target.h.
3656 (create_forwarder_block): New function extracted from...
3657 (fix_up_crossing_landing_pad): ...here. Rename into...
3658 (dw2_fix_up_crossing_landing_pad): ...this.
3659 (sjlj_fix_up_crossing_landing_pad): New function.
3660 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
3661 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
3662 from both partitions and exit the loop after one iteration.
3664 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
3667 * doc/extend.texi (PowerPC Built-in Functions): Rename this
3669 (Basic PowerPC Built-in Functions): The new name of the
3670 subsection previously known as "PowerPC Built-in Functions".
3671 (Basic PowerPC Built-in Functions Available on all Configurations):
3673 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
3675 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
3677 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
3679 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
3682 2018-05-08 Jim Wilson <jimw@sifive.com>
3684 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
3685 (LD_EMUL_SUFFIX): New.
3686 (LINK_SPEC): Use it.
3688 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
3690 * doc/extend.texi (PowerPC Built-in Functions): Rename this
3692 (Basic PowerPC Built-in Functions): The new name of the
3693 subsection previously known as "PowerPC Built-in Functions".
3694 (Basic PowerPC Built-in Functions Available on all Configurations):
3696 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
3698 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
3700 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
3702 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
3705 2018-05-08 Jakub Jelinek <jakub@redhat.com>
3708 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
3709 after cmpelim optimization.
3711 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
3713 * config.gcc: Support "goldmont".
3714 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
3715 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
3717 * config/i386/i386.c (m_GOLDMONT): Define.
3718 (processor_target_table): Add "goldmont".
3719 (PTA_GOLDMONT): Define.
3720 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
3721 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
3722 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
3723 (fold_builtin_cpu): Add "goldmont".
3724 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
3725 (ix86_option_override_internal): Add "goldmont".
3726 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
3727 (processor_type): Add PROCESSOR_GOLDMONT.
3728 * config/i386/i386.md: Add CPU "glm".
3729 * config/i386/glm.md: New file.
3730 * config/i386/x86-tune.def: Add m_GOLDMONT.
3731 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
3733 2018-05-08 Jakub Jelinek <jakub@redhat.com>
3736 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
3738 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
3739 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
3740 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
3743 * config/i386/i386.c (ix86_fold_builtin): Handle
3744 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
3747 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
3748 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
3750 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
3753 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
3754 (check_arch): Likewise.
3755 (check_fpu): Return the result rather than printing it.
3756 (end arch): Fix operator precedence.
3757 (end cpu): Likewise.
3758 (END): Print the result from check_fpu.
3760 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
3761 Alan Hayward <alan.hayward@arm.com>
3762 David Sherwood <david.sherwood@arm.com>
3764 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
3765 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
3766 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
3767 (*fcmuo<mode>_and): New patterns.
3769 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
3771 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
3772 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
3773 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
3774 (cmp_op, sve_imm_con): New code attributes.
3775 (SVE_COND_INT_CMP, imm_con): Delete.
3776 (cmp_op): Remove above unspecs from int attribute.
3777 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
3779 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
3780 comparison-specific unspecs.
3781 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
3782 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
3783 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
3784 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
3785 (*vec_fcm<cmp_op><mode>): Rename to...
3786 (*fcm<cmp_op><mode>): ...this and adjust likewise.
3787 (*vec_fcmuo<mode>): Rename to...
3788 (*fcmuo<mode>): ...this and adjust likewise.
3789 (*pred_fcm<cmp_op><mode>): New pattern.
3790 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
3791 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
3793 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
3795 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
3796 (aarch64_emit_sve_predicated_cond): New function.
3797 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
3798 (aarch64_emit_unspec_cond_or): Replace with...
3799 (aarch64_emit_sve_or_conds): ...this new function. Use
3800 aarch64_emit_sve_ptrue_op for the individual comparisons and
3801 aarch64_emit_binop to OR them together.
3802 (aarch64_emit_inverted_unspec_cond): Replace with...
3803 (aarch64_emit_sve_inverted_cond): ...this new function. Use
3804 aarch64_emit_sve_ptrue_op for the comparison and
3805 aarch64_emit_unop to invert the result.
3806 (aarch64_expand_sve_vec_cmp_float): Update after the above
3807 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
3809 2018-05-07 Nathan Sidwell <nathan@acm.org>
3811 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
3812 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
3813 (Backwards Compatibility): Likewise.
3815 2018-05-07 Luis Machado <luis.machado@linaro.org>
3819 2018-05-07 Luis Machado <luis.machado@linaro.org>
3821 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
3822 <prefetch_dynamic_strides>: New const bool field.
3823 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
3824 prefetch_dynamic_strides.
3825 (exynosm1_prefetch_tune): Likewise.
3826 (thunderxt88_prefetch_tune): Likewise.
3827 (thunderx_prefetch_tune): Likewise.
3828 (thunderx2t99_prefetch_tune): Likewise.
3829 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
3831 (aarch64_override_options_internal): Update to set
3832 PARAM_PREFETCH_DYNAMIC_STRIDES.
3833 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
3834 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
3835 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
3836 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
3837 prefetch-dynamic-strides setting.
3839 2018-05-07 Luis Machado <luis.machado@linaro.org>
3841 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
3842 <minimum_stride>: New const int field.
3843 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
3844 minimum_stride field.
3845 (exynosm1_prefetch_tune): Likewise.
3846 (thunderxt88_prefetch_tune): Likewise.
3847 (thunderx_prefetch_tune): Likewise.
3848 (thunderx2t99_prefetch_tune): Likewise.
3849 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
3850 (aarch64_override_options_internal): Update to set
3851 PARAM_PREFETCH_MINIMUM_STRIDE.
3852 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
3853 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
3854 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
3855 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
3856 stride is constant and is below the minimum stride threshold.
3858 2018-05-07 Luis Machado <luis.machado@linaro.org>
3860 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
3863 2018-05-07 Luis Machado <luis.machado@linaro.org>
3865 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
3866 <prefetch_dynamic_strides>: New const bool field.
3867 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
3868 prefetch_dynamic_strides.
3869 (exynosm1_prefetch_tune): Likewise.
3870 (thunderxt88_prefetch_tune): Likewise.
3871 (thunderx_prefetch_tune): Likewise.
3872 (thunderx2t99_prefetch_tune): Likewise.
3873 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
3875 (aarch64_override_options_internal): Update to set
3876 PARAM_PREFETCH_DYNAMIC_STRIDES.
3877 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
3878 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
3879 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
3880 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
3881 prefetch-dynamic-strides setting.
3883 2018-05-07 Luis Machado <luis.machado@linaro.org>
3885 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
3886 <minimum_stride>: New const int field.
3887 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
3888 minimum_stride field.
3889 (exynosm1_prefetch_tune): Likewise.
3890 (thunderxt88_prefetch_tune): Likewise.
3891 (thunderx_prefetch_tune): Likewise.
3892 (thunderx2t99_prefetch_tune): Likewise.
3893 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
3894 (aarch64_override_options_internal): Update to set
3895 PARAM_PREFETCH_MINIMUM_STRIDE.
3896 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
3897 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
3898 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
3899 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
3900 stride is constant and is below the minimum stride threshold.
3902 2018-05-06 Jakub Jelinek <jakub@redhat.com>
3905 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
3906 the type is addressable. Don't force op into register if it has
3909 2018-05-05 Roland McGrath <mcgrathr@google.com>
3912 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
3913 any section for which we don't know a specific type it should have,
3914 regardless of name. Previously this was done only for the exact
3915 names ".init_array", ".fini_array", and ".preinit_array".
3916 (default_elf_asm_named_section): Add comment about
3917 relationship with default_section_type_flags and SECTION_NOTYPE.
3918 (get_section): Don't consider it a type conflict if one side has
3919 SECTION_NOTYPE and the other doesn't, as long as neither has the
3920 SECTION_BSS et al used in the default_section_type_flags logic.
3922 2018-05-05 Tom de Vries <tom@codesourcery.com>
3925 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
3926 (workaround_barsyncs): New function.
3927 (nvptx_reorg): Use workaround_barsyncs.
3928 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
3929 (define_expand "nvptx_membar_cta"): New define_expand.
3930 (define_insn "*nvptx_membar_cta"): New insn.
3932 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
3934 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
3935 To improve optimization opportunities.
3936 * builtin-types.def: The new needed builtin types for the above.
3938 2018-05-04 Richard Biener <rguenther@suse.de>
3940 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
3941 * gimple-ssa-store-merging.c
3942 (imm_store_chain_info::output_merged_store): Remove redundant create,
3943 release split_store vector contents on failure.
3944 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
3945 scalar stmt vector on cache hit.
3947 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
3949 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
3951 * config.gcc (powerpc-xilinx-eabi*): Remove.
3952 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
3954 (fusion_addis_mem_combo_load): Ditto.
3955 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
3957 (rs6000_cpu_cpp_builtins): Ditto.
3958 * config/rs6000/rs6000-linux.c
3959 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
3960 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
3961 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
3963 (rs6000_setup_reg_addr_masks): Ditto.
3964 (rs6000_init_hard_regno_mode_ok): Ditto.
3965 (rs6000_option_override_internal): Ditto.
3966 (legitimate_lo_sum_address_p): Ditto.
3967 (rs6000_legitimize_address): Ditto.
3968 (rs6000_legitimize_reload_address): Ditto.
3969 (rs6000_legitimate_address_p): Ditto.
3970 (abi_v4_pass_in_fpr): Ditto.
3971 (setup_incoming_varargs): Ditto.
3972 (rs6000_gimplify_va_arg): Ditto.
3973 (rs6000_split_multireg_move): Ditto.
3974 (rs6000_savres_strategy): Ditto.
3975 (rs6000_emit_prologue_components): Ditto.
3976 (rs6000_emit_epilogue_components): Ditto.
3977 (rs6000_emit_prologue): Ditto.
3978 (rs6000_emit_epilogue): Ditto.
3979 (rs6000_elf_file_end): Ditto.
3980 (rs6000_function_value): Ditto.
3981 (rs6000_libcall_value): Ditto.
3982 * config/rs6000/rs6000.h: Ditto.
3983 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
3984 (TARGET_MINMAX): ... this. New.
3985 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
3986 * config/rs6000/rs6000.md: Remove Xilinx FP support.
3987 (*movsi_internal1_single): Delete.
3988 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
3989 mfpu=, mxilinx-fpu): Delete.
3990 * config/rs6000/singlefp.h: Delete.
3991 * config/rs6000/sysv4.h: Remove Xilinx FP support.
3992 * config/rs6000/t-rs6000: Ditto.
3993 * config/rs6000/t-xilinx: Delete.
3994 * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
3995 * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
3996 (VStype_simple): Delete.
3997 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
3998 * config/rs6000/xfpu.h: Delete.
3999 * config/rs6000/xfpu.md: Delete.
4000 * config/rs6000/xilinx.h: Delete.
4001 * config/rs6000/xilinx.opt: Delete.
4002 * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
4003 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
4005 2018-05-04 Tom de Vries <tom@codesourcery.com>
4008 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
4011 2018-05-04 Richard Biener <rguenther@suse.de>
4014 * tree-complex.c (update_complex_assignment): We are always in SSA form.
4015 (expand_complex_div_wide): Likewise.
4016 (expand_complex_operations_1): Likewise.
4017 (expand_complex_libcall): Preserve EH info of the original stmt.
4018 (tree_lower_complex): Handle removed blocks.
4019 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
4020 on complex multiplication and division libcall builtins.
4022 2018-05-04 Richard Biener <rguenther@suse.de>
4025 * fold-const.c (negate_expr_p): Restrict negation of operand
4026 zero of a division to when we know that can happen without
4028 (fold_negate_expr_1): Likewise.
4030 2018-05-04 Jakub Jelinek <jakub@redhat.com>
4033 * real.h (real_nextafter): Declare.
4034 * real.c (real_nextafter): New function.
4035 * fold-const-call.c (fold_const_nextafter): New function.
4036 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
4037 CASE_CFN_NEXTTOWARD.
4038 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
4039 even when arg1_mode is different from arg0_mode.
4041 2018-05-03 Nathan Sidwell <nathan@acm.org>
4043 * doc/extend.texi (Deprecated Features): Remove
4045 (Backwards Compatibility): Likewise.
4046 * doc/invoke.texi (C++ Language Options): Likewise.
4047 (C++ Dialect Options): Likewise.
4049 2018-05-03 Jakub Jelinek <jakub@redhat.com>
4052 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
4053 _mm512_mask_mullox_epi64): New intrinsics.
4055 2018-05-03 Tom de Vries <tom@codesourcery.com>
4058 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
4059 dump files): Add offload-tree.
4061 2018-05-03 Richard Biener <rguenther@suse.de>
4063 PR tree-optimization/85615
4064 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
4065 to loops not nested in BBs loop father to avoid creating multi-entry
4068 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4070 PR tree-optimization/70291
4071 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
4072 arguments. Change return type to tree. Emit libcall as a new
4073 statement rather than replacing existing one when inplace_p is true.
4074 (expand_complex_multiplication_components): New function.
4075 (expand_complex_multiplication): Expand floating-point complex
4076 multiplication using the above.
4077 (expand_complex_division): Rename inner_type parameter to type.
4078 Update expand_complex_libcall call-site.
4079 (expand_complex_operations_1): Update expand_complex_multiplication
4080 and expand_complex_division call-sites.
4082 2018-05-02 Jakub Jelinek <jakub@redhat.com>
4085 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
4086 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
4087 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
4088 the highest significant bit of the shift count mask is clear. In
4089 check whether and[sq]i3 is needed verify that all significant bits
4090 of the shift count other than the highest are set.
4092 2018-05-02 Tom de Vries <tom@codesourcery.com>
4095 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
4096 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
4097 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
4098 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
4099 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
4100 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
4101 __builtin_goacc_parlevel_size.
4103 2018-05-02 Richard Biener <rguenther@suse.de>
4105 PR tree-optimization/85597
4106 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
4107 do not use split vect_get_vec_defs call but call vect_get_slp_defs
4110 2018-05-02 Tom de Vries <tom@codesourcery.com>
4113 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
4114 dump files): Add ltrans-tree.
4116 2018-05-02 Tom de Vries <tom@codesourcery.com>
4119 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
4120 dump files): Add wpa-ipa.
4122 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
4124 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
4125 powerpc*-*-linux*paired* target.
4126 * config/rs6000/750cl.h: Delete.
4127 * config/rs6000/paired.h: Delete.
4128 * config/rs6000/paired.md: Delete.
4129 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
4131 * config/rs6000/rs6000-builtin.def: Remove paired float support.
4132 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
4133 comment. Remove paired float support.
4134 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
4135 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
4137 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
4138 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
4140 * config/rs6000/rs6000.c: Remove paired float support.
4141 (paired_expand_vector_init, paired_expand_vector_move,
4142 paired_emit_vector_compare, paired_emit_vector_cond_expr,
4143 (paired_expand_lv_builtin, paired_expand_stv_builtin,
4144 paired_expand_builtin, paired_expand_predicate_builtin,
4145 paired_init_builtins): Delete.
4146 * config/rs6000/rs6000.h: Remove paired float support.
4147 * config/rs6000/rs6000.md: Remove paired float support.
4148 (move_from_CR_ov_bit): Delete.
4149 * config/rs6000/rs6000.opt (mpaired): Delete.
4150 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
4151 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
4153 2018-05-02 Richard Biener <rguenther@suse.de>
4156 * gimplify.c (gimplify_save_expr): When in SSA form allow
4157 SAVE_EXPRs to compute to SSA vars.
4159 2018-05-02 Jakub Jelinek <jakub@redhat.com>
4162 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
4163 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
4164 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
4165 clobber operands[2], instead use a new pseudo. Formatting fixes.
4167 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
4169 PR tree-optimization/85586
4170 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
4171 exit early for statements in the same group if the accesses are
4174 2018-05-02 Tom de Vries <tom@codesourcery.com>
4177 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
4180 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
4182 PR tree-optimization/85143
4183 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
4185 2018-05-01 Tom de Vries <tom@codesourcery.com>
4188 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
4189 not found" error message.
4191 2018-05-01 Tom de Vries <tom@codesourcery.com>
4194 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
4195 * vec.c (test_ordered_remove_if): New function.
4196 (vec_c_tests): Call test_ordered_remove_if.
4197 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
4198 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
4199 * tree-vect-patterns.c (vect_pattern_recog_1): Use
4200 VEC_ORDERED_REMOVE_IF.
4202 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4204 PR tree-optimization/82665
4205 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
4206 pointer subtraction where arguments come from a memchr call.
4208 2018-05-01 Jakub Jelinek <jakub@redhat.com>
4210 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
4211 --push-state --as-needed and --pop-state instead of --as-needed and
4212 --no-as-needed if ld supports it.
4213 * configure: Regenerated.
4216 * doc/install.texi2html: Replace _002d with - and _002a with * in
4217 generated html files using sed.
4219 2018-04-30 David Malcolm <dmalcolm@redhat.com>
4222 * gcc-rich-location.c (blank_line_before_p): New function.
4223 (use_new_line): New function.
4224 (gcc_rich_location::add_fixit_insert_formatted): New function.
4225 * gcc-rich-location.h
4226 (gcc_rich_location::add_fixit_insert_formatted): New function.
4228 2018-04-30 David Malcolm <dmalcolm@redhat.com>
4230 * selftest.c (assert_streq): Rename "expected" and "actual" to
4231 "val1" and "val2". Extend NULL-handling to cover both inputs
4232 symmetrically, while still requiring both to be non-NULL for a pass.
4233 * selftest.h (assert_streq): Rename "expected" and "actual" to
4235 (ASSERT_EQ): Likewise.
4236 (ASSERT_EQ_AT): Likewise.
4237 (ASSERT_KNOWN_EQ): Likewise.
4238 (ASSERT_KNOWN_EQ_AT): Likewise.
4239 (ASSERT_NE): Likewise.
4240 (ASSERT_MAYBE_NE): Likewise.
4241 (ASSERT_MAYBE_NE_AT): Likewise.
4242 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
4243 the assertion to pass.
4244 (ASSERT_STREQ_AT): Likewise.
4246 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
4248 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
4249 interaction with -pie.
4251 2018-04-30 David Malcolm <dmalcolm@redhat.com>
4253 * selftest.h: Fix alphabetization of per-source-file selftest
4256 2018-04-30 Jason Merrill <jason@redhat.com>
4258 PR c++/61982 - dead stores to destroyed objects.
4259 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
4262 2018-04-30 Jason Merrill <jason@redhat.com>
4264 * tree.c (build_clobber): New.
4265 * tree.h: Declare it.
4266 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
4268 2018-04-30 David Malcolm <dmalcolm@redhat.com>
4270 * diagnostic-show-locus.c (layout::layout): Update for
4271 location_get_source_line returning a char_span.
4272 (struct char_span): Move to input.h.
4273 (struct correction): Update for fields in char_span becoming
4275 (struct source_line): Update for location_get_source_line
4276 returning a char_span.
4277 (layout::print_line): Likewise.
4278 * edit-context.c (edited_file::print_content): Likewise.
4279 (edited_file::print_diff_hunk): Likewise.
4280 (edited_file::print_run_of_changed_lines): Likewise.
4281 (edited_file::get_num_lines): Likewise.
4282 (edited_line::edited_line): Likewise.
4283 * final.c (asm_show_source): Likewise.
4284 * input.c (location_get_source_line): Convert return type
4285 from const char * to char_span, losing the final "line_len"
4287 (dump_location_info): Update for the above.
4288 (get_substring_ranges_for_loc): Likewise. Use a char_span
4289 when handling the literal within the line.
4290 (test_reading_source_line): Update for location_get_source_line
4291 returning a char_span.
4292 * input.h (class char_span): Move here from
4293 diagnostic-show-locus.c, converting from a struct to a class.
4294 Make data members private.
4295 (char_span::operator bool): New.
4296 (char_span::length): New.
4297 (char_span::get_buffer): New.
4298 (char_span::operator[]): New.
4299 (char_span::subspan): Make const.
4300 (char_span::xstrdup): New.
4301 (location_get_source_line): Convert return type from const char *
4302 to char_span, losing the final "line_size" param.
4304 2018-04-30 Jan Hubicka <jh@suse.cz>
4306 * lto-wrapper.c (ltrans_priorities): New static var.
4307 (cmp_priority): New.
4308 (run_gcc): Read priorities and if doing parallel build order
4309 the Makefile by them.
4311 2018-04-30 David Malcolm <dmalcolm@redhat.com>
4313 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
4315 2018-04-30 Richard Biener <rguenther@suse.de>
4317 * tree-cfg.c (verify_address): Remove base argument, add
4318 flag whether to check TREE_ADDRESSABLE and do that.
4319 (verify_expr): Remove.
4320 (verify_types_in_gimple_reference): Add pieces from verify_expr.
4321 (verify_gimple_assign_single): Likewise.
4322 (verify_gimple_switch): Likewise.
4323 (verify_expr_location_1): Dereference tp once. Add (disabled)
4324 piece from verify_expr.
4325 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
4327 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
4329 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
4331 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
4333 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
4334 (small_data_pattern): Likewise.
4335 (arc_rewrite_small_data): Likewise.
4336 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
4337 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
4338 (get_symbol_alignment): New function.
4339 (legitimate_small_data_address_p): Likewise.
4340 (legitimate_scaled_address): Update, call
4341 legitimate_small_data_address_p.
4342 (output_sdata): New static variable.
4343 (arc_print_operand): Update how we handle small data operands.
4344 (arc_print_operand_address): Likewise.
4345 (arc_legitimate_address_p): Update, use
4346 legitimate_small_data_address_p.
4347 (arc_rewrite_small_data_p): Remove.
4348 (arc_rewrite_small_data_1): Likewise.
4349 (arc_rewrite_small_data): Likewise.
4350 (small_data_pattern): Likewise.
4351 (compact_sda_memory_operand): Update to use
4352 legitimate_small_data_address_p and get_symbol_alignment.
4353 (prepare_move_operands): Don't rewite sdata pattern.
4354 (prepare_extend_operands): Remove.
4355 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
4357 (zero_extendqisi2): Likewise.
4358 (zero_extendhisi2): Likewise.
4359 (extendqihi2): Likewise.
4360 (extendqisi2): Likewise.
4361 (extendhisi2): Likewise.
4365 * config/arc/constraints.md (Usd): Change it to memory constraint.
4367 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
4369 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
4370 as source of std instructions.
4371 * config/arc/arc.md (movsi_insn): Update pattern predicate to
4372 allow 6-bit constants as source for store instructions.
4373 (movdi_insn): Update instruction pattern to allow 6-bit constants
4374 as source for store instructions.
4376 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
4378 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
4380 2018-04-30 Nathan Sidwell <nathan@acm.org>
4381 Sandra Loosemore <sandra@codesourcery.com>
4383 * dumpfile.c (dump_open): Allow '-' for stdout.
4384 * doc/invoke.texi (Developer Options): Document dump filename
4385 determination early. Document stdin/stdout selection.
4387 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
4389 Microblaze Target: PIC data text relative
4391 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
4392 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
4394 * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
4395 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
4396 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
4397 New addressing mode for data-text relative position indepenedent code.
4398 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
4399 'ADDRESS_SYMBOLIC_TXT_REL'.
4400 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
4401 (microblaze_legitimate_pic_operand): Exclude function calls from
4402 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
4403 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
4405 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
4406 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
4407 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
4408 for 'address + offset'.
4409 (microblaze_expand_prologue): Add new function prologue call for
4411 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
4412 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
4413 table in case of TARGET_PIC_DATA_TEXT_REL.
4414 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
4415 * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
4416 Add new macros 'UNSPEC_TEXT',
4417 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
4418 + exclude function calls from 'UNSPEC_PLT' in case of data text
4420 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
4421 new target hook for generating address diff vector tables in case of
4423 * doc/tm.texi : Regenerate.
4424 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
4425 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
4426 of addr diff vector generation.
4427 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
4428 target hook definition.
4429 * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
4430 Add default function for generate_pic_addr_diff_vec -> flag_pic.
4431 * doc/invoke.texi (Add new pic option): Add new microblaze pic
4432 option for data text relative.
4434 2018-04-30 Richard Biener <rguenther@suse.de>
4436 * tree-chrec.h (evolution_function_is_constant_p): Remove
4438 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
4440 2018-04-30 Richard Biener <rguenther@suse.de>
4443 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
4445 2018-04-30 Richard Biener <rguenther@suse.de>
4447 PR tree-optimization/28364
4448 PR tree-optimization/85275
4449 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
4450 copying first exit test.
4452 2018-04-28 Mark Wielaard <mark@klomp.org>
4454 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
4456 (dwarf_AT): Handle DW_AT_addr_base.
4457 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
4459 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
4462 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
4463 (*ashl<dwi>3_doubleword_mask_1): Ditto.
4464 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
4465 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
4467 2018-04-28 Richard Biener <rguenther@suse.de>
4469 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
4470 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
4471 to reflect use. Only add interesting stmts.
4473 2018-04-27 Martin Jambor <mjambor@suse.cz>
4476 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
4477 the jump function allows for passing through aggregate values.
4479 2018-04-27 David Malcolm <dmalcolm@redhat.com>
4481 * input.h (in_system_header_at): Convert from macro to inline
4483 (from_macro_expansion_at): Likewise.
4484 (from_macro_definition_at): Likewise.
4486 2018-04-27 Jeff Law <law@redhat.com>
4488 * config.gcc: Mark tile* targets as deprecated/obsolete.
4490 2018-04-27 Richard Biener <rguenther@suse.de>
4492 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
4495 2018-04-27 Richard Biener <rguenther@suse.de>
4497 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
4499 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
4501 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
4502 with Yd constraint. Set "preferred_for_speed" attribute from
4503 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
4505 (*movdi_internal): Ditto.
4506 (movti_interunit splitters): Remove
4507 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
4508 (movdi_interunit splitters): Ditto.
4509 * config/i386/constraints.md (Ye): Remove.
4510 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
4512 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4515 * config/aarch64/constraints.md (Usg): Limit to 31.
4518 2018-04-27 Jakub Jelinek <jakub@redhat.com>
4520 PR tree-optimization/85529
4521 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
4522 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
4523 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
4524 zero extension or masking of the MSB bit.
4525 (optimize_range_tests): Add FIRST_BB argument, pass it through
4526 to optimize_range_tests_var_bound.
4527 (maybe_optimize_range_tests, reassociate_bb): Adjust
4528 optimize_range_tests callers.
4530 2018-04-26 Richard Biener <rguenther@suse.de>
4531 Jakub Jelinek <jakub@redhat.com>
4533 * cgraph.h (symbol_table): Just declare debug method here.
4534 * symtab.c (symbol_table::debug): Define.
4536 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
4538 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
4540 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
4542 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
4543 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
4544 (*movdi_internal): Substitute Yi and Yj constraint with x
4545 and Ym and Yn constraint with y constraint. Update "isa"
4546 attribute and set "preferred_for_speed" attribute from
4547 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
4548 (*movsi_internal): Ditto.
4549 (*movdf_internal): Ditto.
4550 (*movsf_internal): Ditto.
4551 (*zero_extendsidi2): Ditto.
4552 * config/i386/sse.md (vec_set<mode>_0): Ditto.
4553 (sse2_loadld): Ditto.
4554 (*vec_extract<ssevecmodelower>_0): Ditto.
4555 (*vec_extractv4si_0_zext_sse4): Ditto.
4556 (vec_concatv2di): Ditto.
4557 (*vec_dup<mode>): Ditto.
4558 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
4559 * config/i386/constraints.md (Yi): Remove.
4564 2018-04-26 Nathan Sidwell <nathan@acm.org>
4566 * dumpfile.c (dump_open): New.
4567 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
4568 (dump_finish): Detect stdio/stderr by value not name.
4570 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
4572 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
4574 2018-04-26 Tom de Vries <tom@codesourcery.com>
4577 * config/nvptx/nvptx.c (verify_neutering_jumps)
4578 (verify_neutering_labels): New function
4579 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
4581 2018-04-26 Tom de Vries <tom@codesourcery.com>
4584 * config/nvptx/nvptx.c (needs_neutering_p): New function.
4585 (nvptx_single): Use needs_neutering_p to skip over insns that do not
4588 2018-04-26 Richard Biener <rguenther@suse.de>
4589 Tom de Vries <tom@codesourcery.com>
4592 * lto-streamer-out.c (output_function): Fixup loops if required to match
4593 discovery done in the reader.
4595 2018-04-26 Richard Biener <rguenther@suse.de>
4597 PR tree-optimization/85116
4598 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
4599 have a loop exit from the single latch predecessor. Remove
4600 case of header with just condition.
4601 (ch_base::copy_headers): Exclude infinite loops from any
4603 (pass_ch::execute): Record exits.
4605 2018-04-26 Richard Biener <rguenther@suse.de>
4607 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
4608 prologue cost vector and pass it to vect_get_load_cost.
4609 (vect_get_peeling_costs_all_drs): Likewise.
4610 (vect_peeling_hash_get_lowest_cost): Likewise.
4611 (vect_enhance_data_refs_alignment): Likewise.
4613 2018-04-26 Richard Biener <rguenther@suse.de>
4616 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
4617 checking of integer<->pointer conversions.
4618 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
4619 sign-/zero-extending pointer types.
4620 (expand_omp_for_static_chunk): Likewise.
4622 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
4623 Jean Lee <xiaoyur347@gmail.com>
4625 * config/mips/mips.c (mips_asan_shadow_offset): New function.
4626 (TARGET_ASAN_SHADOW_OFFSET): Define.
4627 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
4628 true for -fsanitize=address.
4630 2018-04-25 Mark Wielaard <mark@klomp.org>
4632 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
4635 2018-04-25 Jakub Jelinek <jakub@redhat.com>
4637 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
4638 than "alu", remove explicit "memory" and "imm_disp" attributes.
4639 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
4642 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
4643 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
4644 gen_lowpart_no_emit.
4646 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
4649 * config/i386/i386.c (ix86_expand_builtin): Change memory
4650 operand to XI, extend p0 to Pmode.
4651 * config/i386/i386.md: Change unspec volatile and operand
4652 1 mode to XI, change operand 0 mode to P.
4654 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
4656 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
4657 GET_MODE_MASK before any checking.
4658 (nds32_can_use_bset_p): Likewise.
4659 (nds32_can_use_btgl_p): Likewise.
4661 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
4663 * config/nds32/nds32-doubleword.md: New define_split pattern for
4664 illegal register number.
4666 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
4668 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
4670 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
4672 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
4674 2018-04-25 Richard Biener <rguenther@suse.de>
4676 * lto-streamer.h (LTO_major_version): Bump to 8.
4678 2018-04-25 Jakub Jelinek <jakub@redhat.com>
4680 * BASE-VER: Set to 9.0.0.
4682 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
4684 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
4685 in __abskf2 and __powikf2.
4687 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4690 * config/aarch64/constraints.md (Usg, Usj): New constraints.
4691 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
4692 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
4693 Use the above on operand 2. Reindent.
4694 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
4696 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
4699 * common/config/i386/i386-common.c (ix86_handle_option): Don't
4701 * config/i386/i386.opt (mcet): Removed.
4702 * doc/install.texi: Remove -mcet documentation.
4703 * doc/invoke.texi: Likewise.
4705 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
4708 * doc/install.texi: Remove -mcet from bootstrap-cet.
4710 2018-04-24 Jakub Jelinek <jakub@redhat.com>
4713 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
4714 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
4718 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
4719 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
4720 containing a CONST_VECTOR.
4722 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
4724 * doc/install.texi: Update newlib dependency for nvptx.
4726 2018-04-24 Jakub Jelinek <jakub@redhat.com>
4729 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
4730 instead of INTVAL when shifting x left.
4732 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
4734 PR tree-optimization/85478
4735 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
4736 vect_grouped_store_supported for single element vectors.
4738 2018-04-24 Richard Biener <rguenther@suse.de>
4741 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
4742 load cost increase to the case of non-constant step.
4744 2018-04-24 Jakub Jelinek <jakub@redhat.com>
4747 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
4748 destination if any_malformed_asm.
4750 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
4753 * expr.c (store_field): In the bitfield case, if the value comes from
4754 a function call and is returned in registers by means of a PARALLEL,
4755 do not change the mode of the temporary unless BLKmode and VOIDmode.
4757 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
4759 PR rtl-optimization/85423
4760 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
4761 dependencies to debug insns when the previous insn is non-debug.
4763 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
4765 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
4766 enums into a single definition.
4767 (fls): Fix predicates and printing.
4770 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
4772 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
4773 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
4774 and short u6 immediate.
4775 (check_if_valid_sleep_operand): Remove.
4776 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
4778 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
4780 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
4781 flag_always_save_lp condition.
4782 * config/nds32/nds32.opt (malways-save-lp): New option.
4784 2018-04-22 Shiva Chen <shiva0217@gmail.com>
4786 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
4787 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
4788 * config/nds32/nds32.h
4789 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
4790 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
4792 2018-04-22 Shiva Chen <shiva0217@gmail.com>
4794 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
4795 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
4797 2018-04-22 Shiva Chen <shiva0217@gmail.com>
4798 Chung-Ju Wu <jasonwucj@gmail.com>
4800 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
4802 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
4803 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
4805 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
4807 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
4809 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
4811 * config/nds32/nds32-protos.h (nds32_data_alignment,
4812 nds32_local_alignment): Declare.
4813 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
4814 nds32_local_alignment): New functions.
4815 (TARGET_CONSTANT_ALIGNMENT): Define.
4816 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
4818 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
4820 * config/nds32/nds32.c
4821 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
4822 (TARGET_MODES_TIEABLE_P): Likewise.
4824 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
4826 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
4829 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
4830 Chung-Ju Wu <jasonwucj@gmail.com>
4832 * config/nds32/constants.md (unspec_volatile_element): Add enum values
4833 for unaligned access.
4834 * config/nds32/nds32-intrinsic.c: Implementation of expanding
4836 * config/nds32/nds32-intrinsic.md: Likewise.
4837 * config/nds32/nds32_intrinsic.h: Likewise.
4838 * config/nds32/nds32.h (nds32_builtins): Likewise.
4839 * config/nds32/nds32.opt (munaligned-access): New option.
4840 * config/nds32/nds32.c (nds32_asm_file_start): Display
4841 flag_unaligned_access status.
4843 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
4845 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
4846 -mno-relax is present.
4847 * config/riscv/linux.h (LINK_SPEC): Ditto.
4849 2018-04-20 Martin Sebor <msebor@redhat.com>
4852 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
4854 (gimple_fold_builtin_stxcpy_chk): Same.
4855 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
4857 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
4860 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
4861 __powikf2 when long double is IEEE 128-bit.
4863 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
4865 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
4866 step to make sure stack always aligned.
4868 2018-04-20 Carl Love <cel@us.ibm.com>
4871 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
4872 size check for arg0.
4874 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
4875 Tom de Vries <tom@codesourcery.com>
4878 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
4879 Emit insns for calls too.
4880 (nvptx_find_par): Always look for worker-level predecessor insn.
4881 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
4883 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
4884 (nvptx_process_pars): Propagate frames for calls.
4886 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
4889 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
4891 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
4892 (ix86_handle_option): Don't handle OPT_mibt.
4893 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
4895 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
4897 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
4898 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
4899 (ix86_target_macros): Define __CET__ with flag_cf_protection
4900 for -fcf-protection.
4901 * config/i386/i386.c (isa2_opts): Remove -mibt.
4902 * config/i386/i386.h (TARGET_IBT): Removed.
4903 (TARGET_IBT_P): Likewise.
4904 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
4905 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
4906 * config/i386/i386.opt (mcet): Update help message.
4909 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
4910 -mcet as an alias for -mshstk.
4912 2018-04-20 Richard Biener <rguenther@suse.de>
4915 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
4916 complexity by forcing a single use of the multiply operand.
4918 2018-04-20 Martin Jambor <mjambor@suse.cz>
4921 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
4922 recursion dependency to only apply to non-clones.
4924 2018-04-20 Martin Jambor <mjambor@suse.cz>
4927 * ipa-cp.c (create_specialized_node): Check that clones of
4928 self-recursive edges exist during IPA-CP.
4930 2018-04-19 Toon Moene <toon@moene.org>
4932 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
4935 2018-04-19 Jakub Jelinek <jakub@redhat.com>
4937 PR tree-optimization/85467
4938 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
4939 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
4940 VECTOR_CST element to type.
4942 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
4945 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
4946 * config/i386/i386.md (builtin_setjmp_setup): Removed.
4947 (builtin_longjmp): Likewise.
4948 (save_stack_nonlocal): New pattern.
4949 (restore_stack_nonlocal): Likewise.
4951 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
4954 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
4955 Replace ASM_OUTPUT_LABEL with fprintf.
4957 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
4960 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
4961 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
4962 * config/i386/i386-c.c (ix86_target_macros_internal): Also
4963 define __IBT__ and __SHSTK__ for -fcf-protection.
4964 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
4966 (ix86_trampoline_init): Likewise.
4967 (x86_output_mi_thunk): Likewise.
4968 (ix86_notrack_prefixed_insn_p): Likewise.
4969 (ix86_option_override_internal): Don't disallow -fcf-protection.
4970 * config/i386/i386.md (rdssp<mode>): Also enable for
4972 (incssp<mode>): Likewise.
4973 (nop_endbr): Likewise.
4974 * config/i386/i386.opt (mcet): Change help message to built-in
4978 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
4979 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
4980 enable CET built-in functions.
4982 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
4984 * common/config/i386/i386-common.c
4985 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
4986 OPTION_MASK_ISA_MOVDIRI_UNSET,
4987 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
4988 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
4989 * config.gcc (movdirintrin.h): New header.
4990 * config/i386/cpuid.h (bit_MOVDIRI,
4991 bit_MOVDIR64B): New bits.
4992 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
4994 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
4995 (VOID, PVOID, PCVOID)): New function types.
4996 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
4997 __builtin_ia32_directstoreu_u64,
4998 __builtin_ia32_movdir64b): New builtins.
4999 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
5000 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
5002 (ix86_valid_target_attribute_inner_p): Ditto.
5003 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
5004 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
5005 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
5006 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
5007 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
5008 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
5009 (movdiri<mode>, movdir64b_<mode>): New.
5010 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
5011 * config/i386/immintrin.h: Include movdirintrin.h.
5012 * config/i386/movdirintrin.h: New file.
5013 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
5015 2018-04-19 Richard Biener <rguenther@suse.de>
5018 * cfg.c (clear_bb_flags): When loop state says we have
5019 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
5021 2018-04-19 Richard Biener <rguenther@suse.de>
5023 PR tree-optimization/84737
5024 * tree-vect-data-refs.c (vect_copy_ref_info): New function
5025 copying restrict info.
5026 (vect_setup_realignment): Use it.
5027 * tree-vectorizer.h (vect_copy_ref_info): Declare.
5028 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
5029 the first DR to all generated stores.
5030 (vectorizable_load): Likewise for loads.
5032 2018-04-19 Jakub Jelinek <jakub@redhat.com>
5034 PR tree-optimization/85446
5035 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
5036 the integral and pointer types to have the same precision.
5038 * doc/install.texi: Document --disable-cet being the default and
5041 2018-04-18 Martin Liska <mliska@suse.cz>
5043 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
5046 2018-04-18 Martin Liska <mliska@suse.cz>
5049 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
5052 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
5053 arguments if they are comparable.
5055 2018-04-18 Martin Liska <mliska@suse.cz>
5058 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
5061 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
5064 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
5067 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
5068 ENDBR after calling __morestack.
5070 2018-04-18 David Malcolm <dmalcolm@redhat.com>
5073 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
5074 by using gcc_base_ver to generate a gcc_driver_version, and use
5075 it when generating GCC_DRIVER_NAME.
5076 * configure: Regenerate.
5078 2018-04-18 Jakub Jelinek <jakub@redhat.com>
5081 * config.gcc: Obsolete powerpc*-*-*spe*.
5083 2018-04-17 Jakub Jelinek <jakub@redhat.com>
5086 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
5087 (stabstr_D): Change type of unum from unsigned int to
5088 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
5091 2018-04-17 Jim Wilson <jimw@sifive.com>
5094 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
5095 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
5096 Set arg_pointer_offset after using pretend_args_size.
5098 2018-04-17 Jakub Jelinek <jakub@redhat.com>
5100 PR rtl-optimization/85431
5101 * dse.c (record_store): Ignore zero width stores.
5104 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
5105 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
5106 __builtin_stack_restore rather than after it.
5107 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
5108 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
5109 argument instead of virtual_dynamic_stack_rtx.
5111 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
5113 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
5115 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
5116 Add note to error message to explain internal mapping of overloaded
5117 built-in function name to non-overloaded built-in function name.
5118 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
5121 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
5124 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
5125 where the inputs overlap with the output.
5127 2018-04-17 Jakub Jelinek <jakub@redhat.com>
5129 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
5130 (=v, v) alternative and explicit "memory" attribute.
5131 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
5132 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
5134 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
5135 "sselog1" type instead of "sselog".
5136 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
5137 "sselog". Remove explicit "memory" attribute.
5138 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
5139 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
5141 (vec_extract_hi_v32hi): Merge all alternatives into one, use
5142 "sselog1" type instead of "sselog". Remove explicit "memory"
5144 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
5145 use "sselog1" type instead of "sselog". Remove explicit "memory"
5147 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
5148 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
5150 (vec_extract_hi_v64qi): Merge all alternatives into one, use
5151 "sselog1" type instead of "sselog". Remove explicit "memory"
5153 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
5154 use "sselog1" type instead of "sselog". Remove explicit "memory"
5158 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
5161 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
5164 2018-04-17 Martin Jambor <mjambor@suse.cz>
5167 * ipa-cp.c (create_specialized_node): Call
5168 expand_all_artificial_thunks if necessary.
5170 2018-04-17 Martin Liska <mliska@suse.cz>
5173 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
5174 in message, remote space in between '_G' and '('.
5176 2018-04-17 Jakub Jelinek <jakub@redhat.com>
5179 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
5180 avx512f_vmcmp<mode>3<round_saeonly_name>,
5181 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
5182 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
5183 avx512f_rndscale<mode><round_saeonly_name>,
5184 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
5185 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
5186 Use %<iptr>2 instead of %2 for -masm=intel.
5187 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
5188 avx512f_vcvttss2usi<round_saeonly_name>,
5189 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
5191 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
5192 avx512f_vcvttsd2usi<round_saeonly_name>,
5193 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
5194 Use %q1 instead of %1 for -masm=intel.
5195 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
5196 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
5197 of %3 for -masm=intel.
5198 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
5200 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
5202 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
5204 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
5205 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
5207 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
5209 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
5210 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
5211 %g1 and one with %0 and %1.
5212 (avx512er_vmrcp28<mode><round_saeonly_name>,
5213 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
5215 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
5216 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
5217 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
5218 of %0 and %{%4%} for -masm=intel.
5219 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
5220 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
5221 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
5222 order of %0 and %{%5%}%{z%} for -masm=intel.
5224 2018-04-17 Jan Hubicka <jh@suse.cz>
5227 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
5229 2018-04-17 Martin Liska <mliska@suse.cz>
5232 * multiple_target.c (create_dispatcher_calls): Set apostrophes
5233 for target_clone error message. Make default implementation
5234 clone to be a local declaration.
5235 (separate_attrs): Add new argument and check for an empty
5237 (expand_target_clones): Handle it.
5238 (ipa_target_clone): Make redirection just for target_clones
5241 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
5242 Tom de Vries <tom@codesourcery.com>
5245 * omp-expand.c (expand_oacc_for): Add dummy false branch for
5246 tiled basic blocks without omp continue statements.
5248 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
5251 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
5252 vec_extract expression as having side effects to make sure it gets
5255 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
5258 * config/i386/i386.c (get_builtin_code_for_version): Check
5261 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
5264 * gcc/config.gcc: Support "skylake".
5265 * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
5267 * gcc/config/i386/i386.c (m_SKYLAKE): Define.
5268 (processor_target_table): Add "skylake".
5269 (ix86_option_override_internal): Add "skylake".
5270 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
5271 PROCESSOR_CANNONLAKE.
5272 (get_builtin_code_for_version): Fix priority for
5273 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
5274 PROCESSOR_SKYLAKE-AVX512.
5275 * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
5276 (processor_type): Add PROCESSOR_SKYLAKE.
5278 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
5279 Jason Merrill <jason@redhat.com>
5282 * convert.c (convert_to_integer_1): Use direct recursion for
5283 enumeral types and types with a precision less than the number
5284 of bits in their mode.
5286 2018-04-16 Julia Koval <julia.koval@intel.com>
5289 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
5290 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
5292 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
5295 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
5296 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
5297 and -mno-direct-move.
5299 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
5302 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
5303 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
5304 Ensure negative shifts result in {0}.
5306 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
5308 PR rtl-optimization/79916
5309 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
5310 regs (if any) to define how to gnerate SD moves when LRA is in
5313 2018-04-13 Jakub Jelinek <jakub@redhat.com>
5315 PR rtl-optimization/85393
5316 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
5317 * except.c (expand_dw2_landing_pad_for_region): Make static.
5318 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
5319 a label and unconditional jump to old_bb, rather than
5320 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
5323 PR rtl-optimization/85376
5324 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
5325 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
5326 instead of a specific value.
5328 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
5329 Bin Cheng <bin.cheng@arm.com>
5331 PR tree-optimization/82965
5332 PR tree-optimization/83991
5333 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
5334 by_profile_only parameter.
5335 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
5336 information if the loop was predicted to iterate too many times.
5337 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
5339 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
5342 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
5345 2018-04-13 Martin Liska <mliska@suse.cz>
5346 Jakub Jelinek <jakub@redhat.com>
5349 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
5350 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
5351 * builtins.c (expand_builtin_memory_copy_args): Use
5352 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
5353 handle dest_addr == pc_rtx.
5355 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
5358 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
5359 asked to not generate direct moves.
5360 (fix_trunc<mode>si2_stfiwx): Similar.
5361 (fix_trunc<mode>si2_internal): Similar.
5363 2018-04-12 Jakub Jelinek <jakub@redhat.com>
5366 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
5367 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
5368 lookup if dest in some wider mode is known to be const0_rtx and
5369 if so, record permanent equivalence for it to be ZERO_EXTEND of
5370 the narrower mode destination.
5372 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
5374 * lto-streamer-out.c (output_function): Revert 259346.
5375 * omp-expand.c (expand_oacc_for): Likewise.
5377 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
5379 PR rtl-optimization/85354
5380 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
5381 * sel-sched.c (sel_global_init): ... here.
5383 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
5386 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
5387 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
5388 mode for PE-COFF targets.
5389 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
5390 (i386_pe_asm_lto_end): Likewise.
5391 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
5392 (TARGET_ASM_LTO_END): Likewise.
5393 * config/i386/winnt.c (saved_debug_info_level): New static variable.
5394 (i386_pe_asm_lto_start): New function.
5395 (i386_pe_asm_lto_end): Likewise.
5397 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
5398 Richard Biener <rguenther@suse.de>
5401 * lto-streamer-out.c (output_function): Fix CFG loop state before
5403 * omp-expand.c (expand_oacc_for): Handle calls to internal
5404 functions like regular functions.
5406 2018-04-12 Richard Biener <rguenther@suse.de>
5409 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
5410 for the early LTO debug to properly generate references to it
5411 during DIE emission. Do not re-use that for the skeleton for
5413 (dwarf2out_early_finish): Likewise.
5415 2018-04-12 Jakub Jelinek <jakub@redhat.com>
5418 * config/i386/sse.md
5419 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
5420 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
5421 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
5422 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
5423 and output is a reg, avoid creating invalid lowpart subreg, but
5424 instead split into a 512-bit move. Don't split if not AVX512VL,
5425 input is xmm16+ reg and output is a mem.
5426 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
5427 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
5428 xmm16+ reg and output is a mem.
5430 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
5432 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
5433 also for flag_dwarf2_cfi_asm.
5435 2018-04-12 Jakub Jelinek <jakub@redhat.com>
5437 PR rtl-optimization/85342
5438 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
5439 a bool scalar var inside of the loop instead. Don't try to update
5440 recog_data.operand after failed apply_change_group.
5442 2018-04-12 Tom de Vries <tom@codesourcery.com>
5445 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
5446 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
5447 array with flexible array member as array without given dimension.
5448 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
5449 argument for undefined param to true.
5451 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
5454 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
5455 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
5456 from PowerPC section.
5457 * config/rs6000/sysv4.opt (mcall-): Improve help text.
5458 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
5459 help text that is too long.
5460 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
5461 help text that is too long.
5462 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
5463 help text that is too long.
5465 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
5467 * config/alpha/alpha.md (stack_probe_internal): Rename
5468 from "probe_stack". Update all callers.
5470 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
5472 PR rtl-optimization/84566
5473 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
5474 sched_macro_fuse_insns.
5476 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
5479 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
5480 (compute_block_dependences): ... from here.
5482 2018-04-11 Jakub Jelinek <jakub@redhat.com>
5484 PR tree-optimization/85331
5485 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
5486 from int to HOST_WIDE_INT.
5488 2018-04-11 Martin Jambor <mjambor@suse.cz>
5491 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
5492 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
5493 not the same as the source val.
5494 (cgraph_edge_brings_value_p): New parameter.
5495 (gather_edges_for_value): Pass destination value to
5496 cgraph_edge_brings_value_p.
5497 (perhaps_add_new_callers): Likewise.
5498 (get_info_about_necessary_edges): Likewise and exclude values brought
5499 only by self-recursive edges.
5500 (create_specialized_node): Redirect only clones of self-calling edges.
5501 (+self_recursive_pass_through_p): New function.
5502 (find_more_scalar_values_for_callers_subset): Use it.
5503 (find_aggregate_values_for_callers_subset): Likewise.
5504 (known_aggs_to_agg_replacement_list): Removed.
5505 (decide_whether_version_node): Re-calculate known constants for all
5506 remaining context clones.
5508 2018-04-11 Richard Biener <rguenther@suse.de>
5511 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
5512 from early DWARF output.
5513 (dwarf2out_early_finish): Output line info unconditionally into
5514 early DWARF and add reference to it.
5516 2018-04-11 Jakub Jelinek <jakub@redhat.com>
5519 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
5520 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
5521 other than V2DFmode using iptr mode attribute.
5522 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
5524 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
5526 PR rtl-optimization/84659
5527 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
5529 2018-04-11 Jakub Jelinek <jakub@redhat.com>
5532 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
5534 (output_loc_list): Pass address of a dummy size variable even in the
5535 locview handling loop.
5536 (index_location_lists): Add comment on why skip_loc_list_entry can't
5539 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
5542 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
5545 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
5548 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
5549 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
5550 and -mstring-compare-inline-limit.
5552 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
5555 * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
5556 for stack clash protection in a register whenever we need it to be in
5559 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
5561 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
5562 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
5564 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
5567 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
5569 (mlong-double-): Ditto.
5570 * config/rs6000/sysv4.opt (msdata=): Ditto.
5571 (mtls-size=): Ditto.
5573 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
5575 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
5576 erroneous entries for
5577 "vector int vec_ldl (int, long int *)", and
5578 "vector unsigned int vec_ldl (int, unsigned long int *)".
5579 Add comments and entries for
5580 "vector bool char vec_ldl (int, bool char *)",
5581 "vector bool short vec_ldl (int, bool short *)",
5582 "vector bool int vec_ldl (int, bool int *)",
5583 "vector bool long long vec_ldl (int, bool long long *)",
5584 "vector pixel vec_ldl (int, pixel *)",
5585 "vector long long vec_ldl (int, long long *)",
5586 "vector unsigned long long vec_ldl (int, unsigned long long *)".
5587 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
5588 type tree bool_long_long_type_node and correct definition of
5589 bool_V2DI_type_node to make reference to this new type tree.
5590 (rs6000_mangle_type): Replace erroneous reference to
5591 bool_long_type_node with bool_long_long_type_node.
5592 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
5593 comments to emphasize sign distinctions for char and int types and
5594 replace RS6000_BTI_bool_long constant with
5595 RS6000_BTI_bool_long_long constant. Also add comment to restrict
5596 use of RS6000_BTI_pixel.
5597 (bool_long_type_node): Remove this macro definition.
5598 (bool_long_long_type_node): New macro definition
5600 2018-04-10 Jakub Jelinek <jakub@redhat.com>
5602 PR rtl-optimization/85300
5603 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
5604 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
5605 simplify_unary_operation fails.
5607 2018-04-10 Martin Liska <mliska@suse.cz>
5609 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
5610 cgraph_edge and ipa_ref.
5612 2018-04-10 Jakub Jelinek <jakub@redhat.com>
5616 * config/i386/sse.md
5617 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
5618 computation of the VEC_MERGE selector from mask.
5619 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
5620 Fix decoding of the VEC_MERGE selector into mask.
5622 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
5624 PR tree-optimization/85286
5625 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
5627 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
5629 * final.c (final_1): Set insn_last_address as well as
5630 insn_current_address.
5632 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5635 * explow.c (emit_stack_probe): Call validize_mem on memory location
5636 before passing it to gen_probe_stack. Create address operand and
5637 legitimize it for the probe_stack_address case.
5639 2018-04-09 Jan Hubicka <jh@suse.cz>
5642 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
5643 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
5644 * tree.c (free_lang_data_in_type): Fix handling of binfos;
5646 (free_lang_data): Rebuild type inheritance graph.
5648 2018-04-09 Martin Sebor <msebor@redhat.com>
5650 * invoke.texi (-finline-small-functions): Mention other optimization
5652 (-findirect-inlining, -fpartial-inlining): Same.
5653 (-finline-functions-called-once): Same.
5654 (-freorder-blocks-and-partition): Same.
5656 2018-04-09 Jan Hubicka <jh@suse.cz>
5659 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
5660 jumps; choose last target that matches the criteria (i.e.
5661 no partition changes for non-crossing jumps).
5662 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
5663 support for redirecting crossing jumps to non-crossing.
5665 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
5667 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
5668 also for naked functions.
5670 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
5672 * config/arc/arc.md (add_shift): New pattern.
5673 (add_shift2): Likewise.
5674 (sub_shift): Likewise.
5675 (sub_shift_cmp0_noout): Likewise.
5676 (compare_si_ashiftsi): Likewise.
5677 (xbfu_cmp0_noout): New combine pattern.
5678 (xbfu_cmp0"): Likewise.
5679 (movsi_set_cc_insn): Place the predicable variant first.
5680 (commutative_binary_cmp0_noout): Remove clobber.
5681 (commutative_binary_cmp0): New pattern.
5682 (noncommutative_binary_cmp0): Likewise.
5683 (noncommutative_binary_cmp0_noout): Likewise.
5684 (noncommutative_binary_comparison_result_used): Removed.
5685 (rsub_cmp0): New pattern.
5686 (rsub_cmp0_noout): Likewise.
5687 (extzvsi): Changed, keep only meaningful variants.
5688 (SQH, SEZ): New iterators.
5689 (SQH_postfix): New mode attribute.
5690 (SEZ_prefix): New code attribute.
5691 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
5692 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
5693 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
5695 (noncommutative_operator): Check the availability of barrel
5698 2018-04-09 Richard Biener <rguenther@suse.de>
5700 PR tree-optimization/85284
5701 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
5702 Only use the niter constraining form of simple_iv when the exit
5705 2018-04-09 Tom de Vries <tom@codesourcery.com>
5708 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
5709 (define_expand "*memory_barrier"): New define_expand.
5710 (define_insn "memory_barrier"): New insn.
5712 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
5714 PR rtl-optimization/80463
5715 PR rtl-optimization/83972
5716 PR rtl-optimization/83480
5718 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
5719 correct producer for the insn.
5720 (tidy_control_flow): Fixup seqnos in case of debug insns.
5722 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
5724 PR rtl-optimization/83913
5726 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
5727 different sched-times when merging exprs.
5729 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
5731 PR rtl-optimization/83962
5733 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
5734 tidy_fallthru_edge and tidy_control_flow.
5736 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
5738 PR rtl-optimization/83530
5740 * sel-sched.c (force_next_insn): New global variable.
5741 (remove_insn_for_debug): When force_next_insn is true, also leave only
5742 next insn in the ready list.
5743 (sel_sched_region): When the region wasn't scheduled, make another pass
5744 over it with force_next_insn set to 1.
5746 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
5748 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
5750 * config/nds32/constants.md (unspec_volatile_element): Add enum values
5751 for interrupt control.
5752 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
5753 functions for interrupt control.
5754 * config/nds32/nds32-intrinsic.md: Likewise.
5755 * config/nds32/nds32_intrinsic.h: Likewise.
5756 * config/nds32/nds32.h (nds32_builtins): Likewise.
5758 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
5760 * config/nds32/nds32.c (nds32_init_machine_status,
5761 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
5762 strict_aligned_p field.
5763 (nds32_expand_to_rtl_hook): New function.
5764 (TARGET_EXPAND_TO_RTL_HOOK): Define.
5765 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
5767 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
5768 Chung-Ju Wu <jasonwucj@gmail.com>
5770 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
5771 * config/nds32/nds32-n7.md: New file.
5772 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
5773 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
5775 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
5776 * config/nds32/nds32.md (pipeline_model): Add n7.
5777 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
5778 * config/nds32/pipelines.md: Include n7 settings.
5780 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
5781 Chung-Ju Wu <jasonwucj@gmail.com>
5783 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
5784 * config/nds32/nds32-e8.md: New file.
5785 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
5786 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
5788 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
5789 * config/nds32/nds32.md (pipeline_model): Add e8.
5790 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
5791 * config/nds32/pipelines.md: Include e8 settings.
5793 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
5794 Chung-Ju Wu <jasonwucj@gmail.com>
5796 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
5797 * config/nds32/nds32-n8.md: New file.
5798 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
5799 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
5801 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
5802 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
5803 * config/nds32/nds32.md (pipeline_model): Add n8.
5804 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
5805 * config/nds32/pipelines.md: Include n8 settings.
5807 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
5808 Chung-Ju Wu <jasonwucj@gmail.com>
5810 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
5811 * config/nds32/nds32-n9-2r1w.md: New file.
5812 * config/nds32/nds32-n9-3r2w.md: New file.
5813 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
5814 nds32_register_ports): New or modify for cpu n9.
5815 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
5817 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
5818 * config/nds32/nds32-utils.c: New file.
5819 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
5820 TARGET_MUL_SLOW): Define.
5821 * config/nds32/nds32.md (pipeline_model): New attribute.
5822 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
5823 New options that support cpu n9.
5824 * config/nds32/pipelines.md: Include n9 settings.
5825 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
5827 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
5829 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
5830 information if necessary.
5831 (output_cond_branch_compare_zero): Likewise.
5832 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
5833 (nds32_target_alignment): Refine for alignment.
5834 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
5835 (FUNCTION_BOUNDARY): Modify.
5836 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
5838 * config/nds32/nds32.opt (malways-align, malign-functions): New.
5840 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
5842 * config/nds32/constants.md (unspec_volatile_element): Add values for
5843 TLB operation and data prefetch.
5844 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
5845 functions for TLB operation and data prefetch.
5846 * config/nds32/nds32-intrinsic.md: Likewise.
5847 * config/nds32/nds32_intrinsic.h: Likewise.
5848 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
5849 (nds32_print_operand): Likewise.
5850 * config/nds32/nds32.h (nds32_builtins): Likewise.
5852 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
5853 Andrew Pinski <pinsika@gcc.gnu.org>
5856 * match.pd: Use constant_boolean_node of correct type instead of
5857 boolean_true_node or boolean_false_node for simplifying
5858 pointer comparisons to zero.
5860 2018-04-07 Jakub Jelinek <jakub@redhat.com>
5862 PR tree-optimization/80021
5863 * tree.c (verify_type_variant): Make error call in verify_variant_match
5864 translatable and remove final full stop.
5866 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
5868 * config/nds32/constants.md (unspec_volatile_element): Add
5869 UNSPEC_VOLATILE_EH_RETURN.
5870 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
5871 nds32_output_stack_pop): Support dwarf exception handling process.
5872 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
5873 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
5874 exception handling process.
5875 (nds32_compute_stack_frame): Likewise.
5876 (nds32_return_addr_rtx): Likewise.
5877 (nds32_initial_elimination_offset): Likewise.
5878 (nds32_expand_prologue): Likewise.
5879 (nds32_expand_epilogue): Likewise.
5880 (nds32_dynamic_chain_address): New function.
5881 * config/nds32/nds32.h (machine_function): Add fields for dwarf
5883 (DYNAMIC_CHAIN_ADDRESS): Define.
5884 (EH_RETURN_DATA_REGNO): Define.
5885 (EH_RETURN_STACKADJ_RTX): Define.
5886 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
5887 patterns for dwarf exception handling.
5889 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
5891 * config/nds32/nds32.h: Clean up obsolete macros.
5893 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
5895 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
5896 Add enum values for particular instructions.
5897 * config/nds32/nds32-intrinsic.c: Implementation of expanding
5898 particular intrinsic functions.
5899 * config/nds32/nds32-intrinsic.md: Likewise.
5900 * config/nds32/nds32_intrinsic.h: Likewise.
5901 * config/nds32/nds32.h (nds32_builtins): Likewise.
5902 * config/nds32/nds32.md (type): Add pbsad and pbsada.
5903 (btst, ave): New patterns for particular instructions.
5905 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
5907 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
5908 Add enum values for atomic load/store and memory sync.
5909 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
5911 * config/nds32/nds32-intrinsic.md: Likewise.
5912 * config/nds32/nds32_intrinsic.h: Likewise.
5913 * config/nds32/nds32.h (nds32_builtins): Likewise.
5915 2018-04-07 Jakub Jelinek <jakub@redhat.com>
5917 PR tree-optimization/85257
5918 * fold-const.c (native_encode_vector): If not all elts could fit
5919 and off is -1, return 0 rather than offset.
5920 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
5921 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
5922 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
5923 adjust buffer in native_interpret_expr call.
5925 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
5927 * config/nds32/constants.md (unspec_volatile_element): Add cache
5928 control enum values.
5929 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
5930 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
5931 * config/nds32/nds32.c (nds32_cctl_names): New.
5932 (nds32_print_operand): Handle cache control register names.
5933 * config/nds32/nds32.h (nds32_builtins): New enum values.
5934 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
5936 * config/nds32/nds32.md (type): Add mmu.
5937 * config/nds32/pipelines.md (simple_insn): Add mmu.
5939 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
5941 * config/nds32/nds32.md (type): Remove call.
5942 * config/nds32/pipelines.md (simple_insn): Likewise.
5944 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
5946 * config/nds32/constants.md (unspec_volatile_element): Add
5947 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
5948 UNSPEC_VOLATILE_FMFCFG.
5949 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
5950 description for fmfcfg and fmfcsr.
5951 (bdesc_1arg): Add fmtcsr.
5952 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
5953 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
5954 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
5955 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
5956 unspec_fmfcfg): New patterns.
5957 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
5958 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
5959 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
5960 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
5961 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
5962 __nds32__fmfcfg): Define.
5964 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
5966 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
5967 intrinsic register names.
5968 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
5969 intrinsic register enum values and macros.
5971 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
5973 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
5974 for load/store addressing form.
5975 (nds32_print_operand_address): Likewise.
5977 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
5980 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
5981 based on LABEL_REF. Remove useless assertion.
5982 (pic_address_needs_scratch): Fix formatting.
5983 (sparc_legitimize_pic_address): Minor tweaks.
5984 (sparc_delegitimize_address): Adjust assertion accordingly.
5985 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
5986 into symbolic_operand.
5987 (movsi_high_pic_label_ref): Likewise.
5988 (movsi_lo_sum_pic_label_ref): Likewise.
5989 (movdi_pic_label_ref): Likewise.
5990 (movdi_high_pic_label_ref): Likewise.
5991 (movdi_lo_sum_pic_label_ref): Likewise.
5993 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
5995 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
5996 custom LIB_SPEC setup.
5998 2018-04-06 Ruslan Bukin <br@bsdpad.com>
5999 Kito Cheng <kito.cheng@gmail.com>
6001 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
6002 * config/riscv/freebsd.h: New.
6004 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
6006 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
6007 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
6010 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
6011 Kito Cheng <kito.cheng@gmail.com>
6013 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
6014 nds32_output_call, nds32_symbol_binds_local_p): New functions.
6015 * config/nds32/nds32-protos.h (nds32_output_call,
6016 nds32_output_return): Declare.
6017 * config/nds32/nds32.md: Refine all the call and return patterns.
6019 2018-04-06 Jakub Jelinek <jakub@redhat.com>
6022 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
6023 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
6025 PR rtl-optimization/84872
6026 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
6027 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
6030 2018-04-06 Tamar Christina <tamar.christina@arm.com>
6032 * expr.c (copy_blkmode_to_reg): Revert 254862.
6033 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
6035 2018-04-06 Richard Biener <rguenther@suse.de>
6038 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
6039 after seeing a component reference with an adjacent field. Treat
6040 refs to arrays at struct end of external decls similar to
6041 refs to unconstrained commons.
6043 2018-04-06 Jakub Jelinek <jakub@redhat.com>
6046 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
6047 look through SAVE_EXPRs with non-side-effects argument. Adjust
6049 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
6052 2018-04-06 Richard Biener <rguenther@suse.de>
6055 * alias.c (find_base_term): New wrapper around find_base_term
6056 unwinding CSELIB_VAL_PTR changes.
6057 (find_base_term): Do not restore CSELIB_VAL_PTR during the
6060 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
6062 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
6064 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
6065 constant definitions.
6066 ("nop"): lr 0,0 -> nopr r0
6067 ("nop_lr0", "nop_lr1"): New insn definitions.
6069 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
6071 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
6072 NDS32_V3PUSH_AVAILABLE_P macro.
6074 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
6075 Chung-Ju Wu <jasonwucj@gmail.com>
6077 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
6078 (nds32*-*-*): Add float and fpu_config into supported_defaults.
6079 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
6080 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
6081 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
6082 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
6083 * config/nds32/constraints.md: New constraints and checking for hard
6084 float configuration.
6085 * config/nds32/iterators.md: New mode iterator and attribute for hard
6086 float configuration.
6087 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
6089 * config/nds32/nds32-fpu.md: New file.
6090 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
6091 deal with hard float code generation.
6092 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
6094 (abi_type, float_reg_number): New enum type.
6095 * config/nds32/nds32-predicates.c: New predicates for hard float.
6096 * config/nds32/nds32-protos.h: Declare functions for hard float.
6097 * config/nds32/nds32.c: Implementation for hard float configuration.
6098 * config/nds32/nds32.h: Definitions for hard float configuration.
6099 * config/nds32/nds32.md: Include hard float machine description and
6100 modify patterns for hard float configuration.
6101 * config/nds32/nds32.opt: New options for hard float configuration.
6102 * config/nds32/predicates.md: New predicates for hard float
6105 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
6107 * common/config/nds32/nds32-common.c
6108 (nds32_option_optimization_table): Enable -mreleax-hint by default.
6110 2018-04-05 Jakub Jelinek <jakub@redhat.com>
6113 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
6114 CONSTRUCTOR_ELT (ctor, ...)->value.
6116 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
6119 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
6121 2018-04-05 Tom de Vries <tom@codesourcery.com>
6124 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
6127 2018-04-05 Shiva Chen <shiva0217@gmail.com>
6128 Kito Cheng <kito.cheng@gmail.com>
6130 * config/nds32/constraints.md (U33): Fine-tune checking condition.
6131 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
6132 * config/nds32/nds32.h (nds32_16bit_address_type): Add
6133 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
6135 2018-04-05 Shiva Chen <shiva0217@gmail.com>
6136 Kito Cheng <kito.cheng@gmail.com>
6138 * config/nds32/constraints.md (Ufe): New memory constraint.
6139 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
6140 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
6141 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
6143 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
6144 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
6146 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
6148 * config/nds32/nds32.md: Use optimize_size in the condition for
6149 alu-shift instructions.
6151 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
6153 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
6155 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
6157 * config/nds32/nds32.md (negsi2): Refine pattern.
6159 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
6160 Chung-Ju Wu <jasonwucj@gmail.com>
6162 * config/nds32/iterators.md (shift_rotate): New code iterator.
6163 (shift): New code attribute.
6164 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
6165 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
6166 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
6167 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
6168 bit-wise operations.
6169 (andsi3, *andsi3): Ditto.
6170 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
6171 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
6172 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
6173 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
6174 nds32_ior_operand, nds32_xor_operand): New predicates.
6176 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
6178 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
6179 (addsi3, subsi3): ... this.
6181 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
6183 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
6185 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
6187 * config/nds32/nds32.md: Adjust indention.
6189 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
6191 * config/nds32/nds32.md (feature): New attribute.
6193 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
6195 * config/nds32/nds32.md (subtype): New attribute.
6197 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
6200 * config/arm/arm-builtins.c (arm_expand_builtin): Change
6201 expansion to perform a bitwise AND of the argument followed by a
6202 boolean negation of the result.
6204 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
6206 PR rtl-optimization/84878
6207 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
6208 the basic block. Assert the use reference is not artificial and that
6209 it has an associated insn.
6211 2018-04-04 Michael Matz <matz@suse.de>
6213 * builtins.c (compute_objsize): Pass correct operand
6214 to array_at_struct_end_p.
6216 2018-04-04 Richard Biener <rguenther@suse.de>
6219 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
6220 from contexts for DINFO_LEVEL_TERSE and below.
6222 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
6224 * config/nds32/nds32-doubleword.md (move_<mode>): Require
6225 resiter_operand condition.
6226 * config/nds32/nds32.md (*move<mode>): Ditto.
6228 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
6229 Monk Chiang <sh.chiang04@gmail.com>
6231 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
6233 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
6235 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
6237 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
6238 Kito Cheng <kito.cheng@gmail.com>
6240 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
6241 nds32_cond_code_str, output_cond_branch,
6242 output_cond_branch_compare_zero, nds32_expand_cbranch,
6243 nds32_expand_cstore, nds32_expand_movcc,
6244 nds32_output_cbranchsi4_equality_zero,
6245 nds32_output_cbranchsi4_equality_reg,
6246 nds32_output_cbranchsi4_equality_reg_or_const_int,
6247 nds32_output_cbranchsi4_greater_less_zero: New functions.
6248 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
6249 nds32_expand_cstore, nds32_expand_movcc,
6250 nds32_output_cbranchsi4_equality_zero,
6251 nds32_output_cbranchsi4_equality_reg,
6252 nds32_output_cbranchsi4_equality_reg_or_const_int,
6253 nds32_output_cbranchsi4_greater_less_zero): Declare.
6254 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
6255 nds32_rimm11s_operand): New predicates.
6256 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
6257 * config/nds32/nds32.md: Rewrite all the branch and conditional move
6260 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
6262 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
6263 * config/nds32/nds32.md: Ditto.
6264 * config/nds32/pipelines.md: Ditto.
6266 2018-04-04 Richard Biener <rguenther@suse.de>
6268 PR tree-optimization/85168
6269 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
6270 propagating abnormals.
6272 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
6274 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
6276 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
6277 Kito Cheng <kito.cheng@gmail.com>
6279 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
6280 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
6281 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
6282 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
6283 * config/nds32/nds32.md (sibcall_internal): New.
6284 (sibcall_register): Remove.
6285 (sibcall_immediate): Remove.
6286 (sibcall_value_internal): New.
6287 (sibcall_value_register): Remove.
6288 (sibcall_value_immediate): Remove.
6289 * config/nds32/predicates.md (nds32_general_register_operand): New.
6290 (nds32_call_address_operand): New.
6292 2018-04-03 Jakub Jelinek <jakub@redhat.com>
6294 PR rtl-optimization/85167
6295 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
6296 bb_defs if *split_p, instead preinitialize it to NULL.
6298 PR tree-optimization/85156
6299 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
6300 evaluating the argument multiple times.
6302 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
6304 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
6306 (_mm_cvtpd_ps): Likewise.
6307 (_mm_cvttpd_epi32): Likewise.
6308 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
6309 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
6310 vector, pixel, and bool following altivec.h include.
6312 2018-04-03 Martin Sebor <msebor@redhat.com>
6314 * doc/extend.texi (Common Function Attributes): Clarify.
6315 (const attribute): Likewise.
6316 (pure attribute): Likewise.
6318 2018-04-03 Jakub Jelinek <jakub@redhat.com>
6321 * config/i386/i386.c (ix86_expand_vector_set): Use
6322 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
6324 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
6326 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
6327 instructions when changing rounding bits to preserve precision bits
6328 in the x87 control word.
6330 2018-04-03 Martin Liska <mliska@suse.cz>
6332 PR tree-optimization/82491
6333 * rtl.h (strip_offset_and_add): Replace += suboffset with
6334 poly_uint64 () + suboffset.
6336 2018-03-29 Martin Liska <mliska@suse.cz>
6337 Martin Jambor <mjambor@suse.cz>
6340 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
6341 param_type is not an integral or pointer type.
6343 2018-04-03 Richard Biener <rguenther@suse.de>
6345 * sese.h (recompute_all_dominators): Remove.
6347 2018-04-02 Martin Sebor <msebor@redhat.com>
6349 * doc/invoke.texi (-Wrestrict): Fix typos.
6351 2018-04-02 Jim Wilson <jimw@sifive.com>
6353 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
6354 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
6355 (<optab>di3, <optab>si3_extend): Likewise.
6356 (<optab>si3_mask, <optab>si3_mask_1): New.
6357 (<optab>di3_mask, <optab>di3_mask_1): New.
6358 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
6359 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
6360 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
6362 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
6364 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
6367 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
6369 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
6370 (nds32_canonicalize_comparison): New function.
6372 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
6373 Kito Cheng <kito.cheng@gmail.com>
6374 Kuan-Lin Chen <kuanlinchentw@gmail.com>
6376 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
6377 * config/nds32/constants.md (unspec_volatile_element): Add
6378 UNSPEC_VOLATILE_RELAX_GROUP.
6379 * config/nds32/nds32-relax-opt.c: New file.
6380 * config/nds32/nds32-predicates.c
6381 (nds32_symbol_load_store_p): New function.
6382 * config/nds32/nds32-protos.h
6383 (nds32_symbol_load_store_p): Declare function.
6384 (make_pass_nds32_relax_opt): Declare new rtl pass function.
6385 * config/nds32/nds32.c
6386 (nds32_register_pass): New function to register pass.
6387 (nds32_register_passes): New function to register passes.
6388 * config/nds32/nds32.md (relax_group): New pattern.
6389 * config/nds32/nds32.opt (mrelax-hint): New option.
6390 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
6392 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
6394 * config/nds32/t-nds32: Modify files dependency.
6396 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
6398 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
6399 (PROFILE_HOOK): Define its implementation.
6401 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
6403 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
6404 type and 32-bit size.
6406 2018-04-01 Jakub Jelinek <jakub@redhat.com>
6409 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
6410 (V_128_256): New mode iterator.
6411 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
6412 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
6413 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
6415 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
6416 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
6418 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
6421 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
6422 NaN inputs correctly.
6424 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
6427 * config/rs6000/vsx.md (??r): New mode attribute.
6428 (*vsx_mov<mode>_64bit): Use it.
6429 (*vsx_mov<mode>_32bit): Likewise.
6431 2018-03-30 Martin Sebor <msebor@redhat.com>
6433 PR tree-optimization/84818
6434 * builtins.c (check_access): Use warning_n.
6436 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
6439 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
6441 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
6444 2018-03-30 Julia Koval <julia.koval@intel.com>
6447 * x86-tune.def (movx, partial_reg_dependency): Enable for
6450 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
6453 * lra-constraints.c (process_alt_operands): Move setting
6454 this_alternative_matches below.
6456 2018-03-29 Martin Liska <mliska@suse.cz>
6459 * doc/invoke.texi: Document how LTO works with debug info.
6460 Describe auto-load support of binutils. Mention 'x86-64'
6461 as valid option value of -march option.
6463 2018-03-29 Jakub Jelinek <jakub@redhat.com>
6465 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
6468 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
6469 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
6470 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
6473 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
6476 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
6477 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
6478 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
6479 for RS6000_BTM_POWERPC64.
6480 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
6481 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
6482 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
6487 2018-03-28 Carl Love <cel@us.ibm.com>
6490 2017-09-27 Carl Love <cel@us.ibm.com>
6492 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
6493 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
6494 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
6497 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
6499 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
6500 instead of __vector bool.
6501 (_mm_max_pu8): Likewise.
6502 (_mm_min_pi16): Likewise.
6504 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
6507 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
6508 (DIVWEUO): Likewise.
6510 (DIVDEUO): Likewise.
6511 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
6512 DIVWEUO and DIVDEUO.
6513 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
6514 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
6515 (div_extend): Likewise.
6516 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
6518 (__builtin_divweuo): Likewise.
6519 (__builtin_divdeo): Likewise.
6520 (__builtin_divdeuo): Likewise.
6522 2018-03-28 Jakub Jelinek <jakub@redhat.com>
6525 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
6526 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
6528 PR tree-optimization/82004
6529 * gimple-match-head.c (optimize_pow_to_exp): New function.
6530 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
6531 Don't fold to exp if optimize_pow_to_exp is false.
6533 2018-03-28 Martin Liska <mliska@suse.cz>
6536 * calls.c (initialize_argument_information): Fix trailing space.
6537 * common.opt: Fix typo and provide better explanation for
6538 -fsanitize-coverage option.
6539 * config/i386/i386.opt: Fix typo.
6541 2018-03-28 Jakub Jelinek <jakub@redhat.com>
6542 Martin Liska <mliska@suse.cz>
6545 * gimplify.c (asan_poison_variable): Don't do the check for
6546 gimplify_omp_ctxp here.
6547 (gimplify_decl_expr): Do it here.
6548 (gimplify_target_expr): Likewise.
6550 2018-03-28 Martin Liska <mliska@suse.cz>
6553 * config/i386/i386.c (ix86_function_arg_advance): Do not call
6554 chkp_type_bounds_count if MPX is not enabled.
6556 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
6558 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
6560 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
6563 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
6564 function to create the function decl for complex long double
6565 multiply and divide for -mabi=ieeelongdouble.
6566 (init_float128_ieee): Call it.
6568 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
6571 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
6572 -fcf-protection=branch -mibt.
6573 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
6575 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6578 * config/arm/arm.c (arm_valid_symbolic_address): Handle
6579 arm_word_relocations.
6581 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
6584 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
6585 extern array declarations.
6587 2018-03-27 Richard Biener <rguenther@suse.de>
6590 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
6591 explicit single_use checks.
6593 2018-03-27 Richard Biener <rguenther@suse.de>
6595 PR tree-optimization/85082
6596 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
6599 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6601 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
6602 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
6603 Turn on fasynchronous-unwind-tables and funwind-tables.
6605 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
6608 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
6609 (*bmi_blsr_<mode>_ccz): Ditto.
6611 2018-03-26 Tom de Vries <tom@codesourcery.com>
6613 PR tree-optimization/85063
6614 * omp-general.c (offloading_function_p): New function. Factor out
6616 * omp-offload.c (pass_omp_target_link::gate): ... here.
6617 * omp-general.h (offloading_function_p): Declare.
6618 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
6619 with attribute omp declare target for offloading functions.
6621 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
6623 PR tree-optimization/84005
6624 * tree-data-ref.h (get_base_for_alignment): Declare.
6625 * tree-data-ref.c (get_base_for_alignment_1): New function.
6626 (get_base_for_alignment): Likewise.
6627 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
6628 get_base_for_alignment to find a suitable base object, instead
6629 of always using drb->base_address.
6631 2018-03-23 Jakub Jelinek <jakub@redhat.com>
6634 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
6635 known size by default.
6637 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
6640 * lra-constraints.c (process_alt_operands): Don't match BLKmode
6641 and non BLKmode operands.
6643 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6646 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
6647 Clean up attributes.
6649 2018-03-23 Richard Biener <rguenther@suse.de>
6652 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
6653 we are going to emit early debug for LTO.
6655 2018-03-23 Jakub Jelinek <jakub@redhat.com>
6658 * function.c (match_asm_constraints_1): Don't optimize if input
6659 doesn't satisfy general_operand predicate for output's mode.
6662 * alias.c (write_dependence_p): Don't require for x_canonicalized
6663 non-VOIDmode if x has VOIDmode.
6666 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
6667 just don't try to optimize it rather than assert it never happens.
6669 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
6671 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
6672 macro expansions for definition of ST_INTERNAL_<mode> and
6673 LD_INTERNAL_<mode> builtins.
6674 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
6676 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
6678 (altivec_expand_st_builtin): Likewise.
6679 (altivec_expand_builtin): Remove calls to deleted functions.
6680 (rs6000_address_for_altivec): Delete this function.
6681 * config/rs6000/vector.md: Remove expands for
6682 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
6684 2018-03-22 Sudakshina Das <sudi.das@arm.com>
6687 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
6688 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
6689 re-computing once computed.
6690 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
6691 (arm_init_machine_status): Initialize
6692 machine->static_chain_stack_bytes.
6694 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
6697 * doc/extend.texi: Add four new prototypes for vec_ld.
6698 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
6699 definitions for more logical presentation.
6700 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
6701 entries for V1TI variants of __builtin_altivec_ld builtin.
6702 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
6703 handling of V1TI variant of LVX icode pattern.
6704 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
6705 (rs6000_gimple_fold_builtin): Likewise.
6706 (altivec_init_builtins): Add code to define
6707 __builtin_altivec_lvx_v1ti function.
6709 2018-03-22 Jakub Jelinek <jakub@redhat.com>
6712 * function.c (match_asm_constraints_1): Don't do the optimization
6713 if input isn't a REG, SUBREG, MEM or constant.
6715 2018-03-22 Tom de Vries <tom@codesourcery.com>
6717 PR tree-optimization/84956
6718 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
6719 bb_has_abnormal_pred.
6721 2018-03-22 Jakub Jelinek <jakub@redhat.com>
6724 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
6725 DECL_INITIAL (decl) to decl at the end.
6726 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
6729 2018-03-21 Joseph Myers <joseph@codesourcery.com>
6731 * doc/extend.texi (__builtin_tgmath): Document when complex
6732 integer types are treated as _Complex _Float64.
6734 2018-03-21 Tom de Vries <tom@codesourcery.com>
6736 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
6738 2018-03-21 Jakub Jelinek <jakub@redhat.com>
6740 PR tree-optimization/84960
6741 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
6742 if it is ENTRY block, move them into single succ of ENTRY in that case.
6744 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
6746 PR tree-optimization/84811
6747 * poly-int.h (poly_span_traits): Remove the T3 parameter and
6748 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
6749 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
6750 (known_subrange_p): Update accordingly. Cast each value involved
6751 in the size comparison, rather than casting the result of the
6754 2018-03-21 Jakub Jelinek <jakub@redhat.com>
6756 PR tree-optimization/84982
6757 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
6758 by flipping the least significant bit rather than all bits from
6759 bitpos to bitpos + bitsize - 1.
6761 2018-03-21 Nathan Sidwell <nathan@acm.org>
6763 * doc/extend.texi (Deprecated Features): Remove mention of
6764 long-deleted deprecations.
6766 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6769 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
6770 * configure: Regenerate.
6772 2018-03-21 Tom de Vries <tom@codesourcery.com>
6774 PR tree-optimization/83126
6775 * tree-parloops.c (num_phis): New function.
6776 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
6778 2018-03-21 Nathan Sidwell <nathan@acm.org>
6780 * doc/extend.texi (Deprecated Features): Update deprecated flags,
6781 mention anon-struct/union members and trailing attributes.
6783 2018-03-21 Bin Cheng <bin.cheng@arm.com>
6785 PR tree-optimization/84969
6786 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
6787 builtin memset partitions if they set different rhs values.
6789 2018-03-21 Jakub Jelinek <jakub@redhat.com>
6791 PR rtl-optimization/84989
6792 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
6793 VEC_DUPLICATE with scalar result mode.
6795 2018-03-21 Martin Liska <mliska@suse.cz>
6798 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
6799 not intended return statement.
6801 2018-03-21 Martin Liska <mliska@suse.cz>
6804 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
6805 (chkp_find_bound_slots_1): Limit number of iterations.
6807 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
6810 * Minor grammar fixes for x86 options.
6812 2018-03-20 Jakub Jelinek <jakub@redhat.com>
6815 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
6816 holding REG_CFA_RESTORE notes, instead turn them into a USE.
6818 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
6821 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
6822 (altivec_lvx_<mode>_1op): Likewise.
6823 (altivec_stvx_<mode>_2op): Likewise.
6824 (altivec_stvx_<mode>_1op): Likewise.
6825 (altivec_lvx_<VM2:mode>): New define_expand.
6826 (altivec_stvx_<VM2:mode>): Likewise.
6827 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
6828 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
6829 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
6830 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
6831 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
6832 (rs6000_gen_lvx): Likewise.
6833 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
6834 (altivec_expand_stv_builtin): Likewise.
6835 (altivec_expand_builtin): Likewise.
6836 * config/rs6000/vector.md: Likewise.
6838 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6841 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
6844 2018-03-20 Richard Biener <rguenther@suse.de>
6847 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
6848 sign-conversions as zero, fall back to standard scalar_stmt
6851 2018-03-20 Martin Liska <mliska@suse.cz>
6854 * predict.c (rebuild_frequencies): Handle case when we have
6855 PROFILE_ABSENT, but flag_guess_branch_prob is false.
6857 2018-03-20 Jakub Jelinek <jakub@redhat.com>
6860 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
6861 flag_section_anchors.
6862 * varasm.c (use_blocks_for_decl_p): Remove hack for
6863 dw2_force_const_mem.
6866 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
6868 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
6869 be created, use lowpart_subreg of operands[0] rather than operands[0]
6871 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
6872 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
6873 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
6874 and n constraint instead of aarch64_shift_imm_di and Usd.
6875 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
6876 (*aarch64_<optab>_reg_minus<mode>3): ... this.
6878 2018-03-20 Sudakshina Das <sudi.das@arm.com>
6881 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
6882 to favor GPR over NEON registers.
6883 (<shift>di3_neon): Likewise.
6885 2018-03-20 Tom de Vries <tom@codesourcery.com>
6888 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
6889 (nvptx_process_pars): Emit bar.sync asap and alap.
6891 2018-03-20 Tom de Vries <tom@codesourcery.com>
6894 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
6895 seen_label if seen_label is already set.
6897 2018-03-20 Jakub Jelinek <jakub@redhat.com>
6900 * config/i386/i386.c (fold_builtin_cpu): For features above 31
6901 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
6902 Use 1U instead of 1. Formatting fixes.
6905 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
6906 instead of TREE_TYPE (s1) for the return value.
6908 2018-03-19 Jakub Jelinek <jakub@redhat.com>
6910 PR tree-optimization/84946
6911 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
6912 bitsize + bitsize in poly_uint64 rather than poly_int64.
6915 * dwarf2asm.c: Include fold-const.c.
6916 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
6917 of decl rather than decl itself.
6919 PR rtl-optimization/84643
6920 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
6922 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
6925 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
6926 calling assemble_variable.
6928 2018-03-19 Sudakshina Das <sudi.das@arm.com>
6931 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
6932 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
6934 2018-03-19 Jim Wilson <jimw@sifive.com>
6937 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
6938 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
6939 (riscv_first_stack_step): Likewise.
6940 (riscv_option_override): Use STACK_BOUNDARY instead of
6942 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
6944 (BIGGEST_ALIGNMENT): Set to 128.
6945 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
6946 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
6949 2018-03-19 Richard Biener <rguenther@suse.de>
6951 PR tree-optimization/84933
6952 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
6953 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
6955 2018-03-19 Richard Biener <rguenther@suse.de>
6957 PR tree-optimization/84859
6958 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
6959 (cond_if_else_store_replacement): Perform sinking operation on
6960 single-store BBs regardless of MAX_STORES_TO_SINK setting.
6961 Generalize what a BB with a single eligible store is.
6963 2018-03-19 Richard Biener <rguenther@suse.de>
6965 PR tree-optimization/84929
6966 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
6967 chrec_is_positive against non-chrec arg.
6969 2018-03-19 Tamar Christina <tamar.christina@arm.com>
6972 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
6974 2018-03-18 Martin Liska <mliska@suse.cz>
6976 PR rtl-optimization/84635
6977 * regrename.c (build_def_use): Use matches_mode only when
6980 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
6982 PR tree-optimization/84913
6983 * tree-vect-loop.c (vectorizable_reduction): Don't try to
6984 vectorize chains of COND_EXPRs.
6986 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
6988 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
6990 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
6992 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
6994 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
6996 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
6998 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
6999 Kito Cheng <kito.cheng@gmail.com>
7001 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
7002 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
7003 (nds32_adjust_reg_alloc_order): New function.
7004 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
7006 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
7008 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
7009 nds32_print_operand, nds32_print_operand_address): Use
7010 HOST_WIDE_INT_PRINT_DEC instead.
7012 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
7014 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
7016 2018-03-17 Jakub Jelinek <jakub@redhat.com>
7019 * config/i386/i386.c (initial_ix86_tune_features,
7020 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
7022 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
7023 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
7024 rather than 1u << ix86_tune. Formatting fix.
7025 (ix86_option_override_internal): Change ix86_arch_mask from
7026 unsigned int to unsigned HOST_WIDE_INT, initialize to
7027 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
7028 (ix86_function_specific_restore): Likewise.
7030 2018-03-16 Jakub Jelinek <jakub@redhat.com>
7033 * postreload.c (reload_combine_recognize_pattern): Perform
7034 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
7035 truncate_int_for_mode the result for the destination's mode.
7038 * hsa-gen.c (mem_type_for_type): Fix comment typo.
7039 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
7041 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
7044 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
7047 * lra-assigns.c (lra_split_hard_reg_for): Don't use
7048 regno_allocno_class_array and sorted_pseudos.
7049 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
7050 insns where regno is used.
7052 2018-03-16 Martin Liska <mliska@suse.cz>
7055 * multiple_target.c (create_dispatcher_calls): Redirect
7056 reference in the symbol table.
7058 2018-03-16 Martin Liska <mliska@suse.cz>
7061 * multiple_target.c (create_dispatcher_calls): Redirect also
7064 2018-03-16 Jakub Jelinek <jakub@redhat.com>
7068 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
7069 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
7070 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
7072 2018-03-16 Julia Koval <julia.koval@intel.com>
7074 * doc/invoke.texi (Skylake Server): Add CLWB.
7075 Cannonlake): Remove CLWB.
7077 2018-03-16 Jakub Jelinek <jakub@redhat.com>
7079 PR tree-optimization/84841
7080 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
7082 (FLOAT_ONE_CONST_TYPE): Define.
7083 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
7084 (sort_by_operand_rank): Put entries with higher constant_type last
7085 rather than first to match comments.
7087 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
7089 * config/nios2/nios2.md (movsi_internal): Fix thinko in
7092 2018-03-15 Jakub Jelinek <jakub@redhat.com>
7095 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
7096 check and use address of target always.
7098 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
7101 * config/i386/i386.c (indirect_thunk_needed): Update comments.
7102 (indirect_thunk_bnd_needed): Likewise.
7103 (indirect_thunks_used): Likewise.
7104 (indirect_thunks_bnd_used): Likewise.
7105 (indirect_return_needed): New.
7106 (indirect_return_bnd_needed): Likewise.
7107 (output_indirect_thunk_function): Add a bool argument for
7109 (output_indirect_thunk_function): Don't generate alias for
7110 function return thunk.
7111 (ix86_code_end): Call output_indirect_thunk_function to generate
7112 function return thunks.
7113 (ix86_output_function_return): Set indirect_return_bnd_needed
7114 and indirect_return_needed instead of indirect_thunk_bnd_needed
7115 and indirect_thunk_needed.
7117 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
7119 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
7120 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
7121 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
7123 2018-03-15 David Malcolm <dmalcolm@redhat.com>
7124 Paul Hua <paul.hua.gm@gmail.com>
7127 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
7129 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
7131 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
7132 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
7135 2018-03-15 Tamar Christina <tamar.christina@arm.com>
7138 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
7139 instead of GET_MODE_SIZE when comparing Units.
7141 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
7144 * varasm.c (hash_section): Return an unchangeble hash value
7145 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
7146 Return !aarch64_can_use_per_function_literal_pools_p ().
7148 2018-03-15 Jakub Jelinek <jakub@redhat.com>
7151 * optabs.c (emit_conditional_move): Pass address of cmode's copy
7152 rather than address of cmode as last argument to prepare_cmp_insn.
7154 2018-03-15 Julia Koval <julia.koval@intel.com>
7156 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
7157 F_AVX512VNNI, F_AVX512BITALG): New.
7159 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
7162 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
7163 insn for floating-point loads and stores.
7165 2018-03-14 Carl Love <cel@us.ibm.com>
7167 * config/rs6000/rs6000-c.c: Add macro definitions for
7168 ALTIVEC_BUILTIN_VEC_PERMXOR.
7169 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
7170 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
7171 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
7172 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
7174 * config/doc/extend.texi: Add prototypes for vec_permxor.
7176 2018-03-14 David Malcolm <dmalcolm@redhat.com>
7179 * diagnostic-show-locus.c (class layout_point): Convert m_line
7180 from int to linenum_type.
7181 (line_span::comparator): Use linenum "compare" function when
7182 comparing line numbers.
7183 (test_line_span): New function.
7184 (layout_range::contains_point): Convert param "row" from int to
7186 (layout_range::intersects_line_p): Likewise.
7187 (layout::will_show_line_p): Likewise.
7188 (layout::print_source_line): Likewise.
7189 (layout::should_print_annotation_line_p): Likewise.
7190 (layout::print_annotation_line): Likewise.
7191 (layout::print_leading_fixits): Likewise.
7192 (layout::annotation_line_showed_range_p): Likewise.
7193 (struct line_corrections): Likewise for field m_row.
7194 (line_corrections::line_corrections): Likewise for param "row".
7195 (layout::print_trailing_fixits): Likewise.
7196 (layout::get_state_at_point): Likewise.
7197 (layout::get_x_bound_for_row): Likewise.
7198 (layout::print_line): Likewise.
7199 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
7200 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
7201 * input.c (selftest::test_linenum_comparisons): New function.
7202 (selftest::input_c_tests): Call it.
7203 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
7204 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
7205 * selftest.h (ASSERT_GT): New macro.
7206 (ASSERT_GT_AT): New macro.
7207 (ASSERT_LT): New macro.
7208 (ASSERT_LT_AT): New macro.
7210 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
7212 PR rtl-optimization/84780
7213 * combine.c (distribute_links): Don't make a link based on pc_rtx.
7215 2018-03-14 Martin Liska <mliska@suse.cz>
7217 * tree.c (record_node_allocation_statistics): Use
7218 get_stats_node_kind.
7219 (get_stats_node_kind): New function extracted from
7220 record_node_allocation_statistics.
7221 (free_node): Use get_stats_node_kind.
7223 2018-03-14 Richard Biener <rguenther@suse.de>
7225 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
7226 that the value-set of ANTIC_IN doesn't grow.
7229 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
7231 (BB_VISITED_WITH_VISITED_SUCCS): New define.
7232 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
7234 2018-03-14 Julia Koval <julia.koval@intel.com>
7236 * config.gcc (icelake-client, icelake-server): New.
7238 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
7239 (initial_ix86_arch_features): Ditto.
7240 (PTA_SKYLAKE): Add SGX.
7241 (PTA_ICELAKE): Remove.
7242 (PTA_ICELAKE_CLIENT): New.
7243 (PTA_ICELAKE_SERVER): New.
7244 (ix86_option_override_internal): Split up icelake on icelake client and
7246 (get_builtin_code_for_version): Ditto.
7247 (fold_builtin_cpu): Ditto.
7248 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
7249 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
7250 * config/i386/i386.h (processor_type): Ditto.
7251 * doc/invoke.texi: Ditto.
7253 2018-03-14 Jakub Jelinek <jakub@redhat.com>
7256 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
7257 INTEGER_CST offset, add it together with bitpos / 8 and
7258 sign extend based on POINTER_SIZE.
7262 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
7265 * config/i386/constraints.md (Yc): New register constraint.
7266 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
7267 Use Yc constraint for alternative 2 of operand 0. Remove
7268 preferred_for_speed attribute.
7270 2018-03-14 Richard Biener <rguenther@suse.de>
7272 PR tree-optimization/84830
7273 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
7274 with the old one to avoid oscillations.
7276 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
7279 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
7281 (assign_by_spills): Return a flag of reload assignment failure.
7282 Do not process the reload assignment failures. Do not spill other
7283 reload pseudos if they has the same reg class. Update n if
7285 (lra_assign): Add a return arg. Set up from the result of
7286 assign_by_spills call.
7287 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
7288 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
7289 usage_insns if it is not NULL.
7290 (spill_hard_reg_in_range): New function.
7291 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
7292 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
7293 function prototypes.
7294 (lra_assign): Change prototype.
7295 * lra.c (lra): Add code to deal with fails by splitting hard reg
7298 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
7300 * config/riscv/riscv.opt (mrelax): New option.
7301 * config/riscv/riscv.c (riscv_file_start): Emit ".option
7302 "norelax" when riscv_mrelax is disabled.
7303 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
7305 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
7308 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
7309 reassociation for int modes.
7311 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
7313 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
7314 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
7316 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
7317 * config/aarch64/aarch64-sve.md
7318 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
7319 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
7320 (*extend<mode><Vwide>2): Rename to...
7321 (aarch64_sve_extend<mode><Vwide>2): ...this.
7322 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
7323 renaming the old pattern to...
7324 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
7326 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
7327 define_expand, renaming the old pattern to...
7328 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
7329 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
7330 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
7331 account when deciding which SVE instruction the optab should use.
7332 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
7334 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
7336 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
7337 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
7338 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
7339 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
7340 (tlsdesc_small_<mode>): Turn a define_expand and use
7341 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
7342 (tlsdesc_small_advsimd_<mode>): ...this.
7343 (tlsdesc_small_sve_<mode>): New pattern.
7345 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
7347 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
7348 (UNSPEC_UMUL_HIGHPART): New constants.
7349 (MUL_HIGHPART): New int iteraor.
7350 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
7351 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
7353 (*<su>mul<mode>3_highpart): New define_insn.
7355 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
7358 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
7361 2018-03-13 Martin Liska <mliska@suse.cz>
7364 * (sem_item_optimizer::sem_item_optimizer): Initialize new
7366 (sem_item_optimizer::~sem_item_optimizer): Release it.
7367 (sem_item_optimizer::merge_classes): Register variable aliases.
7368 (sem_item_optimizer::fixup_pt_set): New function.
7369 (sem_item_optimizer::fixup_points_to_sets): Likewise.
7370 * ipa-icf.h: Declare new variables and functions.
7372 2018-03-13 Jakub Jelinek <jakub@redhat.com>
7375 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
7376 integer_pow2p@2 and test integer_pow2p in condition.
7377 (A < 0 ? C : 0): Similarly for @1.
7380 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
7381 characters starting at p contain '\0' character, don't look beyond
7385 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
7386 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
7389 * reg-stack.c (change_stack): Change update_end var from int to
7390 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
7391 also call set_block_for_insn on the newly added insns and rescan.
7394 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
7395 on the last operand.
7398 * tree.c (stabilize_reference_1): Return save_expr (e) for
7399 STATEMENT_LIST even if it doesn't have side-effects.
7401 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
7403 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
7405 2018-03-12 Renlin Li <renlin.li@arm.com>
7407 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
7408 aarch64_output_scalar_simd_mov_immediate.
7410 2018-03-12 Martin Sebor <msebor@redhat.com>
7412 PR tree-optimization/83456
7413 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
7414 for perfectly overlapping calls to memcpy.
7415 (gimple_fold_builtin_memory_chk): Same.
7416 (gimple_fold_builtin_strcpy): Handle no-warning.
7417 (gimple_fold_builtin_stxcpy_chk): Same.
7418 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
7420 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
7422 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
7423 parameter. Use it for SFmode.
7424 (rs6000_function_arg_advance_1): Adjust.
7425 (rs6000_function_arg): Adjust.
7426 (rs6000_gimplify_va_arg): Pass false for that new parameter.
7428 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
7430 PR rtl-optimization/84169
7431 PR rtl-optimization/84780
7432 * combine.c (can_combine_p): Check for a 2-insn combination whether
7433 the destination register is used between the two insns, too.
7435 2018-03-12 Richard Biener <rguenther@suse.de>
7437 PR tree-optimization/84803
7438 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
7439 for refs DR analysis didn't process.
7441 2018-03-12 Richard Biener <rguenther@suse.de>
7443 PR tree-optimization/84777
7444 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
7445 force-vectorize loops ignore whether we are optimizing for size.
7447 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
7449 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
7450 (TARGET_MD_ASM_ADJUST): Define.
7452 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
7453 Kito Cheng <kito.cheng@gmail.com>
7454 Chung-Ju Wu <jasonwucj@gmail.com>
7456 * config/nds32/nds32.c (nds32_compute_stack_frame,
7457 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
7458 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
7459 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
7460 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
7461 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
7462 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
7463 * config/nds32/nds32.md (prologue, epilogue): Use macro
7464 NDS32_V3PUSH_AVAILABLE_P to do checking.
7466 2018-03-11 Jakub Jelinek <jakub@redhat.com>
7469 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
7470 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
7471 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
7472 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
7473 addition of most attributes on !orig_type_die or the attribute not
7474 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
7476 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
7477 Chung-Ju Wu <jasonwucj@gmail.com>
7479 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
7481 * config/nds32/nds32.opt (mvh): New option.
7483 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
7484 Chung-Ju Wu <jasonwucj@gmail.com>
7486 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
7488 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
7489 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
7492 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
7493 Chung-Ju Wu <jasonwucj@gmail.com>
7495 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
7497 * config/nds32/nds32-multiple.md (strlensi): New pattern.
7498 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
7500 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
7501 Kito Cheng <kito.cheng@gmail.com>
7502 Chung-Ju Wu <jasonwucj@gmail.com>
7504 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
7505 UNSPEC_FFMISM and UNSPEC_FLMISM.
7506 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
7507 for ffb, ffmism and flmism.
7508 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
7509 (unspec_ffmism): Ditto.
7510 (unspec_flmism): Ditto.
7511 (nds32_expand_builtin_impl): Check if string extension is available.
7512 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
7513 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
7515 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
7518 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
7521 * lra-assigns.c (assign_by_spills): Return a flag of reload
7522 assignment failure. Do not process the reload assignment
7523 failures. Do not spill other reload pseudos if they has the same
7525 (lra_assign): Add a return arg. Set up from the result of
7526 assign_by_spills call.
7527 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
7528 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
7529 usage_insns if it is not NULL.
7530 (spill_hard_reg_in_range): New function.
7531 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
7532 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
7533 function prototypes.
7534 (lra_assign): Change prototype.
7535 * lra.c (lra): Add code to deal with fails by splitting hard reg
7538 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
7541 * config/i386/i386.opt: Replace Enforcment with Enforcement.
7543 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
7546 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
7547 (dw_val_node): Add val_symbolic_view.
7548 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
7549 (symview_upper_bound): New.
7550 (new_line_info_table): Initialize symviews_since_reset.
7551 (dwarf2out_source_line): Count symviews_since_reset and set
7552 symview_upper_bound.
7553 (dw_val_equal_p): Handle symview.
7554 (add_AT_symview): New.
7555 (print_dw_val): Handle symview.
7556 (attr_checksum, attr_checksum_ordered): Likewise.
7557 (same_dw_val_p, size_of_die): Likewise.
7558 (value_format, output_die): Likewise.
7559 (add_high_low_attributes): Use add_AT_symview for entry_view.
7560 (dwarf2out_finish): Reset symview_upper_bound, clear
7563 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
7566 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
7567 Add strict argument and use it.
7568 (rs6000_split_multireg_move): Update for new strict argument.
7569 (mem_operand_gpr): Disallow all non-offsettable addresses.
7570 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
7572 2018-03-09 Jakub Jelinek <jakub@redhat.com>
7575 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
7576 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
7577 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
7580 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
7581 decl, use remap_type if we want to use the type.
7583 2018-03-09 Martin Sebor <msebor@redhat.com>
7585 PR tree-optimization/84526
7586 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
7588 (builtin_access::generic_overlap): Be prepared to handle non-array
7591 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
7593 PR rtl-optimization/84682
7594 * lra-constraints.c (process_address_1): Check is_address flag
7595 for address constraints.
7596 (process_alt_operands): Likewise.
7597 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
7598 preprocess_constraints.
7599 * recog.h (preprocess_constraints): Add oploc parameter.
7601 * recog.c (preprocess_constraints): Test address_operand for
7602 CT_ADDRESS constraints.
7604 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
7607 * lra-assigns.c (assign_by_spills): Return a flag of reload
7608 assignment failure. Do not process the reload assignment
7609 failures. Do not spill other reload pseudos if they has the same
7611 (lra_assign): Add a return arg. Set up from the result of
7612 assign_by_spills call.
7613 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
7614 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
7615 usage_insns if it is not NULL.
7616 (spill_hard_reg_in_range): New function.
7617 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
7618 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
7619 function prototypes.
7620 (lra_assign): Change prototype.
7621 * lra.c (lra): Add code to deal with fails by splitting hard reg
7624 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7627 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
7628 Accept complain bool parameter. Only emit errors if it is true.
7629 (arm_parse_cpu_option_name): Likewise.
7630 (arm_target_thumb_only): Adjust callers of the above.
7631 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
7632 prototype to take a default true bool parameter.
7633 (arm_parse_arch_option_name): Likewise.
7635 2018-03-09 David Malcolm <dmalcolm@redhat.com>
7636 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
7640 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
7641 * configure: Regenerate.
7642 * configure.ac ("linker --version-script option"): New.
7643 ("linker soname option"): New.
7645 2018-03-09 Richard Biener <rguenther@suse.de>
7647 PR tree-optimization/84775
7648 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
7649 immediate uses of predicate stmts and mark them modified.
7652 PR tree-optimization/84178
7653 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
7655 (version_loop_for_if_conversion): Delay update_ssa call.
7656 (tree_if_conversion): Delay update_ssa until after predicate
7659 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
7662 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
7663 when the function accesses prior frames.
7665 2018-03-08 Jakub Jelinek <jakub@redhat.com>
7668 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
7669 gen_llsym, otherwise call maybe_gen_llsym.
7672 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
7673 has ',' character inside of it.
7675 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7678 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
7679 as clobbering CC_REGNUM.
7681 2018-03-08 Richard Biener <rguenther@suse.de>
7684 * tree-scalar-evolution.c: Include tree-into-ssa.h.
7685 (follow_copies_to_constant): Do not follow SSA names registered
7688 2018-03-08 Richard Biener <rguenther@suse.de>
7690 PR tree-optimization/84178
7691 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
7693 (version_loop_for_if_conversion): Delay update_ssa call.
7694 (tree_if_conversion): Delay update_ssa until after predicate
7697 2018-03-08 David Malcolm <dmalcolm@redhat.com>
7699 PR tree-optimization/84178
7700 * tree-if-conv.c (release_bb_predicate): Remove the
7701 the assertion that the stmts have NULL use_ops.
7702 Discard the statements, asserting that they haven't
7703 yet been added to a BB.
7705 2018-03-08 Richard Biener <rguenther@suse.de>
7707 PR tree-optimization/84746
7708 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
7709 (phi_translate): Pass in destination ANTIC_OUT set.
7710 (phi_translate_1): Likewise. For a simplified result lookup
7711 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
7712 (phi_translate_set): Adjust.
7713 (do_pre_regular_insertion): Likewise.
7714 (do_pre_partial_partial_insertion): Likewise.
7716 2018-03-08 Martin Liska <mliska@suse.cz>
7718 PR gcov-profile/84735
7719 * doc/gcov.texi: Document usage of profile files.
7720 * gcov-io.h: Document changes in the format.
7722 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
7726 * dwarf2out.c (struct dw_line_info_table): Update comments for
7728 (FORCE_RESET_NEXT_VIEW): New.
7729 (FORCE_RESETTING_VIEW_P): New.
7730 (RESETTING_VIEW_P): Check for -1 too.
7731 (ZERO_VIEW_P): Likewise.
7732 (new_line_info_table): Force-reset next view.
7733 (dwarf2out_begin_function): Likewise.
7734 (dwarf2out_source_line): Simplify zero_view_p initialization.
7735 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
7736 view directly. Omit view when omitting .loc at line 0.
7738 2018-03-08 Jakub Jelinek <jakub@redhat.com>
7740 PR tree-optimization/84740
7741 * tree-switch-conversion.c (process_switch): Call build_constructors
7742 only if info.phi_count is non-zero.
7744 PR tree-optimization/84739
7745 * tree-tailcall.c (find_tail_calls): Check call arguments against
7746 DECL_ARGUMENTS (current_function_decl) rather than
7747 DECL_ARGUMENTS (func) when checking for tail recursion.
7749 2018-03-07 Jakub Jelinek <jakub@redhat.com>
7751 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
7752 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
7753 Volker Reichelt's entry and add entries for people that perform
7754 GCC fuzzy testing and report numerous bugs.
7756 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
7759 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
7760 readonly data in sdata, if that is disabled.
7761 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
7762 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
7763 -mreadonly-in-sdata option.
7765 2018-03-07 Martin Sebor <msebor@redhat.com>
7767 PR tree-optimization/84468
7768 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
7769 basic block when looking for nul assignment.
7771 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
7774 * except.h (output_function_exception_table): Adjust prototype.
7775 * except.c (output_function_exception_table): Remove FNNAME parameter
7776 and add SECTION parameter. Ouput one part of the table at a time.
7777 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
7778 the first part of the exception table and emit unwind directives.
7779 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
7780 (i386_pe_seh_cold_init): Likewise.
7781 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
7782 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
7783 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
7784 (ix86_output_call_insn): Emit a nop in one more case for SEH.
7785 * config/i386/winnt.c: Include except.h.
7786 (struct seh_frame_state): Add reg_offset, after_prologue and
7787 in_cold_section fields.
7788 (i386_pe_seh_end_prologue): Set seh->after_prologue.
7789 (i386_pe_seh_cold_init): New function.
7790 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
7791 to seh->in_cold_section.
7792 (seh_emit_push): Record the offset of the push.
7793 (seh_emit_save): Record the offet of the save.
7794 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
7795 Test seh->after_prologue to disregard the epilogue.
7796 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
7797 (i386_pe_end_cold_function): New function.
7799 2018-03-07 Jakub Jelinek <jakub@redhat.com>
7802 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
7803 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
7806 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
7808 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
7809 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
7812 * multiple_target.c: Include tree-inline.h and intl.h.
7813 (expand_target_clones): Diagnose and fail if node->definition and
7814 !tree_versionable_function_p (node->decl).
7816 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
7818 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
7820 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
7821 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
7822 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
7824 2018-03-06 Jakub Jelinek <jakub@redhat.com>
7827 * combine.c (try_combine): Use reg_or_subregno instead of handling
7828 just paradoxical SUBREGs and REGs.
7830 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
7832 * config/arc/arc.c (arc_finalize_pic): Remove function.
7833 (arc_must_save_register): We use single base PIC register, remove
7834 checks to save/restore the PIC register.
7835 (arc_expand_prologue): Likewise.
7836 * config/arc/arc-protos.h (arc_set_default_type_attributes):
7838 (arc_verify_short): Likewise.
7839 (arc_attr_type): Likewise.
7840 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
7841 (walk_stores): Likewise.
7842 (arc_address_cost): Make it static.
7843 (arc_verify_short): Likewise.
7844 (branch_dest): Likewise.
7845 (arc_attr_type): Likewise.
7846 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
7847 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
7848 (arc_final_prescan_insn): Remove inserting the nops due to
7849 hardware hazards. It is done in reorg step.
7850 (insn_length_variant_t): Remove.
7851 (insn_length_parameters_t): Likewise.
7852 (arc_insn_length_parameters): Likewise.
7853 (arc_get_insn_variants): Likewise.
7854 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
7856 2018-03-06 Jakub Jelinek <jakub@redhat.com>
7859 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
7862 PR tree-optimization/84687
7863 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
7865 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
7867 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
7869 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
7870 Rename to ppc_speculation_barrier.
7871 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
7872 __builtin_ppc_speculation_barrier.
7874 2018-03-05 Jakub Jelinek <jakub@redhat.com>
7877 * combine.c (combine_simplify_rtx): Don't try to simplify if
7878 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
7881 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
7883 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
7884 to 32 bytes when compiling for POWER9.
7886 2018-03-05 Jakub Jelinek <jakub@redhat.com>
7889 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
7890 regparm >= 3 with no arg reg available also for calls with
7891 flag_force_indirect_call. Pass decl to ix86_function_regparm.
7894 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
7896 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
7898 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
7901 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
7903 2018-03-05 Richard Biener <rguenther@suse.de>
7905 PR tree-optimization/84486
7906 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
7907 When inserting a __builtin_assume_aligned call set the LHS
7908 SSA name alignment info accordingly.
7910 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
7912 PR tree-optimization/84114
7913 * config/aarch64/aarch64.c (aarch64_reassociation_width)
7914 Avoid reassociation of FLOAT_MODE addition.
7916 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
7918 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
7919 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
7920 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
7921 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
7922 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
7923 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
7924 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
7926 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
7927 __builtin_ia32_wbinvd): New builtins.
7928 (SPECIAL_ARGS2): New.
7929 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
7930 (SPECIAL_ARGS2): New.
7931 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
7932 (ix86_valid_target_attribute_inner_p): Ditto.
7933 (ix86_init_mmx_sse_builtins): Add special_args2.
7934 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
7935 TARGET_WBNOINVD_P): New.
7936 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
7937 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
7938 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
7939 * config/i386/immintrin.h (_wbinvd): New intrinsic.
7940 * config/i386/pconfigintrin.h: New file.
7941 * config/i386/wbnoinvdintrin.h: Ditto.
7942 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
7944 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
7946 2018-03-05 Richard Biener <rguenther@suse.de>
7948 PR tree-optimization/84670
7949 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
7951 (BB_VISITED_WITH_VISITED_SUCCS): New define.
7952 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
7953 (compute_antic_aux): Only assert the number of values in ANTIC_IN
7954 doesn't grow if all successors (recursively) were visited at least
7957 2018-03-05 Richard Biener <rguenther@suse.de>
7959 PR tree-optimization/84650
7960 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
7961 if executed in the loop pipeline.
7963 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
7965 * doc/configfiles.texi (Configuration Files): Move info about
7966 conditionalizing $target-protos.h to...
7967 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
7968 differs from $target-protos.h.
7970 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
7971 Chung-Ju Wu <jasonwucj@gmail.com>
7973 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
7974 * config/nds32/nds32-multiple.md (setmemsi): Define.
7975 * config/nds32/nds32-memory-manipulation.c
7976 (nds32_gen_dup_4_byte_to_word_value): New.
7977 (emit_setmem_word_loop): New.
7978 (emit_setmem_byte_loop): New.
7979 (nds32_expand_setmem_loop): New.
7980 (nds32_expand_setmem_loop_v3m): New.
7981 (nds32_expand_setmem_unroll): New.
7982 (nds32_expand_setmem): New.
7984 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
7985 Chung-Ju Wu <jasonwucj@gmail.com>
7987 * config/nds32/nds32-memory-manipulation.c
7988 (nds32_emit_load_store): New.
7989 (nds32_emit_post_inc_load_store): New.
7990 (nds32_emit_mem_move): New.
7991 (nds32_emit_mem_move_block): New.
7992 (nds32_expand_movmemsi_loop_unknown_size): New.
7993 (nds32_expand_movmemsi_loop_known_size): New.
7994 (nds32_expand_movmemsi_loop): New.
7995 (nds32_expand_movmemsi_unroll): New.
7996 (nds32_expand_movmemqi): Rename ...
7997 (nds32_expand_movmemsi): ... to this.
7998 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
7999 (movmemsi): ... to this.
8000 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
8001 (nds32_expand_movmemsi): ... to this.
8003 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
8004 Monk Chiang <sh.chiang04@gmail.com>
8005 Chung-Ju Wu <jasonwucj@gmail.com>
8007 * config/nds32/nds32-protos.h
8008 (nds32_expand_load_multiple): New arguments.
8009 (nds32_expand_store_multiple): Ditto.
8010 (nds32_valid_multiple_load_store): Rename ...
8011 (nds32_valid_multiple_load_store_p): ... to this.
8012 * config/nds32/nds32-memory-manipulation.c
8013 (nds32_expand_load_multiple): Refine implementation.
8014 (nds32_expand_store_multiple): Ditto.
8015 * config/nds32/nds32-multiple.md
8016 (load_multiple): Update nds32_expand_load_multiple interface.
8017 (store_multiple): Update nds32_expand_store_multiple interface.
8018 * config/nds32/nds32-predicates.c
8019 (nds32_valid_multiple_load_store): Rename ...
8020 (nds32_valid_multiple_load_store_p): ... to this and refine
8022 * config/nds32/predicates.md
8023 (nds32_load_multiple_and_update_address_operation): New predicate.
8024 (nds32_store_multiple_and_update_address_operation): New predicate.
8026 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
8027 Chung-Ju Wu <jasonwucj@gmail.com>
8029 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
8030 (combo): New attribute.
8031 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
8033 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
8035 * config/nds32/nds32.opt: Change -mcmodel= default value.
8037 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
8038 Monk Chiang <sh.chiang04@gmail.com>
8039 Chung-Ju Wu <jasonwucj@gmail.com>
8041 * config/nds32/constants.md (unspec_element): New enum.
8042 * config/nds32/constraints.md (Umw): New constraint.
8043 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
8044 * config/nds32/nds32-intrinsic.md: Likewise.
8045 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
8046 (nds32_valid_smw_lwm_base_p): New.
8047 (nds32_output_smw_single_word): New.
8048 (nds32_output_lmw_single_word): New.
8049 (nds32_expand_unaligned_load): New.
8050 (nds32_expand_unaligned_store): New.
8051 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
8052 (nds32_output_smw_single_word): Declare.
8053 (nds32_output_lmw_single_word): Declare.
8054 (nds32_expand_unaligned_load): Declare.
8055 (nds32_expand_unaligned_store): Declare.
8056 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
8057 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
8058 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
8059 NDS32_BUILTIN_UASTORE_DW.
8060 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
8063 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
8064 Kito Cheng <kito.cheng@gmail.com>
8065 Chung-Ju Wu <jasonwucj@gmail.com>
8067 * config/nds32/nds32-intrinsic.c
8068 (nds32_expand_builtin_null_ftype_reg): Delete.
8069 (nds32_expand_builtin_reg_ftype_imm): Ditto.
8070 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
8071 (nds32_read_argument): New.
8072 (nds32_legitimize_target): Ditto.
8073 (nds32_legitimize_argument): Ditto.
8074 (nds32_check_constant_argument): Ditto.
8075 (nds32_expand_unop_builtin): Ditto.
8076 (nds32_expand_unopimm_builtin): Ditto.
8077 (nds32_expand_binop_builtin): Ditto.
8078 (nds32_builtin_decl_impl): Ditto.
8079 (builtin_description): Ditto.
8080 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
8081 (nds32_init_builtins_impl): Ditto.
8082 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
8083 (nds32_builtin_decl): New.
8084 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
8085 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
8087 2018-03-02 Jeff Law <law@redhat.com>
8089 * reorg.c (stop_search_p): Handle DEBUG_INSN.
8090 (redundant_insn, fill_simple_delay_slots): Likewise.
8091 (fill_slots_from_thread): Likewise.
8092 * resource.c (mark_referenced_resources): Likewise.
8093 (mark_set_resources, find_dead_or_set_registers): Likewise.
8095 2018-03-02 Jakub Jelinek <jakub@redhat.com>
8097 * substring-locations.h (format_warning_va): Formatting fix for
8099 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
8101 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
8102 * substring-locations.c: Include intl.h.
8103 (format_warning_va): Turned into small wrapper around
8104 format_warning_n_va, renamed to ...
8105 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
8106 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
8108 (format_warning_at_substring_n): New function.
8109 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
8110 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
8111 format_warning_at_substring with just a shorter name instead of
8112 const function pointer.
8113 (fmtwarn_n): New function.
8114 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
8115 appropriate, get rid of all the fmtstr temporaries, move conditionals
8116 with G_() wrapped string literals directly into fmtwarn arguments,
8117 cast dir.len to (int), formatting fixes.
8119 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
8121 * doc/invoke.texi: Remove "Cilk Plus" references.
8123 2018-03-02 Jakub Jelinek <jakub@redhat.com>
8124 Richard Biener <rguenther@suse.de>
8127 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
8128 for error or warning attributes if CALL_FROM_THUNK_P is set.
8131 2018-03-02 Jakub Jelinek <jakub@redhat.com>
8134 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
8135 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
8138 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
8139 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
8141 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
8142 instead of -1U in last predictors element's probability member.
8144 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
8147 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
8148 arguments if they are comparable.
8150 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
8152 PR tree-optimization/84634
8153 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
8154 masks and masked_loop_p with a single loop_masks, making sure it's
8155 null for bb vectorization.
8157 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
8159 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
8160 (vect_analyze_data_ref_access): Use loop->safe_len rather than
8161 loop->force_vectorize to check whether there is no alias.
8163 2018-03-02 Jakub Jelinek <jakub@redhat.com>
8166 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
8168 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
8170 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
8171 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
8172 instead of a loop around prev_real_insn.
8173 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
8177 * config/i386/i386.c (ix86_print_operand): Use conditional
8178 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
8181 2018-03-02 Richard Biener <rguenther@suse.de>
8183 PR tree-optimization/84427
8184 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
8185 (bitmap_set_subtract_values): Rewrite to handle multiple
8188 (prune_clobbered_mems): Likewise.
8189 (phi_translate): Take edge instead of pred/phiblock.
8190 (phi_translate_1): Likewise.
8191 (phi_translate_set): Likewise. Insert all translated
8192 exprs for a value into the set, keeping possibly multiple
8193 expressions per value.
8194 (compute_antic_aux): Adjust for phi_translate changes.
8195 When intersecting union the expressions and prune those
8196 not in the final value set, keeping possibly multiple
8197 expressions per value. Do not use value-insertion
8198 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
8199 all expressions. Add verification that the value-sets
8200 only shrink during iteration.
8201 (compute_partial_antic_aux): Adjust for the phi_translate changes.
8202 (do_pre_regular_insertion): Likewise.
8203 (do_pre_partial_partial_insertion): Likewise.
8205 2018-03-02 Richard Biener <rguenther@suse.de>
8208 * config/darwin.c (saved_debug_info_level): New static global.
8209 (darwin_asm_lto_start): Disable debug info generation for LTO out.
8210 (darwin_asm_lto_end): Restore debug info generation settings.
8212 2018-03-01 Martin Liska <mliska@suse.cz>
8215 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
8218 2018-03-01 Richard Biener <rguenther@suse.de>
8221 * dwarf2out.c (gen_variable_die): Properly handle late VLA
8222 type annotation with LTO when debug was disabled at compile-time.
8224 2018-03-01 Matthew Fortune <mfortune@gmail.com>
8226 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
8228 (mips_final_postscan_insn): Likewise.
8230 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
8232 PR rtl-optimization/84528
8233 * alias.c (init_alias_target): Add commentary.
8234 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
8235 a unique base value if the frame pointer is not eliminated
8236 to the stack pointer.
8238 2018-03-01 Tom de Vries <tom@codesourcery.com>
8240 PR rtl-optimization/83327
8241 * lra-int.h (hard_regs_spilled_into): Declare.
8242 * lra.c (hard_regs_spilled_into): Define.
8243 (init_reg_info): Init hard_regs_spilled_into.
8244 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
8245 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
8246 (process_bb_lives): Handle hard_regs_spilled_into.
8247 (lra_create_live_ranges_1): Before doing liveness propagation, clear
8248 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
8250 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
8252 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
8253 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
8254 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
8255 * config/rs6000/aix72.h: New file.
8257 2018-02-28 Jakub Jelinek <jakub@redhat.com>
8259 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
8260 instead of warning_at with conditional singular and plural messages
8264 * stor-layout.c (update_alignment_for_field): For
8265 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
8266 && !DECL_PACKED (field), do the alignment update, just use
8267 only desired_align instead of MAX (type_align, desired_align)
8269 (place_field): Don't do known_align < desired_align handling
8270 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
8271 is non-NULL, instead do it after rli->prev_field handling and
8272 only if not within a bitfield word. For DECL_PACKED (field)
8273 use type_align of BITS_PER_UNIT.
8275 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
8277 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
8278 superfluous parentheses and trailing spaces.
8280 2018-02-28 Richard Biener <rguenther@suse.de>
8282 PR tree-optimization/84584
8283 * graphite-scop-detection.c (scop_detection::add_scop): Discard
8284 SCoPs with fake exit edge.
8286 2018-02-28 Martin Liska <mliska@suse.cz>
8289 * timevar.c (timer::print): Fix format to properly print 100%
8292 2018-02-28 Richard Biener <rguenther@suse.de>
8295 * genmatch.c (capture_info::walk_match): Do not mark
8296 captured expressions without operands as expr_p given
8297 they act more like predicates and should be subject to
8298 "lost tail" side-effect preserving.
8300 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
8302 PR rtl-optimization/81611
8303 * auto-inc-dec.c (attempt_change): Move dead note from
8304 mem_insn if it's the next use of regno
8305 (find_address): Take address use of reg holding
8306 non-incremented value. Add parm to limit search to the named
8308 (merge_in_block): Attempt to use a mem insn that is the next
8309 use of the original regno.
8311 2018-02-27 Martin Sebor <msebor@redhat.com>
8314 * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
8315 * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
8317 2018-02-27 Martin Sebor <msebor@redhat.com>
8319 PR translation/84207
8320 * diagnostic-core.h (warning_n, error_n, inform_n): Change
8321 n argument to unsigned HOST_WIDE_INT.
8322 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
8323 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
8324 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
8325 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
8327 2018-02-27 Richard Biener <rguenther@suse.de>
8329 PR tree-optimization/84512
8330 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
8331 Do not use the estimate returned from record_stmt_cost for
8332 the scalar iteration cost but sum properly using add_stmt_cost.
8334 2018-02-27 Richard Biener <rguenther@suse.de>
8336 PR tree-optimization/84466
8337 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
8338 Adjust last change to less strictly validate use operands.
8340 2018-02-27 Martin Liska <mliska@suse.cz>
8342 PR gcov-profile/84548
8343 * gcov.c (process_file): Allow partial overlap and consider it
8344 also as group functions.
8345 (output_lines): Properly calculate range of lines for a group.
8347 2018-02-27 Martin Liska <mliska@suse.cz>
8349 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
8350 'ggc' suffixes. Change first column width.
8351 (timer::print): Fix formatting of the column.
8353 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
8355 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
8356 preserve inline entry blocks for the sake of debug inline
8357 entry point markers alone.
8358 (remove_unused_locals): Suggest in comments a better place to
8359 force the preservation of inline entry blocks that are
8360 otherwise unused, but do not preserve them.
8362 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
8364 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
8366 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
8369 * config/i386/constraints.md (Bs): Replace
8370 ix86_indirect_branch_register with
8371 TARGET_INDIRECT_BRANCH_REGISTER.
8373 * config/i386/i386.md (indirect_jump): Likewise.
8374 (tablejump): Likewise.
8375 (*sibcall_memory): Likewise.
8376 (*sibcall_value_memory): Likewise.
8377 Peepholes of indirect call and jump via memory: Likewise.
8378 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
8379 (*sibcall_value_GOT_32): Likewise.
8380 * config/i386/predicates.md (indirect_branch_operand): Likewise.
8381 (GOT_memory_operand): Likewise.
8382 (call_insn_operand): Likewise.
8383 (sibcall_insn_operand): Likewise.
8384 (GOT32_symbol_operand): Likewise.
8385 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
8387 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
8389 PR rtl-optimization/83496
8390 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
8391 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
8392 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
8393 redundant insn, if any.
8394 (relax_delay_slots): Likewise.
8395 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
8397 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
8399 PR tree-optimization/83965
8400 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
8401 that grouped statements are part of a reduction chain. Return
8402 true if the statement is not marked as a reduction itself but
8404 (vect_recog_dot_prod_pattern): Don't check whether the statement
8405 is part of a group here.
8406 (vect_recog_sad_pattern): Likewise.
8407 (vect_recog_widen_sum_pattern): Likewise.
8409 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
8412 * final.c (rest_of_clean_state): Also look for calls inside sequences.
8414 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
8417 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
8419 (ix86_output_indirect_function_return): New prototype.
8420 (ix86_split_simple_return_pop_internal): Likewise.
8421 * config/i386/i386.c (indirect_return_via_cx): New.
8422 (indirect_return_via_cx_bnd): Likewise.
8423 (indirect_thunk_name): Handle return va CX_REG.
8424 (output_indirect_thunk_function): Create alias for
8425 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
8426 (ix86_output_indirect_jmp): Remove the bool argument.
8427 (ix86_output_indirect_function_return): New function.
8428 (ix86_split_simple_return_pop_internal): Likewise.
8429 * config/i386/i386.md (*indirect_jump): Don't pass false
8430 to ix86_output_indirect_jmp.
8431 (*tablejump_1): Likewise.
8432 (simple_return_pop_internal): Change it to define_insn_and_split.
8433 Call ix86_split_simple_return_pop_internal to split it for
8435 (simple_return_indirect_internal): Call
8436 ix86_output_indirect_function_return instead of
8437 ix86_output_indirect_jmp.
8439 2018-02-26 Jakub Jelinek <jakub@redhat.com>
8442 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
8443 memset and value initialization afterwards.
8445 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
8447 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
8449 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8452 * common/config/aarch64/aarch64-common.c
8453 (aarch_option_optimization_table[]): Switch
8454 off fomit-frame-pointer
8456 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
8457 Chung-Ju Wu <jasonwucj@gmail.com>
8459 * config/nds32/nds32-multiple.md (load_multiple): Disallow
8461 (store_multiple): Ditto.
8463 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
8465 * config.gcc: Add --with-cpu support for nds32 target.
8466 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
8467 * config/nds32/nds32.opt: Add -mcpu= option.
8469 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
8471 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
8472 isel=yes): Warn for these deprecated options.
8474 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
8476 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
8477 ISA_2_5_MASKS_EMBEDDED.
8479 2018-02-23 Jakub Jelinek <jakub@redhat.com>
8481 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
8482 p->max as pointers rather than using iterative_hash_expr.
8484 2018-02-23 Carl Love <cel@us.ibm.com>
8486 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
8487 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
8489 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
8490 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
8491 P8V_BUILTIN_VEC_VUNSIGNED2.
8493 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
8496 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
8497 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
8499 * lra-constraints.c (curr_insn_transform): Set up
8500 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
8502 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
8503 * lra-eliminations.c (spill_pseudos): Ditto.
8504 (process_insn_for_elimination): Ditto.
8505 * lra-lives.c (reg_early_clobber_p): Use the new macros.
8506 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
8507 LRA_NON_CLOBBERED_ALT.
8509 2018-02-22 Martin Sebor <msebor@redhat.com>
8511 PR tree-optimization/84480
8512 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
8513 to maybe_diag_stxncpy_trunc. Call it.
8514 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
8515 from gimple_fold_builtin_strcpy. Print inlining stack.
8516 (handle_builtin_stxncpy): Print inlining stack.
8517 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
8519 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
8522 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
8523 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
8524 and -fcheck-pointer-bounds are used together.
8525 (indirect_thunk_prefix): New enum.
8526 (indirect_thunk_need_prefix): New function.
8527 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
8528 "_nt" instead of "_bnd" for NOTRACK prefix.
8529 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
8530 (output_indirect_thunk_function): Likewise.
8532 (ix86_code_end): Update output_indirect_thunk_function calls.
8533 (ix86_output_indirect_branch_via_reg): Replace
8534 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
8535 (ix86_output_indirect_branch_via_push): Likewise.
8536 (ix86_output_function_return): Likewise.
8537 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
8538 incompatible with -fcf-protection=branch and
8539 -fcheck-pointer-bounds.
8541 2018-02-22 Steve Ellcey <sellcey@cavium.com>
8544 * config/aarch64/aarch64.c (aarch64_print_address_internal):
8545 Change gcc_assert call to output_operand_lossage.
8547 2018-02-22 Steve Ellcey <sellcey@cavium.com>
8549 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
8551 2018-02-22 DJ Delorie <dj@redhat.com>
8552 Sebastian Perta <sebastian.perta@renesas.com>
8553 Oleg Endo <olegendo@gcc.gnu.org>
8555 * config/rx/rx.c (rx_rtx_costs): New function.
8556 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
8558 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
8560 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
8562 2018-02-22 Martin Liska <mliska@suse.cz>
8565 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
8566 Add "native" as a possible value.
8568 2018-02-22 Martin Liska <mliska@suse.cz>
8571 * config/i386/i386.c (ix86_option_override_internal):
8572 Add "native" as a possible value for -march and -mtune.
8574 2018-02-22 Jakub Jelinek <jakub@redhat.com>
8577 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
8578 to all type variants.
8580 PR tree-optimization/84503
8581 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
8582 width as info->bitpos + info->bitsize - start.
8583 (merged_store_group::merge_overlapping): Simplify width computation.
8584 (check_no_overlap): New function.
8585 (imm_store_chain_info::try_coalesce_bswap): Compute expected
8586 start + width and last_order of the group, fail if check_no_overlap
8588 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
8589 to group if check_no_overlap fails.
8591 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
8593 * config/rs6000/altivec.md: Delete contraint arguments to
8594 define_expand, define_split, and define_peephole2, and in
8595 define_insn_and_split if always unused.
8596 * config/rs6000/darwin.md: Ditto.
8597 * config/rs6000/dfp.md: Ditto.
8598 * config/rs6000/rs6000.md: Ditto.
8599 * config/rs6000/sync.md: Ditto.
8600 * config/rs6000/vector.md: Ditto.
8601 * config/rs6000/vsx.md: Ditto.
8603 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
8605 * config/rs6000/altivec.md: Write output control strings as braced
8606 blocks instead of double-quoted strings.
8607 * config/rs6000/darwin.md: Ditto.
8608 * config/rs6000/rs6000.md: Ditto.
8609 * config/rs6000/vector.md: Ditto.
8610 * config/rs6000/vsx.md: Ditto.
8612 2018-02-21 Jason Merrill <jason@redhat.com>
8614 PR c++/84314 - ICE with templates and fastcall attribute.
8615 * attribs.c (build_type_attribute_qual_variant): Remove assert.
8617 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
8619 * ipa-cp.c (determine_versionability): Fix comment typos.
8621 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
8624 * ipa-cp.c (determine_versionability): Do not version functions caling
8627 2018-02-21 Martin Liska <mliska@suse.cz>
8630 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
8631 Add "native" as a possible value.
8632 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
8633 the macro when native cpu detection is available.
8635 2018-02-21 Martin Liska <mliska@suse.cz>
8638 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
8639 Add "native" as a possible value.
8640 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
8641 when native cpu detection is available.
8643 2018-02-21 Jakub Jelinek <jakub@redhat.com>
8644 Martin Sebor <msebor@redhat.com>
8646 PR tree-optimization/84478
8647 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
8649 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
8650 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
8651 support which is conservatively correct, for 2 only stay conservative
8652 for maxlen. Formatting and comment capitalization fixes. Add STRICT
8653 argument to the 2 argument get_range_strlen, adjust 6 arg
8654 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
8656 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
8657 (gimple_fold_builtin_strlen): Pass true as last argument to
8660 2018-02-20 Martin Sebor <msebor@redhat.com>
8663 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
8664 (builtin_memref::set_base_and_offset): Same. Handle inner references.
8665 (builtin_memref::builtin_memref): Factor out parts into
8666 set_base_and_offset and call it.
8668 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
8671 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
8672 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
8673 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
8674 search at the associated MODE_INT.
8676 2018-02-20 Jeff Law <law@redhat.com>
8679 PR tree-optimization/81592
8681 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
8682 for range data rather than using global data.
8683 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
8684 range data rather than using global data.
8685 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
8686 pass it to children as needed.
8687 (struct directive::fmtresult): Similarly.
8688 (struct directive::set_width): Similarly.
8689 (struct directive::set_precision): Similarly.
8690 (format_integer, format_directive, parse_directive): Similarly.
8691 (format_none): Accept unnamed vr_values parameter.
8692 (format_percent, format_floating, format_character): Similarly.
8693 (format_string, format_plain): Similarly.
8694 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
8695 the EVRP range analyzer for range data rather than using global data.
8696 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
8697 gimple-ssa-evrp-analyze.h
8698 (class sprintf_dom_walker): Add after_dom_children member function.
8699 Add evrp_range_analyzer member.
8700 (sprintf_dom_walker::before_dom_children): Call into the EVRP
8701 range analyzer as needed.
8702 (sprintf_dom_walker::after_dom_children): New member function.
8703 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
8705 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
8706 (evrp_range_analyzer::pop_to_marker): Likewise.
8708 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
8710 PR tree-optimization/84419
8711 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
8712 with the required type if its current type is compatible but
8715 2018-02-20 Jakub Jelinek <jakub@redhat.com>
8718 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
8719 after vectorization.
8721 2018-02-20 Martin Liska <mliska@suse.cz>
8724 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
8725 possible values if we don't have a hint.
8727 2018-02-20 Martin Liska <mliska@suse.cz>
8731 * final.c (shorten_branches): Build align_tab array with one
8733 * opts.c (finish_options): Add alignment option limit check.
8734 (MAX_CODE_ALIGN): Likewise.
8735 (MAX_CODE_ALIGN_VALUE): Likewise.
8736 * doc/invoke.texi: Document maximum allowed option value for
8737 all -falign-* options.
8739 2018-02-19 Jakub Jelinek <jakub@redhat.com>
8742 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
8743 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
8744 * var-tracking.c (emit_note_insn_var_location): Remove all references
8745 to NOTE_INSN_CALL_ARG_LOCATION.
8746 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
8747 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
8748 Use copy_rtx_if_shared.
8749 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
8750 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
8751 (dwarf2out_var_location): Remove handling of
8752 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
8754 * final.c (final_scan_insn): Remove all references to
8755 NOTE_INSN_CALL_ARG_LOCATION.
8756 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
8757 before dumping final insns.
8758 * except.c (emit_note_eh_region_end): Remove all references to
8759 NOTE_INSN_CALL_ARG_LOCATION.
8760 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
8761 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
8762 * config/arc/arc.c (hwloop_optimize): Likewise.
8763 * config/arm/arm.c (create_fix_barrier): Likewise.
8764 * config/s390/s390.c (s390_chunkify_start): Likewise.
8765 * config/sh/sh.c (find_barrier): Likewise.
8766 * config/i386/i386.c (rest_of_insert_endbranch,
8767 ix86_seh_fixup_eh_fallthru): Likewise.
8768 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
8769 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
8770 * config/frv/frv.c (frv_function_prologue): Likewise.
8771 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
8773 (note_outside_basic_block_p): Remove all references to
8774 NOTE_INSN_CALL_ARG_LOCATION.
8775 * gengtype.c (adjust_field_rtx_def): Likewise.
8776 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
8778 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
8779 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
8782 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
8785 PR tree-optimization/84452
8786 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
8787 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
8790 2018-02-19 Martin Liska <mliska@suse.cz>
8793 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
8795 2018-02-19 Martin Liska <mliska@suse.cz>
8796 Richard Sandiford <richard.sandiford@linaro.org>
8798 PR tree-optimization/82491
8799 * gimple-fold.c (get_base_constructor): Make earlier bail out
8802 2018-02-19 Carl Love <cel@us.ibm.com>
8804 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
8805 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
8807 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
8808 P8V_BUILTIN_VEC_NEG.
8810 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
8812 * config/rl78/rl78.md (movdf): New define expand.
8814 2018-02-19 Martin Liska <mliska@suse.cz>
8817 * doc/invoke.texi: Fix typo.
8818 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
8820 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
8822 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
8823 handle rs6000_single_float and rs6000_double_float specially for
8826 2018-02-16 Jeff Law <law@redhat.com>
8828 * config/rx/rx.c (add_pop_cfi_notes): New function.;
8831 2018-02-16 Jakub Jelinek <jakub@redhat.com>
8834 * ipa-inline.c (inline_small_functions): Fix a typo.
8836 2018-02-16 Nathan Sidwell <nathan@acm.org>
8838 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
8840 2018-02-16 Carl Love <cel@us.ibm.com>
8842 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
8843 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
8844 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
8845 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
8846 expansion to P8V_BUILTIN_VEC_FLOAT2.
8848 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
8850 PR rtl-optimization/70023
8851 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
8852 src_regno into account.
8854 2018-02-16 Carl Love <cel@us.ibm.com>
8856 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
8857 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
8858 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
8859 * config/rs6000/rs6000.c: Remove case statements for
8860 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
8861 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
8862 and P9V_BUILTIN_VEC_VINSERT4B.
8863 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
8864 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
8865 * config/rs6000/vsx.md:
8866 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
8869 2018-02-16 Carl Love <cel@us.ibm.com>
8871 * config/rs6000/altivec.h: Add builtin names vec_extract4b
8873 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
8875 * config/rs6000/rs6000-c.c: Add the definitions for
8876 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
8877 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
8878 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
8879 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
8880 definition for insert4b and define insn *insert3b_internal.
8881 * doc/extend.texi: Add documentation for vec_extract4b.
8883 2018-02-16 Nathan Sidwell <nathan@acm.org>
8885 * doc/extend.texi (Backwards Compatibility): Mention friend
8886 injection. Note for-scope is deprecated.
8887 * doc/invoke.texi (-ffriend-injection): Deprecate.
8889 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
8891 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
8892 that moved to I2, also allow destinations that are a paradoxical
8893 subreg (instead of a normal reg).
8895 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
8898 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
8901 2018-02-16 Richard Biener <rguenther@suse.de>
8903 PR tree-optimization/84037
8904 PR tree-optimization/84016
8906 * config/i386/i386.c (ix86_builtin_vectorization_cost):
8907 Adjust vec_construct for the fact we need additional higher latency
8908 128bit inserts for AVX256 and AVX512 vector builds.
8909 (ix86_add_stmt_cost): Scale vector construction cost for
8912 2018-02-16 Richard Biener <rguenther@suse.de>
8914 PR tree-optimization/84417
8915 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
8916 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
8917 (non_rewritable_lvalue_p): Likewise, use poly-ints.
8919 2018-02-16 Martin Liska <mliska@suse.cz>
8922 * internal-fn.def (ASAN_CHECK): Set proper flags.
8923 (ASAN_MARK): Likewise.
8925 2018-02-16 Julia Koval <julia.koval@intel.com>
8927 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
8928 from PTA_CANNONLAKE.
8930 2018-02-16 Jakub Jelinek <jakub@redhat.com>
8933 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
8934 Use ++iter rather than iter++ for std::list iterators.
8935 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
8936 defer deleting them until all nodes in the forest are processed. Do
8937 free even leaf nodes. Change to_process into auto_vec.
8940 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
8941 * vec.h (vec_default_construct): Use memset instead of placement new
8942 if BROKEN_VALUE_INITIALIZATION is defined.
8943 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
8944 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
8947 PR rtl-optimization/83723
8948 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
8949 * lra.c (lra_substitute_pseudo): Likewise. If true, use
8950 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
8952 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
8954 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
8956 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
8958 PR rtl-optimization/81443
8959 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
8960 from inner REGs to paradoxical SUBREGs.
8962 2018-02-16 Richard Biener <rguenther@suse.de>
8964 PR tree-optimization/84399
8965 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
8966 For operands we can analyze at their definition make sure we can
8967 analyze them at each use as well.
8969 2018-02-16 Richard Biener <rguenther@suse.de>
8971 PR tree-optimization/84190
8972 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
8973 volatile accesses if the decl isn't volatile.
8975 2018-02-15 Jason Merrill <jason@redhat.com>
8977 PR c++/84314 - ICE with templates and fastcall attribute.
8978 * attribs.c (build_type_attribute_qual_variant): Don't clobber
8979 TYPE_CANONICAL on an existing type.
8981 2018-02-15 Jakub Jelinek <jakub@redhat.com>
8983 PR tree-optimization/84383
8984 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
8985 dstoff nor call operand_equal_p if dstbase is NULL.
8987 PR tree-optimization/84334
8988 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
8989 also a CONSTANT_CLASS_P, punt.
8991 2018-02-14 Jim Wilson <jimw@sifive.com>
8993 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
8994 first SMALL_OPERAND check. New local min_second_step. Move assert
8995 to where locals are set. Add TARGET_RVC support.
8996 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
8998 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
9000 * doc/invoke.texi: Correct -Wformat-overflow code sample.
9002 2018-02-14 Martin Sebor <msebor@redhat.com>
9004 PR tree-optimization/83698
9005 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
9006 arrays constrain the offset range to their bounds.
9007 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
9008 (builtin_access::overlap): Avoid setting the size of overlap if it's
9010 (maybe_diag_overlap): Also consider arrays when deciding what values
9011 of offsets to include in diagnostics.
9013 2018-02-14 Martin Sebor <msebor@redhat.com>
9016 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
9017 that correspond to the kind of a declaration.
9019 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
9022 * config/pa/pa.md: Load address of PIC label using the linkage table
9023 if the label is nonlocal.
9025 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
9027 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
9028 warning message if user requests -maltivec=be.
9029 * doc/invoke.texi: Document deprecation of -maltivec=be.
9031 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
9034 * config/rs6000/rs6000-c.c: Update definitions for
9035 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
9036 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
9038 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
9041 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
9042 add _get_ssp intrinsics. Remove argument from
9043 __builtin_ia32_rdssp[d|q].
9044 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
9045 * config/i386/i386-builtin.def: Remove argument from
9046 __builtin_ia32_rdssp[d|q].
9047 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
9048 ix86_expand_special_args_builtin for _rdssp[d|q].
9049 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
9050 Clear register before usage.
9051 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
9052 Add documentation for new _get_ssp and _inc_ssp intrinsics.
9054 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
9056 PR tree-optimization/84357
9057 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
9058 operand 1 of an ARRAY_REF too.
9060 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
9063 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
9064 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
9066 (set_of_reg): New struct.
9067 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
9068 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
9069 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
9071 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
9072 Split into bitclr, bitset, bitinvert patterns if appropriate.
9073 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
9074 use rx_fuse_in_memory_bitop.
9075 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
9076 to named insn, correct maximum insn length.
9078 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
9081 * machmode.def: Define a complex mode for PARTIAL_INT.
9082 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
9084 * doc/rtl.texi: Document CSPImode.
9085 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
9087 (msp430_hard_regno_nregs_with_padding): Likewise.
9089 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
9092 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
9094 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
9096 PR rtl-optimization/84169
9097 * combine.c (try_combine): New variable split_i2i3. Set it to true if
9098 we generated a parallel as new i3 and we split that to new i2 and i3
9099 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
9100 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
9101 those to i2, not i1. Partially rewrite this scan code.
9103 2018-02-13 Jakub Jelinek <jakub@redhat.com>
9106 * stor-layout.c (place_field): For variable length fields, adjust
9107 offset_align afterwards not just based on the field's alignment,
9108 but also on the size.
9111 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
9112 of exps and logs in the use_exp2 case.
9114 2018-02-13 Jeff Law <law@redhat.com>
9116 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
9119 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
9122 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
9126 * common.opt (gas-loc-support, gas-locview-support): New.
9127 (ginline-points, ginternal-reset-location-views): New.
9128 * doc/invoke.texi: Document them. Use @itemx where intended.
9129 (gvariable-location-views): Adjust.
9130 * target.def (reset_location_view): New.
9131 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
9132 (TARGET_RESET_LOCATION_VIEW): New.
9133 * doc/tm.texi: Rebuilt.
9134 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
9135 (dwarf2out_default_as_locview_support): New.
9136 (output_asm_line_debug_info): Use option variables.
9137 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
9138 (output_loc_list): Likewise.
9139 (add_high_low_attributes): Check option variables.
9140 Don't output entry view attribute in strict mode.
9141 (gen_inlined_subroutine_die): Check option variables.
9142 (dwarf2out_inline_entry): Likewise.
9143 (init_sections_and_labels): Likewise.
9144 (dwarf2out_early_finish): Likewise.
9145 (maybe_reset_location_view): New, from...
9146 (dwarf2out_var_location): ... here. Call it.
9147 * debug.h (dwarf2out_default_as_loc_support): Declare.
9148 (dwarf2out_default_as_locview_support): Declare.
9149 * hooks.c (hook_int_rtx_insn_0): New.
9150 * hooks.h (hook_int_rtx_insn_0): Declare.
9151 * toplev.c (process_options): Take -gas-loc-support and
9152 -gas-locview-support from dwarf2out. Enable
9153 -gvariable-location-views by default only with locview
9154 assembler support. Enable -ginternal-reset-location-views by
9155 default only if the target defines the corresponding hook.
9156 Enable -ginline-points by default if location views are
9157 enabled; force it disabled if statement frontiers are
9159 * tree-inline.c (expand_call_inline): Check option variables.
9160 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
9162 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
9164 PR tree-optimization/84321
9165 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
9166 handling. Also check whether the anti-range contains any values
9167 that satisfy the mask; switch to a VR_RANGE if not.
9169 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
9172 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
9174 2018-02-13 Martin Jambor <mjambor@suse.cz>
9177 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
9178 of call statements, also set location of a load to a temporary.
9180 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
9182 * config/rl78/rl78.c (add_vector_labels): New function.
9183 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
9184 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
9185 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
9186 which checks that no arguments are passed.
9187 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
9188 * doc/extend.texi: Documentation for the new attribute.
9190 2018-02-13 Andreas Schwab <schwab@suse.de>
9192 * config/riscv/linux.h (CPP_SPEC): Define.
9194 2018-02-13 Jakub Jelinek <jakub@redhat.com>
9197 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
9198 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
9199 OPTION_MASK_ISA_AES as first argument to def_builtin_const
9200 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
9201 instead of OPTION_MASK_ISA_PCLMUL as first argument to
9202 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
9203 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
9204 temporarily for AES and PCLMUL builtins.
9206 PR tree-optimization/84339
9207 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
9208 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
9212 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
9213 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
9214 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
9216 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
9218 * omp-simd-clone.h: New file.
9219 * omp-simd-clone.c: Include omp-simd-clone.h.
9220 (expand_simd_clones): No longer static.
9221 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
9222 cgraph.h and omp-simd-clone.h.
9223 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
9224 (vect_recog_widen_shift_pattern): Formatting fix.
9225 (vect_pattern_recog_1): Don't check optab for calls.
9228 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
9229 operands[2] into a REG before using gen_lowpart on it.
9231 2018-02-12 Jeff Law <law@redhat.com>
9234 * config/sh/sh.c (find_barrier): Consider a sibling call
9237 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
9238 successfully back substituting a reg.
9240 2018-02-12 Richard Biener <rguenther@suse.de>
9242 PR tree-optimization/84037
9243 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
9244 parameter, move visited init to caller.
9245 (vect_slp_analyze_operations): Separate cost from validity
9246 check, initialize visited once for all instances.
9247 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
9249 * tree-vect-stmts.c (vect_model_simple_cost): Make early
9251 (vect_model_promotion_demotion_cost): Likewise.
9252 (vectorizable_bswap): Guard cost modeling with !slp_node
9253 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
9255 (vectorizable_call): Likewise.
9256 (vectorizable_conversion): Likewise.
9257 (vectorizable_assignment): Likewise.
9258 (vectorizable_shift): Likewise.
9259 (vectorizable_operation): Likewise.
9260 (vectorizable_store): Likewise.
9261 (vectorizable_load): Likewise.
9262 (vectorizable_condition): Likewise.
9263 (vectorizable_comparison): Likewise.
9265 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
9268 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
9269 (ASAN_MARK): Fix fnspec to account for return value, change pointer
9270 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
9272 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
9275 * params.def (inline-min-speedup): Increase from 8 to 15.
9276 (max-inline-insns-auto): Decrease from 40 to 30.
9277 * ipa-split.c (consider_split): Add some buffer for function to
9278 be considered inlining candidate.
9279 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
9282 2018-02-12 Richard Biener <rguenther@suse.de>
9284 PR tree-optimization/84037
9285 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
9286 matched stmts if we cannot swap the non-matched ones.
9288 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
9290 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
9291 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
9292 _mm_maskz_scalef_round_ss): New intrinsics.
9293 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
9294 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
9295 __builtin_ia32_scalefss_round): Remove.
9296 (__builtin_ia32_scalefsd_mask_round,
9297 __builtin_ia32_scalefss_mask_round): New intrinsics.
9298 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
9299 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
9300 ((match_operand:VF_128 2 "<round_nimm_predicate>"
9301 "<round_constraint>")): Changed to ...
9302 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
9303 "<round_scalar_constraint>")): ... this.
9304 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
9305 %0, %1, %2<round_op3>}"): Changed to ...
9306 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
9307 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
9308 %2<round_scalar_mask_op3>}"): ... this.
9309 * config/i386/subst.md (round_scalar_nimm_predicate): New.
9311 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
9313 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
9314 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
9315 (_mm_maskz_sqrt_round_ss): New intrinsics.
9316 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
9317 (__builtin_ia32_sqrtsd_mask_round)
9318 (__builtin_ia32_sqrtss_mask_round): New builtins.
9319 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
9320 (__builtin_ia32_sqrtss_round): Remove.
9321 (__builtin_ia32_sqrtsd_mask_round)
9322 (__builtin_ia32_sqrtss_mask_round): New builtins.
9323 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
9324 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
9325 ((match_operand:VF_128 1 "vector_operand"
9326 "xBm,<round_constraint>")): Changed to ...
9327 ((match_operand:VF_128 1 "vector_operand"
9328 "xBm,<round_scalar_constraint>")): ... this.
9329 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
9330 %0, %2, %<iptr>1<round_op3>}): Changed to ...
9331 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
9332 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
9333 %<iptr>1<round_scalar_mask_op3>}): ... this.
9334 ((set_attr "prefix" "<round_prefix>")): Changed to ...
9335 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
9337 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
9340 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
9341 Cast vec_cmpeq result to correct type.
9342 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
9343 Cast vec_cmpgt result to correct type.
9345 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
9347 * final.c (final_scan_insn_1): Renamed from...
9348 (final_scan_insn): ... this. New wrapper, to recover
9349 seen from the outermost call in recursive ones.
9350 * config/sparc/sparc.c (output_return): Drop seen from call.
9351 (output_sibcall): Likewise.
9352 * config/visium/visium.c (output_branch): Likewise.
9354 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
9356 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
9359 2018-02-10 Alan Modra <amodra@gmail.com>
9362 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
9363 Specify LR as an input.
9365 2018-02-10 Jakub Jelinek <jakub@redhat.com>
9368 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
9369 remove_member_access_dummy_vars): New functions.
9370 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
9371 lower_omp_1, execute_lower_omp): Use them.
9373 PR rtl-optimization/84308
9374 * shrink-wrap.c (spread_components): Release todo vector.
9376 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
9378 PR rtl-optimization/57193
9379 * ira-color.c (struct allocno_color_data): Add member
9380 conflict_allocno_hard_prefs.
9381 (update_conflict_allocno_hard_prefs): New.
9382 (bucket_allocno_compare_func): Add a preference based on
9383 conflict_allocno_hard_prefs.
9384 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
9385 (color_allocnos): Remove a dead code. Initiate
9386 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
9388 2018-02-09 Jakub Jelinek <jakub@redhat.com>
9391 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
9392 constraint from =wa to wa. Avoid a subreg on the output operand,
9393 instead use a pseudo and subreg it in a move.
9394 (p9_xxbrd_<mode>): Changed to ...
9395 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
9396 (p9_xxbrd_v2df): New expander.
9397 (p9_xxbrw_<mode>): Changed to ...
9398 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
9399 (p9_xxbrw_v4sf): New expander.
9401 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
9403 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
9405 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
9408 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
9409 multiply in 32-bit mode.
9410 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
9411 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
9414 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
9416 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
9417 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
9418 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
9419 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
9421 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
9424 * dwarf2out.c (is_trivial_indirect_ref): New function.
9425 (dwarf2out_late_global_decl): Do not generate a location
9426 attribute for variables that have a non-trivial DECL_VALUE_EXPR
9427 and that are not defined in the current unit.
9429 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
9431 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
9432 instead of a libcall for UNORDERED.
9434 2018-02-09 Tamar Christina <tamar.christina@arm.com>
9437 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
9438 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
9440 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9443 * config/s390/s390.c (s390_set_current_function): Invoke
9444 s390_indirect_branch_settings also if fndecl didn't change.
9446 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
9448 * config/rs6000/rs6000.md (blockage): Set length to zero.
9450 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
9452 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
9454 2018-02-09 Jakub Jelinek <jakub@redhat.com>
9457 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
9458 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
9462 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
9463 PARALLEL incoming that failed vt_get_decl_and_offset check.
9466 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
9467 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
9469 (get_variable_section): For decls in named .bss* sections pass true as
9470 second argument to bss_initializer_p.
9472 2018-02-09 Marek Polacek <polacek@redhat.com>
9473 Jakub Jelinek <jakub@redhat.com>
9476 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
9477 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
9478 Sync some changes from cxx_fold_indirect_ref.
9480 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
9482 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
9484 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
9485 (BLOCK_INLINE_ENTRY_LABEL): New.
9486 (dwarf2out_var_location): Disregard inline entry markers.
9487 (inline_entry_data): New struct.
9488 (inline_entry_data_hasher): New hashtable type.
9489 (inline_entry_data_hasher::hash): New.
9490 (inline_entry_data_hasher::equal): New.
9491 (inline_entry_data_table): New variable.
9492 (add_high_low_attributes): Add DW_AT_entry_pc and
9493 DW_AT_GNU_entry_view attributes if a pending entry is found
9494 in inline_entry_data_table. Add old entry_pc attribute only
9495 if debug nonbinding markers are disabled.
9496 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
9497 markers are enabled.
9498 (block_within_block_p, dwarf2out_inline_entry): New.
9499 (dwarf2out_finish): Check that no entries remained in
9500 inline_entry_data_table.
9501 * final.c (reemit_insn_block_notes): Handle inline entry notes.
9502 (final_scan_insn, notice_source_line): Likewise.
9503 (rest_of_clean_state): Skip inline entry markers.
9504 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
9506 * gimple.c (gimple_build_debug_inline_entry): New.
9507 * gimple.h (enum gimple_debug_subcode): Add
9508 GIMPLE_DEBUG_INLINE_ENTRY.
9509 (gimple_build_debug_inline_entry): Declare.
9510 (gimple_debug_inline_entry_p): New.
9511 (gimple_debug_nonbind_marker_p): Adjust.
9512 * insn-notes.def (INLINE_ENTRY): New.
9513 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
9514 inline entry marker notes.
9515 (print_insn): Likewise.
9516 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
9517 (INSN_DEBUG_MARKER_KIND): Likewise.
9518 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
9519 * tree-inline.c (expand_call_inline): Build and insert
9520 debug_inline_entry stmt.
9521 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
9522 inline entry blocks early, if nonbind markers are enabled.
9523 (dump_scope_block): Dump fragment info.
9524 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
9525 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
9526 (gimple_build_debug_inline_entry): New.
9527 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
9528 Enable/disable inline entry points too.
9529 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
9530 (DEBUG_INSN): Describe inline entry markers.
9532 * common.opt (gvariable-location-views): New.
9533 (gvariable-location-views=incompat5): New.
9534 * config.in: Rebuilt.
9535 * configure: Rebuilt.
9536 * configure.ac: Test assembler for view support.
9537 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
9538 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
9539 * dwarf2out.c (var_loc_view): New typedef.
9540 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
9541 (dwarf2out_locviews_in_attribute): New.
9542 (dwarf2out_locviews_in_loclist): New.
9543 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
9544 (enum dw_line_info_opcode): Add LI_adv_address.
9545 (struct dw_line_info_table): Add view.
9546 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
9547 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
9548 (zero_view_p): New variable.
9549 (ZERO_VIEW_P): New macro.
9550 (output_asm_line_debug_info): New.
9551 (struct var_loc_node): Add view.
9552 (add_AT_view_list, AT_loc_list): New.
9553 (add_var_loc_to_decl): Add view param. Test it against last.
9554 (new_loc_list): Add view params. Record them.
9555 (AT_loc_list_ptr): Handle loc and view lists.
9556 (view_list_to_loc_list_val_node): New.
9557 (print_dw_val): Handle dw_val_class_view_list.
9558 (size_of_die): Likewise.
9559 (value_format): Likewise.
9560 (loc_list_has_views): New.
9561 (gen_llsym): Set vl_symbol too.
9562 (maybe_gen_llsym, skip_loc_list_entry): New.
9563 (dwarf2out_maybe_output_loclist_view_pair): New.
9564 (output_loc_list): Output view list or entries too.
9565 (output_view_list_offset): New.
9566 (output_die): Handle dw_val_class_view_list.
9567 (output_dwarf_version): New.
9568 (output_compilation_unit_header): Use it.
9569 (output_skeleton_debug_sections): Likewise.
9570 (output_rnglists, output_line_info): Likewise.
9571 (output_pubnames, output_aranges): Update version comments.
9572 (output_one_line_info_table): Output view numbers in asm comments.
9573 (dw_loc_list): Determine current endview, pass it to new_loc_list.
9574 Call maybe_gen_llsym.
9575 (loc_list_from_tree_1): Adjust.
9576 (add_AT_location_description): Create view list attribute if
9577 needed, check it's absent otherwise.
9578 (convert_cfa_to_fb_loc_list): Adjust.
9579 (maybe_emit_file): Call output_asm_line_debug_info for test.
9580 (dwarf2out_var_location): Reset views as needed. Precompute
9581 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
9582 attribute. Set view.
9583 (new_line_info_table): Reset next view.
9584 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
9585 (dwarf2out_source_line): Likewise. Output view resets and labels to
9586 the assembler, or select appropriate line info opcodes.
9587 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
9588 (optimize_string_length): Catch it. Adjust.
9589 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
9590 dw_val_class_view_list, and remove it if no longer needed.
9591 (hash_loc_list): Hash view numbers.
9592 (loc_list_hasher::equal): Compare them.
9593 (optimize_location_lists): Check whether a view list symbol is
9594 needed, and whether the locview attribute is present, and
9595 whether they match. Remove the locview attribute if no longer
9597 (index_location_lists): Call skip_loc_list_entry for test.
9598 (dwarf2out_finish): Call output_asm_line_debug_info for test.
9599 Use output_dwarf_version.
9600 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
9601 (struct dw_val_node): Add val_view_list.
9602 * final.c (SEEN_NEXT_VIEW): New.
9603 (set_next_view_needed): New.
9604 (clear_next_view_needed): New.
9605 (maybe_output_next_view): New.
9606 (final_start_function): Rename to...
9607 (final_start_function_1): ... this. Take pointer to FIRST,
9608 add SEEN parameter. Emit param bindings in the initial view.
9609 (final_start_function): Reintroduce SEEN-less interface.
9610 (final): Rename to...
9611 (final_1): ... this. Take SEEN parameter. Output final pending
9612 next view at the end.
9613 (final): Reintroduce seen-less interface.
9614 (final_scan_insn): Output pending next view before switching
9615 sections or ending a block. Mark the next view as needed when
9616 outputting variable locations. Notify debug backend of section
9617 changes, and of location view changes.
9618 (rest_of_handle_final): Adjust.
9619 * toplev.c (process_options): Autodetect value for debug variable
9620 location views option. Warn on incompat5 without -gdwarf-5.
9621 * doc/invoke.texi (gvariable-location-views): New.
9622 (gvariable-location-views=incompat5): New.
9623 (gno-variable-location-views): New.
9625 2018-02-08 David Malcolm <dmalcolm@redhat.com>
9627 PR tree-optimization/84136
9628 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
9629 that the result of find_edge is non-NULL.
9631 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
9634 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
9635 storing integer register in SImode. Fix cost of 256 and 512
9636 byte aligned SSE register store.
9638 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
9640 * config/i386/i386.c (ix86_multiplication_cost): Fix
9641 multiplication cost for TARGET_AVX512DQ.
9643 2018-02-08 Marek Polacek <polacek@redhat.com>
9645 PR tree-optimization/84238
9646 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
9649 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
9651 PR tree-optimization/84265
9652 * tree-vect-stmts.c (vectorizable_store): Don't treat
9653 VMAT_CONTIGUOUS accesses as grouped.
9654 (vectorizable_load): Likewise.
9656 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
9658 PR tree-optimization/81635
9659 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
9660 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
9661 (test_round_for_mask): New functions.
9662 (wide_int_cc_tests): Call test_round_for_mask.
9663 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
9664 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
9665 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
9666 range returned by get_range_info.
9668 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
9671 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
9672 * symtab.c: Include builtins.h
9673 (symtab_node::output_to_lto_symbol_table_p): Move here
9674 from lto-streamer-out.c:output_symbol_p.
9675 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
9676 (output_symbol_p): Move all logic to symtab.c
9677 (produce_symtab): Update.
9679 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9681 * config/s390/s390-opts.h (enum indirect_branch): Define.
9682 * config/s390/s390-protos.h (s390_return_addr_from_memory)
9683 (s390_indirect_branch_via_thunk)
9684 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
9685 (enum s390_indirect_branch_type): Define.
9686 * config/s390/s390.c (struct s390_frame_layout, struct
9687 machine_function): Remove.
9688 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
9689 (indirect_branch_table_label_no, indirect_branch_table_name):
9691 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
9692 (enum s390_indirect_branch_option): Define.
9693 (s390_return_addr_from_memory): New function.
9694 (s390_handle_string_attribute): New function.
9695 (s390_attribute_table): Add new attribute handler.
9696 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
9697 (s390_indirect_branch_via_thunk): New function.
9698 (s390_indirect_branch_via_inline_thunk): New function.
9699 (s390_function_ok_for_sibcall): When jumping via thunk disallow
9700 sibling call optimization for non z10 compiles.
9701 (s390_emit_call): Force indirect branch target to be a single
9702 register. Add r1 clobber for non-z10 compiles.
9703 (s390_emit_epilogue): Emit return jump via return_use expander.
9704 (s390_reorg): Handle JUMP_INSNs as execute targets.
9705 (s390_option_override_internal): Perform validity checks for the
9706 new command line options.
9707 (s390_indirect_branch_attrvalue): New function.
9708 (s390_indirect_branch_settings): New function.
9709 (s390_set_current_function): Invoke s390_indirect_branch_settings.
9710 (s390_output_indirect_thunk_function): New function.
9711 (s390_code_end): Implement target hook.
9712 (s390_case_values_threshold): Implement target hook.
9713 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
9715 * config/s390/s390.h (struct s390_frame_layout)
9716 (struct machine_function): Move here from s390.c.
9717 (TARGET_INDIRECT_BRANCH_NOBP_RET)
9718 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
9719 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
9720 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
9721 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
9722 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
9723 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
9724 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
9725 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
9726 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
9727 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
9728 (mnemonic attribute): Add values which aren't recognized
9730 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
9731 pattern for branch conversion. Fix mnemonic attribute.
9732 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
9733 indirect branch via thunk if requested.
9734 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
9735 ("*indirect_jump"): Disable for branch conversion using out of
9737 ("indirect_jump_via_thunk<mode>_z10")
9738 ("indirect_jump_via_thunk<mode>")
9739 ("indirect_jump_via_inlinethunk<mode>_z10")
9740 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
9741 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
9742 ("casesi_jump_via_inlinethunk<mode>_z10")
9743 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
9744 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
9745 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
9746 ("*indirect2_jump"): Disable for branch conversion.
9747 ("casesi_jump"): Turn into expander and expand patterns for branch
9749 ("return_use"): New expander.
9750 ("*return"): Emit return via thunk and rename it to ...
9751 ("*return<mode>"): ... this one.
9752 * config/s390/s390.opt: Add new options and and enum for the
9755 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
9757 * lra-constraints.c (match_reload): Unconditionally use
9758 gen_lowpart_SUBREG, rather than selecting between that
9759 and equivalent gen_rtx_SUBREG code.
9761 2018-02-08 Richard Biener <rguenther@suse.de>
9763 PR tree-optimization/84233
9764 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
9765 changed flag instead of boguously re-using phi_inserted.
9767 2018-02-08 Martin Jambor <mjambor@suse.cz>
9769 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
9770 static local variables.
9772 2018-02-08 Richard Biener <rguenther@suse.de>
9774 PR tree-optimization/84278
9775 * tree-vect-stmts.c (vectorizable_store): When looking for
9776 smaller vector types to perform grouped strided loads/stores
9777 make sure the mode is supported by the target.
9778 (vectorizable_load): Likewise.
9780 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
9782 * config/aarch64/aarch64.c (aarch64_components_for_bb):
9783 Increase LDP/STP opportunities by adding adjacent callee-saves.
9785 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
9787 PR rtl-optimization/84068
9788 PR rtl-optimization/83459
9789 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
9791 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
9793 PR tree-optimization/84224
9794 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
9795 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
9798 2018-02-07 Iain Sandoe <iain@codesourcery.com>
9801 * config/rs6000/altivec.md (*restore_world): Remove LR use.
9802 * config/rs6000/predicates.md (restore_world_operation): Adjust op
9803 count, remove one USE.
9805 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
9807 * doc/install.texi (Configuration): Document the
9808 --with-long-double-format={ibm,ieee} PowerPC configuration
9812 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
9813 Convert from define_expand to be define_insn_and_split. Rework
9814 float/double/_Float128 conversions to QI/HI/SImode to work with
9815 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
9816 conversions to QI/HImode types did a store and then a load to
9817 truncate the value. For conversions to VSX registers, don't split
9818 the insn, instead emit the code directly. Use the code iterator
9819 any_fix to combine signed and unsigned conversions.
9820 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
9821 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
9822 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
9823 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
9824 (fix_<mode>di2_hw): Likewise.
9825 (fixuns_<mode>di2_hw): Likewise.
9826 (fix_<mode>si2_hw): Likewise.
9827 (fixuns_<mode>si2_hw): Likewise.
9828 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
9829 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
9830 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
9831 fix<uns>_trunc<SFDF:mode>si2_p8.
9832 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
9833 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
9834 (fix<uns>_<mode>_mem): Likewise.
9835 (fctiw<u>z_<mode>_mem): Likewise.
9836 (fix<uns>_<mode>_mem): Likewise.
9837 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
9838 the register allocator from doing a direct move to the GPRs to do
9839 a store, and instead use the ISA 3.0 store byte/half-word from
9840 vector register instruction. For IEEE 128-bit floating point,
9841 also optimize stores of 32-bit ints.
9842 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
9844 2018-02-07 Alan Hayward <alan.hayward@arm.com>
9846 * genextract.c (push_pathstr_operand): New function to support
9848 (walk_rtx): Call push_pathstr_operand.
9849 (print_path): Support [a-zA-Z].
9851 2018-02-07 Richard Biener <rguenther@suse.de>
9853 PR tree-optimization/84037
9854 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
9855 (cse_and_gimplify_to_preheader): Declare.
9856 (vect_get_place_in_interleaving_chain): Likewise.
9857 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
9859 (_loop_vec_info::~_loop_vec_info): Delete it.
9860 (cse_and_gimplify_to_preheader): New function.
9861 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
9862 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
9863 (vectorizable_load): Likewise. For grouped stores always base
9864 the IV on the first element.
9865 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
9866 condition before gimplifying.
9868 2018-02-07 Jakub Jelinek <jakub@redhat.com>
9870 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
9871 *DIV_EXPR and *MOD_EXPR.
9873 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
9876 * config/i386/i386.c (ix86_option_override_internal): Mask out
9877 the CF_SET bit when checking -fcf-protection.
9879 2018-02-07 Tom de Vries <tom@codesourcery.com>
9882 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
9885 2018-02-07 Richard Biener <rguenther@suse.de>
9887 PR tree-optimization/84204
9888 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
9891 PR tree-optimization/84205
9892 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
9893 special-case isl_ast_op_zdiv_r.
9895 PR tree-optimization/84223
9896 * graphite-scop-detection.c (gather_bbs::before_dom_children):
9897 Only add conditions from within the region.
9898 (gather_bbs::after_dom_children): Adjust.
9900 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
9903 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
9904 * config/avr/avr.md: Only post-reload split REG-REG moves if
9905 either register is GENERAL_REG_P.
9907 2018-02-07 Jakub Jelinek <jakub@redhat.com>
9909 PR tree-optimization/84235
9910 * tree-ssa-scopedtables.c
9911 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
9912 if the subtraction is performed in floating point type where NaNs are
9913 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
9914 build 1. Formatting fix.
9916 2018-02-06 Jakub Jelinek <jakub@redhat.com>
9919 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
9920 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
9921 and skip it regardless of bb boundaries. Use CALL_P macro,
9922 don't test INSN_P (insn) together with CALL_P or JUMP_P check
9923 unnecessarily, formatting fix.
9925 2018-02-06 Michael Collison <michael.collison@arm.com>
9927 * config/arm/thumb2.md:
9928 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
9929 (*thumb_mov_notscc): Ditto.
9931 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
9934 * config/rs6000/rs6000.md (su code attribute): Use "u" for
9935 unsigned_fix, not "s".
9937 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9939 * configure.ac (gcc_fn_eh_frame_ro): New function.
9940 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
9941 correct .eh_frame permissions.
9942 * configure: Regenerate.
9944 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
9946 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
9949 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
9951 * config/rs6000/rs6000.c (rs6000_option_override_internal):
9952 Display warning message for -mno-speculate-indirect-jumps.
9954 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
9956 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
9958 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
9960 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
9962 PR tree-optimization/84225
9963 * tree-eh.c (find_trapping_overflow): Only call
9964 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
9966 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
9969 * config/i386/i386.c: Reimplement the check of possible options
9970 -mibt/-mshstk conbination. Change error messages.
9971 * doc/invoke.texi: Fix a typo: remove extra '='.
9973 2018-02-06 Marek Polacek <polacek@redhat.com>
9975 PR tree-optimization/84228
9976 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
9978 2018-02-06 Tamar Christina <tamar.christina@arm.com>
9981 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
9982 emitted arch directives.
9983 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
9984 __ARM_FEATURE_COPROC before changing architectures.
9986 2018-02-06 Richard Biener <rguenther@suse.de>
9988 * config/i386/i386.c (print_reg): Fix typo.
9989 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
9991 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
9993 * configure: Regenerate.
9995 2018-02-05 Martin Sebor <msebor@redhat.com>
9997 PR tree-optimization/83369
9998 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
10001 2018-02-05 Martin Liska <mliska@suse.cz>
10003 * doc/invoke.texi: Cherry-pick upstream r323995.
10005 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
10007 * ira.c (ira_init_register_move_cost): Adjust comment.
10009 2018-02-05 Martin Liska <mliska@suse.cz>
10011 PR gcov-profile/84137
10012 * doc/gcov.texi: Fix typo in documentation.
10014 2018-02-05 Martin Liska <mliska@suse.cz>
10016 PR gcov-profile/83879
10017 * doc/gcov.texi: Document necessity of --dynamic-list-data when
10018 using dlopen functionality.
10020 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
10022 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
10023 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
10024 _mm_maskz_range_ss, _mm_mask_range_round_ss,
10025 _mm_maskz_range_round_ss): New intrinsics.
10026 (__builtin_ia32_rangesd128_round)
10027 (__builtin_ia32_rangess128_round): Remove.
10028 (__builtin_ia32_rangesd128_mask_round,
10029 __builtin_ia32_rangess128_mask_round): New builtins.
10030 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
10031 __builtin_ia32_rangess128_round): Remove.
10032 (__builtin_ia32_rangesd128_mask_round,
10033 __builtin_ia32_rangess128_mask_round): New builtins.
10034 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
10035 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
10036 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
10037 "<round_saeonly_constraint>")): Changed to ...
10038 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
10039 "<round_saeonly_scalar_constraint>")): ... this.
10040 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
10041 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
10042 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
10043 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
10044 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
10046 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
10048 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
10050 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
10051 Remove all values except native, 8540 and 8548.
10053 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
10055 * config/i386/i386.c (ix86_output_function_return): Pass
10056 INVALID_REGNUM, instead of -1, as invalid register number to
10057 indirect_thunk_name and output_indirect_thunk.
10059 2018-02-02 Julia Koval <julia.koval@intel.com>
10061 * config.gcc: Add -march=icelake.
10062 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
10063 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
10064 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
10065 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
10066 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
10067 (processor_target_table): Add icelake.
10068 (ix86_option_override_internal): Handle new PTAs.
10069 (get_builtin_code_for_version): Handle icelake.
10070 (M_INTEL_COREI7_ICELAKE): New.
10071 (fold_builtin_cpu): Handle icelake.
10072 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
10073 * doc/invoke.texi: Add -march=icelake.
10075 2018-02-02 Julia Koval <julia.koval@intel.com>
10077 * config/i386/i386.c (ix86_option_override_internal): Change flags type
10078 to wide_int_bitmask.
10079 * wide-int-bitmask.h: New.
10081 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
10084 * config/i386/i386.md: Replace Pmode with word_mode in
10085 builtin_setjmp_setup and builtin_longjmp to support x32.
10087 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
10091 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
10093 (rs6000_supported_cpu_names): New static variable.
10094 (linux_cpu_translation_table): Likewise.
10095 (elf_platform) <cpu>: Define new static variable and use it.
10096 Translate kernel AT_PLATFORM name to canonical name if needed.
10097 Error if platform name is unknown.
10099 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
10102 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
10104 2018-02-01 Jeff Law <law@redhat.com>
10107 * config/i386/i386.c (release_scratch_register_on_entry): Add new
10108 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
10109 the scratch if RELEASE_VIA_POP is false.
10110 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
10111 If we have to save a temporary register, decrement SIZE appropriately.
10112 Pass new arguments to release_scratch_register_on_entry.
10113 (ix86_adjust_stack_and_probe): Likewise.
10114 (ix86_emit_probe_stack_range): Pass new arguments to
10115 release_scratch_register_on_entry.
10117 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
10119 PR rtl-optimization/84157
10120 * combine.c (change_zero_ext): Use REG_P predicate in
10121 front of HARD_REGISTER_P predicate.
10123 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
10125 * config/avr/avr.c (avr_option_override): Move disabling of
10126 -fdelete-null-pointer-checks to...
10127 * common/config/avr/avr-common.c (avr_option_optimization_table):
10130 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
10132 PR tree-optimization/81635
10133 * tree-data-ref.c (split_constant_offset_1): For types that
10134 wrap on overflow, try to use range info to prove that wrapping
10137 2018-02-01 Renlin Li <renlin.li@arm.com>
10140 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
10141 TAILCALL_ADDR_REGS.
10142 (aarch64_register_move_cost): Likewise.
10143 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
10144 TAILCALL_ADDR_REGS.
10145 (REG_CLASS_NAMES): Likewise.
10146 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
10147 TAILCALL_ADDR_REGS. Remove IP registers.
10148 * config/aarch64/aarch64.md (Ucs): Update register constraint.
10150 2018-02-01 Richard Biener <rguenther@suse.de>
10152 * domwalk.h (dom_walker::dom_walker): Add additional constructor
10153 for specifying RPO order and allow NULL for that.
10154 * domwalk.c (dom_walker::dom_walker): Likewise.
10155 (dom_walker::walk): Handle NULL RPO order.
10156 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
10158 (rewrite_update_dom_walker): Likewise.
10159 (mark_def_dom_walker): Likewise.
10161 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
10163 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
10164 (aarch64_maybe_expand_sve_subreg_move): Declare.
10165 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
10166 * config/aarch64/predicates.md (aarch64_any_register_operand): New
10168 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
10169 that are semantically a reverse operation.
10170 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
10171 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
10172 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
10174 (aarch64_can_change_mode_class): For big-endian, forbid changes
10175 between two SVE modes if they have different element sizes.
10177 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
10179 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
10180 the TImode handling for big-endian targets.
10182 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
10184 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
10185 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
10187 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
10188 Remove BSWAP handing for big-endian targets and use the form of
10189 LD1RQ appropariate for the mode.
10191 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
10193 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
10194 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
10195 duplicated element.
10197 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
10200 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
10201 check for operands that need to go through aarch64_sve_reload_be.
10203 2018-02-01 Jakub Jelinek <jakub@redhat.com>
10205 PR tree-optimization/81661
10206 PR tree-optimization/84117
10207 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
10208 * tree-eh.c: Include gimplify.h.
10209 (find_trapping_overflow, replace_trapping_overflow,
10210 rewrite_to_non_trapping_overflow): New functions.
10211 * tree-vect-loop.c: Include tree-eh.h.
10212 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
10213 * tree-data-ref.c: Include tree-eh.h.
10214 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
10216 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
10218 PR rtl-optimization/84123
10219 * combine.c (change_zero_ext): Check if hard register satisfies
10220 can_change_dest_mode before calling gen_lowpart_SUBREG.
10222 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
10225 * ira.c (ira_init_register_move_cost): Remove assert.
10227 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
10229 PR rtl-optimization/84071
10230 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
10231 * doc/tm.texi: Regenerate.
10233 2018-01-31 Richard Biener <rguenther@suse.de>
10235 PR tree-optimization/84132
10236 * tree-data-ref.c (analyze_miv_subscript): Properly
10237 check whether evolution_function_is_affine_multivariate_p
10238 before calling gcd_of_steps_may_divide_p.
10240 2018-01-31 Julia Koval <julia.koval@intel.com>
10243 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
10244 * config/i386/i386.md (rdpid_rex64) New.
10245 (rdpid): Make 32bit only.
10247 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
10250 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
10251 an IDENTIFIER_NODE for FUNCTION_TYPE's.
10253 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
10256 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
10258 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
10260 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
10262 PR rtl-optimization/84071
10263 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
10264 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
10266 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
10268 * config/arc/arc.c (arc_handle_aux_attribute): New function.
10269 (arc_attribute_table): Add 'aux' attribute.
10270 (arc_in_small_data_p): Consider aux like variables.
10271 (arc_is_aux_reg_p): New function.
10272 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
10273 (arc_get_aux_arg): New function.
10274 (prepare_move_operands): Handle aux-register access.
10275 (arc_handle_aux_attribute): New function.
10276 * doc/extend.texi (ARC Variable attributes): Add subsection.
10278 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
10280 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
10281 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
10282 (arc_attribute_table): Add 'uncached' attribute.
10283 (arc_print_operand): Print '.di' flag for uncached memory
10285 (arc_in_small_data_p): Do not consider for small data the uncached
10287 (arc_is_uncached_mem_p): New function.
10288 * config/arc/predicates.md (compact_store_memory_operand): Check
10289 for uncached memory accesses.
10290 (nonvol_nonimm_operand): Likewise.
10291 * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
10293 2018-01-31 Jakub Jelinek <jakub@redhat.com>
10296 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
10297 falign-loops=): Add Optimization flag.
10299 2018-01-30 Jeff Law <law@redhat.com>
10302 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
10303 INT_REGISTERS_SAVED. Check it prior to calling
10304 get_scratch_register_on_entry.
10305 (ix86_adjust_stack_and_probe): Similarly.
10306 (ix86_emit_probe_stack_range): Similarly.
10307 (ix86_expand_prologue): Corresponding changes.
10309 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10312 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
10313 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
10315 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
10318 * lra-constraints.c (curr_insn_transform): Process AND in the
10321 2018-01-30 Jakub Jelinek <jakub@redhat.com>
10323 PR rtl-optimization/83986
10324 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
10325 dependence against last_pending_memory_flush in addition to
10326 pending_jump_insns.
10328 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
10330 PR tree-optimization/81611
10331 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
10334 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
10337 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
10340 2018-01-30 Richard Biener <rguenther@suse.de>
10341 Jakub Jelinek <jakub@redhat.com>
10343 PR tree-optimization/84111
10344 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
10345 inner loops added during recursion, as they don't have up-to-date
10348 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
10351 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
10352 (can_inline_edge_by_limits_p): ... here.
10353 (can_early_inline_edge_p, check_callers,
10354 update_caller_keys, update_callee_keys, recursive_inlining,
10355 add_new_edges_to_heap, speculation_useful_p,
10356 inline_small_functions,
10357 inline_small_functions, flatten_function,
10358 inline_to_all_callers_1): Update.
10360 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
10362 * profile-count.c (profile_count::combine_with_ipa_count): Handle
10365 2018-01-30 Richard Biener <rguenther@suse.de>
10367 PR tree-optimization/83008
10368 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
10369 invariant and constant vector uses in stmts when they need
10370 more than one stmt.
10372 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10375 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
10376 * configure: Regenerate.
10378 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
10380 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
10382 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
10383 Use gen_rtx_REG rather than gen_lowpart.
10385 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
10387 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
10388 rather than 0 when creating partial subregs.
10390 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
10392 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
10395 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
10398 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
10399 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
10400 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
10401 flags. This restores the settings used before the 2017-07-24.
10402 Turning off pre increment/decrement/modify allows IVOPTS to
10403 optimize DF/SF loops where the index is an int.
10405 2018-01-29 Richard Biener <rguenther@suse.de>
10406 Kelvin Nilsen <kelvin@gcc.gnu.org>
10409 * tree-vect-stmts.c (vectorizable_call): Don't call
10410 targetm.vectorize_builtin_md_vectorized_function if callee is
10413 2018-01-22 Carl Love <cel@us.ibm.com>
10415 * doc/extend.tex: Fix typo in second arg in
10416 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
10418 2018-01-29 Richard Biener <rguenther@suse.de>
10420 PR tree-optimization/84086
10421 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
10422 (flush_ssaname_freelist): When SSA names were released reset
10423 the SCEV hash table.
10425 2018-01-29 Richard Biener <rguenther@suse.de>
10427 PR tree-optimization/84057
10428 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
10429 removed paths when removing edges.
10431 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
10433 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
10434 -mfunction-return=@var{choice}.
10436 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
10438 PR diagnostic/84034
10439 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
10440 Handle CR like TAB.
10441 (layout::print_source_line): Likewise.
10442 (test_get_line_width_without_trailing_whitespace): Add test cases.
10444 2018-01-27 Jakub Jelinek <jakub@redhat.com>
10446 PR middle-end/84040
10447 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
10450 2018-01-26 Jim Wilson <jimw@sifive.com>
10452 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
10454 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
10457 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10459 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
10460 and CMP + SUB-immediate -> SUBS.
10462 2018-01-26 Martin Sebor <msebor@redhat.com>
10464 PR tree-optimization/83896
10465 * tree-ssa-strlen.c (get_string_len): Rename...
10466 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
10467 Avoid assuming length is constant.
10468 (handle_char_store): Use HOST_WIDE_INT for string length.
10470 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
10473 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
10474 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
10476 2018-01-26 Richard Biener <rguenther@suse.de>
10478 PR rtl-optimization/84003
10479 * dse.c (record_store): Only record redundant stores when
10480 the earlier store aliases at least all accesses the later one does.
10482 2018-01-26 Jakub Jelinek <jakub@redhat.com>
10484 PR rtl-optimization/83985
10485 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
10486 REG_CFA_RESTORE insns.
10487 (delete_unmarked_insns): Don't ignore separate shrink wrapping
10488 REG_CFA_RESTORE insns here.
10491 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
10492 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
10494 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
10496 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
10497 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
10498 (arc_init): Likewise.
10499 (arc_override_options): Likewise.
10500 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
10502 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
10504 * config/arc/arc.h (TARGET_DBNZ): Define.
10505 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
10506 properly set the tune attribute.
10507 (dbnz): Use TARGET_DBNZ guard.
10508 * config/arc/arc.opt (mtune): Add core3 option.
10510 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
10512 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
10513 recognize new pic like addresses.
10514 (arc_delegitimize_address): Clean up.
10516 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
10518 * config/arc/arc-arches.def: Option mrf16 valid for all
10520 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
10521 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
10522 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
10523 * config/arc/arc-tables.opt: Regenerate.
10524 * config/arc/arc.c (arc_conditional_register_usage): Handle
10525 reduced register file case.
10526 (arc_file_start): Set must have build attributes.
10527 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
10528 mrf16 option value.
10529 * config/arc/arc.opt (mrf16): Add new option.
10530 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
10531 * config/arc/genmultilib.awk: Handle new mrf16 option.
10532 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
10533 * config/arc/t-multilib: Regenerate.
10534 * doc/invoke.texi (ARC Options): Document mrf16 option.
10536 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
10538 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
10539 * config/arc/arc.c (arc_handle_secure_attribute): New function.
10540 (arc_attribute_table): Add 'secure_call' attribute.
10541 (arc_print_operand): Print secure call operand.
10542 (arc_function_ok_for_sibcall): Don't optimize tail calls when
10544 (arc_is_secure_call_p): New function. * config/arc/arc.md
10545 (call_i): Add support for sjli instruction.
10546 (call_value_i): Likewise.
10547 * config/arc/constraints.md (Csc): New constraint.
10549 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
10550 John Eric Martin <John.Martin@emmicro-us.com>
10552 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
10553 * config/arc/arc.c (_arc_jli_section): New struct.
10554 (arc_jli_section): New type.
10555 (rc_jli_sections): New static variable.
10556 (arc_handle_jli_attribute): New function.
10557 (arc_attribute_table): Add jli_always and jli_fixed attribute.
10558 (arc_file_end): New function.
10559 (TARGET_ASM_FILE_END): Define.
10560 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
10561 (arc_add_jli_section): New function.
10562 (jli_call_scan): Likewise.
10563 (arc_reorg): Call jli_call_scan.
10564 (arc_output_addsi): Remove 'S' from printing asm operand.
10565 (arc_is_jli_call_p): New function.
10566 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
10568 (movhi_insn): Likewise.
10569 (movsi_insn): Likewise.
10570 (movsi_set_cc_insn): Likewise.
10571 (loadqi_update): Likewise.
10572 (load_zeroextendqisi_update): Likewise.
10573 (load_signextendqisi_update): Likewise.
10574 (loadhi_update): Likewise.
10575 (load_zeroextendhisi_update): Likewise.
10576 (load_signextendhisi_update): Likewise.
10577 (loadsi_update): Likewise.
10578 (loadsf_update): Likewise.
10579 (movsicc_insn): Likewise.
10580 (bset_insn): Likewise.
10581 (bxor_insn): Likewise.
10582 (bclr_insn): Likewise.
10583 (bmsk_insn): Likewise.
10584 (bicsi3_insn): Likewise.
10585 (cmpsi_cc_c_insn): Likewise.
10586 (movsi_ne): Likewise.
10587 (movsi_cond_exec): Likewise.
10588 (clrsbsi2): Likewise.
10589 (norm_f): Likewise.
10599 (call_i): Remove 'S' asm letter, add jli instruction.
10600 (call_value_i): Likewise.
10601 * config/arc/arc.op (mjli-always): New option.
10602 * config/arc/constraints.md (Cji): New constraint.
10603 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
10605 (subsf3_fpx): Likewise.
10606 (mulsf3_fpx): Likewise.
10607 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
10609 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
10610 function attrbutes.
10611 * doc/invoke.texi (ARC): Document mjli-always option.
10613 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
10615 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
10616 avoid addition with 0 and use incw and decw where possible.
10618 2018-01-26 Richard Biener <rguenther@suse.de>
10620 PR tree-optimization/81082
10621 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
10622 association if it requires casting to unsigned.
10623 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
10624 from fold_plusminus_mult_expr to catch important cases late when
10625 range info is available.
10627 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10629 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
10630 * configure.ac (hidden_linkonce): New test.
10631 * configure: Regenerate.
10632 * config.in: Regenerate.
10634 2018-01-26 Julia Koval <julia.koval@intel.com>
10636 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
10637 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
10638 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
10639 _mm_mask_bitshuffle_epi64_mask): Fix type.
10640 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
10641 USI_FTYPE_V4DI_V4DI_USI): Remove.
10642 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
10643 __builtin_ia32_vpshufbitqmb256_mask,
10644 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
10645 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
10646 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
10648 2018-01-26 Alan Modra <amodra@gmail.com>
10651 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
10652 UNSPEC_VBPERMQ. Sort other unspecs.
10654 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
10656 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
10658 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
10660 PR middle-end/83055
10661 * predict.c (drop_profile): Do not push/pop cfun; update also
10663 (handle_missing_profiles): Fix logic looking for zero profiles.
10665 2018-01-25 Jakub Jelinek <jakub@redhat.com>
10667 PR middle-end/83977
10668 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
10669 on functions with #pragma omp declare simd or functions with simd
10671 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
10672 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
10673 Remove trailing \n from warning_at calls.
10675 2018-01-25 Tom de Vries <tom@codesourcery.com>
10678 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
10679 for neutered workers.
10681 2018-01-24 Joseph Myers <joseph@codesourcery.com>
10684 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
10685 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
10687 2018-01-24 Jeff Law <law@redhat.com>
10690 * i386.c (get_probe_interval): Move to earlier point.
10691 (ix86_compute_frame_layout): If -fstack-clash-protection and
10692 the frame is larger than the probe interval, then use pushes
10693 to save registers rather than reg->mem moves.
10694 (ix86_expand_prologue): Remove conditional for int_registers_saved
10697 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
10700 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
10701 min/max for never referenced object.
10703 2018-01-24 Jakub Jelinek <jakub@redhat.com>
10705 PR middle-end/83977
10706 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
10708 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
10709 attributes from DECL_ATTRIBUTES (decl) without affecting
10710 DECL_ATTRIBUTES (current_function_decl).
10711 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
10712 functions with non-NULL DECL_ABSTRACT_ORIGIN.
10714 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
10716 PR tree-optimization/83979
10717 * fold-const.c (fold_comparison): Use constant_boolean_node
10718 instead of boolean_{true,false}_node.
10720 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
10722 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
10725 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
10727 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
10728 Simplify the clause that sets the length attribute.
10729 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
10730 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
10731 clause that sets the length attribute.
10732 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
10734 2018-01-24 Tom de Vries <tom@codesourcery.com>
10737 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
10738 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
10739 Add strict parameter.
10740 (prevent_branch_around_nothing): Insert dummy insn between branch to
10741 label and label with no ptx insn inbetween.
10742 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
10744 2018-01-24 Tom de Vries <tom@codesourcery.com>
10747 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
10748 for neutered threads in warp.
10749 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
10751 2018-01-24 Richard Biener <rguenther@suse.de>
10753 PR tree-optimization/83176
10754 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
10757 2018-01-24 Richard Biener <rguenther@suse.de>
10759 PR tree-optimization/82819
10760 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
10761 code generating pluses that are no-ops in the target precision.
10763 2018-01-24 Richard Biener <rguenther@suse.de>
10765 PR middle-end/84000
10766 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
10768 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
10770 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
10771 to merge probabilities.
10772 * predict.c (probably_never_executed): Also mark as cold functions
10773 with global 0 profile and guessed local profile.
10774 * profile-count.c (profile_probability::combine_with_count): New
10776 * profile-count.h (profile_probability::operator*,
10777 profile_probability::operator*=, profile_probability::operator/,
10778 profile_probability::operator/=): Reduce precision to adjusted
10779 and set value to guessed on contradictory divisions.
10780 (profile_probability::combine_with_freq): Remove.
10781 (profile_probability::combine_wiht_count): Declare.
10782 (profile_count::force_nonzero):: Set to adjusted.
10783 (profile_count::probability_in):: Set quality to adjusted.
10784 * tree-ssa-tail-merge.c (replace_block_by): Use
10785 combine_with_count.
10787 2018-01-23 Andrew Waterman <andrew@sifive.com>
10788 Jim Wilson <jimw@sifive.com>
10790 * config/riscv/riscv.c (riscv_stack_boundary): New.
10791 (riscv_option_override): Set riscv_stack_boundary. Handle
10792 riscv_preferred_stack_boundary_arg.
10793 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
10794 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
10795 (STACK_BOUNDARY): Set to riscv_stack_boundary.
10796 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
10797 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
10798 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
10800 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
10803 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
10804 of struct ix86_frame.
10805 (ix86_expand_epilogue): Likewise. Add a local variable for
10806 the reg_save_offset field in struct ix86_frame.
10808 2018-01-23 Bin Cheng <bin.cheng@arm.com>
10810 PR tree-optimization/82604
10811 * tree-loop-distribution.c (enum partition_kind): New enum item
10812 PKIND_PARTIAL_MEMSET.
10813 (partition_builtin_p): Support above new enum item.
10814 (generate_code_for_partition): Ditto.
10815 (compute_access_range): Differentiate cases that equality can be
10816 proven at all loops, the innermost loops or no loops.
10817 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
10818 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
10819 (finalize_partitions, distribute_loop): Don't fuse partition of
10820 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
10821 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
10822 parloop is enabled.
10824 2018-01-23 Martin Liska <mliska@suse.cz>
10826 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
10827 order to ignore the predictor.
10828 (PRED_POLYMORPHIC_CALL): Likewise.
10829 (PRED_RECURSIVE_CALL): Likewise.
10831 2018-01-23 Martin Liska <mliska@suse.cz>
10833 * tree-profile.c (tree_profiling): Print function header to
10834 aware reader which function we are working on.
10835 * value-prof.c (gimple_find_values_to_profile): Do not print
10836 not interesting value histograms.
10838 2018-01-23 Martin Liska <mliska@suse.cz>
10840 * profile-count.h (enum profile_quality): Add
10841 profile_uninitialized as the first value. Do not number values
10842 as they are zero based.
10843 (profile_count::verify): Update sanity check.
10844 (profile_probability::verify): Likewise.
10846 2018-01-23 Nathan Sidwell <nathan@acm.org>
10848 * doc/invoke.texi (ffor-scope): Deprecate.
10850 2018-01-23 David Malcolm <dmalcolm@redhat.com>
10852 PR tree-optimization/83510
10853 * domwalk.c (set_all_edges_as_executable): New function.
10854 (dom_walker::dom_walker): Convert bool param
10855 "skip_unreachable_blocks" to enum reachability. Move setup of
10856 edge flags to set_all_edges_as_executable and only do it when
10857 reachability is REACHABLE_BLOCKS.
10858 * domwalk.h (enum dom_walker::reachability): New enum.
10859 (dom_walker::dom_walker): Convert bool param
10860 "skip_unreachable_blocks" to enum reachability.
10861 (set_all_edges_as_executable): New decl.
10862 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
10863 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
10865 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
10866 but converting true to REACHABLE_BLOCKS.
10867 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
10869 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
10870 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
10871 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
10873 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
10874 if check_all_array_refs will be called.
10876 2018-01-23 David Malcolm <dmalcolm@redhat.com>
10878 * tree.c (selftest::test_location_wrappers): Add more test
10881 2018-01-23 David Malcolm <dmalcolm@redhat.com>
10883 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
10884 (selftest::test_bit_in_range): Likewise.
10886 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
10889 * doc/sourcebuild.texi (vect_float): Say that the selector
10890 only describes the situation when -funsafe-math-optimizations is on.
10891 (vect_float_strict): Document.
10893 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
10895 PR tree-optimization/83965
10896 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
10897 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
10898 instead of checking only for a reduction.
10899 (vect_recog_widen_sum_pattern): Likewise.
10901 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
10903 * predict.c (probably_never_executed): Only use precise profile info.
10904 (compute_function_frequency): Skip after inlining hack since we now
10905 have quality checking.
10907 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
10909 * profile-count.h (profile_probability::very_unlikely,
10910 profile_probability::unlikely, profile_probability::even): Set
10911 precision to guessed.
10913 2018-01-23 Richard Biener <rguenther@suse.de>
10915 PR tree-optimization/83963
10916 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
10917 Properly terminate dominator walk when crossing the exit edge not
10918 when visiting its source block.
10920 2018-01-23 Jakub Jelinek <jakub@redhat.com>
10923 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
10924 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
10926 2018-01-22 Jakub Jelinek <jakub@redhat.com>
10928 PR tree-optimization/83957
10929 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
10930 semicolon after for body surrounded by braces.
10932 PR tree-optimization/83081
10933 * profile-count.h (profile_probability::split): New method.
10934 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
10935 Use profile_probability::split.
10936 (do_compare_rtx_and_jump): Fix adjustment of probabilities
10937 when splitting a single conditional jump into 2.
10939 2018-01-22 David Malcolm <dmalcolm@redhat.com>
10941 PR tree-optimization/69452
10942 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
10945 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10947 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
10948 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
10949 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
10951 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10953 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
10955 * config/rl78/rl78.md (movdi): New define_expand.
10956 * config/rl78/rl78.c (rl78_split_movdi): New function.
10958 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
10961 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
10963 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
10964 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
10965 128-bit to produce an UNSPEC move to get the double word with the
10966 signbit and then a shift directly to do signbit.
10967 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
10968 implementation with a new version that just does either a direct
10969 move or a regular move. Move memory interface to separate insns.
10970 Move insns so they are next to the expander.
10971 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
10972 with signbit move. Split big and little endian case.
10973 (signbit<mode>2_dm_mem_le): Likewise.
10974 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
10975 (signbit<mode>2_dm2): Likewise.
10977 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10979 * config/rl78/rl78.md (anddi3): New define_expand.
10981 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10983 * config/rl78/rl78.md (umindi3): New define_expand.
10985 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10987 * config/rl78/rl78.md (smindi3): New define_expand.
10989 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10991 * config/rl78/rl78.md (smaxdi3): New define_expand.
10993 2018-01-22 Carl Love <cel@us.ibm.com>
10995 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
10996 LVX_V1TI): Add macro expansion.
10997 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
10998 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
10999 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
11000 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
11001 Change check to determine if the instruction is a byte reversing
11002 entry. Fix typo in comment.
11003 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
11004 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
11005 Add def_builtin calls for new builtins.
11006 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
11007 Add define_insn expansion.
11009 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
11011 * config/rl78/rl78.md (umaxdi3): New define_expand.
11013 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
11015 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
11016 for non-QImode registers.
11018 2018-01-22 Richard Biener <rguenther@suse.de>
11020 PR tree-optimization/83963
11021 * graphite-scop-detection.c (scop_detection::get_sese): Delay
11022 including the loop exit block.
11023 (scop_detection::merge_sese): Likewise.
11024 (scop_detection::add_scop): Do it here instead.
11026 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11028 * doc/sourcebuild.texi (arm_softfloat): Document.
11030 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
11033 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
11034 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
11035 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
11037 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
11038 David Edelsohn <dje.gcc@gmail.com>
11041 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
11042 Change "crset eq" to "crset 2".
11043 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
11044 (*call_indirect_aix<mode>_nospec): Likewise.
11045 (*call_value_indirect_aix<mode>_nospec): Likewise.
11046 (*call_indirect_elfv2<mode>_nospec): Likewise.
11047 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
11048 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
11049 change assembly output from . to $.
11050 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
11051 (indirect_jump<mode>_nospec): Change assembly output from . to $.
11052 (*tablejump<mode>_internal1_nospec): Likewise.
11054 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
11057 * config/sh/sh_optimize_sett_clrt.cc:
11058 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
11060 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
11062 PR tree-optimization/83940
11063 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
11064 offset_dt to vect_constant_def rather than vect_unknown_def_type.
11065 (vect_check_load_store_mask): Add a mask_dt_out parameter and
11066 use it to pass back the definition type.
11067 (vect_check_store_rhs): Likewise rhs_dt_out.
11068 (vect_build_gather_load_calls): Add a mask_dt argument and use
11069 it instead of a call to vect_is_simple_use.
11070 (vectorizable_store): Update calls to vect_check_load_store_mask
11071 and vect_check_store_rhs. Use the dt returned by the latter instead
11072 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
11073 instead of calls to vect_is_simple_use. Pass the scalar rather
11074 than the vector operand to vect_is_simple_use when handling
11075 second and subsequent copies of an rhs value.
11076 (vectorizable_load): Update calls to vect_check_load_store_mask
11077 and vect_build_gather_load_calls. Use the cached mask_dt and
11078 gs_info.offset_dt instead of calls to vect_is_simple_use.
11080 2018-01-20 Jakub Jelinek <jakub@redhat.com>
11082 PR middle-end/83945
11083 * tree-emutls.c: Include gimplify.h.
11084 (lower_emutls_2): New function.
11085 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
11086 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
11087 it before further processing.
11090 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
11091 UINTVAL (trueop1) instead of INTVAL (op1).
11093 2018-01-19 Jakub Jelinek <jakub@redhat.com>
11097 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
11098 INCOMING_FRAME_SP_OFFSET if not defined.
11099 (scan_trace): Add ENTRY argument. If true and
11100 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
11101 emit a note to adjust the CFA offset.
11102 (create_cfi_notes): Adjust scan_trace callers.
11103 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
11104 INCOMING_FRAME_SP_OFFSET in the CIE.
11105 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
11106 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
11108 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
11109 * doc/tm.texi: Regenerated.
11111 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
11113 PR rtl-optimization/83147
11114 * lra-constraints.c (remove_inheritance_pseudos): Use
11115 lra_substitute_pseudo_within_insn.
11117 2018-01-19 Tom de Vries <tom@codesourcery.com>
11118 Cesar Philippidis <cesar@codesourcery.com>
11121 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
11123 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
11126 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
11127 spaces for function labels.
11129 2018-01-19 Martin Liska <mliska@suse.cz>
11131 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
11132 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
11133 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
11134 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
11135 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
11136 (PRED_CONST_RETURN): Change from 69 to 65.
11137 (PRED_NULL_RETURN): Change from 91 to 71.
11138 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
11139 (PRED_LOOP_GUARD): Change from 66 to 73.
11141 2018-01-19 Martin Liska <mliska@suse.cz>
11143 * predict.c (predict_insn_def): Add new assert.
11144 (struct branch_predictor): Change type to signed integer.
11145 (test_prediction_value_range): Amend test to cover
11146 PROB_UNINITIALIZED.
11147 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
11148 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
11149 (PRED_LOOP_ITERATIONS_MAX): Likewise.
11150 (PRED_LOOP_IV_COMPARE): Likewise.
11151 * predict.h (PROB_UNINITIALIZED): Define new constant.
11153 2018-01-19 Martin Liska <mliska@suse.cz>
11155 * predict.c (dump_prediction): Add new format for
11156 analyze_brprob.py script which is enabled with -details
11158 * profile-count.h (precise_p): New function.
11160 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
11162 PR tree-optimization/83922
11163 * tree-vect-loop.c (vect_verify_full_masking): Return false if
11164 there are no statements that need masking.
11165 (vect_active_double_reduction_p): New function.
11166 (vect_analyze_loop_operations): Use it when handling phis that
11167 are not in the loop header.
11169 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
11171 PR tree-optimization/83914
11172 * tree-vect-loop.c (vectorizable_induction): Don't convert
11173 init_expr or apply the peeling adjustment for inductions
11174 that are nested within the vectorized loop.
11176 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11178 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
11181 2018-01-18 Jakub Jelinek <jakub@redhat.com>
11185 * function.h (gimplify_parameters): Add gimple_seq * argument.
11186 * function.c: Include gimple.h and options.h.
11187 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
11188 for the added local temporaries if needed.
11189 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
11190 if there are any parameter cleanups, wrap whole body into a
11191 try/finally with the cleanups.
11193 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
11196 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
11197 Use GET_MODE_CLASS for scalar floating point.
11199 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
11203 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
11204 Fix call of call_cgraph_insertion_hooks.
11206 2018-01-18 Martin Sebor <msebor@redhat.com>
11208 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
11210 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
11213 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
11216 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
11219 * common.opt: (-ffile-prefix-map): New option.
11220 * opts.c (common_handle_option): Defer it.
11221 * opts-global.c (handle_common_deferred_options): Handle it.
11222 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
11223 * file-prefix-map.h: New file.
11224 (remap_debug_filename, add_debug_prefix_map): ...here.
11225 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
11226 * final.c (debug_prefix_map, add_debug_prefix_map
11227 remap_debug_filename): Move to...
11228 * file-prefix-map.c: New file.
11229 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
11230 generalize, get rid of alloca(), use strrchr() instead of strchr().
11231 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
11232 Implement in terms of add_prefix_map().
11233 (remap_macro_filename, remap_debug_filename): Implement in term of
11235 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
11236 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
11237 * dbxout.c: Include file-prefix-map.h.
11238 * varasm.c: Likewise.
11239 * vmsdbgout.c: Likewise.
11240 * xcoffout.c: Likewise.
11241 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
11242 * doc/cppopts.texi (-fmacro-prefix-map): Document.
11243 * doc/invoke.texi (-ffile-prefix-map): Document.
11244 (-fdebug-prefix-map): Update description.
11246 2018-01-18 Martin Liska <mliska@suse.cz>
11248 * config/i386/i386.c (indirect_thunk_name): Document that also
11250 (output_indirect_thunk): Document why both instructions
11251 (pause and lfence) are generated.
11253 2018-01-18 Richard Biener <rguenther@suse.de>
11255 PR tree-optimization/83887
11256 * graphite-scop-detection.c
11257 (scop_detection::get_nearest_dom_with_single_entry): Remove.
11258 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
11259 (scop_detection::merge_sese): Re-implement with a flood-fill
11260 algorithm that properly finds a SESE region if it exists.
11262 2018-01-18 Jakub Jelinek <jakub@redhat.com>
11265 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
11266 pointer_diff optimizations use view_convert instead of convert.
11268 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
11270 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
11271 Generate different code for -mno-speculate-indirect-jumps.
11272 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
11273 (*call_indirect_aix<mode>): Disable for
11274 -mno-speculate-indirect-jumps.
11275 (*call_indirect_aix<mode>_nospec): New define_insn.
11276 (*call_value_indirect_aix<mode>): Disable for
11277 -mno-speculate-indirect-jumps.
11278 (*call_value_indirect_aix<mode>_nospec): New define_insn.
11279 (*sibcall_nonlocal_sysv<mode>): Generate different code for
11280 -mno-speculate-indirect-jumps.
11281 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
11283 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
11285 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
11286 long double type, set the flags for noting the default long double
11287 type, even if we don't pass or return a long double type.
11289 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
11292 * ipa-inline.c (flatten_function): Do not overwrite final inlining
11295 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
11297 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
11298 support for merge[hl].
11299 (fold_mergehl_helper): New helper function.
11300 (tree-vector-builder.h): New #include for tree_vector_builder usage.
11301 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
11302 (altivec_vmrglw_direct): Add xxmrglw insn.
11304 2018-01-17 Andrew Waterman <andrew@sifive.com>
11306 * config/riscv/riscv.c (riscv_conditional_register_usage): If
11307 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
11309 2018-01-17 David Malcolm <dmalcolm@redhat.com>
11312 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
11313 call the lto_location_cache before reading the
11314 DECL_SOURCE_LOCATION of the types.
11316 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
11317 Richard Sandiford <richard.sandiford@linaro.org>
11319 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
11320 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
11321 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
11322 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
11323 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
11325 * config/aarch64/constraints.md (aarch64_movti_operand):
11327 * config/aarch64/predicates.md (Uti): Add new constraint.
11329 2018-01-17 Carl Love <cel@us.ibm.com>
11331 * config/rs6000/vsx.md (define_expand xl_len_r,
11332 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
11333 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
11335 (define_expand, define_insn): Move the shift left from the
11336 define_insn to the define_expand for lxvl and stxvl instructions.
11337 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
11338 and XL_LEN_R definitions to PURE.
11340 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
11342 * config/i386/i386.c (indirect_thunk_name): Declare regno
11343 as unsigned int. Compare regno with INVALID_REGNUM.
11344 (output_indirect_thunk): Ditto.
11345 (output_indirect_thunk_function): Ditto.
11346 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
11347 in the call to output_indirect_thunk_function.
11349 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
11351 PR middle-end/83884
11352 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
11353 rather than the size of inner_type to determine the stack slot size
11354 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
11356 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
11359 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
11362 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
11364 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
11365 endian Linux systems to optionally enable multilibs for selecting
11366 the long double type if the user configured an explicit type.
11367 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
11368 have no long double multilibs if not defined.
11369 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
11370 warn if the user used -mabi={ieee,ibm}longdouble and we built
11371 multilibs for long double.
11372 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
11373 appropriate multilib option.
11374 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
11376 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
11377 for building long double multilibs.
11378 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
11380 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
11382 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
11385 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
11387 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
11390 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
11393 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
11396 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
11398 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
11399 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
11401 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
11403 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
11404 different rtl trees depending on TARGET_64BIT.
11405 (rs6000_gen_lvx): Likewise.
11407 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
11409 * config/visium/visium.md (nop): Tweak comment.
11410 (hazard_nop): Likewise.
11412 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
11414 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
11415 -mspeculate-indirect-jumps.
11416 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
11417 for -mno-speculate-indirect-jumps.
11418 (*call_indirect_elfv2<mode>_nospec): New define_insn.
11419 (*call_value_indirect_elfv2<mode>): Disable for
11420 -mno-speculate-indirect-jumps.
11421 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
11422 (indirect_jump): Emit different RTL for
11423 -mno-speculate-indirect-jumps.
11424 (*indirect_jump<mode>): Disable for
11425 -mno-speculate-indirect-jumps.
11426 (*indirect_jump<mode>_nospec): New define_insn.
11427 (tablejump): Emit different RTL for
11428 -mno-speculate-indirect-jumps.
11429 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
11430 (tablejumpsi_nospec): New define_expand.
11431 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
11432 (tablejumpdi_nospec): New define_expand.
11433 (*tablejump<mode>_internal1): Disable for
11434 -mno-speculate-indirect-jumps.
11435 (*tablejump<mode>_internal1_nospec): New define_insn.
11436 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
11439 2018-01-16 Artyom Skrobov tyomitch@gmail.com
11441 * caller-save.c (insert_save): Drop unnecessary parameter. All
11444 2018-01-16 Jakub Jelinek <jakub@redhat.com>
11445 Richard Biener <rguenth@suse.de>
11448 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
11449 return early, inline manually is_gimple_sizepos. Make sure if we
11450 call gimplify_expr we don't end up with a gimple constant.
11451 * tree.c (variably_modified_type_p): Don't return true for
11452 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
11453 * gimplify.h (is_gimple_sizepos): Remove.
11455 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
11457 PR tree-optimization/83857
11458 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
11459 vectorizable_live_operation for pure SLP statements.
11460 (vectorizable_live_operation): Handle PHIs.
11462 2018-01-16 Richard Biener <rguenther@suse.de>
11464 PR tree-optimization/83867
11465 * tree-vect-stmts.c (vect_transform_stmt): Precompute
11466 nested_in_vect_loop_p since the scalar stmt may get invalidated.
11468 2018-01-16 Jakub Jelinek <jakub@redhat.com>
11471 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
11472 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
11473 If off is not INTEGER_CST, issue a may not be aligned warning
11474 rather than isn't aligned. Use isn%'t rather than isn't.
11475 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
11477 <case MULT_EXPR>: Improve the case when bottom and one of the
11478 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
11479 operand, in that case check if the other operand is multiple of
11480 bottom divided by the INTEGER_CST operand.
11482 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
11485 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
11486 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
11487 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
11488 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
11489 * config/pa/pa.c (pa_function_arg_advance): Likewise.
11490 (pa_function_arg, pa_arg_partial_bytes): Likewise.
11491 (pa_function_arg_size): New function.
11493 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
11495 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
11496 in a separate statement.
11498 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
11500 PR tree-optimization/83847
11501 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
11502 group gathers and scatters.
11504 2018-01-16 Jakub Jelinek <jakub@redhat.com>
11506 PR rtl-optimization/86620
11507 * params.def (max-sched-ready-insns): Bump minimum value to 1.
11509 PR rtl-optimization/83213
11510 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
11511 to last if both are JUMP_INSNs.
11513 PR tree-optimization/83843
11514 * gimple-ssa-store-merging.c
11515 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
11516 store_immediate_info for bswap/nop orig_stores.
11518 2018-01-15 Andrew Waterman <andrew@sifive.com>
11520 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
11522 <UDIV>: Increase cost if !TARGET_DIV.
11524 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
11526 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
11527 (define_attr "cr_logical_3op"): New.
11528 (cceq_ior_compare): Adjust.
11529 (cceq_ior_compare_complement): Adjust.
11530 (*cceq_rev_compare): Adjust.
11531 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
11532 (is_cracked_insn): Adjust.
11533 (insn_must_be_first_in_group): Adjust.
11534 * config/rs6000/40x.md: Adjust.
11535 * config/rs6000/440.md: Adjust.
11536 * config/rs6000/476.md: Adjust.
11537 * config/rs6000/601.md: Adjust.
11538 * config/rs6000/603.md: Adjust.
11539 * config/rs6000/6xx.md: Adjust.
11540 * config/rs6000/7450.md: Adjust.
11541 * config/rs6000/7xx.md: Adjust.
11542 * config/rs6000/8540.md: Adjust.
11543 * config/rs6000/cell.md: Adjust.
11544 * config/rs6000/e300c2c3.md: Adjust.
11545 * config/rs6000/e500mc.md: Adjust.
11546 * config/rs6000/e500mc64.md: Adjust.
11547 * config/rs6000/e5500.md: Adjust.
11548 * config/rs6000/e6500.md: Adjust.
11549 * config/rs6000/mpc.md: Adjust.
11550 * config/rs6000/power4.md: Adjust.
11551 * config/rs6000/power5.md: Adjust.
11552 * config/rs6000/power6.md: Adjust.
11553 * config/rs6000/power7.md: Adjust.
11554 * config/rs6000/power8.md: Adjust.
11555 * config/rs6000/power9.md: Adjust.
11556 * config/rs6000/rs64.md: Adjust.
11557 * config/rs6000/titan.md: Adjust.
11559 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
11561 * config/i386/predicates.md (indirect_branch_operand): Rewrite
11562 ix86_indirect_branch_register logic.
11564 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
11566 * config/i386/constraints.md (Bs): Update
11567 ix86_indirect_branch_register check. Don't check
11568 ix86_indirect_branch_register with GOT_memory_operand.
11570 * config/i386/predicates.md (GOT_memory_operand): Don't check
11571 ix86_indirect_branch_register here.
11572 (GOT32_symbol_operand): Likewise.
11574 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
11576 * config/i386/predicates.md (constant_call_address_operand):
11577 Rewrite ix86_indirect_branch_register logic.
11578 (sibcall_insn_operand): Likewise.
11580 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
11582 * config/i386/constraints.md (Bs): Replace
11583 ix86_indirect_branch_thunk_register with
11584 ix86_indirect_branch_register.
11586 * config/i386/i386.md (indirect_jump): Likewise.
11587 (tablejump): Likewise.
11588 (*sibcall_memory): Likewise.
11589 (*sibcall_value_memory): Likewise.
11590 Peepholes of indirect call and jump via memory: Likewise.
11591 * config/i386/i386.opt: Likewise.
11592 * config/i386/predicates.md (indirect_branch_operand): Likewise.
11593 (GOT_memory_operand): Likewise.
11594 (call_insn_operand): Likewise.
11595 (sibcall_insn_operand): Likewise.
11596 (GOT32_symbol_operand): Likewise.
11598 2018-01-15 Jakub Jelinek <jakub@redhat.com>
11600 PR middle-end/83837
11601 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
11602 type rather than type addr's type points to.
11603 (expand_omp_atomic_mutex): Likewise.
11604 (expand_omp_atomic): Likewise.
11606 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
11609 * config/i386/i386.c (output_indirect_thunk_function): Use
11610 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
11611 for __x86_return_thunk.
11613 2018-01-15 Richard Biener <rguenther@suse.de>
11615 PR middle-end/83850
11616 * expmed.c (extract_bit_field_1): Fix typo.
11618 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11621 * config/arm/iterators.md (VF): New mode iterator.
11622 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
11623 Remove integer-related logic from pattern.
11624 (neon_vabd<mode>_3): Likewise.
11626 2018-01-15 Jakub Jelinek <jakub@redhat.com>
11628 PR middle-end/82694
11629 * common.opt (fstrict-overflow): No longer an alias.
11630 (fwrapv-pointer): New option.
11631 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
11632 also for pointer types based on flag_wrapv_pointer.
11633 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
11634 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
11635 opts->x_flag_wrapv got set.
11636 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
11637 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
11638 POINTER_TYPE_OVERFLOW_UNDEFINED.
11639 * match.pd: Likewise in address comparison pattern.
11640 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
11642 2018-01-15 Richard Biener <rguenther@suse.de>
11645 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
11646 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
11647 Reset type names to their identifier if their TYPE_DECL doesn't
11648 have linkage (and thus is used for ODR and devirt).
11649 (save_debug_info_for_decl): Remove.
11650 (save_debug_info_for_type): Likewise.
11651 (add_tree_to_fld_list): Adjust.
11652 * tree-pretty-print.c (dump_generic_node): Make dumping of
11653 type names more robust.
11655 2018-01-15 Richard Biener <rguenther@suse.de>
11657 * BASE-VER: Bump to 8.0.1.
11659 2018-01-14 Martin Sebor <msebor@redhat.com>
11662 * builtins.c (check_access): Avoid warning when the no-warning bit
11665 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
11667 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
11668 * ira-color (allocno_hard_regs_compare): Likewise.
11670 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
11673 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
11674 Use .pushsection/.popsection.
11676 2018-01-14 Martin Sebor <msebor@redhat.com>
11679 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
11681 2018-01-14 Jakub Jelinek <jakub@redhat.com>
11683 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
11684 entry from extra_headers.
11685 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
11686 extra_headers, make the list bitwise identical to the i?86-*-* one.
11688 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
11690 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
11691 -mcmodel=large with -mindirect-branch=thunk,
11692 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
11693 -mfunction-return=thunk-extern.
11694 * doc/invoke.texi: Document -mcmodel=large is incompatible with
11695 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
11696 -mfunction-return=thunk and -mfunction-return=thunk-extern.
11698 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
11700 * config/i386/i386.c (print_reg): Print the name of the full
11701 integer register without '%'.
11702 (ix86_print_operand): Handle 'V'.
11703 * doc/extend.texi: Document 'V' modifier.
11705 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
11707 * config/i386/constraints.md (Bs): Disallow memory operand for
11708 -mindirect-branch-register.
11710 * config/i386/predicates.md (indirect_branch_operand): Likewise.
11711 (GOT_memory_operand): Likewise.
11712 (call_insn_operand): Likewise.
11713 (sibcall_insn_operand): Likewise.
11714 (GOT32_symbol_operand): Likewise.
11715 * config/i386/i386.md (indirect_jump): Call convert_memory_address
11716 for -mindirect-branch-register.
11717 (tablejump): Likewise.
11718 (*sibcall_memory): Likewise.
11719 (*sibcall_value_memory): Likewise.
11720 Disallow peepholes of indirect call and jump via memory for
11721 -mindirect-branch-register.
11722 (*call_pop): Replace m with Bw.
11723 (*call_value_pop): Likewise.
11724 (*sibcall_pop_memory): Replace m with Bs.
11725 * config/i386/i386.opt (mindirect-branch-register): New option.
11726 * doc/invoke.texi: Document -mindirect-branch-register option.
11728 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
11730 * config/i386/i386-protos.h (ix86_output_function_return): New.
11731 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
11732 set function_return_type.
11733 (indirect_thunk_name): Add ret_p to indicate thunk for function
11735 (output_indirect_thunk_function): Pass false to
11736 indirect_thunk_name.
11737 (ix86_output_indirect_branch_via_reg): Likewise.
11738 (ix86_output_indirect_branch_via_push): Likewise.
11739 (output_indirect_thunk_function): Create alias for function
11740 return thunk if regno < 0.
11741 (ix86_output_function_return): New function.
11742 (ix86_handle_fndecl_attribute): Handle function_return.
11743 (ix86_attribute_table): Add function_return.
11744 * config/i386/i386.h (machine_function): Add
11745 function_return_type.
11746 * config/i386/i386.md (simple_return_internal): Use
11747 ix86_output_function_return.
11748 (simple_return_internal_long): Likewise.
11749 * config/i386/i386.opt (mfunction-return=): New option.
11750 (indirect_branch): Mention -mfunction-return=.
11751 * doc/extend.texi: Document function_return function attribute.
11752 * doc/invoke.texi: Document -mfunction-return= option.
11754 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
11756 * config/i386/i386-opts.h (indirect_branch): New.
11757 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
11758 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
11759 with local indirect jump when converting indirect call and jump.
11760 (ix86_set_indirect_branch_type): New.
11761 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
11762 (indirectlabelno): New.
11763 (indirect_thunk_needed): Likewise.
11764 (indirect_thunk_bnd_needed): Likewise.
11765 (indirect_thunks_used): Likewise.
11766 (indirect_thunks_bnd_used): Likewise.
11767 (INDIRECT_LABEL): Likewise.
11768 (indirect_thunk_name): Likewise.
11769 (output_indirect_thunk): Likewise.
11770 (output_indirect_thunk_function): Likewise.
11771 (ix86_output_indirect_branch_via_reg): Likewise.
11772 (ix86_output_indirect_branch_via_push): Likewise.
11773 (ix86_output_indirect_branch): Likewise.
11774 (ix86_output_indirect_jmp): Likewise.
11775 (ix86_code_end): Call output_indirect_thunk_function if needed.
11776 (ix86_output_call_insn): Call ix86_output_indirect_branch if
11778 (ix86_handle_fndecl_attribute): Handle indirect_branch.
11779 (ix86_attribute_table): Add indirect_branch.
11780 * config/i386/i386.h (machine_function): Add indirect_branch_type
11781 and has_local_indirect_jump.
11782 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
11784 (tablejump): Likewise.
11785 (*indirect_jump): Use ix86_output_indirect_jmp.
11786 (*tablejump_1): Likewise.
11787 (simple_return_indirect_internal): Likewise.
11788 * config/i386/i386.opt (mindirect-branch=): New option.
11789 (indirect_branch): New.
11792 (thunk-inline): Likewise.
11793 (thunk-extern): Likewise.
11794 * doc/extend.texi: Document indirect_branch function attribute.
11795 * doc/invoke.texi: Document -mindirect-branch= option.
11797 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
11800 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
11802 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
11804 * ipa-inline.c (want_inline_small_function_p): Return false if
11805 inlining has already failed with CIF_FINAL_ERROR.
11806 (update_caller_keys): Call want_inline_small_function_p before
11808 (update_callee_keys): Likewise.
11810 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
11812 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
11814 (rs6000_quadword_masked_address_p): Likewise.
11815 (quad_aligned_load_p): Likewise.
11816 (quad_aligned_store_p): Likewise.
11817 (const_load_sequence_p): Add comment to describe the outer-most loop.
11818 (mimic_memory_attributes_and_flags): New function.
11819 (rs6000_gen_stvx): Likewise.
11820 (replace_swapped_aligned_store): Likewise.
11821 (rs6000_gen_lvx): Likewise.
11822 (replace_swapped_aligned_load): Likewise.
11823 (replace_swapped_load_constant): Capitalize argument name in
11824 comment describing this function.
11825 (rs6000_analyze_swaps): Add a third pass to search for vector loads
11826 and stores that access quad-word aligned addresses and replace
11827 with stvx or lvx instructions when appropriate.
11828 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
11829 New function prototype.
11830 (rs6000_quadword_masked_address_p): Likewise.
11831 (rs6000_gen_lvx): Likewise.
11832 (rs6000_gen_stvx): Likewise.
11833 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
11834 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
11835 when memory address is aligned.
11836 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
11837 this split to select lvx instruction when memory address is aligned.
11838 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
11839 instruction when memory address is aligned.
11840 (*vsx_le_perm_load_v16qi): Likewise.
11841 (four unnamed splitters): Modify to select the stvx instruction
11842 when memory is aligned.
11844 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
11846 * predict.c (determine_unlikely_bbs): Handle correctly BBs
11847 which appears in the queue multiple times.
11849 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11850 Alan Hayward <alan.hayward@arm.com>
11851 David Sherwood <david.sherwood@arm.com>
11853 * tree-vectorizer.h (vec_lower_bound): New structure.
11854 (_loop_vec_info): Add check_nonzero and lower_bounds.
11855 (LOOP_VINFO_CHECK_NONZERO): New macro.
11856 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
11857 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
11858 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
11859 fields. Make seg_len the distance travelled, not including the
11861 (dr_direction_indicator): Declare.
11862 (dr_zero_step_indicator): Likewise.
11863 (dr_known_forward_stride_p): Likewise.
11864 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
11866 (runtime_alias_check_p): Allow runtime alias checks with
11868 (operator ==): Compare access_size and align.
11869 (prune_runtime_alias_test_list): Rework for new distinction between
11870 the access_size and seg_len.
11871 (create_intersect_range_checks_index): Likewise. Cope with polynomial
11873 (get_segment_min_max): New function.
11874 (create_intersect_range_checks): Use it.
11875 (dr_step_indicator): New function.
11876 (dr_direction_indicator): Likewise.
11877 (dr_zero_step_indicator): Likewise.
11878 (dr_known_forward_stride_p): Likewise.
11879 * tree-loop-distribution.c (data_ref_segment_size): Return
11880 DR_STEP * (niters - 1).
11881 (compute_alias_check_pairs): Update call to the dr_with_seg_len
11883 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
11884 (vect_preserves_scalar_order_p): New function, split out from...
11885 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
11886 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
11887 (vect_vfa_access_size): New function.
11888 (vect_vfa_align): Likewise.
11889 (vect_compile_time_alias): Take access_size_a and access_b arguments.
11890 (dump_lower_bound): New function.
11891 (vect_check_lower_bound): Likewise.
11892 (vect_small_gap_p): Likewise.
11893 (vectorizable_with_step_bound_p): Likewise.
11894 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
11895 depencies if the vectorization factor is 1. Convert the checks
11896 for nonzero steps into checks on the bounds of DR_STEP. Try using
11897 a bunds check for variable steps if the minimum required step is
11898 relatively small. Update calls to the dr_with_seg_len
11899 constructor and to vect_compile_time_alias.
11900 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
11902 (vect_loop_versioning): Call it.
11903 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
11905 (vect_estimate_min_profitable_iters): Account for any bounds checks.
11907 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11908 Alan Hayward <alan.hayward@arm.com>
11909 David Sherwood <david.sherwood@arm.com>
11911 * doc/sourcebuild.texi (vect_scatter_store): Document.
11912 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
11914 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
11916 * genopinit.c (main): Add supports_vec_scatter_store and
11917 supports_vec_scatter_store_cached to target_optabs.
11918 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
11919 IFN_MASK_SCATTER_STORE.
11920 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
11922 * internal-fn.h (internal_store_fn_p): Declare.
11923 (internal_fn_stored_value_index): Likewise.
11924 * internal-fn.c (scatter_store_direct): New macro.
11925 (expand_scatter_store_optab_fn): New function.
11926 (direct_scatter_store_optab_supported_p): New macro.
11927 (internal_store_fn_p): New function.
11928 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
11929 IFN_MASK_SCATTER_STORE.
11930 (internal_fn_mask_index): Likewise.
11931 (internal_fn_stored_value_index): New function.
11932 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
11933 for scatter stores.
11934 * optabs-query.h (supports_vec_scatter_store_p): Declare.
11935 * optabs-query.c (supports_vec_scatter_store_p): New function.
11936 * tree-vectorizer.h (vect_get_store_rhs): Declare.
11937 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
11938 true for scatter stores.
11939 (vect_gather_scatter_fn_p): Handle scatter stores too.
11940 (vect_check_gather_scatter): Consider using scatter stores if
11941 supports_vec_scatter_store_p.
11942 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
11943 scatter stores too.
11944 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
11945 internal_fn_stored_value_index.
11946 (check_load_store_masking): Handle scatter stores too.
11947 (vect_get_store_rhs): Make public.
11948 (vectorizable_call): Use internal_store_fn_p.
11949 (vectorizable_store): Handle scatter store internal functions.
11950 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
11951 when deciding whether the end of the group has been reached.
11952 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
11953 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
11954 (mask_scatter_store<mode>): New insns.
11956 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11957 Alan Hayward <alan.hayward@arm.com>
11958 David Sherwood <david.sherwood@arm.com>
11960 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
11961 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
11962 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
11964 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
11965 Use vect_truncate_gather_scatter_offset if we can't treat the
11966 operation as a normal gather load or scatter store.
11967 (get_group_load_store_type): Take the gather_scatter_info
11968 as argument. Try using a gather load or scatter store for
11969 single-element groups.
11970 (get_load_store_type): Update calls to get_group_load_store_type
11971 and vect_use_strided_gather_scatters_p.
11973 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11974 Alan Hayward <alan.hayward@arm.com>
11975 David Sherwood <david.sherwood@arm.com>
11977 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
11978 optional tree argument.
11979 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
11981 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
11982 but continue to use the current value as a fallback.
11983 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
11984 to compare the updates.
11985 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
11986 (get_load_store_type): Use it when handling a strided access.
11987 (vect_get_strided_load_store_ops): New function.
11988 (vect_get_data_ptr_increment): Likewise.
11989 (vectorizable_load): Handle strided gather loads. Always pass
11990 a step to vect_create_data_ref_ptr and bump_vector_ptr.
11992 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11993 Alan Hayward <alan.hayward@arm.com>
11994 David Sherwood <david.sherwood@arm.com>
11996 * doc/md.texi (gather_load@var{m}): Document.
11997 (mask_gather_load@var{m}): Likewise.
11998 * genopinit.c (main): Add supports_vec_gather_load and
11999 supports_vec_gather_load_cached to target_optabs.
12000 * optabs-tree.c (init_tree_optimization_optabs): Use
12001 ggc_cleared_alloc to allocate target_optabs.
12002 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
12003 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
12005 * internal-fn.h (internal_load_fn_p): Declare.
12006 (internal_gather_scatter_fn_p): Likewise.
12007 (internal_fn_mask_index): Likewise.
12008 (internal_gather_scatter_fn_supported_p): Likewise.
12009 * internal-fn.c (gather_load_direct): New macro.
12010 (expand_gather_load_optab_fn): New function.
12011 (direct_gather_load_optab_supported_p): New macro.
12012 (direct_internal_fn_optab): New function.
12013 (internal_load_fn_p): Likewise.
12014 (internal_gather_scatter_fn_p): Likewise.
12015 (internal_fn_mask_index): Likewise.
12016 (internal_gather_scatter_fn_supported_p): Likewise.
12017 * optabs-query.c (supports_at_least_one_mode_p): New function.
12018 (supports_vec_gather_load_p): Likewise.
12019 * optabs-query.h (supports_vec_gather_load_p): Declare.
12020 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
12021 and memory_type field.
12022 (NUM_PATTERNS): Bump to 15.
12023 * tree-vect-data-refs.c: Include internal-fn.h.
12024 (vect_gather_scatter_fn_p): New function.
12025 (vect_describe_gather_scatter_call): Likewise.
12026 (vect_check_gather_scatter): Try using internal functions for
12027 gather loads. Recognize existing calls to a gather load function.
12028 (vect_analyze_data_refs): Consider using gather loads if
12029 supports_vec_gather_load_p.
12030 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
12031 (vect_get_gather_scatter_offset_type): Likewise.
12032 (vect_convert_mask_for_vectype): Likewise.
12033 (vect_add_conversion_to_patterm): Likewise.
12034 (vect_try_gather_scatter_pattern): Likewise.
12035 (vect_recog_gather_scatter_pattern): New pattern recognizer.
12036 (vect_vect_recog_func_ptrs): Add it.
12037 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
12038 internal_fn_mask_index and internal_gather_scatter_fn_p.
12039 (check_load_store_masking): Take the gather_scatter_info as an
12040 argument and handle gather loads.
12041 (vect_get_gather_scatter_ops): New function.
12042 (vectorizable_call): Check internal_load_fn_p.
12043 (vectorizable_load): Likewise. Handle gather load internal
12045 (vectorizable_store): Update call to check_load_store_masking.
12046 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
12047 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
12048 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
12049 (aarch64_gather_scale_operand_d): New predicates.
12050 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
12051 (mask_gather_load<mode>): New insns.
12053 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12054 Alan Hayward <alan.hayward@arm.com>
12055 David Sherwood <david.sherwood@arm.com>
12057 * optabs.def (fold_left_plus_optab): New optab.
12058 * doc/md.texi (fold_left_plus_@var{m}): Document.
12059 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
12060 * internal-fn.c (fold_left_direct): Define.
12061 (expand_fold_left_optab_fn): Likewise.
12062 (direct_fold_left_optab_supported_p): Likewise.
12063 * fold-const-call.c (fold_const_fold_left): New function.
12064 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
12065 * tree-parloops.c (valid_reduction_p): New function.
12066 (gather_scalar_reductions): Use it.
12067 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
12068 (vect_finish_replace_stmt): Declare.
12069 * tree-vect-loop.c (fold_left_reduction_fn): New function.
12070 (needs_fold_left_reduction_p): New function, split out from...
12071 (vect_is_simple_reduction): ...here. Accept reductions that
12072 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
12073 (vect_force_simple_reduction): Also store the reduction type in
12074 the assignment's STMT_VINFO_REDUC_TYPE.
12075 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
12076 (merge_with_identity): New function.
12077 (vect_expand_fold_left): Likewise.
12078 (vectorize_fold_left_reduction): Likewise.
12079 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
12080 scalar phi in place for it. Check for target support and reject
12081 cases that would reassociate the operation. Defer the transform
12082 phase to vectorize_fold_left_reduction.
12083 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
12084 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
12085 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
12087 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12089 * tree-if-conv.c (predicate_mem_writes): Remove redundant
12090 call to ifc_temp_var.
12092 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12093 Alan Hayward <alan.hayward@arm.com>
12094 David Sherwood <david.sherwood@arm.com>
12096 * target.def (legitimize_address_displacement): Take the original
12097 offset as a poly_int.
12098 * targhooks.h (default_legitimize_address_displacement): Update
12100 * targhooks.c (default_legitimize_address_displacement): Likewise.
12101 * doc/tm.texi: Regenerate.
12102 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
12103 as an argument, moving assert of ad->disp == ad->disp_term to...
12104 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
12105 Try calling targetm.legitimize_address_displacement before expanding
12106 the address rather than afterwards, and adjust for the new interface.
12107 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
12108 Match the new hook interface. Handle SVE addresses.
12109 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
12110 new hook interface.
12112 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12114 * Makefile.in (OBJS): Add early-remat.o.
12115 * target.def (select_early_remat_modes): New hook.
12116 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
12117 * doc/tm.texi: Regenerate.
12118 * targhooks.h (default_select_early_remat_modes): Declare.
12119 * targhooks.c (default_select_early_remat_modes): New function.
12120 * timevar.def (TV_EARLY_REMAT): New timevar.
12121 * passes.def (pass_early_remat): New pass.
12122 * tree-pass.h (make_pass_early_remat): Declare.
12123 * early-remat.c: New file.
12124 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
12126 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
12128 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12129 Alan Hayward <alan.hayward@arm.com>
12130 David Sherwood <david.sherwood@arm.com>
12132 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
12133 vfm1 with a bound_epilog parameter.
12134 (vect_do_peeling): Update calls accordingly, and move the prologue
12135 call earlier in the function. Treat the base bound_epilog as 0 for
12136 fully-masked loops and retain vf - 1 for other loops. Add 1 to
12137 this base when peeling for gaps.
12138 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
12139 with fully-masked loops.
12140 (vect_estimate_min_profitable_iters): Handle the single peeled
12141 iteration in that case.
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 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
12148 single-element interleaving even if the size is not a power of 2.
12149 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
12150 accesses for single-element interleaving if the group size is
12153 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12154 Alan Hayward <alan.hayward@arm.com>
12155 David Sherwood <david.sherwood@arm.com>
12157 * doc/md.texi (fold_extract_last_@var{m}): Document.
12158 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
12159 * optabs.def (fold_extract_last_optab): New optab.
12160 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
12161 * internal-fn.c (fold_extract_direct): New macro.
12162 (expand_fold_extract_optab_fn): Likewise.
12163 (direct_fold_extract_optab_supported_p): Likewise.
12164 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
12165 * tree-vect-loop.c (vect_model_reduction_cost): Handle
12166 EXTRACT_LAST_REDUCTION.
12167 (get_initial_def_for_reduction): Do not create an initial vector
12168 for EXTRACT_LAST_REDUCTION reductions.
12169 (vectorizable_reduction): Leave the scalar phi in place for
12170 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
12171 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
12172 epilogue code for EXTRACT_LAST_REDUCTION and defer the
12173 transform phase to vectorizable_condition.
12174 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
12176 (vect_finish_stmt_generation): ...here.
12177 (vect_finish_replace_stmt): New function.
12178 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
12179 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
12181 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
12183 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12184 Alan Hayward <alan.hayward@arm.com>
12185 David Sherwood <david.sherwood@arm.com>
12187 * doc/md.texi (extract_last_@var{m}): Document.
12188 * optabs.def (extract_last_optab): New optab.
12189 * internal-fn.def (EXTRACT_LAST): New internal function.
12190 * internal-fn.c (cond_unary_direct): New macro.
12191 (expand_cond_unary_optab_fn): Likewise.
12192 (direct_cond_unary_optab_supported_p): Likewise.
12193 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
12194 loops using EXTRACT_LAST.
12195 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
12196 (extract_last_<mode>): ...this optab.
12197 (vec_extract<mode><Vel>): Update accordingly.
12199 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12200 Alan Hayward <alan.hayward@arm.com>
12201 David Sherwood <david.sherwood@arm.com>
12203 * target.def (empty_mask_is_expensive): New hook.
12204 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
12205 * doc/tm.texi: Regenerate.
12206 * targhooks.h (default_empty_mask_is_expensive): Declare.
12207 * targhooks.c (default_empty_mask_is_expensive): New function.
12208 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
12209 if the target says that empty masks are expensive.
12210 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
12212 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
12214 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12215 Alan Hayward <alan.hayward@arm.com>
12216 David Sherwood <david.sherwood@arm.com>
12218 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
12219 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
12220 (vect_use_loop_mask_for_alignment_p): New function.
12221 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
12222 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
12223 niters_skip argument. Make sure that the first niters_skip elements
12224 of the first iteration are inactive.
12225 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
12226 Update call to vect_set_loop_masks_directly.
12227 (get_misalign_in_elems): New function, split out from...
12228 (vect_gen_prolog_loop_niters): ...here.
12229 (vect_update_init_of_dr): Take a code argument that specifies whether
12230 the adjustment should be added or subtracted.
12231 (vect_update_init_of_drs): Likewise.
12232 (vect_prepare_for_masked_peels): New function.
12233 (vect_do_peeling): Skip prologue peeling if we're using a mask
12234 instead. Update call to vect_update_inits_of_drs.
12235 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
12237 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
12238 alignment. Do not include the number of peeled iterations in
12239 the minimum threshold in that case.
12240 (vectorizable_induction): Adjust the start value down by
12241 LOOP_VINFO_MASK_SKIP_NITERS iterations.
12242 (vect_transform_loop): Call vect_prepare_for_masked_peels.
12243 Take the number of skipped iterations into account when calculating
12245 * tree-vect-stmts.c (vect_gen_while_not): New function.
12247 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12248 Alan Hayward <alan.hayward@arm.com>
12249 David Sherwood <david.sherwood@arm.com>
12251 * doc/sourcebuild.texi (vect_fully_masked): Document.
12252 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
12253 default value to 0.
12254 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
12256 (vect_analyze_loop_2): ...here. Don't check the vectorization
12257 factor against the number of loop iterations if the loop is
12260 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12261 Alan Hayward <alan.hayward@arm.com>
12262 David Sherwood <david.sherwood@arm.com>
12264 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
12265 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
12266 (dump_groups): Update accordingly.
12267 (iv_use::mem_type): New member variable.
12268 (address_p): New function.
12269 (record_use): Add a mem_type argument and initialize the new
12271 (record_group_use): Add a mem_type argument. Use address_p.
12272 Remove obsolete null checks of base_object. Update call to record_use.
12273 (find_interesting_uses_op): Update call to record_group_use.
12274 (find_interesting_uses_cond): Likewise.
12275 (find_interesting_uses_address): Likewise.
12276 (get_mem_type_for_internal_fn): New function.
12277 (find_address_like_use): Likewise.
12278 (find_interesting_uses_stmt): Try find_address_like_use before
12279 calling find_interesting_uses_op.
12280 (addr_offset_valid_p): Use the iv mem_type field as the type
12281 of the addressed memory.
12282 (add_autoinc_candidates): Likewise.
12283 (get_address_cost): Likewise.
12284 (split_small_address_groups_p): Use address_p.
12285 (split_address_groups): Likewise.
12286 (add_iv_candidate_for_use): Likewise.
12287 (autoinc_possible_for_pair): Likewise.
12288 (rewrite_groups): Likewise.
12289 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
12290 (determine_group_iv_cost): Update after split of USE_ADDRESS.
12291 (get_alias_ptr_type_for_ptr_address): New function.
12292 (rewrite_use_address): Rewrite address uses in calls that were
12293 identified by find_address_like_use.
12295 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12296 Alan Hayward <alan.hayward@arm.com>
12297 David Sherwood <david.sherwood@arm.com>
12299 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
12301 * gimple-expr.h (is_gimple_addressable: Likewise.
12302 * gimple-expr.c (is_gimple_address): Likewise.
12303 * internal-fn.c (expand_call_mem_ref): New function.
12304 (expand_mask_load_optab_fn): Use it.
12305 (expand_mask_store_optab_fn): Likewise.
12307 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12308 Alan Hayward <alan.hayward@arm.com>
12309 David Sherwood <david.sherwood@arm.com>
12311 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
12312 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
12313 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
12314 (cond_umax@var{mode}): Document.
12315 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
12316 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
12317 (cond_umin_optab, cond_umax_optab): New optabs.
12318 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
12319 (COND_IOR, COND_XOR): New internal functions.
12320 * internal-fn.h (get_conditional_internal_fn): Declare.
12321 * internal-fn.c (cond_binary_direct): New macro.
12322 (expand_cond_binary_optab_fn): Likewise.
12323 (direct_cond_binary_optab_supported_p): Likewise.
12324 (get_conditional_internal_fn): New function.
12325 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
12326 Cope with reduction statements that are vectorized as calls rather
12328 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
12329 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
12330 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
12331 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
12332 (UNSPEC_COND_EOR): New unspecs.
12333 (optab): Add mappings for them.
12334 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
12335 (sve_int_op, sve_fp_op): New int attributes.
12337 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12338 Alan Hayward <alan.hayward@arm.com>
12339 David Sherwood <david.sherwood@arm.com>
12341 * optabs.def (while_ult_optab): New optab.
12342 * doc/md.texi (while_ult@var{m}@var{n}): Document.
12343 * internal-fn.def (WHILE_ULT): New internal function.
12344 * internal-fn.h (direct_internal_fn_supported_p): New override
12345 that takes two types as argument.
12346 * internal-fn.c (while_direct): New macro.
12347 (expand_while_optab_fn): New function.
12348 (convert_optab_supported_p): Likewise.
12349 (direct_while_optab_supported_p): New macro.
12350 * wide-int.h (wi::udiv_ceil): New function.
12351 * tree-vectorizer.h (rgroup_masks): New structure.
12352 (vec_loop_masks): New typedef.
12353 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
12354 and fully_masked_p.
12355 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
12356 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
12357 (vect_max_vf): New function.
12358 (slpeel_make_loop_iterate_ntimes): Delete.
12359 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
12360 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
12361 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
12362 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
12363 internal-fn.h, stor-layout.h and optabs-query.h.
12364 (vect_set_loop_mask): New function.
12365 (add_preheader_seq): Likewise.
12366 (add_header_seq): Likewise.
12367 (interleave_supported_p): Likewise.
12368 (vect_maybe_permute_loop_masks): Likewise.
12369 (vect_set_loop_masks_directly): Likewise.
12370 (vect_set_loop_condition_masked): Likewise.
12371 (vect_set_loop_condition_unmasked): New function, split out from
12372 slpeel_make_loop_iterate_ntimes.
12373 (slpeel_make_loop_iterate_ntimes): Rename to..
12374 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
12375 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
12376 (vect_do_peeling): Update call accordingly.
12377 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
12379 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
12380 mask_compare_type, can_fully_mask_p and fully_masked_p.
12381 (release_vec_loop_masks): New function.
12382 (_loop_vec_info): Use it to free the loop masks.
12383 (can_produce_all_loop_masks_p): New function.
12384 (vect_get_max_nscalars_per_iter): Likewise.
12385 (vect_verify_full_masking): Likewise.
12386 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
12387 retries, and free the mask rgroups before retrying. Check loop-wide
12388 reasons for disallowing fully-masked loops. Make the final decision
12389 about whether use a fully-masked loop or not.
12390 (vect_estimate_min_profitable_iters): Do not assume that peeling
12391 for the number of iterations will be needed for fully-masked loops.
12392 (vectorizable_reduction): Disable fully-masked loops.
12393 (vectorizable_live_operation): Likewise.
12394 (vect_halve_mask_nunits): New function.
12395 (vect_double_mask_nunits): Likewise.
12396 (vect_record_loop_mask): Likewise.
12397 (vect_get_loop_mask): Likewise.
12398 (vect_transform_loop): Handle the case in which the final loop
12399 iteration might handle a partial vector. Call vect_set_loop_condition
12400 instead of slpeel_make_loop_iterate_ntimes.
12401 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
12402 (check_load_store_masking): New function.
12403 (prepare_load_store_mask): Likewise.
12404 (vectorizable_store): Handle fully-masked loops.
12405 (vectorizable_load): Likewise.
12406 (supportable_widening_operation): Use vect_halve_mask_nunits for
12408 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
12409 (vect_gen_while): New function.
12410 * config/aarch64/aarch64.md (umax<mode>3): New expander.
12411 (aarch64_uqdec<mode>): New insn.
12413 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12414 Alan Hayward <alan.hayward@arm.com>
12415 David Sherwood <david.sherwood@arm.com>
12417 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
12418 (reduc_xor_scal_optab): New optabs.
12419 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
12420 (reduc_xor_scal_@var{m}): Document.
12421 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
12422 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
12423 internal functions.
12424 * fold-const-call.c (fold_const_call): Handle them.
12425 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
12426 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
12427 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
12428 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
12429 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
12430 (UNSPEC_XORV): New unspecs.
12431 (optab): Add entries for them.
12432 (BITWISEV): New int iterator.
12433 (bit_reduc_op): New int attributes.
12435 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12436 Alan Hayward <alan.hayward@arm.com>
12437 David Sherwood <david.sherwood@arm.com>
12439 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
12440 * internal-fn.def (VEC_SHL_INSERT): New internal function.
12441 * optabs.def (vec_shl_insert_optab): New optab.
12442 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
12443 (duplicate_and_interleave): Likewise.
12444 * tree-vect-loop.c: Include internal-fn.h.
12445 (neutral_op_for_slp_reduction): New function, split out from
12446 get_initial_defs_for_reduction.
12447 (get_initial_def_for_reduction): Handle option 2 for variable-length
12448 vectors by loading the neutral value into a vector and then shifting
12449 the initial value into element 0.
12450 (get_initial_defs_for_reduction): Replace the code argument with
12451 the neutral value calculated by neutral_op_for_slp_reduction.
12452 Use gimple_build_vector for constant-length vectors.
12453 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
12454 but the first group_size elements have a neutral value.
12455 Use duplicate_and_interleave otherwise.
12456 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
12457 Update call to get_initial_defs_for_reduction. Handle SLP
12458 reductions for variable-length vectors by creating one vector
12459 result for each scalar result, with the elements associated
12460 with other scalar results stubbed out with the neutral value.
12461 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
12462 Require IFN_VEC_SHL_INSERT for double reductions on
12463 variable-length vectors, or SLP reductions that have
12464 a neutral value. Require can_duplicate_and_interleave_p
12465 support for variable-length unchained SLP reductions if there
12466 is no neutral value, such as for MIN/MAX reductions. Also require
12467 the number of vector elements to be a multiple of the number of
12468 SLP statements when doing variable-length unchained SLP reductions.
12469 Update call to vect_create_epilog_for_reduction.
12470 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
12471 and remove initial values.
12472 (duplicate_and_interleave): Make public.
12473 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
12474 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
12476 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12477 Alan Hayward <alan.hayward@arm.com>
12478 David Sherwood <david.sherwood@arm.com>
12480 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
12481 (can_duplicate_and_interleave_p): New function.
12482 (vect_get_and_check_slp_defs): Take the vector of statements
12483 rather than just the current one. Remove excess parentheses.
12484 Restriction rejectinon of vect_constant_def and vect_external_def
12485 for variable-length vectors to boolean types, or types for which
12486 can_duplicate_and_interleave_p is false.
12487 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
12488 (duplicate_and_interleave): New function.
12489 (vect_get_constant_vectors): Use gimple_build_vector for
12490 constant-length vectors and suitable variable-length constant
12491 vectors. Use duplicate_and_interleave for other variable-length
12492 vectors. Don't defer the update when inserting new statements.
12494 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12495 Alan Hayward <alan.hayward@arm.com>
12496 David Sherwood <david.sherwood@arm.com>
12498 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
12499 min_profitable_iters doesn't go negative.
12501 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12502 Alan Hayward <alan.hayward@arm.com>
12503 David Sherwood <david.sherwood@arm.com>
12505 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
12506 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
12507 * optabs.def (vec_mask_load_lanes_optab): New optab.
12508 (vec_mask_store_lanes_optab): Likewise.
12509 * internal-fn.def (MASK_LOAD_LANES): New internal function.
12510 (MASK_STORE_LANES): Likewise.
12511 * internal-fn.c (mask_load_lanes_direct): New macro.
12512 (mask_store_lanes_direct): Likewise.
12513 (expand_mask_load_optab_fn): Handle masked operations.
12514 (expand_mask_load_lanes_optab_fn): New macro.
12515 (expand_mask_store_optab_fn): Handle masked operations.
12516 (expand_mask_store_lanes_optab_fn): New macro.
12517 (direct_mask_load_lanes_optab_supported_p): Likewise.
12518 (direct_mask_store_lanes_optab_supported_p): Likewise.
12519 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
12521 (vect_load_lanes_supported): Likewise.
12522 * tree-vect-data-refs.c (strip_conversion): New function.
12523 (can_group_stmts_p): Likewise.
12524 (vect_analyze_data_ref_accesses): Use it instead of checking
12525 for a pair of assignments.
12526 (vect_store_lanes_supported): Take a masked_p parameter.
12527 (vect_load_lanes_supported): Likewise.
12528 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
12529 vect_store_lanes_supported and vect_load_lanes_supported.
12530 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
12531 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
12532 parameter. Don't allow gaps for masked accesses.
12533 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
12534 and vect_load_lanes_supported.
12535 (get_load_store_type): Take a masked_p parameter and update
12536 call to get_group_load_store_type.
12537 (vectorizable_store): Update call to get_load_store_type.
12538 Handle IFN_MASK_STORE_LANES.
12539 (vectorizable_load): Update call to get_load_store_type.
12540 Handle IFN_MASK_LOAD_LANES.
12542 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12543 Alan Hayward <alan.hayward@arm.com>
12544 David Sherwood <david.sherwood@arm.com>
12546 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
12548 * config/aarch64/aarch64-protos.h
12549 (aarch64_sve_struct_memory_operand_p): Declare.
12550 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
12551 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
12552 (VPRED, vpred): Handle SVE structure modes.
12553 * config/aarch64/constraints.md (Utx): New constraint.
12554 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
12555 (aarch64_sve_struct_nonimmediate_operand): New predicates.
12556 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
12557 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
12558 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
12559 structure modes. Split into pieces after RA.
12560 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
12561 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
12563 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
12564 SVE structure modes.
12565 (aarch64_classify_address): Likewise.
12566 (sizetochar): Move earlier in file.
12567 (aarch64_print_operand): Handle SVE register lists.
12568 (aarch64_array_mode): New function.
12569 (aarch64_sve_struct_memory_operand_p): Likewise.
12570 (TARGET_ARRAY_MODE): Redefine.
12572 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12573 Alan Hayward <alan.hayward@arm.com>
12574 David Sherwood <david.sherwood@arm.com>
12576 * target.def (array_mode): New target hook.
12577 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
12578 * doc/tm.texi: Regenerate.
12579 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
12580 * hooks.c (hook_optmode_mode_uhwi_none): New function.
12581 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
12582 targetm.array_mode.
12583 * stor-layout.c (mode_for_array): Likewise. Support polynomial
12586 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12587 Alan Hayward <alan.hayward@arm.com>
12588 David Sherwood <david.sherwood@arm.com>
12590 * fold-const.c (fold_binary_loc): Check the argument types
12591 rather than the result type when testing for a vector operation.
12593 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12595 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
12596 * doc/tm.texi: Regenerate.
12598 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12599 Alan Hayward <alan.hayward@arm.com>
12600 David Sherwood <david.sherwood@arm.com>
12602 * doc/invoke.texi (-msve-vector-bits=): Document new option.
12603 (sve): Document new AArch64 extension.
12604 * doc/md.texi (w): Extend the description of the AArch64
12605 constraint to include SVE vectors.
12606 (Upl, Upa): Document new AArch64 predicate constraints.
12607 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
12609 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
12610 (msve-vector-bits=): New option.
12611 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
12612 SVE when these are disabled.
12613 (sve): New extension.
12614 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
12615 modes. Adjust their number of units based on aarch64_sve_vg.
12616 (MAX_BITSIZE_MODE_ANY_MODE): Define.
12617 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
12618 aarch64_addr_query_type.
12619 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
12620 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
12621 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
12622 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
12623 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
12624 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
12625 (aarch64_simd_imm_zero_p): Delete.
12626 (aarch64_check_zero_based_sve_index_immediate): Declare.
12627 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
12628 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
12629 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
12630 (aarch64_sve_float_mul_immediate_p): Likewise.
12631 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
12632 rather than an rtx.
12633 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
12634 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
12635 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
12636 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
12637 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
12638 (aarch64_regmode_natural_size): Likewise.
12639 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
12640 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
12642 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
12643 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
12644 for VG and the SVE predicate registers.
12645 (V_ALIASES): Add a "z"-prefixed alias.
12646 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
12647 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
12648 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
12649 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
12650 (REG_CLASS_NAMES): Add entries for them.
12651 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
12652 and the predicate registers.
12653 (aarch64_sve_vg): Declare.
12654 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
12655 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
12656 (REGMODE_NATURAL_SIZE): Define.
12657 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
12659 * config/aarch64/aarch64.c: Include cfgrtl.h.
12660 (simd_immediate_info): Add a constructor for series vectors,
12661 and an associated step field.
12662 (aarch64_sve_vg): New variable.
12663 (aarch64_dbx_register_number): Handle VG and the predicate registers.
12664 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
12665 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
12666 (VEC_ANY_DATA, VEC_STRUCT): New constants.
12667 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
12668 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
12669 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
12670 (aarch64_get_mask_mode): New functions.
12671 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
12672 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
12673 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
12674 predicate modes and predicate registers. Explicitly restrict
12675 GPRs to modes of 16 bytes or smaller. Only allow FP registers
12676 to store a vector mode if it is recognized by
12677 aarch64_classify_vector_mode.
12678 (aarch64_regmode_natural_size): New function.
12679 (aarch64_hard_regno_caller_save_mode): Return the original mode
12681 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
12682 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
12683 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
12684 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
12686 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
12687 does not overlap dest if the function is frame-related. Handle
12689 (aarch64_split_add_offset): New function.
12690 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
12691 them aarch64_add_offset.
12692 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
12693 and update call to aarch64_sub_sp.
12694 (aarch64_add_cfa_expression): New function.
12695 (aarch64_expand_prologue): Pass extra temporary registers to the
12696 functions above. Handle the case in which we need to emit new
12697 DW_CFA_expressions for registers that were originally saved
12698 relative to the stack pointer, but now have to be expressed
12699 relative to the frame pointer.
12700 (aarch64_output_mi_thunk): Pass extra temporary registers to the
12702 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
12703 IP0 and IP1 values for SVE frames.
12704 (aarch64_expand_vec_series): New function.
12705 (aarch64_expand_sve_widened_duplicate): Likewise.
12706 (aarch64_expand_sve_const_vector): Likewise.
12707 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
12708 Handle SVE constants. Use emit_move_insn to move a force_const_mem
12709 into the register, rather than emitting a SET directly.
12710 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
12711 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
12712 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
12713 (offset_9bit_signed_scaled_p): New functions.
12714 (aarch64_replicate_bitmask_imm): New function.
12715 (aarch64_bitmask_imm): Use it.
12716 (aarch64_cannot_force_const_mem): Reject expressions involving
12717 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
12718 (aarch64_classify_index): Handle SVE indices, by requiring
12719 a plain register index with a scale that matches the element size.
12720 (aarch64_classify_address): Handle SVE addresses. Assert that
12721 the mode of the address is VOIDmode or an integer mode.
12722 Update call to aarch64_classify_symbol.
12723 (aarch64_classify_symbolic_expression): Update call to
12724 aarch64_classify_symbol.
12725 (aarch64_const_vec_all_in_range_p): New function.
12726 (aarch64_print_vector_float_operand): Likewise.
12727 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
12728 "vN" for FP registers with SVE modes. Handle (const ...) vectors
12729 and the FP immediates 1.0 and 0.5.
12730 (aarch64_print_address_internal): Handle SVE addresses.
12731 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
12732 (aarch64_regno_regclass): Handle predicate registers.
12733 (aarch64_secondary_reload): Handle big-endian reloads of SVE
12735 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
12736 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
12737 (aarch64_convert_sve_vector_bits): New function.
12738 (aarch64_override_options): Use it to handle -msve-vector-bits=.
12739 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
12740 rather than an rtx.
12741 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
12742 Handle SVE vector and predicate modes. Accept VL-based constants
12743 that need only one temporary register, and VL offsets that require
12744 no temporary registers.
12745 (aarch64_conditional_register_usage): Mark the predicate registers
12746 as fixed if SVE isn't available.
12747 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
12748 Return true for SVE vector and predicate modes.
12749 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
12750 rather than an unsigned int. Handle SVE modes.
12751 (aarch64_preferred_simd_mode): Update call accordingly. Handle
12753 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
12755 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
12756 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
12757 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
12758 (aarch64_sve_float_mul_immediate_p): New functions.
12759 (aarch64_sve_valid_immediate): New function.
12760 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
12761 Explicitly reject structure modes. Check for INDEX constants.
12762 Handle PTRUE and PFALSE constants.
12763 (aarch64_check_zero_based_sve_index_immediate): New function.
12764 (aarch64_simd_imm_zero_p): Delete.
12765 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
12766 vector modes. Accept constants in the range of CNT[BHWD].
12767 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
12768 ask for an Advanced SIMD mode.
12769 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
12770 (aarch64_simd_vector_alignment): Handle SVE predicates.
12771 (aarch64_vectorize_preferred_vector_alignment): New function.
12772 (aarch64_simd_vector_alignment_reachable): Use it instead of
12774 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
12775 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
12777 (MAX_VECT_LEN): Delete.
12778 (expand_vec_perm_d): Add a vec_flags field.
12779 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
12780 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
12781 (aarch64_evpc_ext): Don't apply a big-endian lane correction
12783 (aarch64_evpc_rev): Rename to...
12784 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
12785 (aarch64_evpc_rev_global): New function.
12786 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
12787 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
12789 (aarch64_evpc_sve_tbl): New function.
12790 (aarch64_expand_vec_perm_const_1): Update after rename of
12791 aarch64_evpc_rev. Handle SVE permutes too, trying
12792 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
12793 than aarch64_evpc_tbl.
12794 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
12795 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
12796 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
12797 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
12798 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
12799 (aarch64_expand_sve_vcond): New functions.
12800 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
12801 of aarch64_vector_mode_p.
12802 (aarch64_dwarf_poly_indeterminate_value): New function.
12803 (aarch64_compute_pressure_classes): Likewise.
12804 (aarch64_can_change_mode_class): Likewise.
12805 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
12806 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
12807 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
12808 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
12809 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
12810 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
12811 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
12812 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
12814 (Dn, Dl, Dr): Accept const as well as const_vector.
12815 (Dz): Likewise. Compare against CONST0_RTX.
12816 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
12817 of "vector" where appropriate.
12818 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
12819 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
12820 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
12821 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
12822 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
12823 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
12824 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
12825 (v_int_equiv): Extend to SVE modes.
12826 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
12828 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
12829 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
12830 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
12831 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
12832 (SVE_COND_FP_CMP): New int iterators.
12833 (perm_hilo): Handle the new unpack unspecs.
12834 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
12836 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
12837 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
12838 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
12839 (aarch64_equality_operator, aarch64_constant_vector_operand)
12840 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
12841 (aarch64_sve_nonimmediate_operand): Likewise.
12842 (aarch64_sve_general_operand): Likewise.
12843 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
12844 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
12845 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
12846 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
12847 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
12848 (aarch64_sve_float_arith_immediate): Likewise.
12849 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
12850 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
12851 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
12852 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
12853 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
12854 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
12855 (aarch64_sve_float_arith_operand): Likewise.
12856 (aarch64_sve_float_arith_with_sub_operand): Likewise.
12857 (aarch64_sve_float_mul_operand): Likewise.
12858 (aarch64_sve_vec_perm_operand): Likewise.
12859 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
12860 (aarch64_mov_operand): Accept const_poly_int and const_vector.
12861 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
12862 as well as const_vector.
12863 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
12864 in file. Use CONST0_RTX and CONSTM1_RTX.
12865 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
12866 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
12867 Use aarch64_simd_imm_zero.
12868 * config/aarch64/aarch64-sve.md: New file.
12869 * config/aarch64/aarch64.md: Include it.
12870 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
12871 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
12872 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
12873 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
12874 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
12875 (sve): New attribute.
12876 (enabled): Disable instructions with the sve attribute unless
12878 (movqi, movhi): Pass CONST_POLY_INT operaneds through
12879 aarch64_expand_mov_immediate.
12880 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
12881 CNT[BHSD] immediates.
12882 (movti): Split CONST_POLY_INT moves into two halves.
12883 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
12884 Split additions that need a temporary here if the destination
12885 is the stack pointer.
12886 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
12887 (*add<mode>3_poly_1): New instruction.
12888 (set_clobber_cc): New expander.
12890 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12892 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
12893 parameter and use it instead of GET_MODE_SIZE (innermode). Use
12894 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
12895 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
12896 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
12897 Change innermode from fixed_mode_size to machine_mode.
12898 (simplify_subreg): Update call accordingly. Handle a constant-sized
12899 subreg of a variable-length CONST_VECTOR.
12901 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12902 Alan Hayward <alan.hayward@arm.com>
12903 David Sherwood <david.sherwood@arm.com>
12905 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
12906 (add_offset_to_base): New function, split out from...
12907 (create_mem_ref): ...here. When handling a scale other than 1,
12908 check first whether the address is valid without the offset.
12909 Add it into the base if so, leaving the index and scale as-is.
12911 2018-01-12 Jakub Jelinek <jakub@redhat.com>
12914 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
12915 fold_for_warn before checking if arg2 is INTEGER_CST.
12917 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
12919 * config/rs6000/predicates.md (load_multiple_operation): Delete.
12920 (store_multiple_operation): Delete.
12921 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
12922 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
12923 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
12924 guarded by TARGET_STRING.
12925 (rs6000_output_load_multiple): Delete.
12926 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
12927 OPTION_MASK_STRING / TARGET_STRING handling.
12928 (print_operand) <'N', 'O'>: Add comment that these are unused now.
12929 (const rs6000_opt_masks) <"string">: Change mask to 0.
12930 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
12931 (MASK_STRING): Delete.
12932 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
12934 (load_multiple): Delete.
12941 (store_multiple): Delete.
12948 (movmemsi_8reg): Delete.
12949 (corresponding unnamed define_insn): Delete.
12950 (movmemsi_6reg): Delete.
12951 (corresponding unnamed define_insn): Delete.
12952 (movmemsi_4reg): Delete.
12953 (corresponding unnamed define_insn): Delete.
12954 (movmemsi_2reg): Delete.
12955 (corresponding unnamed define_insn): Delete.
12956 (movmemsi_1reg): Delete.
12957 (corresponding unnamed define_insn): Delete.
12958 * config/rs6000/rs6000.opt (mno-string): New.
12959 (mstring): Replace by deprecation warning stub.
12960 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
12962 2018-01-12 Jakub Jelinek <jakub@redhat.com>
12964 * regrename.c (regrename_do_replace): If replacing the same
12965 reg multiple times, try to reuse last created gen_raw_REG.
12968 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
12969 main to workaround a bug in GDB.
12971 2018-01-12 Tom de Vries <tom@codesourcery.com>
12974 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
12976 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
12978 PR rtl-optimization/80481
12979 * ira-color.c (get_cap_member): New function.
12980 (allocnos_conflict_by_live_ranges_p): Use it.
12981 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
12982 (setup_slot_coalesced_allocno_live_ranges): Ditto.
12984 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
12987 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
12988 (*saddl_se_1): Ditto.
12989 (*ssubsi_1): Ditto.
12990 (*ssubl_se_1): Ditto.
12992 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
12994 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
12995 rather than wi::to_widest for DR_INITs.
12996 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
12997 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
12998 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
13000 (vect_analyze_group_access_1): Note that here.
13002 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
13004 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
13005 polynomial type sizes.
13007 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
13009 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
13010 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
13011 (gimple_add_tmp_var): Likewise.
13013 2018-01-12 Martin Liska <mliska@suse.cz>
13015 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
13016 (gimple_alloc_sizes): Likewise.
13017 (dump_gimple_statistics): Use PRIu64 in printf format.
13018 * gimple.h: Change uint64_t to int.
13020 2018-01-12 Martin Liska <mliska@suse.cz>
13022 * tree-core.h: Use uint64_t instead of int.
13023 * tree.c (tree_node_counts): Likewise.
13024 (tree_node_sizes): Likewise.
13025 (dump_tree_statistics): Use PRIu64 in printf format.
13027 2018-01-12 Martin Liska <mliska@suse.cz>
13029 * Makefile.in: As qsort_chk is implemented in vec.c, add
13030 vec.o to linkage of gencfn-macros.
13031 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
13032 passing the info to record_node_allocation_statistics.
13033 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
13035 * ggc-common.c (struct ggc_usage): Add operator== and use
13036 it in operator< and compare function.
13037 * mem-stats.h (struct mem_usage): Likewise.
13038 * vec.c (struct vec_usage): Remove operator< and compare
13039 function. Can be simply inherited.
13041 2018-01-12 Martin Jambor <mjambor@suse.cz>
13044 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
13045 * tree-ssa-math-opts.c: Include domwalk.h.
13046 (convert_mult_to_fma_1): New function.
13047 (fma_transformation_info): New type.
13048 (fma_deferring_state): Likewise.
13049 (cancel_fma_deferring): New function.
13050 (result_of_phi): Likewise.
13051 (last_fma_candidate_feeds_initial_phi): Likewise.
13052 (convert_mult_to_fma): Added deferring logic, split actual
13053 transformation to convert_mult_to_fma_1.
13054 (math_opts_dom_walker): New type.
13055 (math_opts_dom_walker::after_dom_children): New method, body moved
13056 here from pass_optimize_widening_mul::execute, added deferring logic
13058 (pass_optimize_widening_mul::execute): Moved most of code to
13059 math_opts_dom_walker::after_dom_children.
13060 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
13061 * config/i386/i386.c (ix86_option_override_internal): Added
13062 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
13064 2018-01-12 Richard Biener <rguenther@suse.de>
13067 * dwarf2out.c (gen_variable_die): Do not reset old_die for
13068 inline instance vars.
13070 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
13073 * config/rx/rx.c (rx_is_restricted_memory_address):
13074 Handle SUBREG case.
13076 2018-01-12 Richard Biener <rguenther@suse.de>
13078 PR tree-optimization/80846
13079 * target.def (split_reduction): New target hook.
13080 * targhooks.c (default_split_reduction): New function.
13081 * targhooks.h (default_split_reduction): Declare.
13082 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
13083 target requests first reduce vectors by combining low and high
13085 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
13086 (get_vectype_for_scalar_type_and_size): Export.
13087 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
13088 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
13089 * doc/tm.texi: Regenerate.
13090 * config/i386/i386.c (ix86_split_reduction): Implement
13091 TARGET_VECTORIZE_SPLIT_REDUCTION.
13093 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
13096 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
13097 in PIC mode except for TARGET_VXWORKS_RTP.
13098 * config/sparc/sparc.c: Include cfgrtl.h.
13099 (TARGET_INIT_PIC_REG): Define.
13100 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
13101 (sparc_pic_register_p): New predicate.
13102 (sparc_legitimate_address_p): Use it.
13103 (sparc_legitimize_pic_address): Likewise.
13104 (sparc_delegitimize_address): Likewise.
13105 (sparc_mode_dependent_address_p): Likewise.
13106 (gen_load_pcrel_sym): Remove 4th parameter.
13107 (load_got_register): Adjust call to above. Remove obsolete stuff.
13108 (sparc_expand_prologue): Do not call load_got_register here.
13109 (sparc_flat_expand_prologue): Likewise.
13110 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
13111 (sparc_use_pseudo_pic_reg): New function.
13112 (sparc_init_pic_reg): Likewise.
13113 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
13114 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
13116 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
13118 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
13119 Add item for branch_cost.
13121 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
13123 PR rtl-optimization/83565
13124 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
13125 not extend the result to a larger mode for rotate operations.
13126 (num_sign_bit_copies1): Likewise.
13128 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13131 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
13133 Use values-Xc.o for -pedantic.
13134 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
13136 2018-01-12 Martin Liska <mliska@suse.cz>
13139 * ipa-devirt.c (final_warning_record::grow_type_warnings):
13141 (possible_polymorphic_call_targets): Use it.
13142 (ipa_devirt): Likewise.
13144 2018-01-12 Martin Liska <mliska@suse.cz>
13146 * profile-count.h (enum profile_quality): Use 0 as invalid
13147 enum value of profile_quality.
13149 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
13151 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
13152 -mext-string options.
13154 2018-01-12 Richard Biener <rguenther@suse.de>
13156 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
13157 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
13158 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
13160 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
13162 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
13164 * configure.ac (--with-long-double-format): Add support for the
13165 configuration option to change the default long double format on
13167 * config.gcc (powerpc*-linux*-*): Likewise.
13168 * configure: Regenerate.
13169 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
13170 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
13171 used without modification.
13173 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13175 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
13176 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
13177 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
13178 MISC_BUILTIN_SPEC_BARRIER.
13179 (rs6000_init_builtins): Likewise.
13180 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
13182 (speculation_barrier): New define_insn.
13183 * doc/extend.texi: Document __builtin_speculation_barrier.
13185 2018-01-11 Jakub Jelinek <jakub@redhat.com>
13188 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
13189 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
13190 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
13192 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
13193 integral modes instead of "ss" and "sd".
13194 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
13195 vectors with 32-bit and 64-bit elements.
13196 (vecdupssescalarmodesuffix): New mode attribute.
13197 (vec_dup<mode>): Use it.
13199 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
13202 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
13203 frame if argument is passed on stack.
13205 2018-01-11 Jakub Jelinek <jakub@redhat.com>
13208 * ree.c (combine_reaching_defs): Optimize also
13209 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
13210 reg2=any_extend(exp); reg1=reg2;, formatting fix.
13212 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
13214 PR middle-end/83189
13215 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
13217 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
13219 PR middle-end/83718
13220 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
13221 after they are computed.
13223 2018-01-11 Bin Cheng <bin.cheng@arm.com>
13225 PR tree-optimization/83695
13226 * gimple-loop-linterchange.cc
13227 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
13228 reset cached scev information after interchange.
13229 (pass_linterchange::execute): Remove call to scev_reset_htab.
13231 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13233 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
13234 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
13235 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
13236 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
13237 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
13238 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
13239 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
13240 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
13241 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
13242 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
13243 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
13244 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
13245 (V_lane_reg): Likewise.
13246 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
13248 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
13249 (vfmal_lane_low<mode>_intrinsic,
13250 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
13251 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
13252 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
13253 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
13254 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
13255 vfmsl_lane_high<mode>_intrinsic): New define_insns.
13257 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13259 * config/arm/arm-cpus.in (fp16fml): New feature.
13260 (ALL_SIMD): Add fp16fml.
13261 (armv8.2-a): Add fp16fml as an option.
13262 (armv8.3-a): Likewise.
13263 (armv8.4-a): Add fp16fml as part of fp16.
13264 * config/arm/arm.h (TARGET_FP16FML): Define.
13265 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
13267 * config/arm/arm-modes.def (V2HF): Define.
13268 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
13269 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
13270 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
13271 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
13272 vfmsl_low, vfmsl_high): New set of builtins.
13273 * config/arm/iterators.md (PLUSMINUS): New code iterator.
13274 (vfml_op): New code attribute.
13275 (VFMLHALVES): New int iterator.
13276 (VFML, VFMLSEL): New mode attributes.
13277 (V_reg): Define mapping for V2HF.
13278 (V_hi, V_lo): New mode attributes.
13279 (VF_constraint): Likewise.
13280 (vfml_half, vfml_half_selector): New int attributes.
13281 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
13283 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
13284 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
13286 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
13287 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
13288 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
13289 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
13291 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
13292 Document new effective target and option set.
13294 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13296 * config/arm/arm-cpus.in (armv8_4): New feature.
13297 (ARMv8_4a): New fgroup.
13298 (armv8.4-a): New arch.
13299 * config/arm/arm-tables.opt: Regenerate.
13300 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
13301 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
13302 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
13303 Add matching rules for -march=armv8.4-a and extensions.
13304 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
13306 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
13309 * config/rx/rx.md (BW): New mode attribute.
13310 (sync_lock_test_and_setsi): Add mode suffix to insn output.
13312 2018-01-11 Richard Biener <rguenther@suse.de>
13314 PR tree-optimization/83435
13315 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
13316 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
13317 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
13319 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
13320 Alan Hayward <alan.hayward@arm.com>
13321 David Sherwood <david.sherwood@arm.com>
13323 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
13325 (aarch64_classify_address): Initialize it. Track polynomial offsets.
13326 (aarch64_print_address_internal): Use it to check for a zero offset.
13328 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
13329 Alan Hayward <alan.hayward@arm.com>
13330 David Sherwood <david.sherwood@arm.com>
13332 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
13333 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
13334 Return a poly_int64 rather than a HOST_WIDE_INT.
13335 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
13336 rather than a HOST_WIDE_INT.
13337 * config/aarch64/aarch64.h (aarch64_frame): Protect with
13338 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
13339 hard_fp_offset, frame_size, initial_adjust, callee_offset and
13340 final_offset from HOST_WIDE_INT to poly_int64.
13341 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
13342 to_constant when getting the number of units in an Advanced SIMD
13344 (aarch64_builtin_vectorized_function): Check for a constant number
13346 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
13348 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
13349 attribute instead of GET_MODE_NUNITS.
13350 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
13351 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
13352 GET_MODE_SIZE for fixed-size registers.
13353 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
13354 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
13355 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
13356 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
13357 (aarch64_print_operand, aarch64_print_address_internal)
13358 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
13359 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
13360 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
13361 Handle polynomial GET_MODE_SIZE.
13362 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
13363 wider than SImode without modification.
13364 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
13365 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
13366 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
13367 passing and returning SVE modes.
13368 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
13369 rather than GEN_INT.
13370 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
13371 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
13372 (aarch64_allocate_and_probe_stack_space): Likewise.
13373 (aarch64_layout_frame): Cope with polynomial offsets.
13374 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
13375 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
13376 polynomial offsets.
13377 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
13378 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
13379 poly_int64 rather than a HOST_WIDE_INT.
13380 (aarch64_get_separate_components, aarch64_process_components)
13381 (aarch64_expand_prologue, aarch64_expand_epilogue)
13382 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
13383 (aarch64_anchor_offset): New function, split out from...
13384 (aarch64_legitimize_address): ...here.
13385 (aarch64_builtin_vectorization_cost): Handle polynomial
13386 TYPE_VECTOR_SUBPARTS.
13387 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
13389 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
13390 number of elements from the PARALLEL rather than the mode.
13391 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
13392 rather than GET_MODE_BITSIZE.
13393 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
13394 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
13395 (aarch64_expand_vec_perm_const_1): Handle polynomial
13396 d->perm.length () and d->perm elements.
13397 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
13398 Apply to_constant to d->perm elements.
13399 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
13400 polynomial CONST_VECTOR_NUNITS.
13401 (aarch64_move_pointer): Take amount as a poly_int64 rather
13403 (aarch64_progress_pointer): Avoid temporary variable.
13404 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
13405 the mode attribute instead of GET_MODE.
13407 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
13408 Alan Hayward <alan.hayward@arm.com>
13409 David Sherwood <david.sherwood@arm.com>
13411 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
13412 x exists before using it.
13413 (aarch64_add_constant_internal): Rename to...
13414 (aarch64_add_offset_1): ...this. Replace regnum with separate
13415 src and dest rtxes. Handle the case in which they're different,
13416 including when the offset is zero. Replace scratchreg with an rtx.
13417 Use 2 additions if there is no spare register into which we can
13418 move a 16-bit constant.
13419 (aarch64_add_constant): Delete.
13420 (aarch64_add_offset): Replace reg with separate src and dest
13421 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
13422 Use aarch64_add_offset_1.
13423 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
13424 an rtx rather than an int. Take the delta as a poly_int64
13425 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
13426 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
13427 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
13428 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
13429 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
13430 and aarch64_add_sp.
13431 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
13432 aarch64_add_constant.
13434 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
13436 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
13437 Use scalar_float_mode.
13439 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
13441 * config/aarch64/aarch64-simd.md
13442 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
13443 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
13444 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
13445 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
13446 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
13447 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
13448 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
13449 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
13450 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
13451 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
13453 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13456 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
13457 targ_options->x_arm_arch_string is non NULL.
13459 2018-01-11 Tamar Christina <tamar.christina@arm.com>
13461 * config/aarch64/aarch64.h
13462 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
13464 2018-01-11 Sudakshina Das <sudi.das@arm.com>
13467 * expmed.c (emit_store_flag_force): Swap if const op0
13468 and change VOIDmode to mode of op0.
13470 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
13472 PR rtl-optimization/83761
13473 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
13474 than bytes to mode_for_size.
13476 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
13478 PR middle-end/83189
13479 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
13480 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
13483 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
13485 PR middle-end/83575
13486 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
13487 when in layout mode.
13488 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
13489 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
13492 2018-01-10 Michael Collison <michael.collison@arm.com>
13494 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
13495 * config/aarch64/aarch64-option-extension.def: Add
13496 AARCH64_OPT_EXTENSION of 'fp16fml'.
13497 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
13498 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
13499 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
13500 * config/aarch64/constraints.md (Ui7): New constraint.
13501 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
13502 (VFMLA_SEL_W): Ditto.
13505 (VFMLA16_LOW): New int iterator.
13506 (VFMLA16_HIGH): Ditto.
13507 (UNSPEC_FMLAL): New unspec.
13508 (UNSPEC_FMLSL): Ditto.
13509 (UNSPEC_FMLAL2): Ditto.
13510 (UNSPEC_FMLSL2): Ditto.
13511 (f16mac): New code attribute.
13512 * config/aarch64/aarch64-simd-builtins.def
13513 (aarch64_fmlal_lowv2sf): Ditto.
13514 (aarch64_fmlsl_lowv2sf): Ditto.
13515 (aarch64_fmlalq_lowv4sf): Ditto.
13516 (aarch64_fmlslq_lowv4sf): Ditto.
13517 (aarch64_fmlal_highv2sf): Ditto.
13518 (aarch64_fmlsl_highv2sf): Ditto.
13519 (aarch64_fmlalq_highv4sf): Ditto.
13520 (aarch64_fmlslq_highv4sf): Ditto.
13521 (aarch64_fmlal_lane_lowv2sf): Ditto.
13522 (aarch64_fmlsl_lane_lowv2sf): Ditto.
13523 (aarch64_fmlal_laneq_lowv2sf): Ditto.
13524 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
13525 (aarch64_fmlalq_lane_lowv4sf): Ditto.
13526 (aarch64_fmlsl_lane_lowv4sf): Ditto.
13527 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
13528 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
13529 (aarch64_fmlal_lane_highv2sf): Ditto.
13530 (aarch64_fmlsl_lane_highv2sf): Ditto.
13531 (aarch64_fmlal_laneq_highv2sf): Ditto.
13532 (aarch64_fmlsl_laneq_highv2sf): Ditto.
13533 (aarch64_fmlalq_lane_highv4sf): Ditto.
13534 (aarch64_fmlsl_lane_highv4sf): Ditto.
13535 (aarch64_fmlalq_laneq_highv4sf): Ditto.
13536 (aarch64_fmlsl_laneq_highv4sf): Ditto.
13537 * config/aarch64/aarch64-simd.md:
13538 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
13539 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
13540 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
13541 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
13542 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
13543 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
13544 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
13545 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
13546 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
13547 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
13548 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
13549 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
13550 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
13551 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
13552 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
13553 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
13554 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
13555 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
13556 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
13557 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
13558 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
13559 (vfmlsl_low_u32): Ditto.
13560 (vfmlalq_low_u32): Ditto.
13561 (vfmlslq_low_u32): Ditto.
13562 (vfmlal_high_u32): Ditto.
13563 (vfmlsl_high_u32): Ditto.
13564 (vfmlalq_high_u32): Ditto.
13565 (vfmlslq_high_u32): Ditto.
13566 (vfmlal_lane_low_u32): Ditto.
13567 (vfmlsl_lane_low_u32): Ditto.
13568 (vfmlal_laneq_low_u32): Ditto.
13569 (vfmlsl_laneq_low_u32): Ditto.
13570 (vfmlalq_lane_low_u32): Ditto.
13571 (vfmlslq_lane_low_u32): Ditto.
13572 (vfmlalq_laneq_low_u32): Ditto.
13573 (vfmlslq_laneq_low_u32): Ditto.
13574 (vfmlal_lane_high_u32): Ditto.
13575 (vfmlsl_lane_high_u32): Ditto.
13576 (vfmlal_laneq_high_u32): Ditto.
13577 (vfmlsl_laneq_high_u32): Ditto.
13578 (vfmlalq_lane_high_u32): Ditto.
13579 (vfmlslq_lane_high_u32): Ditto.
13580 (vfmlalq_laneq_high_u32): Ditto.
13581 (vfmlslq_laneq_high_u32): Ditto.
13582 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
13583 (AARCH64_FL_FOR_ARCH8_4): New.
13584 (AARCH64_ISA_F16FML): New ISA flag.
13585 (TARGET_F16FML): New feature flag for fp16fml.
13586 (doc/invoke.texi): Document new fp16fml option.
13588 2018-01-10 Michael Collison <michael.collison@arm.com>
13590 * config/aarch64/aarch64-builtins.c:
13591 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
13592 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
13593 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
13594 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
13595 (AARCH64_ISA_SHA3): New ISA flag.
13596 (TARGET_SHA3): New feature flag for sha3.
13597 * config/aarch64/iterators.md (sha512_op): New int attribute.
13598 (CRYPTO_SHA512): New int iterator.
13599 (UNSPEC_SHA512H): New unspec.
13600 (UNSPEC_SHA512H2): Ditto.
13601 (UNSPEC_SHA512SU0): Ditto.
13602 (UNSPEC_SHA512SU1): Ditto.
13603 * config/aarch64/aarch64-simd-builtins.def
13604 (aarch64_crypto_sha512hqv2di): New builtin.
13605 (aarch64_crypto_sha512h2qv2di): Ditto.
13606 (aarch64_crypto_sha512su0qv2di): Ditto.
13607 (aarch64_crypto_sha512su1qv2di): Ditto.
13608 (aarch64_eor3qv8hi): Ditto.
13609 (aarch64_rax1qv2di): Ditto.
13610 (aarch64_xarqv2di): Ditto.
13611 (aarch64_bcaxqv8hi): Ditto.
13612 * config/aarch64/aarch64-simd.md:
13613 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
13614 (aarch64_crypto_sha512su0qv2di): Ditto.
13615 (aarch64_crypto_sha512su1qv2di): Ditto.
13616 (aarch64_eor3qv8hi): Ditto.
13617 (aarch64_rax1qv2di): Ditto.
13618 (aarch64_xarqv2di): Ditto.
13619 (aarch64_bcaxqv8hi): Ditto.
13620 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
13621 (vsha512h2q_u64): Ditto.
13622 (vsha512su0q_u64): Ditto.
13623 (vsha512su1q_u64): Ditto.
13624 (veor3q_u16): Ditto.
13625 (vrax1q_u64): Ditto.
13626 (vxarq_u64): Ditto.
13627 (vbcaxq_u16): Ditto.
13628 * config/arm/types.md (crypto_sha512): New type attribute.
13629 (crypto_sha3): Ditto.
13630 (doc/invoke.texi): Document new sha3 option.
13632 2018-01-10 Michael Collison <michael.collison@arm.com>
13634 * config/aarch64/aarch64-builtins.c:
13635 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
13636 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
13637 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
13638 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
13639 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
13640 (AARCH64_ISA_SM4): New ISA flag.
13641 (TARGET_SM4): New feature flag for sm4.
13642 * config/aarch64/aarch64-simd-builtins.def
13643 (aarch64_sm3ss1qv4si): Ditto.
13644 (aarch64_sm3tt1aq4si): Ditto.
13645 (aarch64_sm3tt1bq4si): Ditto.
13646 (aarch64_sm3tt2aq4si): Ditto.
13647 (aarch64_sm3tt2bq4si): Ditto.
13648 (aarch64_sm3partw1qv4si): Ditto.
13649 (aarch64_sm3partw2qv4si): Ditto.
13650 (aarch64_sm4eqv4si): Ditto.
13651 (aarch64_sm4ekeyqv4si): Ditto.
13652 * config/aarch64/aarch64-simd.md:
13653 (aarch64_sm3ss1qv4si): Ditto.
13654 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
13655 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
13656 (aarch64_sm4eqv4si): Ditto.
13657 (aarch64_sm4ekeyqv4si): Ditto.
13658 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
13659 (sm3part_op): Ditto.
13660 (CRYPTO_SM3TT): Ditto.
13661 (CRYPTO_SM3PART): Ditto.
13662 (UNSPEC_SM3SS1): New unspec.
13663 (UNSPEC_SM3TT1A): Ditto.
13664 (UNSPEC_SM3TT1B): Ditto.
13665 (UNSPEC_SM3TT2A): Ditto.
13666 (UNSPEC_SM3TT2B): Ditto.
13667 (UNSPEC_SM3PARTW1): Ditto.
13668 (UNSPEC_SM3PARTW2): Ditto.
13669 (UNSPEC_SM4E): Ditto.
13670 (UNSPEC_SM4EKEY): Ditto.
13671 * config/aarch64/constraints.md (Ui2): New constraint.
13672 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
13673 * config/arm/types.md (crypto_sm3): New type attribute.
13674 (crypto_sm4): Ditto.
13675 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
13676 (vsm3tt1aq_u32): Ditto.
13677 (vsm3tt1bq_u32): Ditto.
13678 (vsm3tt2aq_u32): Ditto.
13679 (vsm3tt2bq_u32): Ditto.
13680 (vsm3partw1q_u32): Ditto.
13681 (vsm3partw2q_u32): Ditto.
13682 (vsm4eq_u32): Ditto.
13683 (vsm4ekeyq_u32): Ditto.
13684 (doc/invoke.texi): Document new sm4 option.
13686 2018-01-10 Michael Collison <michael.collison@arm.com>
13688 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
13689 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
13690 (AARCH64_FL_FOR_ARCH8_4): New.
13691 (AARCH64_FL_V8_4): New flag.
13692 (doc/invoke.texi): Document new armv8.4-a option.
13694 2018-01-10 Michael Collison <michael.collison@arm.com>
13696 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
13697 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
13698 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
13699 * config/aarch64/aarch64-option-extension.def: Add
13700 AARCH64_OPT_EXTENSION of 'sha2'.
13701 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
13702 (crypto): Disable sha2 and aes if crypto disabled.
13703 (crypto): Enable aes and sha2 if enabled.
13704 (simd): Disable sha2 and aes if simd disabled.
13705 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
13707 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
13708 (TARGET_SHA2): New feature flag for sha2.
13709 (TARGET_AES): New feature flag for aes.
13710 * config/aarch64/aarch64-simd.md:
13711 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
13712 conditional on TARGET_AES.
13713 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
13714 (aarch64_crypto_sha1hsi): Make pattern conditional
13716 (aarch64_crypto_sha1hv4si): Ditto.
13717 (aarch64_be_crypto_sha1hv4si): Ditto.
13718 (aarch64_crypto_sha1su1v4si): Ditto.
13719 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
13720 (aarch64_crypto_sha1su0v4si): Ditto.
13721 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
13722 (aarch64_crypto_sha256su0v4si): Ditto.
13723 (aarch64_crypto_sha256su1v4si): Ditto.
13724 (doc/invoke.texi): Document new aes and sha2 options.
13726 2018-01-10 Martin Sebor <msebor@redhat.com>
13728 PR tree-optimization/83781
13729 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
13732 2018-01-11 Martin Sebor <msebor@gmail.com>
13733 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13735 PR tree-optimization/83501
13736 PR tree-optimization/81703
13738 * tree-ssa-strlen.c (get_string_cst): Rename...
13739 (get_string_len): ...to this. Handle global constants.
13740 (handle_char_store): Adjust.
13742 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
13743 Jim Wilson <jimw@sifive.com>
13745 * config/riscv/riscv-protos.h (riscv_output_return): New.
13746 * config/riscv/riscv.c (struct machine_function): New naked_p field.
13747 (riscv_attribute_table, riscv_output_return),
13748 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
13749 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
13750 (riscv_compute_frame_info): Only compute frame->mask if not a naked
13752 (riscv_expand_prologue): Add early return for naked function.
13753 (riscv_expand_epilogue): Likewise.
13754 (riscv_function_ok_for_sibcall): Return false for naked function.
13755 (riscv_set_current_function): New.
13756 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
13757 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
13758 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
13759 * doc/extend.texi (RISC-V Function Attributes): New.
13761 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
13763 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
13764 check for 128-bit long double before checking TCmode.
13765 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
13766 128-bit long doubles before checking TFmode or TCmode.
13767 (FLOAT128_IBM_P): Likewise.
13769 2018-01-10 Martin Sebor <msebor@redhat.com>
13771 PR tree-optimization/83671
13772 * builtins.c (c_strlen): Unconditionally return zero for the empty
13774 Use -Warray-bounds for warnings.
13775 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
13776 for non-constant array indices with COMPONENT_REF, arrays of
13777 arrays, and pointers to arrays.
13778 (gimple_fold_builtin_strlen): Determine and set length range for
13779 non-constant character arrays.
13781 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
13783 PR middle-end/81897
13784 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
13787 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
13789 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
13791 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
13794 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
13795 VECTOR_MEM_ALTIVEC_OR_VSX_P.
13796 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
13797 indexed_or_indirect_operand predicate.
13798 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
13799 (*vsx_le_perm_load_v8hi): Likewise.
13800 (*vsx_le_perm_load_v16qi): Likewise.
13801 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
13802 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
13803 (*vsx_le_perm_store_v8hi): Likewise.
13804 (*vsx_le_perm_store_v16qi): Likewise.
13805 (eight unnamed splitters): Likewise.
13807 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
13809 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
13810 * config/rs6000/emmintrin.h: Likewise.
13811 * config/rs6000/mmintrin.h: Likewise.
13812 * config/rs6000/xmmintrin.h: Likewise.
13814 2018-01-10 David Malcolm <dmalcolm@redhat.com>
13817 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
13819 * tree.c (tree_nop_conversion): Return true for location wrapper
13821 (maybe_wrap_with_location): New function.
13822 (selftest::check_strip_nops): New function.
13823 (selftest::test_location_wrappers): New function.
13824 (selftest::tree_c_tests): Call it.
13825 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
13826 (maybe_wrap_with_location): New decl.
13827 (EXPR_LOCATION_WRAPPER_P): New macro.
13828 (location_wrapper_p): New inline function.
13829 (tree_strip_any_location_wrapper): New inline function.
13831 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
13834 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
13835 stack_realign_offset for the largest alignment of stack slot
13837 (ix86_find_max_used_stack_alignment): New function.
13838 (ix86_finalize_stack_frame_flags): Use it. Set
13839 max_used_stack_alignment if we don't realign stack.
13840 * config/i386/i386.h (machine_function): Add
13841 max_used_stack_alignment.
13843 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
13845 * config/arm/arm.opt (-mbranch-cost): New option.
13846 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
13849 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
13852 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
13853 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
13855 2018-01-10 Richard Biener <rguenther@suse.de>
13858 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
13859 early out so it also covers the case where we have a non-NULL
13862 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
13864 PR tree-optimization/83753
13865 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
13866 for non-strided grouped accesses if the number of elements is 1.
13868 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
13871 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
13872 * i386.h (TARGET_USE_GATHER): Define.
13873 * x86-tune.def (X86_TUNE_USE_GATHER): New.
13875 2018-01-10 Martin Liska <mliska@suse.cz>
13878 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
13879 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
13881 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
13882 CLEANUP_NO_PARTITIONING is not set.
13884 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
13886 * doc/rtl.texi: Remove documentation of (const ...) wrappers
13887 for vectors, as a partial revert of r254296.
13888 * rtl.h (const_vec_p): Delete.
13889 (const_vec_duplicate_p): Don't test for vector CONSTs.
13890 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
13891 * expmed.c (make_tree): Likewise.
13894 * common.md (E, F): Use CONSTANT_P instead of checking for
13896 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
13897 checking for CONST_VECTOR.
13899 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
13901 PR middle-end/83575
13902 * predict.c (force_edge_cold): Handle in more sane way edges
13903 with no prediction.
13905 2018-01-09 Carl Love <cel@us.ibm.com>
13907 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
13909 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
13910 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
13911 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
13912 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
13913 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
13914 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
13915 * config/rs6000/rs6000-protos.h: Add extern defition for
13916 rs6000_generate_float2_double_code.
13917 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
13919 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
13920 (float2_v2df): Add define_expand.
13922 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
13925 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
13926 op_mode in the force_to_mode call.
13928 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
13930 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
13931 instead of checking each element individually.
13932 (aarch64_evpc_uzp): Likewise.
13933 (aarch64_evpc_zip): Likewise.
13934 (aarch64_evpc_ext): Likewise.
13935 (aarch64_evpc_rev): Likewise.
13936 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
13937 instead of checking each element individually. Return true without
13939 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
13940 whether all selected elements come from the same input, instead of
13941 checking each element individually. Remove calls to gen_rtx_REG,
13942 start_sequence and end_sequence and instead assert that no rtl is
13945 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
13947 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
13948 order of HIGH and CONST checks.
13950 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
13952 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
13953 if the destination isn't an SSA_NAME.
13955 2018-01-09 Richard Biener <rguenther@suse.de>
13957 PR tree-optimization/83668
13958 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
13960 (canonicalize_loop_form): ... here, renamed from ...
13961 (canonicalize_loop_closed_ssa_form): ... this and amended to
13962 swap successor edges for loop exit blocks to make us use
13963 the RPO order we need for initial schedule generation.
13965 2018-01-09 Joseph Myers <joseph@codesourcery.com>
13967 PR tree-optimization/64811
13968 * match.pd: When optimizing comparisons with Inf, avoid
13969 introducing or losing exceptions from comparisons with NaN.
13971 2018-01-09 Martin Liska <mliska@suse.cz>
13974 * asan.c (shadow_mem_size): Add gcc_assert.
13976 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
13978 Don't save registers in main().
13981 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
13982 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
13983 * config/avr/avr.c (avr_set_current_function): Don't error if
13984 naked, OS_task or OS_main are specified at the same time.
13985 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
13987 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
13989 * common/config/avr/avr-common.c (avr_option_optimization_table):
13990 Switch on -mmain-is-OS_task for optimizing compilations.
13992 2018-01-09 Richard Biener <rguenther@suse.de>
13994 PR tree-optimization/83572
13995 * graphite.c: Include cfganal.h.
13996 (graphite_transform_loops): Connect infinite loops to exit
13997 and remove fake edges at the end.
13999 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
14001 * ipa-inline.c (edge_badness): Revert accidental checkin.
14003 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
14006 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
14007 symbols; not inline clones.
14009 2018-01-09 Jakub Jelinek <jakub@redhat.com>
14012 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
14013 hard registers. Formatting fixes.
14015 PR preprocessor/83722
14016 * gcc.c (try_generate_repro): Pass
14017 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
14018 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
14021 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
14022 Kito Cheng <kito.cheng@gmail.com>
14024 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
14025 (riscv_leaf_function_p): Delete.
14026 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
14028 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
14030 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
14032 (do_ifelse): New function.
14033 (do_isel): New function.
14034 (do_sub3): New function.
14035 (do_add3): New function.
14036 (do_load_mask_compare): New function.
14037 (do_overlap_load_compare): New function.
14038 (expand_compare_loop): New function.
14039 (expand_block_compare): Call expand_compare_loop() when appropriate.
14040 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
14041 option description.
14042 (-mblock-compare-inline-loop-limit): New option.
14044 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14047 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
14048 Reverse order of second and third operands in first alternative.
14049 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
14050 of first and second elements in UNSPEC_VPERMR vector.
14051 (altivec_expand_vec_perm_le): Likewise.
14053 2018-01-08 Jeff Law <law@redhat.com>
14055 PR rtl-optimizatin/81308
14056 * tree-switch-conversion.c (cfg_altered): New file scoped static.
14057 (process_switch): If group_case_labels makes a change, then set
14059 (pass_convert_switch::execute): If a switch is converted, then
14060 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
14062 PR rtl-optimization/81308
14063 * recog.c (split_all_insns): Conditionally cleanup the CFG after
14066 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
14068 PR target/83663 - Revert r255946
14069 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
14070 generation for cases where splatting a value is not useful.
14071 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
14072 across a vec_duplicate and a paradoxical subreg forming a vector
14073 mode to a vec_concat.
14075 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14077 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
14078 -march=armv8.3-a variants.
14079 * config/arm/t-multilib: Likewise.
14080 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
14082 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
14084 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
14086 (cceq_ior_compare_complement): Give it a name so I can use it, and
14087 change boolean_or_operator predicate to boolean_operator so it can
14088 be used to generate a crand.
14089 (eqne): New code iterator.
14090 (bd/bd_neg): New code_attrs.
14091 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
14092 a single define_insn.
14093 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
14094 decrement (bdnzt/bdnzf/bdzt/bdzf).
14095 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
14096 with the new names of the branch decrement patterns, and added the
14097 names of the branch decrement conditional patterns.
14099 2018-01-08 Richard Biener <rguenther@suse.de>
14101 PR tree-optimization/83563
14102 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
14105 2018-01-08 Richard Biener <rguenther@suse.de>
14107 PR middle-end/83713
14108 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
14110 2018-01-08 Richard Biener <rguenther@suse.de>
14112 PR tree-optimization/83685
14113 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
14114 references to abnormals.
14116 2018-01-08 Richard Biener <rguenther@suse.de>
14119 * dwarf2out.c (output_indirect_strings): Handle empty
14120 skeleton_debug_str_hash.
14121 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
14123 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
14125 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
14126 (emit_store_direct): Likewise.
14127 (arc_trampoline_adjust_address): Likewise.
14128 (arc_asm_trampoline_template): New function.
14129 (arc_initialize_trampoline): Use asm_trampoline_template.
14130 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
14131 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
14132 * config/arc/arc.md (flush_icache): Delete pattern.
14134 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
14136 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
14137 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
14140 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
14143 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
14144 by not USED_FOR_TARGET.
14145 (make_pass_resolve_sw_modes): Likewise.
14147 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
14149 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
14152 2018-01-08 Richard Biener <rguenther@suse.de>
14154 PR middle-end/83580
14155 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
14157 2018-01-08 Richard Biener <rguenther@suse.de>
14159 PR middle-end/83517
14160 * match.pd ((t * 2) / 2) -> t): Add missing :c.
14162 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
14164 PR middle-end/81897
14165 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
14166 basic blocks with a small number of successors.
14167 (convert_control_dep_chain_into_preds): Improve handling of
14169 (dump_predicates): Split apart into...
14170 (dump_pred_chain): ...here...
14171 (dump_pred_info): ...and here.
14172 (can_one_predicate_be_invalidated_p): Add debugging printfs.
14173 (can_chain_union_be_invalidated_p): Improve check for invalidation
14175 (uninit_uses_cannot_happen): Avoid unnecessary if
14176 convert_control_dep_chain_into_preds yielded nothing.
14178 2018-01-06 Martin Sebor <msebor@redhat.com>
14180 PR tree-optimization/83640
14181 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
14182 subtracting negative offset from size.
14183 (builtin_access::overlap): Adjust offset bounds of the access to fall
14184 within the size of the object if possible.
14186 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
14188 PR rtl-optimization/83699
14189 * expmed.c (extract_bit_field_1): Restrict the vector usage of
14190 extract_bit_field_as_subreg to cases in which the extracted
14191 value is also a vector.
14193 * lra-constraints.c (process_alt_operands): Test for the equivalence
14194 substitutions when detecting a possible reload cycle.
14196 2018-01-06 Jakub Jelinek <jakub@redhat.com>
14199 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
14200 by default if flag_selective_schedling{,2}. Formatting fixes.
14202 PR rtl-optimization/83682
14203 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
14204 if it has non-VECTOR_MODE element mode.
14205 (vec_duplicate_p): Likewise.
14207 PR middle-end/83694
14208 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
14209 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
14211 2018-01-05 Jakub Jelinek <jakub@redhat.com>
14214 * config/i386/i386-builtin.def
14215 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
14216 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
14217 Require also OPTION_MASK_ISA_AVX512F in addition to
14218 OPTION_MASK_ISA_GFNI.
14219 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
14220 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
14221 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
14222 to OPTION_MASK_ISA_GFNI.
14223 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
14224 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
14225 OPTION_MASK_ISA_AVX512BW.
14226 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
14227 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
14228 addition to OPTION_MASK_ISA_GFNI.
14229 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
14230 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
14231 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
14232 to OPTION_MASK_ISA_GFNI.
14233 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
14234 a requirement for all ISAs rather than any of them with a few
14236 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
14238 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
14239 bitmasks to be enabled with 3 exceptions, instead of requiring any
14240 enabled ISA with lots of exceptions.
14241 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
14242 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
14243 Change avx512bw in isa attribute to avx512f.
14244 * config/i386/sgxintrin.h: Add license boilerplate.
14245 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
14246 to __AVX512F__ and __AVX512VL to __AVX512VL__.
14247 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
14248 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
14250 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
14251 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
14252 temporarily sse2 rather than sse if not enabled already.
14255 * config/i386/sse.md (VI248_VLBW): Rename to ...
14256 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
14257 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
14258 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
14259 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
14260 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
14261 mode iterator instead of VI248_VLBW.
14263 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
14265 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
14266 (record_modified): Skip clobbers; add debug output.
14267 (param_change_prob): Use sreal frequencies.
14269 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
14271 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
14272 punt for user-aligned variables.
14274 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
14276 * tree-chrec.c (chrec_contains_symbols): Return true for
14279 2018-01-05 Sudakshina Das <sudi.das@arm.com>
14282 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
14283 of (x|y) == x for BICS pattern.
14285 2018-01-05 Jakub Jelinek <jakub@redhat.com>
14287 PR tree-optimization/83605
14288 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
14289 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
14292 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
14294 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
14295 * config/epiphany/rtems.h: New file.
14297 2018-01-04 Jakub Jelinek <jakub@redhat.com>
14298 Uros Bizjak <ubizjak@gmail.com>
14301 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
14302 QIreg_operand instead of register_operand predicate.
14303 * config/i386/i386.c (ix86_rop_should_change_byte_p,
14304 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
14305 comments instead of -fmitigate[-_]rop.
14307 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14310 * cgraphunit.c (symbol_table::compile): Switch to text_section
14311 before calling assembly_start debug hook.
14312 * run-rtl-passes.c (run_rtl_passes): Likewise.
14315 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
14317 * tree-vrp.c (extract_range_from_binary_expr_1): Check
14318 range_int_cst_p rather than !symbolic_range_p before calling
14319 extract_range_from_multiplicative_op_1.
14321 2018-01-04 Jeff Law <law@redhat.com>
14323 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
14324 redundant test in assertion.
14326 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
14328 * doc/rtl.texi: Document machine_mode wrapper classes.
14330 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
14332 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
14333 using tree_to_uhwi.
14335 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
14337 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
14338 the VEC_PERM_EXPR fold to fail.
14340 2018-01-04 Jakub Jelinek <jakub@redhat.com>
14343 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
14344 to switched_sections.
14346 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
14349 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
14350 test for d.testing.
14352 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
14355 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
14356 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
14358 2018-01-04 Jakub Jelinek <jakub@redhat.com>
14361 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
14362 is BLKmode and bitpos not zero or mode change is needed.
14364 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
14367 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
14370 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
14373 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
14374 instead of MULT rtx. Update all corresponding splitters.
14375 (*saddl_se): Ditto.
14376 (*ssub<modesuffix>): Ditto.
14377 (*ssubl_se): Ditto.
14378 (*cmp_sadd_di): Update split patterns.
14379 (*cmp_sadd_si): Ditto.
14380 (*cmp_sadd_sidi): Ditto.
14381 (*cmp_ssub_di): Ditto.
14382 (*cmp_ssub_si): Ditto.
14383 (*cmp_ssub_sidi): Ditto.
14384 * config/alpha/predicates.md (const23_operand): New predicate.
14385 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
14386 Look for ASHIFT, not MULT inner operand.
14387 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
14389 2018-01-04 Martin Liska <mliska@suse.cz>
14391 PR gcov-profile/83669
14392 * gcov.c (output_intermediate_file): Add version to intermediate
14394 * doc/gcov.texi: Document new field 'version' in intermediate
14395 file format. Fix location of '-k' option of gcov command.
14397 2018-01-04 Martin Liska <mliska@suse.cz>
14400 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
14402 2018-01-04 Jakub Jelinek <jakub@redhat.com>
14404 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
14406 2018-01-03 Martin Sebor <msebor@redhat.com>
14408 PR tree-optimization/83655
14409 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
14410 checking calls with invalid arguments.
14412 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14414 * tree-vect-stmts.c (vect_get_store_rhs): New function.
14415 (vectorizable_mask_load_store): Delete.
14416 (vectorizable_call): Return false for masked loads and stores.
14417 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
14418 instead of gimple_assign_rhs1.
14419 (vectorizable_load): Handle IFN_MASK_LOAD.
14420 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
14422 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14424 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
14426 (vectorizable_mask_load_store): ...here.
14427 (vectorizable_load): ...and here.
14429 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14431 * tree-vect-stmts.c (vect_build_all_ones_mask)
14432 (vect_build_zero_merge_argument): New functions, split out from...
14433 (vectorizable_load): ...here.
14435 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14437 * tree-vect-stmts.c (vect_check_store_rhs): New function,
14439 (vectorizable_mask_load_store): ...here.
14440 (vectorizable_store): ...and here.
14442 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14444 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
14446 (vectorizable_mask_load_store): ...here.
14448 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14450 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
14451 (vect_model_store_cost): Take a vec_load_store_type instead of a
14453 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
14454 (vect_model_store_cost): Take a vec_load_store_type instead of a
14456 (vectorizable_mask_load_store): Update accordingly.
14457 (vectorizable_store): Likewise.
14458 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
14460 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14462 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
14463 IFN_MASK_LOAD calls here rather than...
14464 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
14466 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14467 Alan Hayward <alan.hayward@arm.com>
14468 David Sherwood <david.sherwood@arm.com>
14470 * expmed.c (extract_bit_field_1): For vector extracts,
14471 fall back to extract_bit_field_as_subreg if vec_extract
14474 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14475 Alan Hayward <alan.hayward@arm.com>
14476 David Sherwood <david.sherwood@arm.com>
14478 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
14479 they are variable or constant sized.
14480 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
14481 slots for constant-sized data.
14483 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14484 Alan Hayward <alan.hayward@arm.com>
14485 David Sherwood <david.sherwood@arm.com>
14487 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
14488 handling COND_EXPRs with boolean comparisons, try to find a better
14489 basis for the mask type than the boolean itself.
14491 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14493 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
14494 is calculated and how it can be overridden.
14495 * genmodes.c (max_bitsize_mode_any_mode): New variable.
14496 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
14498 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
14501 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14502 Alan Hayward <alan.hayward@arm.com>
14503 David Sherwood <david.sherwood@arm.com>
14505 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
14506 Remove the mode argument.
14507 (aarch64_simd_valid_immediate): Remove the mode and inverse
14509 * config/aarch64/iterators.md (bitsize): New iterator.
14510 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
14511 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
14512 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
14513 aarch64_simd_valid_immediate.
14514 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
14515 (aarch64_reg_or_bic_imm): Likewise.
14516 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
14517 with an insn_type enum and msl with a modifier_type enum.
14518 Replace element_width with a scalar_mode. Change the shift
14519 to unsigned int. Add constructors for scalar_float_mode and
14520 scalar_int_mode elements.
14521 (aarch64_vect_float_const_representable_p): Delete.
14522 (aarch64_can_const_movi_rtx_p)
14523 (aarch64_simd_scalar_immediate_valid_for_move)
14524 (aarch64_simd_make_constant): Update call to
14525 aarch64_simd_valid_immediate.
14526 (aarch64_advsimd_valid_immediate_hs): New function.
14527 (aarch64_advsimd_valid_immediate): Likewise.
14528 (aarch64_simd_valid_immediate): Remove mode and inverse
14529 arguments. Rewrite to use the above. Use const_vec_duplicate_p
14530 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
14531 and aarch64_float_const_representable_p on the result.
14532 (aarch64_output_simd_mov_immediate): Remove mode argument.
14533 Update call to aarch64_simd_valid_immediate and use of
14534 simd_immediate_info.
14535 (aarch64_output_scalar_simd_mov_immediate): Update call
14538 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14539 Alan Hayward <alan.hayward@arm.com>
14540 David Sherwood <david.sherwood@arm.com>
14542 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
14543 (mode_nunits): Likewise CONST_MODE_NUNITS.
14544 * machmode.def (ADJUST_NUNITS): Document.
14545 * genmodes.c (mode_data::need_nunits_adj): New field.
14546 (blank_mode): Update accordingly.
14547 (adj_nunits): New variable.
14548 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
14550 (emit_mode_size_inline): Set need_bytesize_adj for all modes
14551 listed in adj_nunits.
14552 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
14553 listed in adj_nunits. Don't emit case statements for such modes.
14554 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
14555 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
14556 nothing if adj_nunits is nonnull.
14557 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
14558 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
14559 (emit_mode_fbit): Update use of print_maybe_const_decl.
14560 (emit_move_size): Likewise. Treat the array as non-const
14562 (emit_mode_adjustments): Handle adj_nunits.
14564 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14566 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
14567 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
14568 (VECTOR_MODES): Use it.
14569 (make_vector_modes): Take the prefix as an argument.
14571 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14572 Alan Hayward <alan.hayward@arm.com>
14573 David Sherwood <david.sherwood@arm.com>
14575 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
14576 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
14577 for MODE_VECTOR_BOOL.
14578 * machmode.def (VECTOR_BOOL_MODE): Document.
14579 * genmodes.c (VECTOR_BOOL_MODE): New macro.
14580 (make_vector_bool_mode): New function.
14581 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
14583 * lto-streamer-in.c (lto_input_mode_table): Likewise.
14584 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
14586 * stor-layout.c (int_mode_for_mode): Likewise.
14587 * tree.c (build_vector_type_for_mode): Likewise.
14588 * varasm.c (output_constant_pool_2): Likewise.
14589 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
14590 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
14591 for MODE_VECTOR_BOOL.
14592 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
14593 of mode class checks.
14594 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
14595 instead of a list of mode class checks.
14596 (expand_vector_scalar_condition): Likewise.
14597 (type_for_widest_vector_mode): Handle BImode as an inner mode.
14599 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14600 Alan Hayward <alan.hayward@arm.com>
14601 David Sherwood <david.sherwood@arm.com>
14603 * machmode.h (mode_size): Change from unsigned short to
14605 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
14606 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
14607 or if measurement_type is not polynomial.
14608 (fixed_size_mode::includes_p): Check for constant-sized modes.
14609 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
14610 return a poly_uint16 rather than an unsigned short.
14611 (emit_mode_size): Change the type of mode_size from unsigned short
14612 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
14613 (emit_mode_adjustments): Cope with polynomial vector sizes.
14614 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
14616 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
14618 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
14619 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
14620 * caller-save.c (setup_save_areas): Likewise.
14621 (replace_reg_with_saved_mem): Likewise.
14622 * calls.c (emit_library_call_value_1): Likewise.
14623 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
14624 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
14625 (gen_lowpart_for_combine): Likewise.
14626 * convert.c (convert_to_integer_1): Likewise.
14627 * cse.c (equiv_constant, cse_insn): Likewise.
14628 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
14629 (cselib_subst_to_values): Likewise.
14630 * dce.c (word_dce_process_block): Likewise.
14631 * df-problems.c (df_word_lr_mark_ref): Likewise.
14632 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
14633 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
14634 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
14635 (rtl_for_decl_location): Likewise.
14636 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
14637 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
14638 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
14639 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
14640 (expand_expr_real_1): Likewise.
14641 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
14642 (pad_below): Likewise.
14643 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
14644 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
14645 * ira.c (get_subreg_tracking_sizes): Likewise.
14646 * ira-build.c (ira_create_allocno_objects): Likewise.
14647 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
14648 (ira_sort_regnos_for_alter_reg): Likewise.
14649 * ira-costs.c (record_operand_costs): Likewise.
14650 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
14651 (resolve_simple_move): Likewise.
14652 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
14653 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
14654 (lra_constraints): Likewise.
14655 (CONST_POOL_OK_P): Reject variable-sized modes.
14656 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
14657 (add_pseudo_to_slot, lra_spill): Likewise.
14658 * omp-low.c (omp_clause_aligned_alignment): Likewise.
14659 * optabs-query.c (get_best_extraction_insn): Likewise.
14660 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
14661 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
14662 (expand_mult_highpart, valid_multiword_target_p): Likewise.
14663 * recog.c (offsettable_address_addr_space_p): Likewise.
14664 * regcprop.c (maybe_mode_change): Likewise.
14665 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
14666 * regrename.c (build_def_use): Likewise.
14667 * regstat.c (dump_reg_info): Likewise.
14668 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
14669 (find_reloads, find_reloads_subreg_address): Likewise.
14670 * reload1.c (eliminate_regs_1): Likewise.
14671 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
14672 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
14673 (simplify_binary_operation_1, simplify_subreg): Likewise.
14674 * targhooks.c (default_function_arg_padding): Likewise.
14675 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
14676 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
14677 (verify_gimple_assign_ternary): Likewise.
14678 * tree-inline.c (estimate_move_cost): Likewise.
14679 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14680 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
14681 (get_address_cost_ainc): Likewise.
14682 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
14683 (vect_supportable_dr_alignment): Likewise.
14684 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
14685 (vectorizable_reduction): Likewise.
14686 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
14687 (vectorizable_operation, vectorizable_load): Likewise.
14688 * tree.c (build_same_sized_truth_vector_type): Likewise.
14689 * valtrack.c (cleanup_auto_inc_dec): Likewise.
14690 * var-tracking.c (emit_note_insn_var_location): Likewise.
14691 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
14692 (ADDR_VEC_ALIGN): Likewise.
14694 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14695 Alan Hayward <alan.hayward@arm.com>
14696 David Sherwood <david.sherwood@arm.com>
14698 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
14700 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
14701 or if measurement_type is polynomial.
14702 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
14703 * combine.c (make_extraction): Likewise.
14704 * dse.c (find_shift_sequence): Likewise.
14705 * dwarf2out.c (mem_loc_descriptor): Likewise.
14706 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
14707 (extract_bit_field, extract_low_bits): Likewise.
14708 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
14709 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
14710 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
14711 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
14712 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
14713 * reload.c (find_reloads): Likewise.
14714 * reload1.c (alter_reg): Likewise.
14715 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
14716 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
14717 * tree-if-conv.c (predicate_mem_writes): Likewise.
14718 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
14719 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
14720 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
14721 * valtrack.c (dead_debug_insert_temp): Likewise.
14722 * varasm.c (mergeable_constant_section): Likewise.
14723 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
14725 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14726 Alan Hayward <alan.hayward@arm.com>
14727 David Sherwood <david.sherwood@arm.com>
14729 * expr.c (expand_assignment): Cope with polynomial mode sizes
14730 when assigning to a CONCAT.
14732 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14733 Alan Hayward <alan.hayward@arm.com>
14734 David Sherwood <david.sherwood@arm.com>
14736 * machmode.h (mode_precision): Change from unsigned short to
14738 (mode_to_precision): Return a poly_uint16 rather than an unsigned
14740 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
14741 or if measurement_type is not polynomial.
14742 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
14743 in which the mode is already known to be a scalar_int_mode.
14744 * genmodes.c (emit_mode_precision): Change the type of mode_precision
14745 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
14747 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
14748 for GET_MODE_PRECISION.
14749 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
14750 for GET_MODE_PRECISION.
14751 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
14753 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
14754 (expand_field_assignment, make_extraction): Likewise.
14755 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
14756 (get_last_value): Likewise.
14757 * convert.c (convert_to_integer_1): Likewise.
14758 * cse.c (cse_insn): Likewise.
14759 * expr.c (expand_expr_real_1): Likewise.
14760 * lra-constraints.c (simplify_operand_subreg): Likewise.
14761 * optabs-query.c (can_atomic_load_p): Likewise.
14762 * optabs.c (expand_atomic_load): Likewise.
14763 (expand_atomic_store): Likewise.
14764 * ree.c (combine_reaching_defs): Likewise.
14765 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
14766 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
14767 * tree.h (type_has_mode_precision_p): Likewise.
14768 * ubsan.c (instrument_si_overflow): Likewise.
14770 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14771 Alan Hayward <alan.hayward@arm.com>
14772 David Sherwood <david.sherwood@arm.com>
14774 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
14775 polynomial numbers of units.
14776 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
14777 (valid_vector_subparts_p): New function.
14778 (build_vector_type): Remove temporary shim and take the number
14779 of units as a poly_uint64 rather than an int.
14780 (build_opaque_vector_type): Take the number of units as a
14781 poly_uint64 rather than an int.
14782 * tree.c (build_vector_from_ctor): Handle polynomial
14783 TYPE_VECTOR_SUBPARTS.
14784 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
14785 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
14786 (build_vector_from_val): If the number of units is variable,
14787 use build_vec_duplicate_cst for constant operands and
14788 VEC_DUPLICATE_EXPR otherwise.
14789 (make_vector_type): Remove temporary is_constant ().
14790 (build_vector_type, build_opaque_vector_type): Take the number of
14791 units as a poly_uint64 rather than an int.
14792 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
14794 * cfgexpand.c (expand_debug_expr): Likewise.
14795 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
14796 (store_constructor, expand_expr_real_1): Likewise.
14797 (const_scalar_mask_from_tree): Likewise.
14798 * fold-const-call.c (fold_const_reduction): Likewise.
14799 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
14800 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
14801 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
14802 (fold_relational_const): Likewise.
14803 (native_interpret_vector): Likewise. Change the size from an
14804 int to an unsigned int.
14805 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
14806 TYPE_VECTOR_SUBPARTS.
14807 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
14808 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
14809 duplicating a non-constant operand into a variable-length vector.
14810 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
14811 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
14812 * ipa-icf.c (sem_variable::equals): Likewise.
14813 * match.pd: Likewise.
14814 * omp-simd-clone.c (simd_clone_subparts): Likewise.
14815 * print-tree.c (print_node): Likewise.
14816 * stor-layout.c (layout_type): Likewise.
14817 * targhooks.c (default_builtin_vectorization_cost): Likewise.
14818 * tree-cfg.c (verify_gimple_comparison): Likewise.
14819 (verify_gimple_assign_binary): Likewise.
14820 (verify_gimple_assign_ternary): Likewise.
14821 (verify_gimple_assign_single): Likewise.
14822 * tree-pretty-print.c (dump_generic_node): Likewise.
14823 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14824 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
14825 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
14826 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
14827 (vect_shift_permute_load_chain): Likewise.
14828 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
14829 (expand_vector_condition, optimize_vector_constructor): Likewise.
14830 (lower_vec_perm, get_compute_type): Likewise.
14831 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
14832 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
14833 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
14834 (vect_recog_mask_conversion_pattern): Likewise.
14835 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
14836 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
14837 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14838 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
14839 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
14840 (vectorizable_shift, vectorizable_operation, vectorizable_store)
14841 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
14842 (supportable_widening_operation): Likewise.
14843 (supportable_narrowing_operation): Likewise.
14844 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
14846 * varasm.c (output_constant): 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 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
14853 so that both the length == 3 and length != 3 cases set up their
14854 own permute vectors. Add comments explaining why we know the
14855 number of elements is constant.
14856 (vect_permute_load_chain): Likewise.
14858 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14859 Alan Hayward <alan.hayward@arm.com>
14860 David Sherwood <david.sherwood@arm.com>
14862 * machmode.h (mode_nunits): Change from unsigned char to
14864 (ONLY_FIXED_SIZE_MODES): New macro.
14865 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
14866 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
14867 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
14869 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
14870 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
14871 or if measurement_type is not polynomial.
14872 * genmodes.c (ZERO_COEFFS): New macro.
14873 (emit_mode_nunits_inline): Make mode_nunits_inline return a
14875 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
14876 Use ZERO_COEFFS when emitting initializers.
14877 * data-streamer.h (bp_pack_poly_value): New function.
14878 (bp_unpack_poly_value): Likewise.
14879 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
14880 for GET_MODE_NUNITS.
14881 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
14882 for GET_MODE_NUNITS.
14883 * tree.c (make_vector_type): Remove temporary shim and make
14884 the real function take the number of units as a poly_uint64
14885 rather than an int.
14886 (build_vector_type_for_mode): Handle polynomial nunits.
14887 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
14888 * emit-rtl.c (const_vec_series_p_1): Likewise.
14889 (gen_rtx_CONST_VECTOR): Likewise.
14890 * fold-const.c (test_vec_duplicate_folding): Likewise.
14891 * genrecog.c (validate_pattern): Likewise.
14892 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
14893 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
14894 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
14895 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
14896 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
14897 * rtlanal.c (subreg_get_info): Likewise.
14898 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
14899 (vect_grouped_load_supported): Likewise.
14900 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
14901 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
14902 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
14903 (simplify_const_unary_operation, simplify_binary_operation_1)
14904 (simplify_const_binary_operation, simplify_ternary_operation)
14905 (test_vector_ops_duplicate, test_vector_ops): Likewise.
14906 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
14907 instead of CONST_VECTOR_NUNITS.
14908 * varasm.c (output_constant_pool_2): Likewise.
14909 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
14910 explicit-encoded elements in the XVEC for variable-length vectors.
14912 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14914 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
14916 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14917 Alan Hayward <alan.hayward@arm.com>
14918 David Sherwood <david.sherwood@arm.com>
14920 * coretypes.h (fixed_size_mode): Declare.
14921 (fixed_size_mode_pod): New typedef.
14922 * builtins.h (target_builtins::x_apply_args_mode)
14923 (target_builtins::x_apply_result_mode): Change type to
14924 fixed_size_mode_pod.
14925 * builtins.c (apply_args_size, apply_result_size, result_vector)
14926 (expand_builtin_apply_args_1, expand_builtin_apply)
14927 (expand_builtin_return): Update accordingly.
14929 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14931 * cse.c (hash_rtx_cb): Hash only the encoded elements.
14932 * cselib.c (cselib_hash_rtx): Likewise.
14933 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
14934 CONST_VECTOR encoding.
14936 2018-01-03 Jakub Jelinek <jakub@redhat.com>
14937 Jeff Law <law@redhat.com>
14940 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
14941 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
14942 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
14943 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
14946 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
14947 explicitly probe *sp in a noreturn function if there were any callee
14948 register saves or frame pointer is needed.
14950 2018-01-03 Jakub Jelinek <jakub@redhat.com>
14953 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
14954 BLKmode for ternary, binary or unary expressions.
14957 * var-tracking.c (delete_vta_debug_insn): New inline function.
14958 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
14959 insns from get_insns () to NULL instead of each bb separately.
14960 Use delete_vta_debug_insn. No longer static.
14961 (vt_debug_insns_local, variable_tracking_main_1): Adjust
14962 delete_vta_debug_insns callers.
14963 * rtl.h (delete_vta_debug_insns): Declare.
14964 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
14965 instead of variable_tracking_main.
14967 2018-01-03 Martin Sebor <msebor@redhat.com>
14969 PR tree-optimization/83603
14970 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
14971 arguments past the endof the argument list in functions declared
14972 without a prototype.
14973 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
14974 Avoid checking when arguments are null.
14976 2018-01-03 Martin Sebor <msebor@redhat.com>
14979 * doc/extend.texi (attribute const): Fix a typo.
14980 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
14981 issuing -Wsuggest-attribute for void functions.
14983 2018-01-03 Martin Sebor <msebor@redhat.com>
14985 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
14986 offset_int::from instead of wide_int::to_shwi.
14987 (maybe_diag_overlap): Remove assertion.
14988 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
14989 * gimple-ssa-sprintf.c (format_directive): Same.
14990 (parse_directive): Same.
14991 (sprintf_dom_walker::compute_format_length): Same.
14992 (try_substitute_return_value): Same.
14994 2018-01-03 Jeff Law <law@redhat.com>
14996 PR middle-end/83654
14997 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
14998 non-constant residual for zero at runtime and avoid probing in
14999 that case. Reorganize code for trailing problem to mirror handling
15002 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
15004 PR tree-optimization/83501
15005 * tree-ssa-strlen.c (get_string_cst): New.
15006 (handle_char_store): Call get_string_cst.
15008 2018-01-03 Martin Liska <mliska@suse.cz>
15010 PR tree-optimization/83593
15011 * tree-ssa-strlen.c: Include tree-cfg.h.
15012 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
15013 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
15014 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
15016 (strlen_dom_walker::before_dom_children): Call
15017 gimple_purge_dead_eh_edges. Dump tranformation with details
15019 (strlen_dom_walker::before_dom_children): Update call by adding
15020 new argument cleanup_eh.
15021 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
15023 2018-01-03 Martin Liska <mliska@suse.cz>
15026 * cif-code.def (VARIADIC_THUNK): New enum value.
15027 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
15030 2018-01-03 Jan Beulich <jbeulich@suse.com>
15032 * sse.md (mov<mode>_internal): Tighten condition for when to use
15033 vmovdqu<ssescalarsize> for TI and OI modes.
15035 2018-01-03 Jakub Jelinek <jakub@redhat.com>
15037 Update copyright years.
15039 2018-01-03 Martin Liska <mliska@suse.cz>
15042 * ipa-visibility.c (function_and_variable_visibility): Skip
15043 functions with noipa attribure.
15045 2018-01-03 Jakub Jelinek <jakub@redhat.com>
15047 * gcc.c (process_command): Update copyright notice dates.
15048 * gcov-dump.c (print_version): Ditto.
15049 * gcov.c (print_version): Ditto.
15050 * gcov-tool.c (print_version): Ditto.
15051 * gengtype.c (create_file): Ditto.
15052 * doc/cpp.texi: Bump @copying's copyright year.
15053 * doc/cppinternals.texi: Ditto.
15054 * doc/gcc.texi: Ditto.
15055 * doc/gccint.texi: Ditto.
15056 * doc/gcov.texi: Ditto.
15057 * doc/install.texi: Ditto.
15058 * doc/invoke.texi: Ditto.
15060 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15062 * vector-builder.h (vector_builder::m_full_nelts): Change from
15063 unsigned int to poly_uint64.
15064 (vector_builder::full_nelts): Update prototype accordingly.
15065 (vector_builder::new_vector): Likewise.
15066 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
15067 (vector_builder::operator ==): Likewise.
15068 (vector_builder::finalize): Likewise.
15069 * int-vector-builder.h (int_vector_builder::int_vector_builder):
15070 Take the number of elements as a poly_uint64 rather than an
15072 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
15073 from unsigned int to poly_uint64.
15074 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
15075 (vec_perm_indices::new_vector): Likewise.
15076 (vec_perm_indices::length): Likewise.
15077 (vec_perm_indices::nelts_per_input): Likewise.
15078 (vec_perm_indices::input_nelts): Likewise.
15079 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
15080 number of elements per input as a poly_uint64 rather than an
15081 unsigned int. Use the original encoding for variable-length
15082 vectors, rather than clamping each individual element.
15083 For the second and subsequent elements in each pattern,
15084 clamp the step and base before clamping their sum.
15085 (vec_perm_indices::series_p): Handle polynomial element counts.
15086 (vec_perm_indices::all_in_range_p): Likewise.
15087 (vec_perm_indices_to_tree): Likewise.
15088 (vec_perm_indices_to_rtx): Likewise.
15089 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
15090 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
15091 (tree_vector_builder::new_binary_operation): Handle polynomial
15092 element counts. Return false if we need to know the number
15093 of elements at compile time.
15094 * fold-const.c (fold_vec_perm): Punt if the number of elements
15095 isn't known at compile time.
15097 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15099 * vec-perm-indices.h (vec_perm_builder): Change element type
15100 from HOST_WIDE_INT to poly_int64.
15101 (vec_perm_indices::element_type): Update accordingly.
15102 (vec_perm_indices::clamp): Handle polynomial element_types.
15103 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
15104 (vec_perm_indices::all_in_range_p): Likewise.
15105 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
15107 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
15108 polynomial vec_perm_indices element types.
15109 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
15110 * fold-const.c (fold_vec_perm): Likewise.
15111 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
15112 * tree-vect-generic.c (lower_vec_perm): Likewise.
15113 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
15114 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
15115 element type to HOST_WIDE_INT.
15117 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15118 Alan Hayward <alan.hayward@arm.com>
15119 David Sherwood <david.sherwood@arm.com>
15121 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
15122 rather than an int. Use plus_constant.
15123 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
15124 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
15126 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15127 Alan Hayward <alan.hayward@arm.com>
15128 David Sherwood <david.sherwood@arm.com>
15130 * calls.c (emit_call_1, expand_call): Change struct_value_size from
15131 a HOST_WIDE_INT to a poly_int64.
15133 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15134 Alan Hayward <alan.hayward@arm.com>
15135 David Sherwood <david.sherwood@arm.com>
15137 * calls.c (load_register_parameters): Cope with polynomial
15138 mode sizes. Require a constant size for BLKmode parameters
15139 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
15140 forces a parameter to be padded at the lsb end in order to
15141 fill a complete number of words, require the parameter size
15142 to be ordered wrt UNITS_PER_WORD.
15144 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15145 Alan Hayward <alan.hayward@arm.com>
15146 David Sherwood <david.sherwood@arm.com>
15148 * reload1.c (spill_stack_slot_width): Change element type
15149 from unsigned int to poly_uint64_pod.
15150 (alter_reg): Treat mode sizes as polynomial.
15152 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15153 Alan Hayward <alan.hayward@arm.com>
15154 David Sherwood <david.sherwood@arm.com>
15156 * reload.c (complex_word_subreg_p): New function.
15157 (reload_inner_reg_of_subreg, push_reload): Use it.
15159 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15160 Alan Hayward <alan.hayward@arm.com>
15161 David Sherwood <david.sherwood@arm.com>
15163 * lra-constraints.c (process_alt_operands): Reject matched
15164 operands whose sizes aren't ordered.
15165 (match_reload): Refer to this check here.
15167 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15168 Alan Hayward <alan.hayward@arm.com>
15169 David Sherwood <david.sherwood@arm.com>
15171 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
15172 that the mode size is in the set {1, 2, 4, 8, 16}.
15174 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15175 Alan Hayward <alan.hayward@arm.com>
15176 David Sherwood <david.sherwood@arm.com>
15178 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
15179 Use plus_constant instead of gen_rtx_PLUS.
15181 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15182 Alan Hayward <alan.hayward@arm.com>
15183 David Sherwood <david.sherwood@arm.com>
15185 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
15186 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
15187 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
15188 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
15189 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
15190 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
15191 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
15192 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
15193 * config/i386/i386.c (ix86_push_rounding): ...this new function.
15194 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
15196 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
15197 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
15198 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
15199 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
15200 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
15201 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
15202 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
15203 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
15204 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
15205 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
15207 * expr.c (emit_move_resolve_push): Treat the input and result
15208 of PUSH_ROUNDING as a poly_int64.
15209 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
15210 (emit_push_insn): Likewise.
15211 * lra-eliminations.c (mark_not_eliminable): Likewise.
15212 * recog.c (push_operand): Likewise.
15213 * reload1.c (elimination_effects): Likewise.
15214 * rtlanal.c (nonzero_bits1): Likewise.
15215 * calls.c (store_one_arg): Likewise. Require the padding to be
15216 known at compile time.
15218 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15219 Alan Hayward <alan.hayward@arm.com>
15220 David Sherwood <david.sherwood@arm.com>
15222 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
15223 Use plus_constant instead of gen_rtx_PLUS.
15225 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15226 Alan Hayward <alan.hayward@arm.com>
15227 David Sherwood <david.sherwood@arm.com>
15229 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
15230 rather than an int.
15232 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15233 Alan Hayward <alan.hayward@arm.com>
15234 David Sherwood <david.sherwood@arm.com>
15236 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
15237 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
15238 via stack temporaries. Treat the mode size as polynomial too.
15240 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15241 Alan Hayward <alan.hayward@arm.com>
15242 David Sherwood <david.sherwood@arm.com>
15244 * expr.c (expand_expr_real_2): When handling conversions involving
15245 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
15246 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
15247 as a poly_uint64 too.
15249 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15250 Alan Hayward <alan.hayward@arm.com>
15251 David Sherwood <david.sherwood@arm.com>
15253 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
15255 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15256 Alan Hayward <alan.hayward@arm.com>
15257 David Sherwood <david.sherwood@arm.com>
15259 * combine.c (can_change_dest_mode): Handle polynomial
15260 REGMODE_NATURAL_SIZE.
15261 * expmed.c (store_bit_field_1): Likewise.
15262 * expr.c (store_constructor): Likewise.
15263 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
15264 and polynomial REGMODE_NATURAL_SIZE.
15265 (gen_lowpart_common): Likewise.
15266 * reginfo.c (record_subregs_of_mode): Likewise.
15267 * rtlanal.c (read_modify_subreg_p): Likewise.
15269 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15270 Alan Hayward <alan.hayward@arm.com>
15271 David Sherwood <david.sherwood@arm.com>
15273 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
15274 numbers of elements.
15276 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15277 Alan Hayward <alan.hayward@arm.com>
15278 David Sherwood <david.sherwood@arm.com>
15280 * match.pd: Cope with polynomial numbers of vector elements.
15282 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15283 Alan Hayward <alan.hayward@arm.com>
15284 David Sherwood <david.sherwood@arm.com>
15286 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
15287 in a POINTER_PLUS_EXPR.
15289 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15290 Alan Hayward <alan.hayward@arm.com>
15291 David Sherwood <david.sherwood@arm.com>
15293 * omp-simd-clone.c (simd_clone_subparts): New function.
15294 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
15295 (ipa_simd_modify_function_body): Likewise.
15297 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15298 Alan Hayward <alan.hayward@arm.com>
15299 David Sherwood <david.sherwood@arm.com>
15301 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
15302 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
15303 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
15304 (expand_vector_condition, vector_element): Likewise.
15305 (subparts_gt): New function.
15306 (get_compute_type): Use subparts_gt.
15307 (count_type_subparts): Delete.
15308 (expand_vector_operations_1): Use subparts_gt instead of
15309 count_type_subparts.
15311 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15312 Alan Hayward <alan.hayward@arm.com>
15313 David Sherwood <david.sherwood@arm.com>
15315 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
15316 (vect_compile_time_alias): ...this new function. Do the calculation
15317 on poly_ints rather than trees.
15318 (vect_prune_runtime_alias_test_list): Update call accordingly.
15320 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15321 Alan Hayward <alan.hayward@arm.com>
15322 David Sherwood <david.sherwood@arm.com>
15324 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
15326 (vect_schedule_slp_instance): Likewise.
15328 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15329 Alan Hayward <alan.hayward@arm.com>
15330 David Sherwood <david.sherwood@arm.com>
15332 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
15333 constant and extern definitions for variable-length vectors.
15334 (vect_get_constant_vectors): Note that the number of units
15335 is known to be constant.
15337 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15338 Alan Hayward <alan.hayward@arm.com>
15339 David Sherwood <david.sherwood@arm.com>
15341 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
15342 of units as polynomial. Choose between WIDE and NARROW based
15345 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15346 Alan Hayward <alan.hayward@arm.com>
15347 David Sherwood <david.sherwood@arm.com>
15349 * tree-vect-stmts.c (simd_clone_subparts): New function.
15350 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
15352 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15353 Alan Hayward <alan.hayward@arm.com>
15354 David Sherwood <david.sherwood@arm.com>
15356 * tree-vect-stmts.c (vectorizable_call): Treat the number of
15357 vectors as polynomial. Use build_index_vector for
15358 IFN_GOMP_SIMD_LANE.
15360 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15361 Alan Hayward <alan.hayward@arm.com>
15362 David Sherwood <david.sherwood@arm.com>
15364 * tree-vect-stmts.c (get_load_store_type): Treat the number of
15365 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
15366 for variable-length vectors.
15367 (vectorizable_mask_load_store): Treat the number of units as
15368 polynomial, asserting that it is constant if the condition has
15369 already been enforced.
15370 (vectorizable_store, vectorizable_load): Likewise.
15372 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15373 Alan Hayward <alan.hayward@arm.com>
15374 David Sherwood <david.sherwood@arm.com>
15376 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
15377 of units as polynomial. Punt if we can't tell at compile time
15378 which vector contains the final result.
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-vect-loop.c (vectorizable_induction): Treat the number
15385 of units as polynomial. Punt on SLP inductions. Use an integer
15386 VEC_SERIES_EXPR for variable-length integer reductions. Use a
15387 cast of such a series for variable-length floating-point
15390 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15391 Alan Hayward <alan.hayward@arm.com>
15392 David Sherwood <david.sherwood@arm.com>
15394 * tree.h (build_index_vector): Declare.
15395 * tree.c (build_index_vector): New function.
15396 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
15397 of units as polynomial, forcibly converting it to a constant if
15398 vectorizable_reduction has already enforced the condition.
15399 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
15400 to create a {1,2,3,...} vector.
15401 (vectorizable_reduction): Treat the number of units as polynomial.
15402 Choose vectype_in based on the largest scalar element size rather
15403 than the smallest number of units. Enforce the restrictions
15406 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15407 Alan Hayward <alan.hayward@arm.com>
15408 David Sherwood <david.sherwood@arm.com>
15410 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
15411 number of units as polynomial.
15413 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15414 Alan Hayward <alan.hayward@arm.com>
15415 David Sherwood <david.sherwood@arm.com>
15417 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
15418 * target.def (autovectorize_vector_sizes): Return the vector sizes
15419 by pointer, using vector_sizes rather than a bitmask.
15420 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
15421 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
15422 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
15424 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
15425 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
15426 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
15427 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
15428 * omp-general.c (omp_max_vf): Likewise.
15429 * omp-low.c (omp_clause_aligned_alignment): Likewise.
15430 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
15431 * tree-vect-loop.c (vect_analyze_loop): Likewise.
15432 * tree-vect-slp.c (vect_slp_bb): Likewise.
15433 * doc/tm.texi: Regenerate.
15434 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
15436 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
15437 the vector size as a poly_uint64 rather than an unsigned int.
15438 (current_vector_size): Change from an unsigned int to a poly_uint64.
15439 (get_vectype_for_scalar_type): Update accordingly.
15440 * tree.h (build_truth_vector_type): Take the size and number of
15441 units as a poly_uint64 rather than an unsigned int.
15442 (build_vector_type): Add a temporary overload that takes
15443 the number of units as a poly_uint64 rather than an unsigned int.
15444 * tree.c (make_vector_type): Likewise.
15445 (build_truth_vector_type): Take the number of units as a poly_uint64
15446 rather than an unsigned int.
15448 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15449 Alan Hayward <alan.hayward@arm.com>
15450 David Sherwood <david.sherwood@arm.com>
15452 * target.def (get_mask_mode): Take the number of units and length
15453 as poly_uint64s rather than unsigned ints.
15454 * targhooks.h (default_get_mask_mode): Update accordingly.
15455 * targhooks.c (default_get_mask_mode): Likewise.
15456 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
15457 * doc/tm.texi: Regenerate.
15459 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15460 Alan Hayward <alan.hayward@arm.com>
15461 David Sherwood <david.sherwood@arm.com>
15463 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
15464 * omp-general.c (omp_max_vf): Likewise.
15465 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
15466 (expand_omp_simd): Handle polynomial safelen.
15467 * omp-low.c (omplow_simd_context): Add a default constructor.
15468 (omplow_simd_context::max_vf): Change from int to poly_uint64.
15469 (lower_rec_simd_input_clauses): Update accordingly.
15470 (lower_rec_input_clauses): Likewise.
15472 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15473 Alan Hayward <alan.hayward@arm.com>
15474 David Sherwood <david.sherwood@arm.com>
15476 * tree-vectorizer.h (vect_nunits_for_cost): New function.
15477 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
15478 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
15479 (vect_analyze_slp_cost): Likewise.
15480 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
15481 (vect_model_load_cost): Likewise.
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-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
15488 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
15489 from an unsigned int * to a poly_uint64_pod *.
15490 (calculate_unrolling_factor): New function.
15491 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
15493 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15494 Alan Hayward <alan.hayward@arm.com>
15495 David Sherwood <david.sherwood@arm.com>
15497 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
15498 from an unsigned int to a poly_uint64.
15499 (_loop_vec_info::slp_unrolling_factor): Likewise.
15500 (_loop_vec_info::vectorization_factor): Change from an int
15502 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
15503 (vect_get_num_vectors): New function.
15504 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
15505 (vect_get_num_copies): Use vect_get_num_vectors.
15506 (vect_analyze_data_ref_dependences): Change max_vf from an int *
15507 to an unsigned int *.
15508 (vect_analyze_data_refs): Change min_vf from an int * to a
15510 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
15511 than an unsigned HOST_WIDE_INT.
15512 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
15513 (vect_analyze_data_ref_dependence): Change max_vf from an int *
15514 to an unsigned int *.
15515 (vect_analyze_data_ref_dependences): Likewise.
15516 (vect_compute_data_ref_alignment): Handle polynomial vf.
15517 (vect_enhance_data_refs_alignment): Likewise.
15518 (vect_prune_runtime_alias_test_list): Likewise.
15519 (vect_shift_permute_load_chain): Likewise.
15520 (vect_supportable_dr_alignment): Likewise.
15521 (dependence_distance_ge_vf): Take the vectorization factor as a
15522 poly_uint64 rather than an unsigned HOST_WIDE_INT.
15523 (vect_analyze_data_refs): Change min_vf from an int * to a
15525 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
15526 vfm1 as a poly_uint64 rather than an int. Make the same change
15527 for the returned bound_scalar.
15528 (vect_gen_vector_loop_niters): Handle polynomial vf.
15529 (vect_do_peeling): Likewise. Update call to
15530 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
15531 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
15533 * tree-vect-loop.c (vect_determine_vectorization_factor)
15534 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
15535 (vect_get_known_peeling_cost): Likewise.
15536 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
15537 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
15538 (vect_transform_loop): Likewise. Use the lowest possible VF when
15539 updating the upper bounds of the loop.
15540 (vect_min_worthwhile_factor): Make static. Return an unsigned int
15541 rather than an int.
15542 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
15543 polynomial unroll factors.
15544 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
15545 (vect_make_slp_decision): Likewise.
15546 (vect_supported_load_permutation_p): Likewise, and polynomial
15548 (vect_analyze_slp_cost): Handle polynomial vf.
15549 (vect_slp_analyze_node_operations): Likewise.
15550 (vect_slp_analyze_bb_1): Likewise.
15551 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
15552 than an unsigned HOST_WIDE_INT.
15553 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
15554 (vectorizable_load): Handle polynomial vf.
15555 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
15557 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
15559 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15560 Alan Hayward <alan.hayward@arm.com>
15561 David Sherwood <david.sherwood@arm.com>
15563 * match.pd: Handle bit operations involving three constants
15564 and try to fold one pair.
15566 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15568 * tree-vect-loop-manip.c: Include gimple-fold.h.
15569 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
15570 niters_maybe_zero parameters. Handle other cases besides a step of 1.
15571 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
15572 Add a path that uses a step of VF instead of 1, but disable it
15574 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
15575 and niters_no_overflow parameters. Update calls to
15576 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
15577 Create a new SSA name if the latter choses to use a ste other
15578 than zero, and return it via niters_vector_mult_vf_var.
15579 * tree-vect-loop.c (vect_transform_loop): Update calls to
15580 vect_do_peeling, vect_gen_vector_loop_niters and
15581 slpeel_make_loop_iterate_ntimes.
15582 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
15583 (vect_gen_vector_loop_niters): Update declarations after above changes.
15585 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
15587 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
15588 128-bit round to integer instructions.
15589 (ceil<mode>2): Likewise.
15590 (btrunc<mode>2): Likewise.
15591 (round<mode>2): Likewise.
15593 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15595 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
15596 unaligned VSX load/store on P8/P9.
15597 (expand_block_clear): Allow the use of unaligned VSX
15598 load/store on P8/P9.
15600 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15602 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
15604 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
15605 swap associated with both a load and a store.
15607 2018-01-02 Andrew Waterman <andrew@sifive.com>
15609 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
15610 * config/riscv/riscv.md (clear_cache): Use it.
15612 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
15614 * web.c: Remove out-of-date comment.
15616 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15618 * expr.c (fixup_args_size_notes): Check that any existing
15619 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
15620 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
15621 (emit_single_push_insn): ...here.
15623 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15625 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
15626 (const_vector_encoded_nelts): New function.
15627 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
15628 (const_vector_int_elt, const_vector_elt): Declare.
15629 * emit-rtl.c (const_vector_int_elt_1): New function.
15630 (const_vector_elt): Likewise.
15631 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
15632 of CONST_VECTOR_ELT.
15634 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15636 * expr.c: Include rtx-vector-builder.h.
15637 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
15638 directly on the tree encoding.
15639 (const_vector_from_tree): Likewise.
15640 * optabs.c: Include rtx-vector-builder.h.
15641 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
15642 sequence of "u" values.
15643 * vec-perm-indices.c: Include rtx-vector-builder.h.
15644 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
15645 directly on the vec_perm_indices encoding.
15647 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15649 * doc/rtl.texi (const_vector): Describe new encoding scheme.
15650 * Makefile.in (OBJS): Add rtx-vector-builder.o.
15651 * rtx-vector-builder.h: New file.
15652 * rtx-vector-builder.c: Likewise.
15653 * rtl.h (rtx_def::u2): Add a const_vector field.
15654 (CONST_VECTOR_NPATTERNS): New macro.
15655 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
15656 (CONST_VECTOR_DUPLICATE_P): Likewise.
15657 (CONST_VECTOR_STEPPED_P): Likewise.
15658 (CONST_VECTOR_ENCODED_ELT): Likewise.
15659 (const_vec_duplicate_p): Check for a duplicated vector encoding.
15660 (unwrap_const_vec_duplicate): Likewise.
15661 (const_vec_series_p): Check for a non-duplicated vector encoding.
15662 Say that the function only returns true for integer vectors.
15663 * emit-rtl.c: Include rtx-vector-builder.h.
15664 (gen_const_vec_duplicate_1): Delete.
15665 (gen_const_vector): Call gen_const_vec_duplicate instead of
15666 gen_const_vec_duplicate_1.
15667 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
15668 (gen_const_vec_duplicate): Use rtx_vector_builder.
15669 (gen_const_vec_series): Likewise.
15670 (gen_rtx_CONST_VECTOR): Likewise.
15671 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
15672 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
15673 Build a new vector rather than modifying a CONST_VECTOR in-place.
15674 (handle_special_swappables): Update call accordingly.
15675 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
15676 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
15677 Build a new vector rather than modifying a CONST_VECTOR in-place.
15678 (handle_special_swappables): Update call accordingly.
15680 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15682 * simplify-rtx.c (simplify_const_binary_operation): Use
15683 CONST_VECTOR_ELT instead of XVECEXP.
15685 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15687 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
15688 the selector elements to be different from the data elements
15689 if the selector is a VECTOR_CST.
15690 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
15691 ssizetype for the selector.
15693 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15695 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
15696 before testing each element individually.
15697 * tree-vect-generic.c (lower_vec_perm): Likewise.
15699 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15701 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
15702 * selftest-run-tests.c (selftest::run_tests): Call it.
15703 * vector-builder.h (vector_builder::operator ==): New function.
15704 (vector_builder::operator !=): Likewise.
15705 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
15706 (vec_perm_indices::all_from_input_p): New function.
15707 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
15708 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
15709 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
15710 instead of reading the VECTOR_CST directly. Detect whether both
15711 vector inputs are the same before constructing the vec_perm_indices,
15712 and update the number of inputs argument accordingly. Use the
15713 utility functions added above. Only construct sel2 if we need to.
15715 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15717 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
15718 the broadcast of the low byte.
15719 (expand_mult_highpart): Use an explicit encoding for the permutes.
15720 * optabs-query.c (can_mult_highpart_p): Likewise.
15721 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
15722 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
15723 (vectorizable_bswap): Likewise.
15724 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
15725 explicit encoding for the power-of-2 permutes.
15726 (vect_permute_store_chain): Likewise.
15727 (vect_grouped_load_supported): Likewise.
15728 (vect_permute_load_chain): Likewise.
15730 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15732 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
15733 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
15734 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
15735 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
15736 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
15737 (vect_gen_perm_mask_any): Likewise.
15739 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15741 * int-vector-builder.h: New file.
15742 * vec-perm-indices.h: Include int-vector-builder.h.
15743 (vec_perm_indices): Redefine as an int_vector_builder.
15744 (auto_vec_perm_indices): Delete.
15745 (vec_perm_builder): Redefine as a stand-alone class.
15746 (vec_perm_indices::vec_perm_indices): New function.
15747 (vec_perm_indices::clamp): Likewise.
15748 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
15749 (vec_perm_indices::new_vector): New function.
15750 (vec_perm_indices::new_expanded_vector): Update for new
15751 vec_perm_indices class.
15752 (vec_perm_indices::rotate_inputs): New function.
15753 (vec_perm_indices::all_in_range_p): Operate directly on the
15754 encoded form, without computing elided elements.
15755 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
15756 encoding. Update for new vec_perm_indices class.
15757 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
15758 the given vec_perm_builder.
15759 (expand_vec_perm_var): Update vec_perm_builder constructor.
15760 (expand_mult_highpart): Use vec_perm_builder instead of
15761 auto_vec_perm_indices.
15762 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
15763 vec_perm_indices instead of auto_vec_perm_indices. Use a single
15764 or double series encoding as appropriate.
15765 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
15766 vec_perm_indices instead of auto_vec_perm_indices.
15767 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
15768 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
15769 (vect_permute_store_chain): Likewise.
15770 (vect_grouped_load_supported): Likewise.
15771 (vect_permute_load_chain): Likewise.
15772 (vect_shift_permute_load_chain): Likewise.
15773 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
15774 (vect_transform_slp_perm_load): Likewise.
15775 (vect_schedule_slp_instance): Likewise.
15776 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
15777 (vectorizable_mask_load_store): Likewise.
15778 (vectorizable_bswap): Likewise.
15779 (vectorizable_store): Likewise.
15780 (vectorizable_load): Likewise.
15781 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
15782 vec_perm_indices instead of auto_vec_perm_indices. Use
15783 tree_to_vec_perm_builder to read the vector from a tree.
15784 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
15785 vec_perm_builder instead of a vec_perm_indices.
15786 (have_whole_vector_shift): Use vec_perm_builder and
15787 vec_perm_indices instead of auto_vec_perm_indices. Leave the
15788 truncation to calc_vec_perm_mask_for_shift.
15789 (vect_create_epilog_for_reduction): Likewise.
15790 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
15791 from auto_vec_perm_indices to vec_perm_indices.
15792 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
15793 instead of changing individual elements.
15794 (aarch64_vectorize_vec_perm_const): Use new_vector to install
15795 the vector in d.perm.
15796 * config/arm/arm.c (expand_vec_perm_d::perm): Change
15797 from auto_vec_perm_indices to vec_perm_indices.
15798 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
15799 instead of changing individual elements.
15800 (arm_vectorize_vec_perm_const): Use new_vector to install
15801 the vector in d.perm.
15802 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
15803 Update vec_perm_builder constructor.
15804 (rs6000_expand_interleave): Likewise.
15805 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
15806 (rs6000_expand_interleave): Likewise.
15808 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15810 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
15811 to qimode could truncate the indices.
15812 * optabs.c (expand_vec_perm_var): Likewise.
15814 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15816 * Makefile.in (OBJS): Add vec-perm-indices.o.
15817 * vec-perm-indices.h: New file.
15818 * vec-perm-indices.c: Likewise.
15819 * target.h (vec_perm_indices): Replace with a forward class
15821 (auto_vec_perm_indices): Move to vec-perm-indices.h.
15822 * optabs.h: Include vec-perm-indices.h.
15823 (expand_vec_perm): Delete.
15824 (selector_fits_mode_p, expand_vec_perm_var): Declare.
15825 (expand_vec_perm_const): Declare.
15826 * target.def (vec_perm_const_ok): Replace with...
15827 (vec_perm_const): ...this new hook.
15828 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
15829 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
15830 * doc/tm.texi: Regenerate.
15831 * optabs.def (vec_perm_const): Delete.
15832 * doc/md.texi (vec_perm_const): Likewise.
15833 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
15834 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
15835 expand_vec_perm for constant permutation vectors. Assert that
15836 the mode of variable permutation vectors is the integer equivalent
15837 of the mode that is being permuted.
15838 * optabs-query.h (selector_fits_mode_p): Declare.
15839 * optabs-query.c: Include vec-perm-indices.h.
15840 (selector_fits_mode_p): New function.
15841 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
15842 is defined, instead of checking whether the vec_perm_const_optab
15843 exists. Use targetm.vectorize.vec_perm_const instead of
15844 targetm.vectorize.vec_perm_const_ok. Check whether the indices
15845 fit in the vector mode before using a variable permute.
15846 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
15847 vec_perm_indices instead of an rtx.
15848 (expand_vec_perm): Replace with...
15849 (expand_vec_perm_const): ...this new function. Take the selector
15850 as a vec_perm_indices rather than an rtx. Also take the mode of
15851 the selector. Update call to shift_amt_for_vec_perm_mask.
15852 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
15853 Use vec_perm_indices::new_expanded_vector to expand the original
15854 selector into bytes. Check whether the indices fit in the vector
15855 mode before using a variable permute.
15856 (expand_vec_perm_var): Make global.
15857 (expand_mult_highpart): Use expand_vec_perm_const.
15858 * fold-const.c: Includes vec-perm-indices.h.
15859 * tree-ssa-forwprop.c: Likewise.
15860 * tree-vect-data-refs.c: Likewise.
15861 * tree-vect-generic.c: Likewise.
15862 * tree-vect-loop.c: Likewise.
15863 * tree-vect-slp.c: Likewise.
15864 * tree-vect-stmts.c: Likewise.
15865 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
15867 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
15868 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
15869 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
15870 (aarch64_vectorize_vec_perm_const): ...this new function.
15871 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
15872 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
15873 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
15874 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
15875 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
15876 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
15877 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
15879 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
15880 check for NEON modes.
15881 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
15882 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
15883 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
15884 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
15886 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
15887 the old VEC_PERM_CONST conditions.
15888 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
15889 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
15890 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
15891 (ia64_vectorize_vec_perm_const_ok): Merge into...
15892 (ia64_vectorize_vec_perm_const): ...this new function.
15893 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
15894 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
15895 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
15896 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
15897 * config/mips/mips.c (mips_expand_vec_perm_const)
15898 (mips_vectorize_vec_perm_const_ok): Merge into...
15899 (mips_vectorize_vec_perm_const): ...this new function.
15900 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
15901 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
15902 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
15903 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
15904 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
15905 (rs6000_expand_vec_perm_const): Delete.
15906 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
15908 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
15909 (altivec_expand_vec_perm_const_le): Take each operand individually.
15910 Operate on constant selectors rather than rtxes.
15911 (altivec_expand_vec_perm_const): Likewise. Update call to
15912 altivec_expand_vec_perm_const_le.
15913 (rs6000_expand_vec_perm_const): Delete.
15914 (rs6000_vectorize_vec_perm_const_ok): Delete.
15915 (rs6000_vectorize_vec_perm_const): New function.
15916 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
15917 an element count and rtx array.
15918 (rs6000_expand_extract_even): Update call accordingly.
15919 (rs6000_expand_interleave): Likewise.
15920 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
15921 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
15922 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
15923 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
15924 (rs6000_expand_vec_perm_const): Delete.
15925 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
15926 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
15927 (altivec_expand_vec_perm_const_le): Take each operand individually.
15928 Operate on constant selectors rather than rtxes.
15929 (altivec_expand_vec_perm_const): Likewise. Update call to
15930 altivec_expand_vec_perm_const_le.
15931 (rs6000_expand_vec_perm_const): Delete.
15932 (rs6000_vectorize_vec_perm_const_ok): Delete.
15933 (rs6000_vectorize_vec_perm_const): New function. Remove stray
15934 reference to the SPE evmerge intructions.
15935 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
15936 an element count and rtx array.
15937 (rs6000_expand_extract_even): Update call accordingly.
15938 (rs6000_expand_interleave): Likewise.
15939 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
15940 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
15942 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
15944 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15946 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
15947 vector mode and that that mode matches the mode of the data
15949 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
15950 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
15951 directly using expand_vec_perm_1 when forcing selectors into
15953 (expand_vec_perm_var): New function, split out from expand_vec_perm.
15955 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15957 * optabs-query.h (can_vec_perm_p): Delete.
15958 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
15959 * optabs-query.c (can_vec_perm_p): Split into...
15960 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
15961 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
15962 particular selector is valid.
15963 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
15964 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
15965 (vect_grouped_load_supported): Likewise.
15966 (vect_shift_permute_load_chain): Likewise.
15967 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
15968 (vect_transform_slp_perm_load): Likewise.
15969 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
15970 (vectorizable_bswap): Likewise.
15971 (vect_gen_perm_mask_checked): Likewise.
15972 * fold-const.c (fold_ternary_loc): Likewise. Don't take
15973 implementations of variable permutation vectors into account
15974 when deciding which selector to use.
15975 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
15976 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
15977 with a false third argument.
15978 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
15979 to test whether the constant selector is valid and can_vec_perm_var_p
15980 to test whether a variable selector is valid.
15982 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15984 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
15985 * optabs-query.c (can_vec_perm_p): Likewise.
15986 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
15987 instead of vec_perm_indices.
15988 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
15989 (vect_gen_perm_mask_checked): Likewise,
15990 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
15991 (vect_gen_perm_mask_checked): Likewise,
15993 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15995 * optabs-query.h (qimode_for_vec_perm): Declare.
15996 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
15997 (qimode_for_vec_perm): ...this new function.
15998 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
16000 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16002 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
16003 does not have a conditional at the top.
16005 2018-01-02 Richard Biener <rguenther@suse.de>
16007 * ipa-inline.c (big_speedup_p): Fix expression.
16009 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
16012 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
16015 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
16019 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
16020 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
16021 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
16022 cond_taken_branch_cost 3->4.
16024 2018-01-01 Jakub Jelinek <jakub@redhat.com>
16026 PR tree-optimization/83581
16027 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
16028 TODO_cleanup_cfg if any changes have been made.
16030 PR middle-end/83608
16031 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
16032 convert_modes if target mode has the right side, but different mode
16035 PR middle-end/83609
16036 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
16037 last argument when extracting from CONCAT. If either from_real or
16038 from_imag is NULL, use expansion through memory. If result is not
16039 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
16040 the parts directly to inner mode, if even that fails, use expansion
16043 PR middle-end/83623
16044 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
16045 check for bswap in mode rather than HImode and use that in expand_unop
16048 Copyright (C) 2018 Free Software Foundation, Inc.
16050 Copying and distribution of this file, with or without modification,
16051 are permitted in any medium without royalty provided the copyright
16052 notice and this notice are preserved.