1 2018-08-27 David Malcolm <dmalcolm@redhat.com>
4 * diagnostic-show-locus.c (class layout_range): Update for
5 conversion of show_caret_p to a tri-state.
6 (layout_range::layout_range): Likewise.
7 (make_range): Likewise.
8 (layout::maybe_add_location_range): Likewise.
9 (layout::should_print_annotation_line_p): Don't show annotation
10 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
11 (layout::get_state_at_point): Update for conversion of
12 show_caret_p to a tri-state. Bail out early for
13 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
14 underlining or source colorization.
15 (gcc_rich_location::add_location_if_nearby): Update for conversion
16 of show_caret_p to a tri-state.
17 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
18 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
20 (selftest::test_one_liner_labels): Likewise.
21 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
22 conversion of show_caret_p to a tri-state.
23 * pretty-print.c (text_info::set_location): Likewise.
24 * pretty-print.h (text_info::set_location): Likewise.
25 * substring-locations.c (format_warning_n_va): Likewise.
26 * tree-diagnostic.c (default_tree_printer): Likewise.
27 * tree-pretty-print.c (newline_and_indent): Likewise.
29 2018-08-27 David Malcolm <dmalcolm@redhat.com>
32 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
33 line above for line-insertion fix-it hints.
34 (selftest::test_fixit_insert_containing_newline): Update the
35 expected results, and add a test with line-numbering enabled.
37 2018-08-27 Martin Liska <mliska@suse.cz>
40 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
41 params with DECL_HAS_VALUE_EXPR_P.
43 2018-08-27 Martin Liska <mliska@suse.cz>
45 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
46 selected expansion strategy.
48 2018-08-27 Martin Liska <mliska@suse.cz>
50 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
51 * builtins.c (is_builtin_fn): Likewise.
52 * attribs.c (diag_attr_exclusions): Use new function
53 fndecl_built_in_p and remove check for FUNCTION_DECL if
55 (builtin_mathfn_code): Likewise.
56 (fold_builtin_expect): Likewise.
57 (fold_call_expr): Likewise.
58 (fold_builtin_call_array): Likewise.
59 (fold_call_stmt): Likewise.
60 (set_builtin_user_assembler_name): Likewise.
61 (is_simple_builtin): Likewise.
62 * calls.c (gimple_alloca_call_p): Likewise.
63 (maybe_warn_nonstring_arg): Likewise.
64 * cfgexpand.c (expand_call_stmt): Likewise.
65 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
66 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
67 (cgraph_node::verify_node): Likewise.
68 * cgraphclones.c (build_function_decl_skip_args): Likewise.
69 (cgraph_node::create_clone): Likewise.
70 * config/arm/arm.c (arm_insert_attributes): Likewise.
71 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
72 * dse.c (scan_insn): Likewise.
73 * expr.c (expand_expr_real_1): Likewise.
74 * fold-const.c (operand_equal_p): Likewise.
75 (fold_binary_loc): Likewise.
76 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
77 * gimple-low.c (lower_stmt): Likewise.
78 * gimple-pretty-print.c (dump_gimple_call): Likewise.
79 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
80 * gimple.c (gimple_build_call_from_tree): Likewise.
81 (gimple_call_builtin_p): Likewise.
82 (gimple_call_combined_fn): Likewise.
83 * gimplify.c (gimplify_call_expr): Likewise.
84 (gimple_boolify): Likewise.
85 (gimplify_modify_expr): Likewise.
86 (gimplify_addr_expr): Likewise.
87 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
88 * ipa-cp.c (determine_versionability): Likewise.
89 * ipa-fnsummary.c (compute_fn_summary): Likewise.
90 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
91 * ipa-split.c (visit_bb): Likewise.
92 (split_function): Likewise.
93 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
94 * lto-cgraph.c (input_node): Likewise.
95 * lto-streamer-out.c (write_symbol): Likewise.
96 * omp-low.c (setjmp_or_longjmp_p): Likewise.
97 (lower_omp_1): Likewise.
98 * predict.c (strip_predict_hints): Likewise.
99 * print-tree.c (print_node): Likewise.
100 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
101 * trans-mem.c (is_tm_irrevocable): Likewise.
102 (is_tm_load): Likewise.
103 (is_tm_simple_load): Likewise.
104 (is_tm_store): Likewise.
105 (is_tm_simple_store): Likewise.
106 (is_tm_abort): Likewise.
107 (tm_region_init_1): Likewise.
108 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
109 * tree-cfg.c (verify_gimple_call): Likewise.
110 (move_stmt_r): Likewise.
111 (stmt_can_terminate_bb_p): Likewise.
112 * tree-eh.c (lower_eh_constructs_2): Likewise.
113 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
114 * tree-inline.c (remap_gimple_stmt): Likewise.
116 (estimate_num_insns): Likewise.
117 (fold_marked_statements): Likewise.
118 * tree-sra.c (scan_function): Likewise.
119 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
120 (optimize_stack_restore): Likewise.
121 (pass_fold_builtins::execute): Likewise.
122 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
123 (mark_all_reaching_defs_necessary_1): Likewise.
124 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
125 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
126 (pass_forwprop::execute): Likewise.
127 * tree-ssa-loop-im.c (stmt_cost): Likewise.
128 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
129 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
130 * tree-ssa-strlen.c (get_string_length): Likewise.
131 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
132 (find_func_aliases_for_call): Likewise.
133 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
134 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
135 * tree-tailcall.c (find_tail_calls): Likewise.
136 * tree.c (need_assembler_name_p): Likewise.
137 (free_lang_data_in_decl): Likewise.
138 (get_call_combined_fn): Likewise.
139 * ubsan.c (is_ubsan_builtin_p): Likewise.
140 * varasm.c (incorporeal_function_p): Likewise.
141 * tree.h (DECL_BUILT_IN): Remove and replace with
143 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
144 (fndecl_built_in_p): New.
146 2018-08-27 Martin Liska <mliska@suse.cz>
148 PR tree-optimization/86847
149 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
150 Dump also subtree probability.
151 (switch_decision_tree::do_jump_if_equal): New function.
152 (switch_decision_tree::emit_case_nodes): Handle special
153 situations in balanced tree that can be emitted much simpler.
154 Fix calculation of probabilities that happen in tree expansion.
155 * tree-switch-conversion.h (struct cluster): Add
157 (struct simple_cluster): Likewise.
158 (struct case_tree_node): Add new function has_child.
159 (do_jump_if_equal): New.
161 2018-08-27 Martin Liska <mliska@suse.cz>
163 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
164 Add new argument to bit_test_cluster constructor.
165 (bit_test_cluster::emit): Set bits really number of values
167 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
168 probability argument.
169 * tree-switch-conversion.h (struct bit_test_cluster):
170 Add m_handles_entire_switch.
172 2018-08-27 Martin Liska <mliska@suse.cz>
174 PR tree-optimization/86702
175 * tree-switch-conversion.c (jump_table_cluster::emit):
176 Make probabilities even for values in jump table
177 according to number of cases handled.
178 (switch_decision_tree::compute_cases_per_edge): Pass
179 argument to reset_out_edges_aux function.
180 (switch_decision_tree::analyze_switch_statement): Likewise.
181 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
184 2018-08-27 Martin Liska <mliska@suse.cz>
186 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
187 cfun argument explicitly.
188 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
189 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
190 function gimple_switch_default_bb.
191 (convert_switch_statements):
193 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
194 * stmt.c (label_to_block_fn): Use label_to_block and pass
195 cfun argument explicitly and use gimple_switch_label_bb.
196 (expand_case): Likewise.
197 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
198 cfun argument explicitly. Likewise.
199 (make_edges_bb): Likewise.
200 (make_cond_expr_edges): Likewise.
201 (get_cases_for_edge): Likewise.
202 (make_gimple_switch_edges): Likewise.
203 (label_to_block_fn): Likewise.
204 (label_to_block): Likewise.
205 (make_goto_expr_edges): Likewise.
206 (make_gimple_asm_edges): Likewise.
207 (main_block_label): Likewise.
208 (group_case_labels_stmt): Likewise.
209 (find_taken_edge_computed_goto): Likewise.
210 (find_taken_edge_switch_expr): Likewise.
211 (gimple_verify_flow_info): Likewise.
212 (gimple_redirect_edge_and_branch): Likewise.
213 (gimple_switch_label_bb): New function.
214 (gimple_switch_default_bb): Likewise.
215 (gimple_switch_edge): Likewise.
216 (gimple_switch_default_edge): Likewise.
217 * tree-cfg.h (label_to_block_fn): Remove and replace ...
218 (label_to_block): ... with this.
219 (gimple_switch_label_bb): New.
220 (gimple_switch_default_bb): Likewise.
221 (gimple_switch_edge): Likewise.
222 (gimple_switch_default_edge): Likewise.
223 * tree-cfgcleanup.c (convert_single_case_switch): Use
224 new gimple functions and pass new argument to label_to_block.
225 (cleanup_control_flow_bb):
226 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
227 cfun argument explicitly.
228 (make_eh_edges): Likewise.
229 (redirect_eh_dispatch_edge): Likewise.
230 (lower_resx): Likewise.
231 (lower_eh_dispatch): Likewise.
232 (maybe_remove_unreachable_handlers): Likewise.
233 (unsplit_eh): Likewise.
234 (cleanup_empty_eh): Likewise.
235 (verify_eh_edges): Likewise.
236 (verify_eh_dispatch_edge): Likewise.
237 * tree-ssa-dom.c (record_edge_info): Likewise.
238 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
239 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
240 (thread_through_normal_block): Likewise.
241 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
242 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
243 * tree-switch-conversion.c (switch_conversion::collect): Use new
245 (switch_conversion::check_final_bb): Likewise.
246 (switch_conversion::gather_default_values): Pass new argument
248 (switch_conversion::build_constructors): Likewise.
249 (switch_decision_tree::compute_cases_per_edge): Use new
250 gimple_switch_edge function.
251 (switch_decision_tree::analyze_switch_statement): Pass new argument
253 (switch_decision_tree::try_switch_expansion): Use
254 gimple_switch_default_edge.
255 * tree-vrp.c (find_switch_asserts): Pass new argument
257 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
258 (vr_values::simplify_switch_using_ranges): Likewise.
260 2018-08-27 Richard Biener <rguenther@suse.de>
262 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
263 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
265 * tree-ssa-sccvn.h (struct vn_pval): New structure.
266 (struct vn_nary_op_s): Add unwind_to member. Add
267 predicated_values flag and put result into a union together
268 with a linked list of vn_pval.
269 (struct vn_ssa_aux): Add name member to make maintaining
270 a map of SSA name to vn_ssa_aux possible. Remove no longer
271 needed info, dfsnum, low, visited, on_sccstack, use_processed
272 and range_info_anti_range_p members.
273 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
274 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
276 (vn_valueize): New global.
277 (vn_context_bb): Likewise.
278 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
279 VN_INFO_PTR_INFO): Remove.
280 * tree-ssa-sccvn.c: ... (rewrite)
281 (pass_fre::execute): For -O2+ initialize loops and run
282 RPO VN in optimistic mode (iterating). For -O1 and -Og
283 run RPO VN in non-optimistic mode.
284 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
285 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
286 * doc/invoke.texi (sccvn-max-scc-size): Remove.
287 (rpo-vn-max-loop-depth): Document.
288 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
289 when valuezing the VUSE signals we walked out of the region.
290 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
291 (phi_translate): Set VN context block to use for availability
293 (compute_avail): Likewise.
294 (pre_valueize): New function.
295 (pass_pre::execute): Adjust to the RPO VN API.
297 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
298 (propagate_constants_for_unrolling): Remove.
299 (tree_unroll_loops_completely): Perform value-numbering
300 on the unrolled bodies loop parent.
302 2018-08-27 Richard Biener <rguenther@suse.de>
304 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
305 for partial antic compute.
307 2018-08-27 Jakub Jelinek <jakub@redhat.com>
309 PR rtl-optimization/87065
310 * combine.c (simplify_if_then_else): Formatting fix.
311 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
313 (known_cond): Don't return const_true_rtx for vector modes. Use
314 CONST0_RTX instead of const0_rtx. Formatting fixes.
316 2018-08-27 Martin Liska <mliska@suse.cz>
318 PR gcov-profile/87069
319 * gcov.c (process_file): Record files already processed
320 and warn about a file being processed multiple times.
322 2018-08-27 Martin Liska <mliska@suse.cz>
325 * config/aarch64/aarch64.c (aarch64_override_options_internal):
326 Set default values for x_aarch64_*_string strings.
327 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
328 prefix. For -mabi do not print '=ABI' in help and use
329 <option_value> format for -msve-vector-bits and -moverride
332 2018-08-26 Jeff Law <law@redhat.com>
334 * config/mips/frame-header-opt.c: Include "backend.h" rather than
337 2018-08-26 Marek Polacek <polacek@redhat.com>
339 PR c++/87029, Implement -Wredundant-move.
340 * doc/invoke.texi: Document -Wredundant-move.
342 2018-08-25 Martin Sebor <msebor@redhat.com>
344 PR tree-optimization/87059
345 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
346 to the same type as the other.
347 * fold-const.c (fold_binary_loc): Assert expectation.
349 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
351 * config/darwin.c (machopic_legitimize_pic_address): Clean up
352 extraneous parentheses, dead code section and formatting.
354 2018-08-24 David Malcolm <dmalcolm@redhat.com>
357 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
358 wide enough for jumps in the line-numbering to be visible.
359 (layout::print_gap_in_line_numbering): New member function.
360 (layout::calculate_line_spans): When using line numbering, merge
361 line spans that are only 1 line apart.
362 (diagnostic_show_locus): When printing line numbers, show gaps in
363 line numbering directly, rather than printing headers.
364 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
365 line-numbering with multiple line spans.
366 (selftest::test_fixit_insert_containing_newline_2): Add test of
367 line-numbering, in which the spans are close enough to be merged.
369 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
371 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
372 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
373 * tree-vrp.c (range_is_nonnull): Remove.
374 (range_includes_zero_p): Accept value_range instead of min/max.
375 (extract_range_from_binary_expr_1): Do not early bail on
377 Use range_includes_zero_p instead of range_is_nonnull.
378 (extract_range_from_unary_expr): Use range_includes_zero_p instead
380 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
381 special case VR_ANTI_RANGE.
382 (vrp_finalize): Same.
383 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
385 (range_is_nonnull): Remove.
386 * vr-values.c (vrp_stmt_computes_nonzero): Use
387 range_includes_zero_p instead of range_is_nonnull.
388 (extract_range_basic): Pass value_range to range_includes_zero_p
389 instead of range_is_nonnull.
391 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
393 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
394 * emit-rtl.h (rtl_data): Remove return_bnd.
395 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
396 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
397 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
398 (POINTER_BOUNDS_MODE): Remove definition.
399 (make_pointer_bounds_mode): Remove.
400 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
401 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
402 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
403 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
404 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
405 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
406 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
408 * config/i386/i386-modes.def (BND32, BND64): Remove.
409 * config/i386/i386.c (dbx_register_map): Remove bound registers.
410 (dbx64_register_map): Ditto.
411 (svr4_dbx_register_map): Ditto.
412 (indirect_thunk_bnd_needed): Remove.
413 (indirect_thunks_bnd_used): Ditto.
414 (indirect_return_bnd_needed): Ditto.
415 (indirect_return_via_cx_bnd): Ditto.
416 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
417 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
418 (output_indirect_thunk): Ditto. Remove need_prefix argument.
419 (output_indirect_thunk_function): Remove handling of
420 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
421 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
422 (ix86_save_reg): Remove handling of crtl->return_bnd.
423 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
424 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
425 and UNSPEC_BNDLX_ADDR.
426 (ix86_output_indirect_branch_via_reg): Remove handling of
427 indirect_thunk_prefix_bnd.
428 (ix86_output_indirect_branch_via_push): Ditto.
429 (ix86_output_function_return): Ditto.
430 (ix86_output_indirect_function_return): Ditto.
431 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
432 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
433 (CALL_USED_REGISTERS): Ditto.
434 (REG_ALLOC_ORDER): Update for removal of bound registers.
435 (HI_REGISTER_NAMES): Ditto.
436 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
437 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
438 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
439 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
440 (FIRST_PSEUDO_REG): Update.
441 (BND): Remove mode iterator.
442 * config/i386/predicates.md (bnd_mem_operator): Remove.
444 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
446 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
449 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
451 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
452 the case in which the permute needs only a single element and
453 repeats for every vector of the result. Extend that case to
454 handle variable-length vectors.
455 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
457 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
460 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
461 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
463 2018-08-24 Richard Biener <rguenther@suse.de>
465 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
466 bb_flags_allocated members.
467 (auto_flag): New RAII class for allocating flags.
468 (auto_edge_flag): New RAII class for allocating edge flags.
469 (auto_bb_flag): New RAII class for allocating bb flags.
470 * cfgloop.c (verify_loop_structure): Allocate temporary edge
472 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
473 in favor of temporarily allocated BB flag.
474 * hsa-brig.c: Re-order includes.
475 * hsa-dump.c: Likewise.
476 * hsa-regalloc.c: Likewise.
477 * print-rtl.c: Likewise.
478 * profile-count.c: Likewise.
480 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
483 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
486 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
489 * wide-int-range.cc (wide_int_range_div): Do not ignore result
490 from wide_int_range_multiplicative_op.
492 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
494 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
497 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
499 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
502 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
504 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
505 full GENERIC expression used for replacement.
507 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
509 * tree-vrp.c (abs_extent_range): Remove.
510 (extract_range_into_wide_ints): Pass wide ints by reference.
511 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
512 Pass wide ints by reference in all calls to
513 extract_range_into_wide_ints.
514 * wide-int-range.cc (wide_int_range_div): New.
515 * wide-int-range.h (wide_int_range_div): New.
516 (wide_int_range_includes_zero_p): New.
517 (wide_int_range_zero_p): New.
519 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
521 * config/aarch64/aarch64.md (arches): New enum.
522 (arch): New enum attr.
523 (arch_enabled): New attr.
524 (enabled): Now uses arch_enabled only.
525 (simd, sve, fp16): Removed attribute.
526 (fp): Attr now defined in terms of 'arch'.
527 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
528 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
529 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
530 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
531 attributes into 'arch'.
532 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
533 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
534 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
535 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
536 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
537 'simd' attribute into 'arch'.
538 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
539 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
540 Convert use of 'fp' attribute to 'arch'.
541 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
542 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
544 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
545 (different modes) Merge 'fp' and 'simd' into 'arch'.
546 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
549 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
551 PR rtl-optimization/87026
552 * expmed.c (canonicalize_comparison): If we can no longer create
553 pseudoregisters, don't.
555 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
558 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
560 * config/arm/arm.c (speculation_barrier_libfunc): New static
562 (arm_init_libfuncs): Initialize it.
563 (arm_emit_speculation_barrier): New function.
564 * config/arm/arm.md (speculation_barrier): Call
565 arm_emit_speculation_barrier for architectures that do not have
567 (speculation_barrier_insn): Only match on Armv7 or later.
569 2018-08-23 Richard Biener <rguenther@suse.de>
572 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
575 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
577 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
578 of single-vector TBLs.
579 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
582 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
585 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
586 aarch64_evpc_tbl guard.
588 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
590 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
593 2018-08-22 Martin Sebor <msebor@redhat.com>
596 * tree-pretty-print.c (pretty_print_string): Add argument.
597 (dump_generic_node): Call to pretty_print_string with string size.
599 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
601 PR rtl-optimization/86771
602 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
603 of two SETs into those two SETs, one to be placed at i2, if that SETs
604 destination is modified between i2 and i3.
606 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
608 PR tree-optimization/86725
609 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
611 (vect_analyze_scalar_cycles_1): Check it.
613 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
615 PR tree-optimization/86725
616 * tree-vect-loop.c (vect_is_simple_reduction): When treating
617 an outer loop phi as a double reduction, make sure that the
618 single user of the phi result is an inner loop phi.
620 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
622 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
623 grouped stores with gaps to a strided group.
625 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
627 * tree-vect-stmts.c (get_group_load_store_type)
628 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
629 first statement in a group.
631 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
633 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
634 the sequence used in gcc/gcc.c.
636 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
639 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
642 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
644 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
645 Darwin10-specific unwinder-shim.
646 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
647 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
648 New to cater for Darwin10 Rosetta.
650 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
652 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
653 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
655 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
660 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
661 (dwarf2out_switch_text_section): Generate a local label for the
662 second function sub-section and apply it as the second FDE start
664 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
665 second sub-section start.
667 2018-08-22 Richard Biener <rguenther@suse.de>
669 PR tree-optimization/86988
670 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
672 2018-08-22 Richard Biener <rguenther@suse.de>
674 PR tree-optimization/86945
675 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
677 2018-08-22 Alexandre Oliva <oliva@adacore.com>
679 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
680 a comment about how uses of r2 for .sdata2 come about.
682 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
684 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
686 2018-08-21 Marek Polacek <polacek@redhat.com>
688 PR c++/86981, Implement -Wpessimizing-move.
689 * doc/invoke.texi: Document -Wpessimizing-move.
691 2018-08-21 Jan Hubicka <jh@suse.cz>
693 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
694 * tree.h (is_redundant_typedef): Remove.
695 * dwarf2out.c (is_redundant_typedef): Turn into static function.
697 2018-08-21 Jan Hubicka <jh@suse.cz>
699 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
702 2018-08-21 Tamar Christina <tamar.christina@arm.com>
704 * expmed.c (extract_low_bits): Reject invalid subregs early.
706 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
709 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
712 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
714 * config/vxworks.h: Guard vxworks_asm_out_constructor and
715 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
716 * config/vxworks.c: Likewise.
718 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
720 * config/vxworks.c: Set targetm.have_ctors_dtors
721 if HAVE_INITFINI_ARRAY_SUPPORT.
722 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
723 if HAVE_INITFINI_ARRAY_SUPPORT.
725 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
727 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
728 default search path for VxWorks < 7.
730 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
732 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
733 (get_format_string): Refer to c_getstr.
735 2018-08-21 Tom de Vries <tdevries@suse.de>
737 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
738 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
739 (debuginfo_early_stop): Declare.
740 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
741 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
742 (debuginfo_early_stop): New function.
743 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
744 and debuginfo_early_stop.
745 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
746 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
747 (general_init): Call debuginfo_early_init.
748 (finalize): Call debuginfo_fini.
749 (do_compile): Call debuginfo_init.
750 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
752 (@item -fdump-debug, @item -fdump-earlydebug): Add.
754 2018-08-21 Tom de Vries <tdevries@suse.de>
756 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
757 flag_dump_noaddr and flag_dump_unnumbered.
759 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
761 * wide-int-range.cc (wide_int_range_abs): New.
762 (wide_int_range_order_set): Rename from wide_int_range_min_max.
763 * wide-int-range.h (wide_int_range_abs): New.
764 (wide_int_range_min_max): New.
765 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
766 case to call wide_int_range_abs.
767 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
768 (extract_range_from_abs_expr): Delete.
770 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
773 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
774 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
777 2018-08-20 Nathan Sidwell <nathan@acm.org>
778 Jeff Law <law@redhat.com>
780 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
781 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
783 2018-08-20 David Malcolm <dmalcolm@redhat.com>
786 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
787 (decl_attributes): Likewise.
788 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
790 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
791 * diagnostic-core.h (class auto_diagnostic_group): New class.
792 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
793 (diagnostic_report_diagnostic): Handle the first diagnostics within
795 (emit_diagnostic): Add auto_diagnostic_group instance.
797 (inform_n): Likewise.
799 (warning_at): Likewise.
800 (warning_n): Likewise.
802 (permerror): Likewise.
805 (error_at): Likewise.
807 (fatal_error): Likewise.
808 (internal_error): Likewise.
809 (internal_error_no_backtrace): Likewise.
810 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
811 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
812 * diagnostic.h (struct diagnostic_context): Add fields
813 "diagnostic_group_nesting_depth",
814 "diagnostic_group_emission_count", "begin_group_cb",
816 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
817 Add auto_diagnostic_group instance(s).
818 (find_explicit_erroneous_behavior): Likewise.
819 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
820 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
821 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
822 (gimplify_va_arg_expr): Likewise.
823 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
824 (HSA_SORRY_AT): Likewise.
825 * ipa-devirt.c (compare_virtual_tables): Likewise.
826 (warn_odr): Likewise.
827 * multiple_target.c (expand_target_clones): Likewise.
828 * opts-common.c (cmdline_handle_error): Likewise.
829 * reginfo.c (globalize_reg): Likewise.
830 * substring-locations.c (format_warning_n_va): Likewise.
831 * tree-inline.c (expand_call_inline): Likewise.
832 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
833 * tree-ssa-loop-niter.c
834 (do_warn_aggressive_loop_optimizations): Likewise.
835 * tree-ssa-uninit.c (warn_uninit): Likewise.
836 * tree.c (warn_deprecated_use): Likewise.
838 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
841 * config/i386/i386.md (eh_return): Always update EH return
842 address in word_mode.
844 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
846 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
847 TARGET_SPLIT_COMPLEX_ARG is defined.
849 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
851 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
853 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
856 * expr.c (expand_assignment): Assert that bitpos is positive.
857 (store_field): Likewise
858 (expand_expr_real_1): Make sure that bitpos is positive.
859 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
862 2018-08-20 Nathan Sidwell <nathan@acm.org>
864 * Makefile.in (CPP_ID_DATA_H): Delete.
865 (CPP_INTERNAL_H): Don't add it.
866 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
867 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
869 2018-08-20 Richard Biener <rguenther@suse.de>
871 PR tree-optimization/78655
872 * tree-vrp.c (extract_range_from_binary_expr_1): Make
873 pointer + offset nonnull if either operand is nonnull work.
875 2018-08-20 Tom de Vries <tdevries@suse.de>
877 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
878 unless the referenced die describes the added property using
879 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
880 Otherwise, add a DW_AT_location to the referenced die.
882 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
885 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
886 register_operand when calling ix86_set_reg_reg_cost.
887 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
888 Set *total to 0 for operands that satisfy x86_64_immediate_operand
889 predicate and to 1 otherwise.
891 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
893 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
894 emit a diagnostic that it is not supported and reset the option.
895 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
896 supported and consume the option. (ASM_FINAL_SPEC): New.
898 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
900 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
903 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
905 C-SKY port: Documentation
907 * doc/extend.texi (C-SKY Function Attributes): New section.
908 * doc/invoke.texi (Option Summary): Add C-SKY options.
909 (C-SKY Options): New section.
910 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
912 2018-08-17 Jojo <jijie_rong@c-sky.com>
913 Huibin Wang <huibin_wang@c-sky.com>
914 Sandra Loosemore <sandra@codesourcery.com>
915 Chung-Lin Tang <cltang@codesourcery.com>
917 C-SKY port: Backend implementation
919 * config/csky/*: New.
920 * common/config/csky/*: New.
922 2018-08-17 Jojo <jijie_rong@c-sky.com>
923 Huibin Wang <huibin_wang@c-sky.com>
924 Sandra Loosemore <sandra@codesourcery.com>
925 Chung-Lin Tang <cltang@codesourcery.com>
926 Andrew Jenner <andrew@codesourcery.com>
928 C-SKY port: Configury
930 * config.gcc (csky-*-*): New.
931 * configure.ac: Add csky to targets for dwarf2 debug_line support.
932 * configure: Regenerated.
934 2018-08-17 David Malcolm <dmalcolm@redhat.com>
936 * dump-context.h: Include "dumpfile.h".
937 (dump_context::dump_printf_va): Convert final param from va_list
938 to va_list *. Convert from ATTRIBUTE_PRINTF to
939 ATTRIBUTE_GCC_DUMP_PRINTF.
940 (dump_context::dump_printf_loc_va): Likewise.
941 * dumpfile.c: Include "stringpool.h".
942 (make_item_for_dump_printf_va): Delete.
943 (make_item_for_dump_printf): Delete.
944 (class dump_pretty_printer): New class.
945 (dump_pretty_printer::dump_pretty_printer): New ctor.
946 (dump_pretty_printer::emit_items): New member function.
947 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
949 (dump_pretty_printer::emit_item): New member function.
950 (dump_pretty_printer::stash_item): New member function.
951 (dump_pretty_printer::format_decoder_cb): New member function.
952 (dump_pretty_printer::decode_format): New member function.
953 (dump_context::dump_printf_va): Reimplement in terms of
955 (dump_context::dump_printf_loc_va): Convert final param from va_list
957 (dump_context::begin_scope): Reimplement call to
958 make_item_for_dump_printf.
959 (dump_printf): Update for change to dump_printf_va.
960 (dump_printf_loc): Likewise.
961 (selftest::test_capture_of_dump_calls): Convert "stmt" from
962 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
964 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
965 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
966 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
967 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
968 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
969 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
970 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
971 within a dump_printf_loc call to "%wu".
972 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
973 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
974 missing space after "=".
975 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
976 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
977 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
978 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
979 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
980 duplicate "vectorized" from message.
982 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
984 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
985 polyNxK_t element's TYPE_STRING_FLAG.
987 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
989 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
990 (they were unnamed before). Fix comments.
992 2018-08-17 Nathan Sidwell <nathan@acm.org>
994 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
996 2018-08-17 Richard Biener <rguenther@suse.de>
998 PR tree-optimization/86841
999 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
1001 2018-08-17 Martin Liska <mliska@suse.cz>
1003 * common.opt: Remove Warn, Init and Report for options with
1004 Ignore/Deprecated flag. Warning is done automatically for
1006 * config/i386/i386.opt: Likewise.
1007 * config/ia64/ia64.opt: Likewise.
1008 * config/rs6000/rs6000.opt: Likewise.
1009 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
1010 Remove usage of flag_check_pointer_bounds.
1011 * lto-wrapper.c (merge_and_complain): Do not handle
1012 OPT_fcheck_pointer_bounds.
1013 (append_compiler_options): Likewise.
1014 * opt-functions.awk: Do not handle Deprecated.
1015 * optc-gen.awk: Check that Var, Report and Init are not
1016 used for an option with Ignore/Deprecated flag.
1017 * opts-common.c (decode_cmdline_option): Do not report
1019 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
1021 * opts.h (struct cl_option): Remove cl_deprecated flag.
1022 (CL_ERR_DEPRECATED): Remove error enum value.
1024 2018-08-17 Richard Biener <rguenther@suse.de>
1027 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
1028 across a va-arg-pack using call adjust its return value accordingly.
1030 2018-08-16 Martin Sebor <msebor@redhat.com>
1032 PR tree-optimization/86853
1033 * gimple-ssa-sprintf.c (struct format_result): Rename member.
1034 (struct fmtresult): Add member and initialize it in ctors.
1035 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
1036 (format_string): Handle %S the same as %ls. Set MAYFAIL.
1037 (format_directive): Set POSUNDER4K when MAYFAIL is set.
1038 (parse_directive): Handle %C same as %c.
1039 (sprintf_dom_walker::compute_format_length): Adjust.
1040 (is_call_safe): Adjust.
1042 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1044 * builtins.c (c_strlen): Add new parameter eltsize. Use it
1045 for determining how to count the elements.
1046 * builtins.h (c_strlen): Adjust prototype.
1047 * expr.c (string_constant): Add new parameter mem_size.
1048 Set *mem_size appropriately.
1049 * expr.h (string_constant): Adjust protoype.
1050 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
1051 * gimple-fold.h (get_range_strlen): Adjust prototype.
1052 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
1053 (format_string): Call get_string_length with eltsize.
1055 2018-08-16 David Malcolm <dmalcolm@redhat.com>
1057 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
1058 to emit the span, rather than setting it as the prefix.
1060 2018-08-16 David Malcolm <dmalcolm@redhat.com>
1062 * diagnostic-show-locus.c (layout::start_annotation_line): Add
1063 "margin_char" parameter, defaulting to space. Use it in place
1064 of pp_space for the initial part of the margin.
1065 (layout::print_leading_fixits): Use '+' when filling the margin
1066 of line-insertion fix-it hints.
1068 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1070 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
1073 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1075 * config/rs6000/altivec.md: Don't set length attribute to the default
1077 * config/rs6000/darwin.md: Ditto.
1078 * config/rs6000/dfp.md: Ditto.
1079 * config/rs6000/htm.md: Ditto.
1080 * config/rs6000/rs6000.md: Ditto.
1081 * config/rs6000/sync.md: Ditto.
1082 * config/rs6000/vsx.md: Ditto.
1084 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1086 * config/rs6000/altivec.md: Don't set length attribute to the default
1087 value, for branch instructions.
1088 * config/rs6000/darwin.md: Ditto.
1089 * config/rs6000/rs6000.md: Ditto.
1091 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1093 * config/rs6000/rs6000.md (length): Always define as const_int 4.
1094 (unnamed conditional branch define_insn): Set length to 4 or 8
1095 depending on offset.
1096 (<bd>_<mode>): Similar, for alternative 0.
1097 (<bd>tf_<mode>): Ditto.
1099 2018-08-16 Tamar Christina <tamar.christina@arm.com>
1101 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
1103 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
1105 * doc/rtl.texi: Replace old RTX class names with new names.
1108 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
1110 * expmed.h (canonicalize_comparison): New declaration.
1111 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
1112 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
1113 * optabs.c (prepare_cmp_insn): Likewise.
1114 * rtl.h (unsigned_condition_p): New function which checks if a
1115 comparison operator is unsigned.
1117 2018-08-16 Nathan Sidwell <nathan@acm.org>
1119 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
1120 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
1122 2018-08-16 Tamar Christina <tamar.christina@arm.com>
1125 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
1126 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
1127 (mov<mov>): ..this and enable unconditionally.
1129 2018-08-16 Tamar Christina <tamar.christina@arm.com>
1131 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
1133 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
1135 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
1136 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
1137 "Common" with "Target".
1139 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
1141 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
1142 * doc/invoke.texi (mmitigate-rop): Remove.
1143 * config/i386/i386.c: Do not include "regrename.h".
1144 (ix86_rop_should_change_byte_p, reg_encoded_number)
1145 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
1147 (ix86_reorg): Remove call to ix86_mitigate_rop.
1148 * config/i386/i386.md (attr "modrm_class"): Remove.
1149 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
1150 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
1151 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
1153 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
1155 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
1156 allow folding of mergeh() and mergel() for the float and double types.
1157 (fold_mergehl_helper): Rework to handle building a permute tree
1160 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
1162 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
1165 2018-08-15 David Malcolm <dmalcolm@redhat.com>
1167 * common.opt (fdiagnostics-show-labels): New option.
1168 * diagnostic-show-locus.c (class layout_range): Add field
1170 (class layout): Add field "m_show_labels_p".
1171 (layout_range::layout_range): Add param "label" and use it to
1173 (make_range): Pass in NULL for new "label" param of layout_range's
1175 (layout::layout): Initialize m_show_labels_p.
1176 (layout::maybe_add_location_range): Pass in loc_range->m_label
1177 when constructing layout_range instances.
1178 (struct line_label): New struct.
1179 (layout::print_any_labels): New member function.
1180 (layout::print_line): Call it if label-printing is enabled.
1181 (selftest::test_one_liner_labels): New test.
1182 (selftest::test_diagnostic_show_locus_one_liner): Call it.
1183 * diagnostic.c (diagnostic_initialize): Initialize
1184 context->show_labels_p.
1185 * diagnostic.h (struct diagnostic_context): Add field
1187 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
1188 -fno-diagnostics-show-labels.
1189 * dwarf2out.c (gen_producer_string): Add
1190 OPT_fdiagnostics_show_labels to the ignored options.
1191 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
1193 (gcc_rich_location::maybe_add_expr): Likewise.
1194 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
1195 label" param, defaulting to NULL.
1196 (gcc_rich_location::add_expr): Add "label" param.
1197 (gcc_rich_location::maybe_add_expr): Likewise.
1198 (class text_range_label): New class.
1199 (class range_label_for_type_mismatch): New class.
1200 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
1201 of format_warning_va.
1202 (fmtwarn_n): Likewise for new params of format_warning_n_va.
1203 * lto-wrapper.c (merge_and_complain): Add
1204 OPT_fdiagnostics_show_labels to the "pick one setting" options.
1205 (append_compiler_options): Likewise to the dropped options.
1206 (append_diag_options): Likewise to the passed-on options.
1207 * opts.c (common_handle_option): Handle the new option.
1208 * selftest-diagnostic.c
1209 (test_diagnostic_context::test_diagnostic_context): Enable
1211 * substring-locations.c: Include "gcc-rich-location.h".
1212 (format_warning_n_va): Add "fmt_label" and "param_label" params
1213 and use them as appropriate.
1214 (format_warning_va): Add "fmt_label" and "param_label" params,
1215 passing them on to format_warning_n_va.
1216 (format_warning_at_substring): Likewise.
1217 (format_warning_at_substring_n): Likewise.
1218 * substring-locations.h (format_warning_va): Add "fmt_label" and
1219 "param_label" params.
1220 (format_warning_n_va): Likewise.
1221 (format_warning_at_substring): Likewise.
1222 (format_warning_at_substring_n): Likewise.
1223 * toplev.c (general_init): Initialize global_dc->show_labels_p.
1225 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
1228 * builtins.c (expand_builtin_memcmp): Do not expand the call
1229 when overflow is detected.
1231 2018-08-15 Martin Sebor <msebor@redhat.com>
1233 PR tree-optimization/71625
1234 * config/aarch64/aarch64-builtins.c
1235 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
1237 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
1239 * config/s390/s390.c (s390_reorg): Remove loop.
1241 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1244 (darwin_function_switched_text_sections): Delete.
1245 * gcc/config/darwin.h
1246 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
1248 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1251 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
1252 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
1253 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
1255 2018-08-15 Martin Liska <mliska@suse.cz>
1257 PR tree-optimization/86925
1258 * predict.c (expr_expected_value_1): When taking
1259 later predictor, assign also probability.
1260 Use fold_build2_initializer_loc in order to fold
1261 the expression in -frounding-math.
1263 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
1265 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
1267 (expand_vec_perm_1): Try the new method.
1269 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
1272 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
1273 Check whether lra_live_max_point is 0 before dividing.
1275 2018-08-14 Martin Sebor <msebor@redhat.com>
1277 PR tree-optimization/86650
1278 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
1279 (vrp_prop::check_mem_ref): Same.
1281 2018-08-13 Liu Hao <lh_mouse@126.com>
1283 * pretty-print.c (eat_esc_sequence): Swap the foreground and
1284 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
1285 and clear it thereafter, as it only works for DBCS.
1287 2018-08-13 Liu Hao <lh_mouse@126.com>
1289 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
1290 handle returned by _get_osf_handle().
1292 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
1294 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
1295 for folding vec_perm.
1297 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
1299 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
1300 Add support for gimple-folding of vec_pack() and vec_unpack()
1303 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
1305 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
1306 vec_xst variants to the list.
1307 (rs6000_gimple_fold_builtin): Add support for folding unaligned
1308 vector loads and stores.
1310 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
1312 * config.gcc (rs6000-ibm-aix4.x): Delete.
1313 (rs6000-ibm-aix5.1): Delete.
1314 (rs6000-ibm-aix5.2): Delete.
1315 (rs6000-ibm-aix5.3): Delete.
1316 * config/rs6000/aix43.h: Delete.
1317 * config/rs6000/aix51.h: Delete.
1318 * config/rs6000/aix52.h: Delete.
1319 * config/rs6000/t-aix43: Delete.
1321 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
1323 * config/s390/s390.c (s390_decompose_constant_pool_ref):
1325 (s390_decompose_address): Factor out constant pool ref
1328 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1330 * config/nds32/nds32-predicates.c
1331 (nds32_can_use_bclr_p): Change return type as bool.
1332 (nds32_can_use_bset_p): Ditto.
1333 (nds32_can_use_btgl_p): Ditto.
1334 (nds32_can_use_bitci_p): Ditto.
1335 * config/nds32/nds32-protos.h
1336 (nds32_can_use_bclr_p): Change declaration.
1337 (nds32_can_use_bset_p): Ditto.
1338 (nds32_can_use_btgl_p): Ditto.
1339 (nds32_can_use_bitci_p): Ditto.
1341 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1343 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
1344 Support -msched-prolog-epilog option.
1345 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
1347 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1349 * common/config/nds32/nds32-common.c
1350 (nds32_option_optimization_table): Enalbe -malways-align.
1352 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1354 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
1356 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
1357 OPT_misr_secure_ case.
1358 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
1359 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
1360 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
1362 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
1363 (nds32_isr_info): New field security_level.
1364 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
1365 * config/nds32/nds32.md (return_internal): Consider critical attribute.
1366 * config/nds32/nds32.opt (misr-secure): New option.
1367 * config/nds32/nds32_init.inc: New file.
1368 * config/nds32/nds32_isr.h: New file.
1370 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
1372 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
1373 Update comment for atomic instructions.
1374 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
1375 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
1377 (atomic_loaddi): Revise fence expansion to only emit fence prior to
1378 load for __ATOMIC_SEQ_CST model.
1379 (atomic_loaddi_1): Remove float register target.
1380 (atomic_storedi): Handle CONST_INT values.
1381 (atomic_storedi_1): Remove float register source. Add special case
1383 (memory_barrier): New expander and insn.
1385 2018-08-11 Jakub Jelinek <jakub@redhat.com>
1387 PR tree-optimization/86835
1388 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
1389 new_stmt after def_gsi, make sure to insert new_square_stmt after
1390 that stmt, not 2 stmts before it.
1392 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
1395 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
1398 2018-08-10 Martin Liska <mliska@suse.cz>
1401 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
1403 * builtins.c (expand_builtin_expect_with_probability):
1405 (expand_builtin_expect_with_probability): New function.
1406 (build_builtin_expect_predicate): Add new argumnet probability
1407 for BUILT_IN_EXPECT_WITH_PROBABILITY.
1408 (fold_builtin_expect):
1411 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
1412 * builtins.h (fold_builtin_expect): Set new argument.
1413 * doc/extend.texi: Document __builtin_expect_with_probability.
1414 * doc/invoke.texi: Likewise.
1415 * gimple-fold.c (gimple_fold_call): Pass new argument.
1416 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
1417 also BUILT_IN_EXPECT_WITH_PROBABILITY.
1418 * predict.c (get_predictor_value): New function.
1419 (expr_expected_value): Add new argument probability. Assume
1420 that predictor and probability are always non-null.
1421 (expr_expected_value_1): Likewise. For __builtin_expect and
1422 __builtin_expect_with_probability set probability. Handle
1423 combination in binary expressions.
1424 (tree_predict_by_opcode): Simplify code by simply calling
1425 get_predictor_value.
1426 (pass_strip_predict_hints::execute): Add handling of
1427 BUILT_IN_EXPECT_WITH_PROBABILITY.
1428 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
1430 * tree.h (DECL_BUILT_IN_P): New function.
1432 2018-08-10 Martin Liska <mliska@suse.cz>
1434 PR tree-optimization/85799
1435 * passes.def: Add argument for pass_strip_predict_hints.
1436 * predict.c (class pass_strip_predict_hints): Add new argument
1438 (strip_predictor_early): New function.
1439 (pass_strip_predict_hints::execute): Call the function to
1441 (strip_predict_hints): New function.
1442 * predict.def: Fix comment.
1444 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
1446 * Makefile.in: Clarify which tm.texi to copy over to assert the
1447 right to grant a GFDL license for all.
1449 2018-08-09 Jeff Law <law@redhat.com>
1451 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
1454 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
1456 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
1459 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
1461 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
1462 reductions for variable-length vectors.
1464 2018-08-09 David Malcolm <dmalcolm@redhat.com>
1467 * common.opt (fdiagnostics-show-line-numbers): New option.
1468 * diagnostic-show-locus.c (class layout): Add fields
1469 "m_show_line_numbers_p" and "m_linenum_width";
1470 (num_digits): New function.
1471 (test_num_digits): New function.
1472 (layout::layout): Initialize new fields. Update m_x_offset
1473 logic to handle any left margin.
1474 (layout::print_source_line): Print line number when requested.
1475 (layout::start_annotation_line): New member function.
1476 (layout::print_annotation_line): Call it.
1477 (layout::print_leading_fixits): Likewise.
1478 (layout::print_trailing_fixits): Likewise. Update calls to
1479 move_to_column for new parameter.
1480 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
1481 it to potentially call start_annotation_line.
1482 (layout::show_ruler): Call start_annotation_line.
1483 (selftest::test_line_numbers_multiline_range): New selftest.
1484 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
1485 and selftest::test_line_numbers_multiline_range.
1486 * diagnostic.c (diagnostic_initialize): Initialize
1487 show_line_numbers_p.
1488 * diagnostic.h (struct diagnostic_context): Add field
1489 "show_line_numbers_p".
1490 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
1491 -fno-diagnostics-show-line-numbers.
1492 * dwarf2out.c (gen_producer_string): Add
1493 OPT_fdiagnostics_show_line_numbers to the ignored options.
1494 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
1495 one setting" options.
1496 (append_compiler_options): Likewise to the dropped options.
1497 (append_diag_options): Likewise to the passed-on options.
1498 * opts.c (common_handle_option): Handle the new option.
1499 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
1501 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
1503 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
1504 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
1505 third argument of type "const signed char" to descriptions of
1506 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
1507 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
1508 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
1509 __builtin_bcdsub_ov functions.
1511 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
1513 PR tree-optimization/86858
1514 * tree-vect-loop.c (vect_is_simple_reduction): Restore
1515 flow_bb_inside_loop_p calls.
1517 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
1519 PR tree-optimization/86871
1520 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
1521 instead of gimple_assign_lhs.
1523 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
1526 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
1527 register constraint to operand 0.
1528 (add<mode>3_carryinC): Likewise.
1529 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
1531 2018-08-09 Martin Liska <mliska@suse.cz>
1534 * common.opt: Remove extra line.
1536 2018-08-09 Martin Liska <mliska@suse.cz>
1538 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
1539 at the end of a line, make first letter capital and end up
1540 a sentence with a dot.
1541 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
1542 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
1543 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
1544 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
1545 (PARAM_MAX_ISL_OPERATIONS): Likewise.
1546 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
1547 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
1548 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
1549 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
1550 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
1551 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
1552 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
1553 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
1554 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
1555 (PARAM_TREE_REASSOC_WIDTH): Likewise.
1556 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
1557 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
1558 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
1560 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
1563 * config/s390/s390.c (s390_option_override_internal): Reduce the
1564 stack-clash-protection-probe-interval param if it would be too big
1567 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
1570 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
1571 * config/m68k/m68k.c (handle_move_double): Don't call
1572 m68k_final_prescan_insn.
1573 (m68k_adjust_decorated_operand): Renamed from
1574 m68k_final_prescan_insn, remove first and third operand and
1576 (print_operand): Call it.
1577 (print_operand_address): Call it.
1579 2018-08-08 Nathan Sidwell <nathan@acm.org>
1581 * diagnostic.c (diagnostic_report_current_module): Use
1582 linemap_included_from & linemap_included_from_linemap.
1584 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
1586 * config/aarch64/aarch64-cores.def: Add phecda core.
1587 * config/aarch64/aarch64-tune.md: Regenerate.
1588 * doc/invoke.texi: Add phecda core.
1590 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
1593 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
1595 * config/s390/s390.md ("movti"): Add more alternatives for
1596 constant to GPR copies.
1598 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
1600 * config/s390/s390.c: Fix whitespace damage throughout the file.
1601 * config/s390/s390.h: Likewise.
1602 * config/s390/tpf.h: Likewise.
1604 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
1606 * config/s390/s390.c (s390_loadrelative_operand_p):
1607 Remove TARGET_CPU_ZARCH usages.
1608 (s390_rtx_costs): Likewise.
1609 (s390_legitimate_constant_p): Likewise.
1610 (s390_cannot_force_const_mem): Likewise.
1611 (legitimate_reload_constant_p): Likewise.
1612 (s390_preferred_reload_class): Likewise.
1613 (legitimize_pic_address): Likewise.
1614 (legitimize_tls_address): Likewise.
1615 (s390_split_branches): Removed.
1616 (s390_add_execute): Removed.
1617 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
1618 (s390_mainpool_start): Likewise.
1619 (s390_mainpool_finish): Likewise.
1620 (s390_mainpool_cancel): Removed.
1621 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
1622 (s390_chunkify_cancel): Likewise.
1623 (s390_return_addr_rtx): Likewise.
1624 (s390_register_info): Remove split_branches_pending_p uages.
1625 (s390_optimize_register_info): Likewise.
1626 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
1627 split_branches_pending_p usages.
1628 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
1629 (s390_load_got): Likewise.
1630 (s390_expand_split_stack_prologue): Likewise.
1631 (output_asm_nops): Likewise.
1632 (s390_function_profiler): Likewise.
1633 (s390_emit_call): Likewise.
1634 (s390_conditional_register_usage): Likewise.
1635 (s390_optimize_prologue): Likewise.
1636 (s390_reorg): Remove TARGET_CPU_ZARCH and
1637 split_branches_pending_p usages.
1638 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
1640 (s390_output_indirect_thunk_function): Likewise.
1641 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
1642 (TARGET_CPU_ZARCH_P): Removed.
1643 (struct machine_function): Remove split_branches_pending_p.
1644 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
1646 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
1648 * common/config/s390/s390-common.c (processor_flags_table):
1650 * config.gcc: Remove with_arch/with_tune support.
1651 * config/s390/2064.md: Remove cpu attribute comparisons.
1652 * config/s390/driver-native.c (s390_host_detect_local_cpu):
1654 * config/s390/linux.h (ASM_SPEC):
1655 Remove -march support.
1656 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
1657 Use a table to get an arch level.
1658 * config/s390/s390-opts.h (enum processor_type):
1660 * config/s390/s390.c
1661 (processor_table): Remove entries, add arch_level values.
1662 (s390_issue_rate): Remove cases.
1663 (s390_option_override): Adjust
1664 s390_option_override_internal() call.
1665 (s390_option_override_internal): Remove deprecation warning.
1666 (s390_valid_target_attribute_tree): Adjust
1667 s390_option_override_internal() call.
1668 * config/s390/s390.h (struct s390_processor):
1669 Share with s390-c.c, add arch_level field.
1670 * config/s390/s390.md:
1671 Remove occurrences in cpu attribute.
1672 * config/s390/s390.opt: Remove -march/-mtune support.
1673 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
1674 * doc/invoke.texi: Remove deprecation warning.
1676 2018-08-08 Luis Machado <luis.machado@linaro.org>
1678 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
1680 (qdf24xx_tunings): Set vector cost structure to
1681 qdf24xx_vector_cost.
1683 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
1684 <register_sextend>: Set to 3.
1686 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
1689 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
1690 * config/aarch64/aarch64-simd.md
1691 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
1692 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
1693 (aarch64_frecpx<mode>): ...this new pattern.
1694 * config/aarch64/aarch64-simd-builtins.def: Remove comment
1695 about aarch64_frecp<FRECP:frecp_suffix><mode>.
1697 2018-08-07 Martin Liska <mliska@suse.cz>
1700 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
1701 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
1702 * predict.def (PRED_MALLOC_NONNULL): New predictor.
1703 * doc/extend.texi: Document that malloc attribute adds
1706 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
1709 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1710 Define to speculation_safe_value_not_needed.
1712 2018-08-06 Jeff Law <law@redhat.com>
1714 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
1715 the vr_values instance to cprop_into_stmt.
1716 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
1717 (cprop_operand): Also query EVRP to determine if OP is a constant.
1719 2018-08-06 Nathan Sidwell <nathan@acm.org>
1721 * diagnostic.c (diagnostic_report_current_module): Reroll
1722 included-at loop. Translate text.
1724 2018-08-06 David Malcolm <dmalcolm@redhat.com>
1726 * function-tests.c (selftest::test_expansion_to_rtl): Call
1727 free_after_compilation.
1729 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1731 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
1733 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
1735 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
1736 loops with memory block operations from getting unrolled.
1738 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
1741 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1742 Define to speculation_safe_value_not_needed.
1744 2018-08-06 Jeff Law <law@redhat.com>
1746 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
1749 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1752 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
1753 with all enabled __intN types.
1755 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
1757 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1759 * alias.c (record_set): Check for clobber high.
1760 * cfgexpand.c (expand_gimple_stmt): Likewise.
1761 * combine-stack-adj.c (single_set_for_csa): Likewise.
1762 * combine.c (find_single_use_1): Likewise.
1763 (set_nonzero_bits_and_sign_copies): Likewise.
1764 (get_combine_src_dest): Likewise.
1765 (is_parallel_of_n_reg_sets): Likewise.
1766 (try_combine): Likewise.
1767 (record_dead_and_set_regs_1): Likewise.
1768 (reg_dead_at_p_1): Likewise.
1769 (reg_dead_at_p): Likewise.
1770 * dce.c (deletable_insn_p): Likewise.
1771 (mark_nonreg_stores_1): Likewise.
1772 (mark_nonreg_stores_2): Likewise.
1773 * df-scan.c (df_find_hard_reg_defs): Likewise.
1774 (df_uses_record): Likewise.
1775 (df_get_call_refs): Likewise.
1776 * dwarf2out.c (mem_loc_descriptor): Likewise.
1777 * haifa-sched.c (haifa_classify_rtx): Likewise.
1778 * ira-build.c (create_insn_allocnos): Likewise.
1779 * ira-costs.c (scan_one_insn): Likewise.
1780 * ira.c (equiv_init_movable_p): Likewise.
1781 (rtx_moveable_p): Likewise.
1782 (interesting_dest_for_shprep): Likewise.
1783 * jump.c (mark_jump_label_1): Likewise.
1784 * postreload-gcse.c (record_opr_changes): Likewise.
1785 * postreload.c (reload_cse_simplify): Likewise.
1786 (struct reg_use): Add source expr.
1787 (reload_combine): Check for clobber high.
1788 (reload_combine_note_use): Likewise.
1789 (reload_cse_move2add): Likewise.
1790 (move2add_note_store): Likewise.
1791 * print-rtl.c (print_pattern): Likewise.
1792 * recog.c (decode_asm_operands): Likewise.
1793 (store_data_bypass_p): Likewise.
1794 (if_test_bypass_p): Likewise.
1795 * regcprop.c (kill_clobbered_value): Likewise.
1796 (kill_set_value): Likewise.
1797 * reginfo.c (reg_scan_mark_refs): Likewise.
1798 * reload1.c (maybe_fix_stack_asms): Likewise.
1799 (eliminate_regs_1): Likewise.
1800 (elimination_effects): Likewise.
1801 (mark_not_eliminable): Likewise.
1802 (scan_paradoxical_subregs): Likewise.
1803 (forget_old_reloads_1): Likewise.
1804 * reorg.c (find_end_label): Likewise.
1805 (try_merge_delay_insns): Likewise.
1806 (redundant_insn): Likewise.
1807 (own_thread_p): Likewise.
1808 (fill_simple_delay_slots): Likewise.
1809 (fill_slots_from_thread): Likewise.
1810 (dbr_schedule): Likewise.
1811 * resource.c (update_live_status): Likewise.
1812 (mark_referenced_resources): Likewise.
1813 (mark_set_resources): Likewise.
1814 * rtl.c (copy_rtx): Likewise.
1815 * rtlanal.c (reg_referenced_p): Likewise.
1816 (single_set_2): Likewise.
1817 (noop_move_p): Likewise.
1818 (note_stores): Likewise.
1819 * sched-deps.c (sched_analyze_reg): Likewise.
1820 (sched_analyze_insn): Likewise.
1822 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1824 * cse.c (invalidate_reg): New function extracted from...
1825 (invalidate): ...here.
1826 (canonicalize_insn): Check for clobber high.
1827 (invalidate_from_clobbers): invalidate clobber highs.
1828 (invalidate_from_sets_and_clobbers): Likewise.
1829 (count_reg_usage): Check for clobber high.
1830 (insn_live_p): Likewise.
1831 * cselib.c (cselib_expand_value_rtx_1):Likewise.
1832 (cselib_invalidate_regno): Check for clobber in setter.
1833 (cselib_invalidate_rtx): Pass through setter.
1834 (cselib_invalidate_rtx_note_stores):
1835 (cselib_process_insn): Check for clobber high.
1836 * cselib.h (cselib_invalidate_rtx): Add operand.
1838 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1840 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
1841 (mark_not_eliminable): Likewise.
1842 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
1843 * lra-lives.c (process_bb_lives): Check for clobber high.
1844 * lra.c (new_insn_reg): Remember clobber highs.
1845 (collect_non_operand_hard_regs): Check for clobber high.
1846 (lra_set_insn_recog_data): Likewise.
1847 (add_regs_to_insn_regno_info): Likewise.
1848 (lra_update_insn_regno_info): Likewise.
1850 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1852 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
1853 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
1855 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1857 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
1858 (copy_insn_1): Likewise.
1859 (gen_hard_reg_clobber_high): New gen function.
1860 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
1861 * genemit.c (gen_exp): Likewise.
1862 (gen_emit_seq): Pass through info.
1863 (gen_insn): Check for CLOBBER_HIGH.
1864 (gen_expand): Pass through info.
1865 (gen_split): Likewise.
1866 (output_add_clobbers): Likewise.
1867 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
1868 (remove_clobbers): Likewise.
1869 * rtl.h (gen_hard_reg_clobber_high): New declaration.
1871 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1873 * doc/rtl.texi (clobber_high): Add.
1874 (parallel): Add in clobber high
1875 * rtl.c (rtl_check_failed_code3): Add function.
1876 * rtl.def (CLOBBER_HIGH): Add expression.
1877 * rtl.h (RTL_CHECKC3): Add macro.
1878 (rtl_check_failed_code3): Add declaration.
1879 (XC3EXP): Add macro.
1881 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
1884 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
1885 cfun->machine->max_used_stack_alignment if needed.
1887 2018-08-04 Martin Sebor <msebor@redhat.com>
1889 PR tree-optimization/86571
1890 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
1893 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
1896 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1899 2018-08-03 Jeff Law <law@redhat.com>
1902 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1903 Define to speculation_safe_value_not_needed.
1905 2018-08-03 David Malcolm <dmalcolm@redhat.com>
1907 * doc/gcov.texi (-x): Remove duplicate "to".
1908 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
1909 (-Wif-not-aligned): Remove duplicate "is".
1910 (-flto): Remove duplicate "the".
1911 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
1912 duplicate "v5.00.b".
1913 (MSP430 Options): Remove duplicate "and" from the description
1914 of "-mgprel-sec=regexp".
1915 (x86 Options): Remove duplicate copies of "vmldLog102" and
1916 vmlsLog104 from description of "-mveclibabi=type".
1918 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
1920 * internal-fn.h (first_commutative_argument): Declare.
1921 * internal-fn.c (first_commutative_argument): New function.
1922 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
1923 restrictions for pattern statements. Use first_commutative_argument
1924 to look for commutative operands in calls to internal functions.
1926 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
1928 * Makefile.in (wide-int-range.o): New.
1929 * tree-vrp.c: Move all the wide_int_* functions to...
1930 * wide-int-range.cc: ...here.
1931 * tree-vrp.h: Move all the wide_int_* prototypes to...
1932 * wide-int-range.h: ...here.
1934 2018-08-03 Tom de Vries <tdevries@suse.de>
1936 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
1938 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
1939 * except.c (output_function_exception_table): Do early exit if
1940 targetm_common.except_unwind_info (&global_options) == UI_NONE.
1942 2018-08-03 Martin Liska <mliska@suse.cz>
1944 * predict.c (dump_prediction): Change to 2 digits
1947 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
1949 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
1951 (falkor_am_1_gtov_gtov): ... a new insn reservation.
1953 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
1955 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
1956 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
1957 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
1958 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
1959 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
1961 2018-08-02 David Malcolm <dmalcolm@redhat.com>
1963 * diagnostic-show-locus.c (diagnostic_show_locus): Use
1964 pp_take_prefix when saving the existing prefix.
1965 * diagnostic.c (diagnostic_append_note): Likewise.
1966 * langhooks.c (lhd_print_error_function): Likewise.
1967 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
1968 param's type. Free the existing prefix.
1969 (pp_take_prefix): New function.
1970 (pretty_printer::pretty_printer): Drop the prefix parameter.
1971 Rename the length parameter to match the comment.
1972 (pretty_printer::~pretty_printer): Free the prefix.
1973 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
1975 (struct pretty_printer): Drop the "const" from "prefix" field's
1976 type and clarify memory management.
1977 (pp_set_prefix): Drop the "const" from the 2nd param.
1978 (pp_take_prefix): New decl.
1980 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
1982 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
1983 for word_mode_ok here instead of passing as argument.
1984 (expand_block_compare): Change select_block_compare_mode() call.
1985 (expand_strncmp_gpr_sequence): New function.
1986 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
1988 2018-08-02 Jeff Law <law@redhat.com>
1991 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1992 Define to speculation_safe_value_not_needed.
1995 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1996 Define to speculation_safe_value_not_needed.
1998 2018-08-02 Tom de Vries <tdevries@suse.de>
2001 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
2002 function. Return UI_TARGET unconditionally.
2003 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
2004 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
2006 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
2008 * genemit.c (print_overload_test): Fix typo.
2010 2018-08-02 Richard Biener <rguenther@suse.de>
2012 PR tree-optimization/86816
2013 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
2014 which checks for value availability before querying it.
2015 (gvn_uses_equal): Use it.
2016 (same_succ_hash): Likewise.
2017 (gimple_equal_p): Likewise.
2019 2018-08-02 Nick Clifton <nickc@redhat.com>
2022 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2023 Define to speculation_safe_value_not_needed.
2026 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2027 Define to speculation_safe_value_not_needed.
2030 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2031 Define to speculation_safe_value_not_needed.
2034 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2035 Define to speculation_safe_value_not_needed.
2038 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2039 Define to speculation_safe_value_not_needed.
2042 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2043 Define to speculation_safe_value_not_needed.
2046 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2047 Define to speculation_safe_value_not_needed.
2050 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2051 Define to speculation_safe_value_not_needed.
2054 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
2055 speculation_safe_value_not_needed.
2058 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
2059 to speculation_safe_value_not_needed.
2061 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
2063 * doc/md.texi: Expand the documentation of instruction names
2064 to mention port-local uses. Document '@' in pattern names.
2065 * read-md.h (overloaded_instance, overloaded_name): New structs.
2067 (md_reader::handle_overloaded_name): New member function.
2068 (md_reader::get_overloads): Likewise.
2069 (md_reader::m_first_overload): New member variable.
2070 (md_reader::m_next_overload_ptr): Likewise.
2071 (md_reader::m_overloads_htab): Likewise.
2072 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
2073 m_next_overload_ptr and m_overloads_htab.
2074 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
2075 (get_mode_token, get_code_token, get_int_token): New functions.
2076 (map_attr_string): Add an optional argument that passes back
2077 the associated iterator.
2078 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
2079 (md_reader::handle_overloaded_name, add_overload_instance): New
2081 (apply_iterators): Handle '@' names. Report an error if '@'
2082 is used without iterators.
2083 (initialize_iterators): Initialize the new iterator_group fields.
2084 * genopinit.c (handle_overloaded_code_for)
2085 (handle_overloaded_gen): New functions.
2086 (main): Use them to print declarations of maybe_code_for_* and
2087 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
2088 * genemit.c (print_overload_arguments, print_overload_test)
2089 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
2090 (main): Use it to print definitions of maybe_code_for_* and
2091 maybe_gen_* functions.
2092 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
2093 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
2094 instead of explicit mode checks.
2095 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
2096 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
2097 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
2098 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
2099 (aarch64_expand_compare_and_swap): Likewise
2100 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
2101 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
2102 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
2103 (aarch64_constant_pool_reload_icode): Delete.
2104 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
2105 instead of aarch64_constant_pool_reload_icode. Use
2106 code_for_aarch64_reload_mov instead of explicit mode checks.
2107 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
2108 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
2109 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
2110 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
2111 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
2112 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
2113 (aarch64_atomic_load_op_code): Delete.
2114 (aarch64_emit_atomic_load_op): Likewise.
2115 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
2116 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
2117 instead of aarch64_emit_atomic_load_op.
2118 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
2119 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
2120 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
2121 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
2122 character before the pattern name.
2123 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
2124 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
2125 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
2126 (aarch64_frecps<mode>): Likewise.
2127 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
2128 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
2129 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
2130 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
2131 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
2133 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
2135 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
2136 Allow HFmode constants if TARGET_FP_F16INST.
2138 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
2141 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
2142 No longer check last store for clobber of address register.
2144 2018-08-02 Martin Liska <mliska@suse.cz>
2146 PR gcov-profile/86817
2147 * gcov.c (process_all_functions): New function.
2149 (process_file): Move functions processing to
2150 process_all_functions.
2152 2018-08-02 David Malcolm <dmalcolm@redhat.com>
2154 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
2155 "const" to the "gimple *" and "rtx_insn *" parameters.
2156 * dumpfile.h (dump_user_location_t::dump_user_location_t):
2158 (dump_location_t::dump_location_t): Likewise.
2160 2018-08-01 Martin Sebor <msebor@redhat.com>
2162 PR tree-optimization/86650
2163 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
2164 rather than a "gcall *". Directly pass the data of interest
2165 to percent_K_format, rather than building a temporary CALL_EXPR
2167 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
2168 (gimple_fold_builtin_strncat): Adjust.
2169 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
2170 gcall* argument with gimple*.
2171 * gimple-ssa-warn-restrict.c (check_call): Same.
2172 (wrestrict_dom_walker::before_dom_children): Same.
2173 (builtin_access::builtin_access): Same.
2174 (check_bounds_or_overlap): Same
2175 (maybe_diag_overlap): Same.
2176 (maybe_diag_offset_bounds): Same.
2177 * tree-diagnostic.c (default_tree_printer): Move usage of
2178 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
2180 * tree-pretty-print.c (percent_K_format): Add argument.
2181 * tree-pretty-print.h: Add argument.
2182 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
2183 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
2184 (maybe_diag_stxncpy_trunc): Same.
2185 (handle_builtin_stxncpy): Same.
2186 (handle_builtin_strcat): Same.
2188 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2190 * match.pd: Optimise pointer range checks.
2192 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2194 PR tree-optimization/86758
2195 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
2196 to remove pattern statements.
2198 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2200 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
2201 result of dfs_enumerate_from when constructing stmt_vec_infos,
2202 instead of additionally calling get_loop_body.
2204 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2206 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
2208 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
2209 When creating an iv, assert that the step is not known to be zero.
2210 (vect_setup_realignment): Update call accordingly.
2211 * tree-vect-stmts.c (vectorizable_store): Likewise.
2212 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
2214 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2216 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
2217 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
2218 (vectorizable_reduction): Likewise.
2219 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2220 (vect_detect_hybrid_slp_stmts): Likewise.
2221 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2223 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
2225 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
2226 (wide_int_set_zero_nonzero_bits): ...this.
2227 (zero_nonzero_bits_from_vr): Rename to...
2228 (vrp_set_zero_nonzero_bits): ...this.
2229 (extract_range_from_multiplicative_op_1): Abstract wide int
2231 (wide_int_range_multiplicative_op): ...here.
2232 (extract_range_from_binary_expr_1): Extract wide int binary
2233 operations into their own functions.
2234 (wide_int_range_lshift): New.
2235 (wide_int_range_can_optimize_bit_op): New.
2236 (wide_int_range_shift_undefined_p): New.
2237 (wide_int_range_bit_xor): New.
2238 (wide_int_range_bit_ior): New.
2239 (wide_int_range_bit_and): New.
2240 (wide_int_range_trunc_mod): New.
2241 (extract_range_into_wide_ints): New.
2242 (vrp_shift_undefined_p): New.
2243 (extract_range_from_multiplicative_op): New.
2244 (vrp_can_optimize_bit_op): New.
2245 * tree-vrp.h (value_range::dump): New.
2246 (wide_int_range_multiplicative_op): New.
2247 (wide_int_range_lshift):New.
2248 (wide_int_range_shift_undefined_p): New.
2249 (wide_int_range_bit_xor): New.
2250 (wide_int_range_bit_ior): New.
2251 (wide_int_range_bit_and): New.
2252 (wide_int_range_trunc_mod): New.
2253 (zero_nonzero_bits_from_bounds): Rename to...
2254 (wide_int_set_zero_nonzero_bits): ...this.
2255 (zero_nonzero_bits_from_vr): Rename to...
2256 (vrp_set_zero_nonzero_bits): ...this.
2257 (range_easy_mask_min_max): Rename to...
2258 (wide_int_range_can_optimize_bit_op): this.
2259 * vr-values.c (simplify_bit_ops_using_ranges): Rename
2260 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
2262 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2264 * tree-vectorizer.h (vect_orig_stmt): New function.
2265 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
2266 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
2267 (vect_create_epilog_for_reduction): Likewise.
2268 (vectorizable_live_operation): Likewise.
2269 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
2270 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
2271 * tree-vect-stmts.c (vectorizable_call): Likewise.
2272 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
2274 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2276 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
2278 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
2279 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
2280 (vect_transform_loop): Likewise.
2281 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
2283 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2285 * tree-vectorizer.h (vect_schedule_slp): Return void.
2286 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
2287 (vect_schedule_slp): Likewise.
2289 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2291 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
2293 (vect_transform_loop): Update calls accordingly. Schedule SLP
2294 instances before the main loop, if any exist.
2296 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2298 PR tree-optimization/86749
2299 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
2300 If the lhs is used in a COND_EXPR, check that it is being used
2301 as the "then" or "else" value.
2303 2018-08-01 Tom de Vries <tdevries@suse.de>
2306 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
2307 speculation_safe_value_not_needed.
2309 2018-08-01 Richard Biener <rguenther@suse.de>
2311 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
2314 2018-08-01 Martin Liska <mliska@suse.cz>
2316 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
2317 format how successful transformation is dumped.
2318 (gimple_mod_pow2_value_transform): Likewise.
2319 (gimple_mod_subtract_transform): Likewise.
2320 (gimple_stringops_transform): Likewise.
2322 2018-08-01 Martin Liska <mliska@suse.cz>
2325 * value-prof.c (interesting_stringop_to_profile_p):
2326 Simplify the code and add BUILT_IN_MEMMOVE.
2327 (gimple_stringops_transform): Likewise.
2329 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
2331 * config/aarch64/aarch64-simd.md
2332 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
2333 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
2334 use GPI iterator instead of SI mode.
2336 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
2338 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
2339 rs6000_speculation_barrier.
2340 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
2341 new barrier pattern name.
2343 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
2345 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
2346 (speculation_barrier): New insn.
2348 2018-08-01 Richard Biener <rguenther@suse.de>
2351 * graphite.h: Include isl/id.h and isl/space.h to allow build
2354 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
2357 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
2358 mode for COFF targets.
2359 * defaults.h (TARGET_COFF): Define.
2360 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
2361 TARGET_COFF): Define.
2362 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
2363 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
2364 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
2366 2018-07-31 Alexandre Oliva <oliva@adacore.com>
2368 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
2369 * gimple-streamer-out.c (output_bb): Save it.
2370 * lto-streamer-in.c (input_struct_function_base): Restore
2371 instance discriminator if available. Create map on demand.
2372 * lto-streamer-out.c (output_struct_function_base): Save it if
2374 * final.c (decl_to_instance_map): Document LTO strategy.
2376 2018-07-31 Alexandre Oliva <oliva@adacore.com>
2377 Olivier Hainque <hainque@adacore.com>
2379 * debug.h (decl_to_instance_map_t): New type.
2380 (decl_to_instance_map): Declare.
2381 (maybe_create_decl_to_instance_map): New inline function.
2382 * final.c (bb_discriminator, last_bb_discriminator): New statics,
2383 to track basic block discriminators.
2384 (final_start_function_1): Initialize them.
2385 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
2387 (decl_to_instance_map): New variable.
2388 (map_decl_to_instance, maybe_set_discriminator): New functions.
2389 (notice_source_line): Set discriminator.
2391 2018-07-31 Ian Lance Taylor <iant@golang.org>
2393 * targhooks.c (default_have_speculation_safe_value): Add
2396 2018-07-31 David Malcolm <dmalcolm@redhat.com>
2398 * dump-context.h: Include "pretty-print.h".
2399 (dump_context::refresh_dumps_are_enabled): New decl.
2400 (dump_context::emit_item): New decl.
2401 (class dump_context): Add fields "m_test_pp" and
2403 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
2404 (temp_dump_context::get_dumped_text): New decl.
2405 (class temp_dump_context): Add field "m_pp".
2406 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
2407 (dump_context::refresh_dumps_are_enabled): ...and add a test for
2409 (set_dump_file): Update for above change.
2410 (set_alt_dump_file): Likewise.
2411 (dump_loc): New overload, taking a pretty_printer *.
2412 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
2413 to any test pretty-printer.
2414 (make_item_for_dump_gimple_stmt): New function, adapted from
2415 optinfo::add_gimple_stmt.
2416 (dump_context::dump_gimple_stmt): Call it, and use the result,
2417 eliminating the direct usage of dump_file and alt_dump_file in
2418 favor of indirectly using them via emit_item.
2419 (make_item_for_dump_gimple_expr): New function, adapted from
2420 optinfo::add_gimple_expr.
2421 (dump_context::dump_gimple_expr): Call it, and use the result,
2422 eliminating the direct usage of dump_file and alt_dump_file in
2423 favor of indirectly using them via emit_item.
2424 (make_item_for_dump_generic_expr): New function, adapted from
2426 (dump_context::dump_generic_expr): Call it, and use the result,
2427 eliminating the direct usage of dump_file and alt_dump_file in
2428 favor of indirectly using them via emit_item.
2429 (make_item_for_dump_printf_va): New function, adapted from
2430 optinfo::add_printf_va.
2431 (make_item_for_dump_printf): New function.
2432 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
2433 and use the result, eliminating the direct usage of dump_file and
2434 alt_dump_file in favor of indirectly using them via emit_item.
2435 (make_item_for_dump_dec): New function.
2436 (dump_context::dump_dec): Call it, and use the result,
2437 eliminating the direct usage of dump_file and alt_dump_file in
2438 favor of indirectly using them via emit_item.
2439 (make_item_for_dump_symtab_node): New function, adapted from
2440 optinfo::add_symtab_node.
2441 (dump_context::dump_symtab_node): Call it, and use the result,
2442 eliminating the direct usage of dump_file and alt_dump_file in
2443 favor of indirectly using them via emit_item.
2444 (dump_context::begin_scope): Reimplement, avoiding direct usage
2445 of dump_file and alt_dump_file in favor of indirectly using them
2447 (dump_context::emit_item): New member function.
2448 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
2449 Set up test pretty-printer on the underlying context. Call
2450 refresh_dumps_are_enabled.
2451 (temp_dump_context::~temp_dump_context): Call
2452 refresh_dumps_are_enabled.
2453 (temp_dump_context::get_dumped_text): New member function.
2454 (selftest::verify_dumped_text): New function.
2455 (ASSERT_DUMPED_TEXT_EQ): New macro.
2456 (selftest::test_capture_of_dump_calls): Run all tests twice, with
2457 and then without optinfo enabled. Add uses of
2458 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
2459 * dumpfile.h: Update comment for the dump_* API.
2460 * optinfo-emit-json.cc
2461 (selftest::test_building_json_from_dump_calls): Update for new
2462 param for temp_dump_context ctor.
2463 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
2464 and "m_owned" field.
2465 (optinfo_item::~optinfo_item): Likewise.
2466 (optinfo::add_item): New member function.
2467 (optinfo::emit): Update comment.
2468 (optinfo::add_string): Delete.
2469 (optinfo::add_printf): Delete.
2470 (optinfo::add_printf_va): Delete.
2471 (optinfo::add_gimple_stmt): Delete.
2472 (optinfo::add_gimple_expr): Delete.
2473 (optinfo::add_tree): Delete.
2474 (optinfo::add_symtab_node): Delete.
2475 (optinfo::add_dec): Delete.
2476 * optinfo.h (class dump_context): New forward decl.
2477 (optinfo::add_item): New decl.
2478 (optinfo::add_string): Delete.
2479 (optinfo::add_printf): Delete.
2480 (optinfo::add_printf_va): Delete.
2481 (optinfo::add_gimple_stmt): Delete.
2482 (optinfo::add_gimple_expr): Delete.
2483 (optinfo::add_tree): Delete.
2484 (optinfo::add_symtab_node): Delete.
2485 (optinfo::add_dec): Delete.
2486 (optinfo::add_poly_int): Delete.
2487 (optinfo_item::optinfo_item): Remove "owned" param.
2488 (class optinfo_item): Remove field "m_owned".
2490 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2493 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
2494 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
2495 requested variable alignment.
2496 (expand_one_ssa_partition): Likewise.
2497 (expand_one_var): Likewise.
2499 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2501 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
2502 to speculation_safe_value_not_needed.
2504 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2506 * targhooks.h (speculation_safe_value_not_needed): New prototype.
2507 * targhooks.c (speculation_safe_value_not_needed): New function.
2508 * target.def (have_speculation_safe_value): Update documentation.
2509 * doc/tm.texi: Regenerated.
2511 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2513 * config/aarch64/iterators.md (ALLI_TI): New iterator.
2514 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
2516 (despeculate_copy<ALLI:mode>_insn): New insn.
2517 (despeculate_copyti_insn): New insn.
2518 (despeculate_simple<ALLI:mode>): New insn
2519 (despeculate_simpleti): New insn.
2520 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
2522 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
2523 aarch64_speculation_safe_value.
2524 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
2526 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2528 * config/aarch64/aarch64-speculation.cc: New file.
2529 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
2530 before pass_reorder_blocks.
2531 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
2533 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
2534 X14 and X15 when tracking speculation.
2535 * config/aarch64/aarch64.md (register name constants): Add
2536 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
2537 (unspec): Add UNSPEC_SPECULATION_TRACKER.
2538 (speculation_barrier): New insn attribute.
2539 (cmp<mode>): Allow SP in comparisons.
2540 (speculation_tracker): New insn.
2541 (speculation_barrier): Add speculation_barrier attribute.
2542 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
2543 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
2544 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
2546 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2548 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
2549 aarch64_track_speculation is true.
2550 (tb<optab><mode>1): Likewise.
2551 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
2552 generate CB[N]Z when tracking speculation.
2553 (aarch64_split_compare_and_swap): Likewise.
2554 (aarch64_split_atomic_op): Likewise.
2556 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2558 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
2560 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2562 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
2563 (speculation_barrier): New insn.
2565 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2567 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
2568 * config/arm/arm.md (speculation_barrier): New expand.
2569 (speculation_barrier_insn): New pattern.
2571 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2573 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
2574 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
2575 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
2576 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
2578 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
2579 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
2580 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
2581 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
2582 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
2583 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
2584 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
2585 * builtins.c (expand_speculation_safe_value): New function.
2586 (expand_builtin): Call it.
2587 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
2588 * doc/extend.texi: Document __builtin_speculation_safe_value.
2589 * doc/md.texi: Document "speculation_barrier" pattern.
2590 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
2591 TARGET_HAVE_SPECULATION_SAFE_VALUE.
2592 * doc/tm.texi: Regenerated.
2593 * target.def (have_speculation_safe_value, speculation_safe_value): New
2595 * targhooks.c (default_have_speculation_safe_value): New function.
2596 (default_speculation_safe_value): New function.
2597 * targhooks.h (default_have_speculation_safe_value): Add prototype.
2598 (default_speculation_safe_value): Add prototype.
2600 2018-07-31 David Malcolm <dmalcolm@redhat.com>
2602 * dump-context.h (dump_context::dump_loc): New decl.
2603 * dumpfile.c (dump_context::dump_loc): New member function.
2604 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
2605 and dump_gimple_stmt.
2606 (dump_context::dump_gimple_expr_loc): Likewise, using
2608 (dump_context::dump_generic_expr_loc): Likewise, using
2610 (dump_context::dump_printf_loc_va): Likewise, using
2612 (dump_context::begin_scope): Explicitly using the global function
2613 "dump_loc", rather than the member function.
2615 2018-07-31 Martin Sebor <msebor@redhat.com>
2617 PR tree-optimization/86741
2618 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
2620 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
2622 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
2623 depend on whether prefetch instructions will be emitted or not.
2624 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
2625 will be emitted or not.
2626 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
2627 (TARGET_SETMEM_PFD): New macros.
2629 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2631 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
2632 (NULL_STMT_VEC_INFO): Delete.
2633 (stmt_vec_info::operator*): Likewise.
2634 (stmt_vec_info::operator gimple *): Likewise.
2635 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
2636 of NULL_STMT_VEC_INFO.
2637 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2638 (vect_reassociating_reduction_p): Likewise.
2639 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
2640 (vectorizable_store): Likewise.
2641 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
2642 (vec_info::free_stmt_vec_infos): Likewise.
2644 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2646 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
2647 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
2649 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2651 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
2652 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
2653 (vec_info::free_stmt_vec_info): New private member functions.
2654 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
2655 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
2656 * tree-parloops.c (gather_scalar_reductions): Remove calls to
2657 set_stmt_vec_info_vec and free_stmt_vec_infos.
2658 * tree-vect-loop.c (_loop_vec_info): Remove call to
2659 set_stmt_vec_info_vec.
2660 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
2661 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
2662 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
2663 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
2664 (vec_info::free_stmt_vec_info): ...these new functions. Remove
2665 assignments in {vec_info::,}new_stmt_vec_info that are redundant
2666 with the clearing in the xcalloc.
2667 (stmt_vec_info_vec): Delete.
2668 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
2669 (vectorize_loops): Likewise.
2670 (vec_info::~vec_info): Remove argument from call to
2671 free_stmt_vec_infos.
2672 (vec_info::add_stmt): Remove vinfo argument from call to
2675 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2677 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
2678 rather than a gimple stmt.
2679 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
2680 information for pattern statements when passed the original
2681 statement; instead wait to be passed the pattern statement itself.
2682 Don't call set_vinfo_for_stmt here.
2683 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
2684 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
2685 stmt_vec_infos here.
2686 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
2687 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
2688 stmt_vec_infos entry.
2690 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2692 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
2693 * tree-vectorizer.c (vec_info::replace_stmt): New function.
2694 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
2695 * tree-vect-stmts.c (vectorizable_call): Likewise.
2696 (vectorizable_simd_clone_call): Likewise.
2698 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2700 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
2701 * tree-vectorizer.c (vec_info::remove_stmt): New function.
2702 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
2703 * tree-vect-loop.c (vect_transform_loop): Likewise.
2704 * tree-vect-slp.c (vect_schedule_slp): Likewise.
2705 * tree-vect-stmts.c (vect_remove_stores): Likewise.
2707 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2709 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
2710 (vect_dr_stmt): Delete.
2711 * tree-vectorizer.c (vec_info::lookup_dr): New function.
2712 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
2714 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
2715 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
2716 (vect_verify_datarefs_alignment, vect_peeling_supportable)
2717 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
2718 (vect_analyze_data_refs): Likewise.
2719 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
2721 (vect_find_same_alignment_drs): Likewise.
2722 (vect_slp_analyze_node_dependences): Update calls accordingly.
2723 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
2724 instead of DR_VECT_AUX.
2725 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
2726 of a vector data references. Use vec_info::lookup_dr instead of
2728 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
2729 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
2730 instead of DR_VECT_AUX.
2732 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2734 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
2736 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
2738 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2739 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2740 (vect_gen_prolog_loop_niters): Likewise.
2742 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2744 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
2745 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
2746 (vect_known_alignment_in_bytes, vect_dr_behavior)
2747 (vect_get_scalar_dr_size): Take references as dr_vec_infos
2748 instead of data_references. Update calls to other routines for
2749 which the same change has been made.
2750 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
2751 dr_vec_infos instead of stmt_vec_infos.
2752 (vect_analyze_data_ref_dependence): Update call accordingly.
2753 (vect_slp_analyze_data_ref_dependence)
2754 (vect_record_base_alignments): Use DR_VECT_AUX.
2755 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
2756 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
2757 (vector_alignment_reachable_p, vect_get_data_access_cost)
2758 (vect_peeling_supportable, vect_analyze_group_access_1)
2759 (vect_analyze_group_access, vect_analyze_data_ref_access)
2760 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
2761 (vect_compile_time_alias, vect_small_gap_p)
2762 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
2763 (vect_supportable_dr_alignment): Take references as dr_vec_infos
2764 instead of data_references. Update calls to other routines for
2765 which the same change has been made.
2766 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
2767 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
2768 (vect_slp_analyze_and_verify_node_alignment)
2769 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
2770 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
2771 (vect_setup_realignment): Use dr_vec_infos. Update calls after
2773 (_vect_peel_info::dr): Replace with...
2774 (_vect_peel_info::dr_info): ...this new field.
2775 (vect_peeling_hash_get_most_frequent)
2776 (vect_peeling_hash_choose_best_peeling): Update accordingly.
2777 (vect_peeling_hash_get_lowest_cost):
2778 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
2779 routines for which the same change has been made.
2780 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
2782 * tree-vect-loop-manip.c (get_misalign_in_elems)
2783 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
2785 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2786 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
2787 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
2788 (get_group_load_store_type, get_negative_load_store_type)
2789 (vect_get_data_ptr_increment, vectorizable_store)
2790 (vectorizable_load): Likewise.
2791 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
2792 Update calls to other routines for which the same change has been made.
2794 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2796 * tree-vectorizer.h (vec_info::move_dr): New member function.
2797 (dataref_aux): Rename to...
2798 (dr_vec_info): ...this and add "dr" and "stmt" fields.
2799 (_stmt_vec_info::dr_aux): Update accordingly.
2800 (_stmt_vec_info::data_ref_info): Delete.
2801 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
2802 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
2803 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
2804 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
2806 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
2807 (STMT_VINFO_DR_INFO): New macro.
2808 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
2809 (set_dr_misalignment): Update after rename of dataref_aux.
2810 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
2811 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
2812 initialization of STMT_VINFO_DATA_REF.
2813 * tree-vectorizer.c (vec_info::move_dr): New function.
2814 * tree-vect-patterns.c (vect_recog_bool_pattern)
2815 (vect_recog_mask_conversion_pattern)
2816 (vect_recog_gather_scatter_pattern): Use it.
2817 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
2818 the "dr" and "stmt" fields of dr_vec_info instead of
2819 STMT_VINFO_DATA_REF.
2821 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2823 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
2824 (is_pattern_stmt_p): Use it.
2825 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
2826 on pattern statements.
2828 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2830 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
2831 original stmt as a stmt_vec_info rather than a gimple stmt.
2832 (vect_pattern_recog_1): Take the statement directly as a
2833 stmt_vec_info, rather than via a gimple_stmt_iterator.
2834 Update call to vect_mark_pattern_stmts.
2835 (vect_pattern_recog): Update calls accordingly.
2837 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2839 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
2840 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
2841 a vect_def_type for the first argument.
2842 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
2843 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
2844 operand if it isn't defined by a vectorized statement.
2845 (vect_build_gather_load_calls): Remove the mask_dt argument and
2846 update calls to vect_get_vec_def_for_stmt_copy.
2847 (vectorizable_bswap): Likewise the dt argument.
2848 (vectorizable_call): Update calls to vectorizable_bswap and
2849 vect_get_vec_def_for_stmt_copy.
2850 (vectorizable_simd_clone_call, vectorizable_assignment)
2851 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
2852 (vectorizable_comparison): Update calls to
2853 vect_get_vec_def_for_stmt_copy.
2854 (vectorizable_store): Likewise. Remove now-unnecessary calls to
2856 (vect_get_loop_based_defs): Remove dt argument and update call
2857 to vect_get_vec_def_for_stmt_copy.
2858 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
2859 and vect_get_vec_def_for_stmt_copy.
2860 (vectorizable_load): Update calls to vect_build_gather_load_calls
2861 and vect_get_vec_def_for_stmt_copy.
2862 * tree-vect-loop.c (vect_create_epilog_for_reduction)
2863 (vectorizable_reduction, vectorizable_live_operation): Update calls
2864 to vect_get_vec_def_for_stmt_copy.
2866 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2868 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
2869 and gimple stmt arguments with a stmt_vec_info.
2870 (vect_record_base_alignments): Update calls accordingly.
2871 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
2872 and gimple stmt arguments with a stmt_vec_info.
2873 (vect_build_slp_tree_1): Remove vinfo argument and update call
2874 to vect_record_max_nunits.
2875 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
2876 and vect_record_max_nunits.
2878 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2880 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
2881 file and take a stmt_vec_info instead of a gimple stmt.
2882 (supportable_widening_operation, vect_finish_replace_stmt)
2883 (vect_finish_stmt_generation, vect_get_store_rhs)
2884 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
2885 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
2886 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
2887 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
2888 (vect_create_data_ref_ptr, bump_vector_ptr)
2889 (vect_permute_store_chain, vect_setup_realignment)
2890 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
2891 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
2892 (vectorizable_reduction, vectorizable_induction)
2893 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
2894 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
2895 than gimple stmts as arguments.
2896 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
2897 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
2898 (can_group_stmts_p, vect_check_gather_scatter)
2899 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
2900 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
2901 (vect_permute_load_chain, vect_shift_permute_load_chain)
2902 (vect_transform_grouped_load)
2903 (vect_record_grouped_load_vectors): Likewise.
2904 * tree-vect-loop.c (vect_fixup_reduc_chain)
2905 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
2906 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
2907 (vectorizable_reduction, vectorizable_induction)
2908 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
2909 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
2910 (vect_get_load_store_mask): Likewise.
2911 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
2912 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
2913 * tree-vect-stmts.c (vect_mark_relevant)
2914 (is_simple_and_all_uses_invariant)
2915 (exist_non_indexing_operands_for_use_p, process_use)
2916 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
2917 (vect_get_vec_def_for_operand, vect_get_vec_defs)
2918 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
2919 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
2920 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
2921 (get_negative_load_store_type, get_load_store_type)
2922 (vect_check_load_store_mask, vect_check_store_rhs)
2923 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
2924 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2925 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2926 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2927 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
2928 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
2929 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
2930 (supportable_widening_operation): Likewise.
2932 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2934 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
2935 a stmt_vec_info instead of a gcall.
2936 (vect_check_gather_scatter): Update call accordingly.
2937 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
2939 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
2940 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
2941 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
2942 instead of a gimple stmt.
2943 (vect_transform_loop): Update calls accordingly.
2944 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
2945 stmt_vec_infos instead of gimple stmts.
2946 (vect_analyze_slp_instance): Update use accordingly.
2947 * tree-vect-stmts.c (read_vector_array, write_vector_array)
2948 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
2949 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
2950 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
2951 (vect_gen_widened_results_half, vect_get_loop_based_defs)
2952 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
2953 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
2954 down to subroutines.
2956 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2958 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
2959 of the worklist from a vector of gimple stmts to a vector of
2961 * tree-vect-stmts.c (vect_mark_relevant, process_use)
2962 (vect_mark_stmts_to_be_vectorized): Likewise
2964 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2966 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
2967 statement before passing it to vect_analyze_stmt.
2968 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
2969 the chain of phi vector definitions. Track the exit phi via its
2971 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
2972 STMT_VINFO_REDUC_DEF.
2973 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
2974 stmt_vec_infos to handle the statement chains.
2975 (vect_get_slp_defs): Record the first statement in the node
2976 using a stmt_vec_info.
2977 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
2978 statements here and pass their stmt_vec_info down to subroutines.
2979 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
2980 down to vect_finish_stmt_generation.
2981 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
2982 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
2983 stmt_vec_infos to subroutines.
2984 (vect_remove_stores): Use stmt_vec_infos to handle the statement
2987 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2989 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
2990 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
2991 (vect_permute_store_chain, vect_setup_realignment)
2992 (vect_permute_load_chain, vect_shift_permute_load_chain)
2993 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
2994 stmts internally, and when passing values to other vectorizer routines.
2995 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
2996 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
2997 (vect_analyze_loop_operations, get_initial_def_for_reduction)
2998 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
2999 (vectorizable_reduction, vectorizable_induction)
3000 (vectorizable_live_operation, vect_transform_loop_stmt)
3001 (vect_transform_loop): Likewise.
3002 * tree-vect-patterns.c (vect_reassociating_reduction_p)
3003 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
3004 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
3005 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3006 (vect_slp_analyze_node_operations_1): Likewise.
3007 * tree-vect-stmts.c (vect_mark_relevant, process_use)
3008 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
3009 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
3010 (vect_finish_stmt_generation_1, get_group_load_store_type)
3011 (get_load_store_type, vect_build_gather_load_calls)
3012 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3013 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3014 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3015 (vectorizable_store, vectorizable_load, vectorizable_condition)
3016 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
3017 (supportable_widening_operation): Likewise.
3018 (vect_get_vector_types_for_stmt): Likewise.
3019 * tree-vectorizer.h (vect_dr_behavior): Likewise.
3021 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3023 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
3024 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
3025 (vect_permute_store_chain, vect_permute_load_chain)
3026 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
3027 repeated stmt_vec_info lookups.
3028 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
3029 (vect_update_ivs_after_vectorizer): Likewise.
3030 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
3031 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
3032 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
3033 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3034 (vect_bb_slp_scalar_cost): Likewise.
3035 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
3037 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3039 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
3040 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
3041 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
3042 to get gassigns and gcalls, rather than operating on generc gimple
3044 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
3045 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
3046 (vectorizable_load, vect_analyze_stmt): Likewise.
3047 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
3049 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3051 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
3052 return stmt_vec_infos rather than gimple stmts. Do not accept
3054 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
3056 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3057 Update use of get_later_stmt.
3058 (vect_get_constant_vectors): Update call accordingly.
3059 (vect_schedule_slp_instance): Likewise
3060 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
3061 (vect_slp_analyze_instance_dependence): Likewise.
3062 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
3064 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3066 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
3067 (stmt_info_for_cost::stmt_info): ...this new field.
3068 (add_stmt_costs): Update accordingly.
3069 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
3070 (vect_get_known_peeling_cost): Likewise.
3071 (vect_estimate_min_profitable_iters): Likewise.
3072 * tree-vect-stmts.c (record_stmt_cost): Likewise.
3074 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3076 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
3077 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3078 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3080 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
3082 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3084 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
3085 a gimple stmt to a stmt_vec_info.
3086 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
3088 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3090 * tree-vectorizer.h (vec_info::grouped_stores): Change from
3091 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3092 (_loop_vec_info::reduction_chains): Likewise.
3093 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
3095 * tree-vect-slp.c (vect_analyze_slp): Likewise.
3097 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3099 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
3100 a gimple stmt to a stmt_vec_info.
3101 (_stmt_vec_info::next_element): Likewise.
3102 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
3103 (vect_slp_analyze_and_verify_node_alignment)
3104 (vect_analyze_group_access_1, vect_analyze_group_access)
3105 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
3106 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
3107 (vect_supportable_dr_alignment): Update accordingly.
3108 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
3109 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
3110 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
3111 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
3112 * tree-vect-slp.c (vect_build_slp_tree_1)
3113 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
3114 (vect_split_slp_store_group, vect_analyze_slp_instance)
3115 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
3116 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
3117 (get_group_load_store_type, get_load_store_type)
3118 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
3119 (vect_transform_stmt, vect_remove_stores): Likewise.
3121 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3123 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
3125 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
3126 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
3127 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
3128 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
3129 (vector_alignment_reachable_p, vect_get_data_access_cost)
3130 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
3131 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
3132 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3133 (vect_analyze_group_access_1, vect_analyze_group_access)
3134 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
3135 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
3136 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
3137 result of vect_dr_stmt and use the stmt_vec_info instead of
3138 the associated gimple stmt.
3139 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3140 (vect_gen_prolog_loop_niters): Likewise.
3141 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3143 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3145 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
3146 to a vec<stmt_vec_info>.
3147 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
3148 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
3150 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
3151 to a vec<stmt_vec_info>.
3152 (bst_traits::value_type, bst_traits::value_type): Likewise.
3153 (bst_traits::hash): Update accordingly.
3154 (vect_get_and_check_slp_defs): Change the stmts parameter from
3155 a vec<gimple *> to a vec<stmt_vec_info>.
3156 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
3157 (vect_build_slp_tree): Likewise.
3158 (vect_build_slp_tree_2): Likewise. Update uses of
3159 SLP_TREE_SCALAR_STMTS.
3160 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
3161 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
3162 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
3163 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
3164 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
3165 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
3166 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
3167 (vect_get_constant_vectors, vect_get_slp_defs)
3168 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
3169 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
3170 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
3171 instead of gimple stmts.
3172 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
3173 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
3174 (vect_slp_analyze_instance_dependence): Update uses of
3175 SLP_TREE_SCALAR_STMTS.
3176 (vect_slp_analyze_and_verify_node_alignment): Likewise.
3177 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
3178 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
3179 (get_initial_defs_for_reduction): Likewise.
3180 (vect_create_epilog_for_reduction): Likewise.
3181 (vectorize_fold_left_reduction): Likewise.
3182 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
3183 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
3184 (can_vectorize_live_stmts): Likewise.
3186 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3188 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
3189 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3190 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
3192 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
3194 (gather_scalar_reductions): Update after above interface changes.
3195 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
3196 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
3198 (vect_force_simple_reduction): Likewise.
3199 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
3200 LOOP_VINFO_REDUCTIONS.
3201 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3203 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3205 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
3206 a gimple stmt to a stmt_vec_info.
3207 * tree-vect-loop.c (vect_active_double_reduction_p)
3208 (vect_force_simple_reduction, vectorizable_reduction): Update
3211 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3213 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
3214 vec<gimple *> to a vec<stmt_vec_info>.
3215 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
3216 the reduction_phis argument from a vec<gimple *> to a
3218 (vectorizable_reduction): Likewise the phis local variable that
3219 is passed to vect_create_epilog_for_reduction. Update for new type
3220 of SLP_TREE_VEC_STMTS.
3221 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
3222 (vectorizable_live_operation): Likewise.
3223 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
3224 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
3226 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3228 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
3229 a gimple stmt to a stmt_vec_info.
3230 (vectorizable_condition, vectorizable_live_operation)
3231 (vectorizable_reduction, vectorizable_induction): Pass back the
3232 vectorized statement as a stmt_vec_info.
3233 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
3234 use of STMT_VINFO_VEC_STMT.
3235 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
3236 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
3237 as stmt_vec_infos rather than gimple stmts.
3238 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
3240 (vectorizable_live_operation): Likewise.
3241 (vectorizable_reduction, vectorizable_induction): Likewise,
3242 updating use of STMT_VINFO_VEC_STMT.
3243 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
3244 of STMT_VINFO_VEC_STMT.
3245 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
3246 (vectorizable_simd_clone_call, vectorizable_conversion)
3247 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3248 (vectorizable_store, vectorizable_load, vectorizable_condition)
3249 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
3250 from a gimple stmt to a stmt_vec_info.
3251 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
3252 pointer to a stmt_vec_info to the vectorizable_* routines.
3254 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3256 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
3257 a gimple stmt to a stmt_vec_info.
3258 (is_pattern_stmt_p): Update accordingly.
3259 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
3260 (vect_record_grouped_load_vectors): Likewise.
3261 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
3262 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
3263 (vect_model_reduction_cost): Likewise.
3264 (vect_create_epilog_for_reduction): Likewise.
3265 (vectorizable_reduction, vectorizable_induction): Likewise.
3266 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3267 Return the stmt_vec_info for the pattern statement.
3268 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
3269 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
3270 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
3271 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
3272 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
3273 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
3274 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
3275 (free_stmt_vec_info, vect_is_simple_use): Likewise.
3277 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3279 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
3280 (vect_finish_stmt_generation): Likewise.
3281 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3282 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
3283 (vect_build_gather_load_calls): Use the return value of the above
3284 functions instead of a separate call to vinfo_for_stmt. Use narrow
3285 scopes for the input gimple stmt and wider scopes for the associated
3286 stmt_vec_info. Use vec_info::lookup_def when setting these
3287 stmt_vec_infos from an SSA_NAME definition.
3288 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3289 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3290 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3291 (vectorizable_store, vectorizable_load, vectorizable_condition)
3292 (vectorizable_comparison): Likewise.
3293 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
3294 (vectorizable_reduction): Likewise.
3296 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3298 * tree-vectorizer.h (vect_is_simple_use): Add an optional
3299 stmt_vec_info * parameter before the optional gimple **.
3300 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3301 (process_use, vect_get_vec_def_for_operand_1): Update callers.
3302 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
3303 * tree-vect-loop.c (vectorizable_reduction): Likewise.
3304 (vectorizable_live_operation): Likewise.
3305 * tree-vect-patterns.c (type_conversion_p): Likewise.
3306 (vect_look_through_possible_promotion): Likewise.
3307 (vect_recog_rotate_pattern): Likewise.
3308 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3310 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3312 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
3313 a typedef to a wrapper class.
3314 (NULL_STMT_VEC_INFO): New macro.
3315 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
3316 (stmt_vec_info::operator*): New function.
3317 (stmt_vec_info::operator gimple *): Likewise.
3318 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
3319 (add_stmt_costs): Likewise.
3320 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
3321 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
3322 (vect_get_known_peeling_cost): Likewise.
3323 (vect_estimate_min_profitable_iters): Likewise.
3324 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3325 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
3326 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3327 (vectorizable_store, free_stmt_vec_infos): Likewise.
3328 (new_stmt_vec_info): Change return type of xcalloc to
3331 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3333 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
3334 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
3335 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
3336 a single_imm_use-based sequence.
3337 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
3339 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3341 * tree-vectorizer.h (vec_info::lookup_def): Declare.
3342 * tree-vectorizer.c (vec_info::lookup_def): New function.
3343 * tree-vect-patterns.c (vect_get_internal_def): Use it.
3344 (vect_widened_op_tree): Likewise.
3345 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3346 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
3347 (vectorizable_reduction): Likewise.
3348 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
3350 (vect_is_slp_reduction): Update calls accordingly. Use
3351 vec_info::lookup_def.
3352 (vect_is_simple_reduction): Likewise
3353 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
3355 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3357 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
3358 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
3359 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
3361 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
3362 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
3363 (vect_update_vf_for_slp, vect_analyze_loop_operations)
3364 (vect_is_slp_reduction, vectorizable_induction)
3365 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
3366 * tree-vect-patterns.c (vect_init_pattern_stmt):
3367 (vect_determine_min_output_precision_1, vect_determine_precisions)
3368 (vect_pattern_recog): Likewise.
3369 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
3370 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
3371 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
3372 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
3373 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
3374 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
3375 info field from a loop to a loop_vec_info.
3377 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3379 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
3380 (vec_info::add_stmt): Declare.
3381 * tree-vectorizer.c (vec_info::add_stmt): New function.
3382 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
3383 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
3384 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
3385 (vectorizable_induction): Likewise.
3386 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
3387 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3388 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
3389 (vectorizable_load): Likewise.
3390 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3391 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
3392 (vect_recog_gather_scatter_pattern): Likewise.
3393 (append_pattern_def_seq): Likewise. Remove a check that is
3394 performed by add_stmt itself.
3396 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3398 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
3399 which make_ssa_name was called with new_stmt before new_stmt
3402 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3404 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
3406 (vect_is_slp_reduction): ...here...
3407 (vect_is_simple_reduction): ...and here. Remove repetition of tests
3408 that are already known to be false.
3410 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3412 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
3413 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
3414 STMT_VINFO_NUM_SLP_USES when it's true.
3415 (vect_free_slp_instance): Add a final_p parameter and pass it to
3417 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
3418 (vect_analyze_slp_instance): Likewise.
3419 (vect_slp_analyze_operations): Likewise.
3420 (vect_slp_analyze_bb_1): Likewise.
3421 * tree-vectorizer.c (vec_info): Likewise.
3422 * tree-vect-loop.c (vect_transform_loop): Likewise.
3424 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3426 * tree-vect-loop.c (vectorizable_reduction): Assert that the
3427 function is not called for second and subsequent members of
3430 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3432 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
3433 cases for nested loops from here to ...
3434 (vect_create_epilog_for_reduction): ...here. Only call
3435 vect_is_simple_use for inner-loop reductions.
3437 2018-07-31 Martin Liska <mliska@suse.cz>
3439 PR gcov-profile/85338
3440 PR gcov-profile/85350
3441 PR gcov-profile/85372
3442 * profile.c (struct location_triplet): New.
3443 (struct location_triplet_hash): Likewise.
3444 (output_location): Do not output a BB that
3445 is already recorded for a line.
3446 (branch_prob): Use streamed_locations.
3448 2018-07-31 Martin Liska <mliska@suse.cz>
3450 PR gcov-profile/85370
3451 * coverage.c (coverage_begin_function): Do not mark target
3452 clones as artificial functions.
3454 2018-07-31 Martin Liska <mliska@suse.cz>
3456 PR gcov-profile/83813
3457 PR gcov-profile/84758
3458 PR gcov-profile/85217
3459 PR gcov-profile/85332
3460 * profile.c (branch_prob): Do not record GOTO expressions
3461 for GIMPLE statements which locations are already streamed.
3463 2018-07-31 Olivier Hainque <hainque@adacore.com>
3465 * gcc.c (handle_spec_function): Accept a soft_matched_part
3466 argument, as do_spec_1. Pass it down to ...
3467 (eval_spec_function): Accept a soft_matched_part argument,
3468 and pass it down to ...
3469 (do_spec_2): Accept a soft_matched_part argument, and pass
3470 it down to do_spec_1.
3471 (do_spec_1): Pass soft_matched_part to handle_spec_function.
3472 (handle_braces): Update call to handle_spec_function.
3473 (driver::set_up_specs): Update calls to do_spec_2.
3474 (compare_debug_dump_opt_spec_function): Likewise.
3475 (compare_debug_self_opt_spec_function): Likewise.
3477 2018-07-31 Olivier Hainque <hainque@adacore.com>
3479 * common.opt (nolibc): New option.
3480 * doc/invoke.texi (Link Options): Document it.
3481 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
3482 * config/alpha/linux.h: Likewise.
3483 * config/arc/elf.h: Likewise.
3484 * config/arm/uclinux-elf.h: Likewise.
3485 * config/arm/unknown-elf.h: Likewise.
3486 * config/avr/avrlibc.h: Likewise.
3487 * config/bfin/bfin.h: Likewise.
3488 * config/bfin/linux.h: Likewise.
3489 * config/bfin/uclinux.h: Likewise.
3490 * config/darwin.h: Likewise.
3491 * config/darwin10.h: Likewise.
3492 * config/darwin12.h: Likewise.
3493 * config/gnu-user.h: Likewise.
3494 * config/lm32/uclinux-elf.h: Likewise.
3495 * config/pa/pa-hpux11.h: Likewise.
3496 * config/pa/pa64-hpux.h: Likewise.
3497 * config/sparc/sparc.h: Likewise.
3499 2018-07-31 Olivier Hainque <hainque@adacore.com>
3501 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
3502 undefined variables.
3504 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
3507 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
3510 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
3512 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
3513 terminated string literal.
3515 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
3517 PR rtl-optimization/85160
3518 * combine.c (is_just_move): New function.
3519 (try_combine): Allow combining two instructions into two if neither of
3520 the original instructions was a move.
3522 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
3525 * doc/extend.texi (Global Register Variables): Discourage use of type
3527 (Local Register Variables): Likewise.
3529 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
3531 PR tree-optimization/86506
3532 * hwint.h (ceil_log2): Resync with hwint.c implementation.
3534 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
3537 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
3538 hard_regno, make sure no insn between `from` and `to` clobbers it.
3540 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
3541 Tom de Vries <tdevries@suse.de>
3543 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
3544 (PTX_DEFAULT_RUNTIME_DIM): ... this.
3545 (nvptx_goacc_validate_dims): Set default worker and gang dims to
3546 PTX_DEFAULT_RUNTIME_DIM.
3547 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
3549 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
3551 * config/pa/pa.c (pa_output_addr_vec): Align address table.
3552 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
3553 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
3555 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
3557 * config/rs6000/constraints.md (wG constraint): Delete, no longer
3559 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
3560 predicate to reflect toc fusion has been deleted.
3561 (toc_fusion_mem_raw): Delete, no longer used.
3562 (toc_fusion_mem_wrapped): Likewise.
3563 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
3565 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
3566 Delete, no longer used.
3567 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
3568 meant to be used for toc fusion.
3569 (rs6000_debug_print_mode): Delete toc fusion debugging.
3570 (rs6000_debug_reg_global): Likewise.
3571 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
3572 fusion and secondary reload support that were never used.
3573 (rs6000_option_override_internal): Delete TOC fusion, that was only
3574 partially defined, and it did not work unless you also used the
3576 (rs6000_legitimate_address_p): Delete TOC fusion support.
3577 (rs6000_opt_masks): Likewise.
3578 (fusion_wrap_memory_address): Delete function, no longer used.
3579 (fusion_split_address); Delete TOC fusion support.
3580 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
3581 longer used with toc fusion being deleted.
3582 (TARGET_TOC_FUSION_FP): Likewise.
3583 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
3585 (toc fusion spliter): Delete TOC fusion support.
3586 (toc_fusionload_<mode>): Likewise.
3587 (toc_fusionload_di): Likewise.
3588 (fusion_gpr_load_<mode>): Delete generator function, this insn no
3589 longer needs to be named. Rename predicate to delete TOC fusion.
3590 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
3591 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
3592 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
3593 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
3594 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
3596 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
3598 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
3599 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
3600 __int128 in built-in function prototypes.
3601 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
3602 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
3604 2018-07-27 Martin Sebor <msebor@redhat.com>
3606 PR tree-optimization/86696
3607 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
3608 types, including enums.
3609 (handle_char_store): Be prepared for the above function to fail.
3611 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
3613 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
3614 when optimization level is lower than 2 or optimize for size.
3616 2018-07-26 Martin Sebor <msebor@redhat.com>
3618 PR tree-optimization/86043
3619 PR tree-optimization/86042
3620 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
3621 (get_string_cst_length): Rename...
3622 (get_min_string_length): ...to this. Add argument.
3623 (handle_char_store): Extend to handle multi-character stores by
3625 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
3626 * tree.h (initializer_zerop): Add argument.
3628 2018-07-26 Jakub Jelinek <jakub@redhat.com>
3631 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
3632 declare target to variables if they have always,{to,from,tofrom} map
3635 2018-07-26 Martin Liska <mliska@suse.cz>
3638 * lto-wrapper.c: Add linker_output as prefix
3639 for ltrans_output_file.
3641 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
3643 PR rtl-optimization/85805
3644 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
3645 value for hard registers if that was written in the same mode.
3647 2018-07-26 Martin Liska <mliska@suse.cz>
3649 PR gcov-profile/86536
3650 * gcov.c (format_gcov): Use printf format %.*f directly
3651 and do not handle special values.
3653 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3655 * common/config/arc/arc-common.c (arc_option_optimization_table):
3656 Update default optimizations for size.
3658 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3660 * config/arc/arc.md (movsf_insn): Add short instruction selection.
3661 * config/arc/constraints.md (CfZ): New constraint.
3662 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
3663 (subsf3_fpu): Likewise.
3664 (cmpsf_fpu): Likewise.
3665 (cmpsf_fpu_uneq): Likewise.
3667 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3669 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
3671 (arc_is_uncached_mem_p): uncached applies to both the variable and
3674 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3676 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
3679 2018-07-25 David Malcolm <dmalcolm@redhat.com>
3681 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
3682 field "m_scopes" from vec to auto_vec.
3684 2018-07-25 Martin Liska <mliska@suse.cz>
3686 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
3689 2018-07-25 Richard Biener <rguenther@suse.de>
3692 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
3693 special wrt context_die late.
3694 (gen_subprogram_die): Re-use DIEs in local scope.
3696 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
3698 PR tree-optimization/86644
3699 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
3701 2018-07-25 Martin Liska <mliska@suse.cz>
3704 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
3705 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
3707 2018-07-25 Martin Liska <mliska@suse.cz>
3710 * params.def: Explain ASan abbreviation and provide
3711 a documentation link.
3713 2018-07-24 Martin Sebor <msebor@redhat.com>
3715 PR tree-optimization/86622
3716 PR tree-optimization/86532
3717 * builtins.h (string_length): Declare.
3718 * builtins.c (c_strlen): Correct handling of non-constant offsets.
3719 (check_access): Be prepared for non-constant length ranges.
3720 (string_length): Make extern.
3721 * expr.c (string_constant): Only handle the minor non-constant
3722 array index. Use string_constant to compute the length of
3723 a generic string constant.
3725 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
3727 PR tree-optimization/86618
3728 * tree-vect-stmts.c (vectorizable_call): Don't take the address
3729 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
3731 2018-07-24 David Malcolm <dmalcolm@redhat.com>
3733 PR tree-optimization/86636
3734 * json.cc (json::object::set): Fix comment. Add assertions.
3735 (json::array::append): Move here from json.h. Add comment and an
3737 (json::string::string): Likewise.
3738 * json.h (json::array::append): Move to json.cc.
3739 (json::string::string): Likewise.
3740 * optinfo-emit-json.cc
3741 (optrecord_json_writer::impl_location_to_json): Assert that we
3742 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
3743 wrapper around it. Expand the location once, rather than three
3745 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
3746 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
3748 (optrecord_json_writer::optinfo_to_json): Likewise, in four
3749 places. Fix some overlong lines.
3751 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
3753 * config/aarch64/aarch64-simd.md
3754 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
3755 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
3756 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
3757 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
3758 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
3759 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
3760 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
3761 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
3762 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
3764 2018-07-24 Jakub Jelinek <jakub@redhat.com>
3767 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
3768 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
3769 and abs_d == d, do the power of two handling if profitable.
3771 2018-07-24 Richard Biener <rguenther@suse.de>
3773 * match.pd: Add BIT_FIELD_REF canonicalizations.
3775 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
3778 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
3780 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
3782 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
3783 terminated STRING_CST object.
3785 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
3787 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
3789 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
3791 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
3792 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
3793 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
3794 the elements into a register.
3795 (rs6000_split_v4si_init_di_reg): Delete.
3796 (rs6000_split_v4si_init): Delete.
3797 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
3798 (vsx_init_v4si): Rewrite as a define_expand.
3800 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
3802 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
3803 zero_extend argument from memory): New.
3805 2018-07-22 Martin Sebor <msebor@redhat.com>
3808 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
3809 diagnosing calls with unknown arguments unless -Walloca-larger-than
3810 is restricted to less than PTRDIFF_MAX bytes.
3812 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
3814 * doc/gcov.texi (Invoking Gcov): Editorial changes.
3816 2018-07-20 David Malcolm <dmalcolm@redhat.com>
3818 * pretty-print.c (text_info::set_location): Remove redundant
3819 "line_table" parameter from call to rich_location::set_range.
3821 2018-07-20 Martin Sebor <msebor@redhat.com>
3824 * builtins.c (expand_builtin_alloca): Adjust.
3825 * calls.c (alloc_max_size): Simplify.
3826 * cgraphunit.c (cgraph_node::expand): Adjust.
3827 * common.opt (larger_than_size, warn_frame_larger_than): Remove
3829 (frame_larger_than_size): Same.
3830 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
3831 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
3833 * doc/invoke.texi (GCC Command Options): Document option arguments.
3834 Explain byte-size arguments and suffixes.
3835 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
3836 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
3837 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
3838 * doc/options.texi (UInteger): Expand.
3839 (Host_Wide_Int, ByteSize): Document new properties.
3840 * final.c (final_start_function_1): Include sizes in an error message.
3841 * function.c (frame_offset_overflow): Same.
3842 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
3843 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
3844 Diagnose unbounded alloca calls only for limits of less than
3846 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
3847 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
3849 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
3850 only for limits of less than PTRDIFF_MAX.
3851 * langhooks-def.h (lhd_handle_option): Change function argument
3853 * langhooks.c (lhd_handle_option): Same.
3854 * langhooks.h (handle_option): Same.
3855 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
3857 (var_type, var_type_struct): Same.
3858 (var_set): Handle ByteSize flag.
3859 * optc-gen.awk: Add comments to output to ease debugging. Make
3860 use of HOST_WIDE_INT where appropriate.
3861 * opts-gen-save.awk: Use %lx to format unsigned long.
3862 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
3863 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
3864 arguments. Parse bytes-size suffixes.
3865 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
3866 (enum_value_to_arg): Same.
3867 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
3868 (handle_option): Adjust.
3869 (generate_option): Change function argument to HOST_WIDE_INT.
3870 (cmdline_handle_error): Adjust.
3871 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
3872 (set_option): Change function argument to HOST_WIDE_INT.
3873 (option_enabled): Handle cl_host_wide_int.
3874 (get_option_state): Handle CLVC_SIZE.
3875 (control_warning_option): Same.
3876 * opts.c (common_handle_option): Change function argument to
3877 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
3878 OPT_Wvla_larger_than_.
3879 * opts.h (enum cl_var_type): Add an enumerator.
3880 * stor-layout.c (layout_decl): Print a more meaningful warning.
3881 * toplev.c (output_stack_usage): Adjust.
3883 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
3885 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
3886 call to inline_expand_builtin_string_cmp.
3887 (expand_builtin_strcmp): Likewise.
3888 (expand_builtin_strncmp): Likewise.
3889 (inline_string_cmp): Delete the last parameter, change char_type_node
3890 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
3892 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
3893 the inlining expansion on target where the type of the call has same or
3894 narrower precision than unsigned char.
3896 2018-07-20 David Malcolm <dmalcolm@redhat.com>
3898 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
3899 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
3900 * common.opt (fsave-optimization-record): New option.
3901 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
3902 * doc/invoke.texi (-fsave-optimization-record): New option.
3903 * dumpfile.c: Include "optinfo-emit-json.h".
3904 (struct kv_pair): Move to coretypes.h.
3905 (optgroup_options): Make non-static.
3906 (dump_context::end_scope): Call
3907 optimization_records_maybe_pop_dump_scope.
3908 * dumpfile.h (optgroup_options): New decl.
3909 * json.cc: New file.
3911 * optinfo-emit-json.cc: New file.
3912 * optinfo-emit-json.h: New file.
3913 * optinfo.cc: Include "optinfo-emit-json.h".
3914 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
3915 (optinfo_enabled_p): Check optimization_records_enabled_p.
3916 (optinfo_wants_inlining_info_p): Likewise.
3917 * optinfo.h: Update comment.
3918 * profile-count.c (profile_quality_as_string): New function.
3919 * profile-count.h (profile_quality_as_string): New decl.
3920 (profile_count::quality): New accessor.
3921 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
3922 and optinfo_emit_json_cc_tests.
3923 * selftest.h (selftest::json_cc_tests): New decl.
3924 (selftest::optinfo_emit_json_cc_tests): New decl.
3925 * toplev.c: Include "optinfo-emit-json.h".
3926 (compile_file): Call optimization_records_finish.
3927 (do_compile): Call optimization_records_start.
3928 * tree-ssa-live.c: Include optinfo.h.
3929 (remove_unused_scope_block_p): Retain inlining information if
3930 optinfo_wants_inlining_info_p returns true.
3932 2018-07-20 Richard Biener <rguenther@suse.de>
3935 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
3936 to cover -flto-partition=none.
3938 2018-07-20 Martin Liska <mliska@suse.cz>
3940 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
3941 (get_decl_source_range): Remove unused function.
3943 2018-07-20 Richard Biener <rguenther@suse.de>
3945 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
3946 (struct vn_phi_s): Likewise.
3947 (struct vn_reference_s): Likewise.
3948 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
3949 for searching the slot of an entry known to be in the hash itself.
3950 (vn_phi_hasher::equal): Likewise.
3951 (vn_reference_hasher::equal): Likewise.
3952 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
3954 (optimistic_info, current_info): Remove, keeping only valid_info.
3955 (vn_reference_lookup_1): Remove fallback lookup.
3956 (vn_reference_lookup_2): Likewise.
3957 (vn_nary_op_lookup_1): Likewise.
3958 (vn_phi_lookup): Likewise.
3959 (vn_nary_build_or_lookup_1): Make sure to not chain the built
3961 (vn_reference_insert): Adjust, chain the inserted hash element
3962 at last_inserted_ref.
3963 (vn_reference_insert_pieces): Likewise.
3964 (visit_reference_op_call): Likewise.
3965 (vn_nary_op_insert_into): Chain the inserted hash element at
3967 (vn_nary_op_insert_pieces): Adjust.
3968 (vn_nary_op_insert): Likewise.
3969 (vn_nary_op_insert_stmt): Likewise.
3970 (vn_phi_insert): Adjust, chain the inserted hash element at
3972 (process_scc): Remove clearing and copying the optimistic
3973 table. Instead remove elements inserted during an optimistic
3974 iteration from the single table we maintain.
3975 (init_scc_vn): Adjust.
3976 (free_scc_vn): Likewise.
3977 (sccvn_dom_walker::record_cond): Likewise.
3978 (sccvn_dom_walker::after_dom_children): Likewise.
3980 2018-07-19 Martin Sebor <msebor@redhat.com>
3982 PR tree-optimization/84047
3983 PR tree-optimization/83776
3984 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
3985 (check_array_bounds): Call it.
3987 2018-07-19 Martin Sebor <msebor@redhat.com>
3989 * align.h (align_flags): Use member initialization.
3991 2018-07-19 David Malcolm <dmalcolm@redhat.com>
3993 * Makefile.in (OBJS): Add optinfo.o.
3994 * coretypes.h (class symtab_node): New forward decl.
3995 (struct cgraph_node): New forward decl.
3996 (class varpool_node): New forward decl.
3997 * dump-context.h: New file.
3998 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
4000 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
4001 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
4002 (set_alt_dump_file): Likewise.
4003 (dump_context::~dump_context): New dtor.
4004 (dump_gimple_stmt): Move implementation to...
4005 (dump_context::dump_gimple_stmt): ...this new member function.
4006 Add the stmt to any pending optinfo, creating one if need be.
4007 (dump_gimple_stmt_loc): Move implementation to...
4008 (dump_context::dump_gimple_stmt_loc): ...this new member function.
4009 Start a new optinfo and add the stmt to it.
4010 (dump_gimple_expr): Move implementation to...
4011 (dump_context::dump_gimple_expr): ...this new member function.
4012 Add the stmt to any pending optinfo, creating one if need be.
4013 (dump_gimple_expr_loc): Move implementation to...
4014 (dump_context::dump_gimple_expr_loc): ...this new member function.
4015 Start a new optinfo and add the stmt to it.
4016 (dump_generic_expr): Move implementation to...
4017 (dump_context::dump_generic_expr): ...this new member function.
4018 Add the tree to any pending optinfo, creating one if need be.
4019 (dump_generic_expr_loc): Move implementation to...
4020 (dump_context::dump_generic_expr_loc): ...this new member
4021 function. Add the tree to any pending optinfo, creating one if
4023 (dump_printf): Move implementation to...
4024 (dump_context::dump_printf_va): ...this new member function. Add
4025 the text to any pending optinfo, creating one if need be.
4026 (dump_printf_loc): Move implementation to...
4027 (dump_context::dump_printf_loc_va): ...this new member function.
4028 Start a new optinfo and add the stmt to it.
4029 (dump_dec): Move implementation to...
4030 (dump_context::dump_dec): ...this new member function. Add the
4031 value to any pending optinfo, creating one if need be.
4032 (dump_context::dump_symtab_node): New member function.
4033 (dump_context::get_scope_depth): New member function.
4034 (dump_context::begin_scope): New member function.
4035 (dump_context::end_scope): New member function.
4036 (dump_context::ensure_pending_optinfo): New member function.
4037 (dump_context::begin_next_optinfo): New member function.
4038 (dump_context::end_any_optinfo): New member function.
4039 (dump_context::s_current): New global.
4040 (dump_context::s_default): New global.
4041 (dump_scope_depth): Delete global.
4042 (dumpfile_ensure_any_optinfo_are_flushed): New function.
4043 (dump_symtab_node): New function.
4044 (get_dump_scope_depth): Reimplement in terms of dump_context.
4045 (dump_begin_scope): Likewise.
4046 (dump_end_scope): Likewise.
4047 (selftest::temp_dump_context::temp_dump_context): New ctor.
4048 (selftest::temp_dump_context::~temp_dump_context): New dtor.
4049 (selftest::verify_item): New function.
4050 (ASSERT_IS_TEXT): New macro.
4051 (ASSERT_IS_TREE): New macro.
4052 (ASSERT_IS_GIMPLE): New macro.
4053 (selftest::test_capture_of_dump_calls): New test.
4054 (selftest::dumpfile_c_tests): Call it.
4055 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
4056 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
4057 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
4058 descriptive comment.
4059 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
4060 (dump_node, dump_bb): Move these unrelated decls.
4061 (class dump_manager): Add leading comment.
4062 * optinfo.cc: New file.
4063 * optinfo.h: New file.
4065 2018-07-19 Michael Collison <michael.collison@arm.com>
4066 Richard Henderson <rth@redhat.com>
4068 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
4069 (subti): Handle op1 zero.
4070 (subvti4, usub4ti4): New.
4071 (*sub<GPI>3_compare1_imm): New.
4072 (sub<GPI>3_carryinCV): New.
4073 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
4074 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
4076 2018-07-19 Michael Collison <michael.collison@arm.com>
4077 Richard Henderson <rth@redhat.com>
4079 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
4080 (addti3): Create simpler code if low part is already known to be 0.
4081 (addvti4, uaddvti4): New.
4082 (*add<GPI>3_compareC_cconly_imm): New.
4083 (*add<GPI>3_compareC_cconly): New.
4084 (*add<GPI>3_compareC_imm): New.
4085 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
4086 handle constants within this pattern..
4087 (*add<GPI>3_compareV_cconly_imm): New.
4088 (*add<GPI>3_compareV_cconly): New.
4089 (*add<GPI>3_compareV_imm): New.
4090 (add<GPI>3_compareV): New.
4091 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
4092 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
4093 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
4094 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
4095 with 'comparison' operator.
4096 (*add<GPI>3_compareV_cconly_imm): Ditto.
4097 (*add<GPI>3_compareV_cconly): Ditto.
4098 (*add<GPI>3_compareV_imm): Ditto.
4099 (add<GPI>3_compareV): Ditto.
4100 (add<mode>3_carryinC): Ditto.
4101 (*add<mode>3_carryinC_zero): Ditto.
4102 (*add<mode>3_carryinC): Ditto.
4103 (add<mode>3_carryinV): Ditto.
4104 (*add<mode>3_carryinV_zero): Ditto.
4105 (*add<mode>3_carryinV): Ditto.
4107 2018-07-19 Michael Collison <michael.collison@arm.com>
4108 Richard Henderson <rth@redhat.com>
4110 * config/aarch64/aarch64-modes.def (CC_V): New.
4111 * config/aarch64/aarch64-protos.h
4112 (aarch64_addti_scratch_regs): Declare
4113 (aarch64_subvti_scratch_regs): Declare.
4114 (aarch64_expand_subvti): Declare.
4115 (aarch64_gen_unlikely_cbranch): Declare
4116 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
4117 for signed overflow using CC_Vmode.
4118 (aarch64_get_condition_code_1): Handle CC_Vmode.
4119 (aarch64_gen_unlikely_cbranch): New function.
4120 (aarch64_addti_scratch_regs): New function.
4121 (aarch64_subvti_scratch_regs): New function.
4122 (aarch64_expand_subvti): New function.
4124 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
4126 * config/aarch64/aarch64-option-extensions.def: New entry for profile
4128 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
4129 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
4132 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
4135 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
4136 address check not strict.
4138 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
4140 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
4142 (store_pair_lanes<mode>): Likewise.
4143 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
4144 enum value 'ADDR_QUERY_LDP_STP_N'.
4145 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
4146 (aarch64_print_address_internal): Add declaration.
4147 (aarch64_print_ldpstp_address): Remove.
4148 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
4149 (aarch64_print_operand): Change printing of 'y'.
4150 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
4151 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
4152 'true' rather than '1'.
4153 * config/aarch64/constraints.md (Uml): Likewise.
4154 (Uml): Rename to Umn.
4157 2018-07-19 Richard Biener <rguenther@suse.de>
4159 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
4161 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
4162 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
4163 (vn_reference_hasher): Likewise.
4164 (struct vn_tables_s): Remove obstack and alloc-pool members.
4165 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
4166 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
4167 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
4168 (vn_reference_insert_pieces): Likewise.
4169 (alloc_vn_nary_op_noinit): Adjust.
4170 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
4171 (vn_phi_eq): Adjust.
4172 (shared_lookup_phiargs): Remove.
4173 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
4174 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
4175 (visit_reference_op_call): Likewise.
4176 (copy_nary, copy_phi, copy_reference): Remove.
4177 (process_scc): Rewind the obstack when iterating. Do not
4178 copy the elements to valid_info but just move them from one
4179 hashtable to the other.
4180 (allocate_vn_table): Adjust.
4181 (free_vn_table): Likewise.
4182 (init_scc_vn): Likewise.
4183 (free_scc_vn): Likewise.
4185 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
4188 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
4189 indirect_return as function type attribute.
4190 (ix86_attribute_table): Change indirect_return to function
4192 * doc/extend.texi: Update indirect_return attribute.
4194 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
4196 * wide-int.h (widest2_int): New.
4197 * gimple-fold.c (arith_overflowed_p): Use it.
4198 * tree.h (widest2_int_cst): New.
4199 * tree-vrp.c (wide_int_binop_overflow): Rename from
4200 vrp_int_const_binop.
4201 Rewrite to work on trees.
4202 (extract_range_from_multiplicative_op_1): Abstract code to...
4203 (wide_int_range_min_max): ...here.
4204 (wide_int_range_cross_product): ...and here.
4205 (extract_range_from_binary_expr_1): Abstract overflow code to...
4206 (wide_int_range_mult_wrapping): ...here.
4207 * tree-vrp.h (wide_int_range_cross_product): New.
4208 (wide_int_range_mult_wrapping): New.
4210 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
4211 Julia Koval <julia.koval@intel.com>
4213 * config/i386/x86-tune-costs.h (skylake_memcpy,
4214 skylake_memset): Replace rep_prefix with unrolling for size 512.
4216 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
4219 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
4220 comparision with EQ_EXPR in last stmt.
4222 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
4224 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
4225 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
4226 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
4227 previously known as "PowerPC AltiVec Built-in Functions". Move
4228 some material to new subsubsections "PowerPC AltiVec Built-in
4229 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
4231 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
4232 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
4233 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
4234 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
4236 2018-07-18 Richard Biener <rguenther@suse.de>
4238 PR tree-optimization/86557
4239 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
4242 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
4244 * config/s390/s390.c (s390_function_profiler): Generate CFI.
4246 2018-07-17 Jeff Law <law@redhat.com>
4248 * config/arm/arm.c (get_label_padding): Update for recent
4249 changes to label_to_alignment.
4251 PR tree-optimization/86010
4252 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
4254 * config/mips/mips.c (vr4130_align_insns): Update for recent
4255 changes to label_to_alignment.
4257 * config/frv/frv.c (frv_label_align): Update for recent changes
4258 to label_to_alignment.
4260 * config/nios2/nios2.c (nios2_label_align): Update for recent
4261 changes which dropped ALIGN_LABELS_LOG.
4263 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
4265 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
4266 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
4268 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
4270 * config/arc/arc.c (arc_label_align): Use align_labels instead of
4271 deprecated align_labels_log.
4273 2018-07-17 Richard Biener <rguenther@suse.de>
4276 * dwarf2out.c (init_sections_and_labels): Always generate
4277 a debug_line_str_section for early LTO debug.
4278 (dwarf2out_finish): Reset debug_line_str_hash output early.
4279 Bump counter for extra dwarf5 .debug_loc labels to not conflict
4281 (dwarf2out_early_finish): Output debug_line_str.
4283 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
4285 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
4286 index register on z196 or later.
4288 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
4290 * config/s390/s390.c (s390_default_align): Set default function
4292 (s390_override_options_after_change): Call s390_default align.
4293 (s390_option_override_internal): Call s390_default_align.
4294 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
4296 2018-07-17 Jakub Jelinek <jakub@redhat.com>
4299 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
4300 to _looptemp_ clauses, other than the first two.
4302 2018-07-17 Martin Liska <mliska@suse.cz>
4304 * opts.c: Do not enable OPT_falign_* for -Os.
4306 2018-07-17 Martin Liska <mliska@suse.cz>
4308 * align.h (MAX_CODE_ALIGN): New.
4309 (MAX_CODE_ALIGN_VALUE): New.
4310 * common/config/i386/i386-common.c (ix86_handle_option):
4311 (MAX_CODE_ALIGN): Moved to align.h.
4312 * final.c (MAX_CODE_ALIGN): Likewise.
4313 * opts.c (parse_and_check_align_values):
4314 (MAX_CODE_ALIGN): Likewise.
4315 (MAX_CODE_ALIGN_VALUE): Likewise.
4317 2018-07-17 Martin Liska <mliska@suse.cz>
4319 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
4320 in order to fulfil coding style.
4321 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
4322 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4323 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4324 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
4325 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
4326 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
4327 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
4328 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
4329 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4331 2018-07-17 Martin Liska <mliska@suse.cz>
4333 * align.h: New file.
4334 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
4336 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
4337 align_flags of label_to_alignment.
4338 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
4340 * config/m68k/m68k.c: Do not use removed align_labels_value and
4342 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
4343 (LOOP_ALIGN): Likewise.
4344 (LABEL_ALIGN): Likewise.
4345 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
4346 Remove not used macro.
4347 (rs6000_loop_align): Change return type to align_flags.
4348 (rs6000_loop_align_max_skip): Remove.
4349 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
4350 Change return type to align_flags.
4351 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
4352 Remove not used macro.
4353 (rs6000_loop_align): Change return type to align_flags.
4354 (rs6000_loop_align_max_skip): Remove.
4355 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
4356 * config/rx/rx-protos.h (rx_align_for_label): Make it
4358 * config/rx/rx.c (rx_align_for_label): Change return type
4360 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
4362 into align_flags class.
4363 (LABEL_ALIGN): Likewise.
4364 (LOOP_ALIGN): Likewise.
4365 * config/s390/s390.c (s390_label_align): Use align_flags
4367 (s390_asm_output_function_label): Likewise.
4368 * config/sh/sh.c (sh_override_options_after_change):
4369 Use align_flags class directly without macros.
4370 (find_barrier): Likewise.
4371 (barrier_align): Likewise.
4372 (sh_loop_align): Likewise.
4373 * config/spu/spu.c (spu_option_override):
4374 Use align_flags_tuple::get_value instead of removed macros.
4375 (spu_sched_init): Likewise.
4376 * config/spu/spu.h (GTY): Likewise.
4377 * config/visium/visium.c (visium_option_override):
4378 Set "8" as default secondary alignment.
4379 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
4380 in order to guarantee secondary alignment of 8.
4381 * coretypes.h: Include align.h header file.
4382 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
4383 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
4384 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
4385 * doc/tm.texi.in: Likewise.
4386 * final.c (struct label_alignment): Remove not used structure.
4387 (LABEL_ALIGN): Change type to align_flags.
4388 (LOOP_ALIGN): Likewise.
4389 (JUMP_ALIGN): Likewise.
4390 (default_loop_align_max_skip): Remove.
4391 (default_label_align_max_skip): Likewise.
4392 (default_jump_align_max_skip): Likewise.
4393 (default_label_align_after_barrier_max_skip):
4394 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
4395 (LABEL_TO_MAX_SKIP): Remove.
4396 (label_to_alignment): Return align_flags type instead of integer.
4397 (label_to_max_skip): Remove.
4398 (align_fuzz): Use align_flags type.
4399 (compute_alignments): Use align_flags type and use align_flags::max
4400 to combine multiple alignments.
4401 (grow_label_align): Grow vec instead of C array.
4402 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
4403 (shorten_branches): Use align_flags type and use align_flags::max
4404 to combine multiple alignments.
4405 (final_scan_insn_1): Remove usage of secondary alignment that comes
4406 from label alignment, but instead use proper secondary alignment
4407 which is computed in grow_label_align.
4408 * flags.h (struct align_flags_tuple): Move to align.h.
4409 (struct align_flags): Likewise.
4410 (state_align_loops): Rename to align_loops.
4411 (state_align_jumps): Rename to align_jumps.
4412 (state_align_labels): Rename to align_labels.
4413 (state_align_functions): Rename to align_functions.
4414 (align_loops_log): Remove.
4415 (align_jumps_log): Remove.
4416 (align_labels_log): Remove.
4417 (align_functions_log): Remove.
4418 (align_loops_max_skip): Remove.
4419 (align_jumps_max_skip): Remove.
4420 (align_labels_max_skip): Remove.
4421 (align_functions_max_skip): Remove.
4422 (align_loops_value): Remove.
4423 (align_jumps_value): Remove.
4424 (align_labels_value): Remove.
4425 (align_functions_value): Remove.
4426 * output.h (label_to_alignment): Change return type to align_flags.
4427 (label_to_max_skip): Remove.
4428 * target.def: Remove loop_align_max_skip, label_align_max_skip,
4429 jump_align_max_skip macros.
4430 * targhooks.h (default_loop_align_max_skip): Remove.
4431 (default_label_align_max_skip): Likewise.
4432 (default_jump_align_max_skip): Likewise.
4433 (default_label_align_after_barrier_max_skip): Remove.
4434 * toplev.c (read_log_maxskip): Use ::normalize function.
4435 (parse_N_M): Remove not used argument and also call ::normalize.
4436 (parse_alignment_opts): Do not pass unused arguments.
4437 * varasm.c (assemble_start_function): Use directly align_functions
4438 instead of removed macros.
4439 * system.h: Do not poison removed macros.
4441 2018-07-17 Jakub Jelinek <jakub@redhat.com>
4444 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
4445 and cond temporaries don't have reference type if iterator has
4446 pointer type. For init use &for_pre_body instead of pre_p if
4447 for_pre_body is non-empty.
4449 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
4451 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
4452 double-double modes to SFmode directly directly.
4453 (trunc<mode>sf2_fprs): Delete.
4455 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
4457 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
4458 for conversions between IFmode and the decimal floating point modes.
4459 (init_float128_ieee): Use the correct names for conversions between
4460 KFmode and the decimal floating point modes.
4462 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
4464 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
4465 for the conversions between TDmode and IFmode.
4466 (init_float128_ieee): Use more correct names for the conversions
4467 between TDmode and KFmode.
4469 2018-07-16 Jakub Jelinek <jakub@redhat.com>
4471 PR tree-optimization/86526
4472 * builtins.c (expand_builtin_memcmp): Formatting fixes.
4473 (inline_expand_builtin_string_cmp): Likewise.
4474 (inline_string_cmp): Likewise. Use c_readstr instead of
4475 builtin_memcpy_read_str. Add unit_mode temporary.
4477 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4480 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
4481 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
4483 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
4485 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
4486 Alphabetize prototypes of built-in functions, separating out
4487 built-in functions that are listed in this section but should be
4488 described elsewhere.
4490 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
4493 * expmed.c (emit_store_flag): Do not emit setcc followed by a
4494 conditional move when trapping comparison was split to a
4495 non-trapping one (and vice versa).
4497 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
4499 * config/s390/s390.c (s390_function_profiler): Generate nops
4500 instead of profiler call sequences.
4501 * config/s390/s390.opt: Add the new option.
4503 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
4505 * config/s390/s390.c (s390_function_profiler): Generate
4506 __mcount_loc section.
4507 * config/s390/s390.opt: Add the new option.
4509 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
4511 * common.opt: Add the new warning.
4512 * config/s390/s390.c (s390_function_profiler): Emit "brasl
4513 %r0,__fentry__" when -mfentry is specified.
4514 (s390_option_override_internal): Disallow -mfentry for 31-bit
4516 * config/s390/s390.opt: Add the new option.
4518 2018-07-16 Richard Biener <rguenther@suse.de>
4521 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
4522 for function-local FUNCTION_DECL and RESULT_DECL immediately.
4524 2018-07-16 Martin Liska <mliska@suse.cz>
4527 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
4530 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
4532 * config/arc/arcHS.md: Update ARCHS scheduling rules.
4534 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
4536 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
4538 * config/arc/arc-cpus.def (hs4x): New cpu.
4540 * config/arc/arc-tables.opt: Regenerate.
4541 * config/arc/arc.c (arc_sched_issue_rate): New function.
4542 (TARGET_SCHED_ISSUE_RATE): Define.
4543 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
4544 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
4546 (attr tune): Add ARCHS4x tune values.
4547 (attr tune_dspmpy): Define.
4548 (*tst): Correct instruction type.
4549 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
4550 * config/arc/arcHS4x.md: New file.
4551 * config/arc/fpu.md: Update instruction type attributes.
4552 * config/arc/t-multilib: Regenerate.
4554 2018-07-16 Tom de Vries <tdevries@suse.de>
4557 * var-tracking.c (vt_initialize): Fix pre_dec handling.
4559 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4561 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
4564 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
4566 PR tree-optimization/86514
4567 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
4568 conversion to a boolean type from a type with greater precision.
4570 2018-07-16 Tom de Vries <tdevries@suse.de>
4572 * var-tracking.c (vt_initialize): Print adjusted insn slim if
4573 dump_flags request TDF_SLIM.
4575 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
4577 * fold-const.c (int_const_binop_1): Abstract...
4578 (wide_int_binop): ...wide int code here.
4579 (poly_int_binop): ...poly int code here.
4580 Abstract the rest of int_const_binop_1 into int_const_binop.
4581 * fold-const.h (wide_int_binop): New.
4582 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
4583 Remove useless PLUS/MINUS_EXPR case.
4584 (zero_nonzero_bits_from_vr): Move wide int code...
4585 (zero_nonzero_bits_from_bounds): ...here.
4586 (extract_range_from_binary_expr_1): Move mask optimization code...
4587 (range_easy_mask_min_max): ...here.
4588 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
4589 (range_easy_mask_min_max): New.
4591 2018-07-15 Jeff Law <law@redhat.com>
4594 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
4597 2018-07-14 Jim Wilson <jimw@sifive.com>
4599 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
4601 2018-07-14 Paul Koning <ni1d@arrl.net>
4603 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
4605 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
4607 * lto-streamer-out.c (copy_function_or_variable): Dump info about
4610 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
4611 Steve Munroe <munroesj52@gmail.com>
4613 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
4614 (_mm_andnot_si128): Likewise.
4615 (_mm_or_si128): Likewise.
4616 (_mm_xor_si128): Likewise.
4618 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
4621 * builtins.c (expand_builtin_memcmp): Inline the calls first
4622 when result_eq is false.
4623 (expand_builtin_strcmp): Inline the calls first.
4624 (expand_builtin_strncmp): Likewise.
4625 (inline_string_cmp): New routine. Expand a string compare
4626 call by using a sequence of char comparison.
4627 (inline_expand_builtin_string_cmp): New routine. Inline expansion
4628 a call to str(n)cmp/memcmp.
4629 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
4631 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
4633 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
4635 * config/arm/driver-arm.c: Include arm-native.h.
4636 (host_detect_local_cpu): Use auto-generated data tables.
4637 (vendors, arm_cpu_table): Delete. Move part information to ...
4638 * config/arm/arm-cpus.in: ... here.
4639 * config/arm/parsecpu.awk (gen_native): New function.
4640 (vendor, part): New CPU fields.
4641 (END): Add support for building the native CPU detection tables.
4642 * config/arm/t-arm (arm-native.h): Add build rule.
4643 (driver-arm.o): Add dependency on arm-native.h.
4645 2018-07-13 Richard Biener <rguenther@suse.de>
4648 * match.pd (addr1 - addr2): Allow either of the operand to
4651 2018-07-13 Tom de Vries <tdevries@suse.de>
4653 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
4656 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
4658 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
4659 arrays instead of numbered variables.
4661 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
4663 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
4664 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
4666 2018-07-13 Richard Biener <rguenther@suse.de>
4669 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
4670 instead of get_context_die.
4672 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
4673 Richard Biener <rguenther@suse.de>
4676 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
4677 that the loop latch destination where phi is defined.
4679 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
4681 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
4682 (riscv_expand_epilogue): Add assertion to check interrupt mode.
4683 (riscv_set_current_function): Extract getting interrupt type to new
4685 (riscv_get_interrupt_type): New function.
4686 (riscv_merge_decl_attributes): New function, checking interrupt type is
4688 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
4690 2018-07-12 Paul Koning <ni1d@arrl.net>
4692 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
4695 2018-07-12 Paul Koning <ni1d@arrl.net>
4697 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
4698 zero reference, add doloop_end instead.
4699 * doc/md.texi (decrement_and_branch_until_zero): Remove.
4700 (Looping patterns): Remove decrement_and_branch_until_zero. Add
4701 detail for doloop_end.
4703 2018-07-12 Martin Sebor <msebor@redhat.com>
4706 * attribs.c (decl_attributes): Reject conflicting attributes before
4707 calling attribute handlers.
4709 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
4711 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
4713 (gcc::dump_manager::get_dump_file_name): likewise.
4714 (dump_begin): Likewise.
4715 * dumpfile.h (dump_begin): Update prototype.
4716 (gcc::dump_manager::get_dump_file_name,
4717 gcc::dump_manager::get_dump_file_name): Update prototype.
4719 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4721 * internal-fn.h (vectorizable_internal_fn_p): New function.
4722 * tree-vect-slp.c (compatible_calls_p): Likewise.
4723 (vect_build_slp_tree_1): Remove nops argument. Handle calls
4724 to internal functions.
4725 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
4727 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4729 * fold-const.h (inverse_conditions_p): Declare.
4730 * fold-const.c (inverse_conditions_p): New function.
4731 * match.pd: Use inverse_conditions_p. Add folds of view_converts
4732 that test the inverse condition of a conditional internal function.
4733 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
4734 * internal-fn.c (internal_fn_mask_index): Handle conditional
4736 (vectorized_internal_fn_supported_p): New function.
4737 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
4738 (any_pred_load_store): Replace with...
4739 (need_to_predicate): ...this new variable.
4740 (redundant_ssa_names): New variable.
4741 (ifcvt_can_use_mask_load_store): Move initial checks to...
4742 (ifcvt_can_predicate): ...this new function. Handle tree codes
4743 for which a conditional internal function exists.
4744 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
4745 instead of ifcvt_can_use_mask_load_store. Update after variable
4747 (predicate_load_or_store): New function, split out from
4748 predicate_mem_writes.
4749 (check_redundant_cond_expr): New function.
4750 (value_available_p): Likewise.
4751 (predicate_rhs_code): Likewise.
4752 (predicate_mem_writes): Rename to...
4753 (predicate_statements): ...this. Use predicate_load_or_store
4754 and predicate_rhs_code.
4755 (combine_blocks, tree_if_conversion): Update after above name changes.
4756 (ifcvt_local_dce): Handle redundant_ssa_names.
4757 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
4758 general conditional functions.
4759 * tree-vect-stmts.c (vectorizable_call): Likewise.
4761 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4762 Alan Hayward <alan.hayward@arm.com>
4763 David Sherwood <david.sherwood@arm.com>
4765 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
4766 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
4767 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
4768 plus and minus and convert them into IFN_COND_FMA-based sequences.
4769 (convert_mult_to_fma): Handle conditional plus and minus.
4771 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4773 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
4774 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
4775 (cond_fnms_optab): New optabs.
4776 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
4778 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
4779 * internal-fn.h (get_conditional_internal_fn): Declare.
4780 (get_unconditional_internal_fn): Likewise.
4781 * internal-fn.c (cond_ternary_direct): New macro.
4782 (expand_cond_ternary_optab_fn): Likewise.
4783 (direct_cond_ternary_optab_supported_p): Likewise.
4784 (FOR_EACH_COND_FN_PAIR): Likewise.
4785 (get_conditional_internal_fn): New function.
4786 (get_unconditional_internal_fn): Likewise.
4787 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
4788 (gimple_match_op::gimple_match_op): Add a new overload for 5
4790 (gimple_match_op::set_op): Likewise.
4791 (gimple_resimplify5): Declare.
4792 * genmatch.c (decision_tree::gen): Generate simplifications for
4794 * gimple-match-head.c (gimple_simplify): Define an overload for
4795 5 operands. Handle calls with 5 arguments in the top-level overload.
4796 (convert_conditional_op): Handle conversions from unconditional
4797 internal functions to conditional ones.
4798 (gimple_resimplify5): New function.
4799 (build_call_internal): Pass a fifth operand.
4800 (maybe_push_res_to_seq): Likewise.
4801 (try_conditional_simplification): Try converting conditional
4802 internal functions to unconditional internal functions.
4803 Handle 3-operand unconditional forms.
4804 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
4805 Define ternary equivalents of the current rules for binary conditional
4807 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
4809 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
4810 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
4811 (optab): Handle them.
4812 (SVE_COND_FP_TERNARY): New int iterator.
4813 (sve_fmla_op, sve_fmad_op): New int attributes.
4814 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
4815 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
4816 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
4818 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4820 * target.def (preferred_else_value): New target hook.
4821 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
4822 * doc/tm.texi: Regenerate.
4823 * targhooks.h (default_preferred_else_value): Declare.
4824 * targhooks.c (default_preferred_else_value): New function.
4825 * internal-fn.h (conditional_internal_fn_code): Declare.
4826 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
4827 (get_conditional_internal_fn): Use it.
4828 (conditional_internal_fn_code): New function.
4829 * gimple-match.h (gimple_match_cond): New struct.
4830 (gimple_match_op): Add a cond member function.
4831 (gimple_match_op::gimple_match_op): Update all forms to take a
4833 * genmatch.c (expr::gen_transform): Use the same condition as res_op
4834 for the suboperation, but don't specify a particular else_value.
4835 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
4836 (visit_nary_op, visit_reference_op_load): Pass
4837 gimple_match_cond::UNCOND to the gimple_match_op constructor.
4838 * gimple-match-head.c: Include tree-eh.h
4839 (convert_conditional_op): New function.
4840 (maybe_resimplify_conditional_op): Likewise.
4841 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
4842 (gimple_resimplify2): Likewise.
4843 (gimple_resimplify3): Likewise.
4844 (gimple_resimplify4): Likewise.
4845 (maybe_push_res_to_seq): Return null for conditional operations.
4846 (try_conditional_simplification): New function.
4847 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
4849 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
4851 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
4853 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
4855 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
4857 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
4859 (hash_tree): Do not hash DECL_FCONTEXT
4860 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
4861 Do not stream DECL_FCONTEXT.
4862 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
4863 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
4865 2018-07-12 Richard Biener <rguenther@suse.de>
4868 * dwarf2out.c (gen_block_die): Only output blocks when they have
4869 at least one !DECL_IGNORED_P variable.
4871 2018-07-12 Richard Biener <rguenther@suse.de>
4874 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
4875 Remove -mieee-fp handling.
4877 2018-07-12 Richard Biener <rguenther@suse.de>
4879 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
4880 left-over from last patch.
4882 2018-07-12 Jakub Jelinek <jakub@redhat.com>
4884 PR tree-optimization/86492
4885 * gimple-ssa-store-merging.c
4886 (imm_store_chain_info::coalesce_immediate_stores): Call
4887 check_no_overlap even for the merge_overlapping case. Formatting fix.
4889 2018-07-12 Richard Biener <rguenther@suse.de>
4892 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
4893 move possibly trapping operations into the conditional.
4895 2018-07-12 Richard Biener <rguenther@suse.de>
4897 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
4898 (vn_lookup_simplify_result): Remove recursion limit applied
4900 (vn_nary_build_or_lookup_1): Adjust.
4901 (try_to_simplify): Likewise.
4902 * gimple-match-head.c (gimple_resimplify1): Instead apply one
4904 (gimple_resimplify2): Likewise.
4905 (gimple_resimplify3): Likewise.
4906 (gimple_resimplify4): Likewise.
4908 2018-07-11 Jakub Jelinek <jakub@redhat.com>
4910 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
4911 Use __mmask64 type instead of __mmask8 for __M argument.
4912 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
4913 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
4915 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
4916 __mmask16 for __M argument.
4917 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
4918 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
4919 to __mmask16 instead of __mmask8.
4920 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
4921 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
4922 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
4923 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
4924 instead of __mmask16 for __U argument.
4925 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
4926 __mmask16 instead of __mmask8 for __U argument.
4927 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
4929 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
4931 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
4933 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
4935 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
4937 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
4939 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
4941 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
4943 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
4945 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
4947 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
4948 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
4949 return type as well as __M argument type and all casts from __mmask8
4951 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
4952 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
4953 return type as well as __M argument type and all casts from __mmask8
4955 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
4956 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
4957 return type as well as __M argument type and all casts from __mmask8
4959 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
4960 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
4961 return type as well as __M argument type and all casts from __mmask8
4963 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
4964 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
4967 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
4969 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
4970 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
4973 2018-07-11 Paul Koning <ni1d@arrl.net>
4975 * doc/md.texi (define_subst): Document how multiple occurrences of
4976 the same argument in the replacement pattern are handled.
4978 2018-07-11 Paul Koning <ni1d@arrl.net>
4980 * doc/extend.texi (Common Variable Attributes): Move "mode" into
4982 (Common Type Attributes): Add "mode" attribute.
4984 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
4986 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
4987 stream DECL_ORIGINAL_TYPE.
4988 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
4989 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
4990 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
4991 Do not walk original type.
4992 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
4994 (write_ts_decl_non_common_tree_pointers): Do not stream
4996 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
4997 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
4999 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
5001 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
5002 thread twice from the same starting edge.
5004 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
5006 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
5007 * gimple.c (gimple_call_nonnull_result_p): ...here...
5008 (gimple_call_nonnull_arg): ...and here.
5009 * gimple.h (gimple_call_nonnull_result_p): New.
5010 (gimple_call_nonnull_arg): New.
5012 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
5014 * config/arm/arm-cpus.in: Move information from fpu field of each
5015 cpu definition to the isa field.
5016 * config/arm/parsecpu.awk (fpu): Delete match rule.
5017 (gen_comm_data): Don't add bits from the CPU's FPU entry.
5019 2018-07-11 Richard Biener <rguenther@suse.de>
5022 * dwarf2out.c (init_sections_and_labels): Use
5023 output_asm_line_debug_info consistently.
5024 (dwarf2out_early_finish): Likewise.
5025 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
5028 2018-07-11 Richard Biener <rguenther@suse.de>
5030 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
5031 Rework father_bb setting in a way to avoid propagating constants
5032 multiple times on a loop body.
5034 2018-07-10 Mark Wielaard <mark@klomp.org>
5037 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
5039 2018-07-10 Richard Biener <rguenther@suse.de>
5041 * hash-map.h (hash_map::iterator::operator*): Return
5042 references to key and value.
5044 2018-07-10 Jakub Jelinek <jakub@redhat.com>
5047 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
5048 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
5049 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
5050 (gimplify_omp_for): For composite loops, move outer
5051 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
5052 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
5053 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
5054 TREE_LIST for both the original class iterator and the "last" helper
5055 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
5056 loop, remember has_decl_expr from outer composite loops for the
5057 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
5059 2018-07-09 Martin Sebor <msebor@redhat.com>
5063 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
5064 accessing implicitly initialized array elements.
5065 * expr.c (string_constant): Handle string initializers of
5066 character arrays within aggregates.
5067 * gimple-fold.c (fold_array_ctor_reference): Add argument.
5068 Store element offset. As a special case, handle zero size.
5069 (fold_nonarray_ctor_reference): Same.
5070 (fold_ctor_reference): Add argument. Store subobject offset.
5071 * gimple-fold.h (fold_ctor_reference): Add argument.
5073 2018-07-09 Paul Koning <ni1d@arrl.net>
5075 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
5076 (pdp11_insn_cost): New function.
5077 (pdp11_md_asm_adjust): New function.
5078 (TARGET_INVALID_WITHIN_DOLOOP): Define.
5079 (pdp11_rtx_costs): Update to match machine better.
5080 (output_addr_const_pdp11): Correct format mismatch warnings.
5081 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
5082 * config/pdp11/pdp11.md: General change to add base_cost and/or
5083 length attributes for use by new pdp11_insn_cost function.
5084 (MIN_BRANCH): Correct definition.
5086 (doloop_end): Use standard pattern name for looping pattern.
5087 (doloop_end_nocc): New.
5088 (movsf): Add another constraint alternative.
5089 (zero_extendqihi2): Add constraint alternatives for not in place
5091 (zero_extendhisi2): Remove.
5092 (shift patterns): Add CC handling variants.
5096 (define_peephole2): New peephole to recognize mov that sets CC for
5099 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5101 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
5102 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
5105 2018-07-09 Jakub Jelinek <jakub@redhat.com>
5108 * real.c (real_nextafter): Return true if result is denormal.
5110 2018-07-09 Martin Liska <mliska@suse.cz>
5112 * common.opt: Add back wrongly removed attribute.
5114 2018-07-09 Richard Biener <rguenther@suse.de>
5117 * dwarf2out.c (gen_block_die): For an early generated DIE
5118 always output high/low PC attributes.
5120 2018-07-09 Tom de Vries <tdevries@suse.de>
5122 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
5123 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
5124 onto VAR_DECL with abstract origin.
5126 2018-07-07 Jim Wilson <jimw@sifive.com>
5128 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
5130 2018-07-07 Tom de Vries <tdevries@suse.de>
5132 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
5134 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
5136 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
5138 (combine_bound): Use wide-int overflow calculation instead of
5140 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
5142 * fold-const.c (int_const_binop_2): Same.
5143 (extract_muldiv_1): Same.
5144 (fold_div_compare): Same.
5145 (fold_abs_const): Same.
5147 * poly-int.h (add): Same.
5151 * predict.c (predict_iv_comparison): Same.
5152 * profile-count.c (slow_safe_scale_64bit): Same.
5153 * simplify-rtx.c (simplify_const_binary_operation): Same.
5154 * tree-chrec.c (tree_fold_binomial): Same.
5155 * tree-data-ref.c (split_constant_offset_1): Same.
5156 * tree-if-conv.c (idx_within_array_bound): Same.
5157 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
5158 * tree-ssa-phiopt.c (minmax_replacement): Same.
5159 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
5160 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
5161 * vr-values.c (vr_values::adjust_range_with_scev): Same.
5162 * wide-int.cc (wi::add_large): Same.
5163 (wi::mul_internal): Same.
5164 (wi::sub_large): Same.
5165 (wi::divmod_internal): Same.
5166 * wide-int.h: Change overflow type to overflow_type for neg, add,
5167 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
5168 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
5169 mul_internal, divmod_internal.
5170 (overflow_type): New enum.
5171 (accumulate_overflow): New.
5173 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
5175 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
5176 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
5178 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
5180 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
5181 argument is checked for zero before entering loop, avoid checking again.
5183 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
5185 * gimplify.h (generic_expr_could_trap_p): Set as global function.
5186 * gimplify.h (generic_expr_could_trap_p): Likwise.
5187 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
5189 2018-07-06 Jakub Jelinek <jakub@redhat.com>
5191 PR tree-optimization/86401
5192 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
5193 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
5194 (fold_bit_and_mask): ... here. New helper function for match.pd.
5195 * fold-const.h (fold_bit_and_mask): Declare.
5196 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
5198 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
5201 * target.def (translate_mode_attribute): New hook.
5202 * targhooks.h (default_translate_mode_attribute): Declare.
5203 * targhooks.c (default_translate_mode_attribute): New function.
5204 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
5205 * doc/tm.texi: Regenerate.
5206 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
5207 (rs6000_translate_mode_attribute): New function.
5209 2018-07-06 Paul Koning <ni1d@arrl.net>
5211 * doc/md.texi (define_split): Document DONE and FAIL.
5212 (define_peephole2): Ditto.
5214 2018-07-05 Jeff Law <law@redhat.com>
5216 PR tree-optimization/86010
5217 * tree-ssa-dse.c (compute_trims): More aggressively trim at
5218 both the head and tail of mem* and str* calls.
5220 2018-07-05 Jim Wilson <jimw@sifive.com>
5222 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
5224 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
5226 * config/aarch64/aarch64-simd.md: correct flags text for
5227 MIN_EXPR replacement.
5229 2018-07-05 James Clarke <jrtc27@jrtc27.com>
5231 * configure: Regenerated.
5233 2018-07-05 Carl Love <cel@us.ibm.com>
5235 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
5236 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
5237 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
5238 VSX_BUILTIN_DOUBLEL_V4SF.
5240 2018-07-05 Martin Sebor <msebor@redhat.com>
5243 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
5244 than its domain to compute its the upper bound of a char array.
5246 2018-07-05 Nathan Sidwell <nathan@acm.org>
5248 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
5249 * doc/cpp.texi: Update comment.
5250 * doc/tm.texi: Rebuilt.
5251 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
5252 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
5253 * doc/extend.texi (Backwards Compatibility): Clarify it is system
5254 headers affected by extern "C".
5255 * system.h: Poison NO_IMPLICIT_EXTERN_C.
5256 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
5257 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
5258 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
5259 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
5260 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
5261 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
5262 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
5263 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
5264 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
5265 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
5266 config/sparc/sp64-elf.h, config/spu/spu.h,
5267 config/stormy16/stormy16.h, config/v850/v850.h,
5268 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
5269 define NO_IMPLICIT_EXTERN_C.
5270 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
5272 2018-07-05 Tamar Christina <tamar.christina@arm.com>
5275 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
5276 instead of GET_MODE_SIZE when comparing Units.
5278 2018-07-05 Tamar Christina <tamar.christina@arm.com>
5281 * rtlanal.c (set_noop_p): Constrain on mode change,
5282 include hard-reg-set.h
5284 2018-07-05 Tamar Christina <tamar.christina@arm.com>
5286 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
5288 2018-07-05 Jakub Jelinek <jakub@redhat.com>
5291 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
5294 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
5296 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
5298 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
5301 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
5303 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
5305 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
5308 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
5310 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
5312 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
5313 neg_*_op* variables.
5315 2018-07-04 Martin Liska <mliska@suse.cz>
5317 * tree-switch-conversion.c: Define
5318 max_ratio_for_speed and max_ratio_for_size constants.
5320 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
5321 Martin Liska <mliska@suse.cz>
5326 * common.opt: Rename align options with 'str_' prefix.
5327 * common/config/i386/i386-common.c (set_malign_value): New
5329 (ix86_handle_option): Use it to set -falign-* options/
5330 * config/aarch64/aarch64-protos.h (struct tune_params): Change
5331 type from int to string.
5332 * config/aarch64/aarch64.c: Update default values from int
5334 * config/alpha/alpha.c (alpha_override_options_after_change):
5336 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
5337 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5338 max skip conditionally.
5339 * config/i386/freebsd.h (SUBALIGN_LOG): New.
5340 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5341 max skip conditionally.
5342 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5343 max skip conditionally.
5344 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
5345 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5346 max skip conditionally.
5347 * config/i386/i386.c (struct ptt): Change type from int to
5349 (ix86_default_align): Set default values.
5350 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
5351 max skip conditionally.
5352 * config/i386/iamcu.h (SUBALIGN_LOG): New.
5353 (ASM_OUTPUT_MAX_SKIP_ALIGN):
5354 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
5355 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5356 max skip conditionally.
5357 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
5358 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
5359 * config/i386/x86-64.h (SUBALIGN_LOG): New.
5360 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5361 max skip conditionally.
5362 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5363 * config/ia64/ia64.c (ia64_option_override): Set default values
5364 for alignment options.
5365 * config/m68k/m68k.c: Handle new str_align_* options.
5366 * config/mips/mips.c (mips_set_compression_mode): Change
5368 (mips_option_override): Set default values for options.
5369 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
5371 * config/rs6000/rs6000.c (rs6000_option_override_internal):
5373 * config/rx/rx.c (rx_option_override): Likewise.
5374 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
5375 (LABEL_ALIGN): Use align_labels_log.
5376 (LOOP_ALIGN): Use align_loops_align.
5377 * config/s390/s390.c (s390_asm_output_function_label): Use new
5379 * config/sh/sh.c (sh_override_options_after_change):
5380 Change type of constants.
5381 * config/spu/spu.c (spu_sched_init): Likewise.
5382 * config/sparc/sparc.c (sparc_option_override): Set default
5384 * config/visium/visium.c (visium_option_override): Likewise.
5385 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
5386 emit p2align format with last argument if it's not needed.
5387 * doc/invoke.texi: Document extended format of -falign-*.
5388 * final.c: Use align_labels alignment.
5389 * flags.h (struct target_flag_state): Change type to use
5391 (struct align_flags_tuple): New.
5392 (struct align_flags): Likewise.
5393 (align_loops_log): Redefine macro to use new types.
5394 (align_loops_max_skip): Redefine macro to use new types.
5395 (align_jumps_log): Redefine macro to use new types.
5396 (align_jumps_max_skip): Redefine macro to use new types.
5397 (align_labels_log): Redefine macro to use new types.
5398 (align_labels_max_skip): Redefine macro to use new types.
5399 (align_functions_log): Redefine macro to use new types.
5400 (align_loops): Redefine macro to use new types.
5401 (align_jumps): Redefine macro to use new types.
5402 (align_labels): Redefine macro to use new types.
5403 (align_functions): Redefine macro to use new types.
5404 (align_functions_max_skip): Redefine macro to use new types.
5405 (align_loops_value): New macro.
5406 (align_jumps_value): New macro.
5407 (align_labels_value): New macro.
5408 (align_functions_value): New macro.
5409 * function.c (invoke_set_current_function_hook): Propagate
5410 alignment values from flags to global variables default in
5412 * ipa-icf.c (sem_function::equals_wpa): Use
5413 cl_optimization_option_eq instead of memcmp.
5414 * lto-streamer.h (cl_optimization_stream_out): Support streaming
5416 (cl_optimization_stream_in): Likewise.
5417 * optc-save-gen.awk: Support strings in cl_optimization.
5418 * opth-gen.awk: Likewise.
5419 * opts.c (finish_options): Remove error checking of invalid
5421 (MAX_CODE_ALIGN): Remove.
5422 (MAX_CODE_ALIGN_VALUE): Likewise.
5423 (parse_and_check_align_values): New function.
5424 (check_alignment_argument): Likewise.
5425 (common_handle_option): Use check_alignment_argument.
5426 * opts.h (parse_and_check_align_values): Declare.
5427 * toplev.c (init_alignments): Remove.
5428 (read_log_maxskip): New.
5429 (parse_N_M): Likewise.
5430 (parse_alignment_opts): Likewise.
5431 (backend_init_target): Remove usage of init_alignments.
5432 * toplev.h (parse_alignment_opts): Declare.
5433 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
5435 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
5436 * tree.c (cl_option_hasher::equal): New.
5437 * varasm.c: Use new global macros.
5439 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
5441 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
5442 Use a simpler align directive also if MAXSKIP = ALIGN-1.
5443 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5444 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5445 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5446 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5447 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
5448 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
5449 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
5450 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5451 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5452 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5453 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5455 2018-07-04 Martin Liska <mliska@suse.cz>
5456 Jonathan Wakely <jwakely@redhat.com>
5458 * coverage.c: Use correct type.
5459 * doc/invoke.texi: Language correction.
5461 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
5464 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
5465 ENDBRANCH for non-tail call which may return via indirect branch.
5466 * doc/extend.texi: Document indirect_return attribute.
5468 2018-07-03 Martin Sebor <msebor@redhat.com>
5470 PR tree-optimization/86274
5471 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
5473 (format_floating): Correct handling of infinities and NaNs.
5475 2018-07-03 Martin Sebor <msebor@redhat.com>
5477 * print-tree.c (print_real_cst): New function.
5478 (print_node_brief): Call it.
5479 (print_node): Ditto.
5481 2018-07-03 Jeff Law <law@redhat.com>
5483 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
5484 into a single pattern.
5486 * config/h8300/h8300.md (ors code_iterator): New.
5487 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
5488 a single pattern and single splitter.
5489 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
5490 (iorqi3_1, xorqi3_1): Likewise.
5491 (iorqi3, xorqi3 expanders): Similarly.
5493 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
5494 (movmd_internal) into a single pattern using the P mode iterator.
5495 (movmd splitters): Similarly.
5496 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
5497 (movsd splitters): Similarly.
5499 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
5500 ADDB, ADDW and ADDL into a single ADD attribute which selects the
5501 right table based on the size of the operand.
5502 * config/h8300/h8300.md (length_table): Corresponding changes. All
5503 references to "addb", "addw" and "addl" changed to "add".
5504 (btst patterns): Merge two variants into a single pattern.
5505 (tstqi, tsthi): Likewise.
5506 (addhi3_incdec, addsi3_incdec): Likewise.
5507 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
5508 (mulhi3, mulsi3): Likewise.
5509 (udivhi3, udivsi3): Likewise.
5510 (divhi3, divsi3): Likewise.
5511 (andorqi3, andorhi3, andorsi3): Likewise.
5513 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
5516 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
5517 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
5519 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5521 PR tree-optimization/85694
5522 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
5523 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
5525 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
5526 (<u>avg<mode>3_ceil): New patterns.
5528 2018-07-03 David Malcolm <dmalcolm@redhat.com>
5530 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
5531 scan-tree-dump directive.
5532 * gcc.dg/vect/slp-perm-2.c: Likewise.
5533 * gcc.dg/vect/slp-perm-3.c: Likewise.
5534 * gcc.dg/vect/slp-perm-5.c: Likewise.
5535 * gcc.dg/vect/slp-perm-6.c: Likewise.
5536 * gcc.dg/vect/slp-perm-7.c: Likewise.
5537 * gcc.dg/vect/slp-perm-8.c: Likewise.
5539 2018-07-03 Marek Polacek <polacek@redhat.com>
5542 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
5544 2018-07-03 Richard Biener <rguenther@suse.de>
5547 * tree-ssa-structalias.c (find_func_clobbers): Properly
5548 handle indirect calls.
5550 2018-07-03 Jeff Law <law@redhat.com>
5552 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
5553 (shifts): New code iterator.
5554 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
5555 expander. Fix HImode handling on H8/SX.
5556 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
5557 (subqi3, subhi3, subsi3 expanders): Likewise.
5558 (andqi3, andhi3, andsi3 expanders): Likewise.
5559 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
5560 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
5561 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
5562 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
5563 (zero_extendqihi2, zero_extendqisi2): Likewise.
5564 (extendqihi2, extendqisi2): Likewise.
5565 (rotlqi3, rotlhi3, rotlsi3): Likewise.
5566 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
5567 (rotlqi3_1, rotlhi3_1): Likewise.
5568 (logicalhi3_sn, logicalsi3_sn): Likewise.
5569 (logicalhi3, logicalsi3): Likewise.
5571 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5573 * tree-vect-patterns.c (vect_recog_rotate_pattern)
5574 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
5575 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
5576 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
5577 type to append_pattern_def_seq instead of creating a stmt_vec_info
5579 (build_mask_conversion): Likewise. Remove vinfo argument.
5580 (vect_add_conversion_to_patterm): Likewise, renaming to...
5581 (vect_add_conversion_to_pattern): ...this.
5582 (vect_recog_mask_conversion_pattern): Update call to
5583 build_mask_conversion. Pass the vector type to
5584 append_pattern_def_seq here too.
5585 (vect_recog_gather_scatter_pattern): Update call to
5586 vect_add_conversion_to_pattern.
5588 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5590 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
5591 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5592 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
5593 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
5594 STMT_VINFO_PATTERN_DEF_SEQ to null here.
5595 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
5596 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
5597 append_pattern_def_seq instead of new_pattern_def_seq.
5598 (vect_recog_divmod_pattern): Do both of the above.
5599 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
5602 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5604 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
5605 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
5606 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
5607 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
5608 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
5609 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
5610 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
5611 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
5612 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
5613 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
5614 parameter with a single stmt_vec_info.
5615 (vect_recog_func_ptr): Likewise.
5616 (vect_recog_gather_scatter_pattern): Likewise, folding in...
5617 (vect_try_gather_scatter_pattern): ...this.
5618 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
5619 the stmt_vec_info of the statement to be matched. Don't clear
5620 STMT_VINFO_RELATED_STMT.
5621 (vect_pattern_recog): Update call accordingly.
5623 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5625 PR tree-optimization/85694
5626 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
5627 (uavgM3_ceil): Document new optabs.
5628 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
5629 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
5631 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
5632 (savg_ceil_optab): New optabs.
5633 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
5634 (vect_vect_recog_func_ptrs): Add it.
5635 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
5636 constant directly from the associated lhs.
5638 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5640 * tree-vect-patterns.c (vect_split_statement): New function.
5641 (vect_convert_input): Use it to try to split an existing cast.
5643 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5645 * poly-int.h (print_hex): New function.
5646 * dumpfile.h (dump_dec, dump_hex): Declare.
5647 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
5648 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
5649 min_input_precision, operation_precision and operation_sign.
5650 * tree-vect-patterns.c (vect_get_range_info): New function.
5651 (vect_same_loop_or_bb_p, vect_single_imm_use)
5652 (vect_operation_fits_smaller_type): Delete.
5653 (vect_look_through_possible_promotion): Add an optional
5654 single_use_p parameter.
5655 (vect_recog_over_widening_pattern): Rewrite to use new
5656 stmt_vec_info infomration. Handle one operation at a time.
5657 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
5658 (vect_truncatable_operation_p, vect_set_operation_type)
5659 (vect_set_min_input_precision): New functions.
5660 (vect_determine_min_output_precision_1): Likewise.
5661 (vect_determine_min_output_precision): Likewise.
5662 (vect_determine_precisions_from_range): Likewise.
5663 (vect_determine_precisions_from_users): Likewise.
5664 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
5665 (vect_vect_recog_func_ptrs): Put over_widening first.
5667 (vect_pattern_recog): Call vect_determine_precisions.
5669 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5671 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
5672 statements that have been replaced by further pattern statements.
5673 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
5675 2018-07-03 Richard Biener <rguenther@suse.de>
5677 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
5678 always set *dt. Dump vectype in vectype overload.
5679 * dumpfile.h (dump_gimple_expr): New function.
5680 (dump_gimple_expr_loc): Likewise.
5681 * dumpfile.c (dump_gimple_expr): New function.
5682 (dump_gimple_expr_loc): Likewise.
5684 2018-07-02 Jeff Law <law@redhat.com>
5686 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
5687 the H8/300, H8/300H and H8/S variants into a single pattern.
5688 (movhi_h8300, movqi_h8300hs): Similarly.
5689 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
5690 (QHI mode iterator): New.
5692 * config/h8300/h8300.md: Remove trailing whitespace.
5694 2018-07-02 Jim Wilson <jimw@sifive.com>
5696 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
5697 instead of emit_insn for interrupt returns.
5698 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
5699 (riscv_sret, riscv_uret): Likewise.
5701 2018-07-02 David Malcolm <dmalcolm@redhat.com>
5703 * pretty-print.c (selftest::test_pp_format): Move save and restore
5704 of quotes to class auto_fix_quotes, and add an instance.
5705 * selftest.c: Include "intl.h".
5706 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
5707 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
5708 * selftest.h (selftest::auto_fix_quotes): New class.
5710 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
5712 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
5713 (aarch64_sve_prepare_conditional_op): Remove.
5714 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
5715 Allow aarch64_simd_reg_or_zero as select operand; remove
5716 the aarch64_sve_prepare_conditional_op call.
5717 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
5718 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
5719 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
5720 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
5721 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
5722 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
5723 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
5724 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
5725 and a splitters to match all of the *_any patterns.
5726 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
5728 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
5729 (SVE_COND_FP_BINARY_REV): Remove.
5730 (sve_int_op_rev, sve_fp_op_rev): New.
5731 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
5732 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
5733 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
5734 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
5735 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
5736 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
5737 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
5738 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
5739 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
5741 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
5742 Remove match_dup 1 from the inner unspec.
5743 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
5745 * config/aarch64/aarch64.md (movprfx): New attr.
5746 (length): Default movprfx to 8.
5747 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
5748 (*madd<SVE_I>, *msub<SVE_I): Likewise.
5749 (*<su>mul<SVE_I>3_highpart): Likewise.
5750 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
5751 (*v<ASHIFT><SVE_I>3): Likewise.
5752 (*<su><MAXMIN><SVE_I>3): Likewise.
5753 (*<su><MAXMIN><SVE_F>3): Likewise.
5754 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
5755 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
5756 (*div<SVE_F>4): Likewise.
5758 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
5760 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
5763 2018-07-02 Richard Biener <rguenther@suse.de>
5765 PR tree-optimization/86363
5766 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
5767 memset argument refers to a non-variable address.
5769 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
5771 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
5772 {PLUS,MINUS}_EXPR code to...
5773 (adjust_symbolic_bound): ...here,
5774 (combine_bound): ...here,
5775 (set_value_range_with_overflow): ...and here.
5777 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
5779 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
5781 (extract_range_from_abs_expr): ...here.
5783 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
5785 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
5786 -fno-omit-frame-pointer when not optimizing.
5788 2018-07-02 Martin Liska <mliska@suse.cz>
5791 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
5792 (propagate_nothrow): Likewise.
5794 2018-07-02 Martin Liska <mliska@suse.cz>
5797 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
5799 2018-07-02 David Malcolm <dmalcolm@redhat.com>
5801 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
5802 function in r262149, changing "loc" param from source_location to
5803 const dump_location_t &.
5804 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
5805 declaration, as above.
5807 2018-07-01 Paul Koning <ni1d@arrl.net>
5809 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
5810 -munit-asm, -mgnu-asm, -mdec-asm.
5811 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
5812 (pdp11_output_labelref): New.
5813 (pdp11_output_def): New.
5814 (pdp11_output_addr_vec_elt): New.
5815 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
5816 %# and %@ format codes.
5817 (pdp11_option_override): New.
5818 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
5819 (pdp11_output_ident): New.
5820 (pdp11_asm_named_section): New.
5821 (pdp11_asm_init_sections): New.
5822 (pdp11_file_start): New.
5823 (pdp11_file_end): New.
5824 (output_ascii): Use .ascii/.asciz for -mdec-asm.
5825 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
5826 %o, like %c but octal.
5827 (pdp11_option_override): New.
5828 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
5830 (DATA_SECTION_ASM_OP): Ditto.
5831 (READONLY_DATA_SECTION_ASM_OP): New.
5832 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
5833 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
5834 (ASM_OUTPUT_LABELREF): Ditto.
5835 (ASM_OUTPUT_DEF): Ditto.
5836 (ASM_OUTPUT_EXTERNAL): New.
5837 (ASM_OUTPUT_SOURCE_FILENAME): New.
5838 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
5839 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
5840 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
5841 %# and %@ format codes.
5842 * config/pdp11/pdp11.opt (mgnu-asm): New.
5843 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
5844 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
5845 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
5847 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
5849 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
5850 dereferencing path[] beyond its length.
5852 (debug_all_paths): New.
5853 (rewire_first_differing_edge): New.
5854 (adjust_paths_after_duplication): New.
5855 (duplicate_thread_path): Call adjust_paths_after_duplication.
5857 (thread_through_all_blocks): Add new argument to
5858 duplicate_thread_path.
5860 2018-06-30 Jim Wilson <jimw@sifive.com>
5862 * config/riscv/predicates.md (p2m1_shift_operand): New.
5863 (high_mask_shift_operand): New.
5864 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
5865 pattern using p2m1_shift_operand.
5866 (lshsi3_zero_extend_3+2): New combiner pattern using
5867 high_mask_shift_operand.
5869 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5871 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
5873 (vect_recog_rotate_pattern): ...here.
5874 (vect_convert_input): Try to insert casts of invariants in the
5876 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
5877 preheader to be empty.
5879 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5881 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
5882 vector type. If given, install it in the new statement's
5884 (vect_element_precision): New function.
5885 (vect_unpromoted_value): New struct.
5886 (vect_unpromoted_value::vect_unpromoted_value): New function.
5887 (vect_unpromoted_value::set_op): Likewise.
5888 (vect_look_through_possible_promotion): Likewise.
5889 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
5890 (vect_widened_op_tree, vect_convert_input): Likewise.
5891 (vect_convert_inputs, vect_convert_output): Likewise.
5892 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
5893 to handle the optional cast of the multiplication result and
5894 vect_widened_op_tree to detect the widened multiplication itself.
5895 Do not require the input and output of promotion casts to have
5896 the same sign, but base the signedness of the operation on the
5897 input rather than the result. If the pattern includes two
5898 promotions, check that those promotions have the same sign.
5899 Do not restrict the MULT_EXPR handling to a double-width result;
5900 handle quadruple-width results and wider. Use vect_convert_inputs
5901 to convert the inputs to the common type.
5902 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
5903 to handle the optional cast of the ABS result. Also allow a sign
5904 change or a sign extension between the ABS and MINUS.
5905 Use vect_widened_op_tree to detect the widened subtraction and use
5906 vect_convert_inputs to convert the inputs to the common type.
5907 (vect_handle_widen_op_by_const): Delete.
5908 (vect_recog_widen_op_pattern): New function.
5909 (vect_recog_widen_mult_pattern): Use it.
5910 (vect_recog_widen_shift_pattern): Likewise.
5911 (vect_recog_widen_sum_pattern): Use
5912 vect_look_through_possible_promotion to handle the promoted
5915 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5917 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
5918 the containing gimple_seq *.
5919 * gimple-iterator.h (gsi_for_stmt): Declare it.
5920 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
5921 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
5922 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
5923 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
5924 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
5926 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
5928 (vect_mark_pattern_stmts): ...here. Handle cases in which the
5929 statement being replaced is part of an existing pattern
5930 definition sequence, inserting the new pattern statements before
5932 (vect_pattern_recog_1): Don't return a bool. If the statement
5933 is already part of a pattern, instead apply pattern matching
5934 to the pattern definition statements. Don't clear the
5935 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
5936 (vect_pattern_recog): Don't break after the first match;
5937 continue processing the pattern definition statements instead.
5938 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
5940 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5942 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
5943 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5944 (vect_recog_widen_sum_pattern): Use it.
5946 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5948 * tree-vect-loop.c (vectorizable_reduction): Assert that the
5949 phi is not a pattern statement and has not been replaced by
5950 a pattern statement.
5951 * tree-vect-patterns.c (type_conversion_p): Don't check
5952 STMT_VINFO_IN_PATTERN_P.
5953 (vect_recog_vector_vector_shift_pattern): Likewise.
5954 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
5955 the pattern statement rather than the original statement; check
5956 directly for a WIDEN_MULT_EXPR here.
5957 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
5958 vect_is_simple_use to return the pattern statement rather
5959 than the original statement; use is_pattern_stmt_p to check
5960 for such a pattern statement.
5961 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
5962 to return the pattern statement rather than the original statement;
5963 don't do the same transformation here.
5964 (vect_is_simple_use): If the defining statement has been replaced
5965 by a pattern statement, return the pattern statement instead.
5966 Remove the corresponding (local) transformation from the vectype
5969 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5971 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
5972 end and default to null.
5973 * tree-vect-loop.c (vect_create_epilog_for_reduction)
5974 (vectorizable_reduction): Update calls accordingly, dropping the
5975 gimple ** argument if the passed-back statement isn't needed.
5976 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
5977 (vect_recog_rotate_pattern): Likewise.
5978 (vect_recog_mask_conversion_pattern): Likewise.
5979 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
5980 (vect_mask_constant_operand_p): Likewise.
5981 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
5982 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
5983 (get_group_load_store_type, get_load_store_type): Likewise.
5984 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
5985 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
5986 (vectorizable_conversion, vectorizable_assignment): Likewise.
5987 (vectorizable_shift, vectorizable_operation): Likewise.
5988 (vectorizable_store, vect_is_simple_cond): Likewise.
5989 (vectorizable_condition, vectorizable_comparison): Likewise.
5990 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
5991 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
5992 and move it to the end. Cope with null def_stmt_outs.
5994 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
5996 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
5998 2018-06-29 Jeff Law <law@redhat.com>
6000 * config/v850/v850.c (v850_legitimate_address_p): Handle large
6001 displacements for TARGET_V850E2V3 and newer.
6002 (TARGET_LRA_P): Remove. Defaults to LRA now.
6003 * config/v850/v850.md (sign23byte_load): Remove.
6004 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
6005 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
6007 2018-06-29 Martin Liska <mliska@suse.cz>
6010 * coverage.c (coverage_init): Mangle full path name.
6011 * doc/invoke.texi: Document the change.
6012 * gcov-io.c (mangle_path): New.
6013 * gcov-io.h (mangle_path): Likewise.
6014 * gcov.c (mangle_name): Use mangle_path for path mangling.
6016 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6018 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
6019 if starting source register is not even.
6021 2018-06-29 Martin Liska <mliska@suse.cz>
6023 PR tree-optimization/86263
6024 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
6025 Make edge redirection.
6027 2018-06-29 David Malcolm <dmalcolm@redhat.com>
6029 * dumpfile.c (dump_loc): Add indentation based on scope depth.
6030 (dump_scope_depth): New variable.
6031 (get_dump_scope_depth): New function.
6032 (dump_begin_scope): New function.
6033 (dump_end_scope): New function.
6034 * dumpfile.h (get_dump_scope_depth): New declaration.
6035 (dump_begin_scope): New declaration.
6036 (dump_end_scope): New declaration.
6037 (class auto_dump_scope): New class.
6038 (AUTO_DUMP_SCOPE): New macro.
6039 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
6042 2018-06-29 Richard Biener <rguenther@suse.de>
6044 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
6045 compute_all_dependences succeeds.
6046 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
6047 exceed --param loop-max-datarefs-for-datadeps.
6049 2018-06-29 Jakub Jelinek <jakub@redhat.com>
6051 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
6053 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
6056 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
6057 alternative 0 in preferred_for_speed attribute.
6059 2018-06-28 Paul Koning <ni1d@arrl.net>
6061 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
6062 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
6063 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
6064 * config/pdp11/pdp11.md: Correct "length" attribute calculation
6065 for shift insn patterns.
6067 2018-06-28 David Malcolm <dmalcolm@redhat.com>
6069 * cgraph.c (cgraph_node::get_body): Replace assignments to
6070 "dump_file" with calls to set_dump_file.
6071 * dumpfile.c (alt_dump_file): Make static, and group with...
6072 (alt_flags): ...this definition.
6073 (dumps_are_enabled): New variable.
6074 (refresh_dumps_are_enabled): New function.
6075 (set_dump_file): New function.
6076 (set_alt_dump_file): New function.
6077 (gcc::dump_manager::dump_start): Replace assignments to
6078 "dump_file" and "alt_dump_file" with calls to set_dump_file and
6080 (gcc::dump_manager::dump_finish): Likewise.
6081 * dumpfile.h (alt_dump_file): Delete decl.
6082 (dumps_are_enabled): New variable decl.
6083 (set_dump_file): New function decl.
6084 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
6086 * tree-nested.c (lower_nested_functions): Replace assignments to
6087 "dump_file" with calls to set_dump_file.
6089 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
6091 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
6092 goto_locus of each outgoing edge of each basic block.
6094 2018-06-28 Richard Biener <rguenther@suse.de>
6096 * dwarf2out.c (decl_scope_table): Remove.
6097 (push_decl_scope): Likewise.
6098 (pop_decl_scope): Likewise.
6099 (gen_type_die_for_member): Do not call push/pop_decl_scope.
6100 (gen_struct_or_union_type_die): Likewise.
6101 (gen_tagged_type_die): Likewise.
6102 (dwarf2out_init): Do not initialize decl_scope_table.
6103 (dwarf2out_c_finalize): Do not free it.
6105 2018-06-28 Richard Biener <rguenther@suse.de>
6107 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
6108 deciding whether to not re-use a DIE.
6110 2018-06-28 Richard Biener <rguenther@suse.de>
6112 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
6113 DW_AT_abstract_origin attribute.
6115 2018-06-28 Martin Liska <mliska@suse.cz>
6117 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
6118 Use newly introduced constants.
6119 * tree-switch-conversion.h (struct jump_table_cluster):
6120 Define max_ratio_for_size and max_ratio_for_speed.
6122 2018-06-28 Martin Liska <mliska@suse.cz>
6124 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6125 Add new checking assert to catch invalid state.
6126 (jump_table_cluster::can_be_handled): Handle single case
6128 (jump_table_cluster::is_beneficial): Bail out for such case.
6129 (bit_test_cluster::find_bit_tests):
6130 Add new checking assert to catch invalid state.
6131 (bit_test_cluster::can_be_handled): Handle single case
6133 (bit_test_cluster::is_beneficial): Bail out for such case.
6134 (switch_decision_tree::analyze_switch_statement):
6137 2018-06-28 Martin Liska <mliska@suse.cz>
6139 * common.opt: Introduce -completion option.
6140 * gcc.c (driver_handle_option): Handle it.
6141 (driver::main): Print completions if completion
6143 * opt-suggestions.c (option_proposer::get_completions):
6145 (option_proposer::suggest_completion): Likewise.
6146 (option_proposer::find_param_completions): Likewise.
6147 (verify_autocompletions): Likewise.
6148 (test_completion_valid_options): Likewise.
6149 (test_completion_valid_params): Likewise.
6150 (in_completion_p): Likewise.
6151 (empty_completion_p): Likewise.
6152 (test_completion_partial_match): Likewise.
6153 (test_completion_garbage): Likewise.
6154 (opt_proposer_c_tests): Likewise.
6155 * opt-suggestions.h: Declare new functions.
6156 * opts.c (common_handle_option): Handle OPT__completion_.
6157 * selftest-run-tests.c (selftest::run_tests): Add
6158 opt_proposer_c_tests.
6159 * selftest.c (assert_str_startswith): New.
6160 * selftest.h (assert_str_startswith): Likewise.
6161 (opt_proposer_c_tests): New.
6162 (ASSERT_STR_STARTSWITH): Likewise.
6164 2018-06-28 Martin Liska <mliska@suse.cz>
6166 * Makefile.in: Add opt-suggestions.o.
6167 * gcc-main.c: Include opt-suggestions.h.
6168 * gcc.c (driver::driver): Likewise.
6169 (driver::~driver): Remove m_option_suggestions.
6170 (driver::build_option_suggestions): Moved to option_proposer.
6171 (driver::suggest_option): Likewise.
6172 (driver::handle_unrecognized_options): Use option_proposer.
6173 * gcc.h (class driver): Add new memver m_option_proposer.
6174 * opt-suggestions.c: New file.
6175 * opt-suggestions.h: New file.
6177 2018-06-28 Martin Liska <mliska@suse.cz>
6179 * vec.h (class auto_string_vec): New (moved from auto_argvec).
6180 (auto_string_vec::~auto_string_vec): Likewise.
6182 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
6184 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
6185 prevent_decl_creation_for_types fields up and add reset_location field.
6186 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
6187 statement if id->reset_location is true.
6188 (copy_edges_for_bb): Do not set goto_locus on the new edges if
6189 id->reset_location is true.
6190 (copy_phis_for_bb): Force input_location on the arguments if
6191 id->reset_location is true.
6192 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
6193 is set on the function to be inlined.
6195 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
6197 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
6199 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
6201 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
6202 registers for Pmode.
6203 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
6204 hard registers for the clobbered pseudo.
6206 2018-06-27 Paul Koning <ni1d@arrl.net>
6208 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6209 mutually exclusive options.
6210 * config/pdp11/constraints.md (h): New constraint.
6211 (O): Update definition to match shift code generation.
6212 (D): New constraint.
6213 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
6215 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
6217 (output_jump): Change arguments.
6218 (pdp11_fixed_cc_regs): New function.
6219 (pdp11_cc_mode): Ditto.
6220 (pdp11_expand_shift): Ditto.
6221 (pdp11_assemble_shift): Ditto.
6222 (pdp11_small_shift): Ditto.
6223 (pdp11_branch_cost): Remove.
6224 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
6226 (pdp11_register_move_cost): Update for CC registers.
6227 (pdp11_rtx_costs): Add case for LSHIFTRT.
6228 (pdp11_output_jump): Add CCNZ mode conditional branches.
6229 (notice_update_cc_on_set): Remove.
6230 (pdp11_cc_mode): New function.
6231 (simple_memory_operand): Correct pre/post decrement case.
6232 (no_side_effect_operand): New function.
6233 (pdp11_regno_reg_class): Add CC_REGS class.
6234 (pdp11_fixed_cc_regs): New function.
6235 (pdp11_small_shift): New function.
6236 (pdp11_expand_shift): New function to expand shift insns.
6237 (pdp11_assemble_shift): New function to output shifts.
6238 (pdp11_branch_cost): Remove.
6239 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
6240 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
6241 (WCHAR_TYPE): Ditto.
6242 (PTRDIFF_TYPE): Ditto.
6243 (ADJUST_INSN_LENGTH): New macro.
6244 (FIXED_REGISTERS): Add CC registers.
6245 (CALL_USED_REGISTERS): Ditto.
6247 (REG_CLASS_NAMES): Ditto.
6248 (REG_CLASS_CONTENTS): Ditto.
6249 (SELECT_CC_MODE): Use new function.
6250 (TARGET_FLAGS_REGNUM): New macro.
6251 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
6252 (cc0_reg_rtx): Remove.
6253 (CC_STATUS_MDEP): Remove.
6254 (CC_STATUS_MDEFP_INIT): Remove.
6255 (CC_IN_FPU): Remove.
6256 (NOTICE_UPDATE_CC): Remove.
6257 (REGISTER_NAMES): Add CC registers.
6258 (BRANCH_COST): Change to constant 1.
6259 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
6261 * config/pdp11/pdp11.opt (mbcopy): Remove.
6262 (mbcopy-builtin): Remove.
6263 (mbranch-cheap): Remove.
6264 (mbranch-expensive): Remove.
6265 * config/pdp11/predicates.md (expand_shift_operand): Update to
6266 match shift code generation.
6267 (ccnz_operator): New predicate.
6268 * doc/invoke.texi (PDP-11 Options): Remove deleted options
6269 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
6270 Remove non-existent option -mabshi, -mno-abshi. Document mutually
6272 * doc/md.texi (PDP-11): Document new D and h constraints. Update
6273 description of O constraint.
6275 2018-06-27 Jeff Law <law@redhat.com>
6276 Austin Law <austinklaw@gmail.com>
6278 * config/v850/v850.md (addsi3_set_flags): New pattern.
6279 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
6280 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
6281 (zero_extendhisi2_v850_set_flags): Likewise.
6282 (zero_extendqisi2_v850_set_flags): Likewise.
6283 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
6284 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
6285 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
6287 * config/v850/v850-protos.h (notice_update_cc): Remove.
6288 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
6289 (v850_print_operand): Handle 'D' and "d".
6290 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
6291 Add handling of arithmetic/logical operations compared against zero.
6292 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
6293 Do not look at v850_compare_op, instead get mode from last argument.
6294 (v850_gen_compare): Remove
6295 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
6296 after reload for prologue insns.
6297 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
6299 (construct_save_jarl): Likewise.
6300 (TARGET_FLAGS_REGNUM): Define.
6301 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
6302 (NOTICE_UPDATE_CC): Remove.
6303 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
6304 than cc0. Conditionalize on reload_completed.
6305 (cmpsi_insn, setfcc_insn): Likewise.
6306 (tst1 splitter): Turn into define_and_split which sets the flags
6308 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
6309 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
6310 (cstoresf4, cstoredf4): Clobber the flags.
6311 (cmpsi, cmpsf, cmpdf): Remove expanders.
6312 (setf_insn): Remove pattern.
6313 (addsi3): Turn into define_and_split which clobbers the flags after
6314 reload and a suitable pattern (addsi3_clobber_flags) for use after
6316 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
6317 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
6318 (ashrsi3, ashrsi3_v850e2): Likewise.
6319 (bins): Clobber the flags.
6320 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
6321 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
6322 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
6323 (call_value_internal_short, call_value_internal_long): Likewise.
6324 (callt_save_interrupt, callt_return_interrupt): Likewise.
6325 (save_interrupt, return_interrupt): Likewise.
6326 (callt_save_all_interrupt, save_all_interrupt): Likewise.
6327 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
6328 (restore_all_interrupt, _restore_all_interrupt): Likewise.
6329 (All FP comparisons): Only allow after reload has completed.
6331 (divh, divhu): Tweak output template.
6332 (branch_z_normal, branch_z_invert): Remove
6333 (branch_nz_normal, branch_nz_invert): Likewise.
6334 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
6336 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
6337 * config/v850/v850.c (notice_update_cc): Remove.
6338 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
6339 (CC_NO_CARRY): Likewise.
6340 (NOTICE_UPDATE_CC): Define to nothing.
6341 * config/v850/v850.md: Remove block comment on cc0 handling
6342 Remove "cc" attribute from all patterns. Remove cc_status handling
6343 from all patterns. Minor formatting fixes.
6345 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6347 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
6348 (cortex-a76.cortex-a55): Likewise.
6349 * config/aarch64/aarch64-tune.md: Regenerate.
6350 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
6351 cortex-a76.cortex-a55.
6353 2018-06-27 Jeff Law <law@redhat.com>
6355 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
6356 (MULTILIB_DIRNAMES): Similarly.
6358 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
6360 * gimple.h (gimple_return_retbnd): Delete.
6361 (gimple_return_set_retbnd): Likewise.
6362 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
6363 gimple_return_set_retbnd.
6364 * gimple-pretty-print.c (dump_gimple_return): Remove call to
6365 gimple_return_retbnd and adjust.
6366 * tree-inline.h (struct copy_body_data): Remove retbnd field.
6367 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
6368 Explicitly return NULL in a couple more cases. Move assertion
6369 on debug statements and remove unreachable code.
6370 (reset_debug_binding): Do not test id->retbnd.
6371 (expand_call_inline): Do not set it.
6373 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6375 * configure.ac: Add --disable-gcov option.
6376 * configure: Regenerate.
6377 * Makefile.in: Honour @enable_gcov@.
6378 * doc/install.texi: Document --disable-gcov.
6380 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6382 * config/arm/arm-cpus.in (cortex-a76): New entry.
6383 (cortex-a76.cortex-a55): Likewise.
6384 * config/arm/arm-tables.opt: Regenerate.
6385 * config/arm/arm-tune.md: Likewise.
6386 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
6387 * doc/invoke.texi (ARM Options): Document cortex-a76 and
6388 cortex-a76.cortex-a55.
6390 2018-06-27 Tamar Christina <tamar.christina@arm.com>
6393 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
6395 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
6397 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
6399 (EPILOGUE_USES): Likewise.
6401 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
6403 * tree-inline.c (remap_location): New function extracted from...
6404 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
6405 (copy_phis_for_bb): ...here. Call remap_location.
6406 (copy_cfg_body): Adjust call to copy_edges_for_bb.
6408 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
6410 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
6411 unaligned vsx for 16B memset.
6413 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
6416 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
6417 ieee128_float_type_node to long_double_type_node unless
6418 TARGET_LONG_DOUBLE_128 is set.
6420 2018-06-26 David Malcolm <dmalcolm@redhat.com>
6422 * cfgloop.c (get_loop_location): Convert return type from
6423 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
6424 by implicit construction from rtx_insn *, and using
6425 dump_user_location_t::from_function_decl for the fallback case.
6426 * cfgloop.h (get_loop_location): Convert return type from
6427 location_t to dump_user_location_t.
6428 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
6429 dump_printf_loc to pass in a dump_location_t rather than a
6430 location_t, via the gimple stmt.
6431 * coverage.c (get_coverage_counts): Update calls to
6432 dump_printf_loc to pass in dump_location_t rather than a
6434 * doc/optinfo.texi (Dump types): Convert example of
6435 dump_printf_loc from taking "locus" to taking "insn". Update
6436 description of the "_loc" calls to cover dump_location_t.
6437 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
6439 (dump_user_location_t::dump_user_location_t): New constructors,
6440 from gimple *stmt and rtx_insn *.
6441 (dump_user_location_t::from_function_decl): New function.
6442 (dump_loc): Make static.
6443 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
6444 const dump_location_t &.
6445 (dump_generic_expr_loc): Delete.
6446 (dump_printf_loc): Convert param "loc" from location_t to
6447 const dump_location_t &.
6448 (selftest::test_impl_location): New function.
6449 (selftest::dumpfile_c_tests): New function.
6450 * dumpfile.h: Include "profile-count.h".
6451 (class dump_user_location_t): New class.
6452 (struct dump_impl_location_t): New struct.
6453 (class dump_location_t): New class.
6454 (dump_printf_loc): Convert 2nd param from source_location to
6455 const dump_location_t &.
6456 (dump_generic_expr_loc): Delete.
6457 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
6458 const dump_location_t &.
6459 * gimple-fold.c (fold_gimple_assign): Update call to
6460 dump_printf_loc to pass in a dump_location_t rather than a
6461 location_t, via the gimple stmt.
6462 (gimple_fold_call): Likewise.
6463 * gimple-loop-interchange.cc
6464 (loop_cand::analyze_iloop_reduction_var): Update for change to
6465 check_reduction_path.
6466 (tree_loop_interchange::interchange): Update for change to
6468 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
6469 change in return-type of find_loop_location.
6470 (graphite_regenerate_ast_isl): Likewise.
6471 * graphite-optimize-isl.c (optimize_isl): Likewise.
6472 * graphite.c (graphite_transform_loops): Likewise.
6473 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
6474 pass in a dump_location_t rather than a location_t, via the
6476 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6477 * ipa.c (walk_polymorphic_call_targets): Likewise.
6478 * loop-unroll.c (report_unroll): Convert "locus" param from
6479 location_t to dump_location_t.
6480 (decide_unrolling): Update for change to get_loop_location's
6482 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
6483 location_t to dump_user_location_t.
6484 (grid_find_single_omp_among_assignments_1): Updates calls to
6485 dump_printf_loc to pass in a dump_location_t rather than a
6486 location_t, via the gimple stmt.
6487 (grid_parallel_clauses_gridifiable): Convert "tloc" from
6488 location_t to dump_location_t. Updates calls to dump_printf_loc
6489 to pass in a dump_location_t rather than a location_t, via the
6491 (grid_inner_loop_gridifiable_p): Likewise.
6492 (grid_dist_follows_simple_pattern): Likewise.
6493 (grid_gfor_follows_tiling_pattern): Likewise.
6494 (grid_target_follows_gridifiable_pattern): Likewise.
6495 (grid_attempt_target_gridification): Convert initialization
6496 of local "grid" from memset to zero-initialization; FIXME: does
6497 this require C++11? Update call to dump_printf_loc to pass in a
6498 optinfo_location rather than a location_t, via the gimple stmt.
6499 * profile.c (read_profile_edge_counts): Updates call to
6500 dump_printf_loc to pass in a dump_location_t rather than a
6502 (compute_branch_probabilities): Likewise.
6503 * selftest-run-tests.c (selftest::run_tests): Call
6505 * selftest.h (dumpfile_c_tests): New decl.
6506 * tree-loop-distribution.c (pass_loop_distribution::execute):
6507 Update for change in return type of find_loop_location.
6508 * tree-parloops.c (parallelize_loops): Likewise.
6509 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
6510 "locus" from location_t to dump_user_location_t.
6511 (canonicalize_loop_induction_variables): Likewise.
6512 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
6513 for change in return type of find_loop_location.
6514 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
6515 to dump_printf_loc to pass in a dump_location_t rather than a
6516 location_t, via the stmt.
6517 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
6519 * tree-vect-loop-manip.c (find_loop_location): Convert return
6520 type from source_location to dump_user_location_t.
6521 (vect_do_peeling): Update for above change.
6522 (vect_loop_versioning): Update for change in type of
6524 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
6525 from location_t to dump_user_location_t.
6526 (vect_estimate_min_profitable_iters): Update for change in type
6528 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
6529 location_t to dump_location_t.
6530 (vect_slp_bb): Update for change in type of vect_location.
6531 * tree-vectorizer.c (vect_location): Convert from source_location
6532 to dump_user_location_t.
6533 (try_vectorize_loop_1): Update for change in vect_location's type.
6534 (vectorize_loops): Likewise.
6535 (increase_alignment): Likewise.
6536 * tree-vectorizer.h (vect_location): Convert from source_location
6537 to dump_user_location_t.
6538 (find_loop_location): Convert return type from source_location to
6539 dump_user_location_t.
6540 (check_reduction_path): Convert 1st param from location_t to
6541 dump_user_location_t.
6542 * value-prof.c (check_counter): Update call to dump_printf_loc to
6543 pass in a dump_user_location_t rather than a location_t; update
6544 call to error_at for change in type of "locus".
6545 (check_ic_target): Update call to dump_printf_loc to
6546 pass in a dump_user_location_t rather than a location_t, via the
6549 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
6551 * config/s390/s390.h (enum processor_flags): Do not use
6552 default tune parameter when -march was specified.
6554 2018-06-26 Jakub Jelinek <jakub@redhat.com>
6557 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
6558 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
6561 2018-06-26 Richard Biener <rguenther@suse.de>
6563 PR tree-optimization/86287
6565 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
6566 (vect_analyze_loop): Initialize n_stmts.
6568 2018-06-26 Richard Biener <rguenther@suse.de>
6571 * fold-const.c (fold_convertible_p): Pointer extension
6574 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
6577 * dwarf2out.c (loc_list_has_views): Adjust comments.
6578 (dw_loc_list): Split single cross-partition range with
6581 2018-06-25 Jeff Law <law@redhat.com>
6583 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
6584 on -mbig-switch by default.
6586 * config/v850/predicates.md (const_float_1_operand): Fix match_code
6588 (const_float_0_operand): Remove unused predicate.
6589 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
6590 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
6591 (recipsf2): New expander. Original pattern now called
6593 (recipdf2, recipdf2_insn): Similarly.
6594 (rsqrtsf2, rsqrtsf2_insn): Similarly
6595 (rsqrtdf2, rsqrtdf2_insn): Similarly
6597 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
6599 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
6600 Simplify logic for FreeBSD (twice).
6602 2018-06-25 Martin Sebor <msebor@redhat.com>
6604 PR tree-optimization/86204
6605 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
6606 a strnlen result if it's less than the length of the string.
6608 2018-06-25 Martin Sebor <msebor@redhat.com>
6610 PR tree-optimization/85700
6611 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
6612 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
6613 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
6615 2018-06-25 Martin Sebor <msebor@redhat.com>
6617 * doc/extend.texi (Zero-length arrays): Update and clarify.
6619 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
6621 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
6622 added IEEE/IBM long double multilib support on PowerPC little
6623 endian Linux systems.
6624 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
6625 (MULTILIB_DEFAULTS): Likewise.
6626 * config/rs6000/rs6000.c (rs6000_option_override_internal):
6628 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
6629 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
6630 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
6632 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
6635 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
6636 (REORDER_45): Likewise.
6638 2018-06-25 Jeff Law <law@redhat.com>
6640 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
6641 dividend to 32 bits. Adjust length.
6642 (udivmodhi4): Cleanup output template. Fix length.
6644 2018-06-25 Carl Love <cel@us.ibm.com>
6646 * config/rs6000/vsx.md: Change word selector to prefered location.
6648 2018-06-25 Richard Biener <rguenther@suse.de>
6650 PR tree-optimization/86304
6651 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
6652 epilogue-if-converted loops as well.
6654 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
6656 * lto-section-out.c (lto_begin_section): Do not print section
6657 name for noaddr and unnumbered dumps.
6659 2018-06-25 Richard Biener <rguenther@suse.de>
6661 * tree-vectorizer.h (struct vec_info_shared): New structure
6662 with parts split out from struct vec_info and loop_nest from
6663 struct _loop_vec_info.
6664 (struct vec_info): Adjust accordingly.
6665 (struct _loop_vec_info): Likewise.
6666 (LOOP_VINFO_LOOP_NEST): Adjust.
6667 (LOOP_VINFO_DATAREFS): Likewise.
6668 (LOOP_VINFO_DDRS): Likewise.
6669 (struct _bb_vec_info): Likewise.
6670 (BB_VINFO_DATAREFS): Likewise.
6671 (BB_VINFO_DDRS): Likewise.
6672 (struct _stmt_vec_info): Add dr_aux member.
6673 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
6674 (DR_MISALIGNMENT_UNINITIALIZED): New.
6675 (set_dr_misalignment): Adjust.
6676 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
6677 (vect_analyze_loop): Adjust prototype.
6678 (vect_analyze_loop_form): Likewise.
6679 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
6680 Compute dependences lazily.
6681 (vect_record_base_alignments): Use shared datarefs/ddrs.
6682 (vect_verify_datarefs_alignment): Likewise.
6683 (vect_analyze_data_refs_alignment): Likewise.
6684 (vect_analyze_data_ref_accesses): Likewise.
6685 (vect_analyze_data_refs): Likewise.
6686 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
6687 constructor parameter for shared part.
6688 (vect_analyze_loop_form): Pass in shared part and adjust.
6689 (vect_analyze_loop_2): Pass in storage for the number of
6690 stmts. Move loop nest finding to the caller. Compute
6692 (vect_analyze_loop): Pass in shared part.
6693 (vect_transform_loop): Verify shared datarefs are unchanged.
6694 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
6695 constructor parameter for shared part.
6696 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
6697 (vect_slp_bb): Verify shared datarefs are unchanged before
6699 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
6701 (new_stmt_vec_info): Initialize DR_AUX misalignment to
6702 DR_MISALIGNMENT_UNINITIALIZED.
6703 * tree-vectorizer.c (vec_info::vec_info): Add constructor
6704 parameter for shared part.
6705 (vec_info::~vec_info): Adjust.
6706 (vec_info_shared::vec_info_shared): New.
6707 (vec_info_shared::~vec_info_shared): Likewise.
6708 (vec_info_shared::save_datarefs): Likewise.
6709 (vec_info_shared::check_datarefs): Likewise.
6710 (try_vectorize_loop_1): Construct shared part live for analyses
6711 of a single loop for multiple vector sizes.
6712 * tree-parloops.c (gather_scalar_reductions): Adjust.
6714 2018-06-25 Richard Biener <rguenther@suse.de>
6716 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
6717 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
6718 (vect_analyze_data_refs): Remove similar code from here and
6719 simplify accordingly.
6721 2018-06-25 Richard Biener <rguenther@suse.de>
6723 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
6724 for reverse storage order accesses rather than asserting
6725 they cannot happen here.
6727 2018-06-25 Tom de Vries <tdevries@suse.de>
6730 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
6731 Use data16 instead of .byte for insn prefix.
6733 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
6736 * parser.c (make_char_string_pack): Pass this literal chars
6737 through cpp_interpret_string.
6738 (cp_parser_userdef_numeric_literal): Check the result of
6739 make_char_string_pack.
6741 2018-06-24 Maya Rashish <coypu@sdf.org>
6743 * ginclude/stddef.h: Simplify conditions around avoiding
6744 re-definition of __size_t.
6746 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
6748 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
6749 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
6751 2018-06-22 Maya Rashish <coypu@sdf.org>
6753 * doc/invoke.texi (mno-fancy-math-387): Update for changes
6754 made to OpenBSD and NetBSD through the years.
6756 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
6758 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
6759 behavior of vec_pack (vector double, vector double) to match
6760 behavior of vec_float2 (vector double, vector double).
6762 2018-06-22 Olivier Hainque <hainque@adacore.com>
6764 * gimplify.c (gimplify_function_tree): Prevent creation
6765 of a trampoline for the address of the current function
6766 passed to entry/exit instrumentation hooks.
6768 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
6771 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
6774 2018-06-22 Martin Liska <mliska@suse.cz>
6776 PR tree-optimization/86263
6777 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6778 Bail out if is_enabled is false.
6779 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
6781 (jump_table_cluster::is_enabled): New function.
6783 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
6785 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
6786 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
6787 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
6788 (lto_input_ts_binfo_tree_pointers): Likewise.
6789 * tree-streamer-out.c (streamer_write_tree_bitfields,
6790 write_ts_binfo_tree_pointers): Likewise.
6791 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
6793 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
6795 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
6797 2018-06-22 Martin Liska <mliska@suse.cz>
6799 * symbol-summary.h (get): Make it pure and inline move
6800 functionality from ::get function.
6801 (get): Remove and inline into ::get and ::get_create.
6802 (get_create): Move code from ::get function.
6804 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6807 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
6808 -x assembler-with-cpp.
6810 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6812 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
6813 _FILE_OFFSET_BITS=64 for C++.
6815 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
6817 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
6818 conversion insn that shows up when pr85657-3.c is compiled using
6819 IEEE 128-bit long double.
6820 (neg<mode>2_internal): Use the correct mode to check whether the
6821 mode is IBM extended.
6822 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
6823 multiply and divide external functions from being created more
6826 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6828 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
6830 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
6831 the edge can be forwarded.
6832 (cfg_layout_merge_blocks): Likewise.
6834 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6836 * except.c (finish_eh_generation): Commit edge insertions only after
6837 the EH edges have been redirected from post-landing to landing pads.
6839 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6841 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
6842 create_tmp_var_for to create the FRAME decl.
6843 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
6845 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6847 * tree-inline.c (copy_edges_for_bb): Minor tweak.
6848 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
6849 debug statement when resetting its value.
6850 (expand_call_inline): Copy the locus of the call onto the assignment
6851 of the return value, if any. Use local variable in more cases.
6853 2018-06-21 Martin Liska <mliska@suse.cz>
6855 * ipa-pure-const.c (propagate_nothrow): Use
6856 funct_state_summaries->get.
6857 (dump_malloc_lattice): Likewise.
6858 (propagate_malloc): Likewise.
6860 2018-06-21 Richard Biener <rguenther@suse.de>
6862 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
6863 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
6864 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
6866 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
6867 BLOCK_ABSTRACT_ORIGIN unconditionally.
6869 2018-06-21 David Malcolm <dmalcolm@redhat.com>
6871 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
6873 * ipa-reference.c (ipa_reference_c_finalize): Delete
6874 ipa_ref_opt_sum_summaries and set it to NULL.
6876 2018-06-21 Tom de Vries <tdevries@suse.de>
6878 PR tree-optimization/85859
6879 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
6880 test with comment from bb_no_side_effects_p.
6882 2018-06-21 Richard Biener <rguenther@suse.de>
6884 PR tree-optimization/86232
6885 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
6886 max for constant niter.
6888 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
6890 * config/aarch64/aarch64-simd.md
6891 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
6893 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
6895 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
6896 Make opernads of the unspec commutative.
6898 2018-06-21 Richard Biener <rguenther@suse.de>
6900 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
6901 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
6902 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
6903 (vect_analyze_data_ref_dependence): Re-order checks to deal with
6905 (vect_record_base_alignments): Do not record base alignment
6906 for gathers or scatters.
6907 (vect_compute_data_ref_alignment): Drop return value that is always
6908 true. Bail out early for gathers or scatters.
6909 (vect_enhance_data_refs_alignment): Bail out early for gathers
6911 (vect_find_same_alignment_drs): Likewise.
6912 (vect_analyze_data_refs_alignment): Remove dead code.
6913 (vect_slp_analyze_and_verify_node_alignment): Likewise.
6914 (vect_analyze_data_refs): For possible gathers or scatters do
6915 not create an alternate DR, just check their possible validity
6916 and mark them. Adjust DECL_NONALIASED handling to not rely
6918 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
6919 update inits of gathers or scatters.
6920 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
6921 Also copy gather/scatter flag to pattern vinfo.
6923 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
6925 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
6926 behavior of vec_packsu (vector unsigned long long, vector unsigned
6927 long long) to match behavior of vec_packs with same signature.
6929 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
6930 Thomas Schwinge <thomas@codesourcery.com>
6931 Cesar Philippidis <cesar@codesourcery.com>
6933 * gimplify.c (gimplify_scan_omp_clauses): Add support for
6934 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
6935 (gimplify_adjust_omp_clauses): Likewise.
6936 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
6937 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
6938 (gimplify_omp_target_update): Update handling of acc update and
6940 * omp-low.c (install_var_field): Remove unused parameter
6941 base_pointers_restrict.
6942 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
6943 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
6945 (omp_target_base_pointers_restrict_p): Delete.
6946 (scan_omp_target): Update call to scan_sharing_clauses.
6947 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
6949 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
6950 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
6951 (convert_local_omp_clauses): Likewise.
6952 * tree-pretty-print.c (dump_omp_clause): Likewise.
6953 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
6955 (omp_clause_code_name): Likewise.
6957 2018-06-20 Jakub Jelinek <jakub@redhat.com>
6960 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
6963 PR tree-optimization/86231
6964 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
6965 anti-range don't overwrite *vr0min before using it to compute *vr0max.
6967 2018-06-20 Tom de Vries <tdevries@suse.de>
6969 PR tree-optimization/86097
6970 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
6971 iv type if signedness of iv type is not the same as that of *nit.
6973 2018-06-20 Jakub Jelinek <jakub@redhat.com>
6975 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
6976 EDGE_EH edges, verify they are all EDGE_EH.
6978 2018-06-20 Maya Rashish <coypu@sdf.org>
6980 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
6982 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6984 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
6985 * config/aarch64/aarch64.c (xgene1_tunings): Add
6986 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
6987 (aarch64_mode_valid_for_sched_fusion_p):
6988 Allow 16-byte modes.
6989 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
6990 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
6992 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
6994 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
6995 * config/aarch64/iterators.md (VQ2): New mode iterator.
6997 2018-06-20 Martin Liska <mliska@suse.cz>
6999 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7000 Change default ratio from 10 to 8.
7002 2018-06-20 Martin Liska <mliska@suse.cz>
7004 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7006 (bit_test_cluster::find_bit_tests): Likewise.
7007 (switch_decision_tree::analyze_switch_statement): Find clusters.
7008 * tree-switch-conversion.h (struct jump_table_cluster): Document
7011 2018-06-20 Martin Liska <mliska@suse.cz>
7013 * tree-switch-conversion.c (switch_conversion::collect):
7014 Record m_uniq property.
7015 (switch_conversion::expand): Bail out for special conditions.
7016 (group_cluster::~group_cluster): New.
7017 (group_cluster::group_cluster): Likewise.
7018 (group_cluster::dump): Likewise.
7019 (jump_table_cluster::emit): New.
7020 (switch_decision_tree::fix_phi_operands_for_edges): New.
7021 (struct case_node): Remove struct.
7022 (jump_table_cluster::can_be_handled): New.
7023 (case_values_threshold): Moved to header.
7024 (reset_out_edges_aux): Likewise.
7025 (jump_table_cluster::is_beneficial): New.
7026 (bit_test_cluster::can_be_handled): Likewise.
7027 (add_case_node): Remove.
7028 (bit_test_cluster::is_beneficial): New.
7029 (case_bit_test::cmp): New.
7030 (bit_test_cluster::emit): New.
7031 (expand_switch_as_decision_tree_p): Remove.
7032 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
7033 (fix_phi_operands_for_edge): Likewise.
7034 (switch_decision_tree::analyze_switch_statement): New.
7035 (compute_cases_per_edge): Move ...
7036 (switch_decision_tree::compute_cases_per_edge): ... here.
7037 (try_switch_expansion): Likewise.
7038 (switch_decision_tree::try_switch_expansion): Likewise.
7039 (record_phi_operand_mapping): Likewise.
7040 (switch_decision_tree::record_phi_operand_mapping): Likewise.
7041 (emit_case_decision_tree): Likewise.
7042 (switch_decision_tree::emit): Likewise.
7043 (balance_case_nodes): Likewise.
7044 (switch_decision_tree::balance_case_nodes): Likewise.
7045 (dump_case_nodes): Likewise.
7046 (switch_decision_tree::dump_case_nodes): Likewise.
7047 (emit_jump): Likewise.
7048 (switch_decision_tree::emit_jump): Likewise.
7049 (emit_cmp_and_jump_insns): Likewise.
7050 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
7051 (emit_case_nodes): Likewise.
7052 (switch_decision_tree::emit_case_nodes): Likewise.
7053 (conditional_probability): Remove.
7054 * tree-switch-conversion.h (enum cluster_type): New.
7056 (struct cluster): Likewise.
7057 (cluster::cluster): Likewise.
7058 (struct simple_cluster): Likewise.
7059 (simple_cluster::simple_cluster): Likewise.
7060 (struct group_cluster): Likewise.
7061 (struct jump_table_cluster): Likewise.
7062 (struct bit_test_cluster): Likewise.
7063 (struct min_cluster_item): Likewise.
7064 (struct case_tree_node): Likewise.
7065 (case_tree_node::case_tree_node): Likewise.
7066 (jump_table_cluster::case_values_threshold): Likewise.
7067 (struct case_bit_test): Likewise.
7068 (struct switch_decision_tree): Likewise.
7069 (struct switch_conversion): Likewise.
7070 (switch_decision_tree::reset_out_edges_aux): Likewise.
7072 2018-06-20 Martin Liska <mliska@suse.cz>
7074 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
7075 (hoist_edge_and_branch_if_true): Likewise.
7076 (expand_switch_using_bit_tests_p): Likewise.
7077 (struct case_bit_test): Likewise.
7078 (case_bit_test_cmp): Likewise.
7079 (emit_case_bit_tests): Likewise.
7080 (switch_conversion::switch_conversion): New class.
7081 (struct switch_conv_info): Remove old struct.
7082 (collect_switch_conv_info): More to ...
7083 (switch_conversion::collect): ... this.
7084 (check_range): Likewise.
7085 (switch_conversion::check_range): Likewise.
7086 (check_all_empty_except_final): Likewise.
7087 (switch_conversion::check_all_empty_except_final): Likewise.
7088 (check_final_bb): Likewise.
7089 (switch_conversion::check_final_bb): Likewise.
7090 (create_temp_arrays): Likewise.
7091 (switch_conversion::create_temp_arrays): Likewise.
7092 (free_temp_arrays): Likewise.
7093 (gather_default_values): Likewise.
7094 (switch_conversion::gather_default_values): Likewise.
7095 (build_constructors): Likewise.
7096 (switch_conversion::build_constructors): Likewise.
7097 (constructor_contains_same_values_p): Likewise.
7098 (switch_conversion::contains_same_values_p): Likewise.
7099 (array_value_type): Likewise.
7100 (switch_conversion::array_value_type): Likewise.
7101 (build_one_array): Likewise.
7102 (switch_conversion::build_one_array): Likewise.
7103 (build_arrays): Likewise.
7104 (switch_conversion::build_arrays): Likewise.
7105 (gen_def_assigns): Likewise.
7106 (switch_conversion::gen_def_assigns): Likewise.
7107 (prune_bbs): Likewise.
7108 (switch_conversion::prune_bbs): Likewise.
7109 (fix_phi_nodes): Likewise.
7110 (switch_conversion::fix_phi_nodes): Likewise.
7111 (gen_inbound_check): Likewise.
7112 (switch_conversion::gen_inbound_check): Likewise.
7113 (process_switch): Use the newly created class.
7114 (switch_conversion::expand): New.
7115 (switch_conversion::~switch_conversion): New.
7116 * tree-switch-conversion.h: New file.
7118 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7120 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
7121 tree-vect-patterns.c.
7122 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
7123 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
7124 (vect_recog_sad_pattern): Likewise.
7125 (vect_recog_widen_sum_pattern): Likewise.
7126 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
7127 (vect_recog_widen_shift_pattern): Remove the type_in argument.
7128 (vect_recog_rotate_pattern): Likewise.
7129 (vect_recog_mult_pattern): Likewise.
7130 (vect_recog_vector_vector_shift_pattern): Likewise.
7131 (vect_recog_divmod_pattern): Likewise.
7132 (vect_recog_mixed_size_cond_pattern): Likewise.
7133 (vect_recog_bool_pattern): Likewise.
7134 (vect_recog_mask_conversion_pattern): Likewise.
7135 (vect_try_gather_scatter_pattern): Likewise.
7136 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
7137 (vect_recog_over_widening_pattern): Likewise.
7138 (vect_recog_gather_scatter_pattern): Likewise.
7139 (vect_recog_func_ptr): Move from tree-vectorizer.h
7140 (vect_vect_recog_func_ptrs): Move further down the file.
7141 (vect_recog_func): Likewise. Remove the third argument.
7142 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
7143 (vect_pattern_recog_1): Expect the pattern function to do any
7144 necessary target tests. Also expect it to provide a vector type.
7145 Remove the type_in handling.
7147 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7149 * tree-vect-patterns.c (vect_pattern_detected): New function.
7150 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
7151 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
7152 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
7153 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
7154 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
7155 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
7156 (vect_recog_mask_conversion_pattern)
7157 (vect_try_gather_scatter_pattern): Likewise.
7159 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7161 * tree-vect-patterns.c (vect_get_internal_def): New function.
7162 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7163 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
7164 (search_type_for_mask_1): Use it.
7166 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7168 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
7169 redundant WIDEN_SUM_EXPR handling.
7170 (vect_recog_sad_pattern): Likewise.
7172 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7174 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
7175 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
7176 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
7177 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
7178 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
7180 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7182 * tree-vect-stmts.c (vectorizable_call): Make sure that we
7183 use the stmt_vec_info of the original bb statement for the
7184 new zero assignment, even if the call is part of a pattern.
7186 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7188 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
7189 that the sequence is attached to the original statement rather
7190 than the pattern statement.
7191 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
7192 PATTERN_DEF_SEQ from the original statement rather than
7193 the main pattern statement.
7194 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
7195 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
7196 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
7198 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7200 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
7201 definition statements before the early exit for statements that aren't
7203 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
7205 (vect_transform_loop): ...here. Process pattern definition
7206 statements without first checking whether the main pattern
7207 statement is live or relevant.
7209 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
7211 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
7212 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
7214 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
7216 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
7217 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
7218 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
7219 (expand_block_compare): Change select_block_compare_mode call.
7220 (expand_strncmp_align_check): Use new functions, fix comment.
7221 (emit_final_str_compare_gpr): New function.
7222 (expand_strn_compare): Refactor and clean up code.
7223 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
7225 2018-06-19 Tony Reix <tony.reix@atos.com>
7226 Damien Bergamini <damien.bergamini@atos.com>
7227 David Edelsohn <dje.gcc@gmail.com>
7229 * collect2.c (static_obj): New variable.
7230 (static_libs): New variable.
7231 (is_in_list): Uncomment declaration.
7232 (main): Track AIX libraries linked statically.
7233 (is_in_list): Uncomment definition.
7234 (scan_prog_file): Don't add AIX shared libraries initializer
7235 to constructor list if linking statically.
7237 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
7239 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
7241 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
7243 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
7245 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
7248 2018-06-19 Martin Liska <mliska@suse.cz>
7250 * config/i386/i386.c (ix86_can_inline_p): Do not use
7251 ipa_fn_summaries::get_create.
7252 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
7254 (devirtualization_time_bonus): Likewise.
7255 (ipcp_propagate_stage): Likewise.
7256 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
7257 (edge_set_predicate): Likewise.
7258 (evaluate_conditions_for_known_args): Likewise.
7259 (evaluate_properties_for_edge): Likewise.
7260 (ipa_call_summary::reset): Tranform to ...
7261 (ipa_call_summary::~ipa_call_summary): ... this.
7262 (ipa_fn_summary::reset): Transform to ...
7263 (ipa_fn_summary::~ipa_fn_summary): ... this.
7264 (ipa_fn_summary_t::remove): Rename to ...
7265 (ipa_fn_summary_t::remove_callees): ... this.
7266 (ipa_fn_summary_t::duplicate): Use placement new
7267 instead of memory copy.
7268 (ipa_call_summary_t::duplicate): Likewise.
7269 (ipa_call_summary_t::remove): Remove.
7270 (dump_ipa_call_summary): Change get_create to get.
7271 (ipa_dump_fn_summary): Dump only when summary exists.
7272 (analyze_function_body): Use symbol_summary::get instead
7274 (compute_fn_summary): Likewise.
7275 (estimate_edge_devirt_benefit): Likewise.
7276 (estimate_edge_size_and_time): Likewise.
7277 (inline_update_callee_summaries): Likewise.
7278 (remap_edge_change_prob): Likewise.
7279 (remap_edge_summaries): Likewise.
7280 (ipa_merge_fn_summary_after_inlining): Likewise.
7281 (write_ipa_call_summary): Likewise.
7282 (ipa_fn_summary_write): Likewise.
7283 (ipa_free_fn_summary): Likewise.
7284 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
7285 (struct ipa_call_summary): Likewise.
7286 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
7288 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
7289 (estimate_size_after_inlining): Likewise.
7290 (estimate_growth): Likewise.
7291 (growth_likely_positive): Likewise.
7292 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
7293 (inline_call): Likewise.
7294 * ipa-inline.c (caller_growth_limits): Likewise.
7295 (can_inline_edge_p): Likewise.
7296 (can_inline_edge_by_limits_p): Likewise.
7297 (compute_uninlined_call_time): Likewise.
7298 (compute_inlined_call_time): Likewise.
7299 (want_inline_small_function_p): Likewise.
7300 (edge_badness): Likewise.
7301 (update_caller_keys): Likewise.
7302 (update_callee_keys): Likewise.
7303 (inline_small_functions): Likewise.
7304 (inline_to_all_callers_1): Likewise.
7305 (dump_overall_stats): Likewise.
7306 (early_inline_small_functions): Likewise.
7307 (early_inliner): Likewise.
7308 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
7309 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7310 * ipa-pure-const.c (malloc_candidate_p): Likewise.
7311 * ipa-split.c (execute_split_functions): Likewise.
7312 * symbol-summary.h: Likewise.
7313 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
7315 2018-06-19 Richard Biener <rguenther@suse.de>
7317 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
7318 (vectorize_loops): ... here. Fix dbgcnt handling.
7319 (try_vectorize_loop): Wrap try_vectorize_loop_1.
7321 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
7324 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
7325 ieee128 argument takes up only one (vector) register, not two (floating
7328 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
7330 * gimplify.c (gimplify_init_constructor): Really never clear for an
7331 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
7333 2018-06-19 Richard Biener <rguenther@suse.de>
7335 PR tree-optimization/86179
7336 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
7337 after failed recognition.
7339 2018-06-18 Martin Sebor <msebor@redhat.com>
7342 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
7343 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
7344 Handle integer subtraction.
7345 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
7346 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
7348 2018-06-18 David Malcolm <dmalcolm@redhat.com>
7350 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
7351 param from rtx to rtx_insn *.
7352 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
7354 (frv_ifcvt_modify_insn): Likwise.
7355 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
7356 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
7357 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
7358 as_a <rtx_insn *> cast to local "unprotected_region" once
7359 it's been established that it's not NULL or pc_rtx.
7360 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
7361 param "sethi" from rtx to rtx_insn *.
7362 (nds32_group_float_insns): Likewise for param "insn".
7363 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
7365 (vax_output_int_subtract): Likewise.
7366 * config/vax/vax.c (vax_output_int_add): Likewise for param
7368 (vax_output_int_subtract): Likewise.
7369 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
7370 (emit_pattern_after): Likewise for param "after".
7371 (emit_insn_after): Likewise.
7372 (emit_jump_insn_after): Likewise.
7373 (emit_call_insn_after): Likewise.
7374 (emit_debug_insn_after): Likewise.
7375 (emit_pattern_before): Likewise for param "before".
7376 (emit_insn_before): Likewise.
7377 (emit_jump_insn_before): Likewise.
7378 * final.c (get_insn_template): Likewise for param "insn", removing
7380 * output.h (get_insn_template): Likewise for 2nd param.
7381 * rtl.h (emit_insn_before): Likewise.
7382 (emit_jump_insn_before): Likewise.
7383 (emit_debug_insn_before_noloc): Likewise.
7384 (emit_insn_after): Likewise.
7385 (emit_jump_insn_after): Likewise.
7386 (emit_call_insn_after): Likewise.
7387 (emit_debug_insn_after): Likewise.
7388 (set_insn_deleted): Likewise for param.
7390 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
7393 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
7394 floating point modes, so that IFmode is numerically greater than
7395 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
7396 to declare the ordering. This prevents IFmode from being
7397 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
7398 machine. Include rs6000-modes.h to share the fractional values
7399 between genmodes* and the rest of the compiler.
7403 * config/rs6000/rs6000-modes.h: New file.
7404 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
7405 meaning of rs6000_long_double_size so that 126..128 selects an
7406 appropriate 128-bit floating point type.
7407 (rs6000_option_override_internal): Likewise.
7408 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
7409 (TARGET_LONG_DOUBLE_128): Change the meaning of
7410 rs6000_long_double_size so that 126..128 selects an appropriate
7411 128-bit floating point type.
7412 (LONG_DOUBLE_TYPE_SIZE): Update comment.
7413 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
7414 source and destination to match the standard usage.
7415 (truncifkf2): Likewise.
7416 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
7417 ISA 2.07 to use an explicit clobber, instead of passing in a
7419 (copysign<mode>3_soft): Likewise.
7421 2018-06-18 David Malcolm <dmalcolm@redhat.com>
7423 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
7424 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
7425 (vect_slp_analyze_instance_dependence): Likewise.
7426 (vect_enhance_data_refs_alignment): Likewise.
7427 (vect_analyze_data_refs_alignment): Likewise.
7428 (vect_slp_analyze_and_verify_instance_alignment
7429 (vect_analyze_data_ref_accesses): Likewise.
7430 (vect_prune_runtime_alias_test_list): Likewise.
7431 (vect_analyze_data_refs): Likewise.
7432 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
7433 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
7434 (vect_analyze_scalar_cycles_1): Likewise.
7435 (vect_get_loop_niters): Likewise.
7436 (vect_analyze_loop_form_1): Likewise.
7437 (vect_update_vf_for_slp): Likewise.
7438 (vect_analyze_loop_operations): Likewise.
7439 (vect_analyze_loop): Likewise.
7440 (vectorizable_induction): Likewise.
7441 (vect_transform_loop): Likewise.
7442 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
7443 * tree-vect-slp.c (vect_analyze_slp): Likewise.
7444 (vect_make_slp_decision): Likewise.
7445 (vect_detect_hybrid_slp): Likewise.
7446 (vect_slp_analyze_operations): Likewise.
7447 (vect_slp_bb): Likewise.
7448 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
7449 (vectorizable_bswap): Likewise.
7450 (vectorizable_call): Likewise.
7451 (vectorizable_simd_clone_call): Likewise.
7452 (vectorizable_conversion): Likewise.
7453 (vectorizable_assignment): Likewise.
7454 (vectorizable_shift): Likewise.
7455 (vectorizable_operation): Likewise.
7456 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
7458 2018-06-18 Martin Sebor <msebor@redhat.com>
7460 PR tree-optimization/81384
7461 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
7462 * builtins.c (expand_builtin_strnlen): New function.
7463 (expand_builtin): Call it.
7464 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
7465 * builtins.def (BUILT_IN_STRNLEN): New.
7466 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
7467 Warn for bounds in excess of maximum object size.
7468 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
7469 single-value ranges. Handle strnlen.
7470 (handle_builtin_strlen): Handle strnlen.
7471 (strlen_check_and_optimize_stmt): Same.
7472 * doc/extend.texi (Other Builtins): Document strnlen.
7474 2018-06-18 Maya Rashish <coypu@sdf.org>
7476 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
7477 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
7478 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
7480 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
7482 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
7484 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7486 * tree.c (escaped_string::escape): Replace cast to char * by
7487 const_cast<char *> (unescaped).
7489 2018-06-18 Nick Clifton <nickc@redhat.com>
7492 * tree.c (escaped_string): New class. Converts an unescaped
7493 string into its escaped equivalent.
7494 (warn_deprecated_use): Use the new class to convert the
7495 deprecation message, if present.
7496 (test_escaped_strings): New self test.
7497 (test_c_tests): Add test_escaped_strings.
7498 * doc/extend.texi (deprecated): Add a note that the
7499 deprecation message is affected by the -fmessage-length
7500 option, and that control characters will be escaped.
7501 (#pragma GCC error): Document this pragma.
7502 (#pragma GCC warning): Likewise.
7503 * doc/invoke.texi (-fmessage-length): Document this option's
7504 effect on the #warning and #error preprocessor directives and
7505 the deprecated attribute.
7507 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
7509 * tree.c (decl_value_expr_lookup): Revert latest change.
7510 (decl_value_expr_insert): Likewise.
7512 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
7514 * gimplify.c (nonlocal_vlas): Delete.
7515 (nonlocal_vla_vars): Likewise.
7516 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
7518 (gimplify_body): Do not create and destroy nonlocal_vlas.
7519 * tree-nested.c: Include diagnostic.h.
7520 (use_pointer_in_frame): Tweak.
7521 (lookup_field_for_decl): Add assertion and declare the transformation.
7522 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
7523 internal error when the reference is in a wrong context. Do not
7524 create a debug decl by default.
7525 (note_nonlocal_block_vlas): Delete.
7526 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
7527 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
7528 create a debug decl by default.
7529 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
7530 call is in a wrong context.
7531 (fixup_vla_decls): New function.
7532 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
7533 debug variables were created.
7534 * tree.c (decl_value_expr_lookup): Add checking assertion.
7535 (decl_value_expr_insert): Likewise.
7537 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
7540 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
7541 * tree-scalar-evolution.c (interpret_expr): Likewise.
7542 (expression_expensive_p): Likewise.
7543 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
7544 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
7545 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
7546 (ssa_defined_by_minus_one_stmt_p): New.
7548 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
7551 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
7552 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
7553 * dojump.c (do_jump): Likewise.
7554 * expr.c (expand_expr_real_2): Check operand type's sign.
7555 * fold-const.c (const_unop): Handle ABSU_EXPR.
7556 (fold_abs_const): Likewise.
7557 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
7558 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
7559 (strip_sign_op_1): Likesise.
7560 * match.pd: Add new pattern to generate ABSU_EXPR.
7561 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
7562 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
7563 * tree-eh.c (operation_could_trap_helper_p): Likewise.
7564 * tree-inline.c (estimate_operator_cost): Likewise.
7565 * tree-pretty-print.c (dump_generic_node): Likewise.
7566 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
7567 * tree.def (ABSU_EXPR): New.
7569 2018-06-16 Jakub Jelinek <jakub@redhat.com>
7572 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
7573 documented as preserved for backward compatibility only.
7574 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
7576 PR rtl-optimization/86108
7577 * bb-reorder.c (create_forwarder_block): Renamed to ...
7578 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
7579 jump from new landing pad to the second part.
7580 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
7583 2018-06-15 Jakub Jelinek <jakub@redhat.com>
7586 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
7587 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
7588 Only call store_expr for halves if the mode is the same.
7591 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
7592 Fix up comment formatting.
7594 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
7596 * typed-splay-tree.h (typed_splay_tree::remove): New function.
7597 (typed_splay_tree::closure,
7598 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
7599 (typed_splay_tree::typed_splay_tree,
7600 typed_splay_tree::operator =): Declared private.
7601 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
7602 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
7603 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
7604 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
7605 typed_splay_tree::splay_tree_splay,
7606 typed_splay_tree::splay_tree_foreach_helper,
7607 typed_splay_tree::splay_tree_insert,
7608 typed_splay_tree::splay_tree_remove,
7609 typed_splay_tree::splay_tree_lookup,
7610 typed_splay_tree::splay_tree_predecessor,
7611 typed_splay_tree::splay_tree_successor,
7612 typed_splay_tree::splay_tree_min,
7613 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
7614 (typed_splay_tree::root, typed_splay_tree::comp,
7615 typed_splay_tree::delete_key,
7616 typed_splay_tree::delete_value): New data members.
7617 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
7618 typed_splay_tree::remove.
7620 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
7622 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
7623 -mginv and -mno-ginv to the assembler.
7624 * config/mips/mips.opt (-mcrc): New option.
7626 * doc/invoke.text (-mcrc): Document.
7629 2018-06-15 Nick Clifton <nickc@redhat.com>
7632 * tree.c (escaped_string): New class. Converts an unescaped
7633 string into its escaped equivalent.
7634 (warn_deprecated_use): Use the new class to convert the
7635 deprecation message, if present.
7636 (test_escaped_strings): New self test.
7637 (test_c_tests): Add test_escaped_strings.
7638 * doc/extend.texi (deprecated): Add a note that the
7639 deprecation message is affected by the -fmessage-length
7640 option, and that control characters will be escaped.
7641 (#pragma GCC error): Document this pragma.
7642 (#pragma GCC warning): Likewise.
7643 * doc/invoke.texi (-fmessage-length): Document this option's
7644 effect on the #warning and #error preprocessor directives and
7645 the deprecated attribute.
7647 2018-06-15 Richard Biener <rguenther@suse.de>
7649 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
7650 here, also noting vector size used.
7651 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
7652 size used in MSG_OPTIMIZED_LOCATIONS dump.
7653 (pass_slp_vectorize::execute): Adjust.
7655 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
7658 * config/arc/arc.c (arc_return_address_register): Fix
7661 2018-06-15 Richard Biener <rguenther@suse.de>
7664 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
7665 leave useless conversion stripping to force_gimple_operand_gsi.
7666 (gimplify_build2): Likewise.
7667 (gimplify_build1): Likewise.
7669 2018-06-15 Richard Biener <rguenther@suse.de>
7672 * tree-cfg.c (move_stmt_op): unshare invariant addresses
7673 before adjusting their block.
7675 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
7677 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
7678 multilibs for *-*-rtems*.
7679 * config/riscv/t-rtems: New file.
7681 2018-06-14 Jakub Jelinek <jakub@redhat.com>
7684 * match.pd ((A +- CST1) +- CST2): Punt if last resort
7685 unsigned_type_for returns NULL.
7688 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
7689 subregs of multi-word pseudos unless the float mode has word size.
7691 2018-06-14 Richard Biener <rguenther@suse.de>
7694 * tree-vect-generic.c (build_word_mode_vector_type): Remove
7695 duplicate and harmful type_hash_canon.
7696 * tree.c (type_hash_canon): Assert we didn't find ourselves.
7698 2018-06-14 Richard Biener <rguenther@suse.de>
7701 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
7704 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
7706 * config/rtems.h (STDINT_LONG32): Define.
7708 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
7709 Prachi Godbole <prachi.godbole@imgtec.com>
7711 * config/mips/mips-cpus.def: Define P6600.
7712 * config/mips/mips-tables.opt: Regenerate.
7713 * config/mips/mips.c (mips_ucbranch_type): New enum.
7714 (mips_rtx_cost_data): Add support for P6600.
7715 (mips_issue_rate): Likewise.
7716 (mips_multipass_dfa_lookahead): Likewise.
7717 (mips_avoid_hazard): Likewise.
7718 (mips_reorg_process_insns): Likewise.
7719 (mips_classify_branch_p6600): New function.
7720 * config/mips/mips.h (TUNE_P6600): New define.
7721 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
7722 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
7723 * config/mips/mips.md: Include p6600.md.
7724 (processor): Add p6600.
7725 * config/mips/p6600.md: New file.
7726 * doc/invoke.texi: Add p6600 to supported architectures.
7728 2018-06-13 Martin Sebor <msebor@redhat.com>
7730 PR tree-optimization/86114
7731 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
7733 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
7735 2018-06-13 Richard Biener <rguenther@suse.de>
7737 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
7738 Properly set vector type of the intermediate stmt.
7739 * tree-vect-stmts.c (vectorizable_operation): The destination
7740 var always has vectype_out type.
7742 2018-06-13 Jeff Law <law@redhat.com>
7744 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
7745 integer 0 for argument to print_rtl_with_bb.
7746 (rl78_reorg): Likewise.
7748 2018-06-13 David Malcolm <dmalcolm@redhat.com>
7750 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
7751 from rtx to rtx_insn *.
7752 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
7754 (add_sched_insns_for_speculation): Likewise for local "target",
7755 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
7756 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
7757 from rtx_insn ** to rtx_code_label **.
7758 (reorg_emit_nops): Likewise.
7759 (c6x_reorg): Likewise for local "call_labels".
7760 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
7762 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
7763 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
7764 the loops over LABEL_REFS.
7765 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
7767 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
7768 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
7769 (split_branches): Strengthen local "olabel" from rtx to
7770 rtx_insn *, adding a safe_as_a cast.
7771 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
7773 (add_insn_after): Likewise for first two params.
7774 (add_insn_before): Likewise.
7775 (remove_insn): Likewise for param.
7776 (emit_pattern_before_noloc): Likewise for second and third params.
7777 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
7778 (emit_call_insn_before_noloc): Likewise.
7779 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
7781 (emit_barrier_before): Likewise.
7782 (emit_label_before): Strengthen "label" param from "rtx" to
7783 "rtx_code_label *". Strengthen "before" param from "rtx" to
7785 (emit_insn_after_1): Strengthen "after" param from "rtx" to
7787 (emit_pattern_after_noloc): Likewise.
7788 (emit_insn_after_noloc): Likewise.
7789 (emit_jump_insn_after_noloc): Likewise.
7790 (emit_call_insn_after_noloc): Likewise.
7791 (emit_debug_insn_after_noloc): Likewise.
7792 (emit_barrier_after): Likewise.
7793 (emit_label_after): Likewise for both params.
7794 (emit_pattern_after_setloc): Likewise for "after" param. Convert
7795 "loc" param from "int" to "location_t".
7796 (emit_insn_after_setloc): Likewise.
7797 (emit_jump_insn_after_setloc): Likewise.
7798 (emit_call_insn_after_setloc): Likewise.
7799 (emit_debug_insn_after_setloc): Likewise.
7800 (emit_pattern_before_setloc): Likewise for "before" param. Convert
7801 "loc" param from "int" to "location_t".
7802 (emit_pattern_before): Convert NULL_RTX to NULL.
7803 (emit_insn_before_setloc): Convert "loc" param from "int" to
7805 (emit_jump_insn_before_setloc): Likewise.
7806 (emit_call_insn_before_setloc): Likewise.
7807 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
7808 rtx_insn *. Convert "loc" param from "int" to "location_t".
7809 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
7810 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
7811 Convert 3rd param from "int" to "location_t".
7812 (emit_barrier_before, emit_barrier_after, next_real_insn):
7813 Strengthen param from rtx to rtx_insn *.
7814 (emit_label_before): Strengthen 1st param from "rtx" to
7815 "rtx_code_label *". Strengthen 2nd param from "rtx" to
7817 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
7818 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
7819 Strengthen 2nd param from "rtx" to "rtx_insn *".
7820 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
7821 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
7822 Likewise. Convert 3rd param from "int" to "location_t".
7823 (emit_label_after): Strengthen 1st param from "rtx" to
7825 (next_real_insn, remove_insn): Strengthen param from "rtx" to
7827 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
7828 from "rtx" to "rtx_insn *".
7830 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
7832 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
7833 bodies streamed in with -Q.
7834 * dumpfile.c (dump_files): Add lto-stream-out dump file.
7835 * dumpfile.h (tree_dump_index): Add lto_stream_out.
7836 * gimple-streamer-out.c: Include gimple-pretty-print.h
7837 (output_bb): Dump stmts streamed.
7838 * lto-section-out.c: Include print-tree.h
7839 (lto_begin_section): Dump sections created.
7840 (lto_output_decl_index): Dump decl encoded.
7841 * lto-streamer-out.c: Include print-tree.h
7842 (create_output_block): Dump output block created.
7843 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
7844 (output_function): Dump function output.
7845 (output_constructor): Dump constructor streamed.
7846 (write_global_stream): Output indexes encoded.
7847 (produce_asm_for_decls): Dump streams encoded.
7848 * lto-streamer.c (streamer_dump_file): New global var.
7849 * lto-streamer.h (streamer_dump_file): Declare.
7850 * passes.c (ipa_write_summaries): Initialize streamer dump.
7851 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
7854 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
7857 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
7858 offsets for register save directives. Emit a second batch of save
7859 directives, if need be, when the function accesses prior frames.
7861 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7863 * config/arc/fpu.md (fmasf4): Force operand to register.
7864 (fnmasf4): Likewise.
7866 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7868 * config/arc/arc-protos.h (arc_pad_return): Remove.
7869 * config/arc/arc.c (machine_function): Remove force_short_suffix
7871 (arc_print_operand): Adjust printing of '&'.
7872 (arc_verify_short): Remove conditional printing of short suffix.
7873 (arc_final_prescan_insn): Remove reference to size_reason.
7874 (pad_return): New function.
7875 (arc_reorg): Call pad_return.
7876 (arc_pad_return): Remove.
7877 (arc_init_machine_status): Remove reference to force_short_suffix.
7878 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
7879 (attr length): When attribute iscompact is true force to 2
7880 regardless; in the case of maybe check if we want to force the
7881 instruction to have 4 bytes length.
7882 (nopv): Change it to generate 4 byte long nop as well.
7883 (blockage): New pattern.
7884 (simple_return): Remove call to arc_pad_return.
7885 (p_return_i): Likewise.
7887 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7889 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
7891 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7893 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
7896 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7898 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
7899 for ARC700 and ARCv2.
7901 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
7904 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
7905 operands[2] instead of operands[1].
7908 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
7910 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
7911 case, check whether the outer register overlaps an unallocatable
7912 register, not just whether it fits the required class.
7914 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
7916 * poly-int.h (can_div_trunc_p): Add new overload in which all values
7918 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
7919 (memrefs_conflict_p): Likewise.
7920 (init_alias_analysis): Likewise.
7921 * cfgexpand.c (expand_debug_expr): Likewise.
7922 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
7923 * cse.c (fold_rtx): Likewise.
7924 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
7925 * expr.c (emit_block_move_hints): Likewise.
7926 (clear_storage_hints, push_block, emit_push_insn): Likewise.
7927 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
7928 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
7929 (emit_group_store): Likewise.
7930 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
7931 to read the PRE/POST_MODIFY increment.
7932 * calls.c (store_one_arg): Use strip_offset.
7933 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
7935 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
7937 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
7938 (simplify_binary_operation_1): Extend CONST_INT handling to
7940 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
7941 than a HOST_WIDE_INT.
7942 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
7944 (adjust_mems, add_stores): Update accodingly.
7945 (vt_canonicalize_addr): Track polynomial offsets.
7946 (emit_note_insn_var_location): Likewise.
7947 (vt_add_function_parameter): Likewise.
7948 (vt_initialize): Likewise.
7950 2018-06-12 Jeff Law <law@redhat.com>
7952 * config.gcc (alpha*-*-freebsd*): Remove.
7953 * config/alpha/freebsd.h: Remove.
7955 2018-06-12 David Malcolm <dmalcolm@redhat.com>
7958 * spellcheck-tree.c (levenshtein_distance): Rename to...
7959 (get_edit_distance): ...this, and update for underlying renaming.
7960 * spellcheck-tree.h (levenshtein_distance): Rename to...
7961 (get_edit_distance): ...this.
7962 * spellcheck.c (levenshtein_distance): Rename to...
7963 (get_edit_distance): ...this. Convert from Levenshtein distance
7964 to Damerau-Levenshtein distance by supporting transpositions of
7965 adjacent characters. Rename "v1" to "v_next" and "v0" to
7967 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
7968 (selftest::test_edit_distance_unit_test_oneway): ...this, and
7969 update for underlying renaming.
7970 (selftest::levenshtein_distance_unit_test): Rename to...
7971 (selftest::test_get_edit_distance_unit): ...this, and update for
7972 underlying renaming.
7973 (selftest::test_find_closest_string): Add example from PR 69968
7974 where transposition helps
7975 (selftest::test_metric_conditions): Update for renaming.
7976 (selftest::test_metric_conditions): Likewise.
7977 (selftest::spellcheck_c_tests): Likewise.
7978 * spellcheck.h (levenshtein_distance): Rename both overloads to...
7979 (get_edit_distance): ...this.
7980 (best_match::consider): Update for renaming.
7982 2018-06-12 Martin Sebor <msebor@redhat.com>
7984 PR tree-optimization/85259
7985 * builtins.c (compute_objsize): Handle constant offsets.
7986 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
7987 true iff a warning has been issued.
7988 * gimple.h (gimple_nonartificial_location): New function.
7989 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
7990 gimple_nonartificial_location and handle -Wno-system-headers.
7991 (handle_builtin_stxncpy): Same.
7993 2018-06-12 Martin Sebor <msebor@redhat.com>
7996 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
7998 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
8000 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
8001 BUILTIN_VEC_XST entries for pointer to double and long long.
8003 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
8006 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
8008 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
8011 2018-06-12 Martin Liska <mliska@suse.cz>
8013 * doc/options.texi: Document IntegerRange.
8015 2018-06-12 Martin Liska <mliska@suse.cz>
8017 * config/i386/i386.opt: Make MPX-related options as Deprecated.
8018 * opt-functions.awk: Handle Deprecated flag.
8019 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
8021 (read_cmdline_option): Report warning for a deprecated option.
8022 * opts.h (struct cl_option): Add new field cl_deprecated.
8023 (CL_ERR_DEPRECATED): New.
8025 2018-06-12 Martin Liska <mliska@suse.cz>
8027 * doc/options.texi: Document Deprecated option flag.
8029 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8031 * config/arc/arc-arch.h (arc_extras): New enum.
8032 (arc_cpu_t):Add field extra.
8033 (arc_cpu_types): Consider the extras.
8034 * config/arc/arc-cpus.def: Add extras info.
8035 * config/arc/arc-opts.h (processor_type): Consider extra field.
8036 * config/arc/arc.c (arc_override_options): Handle extra field.
8038 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8040 * config/arc/arc-arch.h: Update ARC_OPTX macro.
8041 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
8043 * config/arc/arc.c (arc_init): Update pic warning.
8044 (irq_range): Update irq range parsing warnings.
8045 (arc_override_options): Update various warning messages.
8046 (arc_handle_aux_attribute): Likewise.
8048 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
8050 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
8052 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8054 * doc/sourcebuild.texi: Document usage of line number 0 in verify
8055 compiler messages directives.
8057 2018-06-12 Matthew Fortune <mfortune@gmail.com>
8059 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
8060 * config/mips/mips-tables.opt: Regenerate.
8061 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
8063 * doc/invoke.texi: Document -march=i6500.
8065 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
8067 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
8068 (i6400_gpmul): Add cpu_unit.
8069 (i6400_gpdiv): Likewise.
8070 (i6400_msa_add_d): Update reservations.
8071 (i6400_msa_int_add) Likewise.
8072 (i6400_msa_short_logic3) Likewise.
8073 (i6400_msa_short_logic2) Likewise.
8074 (i6400_msa_short_logic) Likewise.
8075 (i6400_msa_move) Likewise.
8076 (i6400_msa_cmp) Likewise.
8077 (i6400_msa_short_float2) Likewise.
8078 (i6400_msa_div_d) Likewise.
8079 (i6400_msa_long_logic1) Likewise.
8080 (i6400_msa_long_logic2) Likewise.
8081 (i6400_msa_mult) Likewise.
8082 (i6400_msa_long_float2) Likewise.
8083 (i6400_msa_long_float4) Likewise.
8084 (i6400_msa_long_float5) Likewise.
8085 (i6400_msa_long_float8) Likewise.
8086 (i6400_fpu_fadd): Include frint type.
8087 (i6400_fpu_store): New define_insn_reservation.
8088 (i6400_fpu_load): Likewise.
8089 (i6400_fpu_move): Likewise.
8090 (i6400_fpu_fcmp): Likewise.
8091 (i6400_fpu_fmadd): Likewise.
8092 (i6400_int_mult): Include imul3nc type and update reservation.
8093 (i6400_int_div): Include idiv3 type and update reservation.
8094 (i6400_int_load): Update to check type not move_type.
8095 (i6400_int_store): Likewise.
8096 (i6400_int_prefetch): Set zero latency.
8098 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
8100 * gcc.c: Document new %@{...} sequence.
8101 (LINK_COMMAND_SPEC): Use it for the -L switches.
8102 (cpp_unique_options): Use it for the -I switches.
8103 (at_file_argbuf): New global variable.
8104 (in_at_file): Likewise.
8105 (alloc_args): Create at_file_argbuf.
8106 (clear_args): Truncate at_file_argbuf.
8107 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
8108 (open_at_file): New function.
8109 (close_at_file): Likewise.
8110 (create_at_file): Delete.
8111 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
8114 (validate_switches_from_spec): Deal with %@{...} sequence.
8115 (validate_switches): Likewise.
8116 (driver::finalize): Call clear_args.
8118 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
8120 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
8122 2018-06-11 Martin Sebor <msebor@redhat.com>
8124 * doc/invoke.texi (-Wall): List -Wc++17-compat.
8125 (Wno-class-memaccess): Add @opindex.
8126 (Wno-templates, Wno-multiple-inheritance): Same.
8127 (Wno-virtual-inheritance, Wno-namespaces): Same.
8128 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
8129 (Wno-format-overflow, Wno-format-truncation): Same.
8130 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
8131 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
8132 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
8133 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
8134 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
8135 (Wno-misspelled-isr): Same.
8137 2018-06-11 Martin Sebor <msebor@redhat.com>
8139 * PR tree-optimization/86083
8140 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
8142 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
8144 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
8146 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
8149 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
8150 on the correct operand.
8151 (*movdi_internal64): Ditto.
8153 2018-06-11 Martin Liska <mliska@suse.cz>
8155 PR tree-optimization/86089
8156 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
8158 2018-06-11 Julia Koval <julia.koval@intel.com>
8160 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
8161 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
8162 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
8164 2018-06-11 Olivier Hainque <hainque@adacore.com>
8166 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
8167 for Ada with strict dwarf2.
8169 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
8172 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
8175 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
8177 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
8179 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
8181 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
8184 2018-06-08 Martin Liska <mliska@suse.cz>
8186 * tree-cfg.h (debug_function): Fix argument type to match
8189 2018-06-08 Martin Liska <mliska@suse.cz>
8191 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
8192 Remove usage of MPX-related (and removed) fields.
8193 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
8195 2018-06-08 David Malcolm <dmalcolm@redhat.com>
8197 * cfg.c (debug): Use TDF_NONE rather than 0.
8198 * cfghooks.c (debug): Likewise.
8199 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
8200 (struct dump_option_value_info): Convert to...
8201 (struct kv_pair): ...this template type.
8202 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
8204 (optinfo_verbosity_options): Likewise.
8205 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
8207 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
8208 than int for "optgroup_flags" param.
8209 (dump_generic_expr_loc): Use dump_flags_t rather than int for
8211 (dump_dec): Likewise.
8212 (dump_finish): Use TDF_NONE rather than 0.
8213 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
8214 rather than int for "optgroup_flags" param. Use TDF_NONE rather
8215 than 0. Update for change to option_ptr.
8216 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
8217 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
8218 0. Update for changes to optinfo_verbosity_options and
8220 (opt_info_switch_p): Convert optgroup_flags from int to
8222 (dump_basic_block): Use dump_flags_t rather than int
8223 for "dump_kind" param.
8224 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
8225 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
8226 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
8227 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
8228 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
8229 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
8230 TDF_NONE): Convert from macros to...
8231 (enum dump_flag): ...this new enum.
8232 (dump_flags_t): Update to use enum.
8233 (operator|, operator&, operator~, operator|=, operator&=):
8234 Implement for dump_flags_t.
8235 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
8236 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
8237 Convert from macros to...
8238 (enum optgroup_flag): ...this new enum.
8239 (optgroup_flags_t): New typedef.
8240 (operator|, operator|=): Implement for optgroup_flags_t.
8241 (struct dump_file_info): Convert field "alt_flags" to
8242 dump_flags_t. Convert field "optgroup_flags" to
8244 (dump_basic_block): Use dump_flags_t rather than int for param.
8245 (dump_generic_expr_loc): Likewise.
8246 (dump_dec): Likewise.
8247 (dump_register): Convert param "optgroup_flags" to
8249 (opt_info_enable_passes): Likewise.
8250 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
8252 * gimple-pretty-print.c (debug): Likewise.
8253 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
8254 (merged_store_group::apply_stores): Likewise.
8255 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
8256 * gimple.c (verify_gimple_pp): Likewise.
8257 * graphite-poly.c (print_pbb_body): Likewise.
8258 * passes.c (pass_manager::register_one_dump_file): Convert
8259 local "optgroup_flags" to optgroup_flags_t.
8260 * print-tree.c (print_node): Use TDF_NONE rather than 0.
8262 (debug_body): Likewise.
8263 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
8264 to optgroup_flags_t.
8265 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
8267 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
8268 (convert_mult_to_fma): Likewise.
8269 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
8270 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
8271 * tree-vect-data-refs.c (dump_lower_bound): Convert param
8272 "dump_kind" to dump_flags_t.
8274 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
8276 * config/rs6000/rs6000.c (min, max): Delete.
8278 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
8280 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
8281 -mabi=spe and -mabi=no-spe.
8283 2018-06-08 Martin Liska <mliska@suse.cz>
8285 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
8286 where we expect an existing summary.
8288 2018-06-08 Martin Liska <mliska@suse.cz>
8290 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
8291 * ipa-inline.h (estimate_edge_growth): Likewise.
8293 2018-06-08 Martin Liska <mliska@suse.cz>
8295 * cgraph.c (function_version_hasher::hash): Use
8296 cgraph_node::get_uid ().
8297 (function_version_hasher::equal):
8298 * cgraph.h (cgraph_node::get_uid): New method.
8299 * ipa-inline.c (update_caller_keys): Use
8300 cgraph_node::get_uid ().
8301 (update_callee_keys): Likewise.
8302 * ipa-utils.c (searchc): Likewise.
8303 (ipa_reduced_postorder): Likewise.
8304 * lto-cgraph.c (input_node): Likewise.
8305 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
8306 * symbol-summary.h (symtab_insertion): Likewise.
8307 (symtab_removal): Likewise.
8308 (symtab_duplication): Likewise.
8309 * tree-pretty-print.c (dump_function_header): Likewise.
8310 * tree-sra.c (convert_callers_for_node): Likewise.
8312 2018-06-08 Martin Liska <mliska@suse.cz>
8314 * cgraph.c (symbol_table::create_edge): Always assign a new
8316 (symbol_table::free_edge): Do not recycle numbers.
8317 * cgraph.h (cgraph_edge::get): New method.
8318 * symbol-summary.h (symtab_removal): Use it.
8319 (symtab_duplication): Likewise.
8320 (call_summary::hashable_uid): Remove.
8322 2018-06-08 Martin Liska <mliska@suse.cz>
8324 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
8325 (initialize_growth_caches): Remove.
8326 (free_growth_caches): Likewise.
8327 (do_estimate_edge_time): Use edge_growth_cache.
8328 (do_estimate_edge_size): Likewise.
8329 (do_estimate_edge_hints): Likewise.
8330 * ipa-inline.c (reset_edge_caches): Likewise.
8331 (recursive_inlining): Likewise.
8332 (inline_small_functions): Likewise.
8333 * ipa-inline.h (initialize_growth_caches): Remove.
8334 (estimate_edge_size): Likewise.
8335 (estimate_edge_time): Likewise.
8336 (estimate_edge_hints): Likewise.
8337 (reset_edge_growth_cache): Likewise.
8338 * symbol-summary.h (call_summary::remove): New method.
8340 2018-06-08 Martin Liska <mliska@suse.cz>
8342 * ipa-cp.c (class edge_clone_summary): New summary.
8343 (grow_edge_clone_vectors): Remove.
8344 (ipcp_edge_duplication_hook): Remove.
8345 (class edge_clone_summary_t): New call_summary class.
8346 (ipcp_edge_removal_hook): Remove.
8347 (edge_clone_summary_t::duplicate): New function.
8348 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
8349 (create_specialized_node): Likewise.
8350 (ipcp_driver): Initialize edge_clone_summaries and do not
8353 2018-06-08 Martin Liska <mliska@suse.cz>
8355 * symbol-summary.h (get): New function.
8356 (call_summary::m_initialize_when_cloning): New class member.
8358 2018-06-08 Martin Liska <mliska@suse.cz>
8360 * cgraph.c (cgraph_node::remove): Do not recycle uid.
8361 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
8362 (symbol_table::allocate_cgraph_symbol): Do not set uid.
8363 * passes.c (uid_hash_t): Record removed_nodes by their uids.
8364 (remove_cgraph_node_from_order): Use the removed_nodes set.
8365 (do_per_function_toporder): Likwise.
8366 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
8367 instead of summary_uid.
8368 (symtab_removal): Likewise.
8369 (symtab_duplication): Likewise.
8371 2018-06-08 Martin Liska <mliska@suse.cz>
8373 * ipa-cp.c (ipcp_store_bits_results): Use
8374 ipcp_transformation_sum.
8375 (ipcp_store_vr_results): Likewise.
8376 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
8378 (ipcp_transformation_initialize): ... this.
8379 (ipa_set_node_agg_value_chain):
8380 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
8381 (write_ipcp_transformation_info): Likewise.
8382 (read_ipcp_transformation_info): Likewise.
8383 (ipcp_update_bits): Likewise.
8384 (ipcp_update_vr): Likewise.
8385 (ipcp_transform_function): Likewise.
8386 * ipa-prop.h: Rename ipcp_transformation_summary to
8387 ipcp_transformation.
8388 (class ipcp_transformation_t): New function summary.
8389 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
8390 (ipa_get_agg_replacements_for_node): Likewise.
8392 2018-06-08 Martin Liska <mliska@suse.cz>
8394 * ipa-pure-const.c (struct funct_state_d): Do it class instead
8396 (class funct_state_summary_t): New function_summary class.
8397 (has_function_state): Remove.
8398 (get_function_state): Likewise.
8399 (set_function_state): Likewise.
8400 (add_new_function): Likewise.
8401 (funct_state_summary_t::insert): New function.
8402 (duplicate_node_data): Remove.
8403 (remove_node_data): Remove.
8404 (funct_state_summary_t::duplicate): New function.
8405 (register_hooks): Create new funct_state_summaries.
8406 (pure_const_generate_summary): Use it.
8407 (pure_const_write_summary): Likewise.
8408 (pure_const_read_summary): Likewise.
8409 (propagate_pure_const): Likewise.
8410 (propagate_nothrow): Likewise.
8411 (dump_malloc_lattice): Likewise.
8412 (propagate_malloc): Likewise.
8413 (execute): Do not register hooks, just remove summary
8415 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
8418 2018-06-08 Martin Liska <mliska@suse.cz>
8420 * ipa-reference.c (remove_node_data): Remove.
8421 (duplicate_node_data): Likewise.
8422 (class ipa_ref_var_info_summary_t): New class.
8423 (class ipa_ref_opt_summary_t): Likewise.
8424 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
8425 (get_reference_optimization_summary): Use
8426 ipa_ref_opt_sum_summaries.
8427 (set_reference_vars_info): Remove.
8428 (set_reference_optimization_summary): Likewise.
8429 (ipa_init): Create summaries.
8430 (init_function_info): Use function summary.
8431 (ipa_ref_opt_summary_t::duplicate): New function.
8432 (ipa_ref_opt_summary_t::remove): New function.
8433 (get_read_write_all_from_node): Fix GNU coding style.
8434 (propagate): Use function summary.
8435 (write_node_summary_p): Fix GNU coding style.
8436 (stream_out_bitmap): Likewise.
8437 (ipa_reference_read_optimization_summary): Use function summary.
8438 (ipa_reference_c_finalize): Do not release hooks.
8440 2018-06-08 Martin Liska <mliska@suse.cz>
8442 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
8443 (analyze_function_body): Extract multiple calls of get_create.
8444 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
8445 * ipa-inline.c (recursive_inlining): Use ::get method.
8446 * ipa-inline.h (estimate_edge_growth): Likewise.
8448 2018-06-08 Martin Liska <mliska@suse.cz>
8450 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
8452 (hsa_function_summary::hsa_function_summary): Use the new enum
8454 (hsa_gpu_implementation_p): Use hsa_summaries::get.
8455 * hsa-gen.c (hsa_get_host_function): Likewise.
8456 (get_brig_function_name): Likewise.
8457 * ipa-hsa.c (process_hsa_functions): Likewise.
8458 (ipa_hsa_write_summary): Likewise.
8459 * symbol-summary.h (symtab_duplication): Use ::get function/
8460 (get): New function.
8462 2018-06-08 Martin Liska <mliska@suse.cz>
8464 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
8466 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
8467 (hsa_register_kernel): Likewise.
8468 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
8469 * hsa-gen.c (hsa_get_host_function): Likewise.
8470 (get_brig_function_name): Likewise.
8471 (generate_hsa): Likewise.
8472 (pass_gen_hsail::execute): Likewise.
8473 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
8474 (devirtualization_time_bonus): Likewise.
8475 (ipcp_propagate_stage): Likewise.
8476 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
8477 (edge_set_predicate): Likewise.
8478 (evaluate_conditions_for_known_args): Likewise.
8479 (evaluate_properties_for_edge): Likewise.
8480 (ipa_fn_summary::reset): Likewise.
8481 (ipa_fn_summary_t::duplicate): Likewise.
8482 (dump_ipa_call_summary): Likewise.
8483 (ipa_dump_fn_summary): Likewise.
8484 (analyze_function_body): Likewise.
8485 (compute_fn_summary): Likewise.
8486 (estimate_edge_devirt_benefit): Likewise.
8487 (estimate_edge_size_and_time): Likewise.
8488 (estimate_calls_size_and_time): Likewise.
8489 (estimate_node_size_and_time): Likewise.
8490 (inline_update_callee_summaries): Likewise.
8491 (remap_edge_change_prob): Likewise.
8492 (remap_edge_summaries): Likewise.
8493 (ipa_merge_fn_summary_after_inlining): Likewise.
8494 (ipa_update_overall_fn_summary): Likewise.
8495 (read_ipa_call_summary): Likewise.
8496 (inline_read_section): Likewise.
8497 (write_ipa_call_summary): Likewise.
8498 (ipa_fn_summary_write): Likewise.
8499 (ipa_free_fn_summary): Likewise.
8500 * ipa-hsa.c (process_hsa_functions): Likewise.
8501 (ipa_hsa_write_summary): Likewise.
8502 (ipa_hsa_read_section): Likewise.
8503 * ipa-icf.c (sem_function::merge): Likewise.
8504 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
8505 (do_estimate_edge_time): Likewise.
8506 (estimate_size_after_inlining): Likewise.
8507 (estimate_growth): Likewise.
8508 (growth_likely_positive): Likewise.
8509 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
8510 (inline_call): Likewise.
8511 * ipa-inline.c (caller_growth_limits): Likewise.
8512 (can_inline_edge_p): Likewise.
8513 (can_inline_edge_by_limits_p): Likewise.
8514 (compute_uninlined_call_time): Likewise.
8515 (compute_inlined_call_time): Likewise.
8516 (want_inline_small_function_p): Likewise.
8517 (edge_badness): Likewise.
8518 (update_caller_keys): Likewise.
8519 (update_callee_keys): Likewise.
8520 (recursive_inlining): Likewise.
8521 (inline_small_functions): Likewise.
8522 (inline_to_all_callers_1): Likewise.
8523 (dump_overall_stats): Likewise.
8524 (early_inline_small_functions): Likewise.
8525 (early_inliner): Likewise.
8526 * ipa-inline.h (estimate_edge_growth): Likewise.
8527 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
8528 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8529 * ipa-prop.h (IPA_NODE_REF): Likewise.
8530 (IPA_EDGE_REF): Likewise.
8531 * ipa-pure-const.c (malloc_candidate_p): Likewise.
8532 (propagate_malloc): Likewise.
8533 * ipa-split.c (execute_split_functions): Likewise.
8534 * symbol-summary.h: Rename get to get_create.
8536 (get_create): Likewise.
8537 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
8539 2018-06-08 Martin Liska <mliska@suse.cz>
8541 * symbol-summary.h (release): Move definition out of class
8543 (symtab_removal): Likewise.
8544 (symtab_duplication): Likewise.
8546 2018-06-08 Martin Liska <mliska@suse.cz>
8548 * symbol-summary.h (function_summary): Move constructor
8549 implementation out of class declaration.
8550 (release): Likewise.
8551 (symtab_insertion): Likewise.
8552 (symtab_removal): Likewise.
8553 (symtab_duplication): Likewise.
8556 2018-06-08 Martin Liska <mliska@suse.cz>
8558 * Makefile.in: Remove support for MPX (macros, related functions,
8559 fields in cgraph_node, ...).
8560 * builtin-types.def (BT_BND): Likewise.
8561 (BT_FN_BND_CONST_PTR): Likewise.
8562 (BT_FN_CONST_PTR_BND): Likewise.
8563 (BT_FN_VOID_PTR_BND): Likewise.
8564 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
8565 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
8566 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
8567 (expand_builtin_mempcpy_with_bounds): Likewise.
8568 (expand_builtin_memset_with_bounds): Likewise.
8569 (expand_builtin_memset_args): Likewise.
8570 (std_expand_builtin_va_start): Likewise.
8571 (expand_builtin): Likewise.
8572 (expand_builtin_with_bounds): Likewise.
8573 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
8574 (DEF_LIB_BUILTIN_CHKP): Likewise.
8575 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
8576 (DEF_CHKP_BUILTIN): Likewise.
8577 (BUILT_IN_MEMCPY): Likewise.
8578 (BUILT_IN_MEMMOVE): Likewise.
8579 (BUILT_IN_MEMPCPY): Likewise.
8580 (BUILT_IN_MEMSET): Likewise.
8581 (BUILT_IN_STPCPY): Likewise.
8582 (BUILT_IN_STRCAT): Likewise.
8583 (BUILT_IN_STRCHR): Likewise.
8584 (BUILT_IN_STRCPY): Likewise.
8585 (BUILT_IN_STRLEN): Likewise.
8586 (BUILT_IN_MEMCPY_CHK): Likewise.
8587 (BUILT_IN_MEMMOVE_CHK): Likewise.
8588 (BUILT_IN_MEMPCPY_CHK): Likewise.
8589 (BUILT_IN_MEMSET_CHK): Likewise.
8590 (BUILT_IN_STPCPY_CHK): Likewise.
8591 (BUILT_IN_STRCAT_CHK): Likewise.
8592 (BUILT_IN_STRCPY_CHK): Likewise.
8593 * calls.c (store_bounds): Likewise.
8594 (emit_call_1): Likewise.
8595 (special_function_p): Likewise.
8596 (maybe_warn_nonstring_arg): Likewise.
8597 (initialize_argument_information): Likewise.
8598 (finalize_must_preallocate): Likewise.
8599 (compute_argument_addresses): Likewise.
8600 (expand_call): Likewise.
8601 * cfgexpand.c (expand_call_stmt): Likewise.
8602 (expand_return): Likewise.
8603 (expand_gimple_stmt_1): Likewise.
8604 (pass_expand::execute): Likewise.
8605 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
8606 (cgraph_node::remove): Likewise.
8607 (cgraph_node::dump): Likewise.
8608 (cgraph_node::verify_node): Likewise.
8609 * cgraph.h (chkp_function_instrumented_p): Likewise.
8610 (symtab_node::get_alias_target): Likewise.
8611 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
8612 (cgraph_local_p): Likewise.
8613 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
8614 (cgraph_edge::rebuild_references): Likewise.
8615 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
8616 (walk_polymorphic_call_targets): Likewise.
8617 (cgraph_node::expand_thunk): Likewise.
8618 (symbol_table::output_weakrefs): Likewise.
8619 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
8620 (ix86_handle_option): Likewise.
8621 * config/i386/constraints.md: Likewise.
8622 * config/i386/i386-builtin-types.def (BND): Likewise.
8626 * config/i386/i386-builtin.def (BDESC_END): Likewise.
8627 (BDESC_FIRST): Likewise.
8629 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
8630 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
8631 * config/i386/i386.c (enum reg_class): Likewise.
8632 (ix86_target_string): Likewise.
8633 (ix86_option_override_internal): Likewise.
8634 (ix86_conditional_register_usage): Likewise.
8635 (ix86_valid_target_attribute_inner_p): Likewise.
8636 (ix86_set_indirect_branch_type): Likewise.
8637 (ix86_set_current_function): Likewise.
8638 (ix86_function_arg_regno_p): Likewise.
8639 (init_cumulative_args): Likewise.
8640 (ix86_function_arg_advance): Likewise.
8641 (ix86_function_arg): Likewise.
8642 (ix86_pass_by_reference): Likewise.
8643 (ix86_function_value_regno_p): Likewise.
8644 (ix86_function_value_1): Likewise.
8645 (ix86_function_value_bounds): Likewise.
8646 (ix86_return_in_memory): Likewise.
8647 (ix86_setup_incoming_vararg_bounds): Likewise.
8648 (ix86_va_start): Likewise.
8649 (indirect_thunk_need_prefix): Likewise.
8650 (print_reg): Likewise.
8651 (ix86_print_operand): Likewise.
8652 (ix86_expand_call): Likewise.
8653 (ix86_output_function_return): Likewise.
8654 (reg_encoded_number): Likewise.
8655 (BDESC_VERIFYS): Likewise.
8656 (ix86_init_mpx_builtins): Likewise.
8657 (ix86_init_builtins): Likewise.
8658 (ix86_emit_cmove): Likewise.
8659 (ix86_emit_move_max): Likewise.
8660 (ix86_expand_builtin): Likewise.
8661 (ix86_builtin_mpx_function): Likewise.
8662 (ix86_get_arg_address_for_bt): Likewise.
8663 (ix86_load_bounds): Likewise.
8664 (ix86_store_bounds): Likewise.
8665 (ix86_load_returned_bounds): Likewise.
8666 (ix86_store_returned_bounds): Likewise.
8667 (ix86_class_likely_spilled_p): Likewise.
8668 (ix86_hard_regno_mode_ok): Likewise.
8669 (x86_order_regs_for_local_alloc): Likewise.
8670 (ix86_mitigate_rop): Likewise.
8671 (ix86_bnd_prefixed_insn_p): Likewise.
8672 (ix86_mpx_bound_mode): Likewise.
8673 (ix86_make_bounds_constant): Likewise.
8674 (ix86_initialize_bounds): Likewise.
8675 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
8676 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
8677 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
8678 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
8679 (TARGET_CHKP_BOUND_MODE): Likewise.
8680 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
8681 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
8682 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
8683 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
8684 * config/i386/i386.h (TARGET_MPX): Likewise.
8685 (TARGET_MPX_P): Likewise.
8686 (VALID_BND_REG_MODE): Likewise.
8687 (FIRST_BND_REG): Likewise.
8688 (LAST_BND_REG): Likewise.
8689 (enum reg_class): Likewise.
8690 (BND_REG_P): Likewise.
8691 (BND_REGNO_P): Likewise.
8692 (BNDmode): Likewise.
8693 (ADJUST_INSN_LENGTH): Likewise.
8694 * config/i386/i386.md: Likewise.
8695 * config/i386/i386.opt: Likewise.
8696 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
8697 (defined): Likewise.
8698 (LINK_MPX): Likewise.
8699 (MPX_SPEC): Likewise.
8700 (LIBMPX_SPEC): Likewise.
8701 (LIBMPXWRAPPERS_SPEC): Likewise.
8702 (CHKP_SPEC): Likewise.
8703 * config/i386/predicates.md: Likewise.
8704 * dbxout.c (dbxout_type): Likewise.
8705 * doc/extend.texi: Likewise.
8706 * doc/invoke.texi: Likewise.
8707 * doc/md.texi: Likewise.
8708 * doc/tm.texi: Likewise.
8709 * doc/tm.texi.in: Likewise.
8710 * dwarf2out.c (is_base_type): Likewise.
8711 (gen_formal_types_die): Likewise.
8712 (gen_subprogram_die): Likewise.
8713 (gen_type_die_with_usage): Likewise.
8714 (gen_decl_die): Likewise.
8715 (dwarf2out_late_global_decl): Likewise.
8716 * expr.c (expand_assignment): Likewise.
8717 (emit_storent_insn): Likewise.
8718 (store_expr_with_bounds): Likewise.
8719 (store_expr): Likewise.
8720 (expand_expr_real_1): Likewise.
8721 * expr.h (store_expr_with_bounds): Likewise.
8722 * function.c (use_register_for_decl): Likewise.
8723 (struct bounds_parm_data): Likewise.
8724 (assign_parms_augmented_arg_list): Likewise.
8725 (assign_parm_find_entry_rtl): Likewise.
8726 (assign_parm_is_stack_parm): Likewise.
8727 (assign_parm_load_bounds): Likewise.
8728 (assign_bounds): Likewise.
8729 (assign_parms): Likewise.
8730 (expand_function_start): Likewise.
8731 * gcc.c (CHKP_SPEC): Likewise.
8732 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
8733 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
8734 (wrestrict_dom_walker::check_call): Likewise.
8735 * gimple.c (gimple_build_call_from_tree): Likewise.
8736 * gimple.h (enum gf_mask): Likewise.
8737 (gimple_call_with_bounds_p): Likewise.
8738 (gimple_call_set_with_bounds): Likewise.
8739 * gimplify.c (gimplify_init_constructor): Likewise.
8740 * ipa-cp.c (initialize_node_lattices): Likewise.
8741 (propagate_constants_across_call): Likewise.
8742 (find_more_scalar_values_for_callers_subset): Likewise.
8743 * ipa-hsa.c (process_hsa_functions): Likewise.
8744 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
8745 * ipa-icf.c (sem_function::merge): Likewise.
8746 * ipa-inline.c (early_inliner): Likewise.
8747 * ipa-pure-const.c (warn_function_noreturn): Likewise.
8748 (warn_function_cold): Likewise.
8749 (propagate_pure_const): Likewise.
8750 * ipa-ref.h (enum GTY): Likewise.
8751 * ipa-split.c (find_retbnd): Likewise.
8752 (consider_split): Likewise.
8753 (split_function): Likewise.
8754 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
8755 * ipa.c (walk_polymorphic_call_targets): Likewise.
8756 (symbol_table::remove_unreachable_nodes): Likewise.
8757 (process_references): Likewise.
8758 (cgraph_build_static_cdtor_1): Likewise.
8759 * lto-cgraph.c (lto_output_node): Likewise.
8760 (output_refs): Likewise.
8761 (compute_ltrans_boundary): Likewise.
8762 (input_overwrite_node): Likewise.
8763 (input_node): Likewise.
8764 (input_cgraph_1): Likewise.
8765 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
8766 * passes.c (pass_manager::execute_early_local_passes): Likewise.
8767 (class pass_chkp_instrumentation_passes): Likewise.
8768 (make_pass_chkp_instrumentation_passes): Likewise.
8769 * passes.def: Likewise.
8770 * rtl.h (struct GTY): Likewise.
8771 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
8772 * stor-layout.c (layout_type): Likewise.
8773 * symtab.c: Likewise.
8774 * target.def: Likewise.
8775 * targhooks.c (default_chkp_bound_type): Likewise.
8776 (default_chkp_bound_mode): Likewise.
8777 (default_builtin_chkp_function): Likewise.
8778 (default_chkp_function_value_bounds): Likewise.
8779 (default_chkp_make_bounds_constant): Likewise.
8780 (default_chkp_initialize_bounds): Likewise.
8781 * targhooks.h (default_chkp_bound_type): Likewise.
8782 (default_chkp_bound_mode): Likewise.
8783 (default_builtin_chkp_function): Likewise.
8784 (default_chkp_function_value_bounds): Likewise.
8785 (default_chkp_make_bounds_constant): Likewise.
8786 (default_chkp_initialize_bounds): Likewise.
8787 * toplev.c (compile_file): Likewise.
8788 (process_options): Likewise.
8789 * tree-core.h (DEF_BUILTIN): Likewise.
8790 (DEF_BUILTIN_CHKP): Likewise.
8791 * tree-inline.c (declare_return_variable): Likewise.
8792 (remap_gimple_stmt): Likewise.
8793 (copy_bb): Likewise.
8794 (initialize_inlined_parameters): Likewise.
8795 (expand_call_inline): Likewise.
8796 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
8797 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
8798 (make_pass_ipa_chkp_produce_thunks): Likewise.
8799 (make_pass_chkp): Likewise.
8800 (make_pass_chkp_opt): Likewise.
8801 (make_pass_chkp_instrumentation_passes): Likewise.
8802 * tree-pretty-print.c (dump_generic_node): Likewise.
8803 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
8804 * tree-ssa-dce.c (propagate_necessity): Likewise.
8805 (eliminate_unnecessary_stmts): Likewise.
8806 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
8807 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
8808 * tree-ssa-sccvn.h: Likewise.
8809 * tree-ssa-strlen.c (get_string_length): Likewise.
8810 (valid_builtin_call): Likewise.
8811 (adjust_last_stmt): Likewise.
8812 (handle_builtin_strchr): Likewise.
8813 (handle_builtin_strcpy): Likewise.
8814 (handle_builtin_stxncpy): Likewise.
8815 (handle_builtin_memcpy): Likewise.
8816 (handle_builtin_strcat): Likewise.
8817 (strlen_check_and_optimize_stmt): Likewise.
8818 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
8819 * tree-streamer-in.c: Likewise.
8820 * tree-streamer.c (record_common_node): Likewise.
8821 * tree.c (tree_code_size): Likewise.
8822 (wide_int_to_tree_1): Likewise.
8823 (type_contains_placeholder_1): Likewise.
8824 (build_common_tree_nodes): Likewise.
8825 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
8826 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
8827 (POINTER_BOUNDS_P): Likewise.
8828 (BOUNDED_TYPE_P): Likewise.
8829 (BOUNDED_P): Likewise.
8830 (CALL_WITH_BOUNDS_P): Likewise.
8831 (pointer_bounds_type_node): Likewise.
8832 * value-prof.c (gimple_ic): Likewise.
8833 * var-tracking.c (vt_add_function_parameters): Likewise.
8834 * varasm.c (make_decl_rtl): Likewise.
8835 (assemble_start_function): Likewise.
8836 (output_constant): Likewise.
8837 (maybe_assemble_visibility): Likewise.
8838 * varpool.c (ctor_for_folding): Likewise.
8839 * chkp-builtins.def: Remove.
8840 * ipa-chkp.c: Remove.
8841 * ipa-chkp.h: Remove.
8842 * rtl-chkp.c: Remove.
8843 * rtl-chkp.h: Remove.
8844 * tree-chkp-opt.c: Remove.
8845 * tree-chkp.c: Remove.
8846 * tree-chkp.h: Remove.
8848 2018-06-07 Carl Love <cel@us.ibm.com>
8850 * config/rs6000/vsx.md (vextract_fp_from_shorth,
8851 vextract_fp_from_shortl): Add BE support.
8853 2018-06-07 Paul Koning <ni1d@arrl.net>
8855 * compare-elim.c (try_merge_compare): Don't merge compare if
8856 address contains a side effect.
8857 (try_eliminate_compare): Likewise.
8859 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
8861 * config.gcc: Support "tremont".
8862 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
8863 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8865 * config/i386/i386.c (m_TREMONT): Define.
8866 (processor_target_table): Add "tremont".
8867 (PTA_TREMONT): Define.
8868 (ix86_lea_outperforms): Add TARGET_TREMONT.
8869 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
8870 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
8871 and M_INTEL_GOLDMONT_PLUS.
8872 (fold_builtin_cpu): Add "tremont".
8873 (ix86_add_stmt_cost): Add TARGET_TREMONT.
8874 (ix86_option_override_internal): Add "tremont".
8875 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
8876 (processor_type): Add PROCESSOR_TREMONT.
8877 * config/i386/x86-tune.def: Add m_TREMONT.
8878 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
8880 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8882 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
8883 symbol defined for msp430i* devices to be lower case.
8885 2018-06-07 Richard Biener <rguenther@suse.de>
8887 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
8888 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
8889 Properly wrap signed arithmetic if overflow wraps.
8891 2018-06-07 Jakub Jelinek <jakub@redhat.com>
8893 PR tree-optimization/69615
8894 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
8895 of a cast from a same precision integral SSA_NAME in a bb dominated
8896 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
8897 cast to utype if rhs2 has already a compatible type.
8899 2018-06-07 Richard Biener <rguenther@suse.de>
8901 PR tree-optimization/85935
8902 * graphite-scop-detection.c (find_params_in_bb): Analyze
8903 condition operands with respect to the correct loop. Assert
8904 the analysis doesn't fail.
8906 2018-06-04 Carl Love <cel@us.ibm.com>
8908 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
8909 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
8910 as it is slightly cheaper.
8911 (first_match_or_eos_index_<mode>):
8912 Calculate index using natural element order.
8913 (first_match_index_<mode>):
8914 Calculate index using natural element order.
8915 (first_match_or_eos_index_<mode>):
8916 Calculate index using natural order.
8917 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
8918 for BE and LE modes.
8919 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
8920 P9V_BUILTIN_VCLZLSBB_V16QI.
8921 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
8924 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
8926 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
8927 indentation and line wrap for many prototypes. Add missing
8928 @smallexample directives around block of prototypes for vec_xl and
8931 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
8933 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
8934 track if we pass or return IEEE 128-bit floating point.
8935 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
8936 C++ mangling that is compatible with GCC 8.1.
8937 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
8938 (init_cumulative_args): Note if we pass or return IEEE 128-bit
8939 floating point types.
8940 (rs6000_function_arg_advance_1): Likewise.
8941 (rs6000_mangle_type): Optionally generate mangled names that match
8942 what GCC 8.1 generated for IEEE 128-bit floating point types.
8943 (rs6000_globalize_decl_name): If we have an external function that
8944 passes or returns IEEE 128-bit types, generate a weak reference
8945 from the mangled name used in GCC 8.1 to the current mangled
8947 (rs6000_init_builtins): Make __ibm128 use the long double type if
8948 long double is IBM extended double. Make __float128 use the long
8949 double type if long double is IEEE 128-bit.
8952 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
8953 macro for __ibm128 built-in functions.
8954 (PACK_IF): Add __ibm128 pack/unpack functions.
8955 (UNPACK_IF): Likewise.
8956 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
8957 enable long double built-in functions if long double is IEEE
8958 128-bit floating point.
8959 (rs6000_invalid_builtin): Update long double built-in function
8961 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
8962 functions, adjust the built-in function to use the long double
8963 built-in function if __ibm128 and long double are the same type.
8964 * doc/extend.texi (PowerPC builtins): Update documention for
8965 __builtin_{,un}pack_longdouble. Add documentation for
8966 __builtin_{,un}pack_ibm128.
8968 2018-06-06 Jim Wilson <jimw@sifive.com>
8970 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
8971 (struct machine_function): New field interrupt_mode.
8972 (riscv_handle_type_attribute): New function. Add forward declaration.
8973 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
8974 (riscv_expand_epilogue): Check interrupt_mode field.
8975 (riscv_set_current_function): Check interrupt attribute args and
8976 set interrupt_mode field.
8977 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
8978 (riscv_sret, riscv_uret): New.
8979 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
8980 new arguments to interrupt attribute.
8982 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
8985 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
8986 Don't handle -mcpu=power8 if -mpower9-vector is also used.
8988 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
8990 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
8991 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
8992 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
8993 several redundant entries.
8995 2018-06-06 David Malcolm <dmalcolm@redhat.com>
8997 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
8998 type from "rtx" to "rtx_insn *".
8999 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
9000 for local "call_insn", removing cast.
9001 (ix86_expand_call): Likewise, introducing a "call_insn" local.
9003 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
9005 PR tree-optimization/86066
9006 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
9007 for BIT_INSERT_EXPR stores.
9009 2018-06-06 Richard Biener <rguenther@suse.de>
9011 PR tree-optimization/86062
9012 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
9013 component refs ontop
9014 of to be offsetted base.
9016 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9018 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
9019 to be static and remove check on interrupt attribute name.
9021 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
9023 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
9024 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
9026 2018-06-05 Steve Ellcey <sellcey@cavium.com>
9029 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
9031 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
9032 Remove second argument, change how error is called.
9033 (aarch64_layout_arg): Remove second argument from
9034 aarch64_err_no_fpadvsimd call.
9035 (aarch64_init_cumulative_args): Ditto.
9036 (aarch64_gimplify_va_arg_expr): Ditto.
9037 * config/aarch64/aarch64.md (mov<mode>): Ditto.
9039 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
9041 * config/i386/i386.md (simple_return_indirect_internal): New expander.
9042 (*simple_return_indirect_internal<mode>): Rename from
9043 simple_return_indirect_internal. Use W mode iterator.
9044 (rstorssp): New expander.
9045 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
9046 (clrssbsy): New expander.
9047 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
9049 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
9051 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
9053 (cmse_check_pointed_object): Likewise.
9055 2018-06-05 Martin Liska <mliska@suse.cz>
9057 PR gcov-profile/47618
9058 * doc/invoke.texi: Document how -fprofile-dir format
9061 2018-06-05 Richard Biener <rguenther@suse.de>
9063 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
9064 removal pretend DOM info isn't available so we do not update
9065 it and only remove edges, not dominated blocks. Actually free
9066 DOM info in case we removed something. Remove unreachable blocks.
9067 (mfb_keep_latches): Work with either DOM info or marked backedges.
9068 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
9069 first. Mark backedges if DOM info isn't available.
9070 (Re-)compute DOM info after cleanup_control_flow_pre.
9072 2018-06-05 Richard Biener <rguenther@suse.de>
9074 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
9075 (locus_discrim_hasher::hash): Adjust.
9076 (locus_discrim_hasher::equal): Likewise.
9077 (next_discriminator_for_locus): Work on line directly.
9078 (same_line_p): Pass in expanded locus1 as well.
9079 (assign_discriminators): Avoid redundant location expansions.
9081 2018-06-05 Richard Biener <rguenther@suse.de>
9083 PR tree-optimization/86046
9084 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
9085 if required after clearing TREE_ADDRESSABLE.
9087 2018-06-05 Richard Biener <rguenther@suse.de>
9089 PR tree-optimization/86047
9090 * tree-ssa-loop.c (for_each_index): Glob handling of all
9091 decls and constants and really handle all of them.
9093 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9096 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
9097 qualifier_void_pointer and qualifier_const_void_pointer.
9098 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
9099 (arm_init_builtins): Handle the above.
9100 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
9101 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
9102 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
9105 2018-06-05 Martin Liska <mliska@suse.cz>
9107 * auto-profile.c (read_autofdo_file): Do not use
9108 gcov_ctr_summary struct.
9109 (afdo_callsite_hot_enough_for_early_inline): Likewise.
9110 * coverage.c (struct counts_entry): Likewise.
9111 (read_counts_file): Read just single summary entry.
9112 (get_coverage_counts): Use gcov_summary struct.
9113 * coverage.h (get_coverage_counts): Likewise.
9114 * gcov-dump.c (dump_working_sets): Likewise.
9115 (tag_summary): Dump just single summary.
9116 * gcov-io.c (gcov_write_summary): Write just histogram
9118 (gcov_read_summary): Read just single summary.
9119 (compute_working_sets): Use gcov_summary struct.
9120 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
9121 of GCOV_COUNTERS_SUMMABLE.
9122 (GCOV_COUNTERS_SUMMABLE): Remove.
9123 (GCOV_FIRST_VALUE_COUNTER): Replace with
9124 GCOV_COUNTER_V_INTERVAL.
9125 (struct gcov_ctr_summary): Remove.
9126 (struct gcov_summary): Directly use fields of former
9128 (compute_working_sets): Use gcov_summary struct.
9129 * gcov.c (read_count_file): Do not use ctrs fields.
9130 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
9132 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
9134 * profile.c: Likewise.
9135 * profile.h: Likewise.
9137 2018-06-05 Martin Liska <mliska@suse.cz>
9139 PR gcov-profile/84846
9140 * gcov.c (output_lines): Print working directory only
9141 in intermediate format.
9143 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
9145 * config/s390/s390-builtin-types.def: Add void function type.
9146 * config/s390/s390-builtins.def: Use the function type for the
9149 2018-06-04 Jim Wilson <jimw@sifive.com>
9151 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
9153 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
9154 and maybe_eh_return. Change regno to unsigned int. Use new args to
9155 handle EH_RETURN_DATA_REGNO registers properly.
9156 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
9157 (riscv_expand_epilogue): Update comment. Change argument name and
9158 type. Update code to use new name and type. Pass new args to
9159 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
9161 * config/riscv/riscv.md (NORMAL_RETURN): New.
9162 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
9163 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
9164 (eh_return): Call gen_eh_return_internal and emit barrier.
9165 (eh_return_internal): Call riscv_expand_epilogue.
9167 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
9169 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
9170 bit_insertion field and declare can_be_merged_into method.
9171 (merged_store_group::can_be_merged_into): New method.
9172 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
9173 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
9174 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
9176 2018-06-04 Richard Biener <rguenther@suse.de>
9178 PR tree-optimization/85955
9179 * builtins.c (fold_builtin_sincos): Convert pointers to
9180 destination to appropriate type before dereferencing.
9182 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
9184 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
9186 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
9188 * expr.c (expand_expr_real_1): Force the operand into memory if
9189 its TYPE_MODE is BLKmode and if there is no integer mode for
9190 the number of bits being extracted.
9192 2018-06-04 Jakub Jelinek <jakub@redhat.com>
9196 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
9197 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
9199 2018-06-04 Richard Biener <rguenther@suse.de>
9201 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
9202 (cleanup_tree_cfg_noloop): ... single caller. Do
9203 start_recording_case_labels later.
9205 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
9207 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
9208 to _IMMINTRIN_H_INCLUDED.
9209 * config/i386/pconfigintrin.h: Ditto.
9210 * config/i386/waitpkgintrin.h: Ditto.
9211 * config/i386/immintrin.h: Add includes for sgxintrin.h,
9212 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
9213 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
9214 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
9215 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
9216 waitpkgintrin.h and cldemoteintrin.h.
9218 2018-06-04 Richard Biener <rguenther@suse.de>
9220 PR tree-optimization/86038
9221 * tracer.c (find_best_successor): Check probability for
9222 being initialized, bail out if not.
9224 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
9227 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
9228 of bits to ignore when comparing architectures.
9230 2018-06-04 Jakub Jelinek <jakub@redhat.com>
9232 PR tree-optimization/69615
9233 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
9234 maximum or minimum of the type, try to merge it also as if
9235 range1 is + [-, x - 1] or + [x + 1, -].
9238 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
9240 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
9242 PR tree-optimization/86034
9243 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
9244 the unsigned bitfield type in a bit insertion sequence if it does not
9245 have a larger precision than the bitfield size.
9246 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
9248 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
9250 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
9252 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
9254 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
9255 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
9256 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
9257 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
9259 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
9261 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
9262 Disable -fdelete-null-pointer-checks for ELF toolchain.
9264 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
9265 Kito Cheng <kito.cheng@gmail.com>
9267 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
9268 (nds32le-*-*, nds32be-*-*): Integrate checking process.
9269 (nds32*-*-*): Add glibc and uclibc conditions.
9270 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
9271 (TARGET_EXCEPT_UNWIND_INFO): Define.
9272 * config/nds32/elf.h: New file.
9273 * config/nds32/linux.h: New file.
9274 * config/nds32/nds32-elf.opt: New file.
9275 * config/nds32/nds32-linux.opt: New file.
9276 * config/nds32/nds32-fp-as-gp.c
9277 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
9278 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
9280 (nds32_asm_file_end): Ditto.
9281 (nds32_print_operand): Ditto.
9282 (nds32_insert_attributes): Ditto.
9283 (nds32_init_libfuncs): New function.
9284 (TARGET_HAVE_TLS): Define.
9285 (TARGET_INIT_LIBFUNCS): Define.
9286 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
9288 (TARGET_ELF): Apply different mcmodel setting.
9289 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
9290 been migrated into elf.h and linux.h files.
9291 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
9292 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
9293 (mcmodel): The content has been migrated into nds32-elf.opt and
9294 nds32-linux.opt files.
9295 * config/nds32/t-elf: New file.
9296 * config/nds32/t-linux: New file.
9298 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
9299 Shiva Chen <shiva0217@gmail.com>
9301 * config/nds32/constants.md (unspec_volatile_element): Add
9302 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
9303 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
9305 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
9306 (make_pass_nds32_fp_as_gp): Declare.
9307 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
9309 (nds32_asm_function_end_prologue): Remove unused asm output.
9310 (nds32_asm_function_begin_epilogue): Remove unused asm output.
9311 (nds32_asm_file_start): Output necessary fp_as_gp information.
9312 (nds32_option_override): Adjust register usage.
9313 (nds32_expand_prologue): Consider fp_as_gp situation.
9314 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
9315 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
9318 (simple_return): Ditto.
9319 (omit_fp_begin): Output special directive for fp_as_gp.
9320 (omit_fp_end): Output special directive for fp_as_gp.
9321 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
9322 mforbid-fp-as-gp): New options.
9324 2018-06-01 Mark Wielaard <mark@klomp.org>
9326 * dwarf2out.c (dwarf2out_finish): Remove generation of
9327 DW_AT_loclists_base.
9329 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
9331 * gimple-ssa-store-merging.c: Include gimple-fold.h.
9332 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
9333 (struct merged_store_group): Add bit_insertion field.
9334 (dump_char_array): Use standard hexadecimal format.
9335 (merged_store_group::merged_store_group): Set bit_insertion to false.
9336 (merged_store_group::apply_stores): Use optimal buffer size. Deal
9337 with BIT_INSERT_EXPR stores. Move up code updating the mask and
9338 also print the mask in the dump file.
9339 (pass_store_merging::gate): Minor tweak.
9340 (imm_store_chain_info::coalesce_immediate): Fix wrong association
9341 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
9342 stores with INTEGER_CST stores.
9343 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
9344 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
9345 and use it throughout. Generate bit insertion sequences if need be.
9346 (pass_store_merging::process_store): Remove redundant condition.
9347 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
9349 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
9351 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
9352 the 128-bit floating point types. Fix function comment.
9354 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9356 * config/aarch64/aarch64-simd.md
9357 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
9359 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
9362 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
9364 PR tree-optimization/85989
9365 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
9367 (backprop::intersect_uses): Check it when deciding whether this
9368 is a backedge reference.
9369 (backprop::process_block): Add each phi to m_visited_phis
9370 after visiting it, then clear it at the end.
9372 2018-06-01 Richard Biener <rguenther@suse.de>
9374 * tree-vectorizer.h (vect_dr_stmt): New function.
9375 (vect_get_load_cost): Adjust.
9376 (vect_get_store_cost): Likewise.
9377 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
9378 Use vect_dr_stmt instead of DR_SMTT.
9379 (vect_record_base_alignments): Likewise.
9380 (vect_calculate_target_alignment): Likewise.
9381 (vect_compute_data_ref_alignment): Likewise and make static.
9382 (vect_update_misalignment_for_peel): Likewise.
9383 (vect_verify_datarefs_alignment): Likewise.
9384 (vector_alignment_reachable_p): Likewise.
9385 (vect_get_data_access_cost): Likewise. Pass down
9386 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
9387 (vect_get_peeling_costs_all_drs): Likewise.
9388 (vect_peeling_hash_get_lowest_cost): Likewise.
9389 (vect_enhance_data_refs_alignment): Likewise.
9390 (vect_find_same_alignment_drs): Likewise.
9391 (vect_analyze_data_refs_alignment): Likewise.
9392 (vect_analyze_group_access_1): Likewise.
9393 (vect_analyze_group_access): Likewise.
9394 (vect_analyze_data_ref_access): Likewise.
9395 (vect_analyze_data_ref_accesses): Likewise.
9396 (vect_vfa_segment_size): Likewise.
9397 (vect_small_gap_p): Likewise.
9398 (vectorizable_with_step_bound_p): Likewise.
9399 (vect_prune_runtime_alias_test_list): Likewise.
9400 (vect_analyze_data_refs): Likewise.
9401 (vect_supportable_dr_alignment): Likewise.
9402 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
9403 (vect_gen_prolog_loop_niters): Likewise.
9404 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
9405 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
9407 (vect_recog_mask_conversion_pattern): Likewise.
9408 (vect_try_gather_scatter_pattern): Likewise.
9409 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
9410 to vect_get_store_cost.
9411 (vect_get_store_cost): Get stmt_info instead of DR.
9412 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
9413 (vect_get_load_cost): Get stmt_info instead of DR.
9415 2018-06-01 Richard Biener <rguenther@suse.de>
9418 * gimple-fold.c (var_decl_component_p): Also allow offsetted
9419 vars wrapped in MEM_REFs.
9421 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
9423 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
9424 Fix subreg tests so that we only return a choice between
9425 GENERAL_REGS and FP_REGS if the original classes included both.
9427 2018-06-01 Richard Biener <rguenther@suse.de>
9430 * tree-ssa-structalias.c (get_function_part_constraint):
9431 Handle NULL fi->decl.
9432 (find_func_aliases_for_call): Properly handle indirect
9433 fi from direct call.
9434 (find_func_clobbers): Likewise.
9435 (ipa_pta_execute): Likewise.
9436 (create_variable_info_for): For functions that are ifunc_resolver
9437 resolve to a varinfo that contains the result of the resolver call.
9438 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
9441 2018-05-31 Michael Collison <michael.collison@arm.com>
9443 * config/aarch64/aarch64.md:
9444 (*fix_to_zero_extenddfdi2): New pattern.
9445 * gcc.target/aarch64/fix_extend1.c: New testcase.
9447 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
9451 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
9452 and BUILT_IN_STRNCMP_EQ.
9453 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
9454 BUILT_IN_STRNCMP_EQ.
9455 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
9456 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
9457 (gimple_fold_builtin): Likewise.
9458 * tree-ssa-strlen.c (compute_string_length): New function.
9459 (determine_min_obsize): New function.
9460 (handle_builtin_string_cmp): New function to handle calls to
9461 string compare functions.
9462 (strlen_optimize_stmt): Add handling to builtin string compare
9464 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
9465 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
9466 * tree.c (build_common_builtin_nodes): Add new defines of
9467 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
9469 2018-05-31 Jakub Jelinek <jakub@redhat.com>
9472 * bb-reorder.c (pass_partition_blocks::gate): Return false for
9473 functions with naked attribute.
9475 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
9477 * config/i386/sse.md (avx_vec_concat<mode>):
9478 Substitute concat_tg_mode mode attribute with xtg_mode.
9479 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
9480 (concat_tg_mode): Remove mode attribute.
9482 2018-05-31 Martin Sebor <msebor@redhat.com>
9485 * calls.c (alloc_max_size): Correct a logic error/typo.
9486 Treat excessive arguments as infinite. Warn for invalid arguments.
9487 * doc/invoke.texi (-Walloc-size-larger-than): Update.
9489 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
9492 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
9493 and movx for Haswell.
9495 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
9496 Cesar Philippidis <cesar@codesourcery.com>
9499 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
9500 when emitting error on private/firstprivate reductions.
9501 * omp-low.c (lower_omp_target): Avoid reference-type processing
9502 on pointers for firstprivate clause.
9504 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
9506 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
9509 * config/aarch64/aarch64-simd.md
9510 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
9511 (aarch64_ld1_x3_<mode>): Likewise
9512 (aarch64_st1x2<VALLDIF:mode>): Likewise
9513 (aarch64_st1_x2_<mode>): Likewise
9514 (aarch64_st1x3<VALLDIF:mode>): Likewise
9515 (aarch64_st1_x3_<mode>): Likewise
9516 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
9517 (vld1_s8_x3): Likewise.
9518 (vld1_u16_x3): Likewise.
9519 (vld1_s16_x3): Likewise.
9520 (vld1_u32_x3): Likewise.
9521 (vld1_s32_x3): Likewise.
9522 (vld1_u64_x3): Likewise.
9523 (vld1_s64_x3): Likewise.
9524 (vld1_f16_x3): Likewise.
9525 (vld1_f32_x3): Likewise.
9526 (vld1_f64_x3): Likewise.
9527 (vld1_p8_x3): Likewise.
9528 (vld1_p16_x3): Likewise.
9529 (vld1_p64_x3): Likewise.
9530 (vld1q_u8_x3): Likewise.
9531 (vld1q_s8_x3): Likewise.
9532 (vld1q_u16_x3): Likewise.
9533 (vld1q_s16_x3): Likewise.
9534 (vld1q_u32_x3): Likewise.
9535 (vld1q_s32_x3): Likewise.
9536 (vld1q_u64_x3): Likewise.
9537 (vld1q_s64_x3): Likewise.
9538 (vld1q_f16_x3): Likewise.
9539 (vld1q_f32_x3): Likewise.
9540 (vld1q_f64_x3): Likewise.
9541 (vld1q_p8_x3): Likewise.
9542 (vld1q_p16_x3): Likewise.
9543 (vld1q_p64_x3): Likewise.
9544 (vst1_s64_x2): Likewise.
9545 (vst1_u64_x2): Likewise.
9546 (vst1_f64_x2): Likewise.
9547 (vst1_s8_x2): Likewise.
9548 (vst1_p8_x2): Likewise.
9549 (vst1_s16_x2): Likewise.
9550 (vst1_p16_x2): Likewise.
9551 (vst1_s32_x2): Likewise.
9552 (vst1_u8_x2): Likewise.
9553 (vst1_u16_x2): Likewise.
9554 (vst1_u32_x2): Likewise.
9555 (vst1_f16_x2): Likewise.
9556 (vst1_f32_x2): Likewise.
9557 (vst1_p64_x2): Likewise.
9558 (vst1q_s8_x2): Likewise.
9559 (vst1q_p8_x2): Likewise.
9560 (vst1q_s16_x2): Likewise.
9561 (vst1q_p16_x2): Likewise.
9562 (vst1q_s32_x2): Likewise.
9563 (vst1q_s64_x2): Likewise.
9564 (vst1q_u8_x2): Likewise.
9565 (vst1q_u16_x2): Likewise.
9566 (vst1q_u32_x2): Likewise.
9567 (vst1q_u64_x2): Likewise.
9568 (vst1q_f16_x2): Likewise.
9569 (vst1q_f32_x2): Likewise.
9570 (vst1q_f64_x2): Likewise.
9571 (vst1q_p64_x2): Likewise.
9572 (vst1_s64_x3): Likewise.
9573 (vst1_u64_x3): Likewise.
9574 (vst1_f64_x3): Likewise.
9575 (vst1_s8_x3): Likewise.
9576 (vst1_p8_x3): Likewise.
9577 (vst1_s16_x3): Likewise.
9578 (vst1_p16_x3): Likewise.
9579 (vst1_s32_x3): Likewise.
9580 (vst1_u8_x3): Likewise.
9581 (vst1_u16_x3): Likewise.
9582 (vst1_u32_x3): Likewise.
9583 (vst1_f16_x3): Likewise.
9584 (vst1_f32_x3): Likewise.
9585 (vst1_p64_x3): Likewise.
9586 (vst1q_s8_x3): Likewise.
9587 (vst1q_p8_x3): Likewise.
9588 (vst1q_s16_x3): Likewise.
9589 (vst1q_p16_x3): Likewise.
9590 (vst1q_s32_x3): Likewise.
9591 (vst1q_s64_x3): Likewise.
9592 (vst1q_u8_x3): Likewise.
9593 (vst1q_u16_x3): Likewise.
9594 (vst1q_u32_x3): Likewise.
9595 (vst1q_u64_x3): Likewise.
9596 (vst1q_f16_x3): Likewise.
9597 (vst1q_f32_x3): Likewise.
9598 (vst1q_f64_x3): Likewise.
9599 (vst1q_p64_x3): Likewise.
9601 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9603 * config/msp430/msp430.c (msp430_output_labelref): Prepend
9604 user_label_prefix to name.
9606 * tree-core.h: Update comment about the format of NAME string
9607 passed to handler in attribute_spec.
9609 * config/msp430/msp430.md: Remove erroneous subreg expression from
9610 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
9611 zero_extend{q,h}isi2.
9613 2018-05-30 Borislav Petkov <bp@suse.de>
9615 * doc/extend.texi: Document some architecture specific
9616 constraints and sort entries.
9618 2018-05-30 Martin Sebor <msebor@redhat.com>
9621 * builtins.c (expand_builtin_stpcpy_1): New function.
9622 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
9623 only if the former succeeds.
9625 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
9627 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
9630 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9632 * doc/invoke.texi (-flinker-output): Document
9634 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9636 * passes.c (ipa_write_summaries): Only modify statements if body
9638 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
9639 incrementally linking.
9640 (ipa_passes): Likewise.
9641 * lto-cgraph.c (lto_output_node): When incrementally linking do not
9642 pass down resolution info.
9643 * common.opt (flag_incremental_link): Update info.
9644 * gcc.c (plugin specs): Turn flinker-output=* to
9645 -plugin-opt=-linker-output-known
9646 * toplev.c (compile_file): Also cut compilation when doing incremental
9648 * flag-types. (enum lto_partition_model): Add
9649 LTO_LINKER_OUTPUT_NOLTOREL.
9650 (invoke.texi): Add -flinker-output docs.
9651 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
9652 link same way as WPA; do not stream in dead initializers.
9654 * dwarf2out.c (dwarf2out_die_ref_for_decl,
9655 darf2out_register_external_decl): Support incremental link.
9657 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9659 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
9661 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9663 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
9664 it down to simple_object_copy_lto_debug_sections.
9665 (run_gcc): Determine incremental LTO link time and configure
9666 lto1 into non-wpa mode, disable renaming of debug sections.
9668 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
9670 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
9671 descriptions of various incorrectly documented functions.
9673 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
9676 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9677 address check not strict.
9679 2018-05-30 Richard Biener <rguenther@suse.de>
9681 PR tree-optimization/85964
9682 * tracer.c (better_p): Drop initialized count check, we only
9683 call the function with initialized counts now.
9684 (find_best_successor): Do find a best edge if one
9685 has uninitialized count.
9686 (find_best_predecessor): Likewise. Do BB frequency check only
9687 if count is initialized.
9689 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
9691 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
9692 (aarch64_ldrstr_offset_compare): New.
9693 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
9694 load/store orderings.
9695 (aarch64_gen_adjusted_ldpstp): Likewise.
9697 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
9699 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
9700 Check for subset of GENERAL_REGS and FP_REGS.
9701 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
9704 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
9706 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
9707 and wi::to_poly_offset. Add the current offset and then check
9708 whether the sum fits, rather than using an unchecked addition of
9709 a checked term. Check for a shwi rather than a uhwi.
9710 * expr.c (get_bit_range): Use tree_to_poly_uint64.
9711 (store_constructor): Use poly_int_tree_p.
9712 (expand_expr_real_1): Likewise.
9713 * function.c (assign_temp): Likewise.
9714 * fold-const.c (const_binop): Use poly_int_tree_p and
9716 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
9718 * ipa-icf-gimple.c (func_checker::compare_operand): Use
9719 to_poly_offset for MEM offsets.
9720 * ipa-icf.c (sem_variable::equals): Likewise.
9721 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
9722 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
9723 wi::to_poly_offset for BIT_FIELD_REF offsets.
9724 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
9726 * var-tracking.c (emit_note_insn_var_location): Use
9727 tree_to_poly_uint64.
9729 2018-05-29 Jim Wilson <jimw@sifive.com>
9731 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
9733 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
9736 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
9737 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
9739 (sse4_1_round<mode>2): Use nonimmediate_operand
9740 for operand 1 predicate.
9742 2018-05-29 Martin Sebor <msebor@redhat.com>
9743 Richard Biener <rguenther@suse.de>
9746 * calls.c (get_size_range): Call determine_value_range instead
9747 of get_value_range..
9748 * tree-vrp.h (determine_value_range): Declared new function.
9749 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
9751 2018-05-29 Richard Biener <rguenther@suse.de>
9753 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
9754 sure to use non-pattern stmts for get_earlier_stmt arguments.
9755 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
9756 called on pattern stmts.
9757 (get_later_stmt): Likewise.
9759 2018-05-29 Martin Liska <mliska@suse.cz>
9761 PR gcov-profile/85759
9762 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
9765 2018-05-29 Jakub Jelinek <jakub@redhat.com>
9767 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
9769 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
9773 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
9774 VEC_PACK_FLOAT_EXPR): New tree codes.
9775 * tree-pretty-print.c (op_code_prio): Handle
9776 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
9777 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
9778 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
9779 * tree-inline.c (estimate_operator_cost): Likewise.
9780 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
9781 * fold-const.c (const_binop): Likewise.
9782 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
9783 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
9784 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
9785 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
9786 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
9787 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
9788 * expr.c (expand_expr_real_2): Likewise.
9789 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
9790 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
9791 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
9793 * optabs.c (expand_widen_pattern_expr): For
9794 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
9795 sign from result type rather than operand's type.
9796 (expand_binop_directly): For vec_packu_float_optab and
9797 vec_packs_float_optab allow result type to be different from operand's
9799 * optabs-tree.c (optab_for_tree_code): Handle
9800 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
9801 VEC_PACK_FLOAT_EXPR. Formatting fixes.
9802 * tree-vect-generic.c (expand_vector_operations_1): Handle
9803 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
9804 VEC_PACK_FLOAT_EXPR.
9805 * tree-vect-stmts.c (supportable_widening_operation): Handle
9807 (supportable_narrowing_operation): Handle FLOAT_EXPR.
9808 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
9809 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
9810 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
9811 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
9813 (vec_pack<floatprefix>_float_<mode>): New expander.
9814 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
9816 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
9817 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
9818 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
9819 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
9820 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
9822 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
9823 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
9824 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
9825 VEC_PACK_FLOAT_EXPR): Document.
9827 2018-05-29 Richard Biener <rguenther@suse.de>
9829 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
9831 (stmt_vec_info_vec): Make pointer.
9832 (init_stmt_vec_info_vec): Remove.
9833 (free_stmt_vec_info_vec): Likewise.
9834 (set_stmt_vec_info_vec): New function.
9835 (free_stmt_vec_infos): Likewise.
9836 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
9837 (set_vinfo_for_stmt): Likewise.
9838 (get_earlier_stmt): Likewise.
9839 (get_later_stmt): Likewise.
9840 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
9841 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
9842 (vec_info::~vec_info): Free stmt_vec_infos.
9843 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
9844 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
9845 (pass_slp_vectorize::execute): Likewise.
9846 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
9847 (free_stmt_vec_info_vec): Likewise.
9848 (set_stmt_vec_info_vec): New function.
9849 (free_stmt_vec_infos): Likewise.
9850 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
9851 the global stmt_vec_info_vec.
9852 * tree-parloops.c (gather_scalar_reductions): Use
9853 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
9856 2018-05-29 Richard Biener <rguenther@suse.de>
9858 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
9860 2018-05-29 Martin Liska <mliska@suse.cz>
9861 David Malcolm <dmalcolm@redhat.com>
9863 * vec.c (test_reverse): New.
9864 (vec_c_tests): Add new test.
9865 * vec.h (vl_ptr>::reverse): New function.
9867 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
9869 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
9871 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
9874 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
9876 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
9878 2018-05-28 Richard Biener <rguenther@suse.de>
9880 PR tree-optimization/85933
9881 * tree-vect-data-refs.c (vect_record_base_alignments): Only
9882 look at stmts marked as vectorizable.
9884 2018-05-28 Richard Biener <rguenther@suse.de>
9886 PR tree-optimization/85934
9887 * tree-vect-generic.c (expand_vector_operations_1): Hoist
9888 vector boolean check before scalar optimization.
9890 2018-05-28 Jakub Jelinek <jakub@redhat.com>
9892 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
9895 2018-05-28 Mark Wielaard <mark@klomp.org>
9897 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
9898 if it is an expression containing a minus sign.
9900 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
9902 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
9904 2018-05-27 Paul Koning <ni1d@arrl.net>
9906 * config/pdp11/pdp11.md (truncsihi2): Remove.
9908 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
9909 Chung-Ju Wu <jasonwucj@gmail.com>
9911 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
9913 (unaligned_store_dw): Ditto.
9914 * config/nds32/nds32-memory-manipulation.c
9915 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
9916 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
9917 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
9918 (emit_setmem_word_loop): Rename to ...
9919 (emit_setmem_doubleword_loop): ... this.
9920 (nds32_gen_dup_4_byte_to_word_value): New function.
9921 (nds32_gen_dup_8_byte_to_double_word_value): New function.
9922 (nds32_expand_setmem_loop): Refine implementation.
9923 (nds32_expand_setmem_loop_v3m): Ditto.
9924 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
9927 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
9929 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
9931 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
9933 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
9934 (nds32_init_machine_status): Initialize machine->attr_naked_p and
9935 machine->attr_no_prologue_p.
9936 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
9937 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
9938 (nds32_expand_epilogue): Consider attr_naked_p.
9939 (nds32_expand_epilogue_v3pop): Likewise.
9940 (nds32_can_use_return_insn): Likewise.
9941 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
9942 attr_no_prologue_p fields.
9943 * config/nds32/nds32.opt (mret-in-naked-func): New option.
9945 2018-05-27 Jakub Jelinek <jakub@redhat.com>
9948 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
9950 * config/i386/sse.md
9951 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
9953 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
9955 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
9957 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
9959 (*<floatsuffix>floatv2div2sf2): Rename to ...
9960 (*float<floatunssuffix>v2div2sf2): ... this.
9961 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
9962 (float<floatunssuffix>v2div2sf2_mask): ... this.
9963 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
9964 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
9965 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
9967 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
9969 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
9971 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
9973 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
9975 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
9977 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
9978 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
9979 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
9980 gen_ufix_truncv8dfv8si2.
9981 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
9982 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
9983 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
9984 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
9985 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
9986 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
9987 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
9988 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
9990 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
9994 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
9996 2018-05-25 Jim Wilson <jimw@sifive.com>
9998 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
9999 * config/riscv/riscv.c (struct machine_function): Add
10000 interrupt_handler_p and attribute_checked_p fields.
10001 (riscv_attribute_table): Add interrupt.
10002 (riscv_interrupt_type_p): New.
10003 (riscv_save_reg_p): Save extra regs for interrupt handler.
10004 (riscv_use_save_libcall): Return false for interrupt handler.
10005 (riscv_first_stack_step): Add forward declaration.
10006 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
10007 for interrupt handler with large frame. Use it for saved reg list.
10008 (riscv_expand_prologue): Move flag_stack_usage_info support to
10009 eliminate duplication.
10010 (riscv_expand_epilogue): Generate mret for interrupt handler.
10011 (riscv_epilogue_uses): New.
10012 (riscv_can_use_return_insn): Return false for interrupt handler.
10013 (riscv_function_ok_for_sibcall): Likewise.
10014 (riscv_set_current_function): Add interrupt handler support.
10015 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
10016 * config/riscv/riscv.md (UNSPECV_MRET): New.
10018 (riscv_frflags, riscv_fsflags): Use tab after opcode.
10020 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
10022 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
10024 PR tree-optimization/85712
10025 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
10026 this candidate has already been replaced in-situ by a copy.
10028 2018-05-25 Jason Merrill <jason@redhat.com>
10030 PR c++/80485 - inline function non-zero address.
10031 * symtab.c (nonzero_address): Check DECL_COMDAT.
10033 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
10036 * config/alpha/alpha.md (ashlsi3): New insn pattern.
10037 (*ashlsi_se): Rename from *ashldi_se. Define as sign
10038 extension of SImode operation. Use const123_operand predicate.
10039 (*saddsi_1): Remove.
10040 (*saddl_se_1): Ditto.
10041 (*ssubsi_1): Ditto.
10042 (*ssubl_se_1): Ditto.
10043 * config/alpha/predicates.md (const123_operand): New predicate.
10044 * config/alpha/constraints.md (P): Use IN_RANGE.
10046 2018-05-25 Richard Biener <rguenther@suse.de>
10048 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
10050 (ref_maybe_used_by_stmt_p): Likewise.
10051 (stmt_may_clobber_ref_p): Likewise.
10052 (stmt_may_clobber_ref_p_1): Likewise.
10053 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
10055 (ref_maybe_used_by_stmt_p): Likewise.
10056 (stmt_may_clobber_ref_p): Likewise.
10057 (stmt_may_clobber_ref_p_1): Likewise.
10058 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
10059 the alias oracle to disambiguate DRs with stmts DR analysis
10061 (vect_analyze_data_refs): Do not give up on not analyzable
10062 DRs for BB vectorization. Remove code truncating the dataref
10065 2018-05-25 Jakub Jelinek <jakub@redhat.com>
10068 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10069 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
10070 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
10072 2018-05-25 Richard Biener <rguenther@suse.de>
10074 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
10075 function, combining stmt data ref gathering and fatal analysis
10077 (vect_analyze_data_refs): Remove now redudnant code and simplify.
10078 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
10079 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
10080 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
10081 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
10083 2018-05-25 Bin Cheng <bin.cheng@arm.com>
10085 PR tree-optimization/85720
10086 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
10087 SCC if all partitions are builtins.
10088 (version_loop_by_alias_check): New parameter. Generate cancelable
10089 runtime alias check if all partitions are builtins.
10090 (distribute_loop): Update call to above function.
10092 2018-05-25 Bin Cheng <bin.cheng@arm.com>
10094 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
10095 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
10096 (parm_default_def_partition_arg): Ditto.
10097 (set_parm_default_def_partition): Ditto.
10098 (get_parm_default_def_partitions): Ditto and make it static.
10099 (get_undefined_value_partitions): Ditto and make it static.
10100 (remove_ssa_form): Refactor call to init_var_map here.
10101 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
10102 computation for loop region.
10103 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
10104 (register_default_def): Delete.
10105 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
10106 (parm_default_def_partition_arg): Ditto.
10107 (set_parm_default_def_partition): Ditto.
10108 (get_parm_default_def_partitions): Ditto and make it static.
10109 (get_undefined_value_partitions): Ditto and make it static.
10110 (coalesce_with_default, coalesce_with_default): Update comment.
10111 (create_coalesce_list_for_region): New func factored out from
10112 create_outofssa_var_map.
10113 (populate_coalesce_list_for_outofssa): New func factored out from
10114 create_outofssa_var_map and coalesce_ssa_name.
10115 (create_outofssa_var_map): Delete.
10116 (coalesce_ssa_name): Refactor to support live range computation.
10117 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
10118 (get_parm_default_def_partitions): Delete.
10119 (get_undefined_value_partitions): Ditto.
10120 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
10121 computation for loop region.
10122 (new_tree_live_info, loe_visit_block): Ditto.
10123 (live_worklist, set_var_live_on_entry): Ditto.
10124 (calculate_live_on_exit, verify_live_on_entry): Ditto.
10125 * tree-ssa-live.h (struct _var_map): New fields.
10126 (init_var_map): Change decl.
10127 (region_contains_p): New.
10129 2018-05-25 Bin Cheng <bin.cheng@arm.com>
10131 * tree-ssa-live.h (live_merge_and_clear): Delete.
10133 2018-05-25 Richard Biener <rguenther@suse.de>
10136 * tree-dump.c (dequeue_and_dump): Remove access to removed
10137 operand 2 of a SWITCH_EXPR.
10139 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10141 * doc/sourcebuild.texi (vect_double_cond_arith): Include
10142 multiplication and division.
10143 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
10144 (cond_udiv@var{m}, cond_umod@var{m}): Document.
10145 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
10146 (cond_udiv_optab, cond_umod_optab): New optabs.
10147 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
10148 (IFN_COND_RDIV): New internal functions.
10149 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
10150 TRUNC_MOD_EXPR and RDIV_EXPR.
10151 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
10152 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
10154 (SVE_INT_BINARY): Include mult.
10155 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
10156 (optab, sve_int_op): Handle mult.
10157 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
10159 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
10160 for SVE_INT_BINARY_SD.
10162 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10164 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
10165 (optab, sve_int_op): Handle div and udiv.
10166 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
10167 for SVE_INT_BINARY_SD.
10168 (*<optab><mode>3): New insn for the same.
10170 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10172 * tree-vect-patterns.c: Include predict.h.
10173 (vect_recog_divmod_pattern): Restrict check for division support
10174 to when optimizing for size.
10176 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10178 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
10179 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
10180 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
10181 (gimple_match_op::set_op): Likewise.
10182 (gimple_resimplify4): Declare.
10183 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
10184 (expr::gen_transform): Likewise.
10185 (decision_tree::gen): Generate a simplification routine for 4 operands.
10186 * gimple-match-head.c (gimple_simplify): Add an overload for
10187 4 operands. In the top-level function, handle up to 4 call
10188 arguments and call gimple_resimplify4.
10189 (gimple_resimplify4): New function.
10190 (build_call_internal): Pass a fourth operand.
10191 (maybe_push_to_seq): Likewise.
10192 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
10193 Fold VEC_COND_EXPRs of an operation and a default value into
10194 an IFN_COND_* function if possible.
10195 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
10197 (SVE_COND_FP_BINARY): Include them.
10198 (optab, sve_fp_op): Handle them.
10199 (SVE_INT_BINARY_REV): New code iterator.
10200 (SVE_COND_FP_BINARY_REV): New int iterator.
10201 (commutative): New int attribute.
10202 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
10204 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
10206 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
10207 (*cond_<optab><mode>): New patterns for reversed operands.
10209 2018-05-25 Richard Biener <rguenther@suse.de>
10211 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
10212 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
10213 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
10214 (STMT_VINFO_GROUPED_ACCESS): Adjust.
10215 * tree-vect-data-refs.c (everywhere): Adjust users.
10216 * tree-vect-loop.c (everywhere): Likewise.
10217 * tree-vect-slp.c (everywhere): Likewise.
10218 * tree-vect-stmts.c (everywhere): Likewise.
10219 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
10221 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10223 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
10225 (gcc_cv_as_section_exclude): ... this.
10226 Try Solaris as #exclude syntax.
10227 * configure: Regenerate.
10228 * config.in: Regenerate.
10229 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
10231 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
10232 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
10234 * varasm.c (default_elf_asm_named_section): Don't check if
10235 HAVE_GAS_SECTION_EXCLUDE is defined.
10237 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10239 * doc/md.texi: Update the documentation of the cond_* optabs
10240 to mention the new final operand. Fix GET_MODE_NUNITS call.
10241 Describe the scalar case too.
10242 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
10243 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
10245 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
10246 (get_conditional_internal_fn): Update comment.
10247 * tree-vect-loop.c (vectorizable_reduction): Pass the original
10248 accumulator value as a final argument to conditional functions.
10249 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
10250 a define_expand and add an "else" operand. Assert for now that
10251 the else operand is equal to operand 2. Use SVE_INT_BINARY and
10252 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
10253 (*cond_<optab><mode>): New patterns.
10254 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
10255 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
10256 (UNSPEC_COND_EOR): Delete.
10257 (optab): Remove associated mappings.
10258 (SVE_INT_BINARY): New code iterator.
10259 (sve_int_op): Remove int attribute and add "minus" to the code
10261 (SVE_COND_INT_OP): Delete.
10262 (SVE_COND_FP_OP): Rename to...
10263 (SVE_COND_FP_BINARY): ...this.
10265 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10267 * optabs.c (can_reuse_operands_p): New function.
10268 (maybe_legitimize_operands): Try to reuse the results for
10271 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
10273 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
10274 Add {q} suffix to insn mnemonic.
10276 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10278 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
10279 (msp430_warn_func_return): New.
10281 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
10283 * fold-const.c (tree_nonzero_bits): New function.
10284 * fold-const.h (tree_nonzero_bits): Likewise.
10285 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
10286 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
10288 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
10292 * varasm.c (assemble_alias): Check ifunc_resolver only on
10295 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
10298 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
10299 when memory input operand is handled.
10301 2018-05-24 Luis Machado <luis.machado@linaro.org>
10303 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
10305 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
10307 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
10309 * match.pd: Delay FMA folds until after vectorization.
10311 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
10314 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10315 address check not strict.
10317 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
10319 * gimple-match.h (gimple_match_op): New class.
10320 (mprts_hook): Replace parameters with a gimple_match_op *.
10321 (maybe_build_generic_op): Likewise.
10322 (gimple_simplified_result_is_gimple_val): Replace parameters with
10323 a const gimple_match_op *.
10324 (gimple_simplify): Replace code_helper * and tree * parameters with
10325 a gimple_match_op * parameter.
10326 (gimple_resimplify1): Replace code_helper *, tree and tree *
10327 parameters with a gimple_match_op * parameter.
10328 (gimple_resimplify2): Likewise.
10329 (gimple_resimplify3): Likewise.
10330 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
10331 parameters with a gimple_match_op * parameter.
10332 * gimple-match-head.c (gimple_simplify): Change prototypes of
10333 auto-generated functions to take a gimple_match_op * instead of
10334 separate code_helper * and tree * parameters. Make the same
10335 change in the top-level overload and update calls to the
10336 gimple_resimplify routines. Update calls to the auto-generated
10337 functions and to maybe_push_res_to_seq in the publicly-facing
10338 operation-specific gimple_simplify overloads.
10339 (gimple_match_op::MAX_NUM_OPS): Define.
10340 (gimple_resimplify1): Replace rcode and ops with a single res_op
10341 parameter. Update call to gimple_simplify.
10342 (gimple_resimplify2): Likewise.
10343 (gimple_resimplify3): Likewise.
10344 (mprts_hook): Replace parameters with a gimple_match_op *.
10345 (maybe_build_generic_op): Likewise.
10346 (build_call_internal): Replace type, nargs and ops with
10347 a gimple_match_op *.
10348 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
10349 with a single gimple_match_op *. Update calls to mprts_hook,
10350 build_call_internal and gimple_simplified_result_is_gimple_val.
10351 Factor out code that is common to the tree_code and combined_fn cases.
10352 * genmatch.c (expr::gen_transform): Replace tem_code and
10353 tem_ops with a gimple_match_op called tem_op. Update calls
10354 to the gimple_resimplify functions and maybe_push_res_to_seq.
10355 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
10356 res_ops. Update call to the gimple_resimplify functions.
10357 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
10358 (decision_tree::gen): Make the functions take a gimple_match_op *
10359 called res_op instead of separate res_code and res_ops parameters.
10360 Update call accordingly.
10361 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
10362 and ops with a single res_op parameter. Update calls to
10363 maybe_build_generic_op and maybe_push_res_to_seq.
10364 (fold_stmt_1): Update calls to gimple_simplify and
10365 replace_stmt_with_simplification.
10366 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
10367 and gimple_simplified_result_is_gimple_val.
10368 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
10370 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
10371 with a gimple_match_op *.
10372 (vn_nary_build_or_lookup): Likewise. Update call to
10373 vn_nary_build_or_lookup_1.
10374 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
10375 gimple_match_op *. Update calls to the gimple_resimplify routines
10376 and to gimple_simplified_result_is_gimple_val.
10377 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
10378 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
10379 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
10380 (visit_nary_op): Likewise.
10381 (visit_reference_op_load): Likewise.
10383 2018-05-23 Luis Machado <luis.machado@linaro.org>
10385 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
10386 modifier for printing the step amount.
10388 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
10391 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
10394 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
10396 * doc/sourcebuild.texi (Endianness): New subsubsection.
10398 2018-05-23 Luis Machado <luis.machado@linaro.org>
10400 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10401 <prefetch_dynamic_strides>: New const bool field.
10402 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10403 prefetch_dynamic_strides.
10404 (exynosm1_prefetch_tune): Likewise.
10405 (thunderxt88_prefetch_tune): Likewise.
10406 (thunderx_prefetch_tune): Likewise.
10407 (thunderx2t99_prefetch_tune): Likewise.
10408 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
10410 (aarch64_override_options_internal): Update to set
10411 PARAM_PREFETCH_DYNAMIC_STRIDES.
10412 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10413 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10414 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10415 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10416 prefetch-dynamic-strides setting.
10418 2018-05-23 Luis Machado <luis.machado@linaro.org>
10420 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10421 <minimum_stride>: New const int field.
10422 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10423 minimum_stride field defaulting to -1.
10424 (exynosm1_prefetch_tune): Likewise.
10425 (thunderxt88_prefetch_tune): Likewise.
10426 (thunderx_prefetch_tune): Likewise.
10427 (thunderx2t99_prefetch_tune): Likewise.
10428 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
10429 <default_opt_level>: Set to 3.
10430 (aarch64_override_options_internal): Update to set
10431 PARAM_PREFETCH_MINIMUM_STRIDE.
10432 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10433 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10434 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10435 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10436 stride is constant and is below the minimum stride threshold.
10438 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10440 * config/arm/arm-cpus.in (mode26): Delete.
10441 (armv4): Delete mode26 reference.
10442 * config/arm/arm.c (arm_configure_build_target): Delete use of
10445 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
10447 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
10449 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
10450 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
10452 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
10453 (floatunsdidf2): Ditto.
10455 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
10457 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
10458 (fixuns_trunc<mode>si2_avx512f): Ditto.
10459 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
10460 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
10461 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
10463 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
10465 PR rtl-optimization/79985
10466 * df-scan.c (df_insn_refs_collect): Remove special case for
10467 global registers and asm statements.
10469 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
10471 * extend.texi (Global Register Variables): Rewrite the bullet list.
10472 Note that the register is available for allocation. Note that access
10473 via inline asm must use constraints. Add note about async-signal
10474 handlers. Remove paragraph about automagic register selection.
10476 2018-05-23 Richard Biener <rguenther@suse.de>
10478 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
10479 of fixed offset from memset VN.
10481 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
10483 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
10484 first_interp field.
10485 (alloc_cand_and_find_basis): Initialize first_interp field.
10486 (slsr_process_mul): Modify first_interp field.
10487 (slsr_process_add): Likewise.
10488 (slsr_process_cast): Modify first_interp field for each new
10490 (slsr_process_copy): Likewise.
10491 (dump_candidate): Dump first_interp field.
10492 (replace_mult_candidate): Process all interpretations, not just
10494 (replace_rhs_if_not_dup): Likewise.
10495 (replace_one_candidate): Likewise.
10497 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
10499 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
10501 (aarch64_needs_frame_chain): New function.
10502 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
10504 2018-05-23 Sudakshina Das <sudi.das@arm.com>
10507 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
10508 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
10509 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
10510 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
10511 as true for strict-align.
10512 (aarch64_can_inline_p): Perform checks even when callee has no
10513 attributes to check for strict alignment.
10514 * doc/extend.texi (AArch64 Function Attributes): Document
10516 * doc/invoke.texi: (AArch64 Options): Likewise.
10518 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
10520 PR tree-optimization/85853
10521 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
10522 the handling of the root of the node to...
10523 (vect_slp_analyze_node_operations_1): ...this new function,
10524 and run the whole thing with the child nodes' def types
10525 set according to their SLP node's def type.
10527 2018-05-23 Richard Biener <rguenther@suse.de>
10529 PR middle-end/85874
10530 * tree-data-ref.c (create_runtime_alias_checks): Defer
10531 and ignore overflow warnings.
10533 2018-05-23 Yury Gribov <tetra2005@gmail.com>
10535 PR tree-optimization/85822
10536 * tree-vrp.c (is_masked_range_test): Fix handling of negative
10539 2018-05-23 Richard Biener <rguenther@suse.de>
10541 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
10542 memset constants via native_interpret_expr.
10544 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
10547 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
10549 (cgraph_node::create_alias): Likewise.
10550 (cgraph_node::get_availability): Check ifunc_resolver instead
10551 of looking up ifunc attribute.
10552 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
10553 * varasm.c (do_assemble_alias): Likewise.
10554 (assemble_alias): Likewise.
10555 (default_binds_local_p_3): Likewise.
10556 * cgraph.h (cgraph_node): Add ifunc_resolver.
10557 (cgraph_node::only_called_directly_or_aliased_p): Return false
10558 for IFUNC resolver.
10559 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
10561 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
10562 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
10563 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
10564 instead of looking up ifunc attribute.
10566 2018-05-22 Luis Machado <luis.machado@linaro.org>
10568 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
10570 2018-05-22 Martin Sebor <msebor@redhat.com>
10572 PR middle-end/85359
10573 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
10574 only when expasion succeeds.
10575 (expand_builtin_strcmp): Same.
10576 (expand_builtin_strncmp): Same.
10578 2018-05-22 Martin Sebor <msebor@redhat.com>
10580 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
10582 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
10583 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10585 * config/aarch64/aarch64-ldpstp.md: Replace uses of
10586 aarch64_mem_pair_operand with memory_operand and delete operand swapping
10588 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
10589 Add check for legitimate_address.
10590 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
10591 (aarch64_swap_ldrstr_operands): New.
10592 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
10595 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
10596 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10598 * config/aarch64/aarch64.md: New patterns to generate stp
10600 (store_pair_sw, store_pair_dw): New patterns to generate stp for
10601 single words and double words.
10602 (load_pair_sw, load_pair_dw): Likewise.
10603 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
10605 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
10607 * config/aarch64/aarch64-ldpstp.md: Modify peephole
10608 for different mode ldpstp and add peephole for merged zero stores.
10609 Likewise for loads.
10610 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
10612 (aarch64_gen_store_pair): Rename calls to match new patterns.
10613 (aarch64_gen_load_pair): Rename calls to match new patterns.
10614 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
10615 (load_pair<DREG:mode><DREG2:mode>): ... This.
10616 (store_pair<mode>): Rename to...
10617 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
10618 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
10619 New mode iterators.
10620 (V_INT_EQUIV): Handle SImode.
10621 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
10624 2018-05-22 Martin Sebor <msebor@redhat.com>
10627 * calls.c (maybe_warn_nonstring_arg): Use string length to set
10628 or ajust the presumed bound on an operation to avoid unnecessary
10631 2018-05-22 Martin Sebor <msebor@redhat.com>
10633 PR tree-optimization/85826
10634 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
10635 assuming that a DECL necesarily has a constant size.
10637 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
10639 PR middle-end/85862
10640 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
10642 2018-05-22 Richard Biener <rguenther@suse.de>
10644 PR tree-optimization/85834
10645 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
10646 non-constant and non-zero memset arguments.
10648 2018-05-22 Martin Liska <mliska@suse.cz>
10651 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
10653 2018-05-22 Richard Biener <rguenther@suse.de>
10655 PR tree-optimization/85863
10656 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
10657 comparisons when vectype is specified.
10658 (vectorizable_condition): Do not specify vectype for
10659 vect_is_simple_cond when SLP vectorizing.
10661 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
10664 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
10665 define __ibm128 as long double.
10666 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
10667 as a distinct type when IEEE 128-bit support is enabled.
10668 (init_float128_ieee): Fix up conversions between IFmode and IEEE
10669 128-bit types to use the correct functions.
10670 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
10671 convert between 128-bit floating point types that have different
10672 modes but the same representation, instead of using gen_lowpart to
10674 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
10676 (IFKF_reg): New attributes to give the register constraints for
10678 (extend<mode>tf2_internal): New insns to mark an explicit
10679 conversion between 128-bit floating point types that have a
10680 different mode but share the same representation.
10682 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
10684 PR tree-optimization/85814
10685 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
10686 a null return from get_strinfo when unsharing the next
10687 strinfo in the chain.
10689 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
10692 * varasm.c (weak_finish): Clean up weak_decls.
10694 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10696 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
10697 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
10698 UNSPEC_UADALP values.
10699 * config/aarch64/iterators.md (ABAL): New int iterator.
10702 (sur): Add mappings for the above.
10703 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
10705 (aarch64_<sur>abal<mode>_4): Likewise.
10706 (aarch64_<sur>adalp<mode>_3): Likewise.
10707 (<sur>sadv16qi): New define_expand.
10709 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
10711 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
10712 (*movdf_internal): Ditto.
10713 (*rcpsf2_sse): Ditto.
10714 (*rsqrtsf2_sse): Ditto.
10715 (*sqrt<mode>2_sse): Ditto.
10717 2018-05-21 Tamar Christina <tamar.christina@arm.com>
10719 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
10721 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
10722 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
10723 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
10724 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
10726 * config/aarch64/arm_neon.h: Likewise.
10727 * config/aarch64/iterators.md (VQ_I): New.
10729 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
10731 * config.gcc: Add arc/t-multilib-linux to tmake_file for
10733 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
10736 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
10738 * config/nds32/constraints.md (S): New constraint.
10739 * config/nds32/nds32.md (call_internal): Use constraint S.
10740 (call_value_internal): Likewise.
10741 (sibcall_internal): Likewise.
10742 (sibcall_value_internal): Likewise.
10744 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
10745 Chung-Ju Wu <jasonwucj@gmail.com>
10747 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
10748 into consideration.
10750 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
10751 Chung-Ju Wu <jasonwucj@gmail.com>
10753 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
10754 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
10755 (nds32_rtx_costs_impl): Simplify.
10756 (nds32_address_cost_impl): Simplify.
10757 (nds32_init_rtx_costs): New function.
10758 (nds32_rtx_costs_speed_prefer): Likewise.
10759 (nds32_rtx_costs_size_prefer): Likewise.
10760 (nds32_address_cost_speed_prefer): Likewise.
10761 (nds32_address_cost_speed_fwprop): Likewise.
10762 (nds32_address_cost_size_prefer): Likewise.
10763 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
10764 * config/nds32/nds32.c (nds32_option_override): Use
10765 nds32_init_rtx_costs function.
10767 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
10769 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
10770 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
10771 (TARGET_PIPELINE_N8): Likewise.
10772 (TARGET_PIPELINE_N10): Likewise.
10773 (TARGET_PIPELINE_N13): Likewise.
10774 (TARGET_PIPELINE_GRAYWOLF): Likewise.
10776 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
10778 * config/nds32/nds32-fpu.md: Update copyright year.
10780 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10782 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
10784 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10786 * config/nds32/nds32.c
10787 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
10788 * config/nds32/nds32.opt (minline-asm-r15): New option.
10790 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10792 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
10794 * config/nds32/nds32.md (abssi2): New pattern.
10796 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
10798 * config/i386/i386.md (rex64namesuffix): New mode attribute.
10799 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
10800 Merge insn pattern from sse_cvtsi2ss<round_name> and
10801 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
10802 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
10803 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
10804 using SWI48 mode iterator.
10805 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
10806 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
10807 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
10808 pattern from sse_cvttss2si<round_saeonly_name>
10809 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
10810 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
10811 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
10812 using SWI48 mode iterator.
10813 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
10814 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
10815 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
10816 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
10817 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
10818 using SWI48 mode iterator.
10819 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
10820 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
10821 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
10822 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
10823 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
10824 SWI48 mode iterator.
10825 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
10826 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
10827 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
10828 pattern from sse_cvttsd2si<round_saeonly_name>
10829 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
10831 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10833 * config/nds32/nds32-md-auxiliary.c
10834 (nds32_valid_smw_lwm_base_p): Refine.
10835 (nds32_output_smw_single_word): Refine.
10836 (nds32_output_smw_double_word): New.
10837 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
10839 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10841 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
10842 (nds32_output_stack_pop): Refine.
10843 (nds32_expand_unaligned_load): Refine.
10844 (nds32_expand_unaligned_store): Refine.
10846 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
10847 Chung-Ju Wu <jasonwucj@gmail.com>
10849 * config/nds32/constants.md: Add TP_REGNUM constant.
10850 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
10851 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
10853 * config/nds32/nds32-doubleword.md: Consider flag_pic.
10854 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
10855 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
10856 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
10857 and PIC code generation.
10858 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
10860 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
10862 * config/nds32/nds32.md: Support TLS and PIC.
10863 * config/nds32/nds32.c: Support TLS and PIC.
10864 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
10865 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
10868 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10870 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
10871 mode with E_ prefix.
10873 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
10874 Chung-Ju Wu <jasonwucj@gmail.com>
10876 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
10877 * config/nds32/nds32-md-auxiliary.c
10878 (symbolic_reference_mentioned_p): New.
10879 (nds32_legitimize_ict_address): New.
10880 (nds32_expand_ict_move): New.
10881 (nds32_indirect_call_referenced_p): New.
10882 (nds32_symbol_binds_local_p): Delete.
10883 (nds32_long_call_p): Modify.
10884 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
10885 * config/nds32/nds32-protos.h
10886 (symbolic_reference_mentioned_p): Declare.
10887 (nds32_legitimize_ict_address): Declare.
10888 (nds32_expand_ict_move): Declare.
10889 (nds32_indirect_call_referenced_p): Declare.
10890 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
10891 (nds32_relax_group): Use nds32_ict_const_p as condition.
10892 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
10893 (nds32_asm_file_start): Output ict_model directive in asm code.
10894 (nds32_legitimate_address_p): Consider indirect call.
10895 (nds32_print_operand): Consider indirect call.
10896 (nds32_print_operand_address): Consider indirect call.
10897 (nds32_insert_attributes): Handle "indirect_call" attribute.
10898 (TARGET_LEGITIMATE_ADDRESS_P): Define.
10899 (TARGET_LEGITIMATE_CONSTANT_P): Define.
10900 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
10901 (TARGET_DELEGITIMIZE_ADDRESS): Define.
10902 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
10903 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
10904 (TARGET_ICT_MODEL_SMALL): Define.
10905 (TARGET_ICT_MODEL_LARGE): Define.
10906 * config/nds32/nds32.md (movsi): Consider ict model.
10907 (call, call_value): Consider ict model.
10908 (sibcall, sibcall_value): Consider ict model.
10909 * config/nds32/nds32.opt (mict-model): New option.
10910 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
10913 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
10914 Monk Chiang <sh.chiang04@gmail.com>
10915 Jim Wilson <jimw@sifive.com>
10917 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
10918 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
10919 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
10920 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
10921 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
10922 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
10923 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
10924 compute save_libcall_adjustment properly.
10925 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
10926 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
10927 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
10928 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
10929 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
10930 (ABI_SPEC): Handle mabi=ilp32e.
10931 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
10932 (RVE): Add RVE mask.
10933 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
10934 <-march>: Add rv32e as an example.
10936 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
10939 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
10940 (intra_create_variable_infos): Handle C++ constructors.
10942 2018-05-18 Martin Liska <mliska@suse.cz>
10944 * passes.def: Remove a redundant pass.
10946 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
10949 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
10951 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10953 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
10955 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
10957 (armv2, armv2a, armv3, armv3m): Delete architectures.
10958 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
10959 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
10960 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
10962 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
10963 (*mulsidi3adddi): Likewise.
10964 (mulsidi3): Likewise.
10965 (*mulsidi3_nov6): Likewise.
10966 (umulsidi3): Likewise.
10967 (umulsidi3_nov6): Likewise.
10968 (umaddsidi4): Likewise.
10969 (*umulsidi3adddi): Likewise.
10970 (smulsi3_highpart): Likewise.
10971 (*smulsi3_highpart_nov6): Likewise.
10972 (umulsi3_highpart): Likewise.
10973 (*umulsi3_highpart_nov6): Likewise.
10974 * config/arm/arm.h (arm_arch3m): Delete.
10975 * config/arm/arm.c (arm_arch3m): Delete.
10976 (arm_option_override_internal): Update armv3-related comment.
10977 (arm_configure_build_target): Delete use of isa_bit_mode32.
10978 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
10979 (arm_rtx_costs_internal): Delete check of arm_arch3m.
10980 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
10981 (mulsa3): Likewise.
10982 (mulusa3): Likewise.
10983 * config/arm/arm-protos.h (arm_arch3m): Delete.
10984 * config/arm/arm-tables.opt: Regenerate.
10985 * config/arm/arm-tune.md: Likewise.
10986 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
10987 deleted architectures.
10989 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10991 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
10992 (armv5t, armv5te): New features.
10993 (ARMv5, ARMv5e): Delete fgroups.
10994 (ARMv5t, ARMv5te): Adjust for above changes.
10995 (ARMv6m): Likewise.
10996 (armv5, armv5e): Delete arches.
10997 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
10999 (*call_reg_arm): Likewise.
11000 (*call_value_reg_armv5): Likewise.
11001 (*call_value_reg_arm): Likewise.
11002 (*call_symbol): Likewise.
11003 (*call_value_symbol): Likewise.
11004 (*sibcall_insn): Likewise.
11005 (*sibcall_value_insn): Likewise.
11006 (clzsi2): Likewise.
11007 (prefetch): Likewise.
11008 (define_split and define_peephole2 dependent on arm_arch5):
11010 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
11012 (TARGET_ARM_QBIT): Likewise.
11013 (TARGET_DSP_MULTIPLY): Likewise.
11014 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
11015 (arm_arch5, arm_arch5e): Delete.
11016 (arm_arch5t, arm_arch5te): Declare.
11017 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
11018 (arm_arch5t): Declare.
11019 (arm_option_reconfigure_globals): Update for the above.
11020 (arm_options_perform_arch_sanity_checks): Update comment, replace
11021 use of arm_arch5 with arm_arch5t.
11022 (use_return_insn): Likewise.
11023 (arm_emit_call_insn): Likewise.
11024 (output_return_instruction): Likewise.
11025 (arm_final_prescan_insn): Likewise.
11026 (arm_coproc_builtin_available): Likewise.
11027 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
11028 arm_arch5e with arm_arch5t and arm_arch5te.
11029 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
11030 (arm_arch5t, arm_arch5te): Declare.
11031 * config/arm/arm-tables.opt: Regenerate.
11032 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
11033 * config/arm/t-multilib: Likewise.
11034 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
11035 instead of arm_arch5.
11036 (*call_reg_thumb1): Likewise.
11037 (*call_value_reg_thumb1_v5): Likewise.
11038 (*call_value_reg_thumb1): Likewise.
11039 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
11041 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
11043 2018-05-18 Martin Liska <mliska@suse.cz>
11045 PR gcov-profile/84846
11046 * doc/gcov.texi: Document -t option of gcov tool.
11048 2018-05-18 Martin Liska <mliska@suse.cz>
11050 PR gcov-profile/84846
11051 * gcov.c (print_usage): Add new -t option.
11052 (process_args): Handle the option.
11053 (generate_results): Use stdout as output when requested by
11056 2018-05-18 Martin Liska <mliska@suse.cz>
11058 PR gcov-profile/84846
11059 * coverage.c (coverage_init): Write PWD to .gcno file.
11060 * doc/gcov.texi: Document how working directory is printed.
11061 * gcov-dump.c (dump_gcov_file): Print PWD.
11062 * gcov.c (output_intermediate_file): Likewise.
11063 (read_graph_file): Read PWD string.
11064 (output_lines): Print PWD.
11066 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11068 PR middle-end/85817
11069 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
11070 for retval and return false if all args to phi are zero.
11072 2018-05-18 Richard Biener <rguenther@suse.de>
11074 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
11076 (evrp_dom_walker::before_dom_children): Call it.
11078 2018-05-18 Richard Biener <rguenther@suse.de>
11080 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
11081 results when processing array refs with variable index.
11083 2018-05-18 Toon Moene <toon@moene.org>
11085 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
11086 directly after that of -floop-interchange. Indicate that both
11087 options are enabled by default when specifying -O3.
11089 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11091 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
11092 iterator. Delete separate integer-mode vec_set<mode> expander.
11093 (aarch64_simd_vec_setv2di): Delete.
11094 (vec_setv2di): Delete.
11095 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
11096 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
11097 the "w, r" alternative.
11099 2018-05-18 Martin Liska <mliska@suse.cz>
11101 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
11102 * tree-pass.h (make_pass_lower_switch_O0): New function.
11103 * tree-switch-conversion.c (node_has_low_bound): Remove.
11104 (node_has_high_bound): Likewise.
11105 (node_is_bounded): Likewise.
11106 (class pass_lower_switch): Make it a template type and create
11108 (pass_lower_switch::execute): Add template argument.
11109 (make_pass_lower_switch): New function.
11110 (make_pass_lower_switch_O0): New function.
11111 (do_jump_if_equal): Remove.
11112 (emit_case_nodes): Simplify to just handle all 3 cases and leave
11113 all the hard work to tree optimization passes.
11115 2018-05-18 Martin Liska <mliska@suse.cz>
11117 * dbgcnt.c (limit_low): Renamed from limit.
11118 (limit_high): New variable.
11119 (dbg_cnt_is_enabled): Check for upper limit.
11120 (dbg_cnt): Adjust dumping.
11121 (dbg_cnt_set_limit_by_index): Add new argument for high
11123 (dbg_cnt_set_limit_by_name): Likewise.
11124 (dbg_cnt_process_single_pair): Parse new format.
11125 (dbg_cnt_process_opt): Use strtok.
11126 (dbg_cnt_list_all_counters): Remove 'value' and add
11128 * doc/invoke.texi: Document changes.
11130 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
11132 * doc/sourcebuild.texi (scalar_all_fma): Document.
11133 * tree.def (FMA_EXPR): Delete.
11134 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
11135 * internal-fn.c (ternary_direct): New macro.
11136 (expand_ternary_optab_fn): Likewise.
11137 (direct_ternary_optab_supported_p): Likewise.
11138 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
11139 * builtins.c (fold_builtin_fma): Delete.
11140 (fold_builtin_3): Don't call it.
11141 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
11142 * expr.c (expand_expr_real_2): Likewise.
11143 * fold-const.c (operand_equal_p): Likewise.
11144 (fold_ternary_loc): Likewise.
11145 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
11146 * gimple.c (DEFTREECODE): Likewise.
11147 * gimplify.c (gimplify_expr): Likewise.
11148 * optabs-tree.c (optab_for_tree_code): Likewise.
11149 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
11150 * tree-eh.c (operation_could_trap_p): Likewise.
11151 (stmt_could_throw_1_p): Likewise.
11152 * tree-inline.c (estimate_operator_cost): Likewise.
11153 * tree-pretty-print.c (dump_generic_node): Likewise.
11154 (op_code_prio): Likewise.
11155 * tree-ssa-loop-im.c (stmt_cost): Likewise.
11156 * tree-ssa-operands.c (get_expr_operands): Likewise.
11157 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
11158 * fold-const-call.h (fold_fma): Delete.
11159 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
11160 CFN_FNMA and CFN_FNMS.
11161 (fold_fma): Delete.
11162 * genmatch.c (combined_fn): New enum.
11163 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
11164 (commutative_op): New function.
11165 (commutate): Use it. Handle more than 2 operands.
11166 (dt_operand::gen_gimple_expr): Use commutative_op.
11167 (parser::parse_expr): Allow :c to be used with non-binary
11168 operators if the commutative operand is known.
11169 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
11170 CFN_FMS, CFN_FNMA and CFN_FNMS.
11171 (backprop::process_assign_use): Remove FMA_EXPR handling.
11172 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
11173 (gen_hsa_fma): New function.
11174 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
11175 IFN_FNMA and IFN_FNMS.
11176 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
11177 * gimple-fold.h (follow_all_ssa_edges): Declare.
11178 * gimple-fold.c (follow_all_ssa_edges): New function.
11179 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
11180 gimple_build interface and use follow_all_ssa_edges to fold the result.
11181 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
11182 instead of checking for optabs directly.
11183 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
11184 rather than FMA_EXPRs.
11185 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
11186 call to IFN_FMA instead of an FMA_EXPR.
11188 2018-05-17 Jim Wilson <jimw@sifive.com>
11190 * expr.c (do_tablejump): When converting index to Pmode, if we have a
11191 sign extended promoted subreg, and the range does not have the sign bit
11192 set, then do a sign extend.
11194 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
11195 test, check for sign extended subreg and/or constant operands, and
11196 do a sign extend in that case.
11198 2018-05-17 Steve Ellcey <sellcey@cavium.com>
11200 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
11201 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
11203 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
11204 Change logics_shift_reg to logics_shift_imm.
11205 (thunderx2t99_fp_loadpair_basic): Delete.
11206 (thunderx2t99_fp_storepair_basic): Delete.
11207 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
11208 (thunderx2t99_asimd_polynomial): Delete.
11209 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
11210 and neon_fp_mul_d_scalar_q.
11211 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
11212 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
11213 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
11214 (thunderx2t99_asimd_lut): Add missing tbl types.
11215 (thunderx2t99_asimd_ext): Delete.
11216 (thunderx2t99_asimd_load1_1_mult): Delete.
11217 (thunderx2t99_asimd_load1_2_mult): Delete.
11218 (thunderx2t99_asimd_load1_ldp): New.
11219 (thunderx2t99_asimd_load1): New.
11220 (thunderx2t99_asimd_load2): Add missing *load2* types.
11221 (thunderx2t99_asimd_load3): New.
11222 (thunderx2t99_asimd_load4): New.
11223 (thunderx2t99_asimd_store1_1_mult): Delete.
11224 (thunderx2t99_asimd_store1_2_mult): Delete.
11225 (thunderx2t99_asimd_store2_mult): Delete.
11226 (thunderx2t99_asimd_store2_onelane): Delete.
11227 (thunderx2t99_asimd_store_stp): New.
11228 (thunderx2t99_asimd_store1): New.
11229 (thunderx2t99_asimd_store2): New.
11230 (thunderx2t99_asimd_store3): New.
11231 (thunderx2t99_asimd_store4): New.
11233 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
11235 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
11236 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
11238 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
11239 Segher Boessenkool <segher@kernel.crashing.org>
11242 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
11245 2018-05-17 Richard Biener <rguenther@suse.de>
11247 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
11248 for pruning loop and prune defs feeding only already visited PHIs.
11250 2018-05-17 Richard Biener <rguenther@suse.de>
11252 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
11254 2018-05-17 Bin Cheng <bin.cheng@arm.com>
11255 Richard Biener <rguenther@suse.de>
11257 PR tree-optimization/85793
11258 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
11259 for VMAT_ELEMENTWISE.
11261 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
11263 * internal-fn.h (lookup_internal_fn): Declare
11264 * internal-fn.c (lookup_internal_fn): New function.
11265 * gimple.c (gimple_build_call_from_tree): Handle calls to
11266 internal functions.
11267 * gimple-pretty-print.c (dump_gimple_call): Print "." before
11268 internal function names.
11269 * tree-pretty-print.c (dump_generic_node): Likewise.
11270 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
11272 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
11274 * gimple-fold.h (gimple_build): Make the function forms take
11275 combined_fn rather than built_in_function.
11276 (gimple_simplify): Likewise.
11277 * gimple-match-head.c (gimple_simplify): Likewise.
11278 * gimple-fold.c (gimple_build): Likewise.
11279 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
11280 rather than gimple_build_call_internal.
11281 (get_initial_defs_for_reduction): Likewise.
11282 (vect_create_epilog_for_reduction): Likewise.
11283 (vectorizable_live_operation): Likewise.
11285 2018-05-17 Martin Liska <mliska@suse.cz>
11287 * gimple-ssa-sprintf.c (format_directive): Do not use
11288 space in between 'G_' and '('.
11290 2018-05-17 Jakub Jelinek <jakub@redhat.com>
11293 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
11294 even if the mask is not all ones.
11297 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
11299 (ix86_gimple_fold_builtin): Likewise.
11302 * config/i386/i386.c: Include tree-vector-builder.h.
11303 (ix86_vector_shift_count): New function.
11304 (ix86_fold_builtin): Fold shift builtins by scalar count.
11305 (ix86_gimple_fold_builtin): Likewise.
11307 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
11308 _mm512_setzero): New intrinsics.
11310 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
11311 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11313 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
11314 code generation for cases where splatting a value is not useful.
11315 * simplify-rtx.c (simplify_ternary_operation): Simplify
11316 vec_merge across a vec_duplicate and a paradoxical subreg forming
11317 a vector mode to a vec_concat.
11319 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
11321 * config.gcc: Support "goldmont-plus".
11322 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
11324 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11325 PROCESSOR_GOLDMONT_PLUS.
11326 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
11327 (processor_target_table): Add "goldmont-plus".
11328 (PTA_GOLDMONT_PLUS): Define.
11329 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
11330 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
11331 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
11332 (fold_builtin_cpu): Add "goldmont-plus".
11333 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
11334 (ix86_option_override_internal): Add "goldmont-plus".
11335 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
11336 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
11337 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
11338 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
11340 2018-05-17 Richard Biener <rguenther@suse.de>
11342 PR tree-optimization/85757
11343 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
11344 remove defs that only feed that PHI from further processing.
11346 2018-05-16 Jim Wilson <jimw@sifive.com>
11348 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
11350 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
11352 2018-05-16 Mark Wielaard <mark@klomp.org>
11354 * dwarf2out.c (count_index_strings): New function.
11355 (output_indirect_strings): Call count_index_strings and generate
11356 header for dwarf_version >= 5.
11358 2018-05-16 Mark Wielaard <mark@klomp.org>
11360 * dwarf2out.c (dwarf_FORM): New function.
11361 (set_indirect_string): Use dwarf_FORM.
11362 (reset_indirect_string): Likewise.
11363 (size_of_die): Likewise.
11364 (value_format): Likewise.
11365 (output_die): Likewise.
11366 (add_skeleton_AT_string): Likewise.
11367 (output_macinfo_op): Likewise.
11368 (index_string): Likewise.
11369 (output_index_string_offset): Likewise.
11370 (output_index_string): Likewise.
11371 (count_index_strings): Likewise.
11373 2018-05-16 Carl Love <cel@us.ibm.com>
11375 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
11376 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
11378 2018-05-16 Martin Jambor <mjambor@suse.cz>
11380 * ipa-prop.c (ipa_free_all_edge_args): Remove.
11381 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
11383 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
11385 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
11386 (fnma<mode>4): Likewise.
11387 (fms<mode>4): Likewise.
11388 (fnms<mode>4): Likewise.
11389 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
11390 (aarch64_fnma<mode>4): Likewise.
11391 (aarch64_fms<mode>4): Likewise.
11392 (aarch64_fnms<mode>4): Likewise.
11393 (aarch64_fnmadd<mode>4): Likewise.
11395 2018-05-16 Jason Merrill <jason@redhat.com>
11397 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
11399 2018-05-16 Richard Biener <rguenther@suse.de>
11401 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
11402 (dump_stmt_cost): Declare.
11403 (add_stmt_cost): Dump cost we add.
11404 (add_stmt_costs): New function.
11405 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
11406 No longer exported.
11407 (vect_analyze_stmt): Adjust prototype.
11408 (vectorizable_condition): Likewise.
11409 (vectorizable_live_operation): Likewise.
11410 (vectorizable_reduction): Likewise.
11411 (vectorizable_induction): Likewise.
11412 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
11413 cost vector to pass to vectorizable_ and record afterwards.
11414 (vect_model_reduction_cost): Take cost vector argument and adjust.
11415 (vect_model_induction_cost): Likewise.
11416 (vectorizable_reduction): Likewise.
11417 (vectorizable_induction): Likewise.
11418 (vectorizable_live_operation): Likewise.
11419 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
11420 SLP_TREE_NUMBER_OF_VEC_STMTS.
11421 (vect_analyze_slp_cost_1): Remove.
11422 (vect_analyze_slp_cost): Likewise.
11423 (vect_slp_analyze_node_operations): Take visited args and
11424 a target cost vector. Avoid processing already visited stmt sets.
11425 (vect_slp_analyze_operations): Use a local cost vector to gather
11426 costs and register those of non-discarded instances.
11427 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
11428 (vect_schedule_slp_instance): Remove copying of
11429 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
11431 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
11432 adding cost. Record cost entry location.
11433 (vect_prologue_cost_for_slp_op): Function to compute cost of
11434 a constant or invariant generated for SLP vect in the prologue,
11435 split out from vect_analyze_slp_cost_1.
11436 (vect_model_simple_cost): Make static. Adjust for SLP costing.
11437 (vect_model_promotion_demotion_cost): Likewise.
11438 (vect_model_store_cost): Likewise, make static.
11439 (vect_model_load_cost): Likewise.
11440 (vectorizable_bswap): Add cost vector arg and adjust.
11441 (vectorizable_call): Likewise.
11442 (vectorizable_simd_clone_call): Likewise.
11443 (vectorizable_conversion): Likewise.
11444 (vectorizable_assignment): Likewise.
11445 (vectorizable_shift): Likewise.
11446 (vectorizable_operation): Likewise.
11447 (vectorizable_store): Likewise.
11448 (vectorizable_load): Likewise.
11449 (vectorizable_condition): Likewise.
11450 (vectorizable_comparison): Likewise.
11451 (can_vectorize_live_stmts): Likewise.
11452 (vect_analyze_stmt): Likewise.
11453 (vect_transform_stmt): Adjust calls to vectorizable_*.
11454 * tree-vectorizer.c: Include gimple-pretty-print.h.
11455 (dump_stmt_cost): New function.
11457 2018-05-16 Richard Biener <rguenther@suse.de>
11459 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
11460 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
11461 * tree-ssa-dse.c: Include tree-ssa-loop.h.
11462 (check_name): New callback.
11463 (dse_classify_store): Track cycles via a visited bitmap of PHI
11464 defs and simplify handling of in-loop and across loop dead stores
11465 and properly fail for loop-variant refs. Handle byte-tracking with
11466 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
11469 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
11471 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
11472 (vect_get_mask_type_for_stmt): Likewise.
11473 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
11475 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
11476 to determine the statement's vector type and the vector type that
11477 should be used for calculating nunits. Deal with cases in which
11478 the type has to be deferred.
11479 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
11480 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
11481 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
11482 (vect_determine_vf_for_stmt): New functions, split out from...
11483 (vect_determine_vectorization_factor): ...here.
11484 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
11485 (vect_get_mask_type_for_stmt): New functions, split out from
11486 vect_determine_vectorization_factor.
11488 2018-05-16 Richard Biener <rguenther@suse.de>
11490 * tree-cfg.c (verify_gimple_assign_ternary): Properly
11491 verify the [VEC_]COND_EXPR embedded comparison.
11493 2018-05-15 Martin Sebor <msebor@redhat.com>
11495 PR tree-optimization/85753
11496 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
11497 RECORD_TYPE in addition to ARRAY_TYPE.
11499 2018-05-15 Martin Sebor <msebor@redhat.com>
11501 PR middle-end/85643
11502 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
11504 2018-05-15 Richard Biener <rguenther@suse.de>
11506 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
11507 add by_clobber_p one. Change algorithm to collect all defs
11508 representing uses we need to walk and try reducing them to
11509 a single one before failing.
11510 (dse_dom_walker::dse_optimize_stmt): Adjust.
11512 2018-05-13 Mark Wielaard <mark@klomp.org>
11514 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
11515 (size_of_loc_descr): Likewise.
11516 (output_loc_operands): Likewise.
11517 (output_loc_operands_raw): Likewise.
11518 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
11519 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
11520 (hash_loc_operands): Likewise.
11521 (compare_loc_operands): Likewise.
11523 2018-05-14 Mark Wielaard <mark@klomp.org>
11525 * dwarf2out.c (count_index_addrs): New function.
11526 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
11528 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11530 PR tree-optimization/83648
11531 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
11532 return value as malloc candidate.
11534 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11537 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
11538 param as true in call to suggest_attribute.
11540 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
11542 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
11543 -mreadonly-in-sdata.
11545 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11547 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
11549 (aarch64_crypto_aesd_fused): Likewise.
11551 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
11553 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
11554 (movsi_aarch64): Likewise.
11555 (load_pairsi): Likewise.
11556 (load_pairdi): Likewise.
11557 (store_pairsi): Likewise.
11558 (store_pairdi): Likewise.
11559 (load_pairsf): Likewise.
11560 (load_pairdf): Likewise.
11561 (store_pairsf): Likewise.
11562 (store_pairdf): Likewise.
11563 (zero_extend): Likewise.
11564 (trunc): Swap alternatives.
11565 (fcvt_target): Add '?' to prefer w over r.
11567 2018-05-14 Jakub Jelinek <jakub@redhat.com>
11570 * config/i386/i386.md: Disallow non-commutative arithmetics in
11571 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
11572 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
11573 in the peephole2 before it.
11575 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
11577 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
11578 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
11579 (ix86_handle_option): Handle -mcldemote.
11580 * config.gcc: New header.
11581 * config/i386/cldemoteintrin.h: New file.
11582 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
11583 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
11585 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11586 OPTION_MASK_ISA_CLDEMOTE.
11587 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
11588 (ix86_valid_target_attribute_inner_p): Ditto.
11589 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
11590 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
11591 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
11592 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
11593 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
11595 * config/i386/i386.opt: Add -mcldemote.
11596 * config/i386/x86intrin.h: New header.
11597 * doc/invoke.texi: Add -mcldemote.
11599 2018-05-14 Richard Biener <rguenther@suse.de>
11601 * doc/match-and-simplify.texi: Adjust :s documentation.
11603 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
11605 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
11606 intended memcpy size.
11607 (REORDER_45): Likewise.
11609 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
11611 * sort.cc: New file.
11612 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
11613 * vec.c (qsort_chk): Use gcc_qsort.
11614 * Makefile.in (OBJS-libcommon): Add sort.o.
11615 (build/sort.o): New target. Use it...
11616 (BUILD_RTL): ... here, and...
11617 (build/gencfn-macros): ... here, and...
11618 (build/genmatch): ... here.
11620 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
11621 Chung-Ju Wu <jasonwucj@gmail.com>
11623 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
11624 * config/nds32/nds32-graywolf.md: New file.
11625 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
11626 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
11628 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
11629 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
11630 * config/nds32/nds32.md (pipeline_model): Add graywolf.
11631 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
11632 * config/nds32/pipelines.md: Include n15 settings.
11634 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
11635 Chung-Ju Wu <jasonwucj@gmail.com>
11637 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
11638 * config/nds32/nds32-n13.md: New file.
11639 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
11640 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
11642 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
11643 * config/nds32/nds32.md (pipeline_model): Add n13.
11644 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
11645 * config/nds32/pipelines.md: Include n13 settings.
11647 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
11648 Chung-Ju Wu <jasonwucj@gmail.com>
11650 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
11651 * config/nds32/nds32-n10.md: New file.
11652 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
11653 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
11655 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
11656 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
11657 * config/nds32/nds32.md (pipeline_model): Add n10.
11658 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
11659 * config/nds32/pipelines.md: Include n10 settings.
11661 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
11662 Kito Cheng <kito.cheng@gmail.com>
11663 Chung-Ju Wu <jasonwucj@gmail.com>
11665 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
11666 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11667 Add enum values for DSP extension instructions.
11668 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
11670 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
11671 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
11672 New code iterators.
11673 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
11674 * config/nds32/nds32-dspext.md: New file for DSP implementation.
11675 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
11676 * config/nds32/nds32-intrinsic.md: Likewise.
11677 * config/nds32/nds32_intrinsic.h: Likewise.
11678 * config/nds32/nds32-md-auxiliary.c: Likewise.
11679 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
11680 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
11681 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
11682 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
11683 * config/nds32/nds32-protos.h: New declarations for DSP extension.
11684 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
11685 TYPE_DMAC in switch statement.
11686 * config/nds32/nds32.c: New checking and implementation for DSP
11687 extension instructions.
11688 * config/nds32/nds32.h: Likewise.
11689 * config/nds32/nds32.md: Likewise.
11690 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
11691 * config/nds32/predicates.md: Implement new predicates for DSP
11694 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
11696 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
11697 Reformat alternatives and attributes so it is easier to identify
11698 which constraints/attributes go with which instruction.
11699 (mov<mode>_hardfloat32, FMOVE64): Likewise.
11700 (mov<mode>_softfloat32, FMOVE64): Likewise.
11701 (mov<mode>_hardfloat64, FMOVE64): Likewise.
11702 (mov<mode>_softfloat64, FMOVE64): Likewise.
11704 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
11706 * doc/extend.texi (PowerPC Built-in Functions): Rename this
11708 (Basic PowerPC Built-in Functions): The new name of the
11709 subsection previously known as "PowerPC Built-in Functions".
11710 (Basic PowerPC Built-in Functions Available on all Configurations):
11712 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
11713 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
11714 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
11715 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
11717 2018-05-11 Martin Jambor <mjambor@suse.cz>
11720 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
11723 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
11726 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
11728 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
11730 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
11731 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
11732 (ix86_handle_option): Handle -mwaitpkg.
11733 * config.gcc: New header.
11734 * config/i386/cpuid.h (bit_WAITPKG): New bit.
11735 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
11736 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
11738 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11739 OPTION_MASK_ISA_WAITPKG.
11740 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
11741 (ix86_option_override_internal): Add PTA_WAITPKG.
11742 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
11743 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
11744 IX86_BUILTIN_TPAUSE.
11745 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
11746 __builtin_ia32_umwait and __builtin_ia32_tpause.
11747 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
11748 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
11749 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
11750 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
11751 UNSPECV_TPAUSE): New.
11752 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
11753 * config/i386/i386.opt: Add -mwaitpkg.
11754 * config/i386/waitpkgintrin.h: New file.
11755 * config/i386/x86intrin.h: New header.
11756 * doc/invoke.texi: Add -mwaitpkg.
11758 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
11761 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
11763 (cortex-m0): Use armv6s-m isa.
11764 (cortex-m0plus): Likewise.
11765 (cortex-m1): Likewise.
11766 (cortex-m0.small-multiply): Likewise.
11767 (cortex-m0plus.small-multiply): Likewise.
11768 (cortex-m1.small-multiply): Likewise.
11770 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
11771 Jakub Jelinek <jakub@redhat.com>
11773 PR tree-optimization/85692
11774 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
11775 source permute as well.
11777 2018-05-11 Martin Liska <mliska@suse.cz>
11780 * doc/extend.texi: Document LLVM style format for no_sanitize
11783 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
11785 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
11786 mode_supports_vsx_dform_quad to mode_supports_dq_form.
11787 (mode_supports_vsx_dform_quad): Likewise.
11788 (mode_supports_vmx_dform): Move these functions to be next to the
11789 other mode_supports functions.
11790 (mode_supports_dq_form): Likewise.
11791 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
11792 mode_supports_dq_form.
11793 (reg_offset_addressing_ok_p): Likewise.
11794 (offsettable_ok_by_alignment): Likewise.
11795 (rs6000_legitimate_offset_address_p): Likewise.
11796 (legitimate_lo_sum_address_p): Likewise.
11797 (rs6000_legitimize_address): Likewise.
11798 (rs6000_legitimize_reload_address): Likewise.
11799 (rs6000_secondary_reload_inner): Likewise.
11800 (rs6000_preferred_reload_class): Likewise.
11801 (rs6000_output_move_128bit): Likewise.
11803 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
11805 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
11806 Generate SImode target register for null target.
11807 <case IX86_BUILTIN_XGETBV>: Ditto.
11808 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
11809 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
11811 2018-05-10 Carl Love <cel@us.ibm.com>
11813 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
11814 dcbtt and dcbtstt if operands[2] is 0.
11816 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
11819 * config/i386/sse.md (usadv64qi): New expander.
11821 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
11823 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
11824 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
11825 -maltivec=be support.
11826 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
11827 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
11828 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
11829 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
11830 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
11831 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
11832 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
11833 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
11834 altivec_vsumsws): Adjust.
11835 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
11836 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
11837 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
11839 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
11840 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
11841 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
11842 (altivec_lve<VI_char>x): Delete expand.
11843 (*altivec_lve<VI_char>x_internal): Rename to...
11844 (altivec_lve<VI_char>x): ... this.
11845 (altivec_lvxl_<mode>): Delete expand.
11846 (*altivec_lvxl_<mode>_internal): Rename to ...
11847 (altivec_lvxl_<mode>): ... this.
11848 (altivec_stvxl_<mode>): Delete expand.
11849 (*altivec_stvxl_<mode>_internal): Rename to ...
11850 (altivec_stvxl_<mode>): ... this.
11851 (altivec_stve<VI_char>x): Delete expand.
11852 (*altivec_stve<VI_char>x_internal): Rename to ...
11853 (altivec_stve<VI_char>x): ... this.
11854 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
11855 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
11856 reduc_plus_scal_<mode>): Adjust.
11857 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
11859 (rs6000_cpu_cpp_builtins): Adjust.
11860 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
11861 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
11862 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
11863 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
11864 -maltivec=be support.
11865 (rs6000_split_vec_extract_var): Adjust.
11866 (rs6000_split_v4si_init): Adjust.
11867 (swap_selector_for_mode): Delete.
11868 (altivec_expand_lvx_be, altivec_expand_stvx_be,
11869 altivec_expand_stvex_be): Delete.
11870 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
11871 -maltivec=be support.
11872 (rs6000_gimple_fold_builtin): Ditto.
11873 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
11875 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
11876 (TARGET_DIRECT_MOVE_64BIT): Adjust.
11877 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
11878 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
11879 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
11880 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
11881 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
11882 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
11883 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
11884 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
11885 anonymous split): Adjust.
11886 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
11887 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
11889 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
11891 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
11892 when --with-gxx-include-dir is also specified.
11893 * configure: Regenerate.
11895 2018-05-09 Jim Wilson <jimw@sifive.com>
11898 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
11899 * config/riscv/t-withmultilib: New.
11900 * config/riscv/withmultilib.h: New.
11901 * doc/install.texi: Document RISC-V --with-multilib-list support.
11903 2018-05-09 Richard Biener <rguenther@suse.de>
11905 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
11907 (vect_bb_vectorization_profitable_p): Adjust. Compute
11908 actual scalar cost using the cost vector and the add_stmt_cost
11911 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
11913 PR rtl-optimization/85645
11914 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
11915 in the REG_CFA_REGISTER note for LR, don't leave it empty.
11917 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
11919 PR rtl-optimization/85645
11920 * shrink-wrap.c (spread_components): Return a boolean saying if
11921 anything was changed.
11922 (try_shrink_wrapping_separate): Iterate spread_components until
11923 nothing changes anymore.
11925 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
11927 PR rtl-optimization/85645
11928 * regrename.c (build_def_use): Also kill the chains that include the
11929 destination of a REG_CFA_REGISTER note.
11931 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
11933 PR rtl-optimization/85645
11934 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
11935 insn that has a REG_CFA_REGISTER note.
11937 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
11939 * cfgexpand.c (expand_clobber): New function.
11940 (expand_gimple_stmt_1): Use it.
11941 * tree-vect-stmts.c (vect_clobber_variable): New function,
11943 (vectorizable_simd_clone_call): ...here.
11944 (vectorizable_store): Emit a clobber either side of an
11945 IFN_STORE_LANES sequence.
11946 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
11948 2018-05-09 Tom de Vries <tom@codesourcery.com>
11951 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
11952 (define_insn "trap_if_false"): Add exit after trap.
11954 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
11956 PR rtl-optimization/85638
11957 * bb-reorder.c: Include common/common-target.h.
11958 (create_forwarder_block): New function extracted from...
11959 (fix_up_crossing_landing_pad): ...here. Rename into...
11960 (dw2_fix_up_crossing_landing_pad): ...this.
11961 (sjlj_fix_up_crossing_landing_pad): New function.
11962 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
11963 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
11964 from both partitions and exit the loop after one iteration.
11966 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
11969 * doc/extend.texi (PowerPC Built-in Functions): Rename this
11971 (Basic PowerPC Built-in Functions): The new name of the
11972 subsection previously known as "PowerPC Built-in Functions".
11973 (Basic PowerPC Built-in Functions Available on all Configurations):
11975 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
11977 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
11979 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
11981 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
11984 2018-05-08 Jim Wilson <jimw@sifive.com>
11986 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
11987 (LD_EMUL_SUFFIX): New.
11988 (LINK_SPEC): Use it.
11990 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
11992 * doc/extend.texi (PowerPC Built-in Functions): Rename this
11994 (Basic PowerPC Built-in Functions): The new name of the
11995 subsection previously known as "PowerPC Built-in Functions".
11996 (Basic PowerPC Built-in Functions Available on all Configurations):
11998 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
12000 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
12002 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
12004 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
12007 2018-05-08 Jakub Jelinek <jakub@redhat.com>
12010 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
12011 after cmpelim optimization.
12013 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
12015 * config.gcc: Support "goldmont".
12016 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
12017 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12018 PROCESSOR_GOLDMONT.
12019 * config/i386/i386.c (m_GOLDMONT): Define.
12020 (processor_target_table): Add "goldmont".
12021 (PTA_GOLDMONT): Define.
12022 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
12023 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
12024 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
12025 (fold_builtin_cpu): Add "goldmont".
12026 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
12027 (ix86_option_override_internal): Add "goldmont".
12028 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
12029 (processor_type): Add PROCESSOR_GOLDMONT.
12030 * config/i386/i386.md: Add CPU "glm".
12031 * config/i386/glm.md: New file.
12032 * config/i386/x86-tune.def: Add m_GOLDMONT.
12033 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
12035 2018-05-08 Jakub Jelinek <jakub@redhat.com>
12038 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
12040 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
12041 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
12042 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
12045 * config/i386/i386.c (ix86_fold_builtin): Handle
12046 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
12049 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
12050 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
12052 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
12055 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
12056 (check_arch): Likewise.
12057 (check_fpu): Return the result rather than printing it.
12058 (end arch): Fix operator precedence.
12059 (end cpu): Likewise.
12060 (END): Print the result from check_fpu.
12062 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
12063 Alan Hayward <alan.hayward@arm.com>
12064 David Sherwood <david.sherwood@arm.com>
12066 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
12067 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
12068 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
12069 (*fcmuo<mode>_and): New patterns.
12071 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
12073 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
12074 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
12075 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
12076 (cmp_op, sve_imm_con): New code attributes.
12077 (SVE_COND_INT_CMP, imm_con): Delete.
12078 (cmp_op): Remove above unspecs from int attribute.
12079 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
12081 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
12082 comparison-specific unspecs.
12083 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
12084 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
12085 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
12086 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
12087 (*vec_fcm<cmp_op><mode>): Rename to...
12088 (*fcm<cmp_op><mode>): ...this and adjust likewise.
12089 (*vec_fcmuo<mode>): Rename to...
12090 (*fcmuo<mode>): ...this and adjust likewise.
12091 (*pred_fcm<cmp_op><mode>): New pattern.
12092 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
12093 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
12095 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
12097 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
12098 (aarch64_emit_sve_predicated_cond): New function.
12099 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
12100 (aarch64_emit_unspec_cond_or): Replace with...
12101 (aarch64_emit_sve_or_conds): ...this new function. Use
12102 aarch64_emit_sve_ptrue_op for the individual comparisons and
12103 aarch64_emit_binop to OR them together.
12104 (aarch64_emit_inverted_unspec_cond): Replace with...
12105 (aarch64_emit_sve_inverted_cond): ...this new function. Use
12106 aarch64_emit_sve_ptrue_op for the comparison and
12107 aarch64_emit_unop to invert the result.
12108 (aarch64_expand_sve_vec_cmp_float): Update after the above
12109 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
12111 2018-05-07 Nathan Sidwell <nathan@acm.org>
12113 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
12114 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
12115 (Backwards Compatibility): Likewise.
12117 2018-05-07 Luis Machado <luis.machado@linaro.org>
12121 2018-05-07 Luis Machado <luis.machado@linaro.org>
12123 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12124 <prefetch_dynamic_strides>: New const bool field.
12125 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12126 prefetch_dynamic_strides.
12127 (exynosm1_prefetch_tune): Likewise.
12128 (thunderxt88_prefetch_tune): Likewise.
12129 (thunderx_prefetch_tune): Likewise.
12130 (thunderx2t99_prefetch_tune): Likewise.
12131 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
12133 (aarch64_override_options_internal): Update to set
12134 PARAM_PREFETCH_DYNAMIC_STRIDES.
12135 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12136 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12137 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12138 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12139 prefetch-dynamic-strides setting.
12141 2018-05-07 Luis Machado <luis.machado@linaro.org>
12143 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12144 <minimum_stride>: New const int field.
12145 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12146 minimum_stride field.
12147 (exynosm1_prefetch_tune): Likewise.
12148 (thunderxt88_prefetch_tune): Likewise.
12149 (thunderx_prefetch_tune): Likewise.
12150 (thunderx2t99_prefetch_tune): Likewise.
12151 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
12152 (aarch64_override_options_internal): Update to set
12153 PARAM_PREFETCH_MINIMUM_STRIDE.
12154 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12155 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12156 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12157 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12158 stride is constant and is below the minimum stride threshold.
12160 2018-05-07 Luis Machado <luis.machado@linaro.org>
12162 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
12165 2018-05-07 Luis Machado <luis.machado@linaro.org>
12167 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12168 <prefetch_dynamic_strides>: New const bool field.
12169 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12170 prefetch_dynamic_strides.
12171 (exynosm1_prefetch_tune): Likewise.
12172 (thunderxt88_prefetch_tune): Likewise.
12173 (thunderx_prefetch_tune): Likewise.
12174 (thunderx2t99_prefetch_tune): Likewise.
12175 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
12177 (aarch64_override_options_internal): Update to set
12178 PARAM_PREFETCH_DYNAMIC_STRIDES.
12179 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12180 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12181 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12182 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12183 prefetch-dynamic-strides setting.
12185 2018-05-07 Luis Machado <luis.machado@linaro.org>
12187 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12188 <minimum_stride>: New const int field.
12189 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12190 minimum_stride field.
12191 (exynosm1_prefetch_tune): Likewise.
12192 (thunderxt88_prefetch_tune): Likewise.
12193 (thunderx_prefetch_tune): Likewise.
12194 (thunderx2t99_prefetch_tune): Likewise.
12195 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
12196 (aarch64_override_options_internal): Update to set
12197 PARAM_PREFETCH_MINIMUM_STRIDE.
12198 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12199 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12200 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12201 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12202 stride is constant and is below the minimum stride threshold.
12204 2018-05-06 Jakub Jelinek <jakub@redhat.com>
12207 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
12208 the type is addressable. Don't force op into register if it has
12211 2018-05-05 Roland McGrath <mcgrathr@google.com>
12214 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
12215 any section for which we don't know a specific type it should have,
12216 regardless of name. Previously this was done only for the exact
12217 names ".init_array", ".fini_array", and ".preinit_array".
12218 (default_elf_asm_named_section): Add comment about
12219 relationship with default_section_type_flags and SECTION_NOTYPE.
12220 (get_section): Don't consider it a type conflict if one side has
12221 SECTION_NOTYPE and the other doesn't, as long as neither has the
12222 SECTION_BSS et al used in the default_section_type_flags logic.
12224 2018-05-05 Tom de Vries <tom@codesourcery.com>
12227 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
12228 (workaround_barsyncs): New function.
12229 (nvptx_reorg): Use workaround_barsyncs.
12230 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
12231 (define_expand "nvptx_membar_cta"): New define_expand.
12232 (define_insn "*nvptx_membar_cta"): New insn.
12234 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
12236 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
12237 To improve optimization opportunities.
12238 * builtin-types.def: The new needed builtin types for the above.
12240 2018-05-04 Richard Biener <rguenther@suse.de>
12242 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
12243 * gimple-ssa-store-merging.c
12244 (imm_store_chain_info::output_merged_store): Remove redundant create,
12245 release split_store vector contents on failure.
12246 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
12247 scalar stmt vector on cache hit.
12249 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
12251 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
12253 * config.gcc (powerpc-xilinx-eabi*): Remove.
12254 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
12256 (fusion_addis_mem_combo_load): Ditto.
12257 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
12259 (rs6000_cpu_cpp_builtins): Ditto.
12260 * config/rs6000/rs6000-linux.c
12261 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
12262 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
12263 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
12265 (rs6000_setup_reg_addr_masks): Ditto.
12266 (rs6000_init_hard_regno_mode_ok): Ditto.
12267 (rs6000_option_override_internal): Ditto.
12268 (legitimate_lo_sum_address_p): Ditto.
12269 (rs6000_legitimize_address): Ditto.
12270 (rs6000_legitimize_reload_address): Ditto.
12271 (rs6000_legitimate_address_p): Ditto.
12272 (abi_v4_pass_in_fpr): Ditto.
12273 (setup_incoming_varargs): Ditto.
12274 (rs6000_gimplify_va_arg): Ditto.
12275 (rs6000_split_multireg_move): Ditto.
12276 (rs6000_savres_strategy): Ditto.
12277 (rs6000_emit_prologue_components): Ditto.
12278 (rs6000_emit_epilogue_components): Ditto.
12279 (rs6000_emit_prologue): Ditto.
12280 (rs6000_emit_epilogue): Ditto.
12281 (rs6000_elf_file_end): Ditto.
12282 (rs6000_function_value): Ditto.
12283 (rs6000_libcall_value): Ditto.
12284 * config/rs6000/rs6000.h: Ditto.
12285 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
12286 (TARGET_MINMAX): ... this. New.
12287 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
12288 * config/rs6000/rs6000.md: Remove Xilinx FP support.
12289 (*movsi_internal1_single): Delete.
12290 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
12291 mfpu=, mxilinx-fpu): Delete.
12292 * config/rs6000/singlefp.h: Delete.
12293 * config/rs6000/sysv4.h: Remove Xilinx FP support.
12294 * config/rs6000/t-rs6000: Ditto.
12295 * config/rs6000/t-xilinx: Delete.
12296 * config/rs6000/titan.md: Adjust for fp_type removal.
12297 * config/rs6000/vsx.md: Remove Xilinx FP support.
12298 (VStype_simple): Delete.
12299 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
12300 * config/rs6000/xfpu.h: Delete.
12301 * config/rs6000/xfpu.md: Delete.
12302 * config/rs6000/xilinx.h: Delete.
12303 * config/rs6000/xilinx.opt: Delete.
12304 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
12305 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
12307 2018-05-04 Tom de Vries <tom@codesourcery.com>
12310 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
12313 2018-05-04 Richard Biener <rguenther@suse.de>
12315 PR middle-end/85627
12316 * tree-complex.c (update_complex_assignment): We are always in SSA form.
12317 (expand_complex_div_wide): Likewise.
12318 (expand_complex_operations_1): Likewise.
12319 (expand_complex_libcall): Preserve EH info of the original stmt.
12320 (tree_lower_complex): Handle removed blocks.
12321 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
12322 on complex multiplication and division libcall builtins.
12324 2018-05-04 Richard Biener <rguenther@suse.de>
12326 PR middle-end/85574
12327 * fold-const.c (negate_expr_p): Restrict negation of operand
12328 zero of a division to when we know that can happen without
12330 (fold_negate_expr_1): Likewise.
12332 2018-05-04 Jakub Jelinek <jakub@redhat.com>
12335 * real.h (real_nextafter): Declare.
12336 * real.c (real_nextafter): New function.
12337 * fold-const-call.c (fold_const_nextafter): New function.
12338 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
12339 CASE_CFN_NEXTTOWARD.
12340 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
12341 even when arg1_mode is different from arg0_mode.
12343 2018-05-03 Nathan Sidwell <nathan@acm.org>
12345 * doc/extend.texi (Deprecated Features): Remove
12346 -ffriend-injection.
12347 (Backwards Compatibility): Likewise.
12348 * doc/invoke.texi (C++ Language Options): Likewise.
12349 (C++ Dialect Options): Likewise.
12351 2018-05-03 Jakub Jelinek <jakub@redhat.com>
12354 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
12355 _mm512_mask_mullox_epi64): New intrinsics.
12357 2018-05-03 Tom de Vries <tom@codesourcery.com>
12360 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12361 dump files): Add offload-tree.
12363 2018-05-03 Richard Biener <rguenther@suse.de>
12365 PR tree-optimization/85615
12366 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
12367 to loops not nested in BBs loop father to avoid creating multi-entry
12370 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12372 PR tree-optimization/70291
12373 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
12374 arguments. Change return type to tree. Emit libcall as a new
12375 statement rather than replacing existing one when inplace_p is true.
12376 (expand_complex_multiplication_components): New function.
12377 (expand_complex_multiplication): Expand floating-point complex
12378 multiplication using the above.
12379 (expand_complex_division): Rename inner_type parameter to type.
12380 Update expand_complex_libcall call-site.
12381 (expand_complex_operations_1): Update expand_complex_multiplication
12382 and expand_complex_division call-sites.
12384 2018-05-02 Jakub Jelinek <jakub@redhat.com>
12387 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
12388 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
12389 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
12390 the highest significant bit of the shift count mask is clear. In
12391 check whether and[sq]i3 is needed verify that all significant bits
12392 of the shift count other than the highest are set.
12394 2018-05-02 Tom de Vries <tom@codesourcery.com>
12397 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
12398 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
12399 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
12400 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
12401 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
12402 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
12403 __builtin_goacc_parlevel_size.
12405 2018-05-02 Richard Biener <rguenther@suse.de>
12407 PR tree-optimization/85597
12408 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
12409 do not use split vect_get_vec_defs call but call vect_get_slp_defs
12412 2018-05-02 Tom de Vries <tom@codesourcery.com>
12415 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12416 dump files): Add ltrans-tree.
12418 2018-05-02 Tom de Vries <tom@codesourcery.com>
12421 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12422 dump files): Add wpa-ipa.
12424 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
12426 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
12427 powerpc*-*-linux*paired* target.
12428 * config/rs6000/750cl.h: Delete.
12429 * config/rs6000/paired.h: Delete.
12430 * config/rs6000/paired.md: Delete.
12431 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
12433 * config/rs6000/rs6000-builtin.def: Remove paired float support.
12434 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
12435 comment. Remove paired float support.
12436 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
12437 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
12439 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
12440 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
12442 * config/rs6000/rs6000.c: Remove paired float support.
12443 (paired_expand_vector_init, paired_expand_vector_move,
12444 paired_emit_vector_compare, paired_emit_vector_cond_expr,
12445 (paired_expand_lv_builtin, paired_expand_stv_builtin,
12446 paired_expand_builtin, paired_expand_predicate_builtin,
12447 paired_init_builtins): Delete.
12448 * config/rs6000/rs6000.h: Remove paired float support.
12449 * config/rs6000/rs6000.md: Remove paired float support.
12450 (move_from_CR_ov_bit): Delete.
12451 * config/rs6000/rs6000.opt (mpaired): Delete.
12452 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
12453 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
12455 2018-05-02 Richard Biener <rguenther@suse.de>
12457 PR middle-end/85567
12458 * gimplify.c (gimplify_save_expr): When in SSA form allow
12459 SAVE_EXPRs to compute to SSA vars.
12461 2018-05-02 Jakub Jelinek <jakub@redhat.com>
12464 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
12465 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
12466 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
12467 clobber operands[2], instead use a new pseudo. Formatting fixes.
12469 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
12471 PR tree-optimization/85586
12472 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
12473 exit early for statements in the same group if the accesses are
12476 2018-05-02 Tom de Vries <tom@codesourcery.com>
12479 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
12482 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
12484 PR tree-optimization/85143
12485 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
12487 2018-05-01 Tom de Vries <tom@codesourcery.com>
12490 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
12491 not found" error message.
12493 2018-05-01 Tom de Vries <tom@codesourcery.com>
12496 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
12497 * vec.c (test_ordered_remove_if): New function.
12498 (vec_c_tests): Call test_ordered_remove_if.
12499 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
12500 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
12501 * tree-vect-patterns.c (vect_pattern_recog_1): Use
12502 VEC_ORDERED_REMOVE_IF.
12504 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12506 PR tree-optimization/82665
12507 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
12508 pointer subtraction where arguments come from a memchr call.
12510 2018-05-01 Jakub Jelinek <jakub@redhat.com>
12512 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
12513 --push-state --as-needed and --pop-state instead of --as-needed and
12514 --no-as-needed if ld supports it.
12515 * configure: Regenerated.
12518 * doc/install.texi2html: Replace _002d with - and _002a with * in
12519 generated html files using sed.
12521 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12524 * gcc-rich-location.c (blank_line_before_p): New function.
12525 (use_new_line): New function.
12526 (gcc_rich_location::add_fixit_insert_formatted): New function.
12527 * gcc-rich-location.h
12528 (gcc_rich_location::add_fixit_insert_formatted): New function.
12530 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12532 * selftest.c (assert_streq): Rename "expected" and "actual" to
12533 "val1" and "val2". Extend NULL-handling to cover both inputs
12534 symmetrically, while still requiring both to be non-NULL for a pass.
12535 * selftest.h (assert_streq): Rename "expected" and "actual" to
12537 (ASSERT_EQ): Likewise.
12538 (ASSERT_EQ_AT): Likewise.
12539 (ASSERT_KNOWN_EQ): Likewise.
12540 (ASSERT_KNOWN_EQ_AT): Likewise.
12541 (ASSERT_NE): Likewise.
12542 (ASSERT_MAYBE_NE): Likewise.
12543 (ASSERT_MAYBE_NE_AT): Likewise.
12544 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
12545 the assertion to pass.
12546 (ASSERT_STREQ_AT): Likewise.
12548 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
12550 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
12551 interaction with -pie.
12553 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12555 * selftest.h: Fix alphabetization of per-source-file selftest
12558 2018-04-30 Jason Merrill <jason@redhat.com>
12560 PR c++/61982 - dead stores to destroyed objects.
12561 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
12564 2018-04-30 Jason Merrill <jason@redhat.com>
12566 * tree.c (build_clobber): New.
12567 * tree.h: Declare it.
12568 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
12570 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12572 * diagnostic-show-locus.c (layout::layout): Update for
12573 location_get_source_line returning a char_span.
12574 (struct char_span): Move to input.h.
12575 (struct correction): Update for fields in char_span becoming
12577 (struct source_line): Update for location_get_source_line
12578 returning a char_span.
12579 (layout::print_line): Likewise.
12580 * edit-context.c (edited_file::print_content): Likewise.
12581 (edited_file::print_diff_hunk): Likewise.
12582 (edited_file::print_run_of_changed_lines): Likewise.
12583 (edited_file::get_num_lines): Likewise.
12584 (edited_line::edited_line): Likewise.
12585 * final.c (asm_show_source): Likewise.
12586 * input.c (location_get_source_line): Convert return type
12587 from const char * to char_span, losing the final "line_len"
12589 (dump_location_info): Update for the above.
12590 (get_substring_ranges_for_loc): Likewise. Use a char_span
12591 when handling the literal within the line.
12592 (test_reading_source_line): Update for location_get_source_line
12593 returning a char_span.
12594 * input.h (class char_span): Move here from
12595 diagnostic-show-locus.c, converting from a struct to a class.
12596 Make data members private.
12597 (char_span::operator bool): New.
12598 (char_span::length): New.
12599 (char_span::get_buffer): New.
12600 (char_span::operator[]): New.
12601 (char_span::subspan): Make const.
12602 (char_span::xstrdup): New.
12603 (location_get_source_line): Convert return type from const char *
12604 to char_span, losing the final "line_size" param.
12606 2018-04-30 Jan Hubicka <jh@suse.cz>
12608 * lto-wrapper.c (ltrans_priorities): New static var.
12609 (cmp_priority): New.
12610 (run_gcc): Read priorities and if doing parallel build order
12611 the Makefile by them.
12613 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12615 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
12617 2018-04-30 Richard Biener <rguenther@suse.de>
12619 * tree-cfg.c (verify_address): Remove base argument, add
12620 flag whether to check TREE_ADDRESSABLE and do that.
12621 (verify_expr): Remove.
12622 (verify_types_in_gimple_reference): Add pieces from verify_expr.
12623 (verify_gimple_assign_single): Likewise.
12624 (verify_gimple_switch): Likewise.
12625 (verify_expr_location_1): Dereference tp once. Add (disabled)
12626 piece from verify_expr.
12627 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
12629 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
12631 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
12633 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
12635 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
12636 (small_data_pattern): Likewise.
12637 (arc_rewrite_small_data): Likewise.
12638 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
12639 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
12640 (get_symbol_alignment): New function.
12641 (legitimate_small_data_address_p): Likewise.
12642 (legitimate_scaled_address): Update, call
12643 legitimate_small_data_address_p.
12644 (output_sdata): New static variable.
12645 (arc_print_operand): Update how we handle small data operands.
12646 (arc_print_operand_address): Likewise.
12647 (arc_legitimate_address_p): Update, use
12648 legitimate_small_data_address_p.
12649 (arc_rewrite_small_data_p): Remove.
12650 (arc_rewrite_small_data_1): Likewise.
12651 (arc_rewrite_small_data): Likewise.
12652 (small_data_pattern): Likewise.
12653 (compact_sda_memory_operand): Update to use
12654 legitimate_small_data_address_p and get_symbol_alignment.
12655 (prepare_move_operands): Don't rewite sdata pattern.
12656 (prepare_extend_operands): Remove.
12657 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
12659 (zero_extendqisi2): Likewise.
12660 (zero_extendhisi2): Likewise.
12661 (extendqihi2): Likewise.
12662 (extendqisi2): Likewise.
12663 (extendhisi2): Likewise.
12664 (addsi3): Likewise.
12665 (subsi3): Likewise.
12666 (andsi3): Likewise.
12667 * config/arc/constraints.md (Usd): Change it to memory constraint.
12669 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
12671 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
12672 as source of std instructions.
12673 * config/arc/arc.md (movsi_insn): Update pattern predicate to
12674 allow 6-bit constants as source for store instructions.
12675 (movdi_insn): Update instruction pattern to allow 6-bit constants
12676 as source for store instructions.
12678 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
12680 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
12682 2018-04-30 Nathan Sidwell <nathan@acm.org>
12683 Sandra Loosemore <sandra@codesourcery.com>
12685 * dumpfile.c (dump_open): Allow '-' for stdout.
12686 * doc/invoke.texi (Developer Options): Document dump filename
12687 determination early. Document stdin/stdout selection.
12689 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
12691 Microblaze Target: PIC data text relative
12693 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
12694 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
12696 * config/microblaze/microblaze.h (microblaze_constant_address_p):
12697 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
12698 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
12699 New addressing mode for data-text relative position indepenedent code.
12700 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
12701 'ADDRESS_SYMBOLIC_TXT_REL'.
12702 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
12703 (microblaze_legitimate_pic_operand): Exclude function calls from
12704 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
12705 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
12707 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
12708 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
12709 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
12710 for 'address + offset'.
12711 (microblaze_expand_prologue): Add new function prologue call for
12713 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
12714 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
12715 table in case of TARGET_PIC_DATA_TEXT_REL.
12716 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
12717 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
12718 Add new macros 'UNSPEC_TEXT',
12719 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
12720 + exclude function calls from 'UNSPEC_PLT' in case of data text
12722 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
12723 new target hook for generating address diff vector tables in case of
12725 * doc/tm.texi : Regenerate.
12726 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
12727 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
12728 of addr diff vector generation.
12729 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
12730 target hook definition.
12731 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
12732 Add default function for generate_pic_addr_diff_vec -> flag_pic.
12733 * doc/invoke.texi (Add new pic option): Add new microblaze pic
12734 option for data text relative.
12736 2018-04-30 Richard Biener <rguenther@suse.de>
12738 * tree-chrec.h (evolution_function_is_constant_p): Remove
12740 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
12742 2018-04-30 Richard Biener <rguenther@suse.de>
12745 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
12747 2018-04-30 Richard Biener <rguenther@suse.de>
12749 PR tree-optimization/28364
12750 PR tree-optimization/85275
12751 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
12752 copying first exit test.
12754 2018-04-28 Mark Wielaard <mark@klomp.org>
12756 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
12757 dwarf_version >= 5.
12758 (dwarf_AT): Handle DW_AT_addr_base.
12759 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
12761 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
12764 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
12765 (*ashl<dwi>3_doubleword_mask_1): Ditto.
12766 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
12767 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
12769 2018-04-28 Richard Biener <rguenther@suse.de>
12771 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
12772 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
12773 to reflect use. Only add interesting stmts.
12775 2018-04-27 Martin Jambor <mjambor@suse.cz>
12778 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
12779 the jump function allows for passing through aggregate values.
12781 2018-04-27 David Malcolm <dmalcolm@redhat.com>
12783 * input.h (in_system_header_at): Convert from macro to inline
12785 (from_macro_expansion_at): Likewise.
12786 (from_macro_definition_at): Likewise.
12788 2018-04-27 Jeff Law <law@redhat.com>
12790 * config.gcc: Mark tile* targets as deprecated/obsolete.
12792 2018-04-27 Richard Biener <rguenther@suse.de>
12794 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
12797 2018-04-27 Richard Biener <rguenther@suse.de>
12799 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
12801 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
12803 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
12804 with Yd constraint. Set "preferred_for_speed" attribute from
12805 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
12806 with Yd constraint.
12807 (*movdi_internal): Ditto.
12808 (movti_interunit splitters): Remove
12809 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
12810 (movdi_interunit splitters): Ditto.
12811 * config/i386/constraints.md (Ye): Remove.
12812 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
12814 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12817 * config/aarch64/constraints.md (Usg): Limit to 31.
12818 (Usj): Limit to 63.
12820 2018-04-27 Jakub Jelinek <jakub@redhat.com>
12822 PR tree-optimization/85529
12823 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
12824 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
12825 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
12826 zero extension or masking of the MSB bit.
12827 (optimize_range_tests): Add FIRST_BB argument, pass it through
12828 to optimize_range_tests_var_bound.
12829 (maybe_optimize_range_tests, reassociate_bb): Adjust
12830 optimize_range_tests callers.
12832 2018-04-26 Richard Biener <rguenther@suse.de>
12833 Jakub Jelinek <jakub@redhat.com>
12835 * cgraph.h (symbol_table): Just declare debug method here.
12836 * symtab.c (symbol_table::debug): Define.
12838 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
12840 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
12842 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
12844 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
12845 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
12846 (*movdi_internal): Substitute Yi and Yj constraint with x
12847 and Ym and Yn constraint with y constraint. Update "isa"
12848 attribute and set "preferred_for_speed" attribute from
12849 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
12850 (*movsi_internal): Ditto.
12851 (*movdf_internal): Ditto.
12852 (*movsf_internal): Ditto.
12853 (*zero_extendsidi2): Ditto.
12854 * config/i386/sse.md (vec_set<mode>_0): Ditto.
12855 (sse2_loadld): Ditto.
12856 (*vec_extract<ssevecmodelower>_0): Ditto.
12857 (*vec_extractv4si_0_zext_sse4): Ditto.
12858 (vec_concatv2di): Ditto.
12859 (*vec_dup<mode>): Ditto.
12860 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
12861 * config/i386/constraints.md (Yi): Remove.
12866 2018-04-26 Nathan Sidwell <nathan@acm.org>
12868 * dumpfile.c (dump_open): New.
12869 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
12870 (dump_finish): Detect stdio/stderr by value not name.
12872 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
12874 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
12876 2018-04-26 Tom de Vries <tom@codesourcery.com>
12879 * config/nvptx/nvptx.c (verify_neutering_jumps)
12880 (verify_neutering_labels): New function
12881 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
12883 2018-04-26 Tom de Vries <tom@codesourcery.com>
12886 * config/nvptx/nvptx.c (needs_neutering_p): New function.
12887 (nvptx_single): Use needs_neutering_p to skip over insns that do not
12890 2018-04-26 Richard Biener <rguenther@suse.de>
12891 Tom de Vries <tom@codesourcery.com>
12894 * lto-streamer-out.c (output_function): Fixup loops if required to match
12895 discovery done in the reader.
12897 2018-04-26 Richard Biener <rguenther@suse.de>
12899 PR tree-optimization/85116
12900 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
12901 have a loop exit from the single latch predecessor. Remove
12902 case of header with just condition.
12903 (ch_base::copy_headers): Exclude infinite loops from any
12905 (pass_ch::execute): Record exits.
12907 2018-04-26 Richard Biener <rguenther@suse.de>
12909 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
12910 prologue cost vector and pass it to vect_get_load_cost.
12911 (vect_get_peeling_costs_all_drs): Likewise.
12912 (vect_peeling_hash_get_lowest_cost): Likewise.
12913 (vect_enhance_data_refs_alignment): Likewise.
12915 2018-04-26 Richard Biener <rguenther@suse.de>
12917 PR middle-end/85450
12918 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
12919 checking of integer<->pointer conversions.
12920 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
12921 sign-/zero-extending pointer types.
12922 (expand_omp_for_static_chunk): Likewise.
12924 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
12925 Jean Lee <xiaoyur347@gmail.com>
12927 * config/mips/mips.c (mips_asan_shadow_offset): New function.
12928 (TARGET_ASAN_SHADOW_OFFSET): Define.
12929 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
12930 true for -fsanitize=address.
12932 2018-04-25 Mark Wielaard <mark@klomp.org>
12934 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
12937 2018-04-25 Jakub Jelinek <jakub@redhat.com>
12939 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
12940 than "alu", remove explicit "memory" and "imm_disp" attributes.
12941 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
12943 PR middle-end/85414
12944 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
12945 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
12946 gen_lowpart_no_emit.
12948 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
12951 * config/i386/i386.c (ix86_expand_builtin): Change memory
12952 operand to XI, extend p0 to Pmode.
12953 * config/i386/i386.md: Change unspec volatile and operand
12954 1 mode to XI, change operand 0 mode to P.
12956 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
12958 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
12959 GET_MODE_MASK before any checking.
12960 (nds32_can_use_bset_p): Likewise.
12961 (nds32_can_use_btgl_p): Likewise.
12963 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
12965 * config/nds32/nds32-doubleword.md: New define_split pattern for
12966 illegal register number.
12968 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
12970 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
12972 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
12974 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
12976 2018-04-25 Richard Biener <rguenther@suse.de>
12978 * lto-streamer.h (LTO_major_version): Bump to 8.
12980 2018-04-25 Jakub Jelinek <jakub@redhat.com>
12982 * BASE-VER: Set to 9.0.0.
12984 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
12986 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
12987 in __abskf2 and __powikf2.
12989 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12992 * config/aarch64/constraints.md (Usg, Usj): New constraints.
12993 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
12994 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
12995 Use the above on operand 2. Reindent.
12996 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
12998 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
13001 * common/config/i386/i386-common.c (ix86_handle_option): Don't
13003 * config/i386/i386.opt (mcet): Removed.
13004 * doc/install.texi: Remove -mcet documentation.
13005 * doc/invoke.texi: Likewise.
13007 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
13010 * doc/install.texi: Remove -mcet from bootstrap-cet.
13012 2018-04-24 Jakub Jelinek <jakub@redhat.com>
13015 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
13016 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
13020 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
13021 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
13022 containing a CONST_VECTOR.
13024 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
13026 * doc/install.texi: Update newlib dependency for nvptx.
13028 2018-04-24 Jakub Jelinek <jakub@redhat.com>
13031 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
13032 instead of INTVAL when shifting x left.
13034 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
13036 PR tree-optimization/85478
13037 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
13038 vect_grouped_store_supported for single element vectors.
13040 2018-04-24 Richard Biener <rguenther@suse.de>
13043 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
13044 load cost increase to the case of non-constant step.
13046 2018-04-24 Jakub Jelinek <jakub@redhat.com>
13049 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
13050 destination if any_malformed_asm.
13052 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
13054 PR middle-end/85496
13055 * expr.c (store_field): In the bitfield case, if the value comes from
13056 a function call and is returned in registers by means of a PARALLEL,
13057 do not change the mode of the temporary unless BLKmode and VOIDmode.
13059 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
13061 PR rtl-optimization/85423
13062 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
13063 dependencies to debug insns when the previous insn is non-debug.
13065 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
13067 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
13068 enums into a single definition.
13069 (fls): Fix predicates and printing.
13072 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
13074 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
13075 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
13076 and short u6 immediate.
13077 (check_if_valid_sleep_operand): Remove.
13078 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
13080 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13082 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
13083 flag_always_save_lp condition.
13084 * config/nds32/nds32.opt (malways-save-lp): New option.
13086 2018-04-22 Shiva Chen <shiva0217@gmail.com>
13088 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
13089 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
13090 * config/nds32/nds32.h
13091 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
13092 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
13094 2018-04-22 Shiva Chen <shiva0217@gmail.com>
13096 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
13097 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
13099 2018-04-22 Shiva Chen <shiva0217@gmail.com>
13100 Chung-Ju Wu <jasonwucj@gmail.com>
13102 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
13104 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
13105 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
13107 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13109 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
13111 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13113 * config/nds32/nds32-protos.h (nds32_data_alignment,
13114 nds32_local_alignment): Declare.
13115 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
13116 nds32_local_alignment): New functions.
13117 (TARGET_CONSTANT_ALIGNMENT): Define.
13118 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
13120 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13122 * config/nds32/nds32.c
13123 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
13124 (TARGET_MODES_TIEABLE_P): Likewise.
13126 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13128 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
13129 level Ofast and Og.
13131 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
13132 Chung-Ju Wu <jasonwucj@gmail.com>
13134 * config/nds32/constants.md (unspec_volatile_element): Add enum values
13135 for unaligned access.
13136 * config/nds32/nds32-intrinsic.c: Implementation of expanding
13138 * config/nds32/nds32-intrinsic.md: Likewise.
13139 * config/nds32/nds32_intrinsic.h: Likewise.
13140 * config/nds32/nds32.h (nds32_builtins): Likewise.
13141 * config/nds32/nds32.opt (munaligned-access): New option.
13142 * config/nds32/nds32.c (nds32_asm_file_start): Display
13143 flag_unaligned_access status.
13145 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
13147 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
13148 -mno-relax is present.
13149 * config/riscv/linux.h (LINK_SPEC): Ditto.
13151 2018-04-20 Martin Sebor <msebor@redhat.com>
13154 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
13156 (gimple_fold_builtin_stxcpy_chk): Same.
13157 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
13159 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
13162 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
13163 __powikf2 when long double is IEEE 128-bit.
13165 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
13167 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
13168 step to make sure stack always aligned.
13170 2018-04-20 Carl Love <cel@us.ibm.com>
13173 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
13174 size check for arg0.
13176 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
13177 Tom de Vries <tom@codesourcery.com>
13180 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
13181 Emit insns for calls too.
13182 (nvptx_find_par): Always look for worker-level predecessor insn.
13183 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
13185 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
13186 (nvptx_process_pars): Propagate frames for calls.
13188 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
13191 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
13193 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
13194 (ix86_handle_option): Don't handle OPT_mibt.
13195 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
13197 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
13199 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
13200 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
13201 (ix86_target_macros): Define __CET__ with flag_cf_protection
13202 for -fcf-protection.
13203 * config/i386/i386.c (isa2_opts): Remove -mibt.
13204 * config/i386/i386.h (TARGET_IBT): Removed.
13205 (TARGET_IBT_P): Likewise.
13206 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
13207 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
13208 * config/i386/i386.opt (mcet): Update help message.
13209 (mshstk): Likewise.
13211 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
13212 -mcet as an alias for -mshstk.
13214 2018-04-20 Richard Biener <rguenther@suse.de>
13216 PR middle-end/85475
13217 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
13218 complexity by forcing a single use of the multiply operand.
13220 2018-04-20 Martin Jambor <mjambor@suse.cz>
13223 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
13224 recursion dependency to only apply to non-clones.
13226 2018-04-20 Martin Jambor <mjambor@suse.cz>
13229 * ipa-cp.c (create_specialized_node): Check that clones of
13230 self-recursive edges exist during IPA-CP.
13232 2018-04-19 Toon Moene <toon@moene.org>
13234 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
13237 2018-04-19 Jakub Jelinek <jakub@redhat.com>
13239 PR tree-optimization/85467
13240 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
13241 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
13242 VECTOR_CST element to type.
13244 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
13247 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
13248 * config/i386/i386.md (builtin_setjmp_setup): Removed.
13249 (builtin_longjmp): Likewise.
13250 (save_stack_nonlocal): New pattern.
13251 (restore_stack_nonlocal): Likewise.
13253 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
13256 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
13257 Replace ASM_OUTPUT_LABEL with fprintf.
13259 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
13262 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
13263 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
13264 * config/i386/i386-c.c (ix86_target_macros_internal): Also
13265 define __IBT__ and __SHSTK__ for -fcf-protection.
13266 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
13268 (ix86_trampoline_init): Likewise.
13269 (x86_output_mi_thunk): Likewise.
13270 (ix86_notrack_prefixed_insn_p): Likewise.
13271 (ix86_option_override_internal): Don't disallow -fcf-protection.
13272 * config/i386/i386.md (rdssp<mode>): Also enable for
13274 (incssp<mode>): Likewise.
13275 (nop_endbr): Likewise.
13276 * config/i386/i386.opt (mcet): Change help message to built-in
13279 (mshstk): Likewise.
13280 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
13281 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
13282 enable CET built-in functions.
13284 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
13286 * common/config/i386/i386-common.c
13287 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
13288 OPTION_MASK_ISA_MOVDIRI_UNSET,
13289 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
13290 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
13291 * config.gcc (movdirintrin.h): New header.
13292 * config/i386/cpuid.h (bit_MOVDIRI,
13293 bit_MOVDIR64B): New bits.
13294 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
13296 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
13297 (VOID, PVOID, PCVOID)): New function types.
13298 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
13299 __builtin_ia32_directstoreu_u64,
13300 __builtin_ia32_movdir64b): New builtins.
13301 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
13302 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
13304 (ix86_valid_target_attribute_inner_p): Ditto.
13305 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
13306 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
13307 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
13308 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
13309 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
13310 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
13311 (movdiri<mode>, movdir64b_<mode>): New.
13312 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
13313 * config/i386/immintrin.h: Include movdirintrin.h.
13314 * config/i386/movdirintrin.h: New file.
13315 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
13317 2018-04-19 Richard Biener <rguenther@suse.de>
13319 PR middle-end/85455
13320 * cfg.c (clear_bb_flags): When loop state says we have
13321 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
13323 2018-04-19 Richard Biener <rguenther@suse.de>
13325 PR tree-optimization/84737
13326 * tree-vect-data-refs.c (vect_copy_ref_info): New function
13327 copying restrict info.
13328 (vect_setup_realignment): Use it.
13329 * tree-vectorizer.h (vect_copy_ref_info): Declare.
13330 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
13331 the first DR to all generated stores.
13332 (vectorizable_load): Likewise for loads.
13334 2018-04-19 Jakub Jelinek <jakub@redhat.com>
13336 PR tree-optimization/85446
13337 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
13338 the integral and pointer types to have the same precision.
13340 * doc/install.texi: Document --disable-cet being the default and
13343 2018-04-18 Martin Liska <mliska@suse.cz>
13345 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
13348 2018-04-18 Martin Liska <mliska@suse.cz>
13351 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
13354 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
13355 arguments if they are comparable.
13357 2018-04-18 Martin Liska <mliska@suse.cz>
13360 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
13363 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
13366 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
13369 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
13370 ENDBR after calling __morestack.
13372 2018-04-18 David Malcolm <dmalcolm@redhat.com>
13375 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
13376 by using gcc_base_ver to generate a gcc_driver_version, and use
13377 it when generating GCC_DRIVER_NAME.
13378 * configure: Regenerate.
13380 2018-04-18 Jakub Jelinek <jakub@redhat.com>
13383 * config.gcc: Obsolete powerpc*-*-*spe*.
13385 2018-04-17 Jakub Jelinek <jakub@redhat.com>
13388 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
13389 (stabstr_D): Change type of unum from unsigned int to
13390 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
13393 2018-04-17 Jim Wilson <jimw@sifive.com>
13396 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
13397 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
13398 Set arg_pointer_offset after using pretend_args_size.
13400 2018-04-17 Jakub Jelinek <jakub@redhat.com>
13402 PR rtl-optimization/85431
13403 * dse.c (record_store): Ignore zero width stores.
13406 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
13407 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
13408 __builtin_stack_restore rather than after it.
13409 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
13410 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
13411 argument instead of virtual_dynamic_stack_rtx.
13413 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
13415 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
13417 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
13418 Add note to error message to explain internal mapping of overloaded
13419 built-in function name to non-overloaded built-in function name.
13420 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
13423 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
13426 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
13427 where the inputs overlap with the output.
13429 2018-04-17 Jakub Jelinek <jakub@redhat.com>
13431 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
13432 (=v, v) alternative and explicit "memory" attribute.
13433 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
13434 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
13436 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
13437 "sselog1" type instead of "sselog".
13438 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
13439 "sselog". Remove explicit "memory" attribute.
13440 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
13441 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
13443 (vec_extract_hi_v32hi): Merge all alternatives into one, use
13444 "sselog1" type instead of "sselog". Remove explicit "memory"
13446 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
13447 use "sselog1" type instead of "sselog". Remove explicit "memory"
13449 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
13450 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
13452 (vec_extract_hi_v64qi): Merge all alternatives into one, use
13453 "sselog1" type instead of "sselog". Remove explicit "memory"
13455 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
13456 use "sselog1" type instead of "sselog". Remove explicit "memory"
13460 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
13462 PR middle-end/85414
13463 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
13466 2018-04-17 Martin Jambor <mjambor@suse.cz>
13469 * ipa-cp.c (create_specialized_node): Call
13470 expand_all_artificial_thunks if necessary.
13472 2018-04-17 Martin Liska <mliska@suse.cz>
13475 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
13476 in message, remote space in between '_G' and '('.
13478 2018-04-17 Jakub Jelinek <jakub@redhat.com>
13481 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
13482 avx512f_vmcmp<mode>3<round_saeonly_name>,
13483 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
13484 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
13485 avx512f_rndscale<mode><round_saeonly_name>,
13486 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
13487 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
13488 Use %<iptr>2 instead of %2 for -masm=intel.
13489 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
13490 avx512f_vcvttss2usi<round_saeonly_name>,
13491 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
13493 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
13494 avx512f_vcvttsd2usi<round_saeonly_name>,
13495 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
13496 Use %q1 instead of %1 for -masm=intel.
13497 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
13498 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
13499 of %3 for -masm=intel.
13500 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
13502 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
13504 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
13506 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
13507 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
13509 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
13511 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
13512 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
13513 %g1 and one with %0 and %1.
13514 (avx512er_vmrcp28<mode><round_saeonly_name>,
13515 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
13516 %1 for -masm=intel.
13517 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
13518 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
13519 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
13520 of %0 and %{%4%} for -masm=intel.
13521 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
13522 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
13523 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
13524 order of %0 and %{%5%}%{z%} for -masm=intel.
13526 2018-04-17 Jan Hubicka <jh@suse.cz>
13529 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
13531 2018-04-17 Martin Liska <mliska@suse.cz>
13534 * multiple_target.c (create_dispatcher_calls): Set apostrophes
13535 for target_clone error message. Make default implementation
13536 clone to be a local declaration.
13537 (separate_attrs): Add new argument and check for an empty
13539 (expand_target_clones): Handle it.
13540 (ipa_target_clone): Make redirection just for target_clones
13543 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
13544 Tom de Vries <tom@codesourcery.com>
13546 PR middle-end/84955
13547 * omp-expand.c (expand_oacc_for): Add dummy false branch for
13548 tiled basic blocks without omp continue statements.
13550 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
13553 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
13554 vec_extract expression as having side effects to make sure it gets
13557 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
13560 * config/i386/i386.c (get_builtin_code_for_version): Check
13563 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
13566 * config.gcc: Support "skylake".
13567 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13569 * config/i386/i386.c (m_SKYLAKE): Define.
13570 (processor_target_table): Add "skylake".
13571 (ix86_option_override_internal): Add "skylake".
13572 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
13573 PROCESSOR_CANNONLAKE.
13574 (get_builtin_code_for_version): Fix priority for
13575 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
13576 PROCESSOR_SKYLAKE-AVX512.
13577 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
13578 (processor_type): Add PROCESSOR_SKYLAKE.
13580 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
13581 Jason Merrill <jason@redhat.com>
13584 * convert.c (convert_to_integer_1): Use direct recursion for
13585 enumeral types and types with a precision less than the number
13586 of bits in their mode.
13588 2018-04-16 Julia Koval <julia.koval@intel.com>
13591 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
13592 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
13594 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
13597 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
13598 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
13599 and -mno-direct-move.
13601 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
13604 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
13605 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
13606 Ensure negative shifts result in {0}.
13608 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
13610 PR rtl-optimization/79916
13611 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
13612 regs (if any) to define how to gnerate SD moves when LRA is in
13615 2018-04-13 Jakub Jelinek <jakub@redhat.com>
13617 PR rtl-optimization/85393
13618 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
13619 * except.c (expand_dw2_landing_pad_for_region): Make static.
13620 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
13621 a label and unconditional jump to old_bb, rather than
13622 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
13625 PR rtl-optimization/85376
13626 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
13627 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
13628 instead of a specific value.
13630 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
13631 Bin Cheng <bin.cheng@arm.com>
13633 PR tree-optimization/82965
13634 PR tree-optimization/83991
13635 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
13636 by_profile_only parameter.
13637 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
13638 information if the loop was predicted to iterate too many times.
13639 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
13641 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
13644 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
13647 2018-04-13 Martin Liska <mliska@suse.cz>
13648 Jakub Jelinek <jakub@redhat.com>
13650 PR middle-end/81657
13651 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
13652 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
13653 * builtins.c (expand_builtin_memory_copy_args): Use
13654 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
13655 handle dest_addr == pc_rtx.
13657 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
13660 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
13661 asked to not generate direct moves.
13662 (fix_trunc<mode>si2_stfiwx): Similar.
13663 (fix_trunc<mode>si2_internal): Similar.
13665 2018-04-12 Jakub Jelinek <jakub@redhat.com>
13668 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
13669 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
13670 lookup if dest in some wider mode is known to be const0_rtx and
13671 if so, record permanent equivalence for it to be ZERO_EXTEND of
13672 the narrower mode destination.
13674 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
13676 * lto-streamer-out.c (output_function): Revert 259346.
13677 * omp-expand.c (expand_oacc_for): Likewise.
13679 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
13681 PR rtl-optimization/85354
13682 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
13683 * sel-sched.c (sel_global_init): ... here.
13685 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
13688 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
13689 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
13690 mode for PE-COFF targets.
13691 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
13692 (i386_pe_asm_lto_end): Likewise.
13693 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
13694 (TARGET_ASM_LTO_END): Likewise.
13695 * config/i386/winnt.c (saved_debug_info_level): New static variable.
13696 (i386_pe_asm_lto_start): New function.
13697 (i386_pe_asm_lto_end): Likewise.
13699 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
13700 Richard Biener <rguenther@suse.de>
13702 PR middle-end/84955
13703 * lto-streamer-out.c (output_function): Fix CFG loop state before
13705 * omp-expand.c (expand_oacc_for): Handle calls to internal
13706 functions like regular functions.
13708 2018-04-12 Richard Biener <rguenther@suse.de>
13711 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
13712 for the early LTO debug to properly generate references to it
13713 during DIE emission. Do not re-use that for the skeleton for
13715 (dwarf2out_early_finish): Likewise.
13717 2018-04-12 Jakub Jelinek <jakub@redhat.com>
13720 * config/i386/sse.md
13721 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
13722 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
13723 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
13724 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
13725 and output is a reg, avoid creating invalid lowpart subreg, but
13726 instead split into a 512-bit move. Don't split if not AVX512VL,
13727 input is xmm16+ reg and output is a mem.
13728 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
13729 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
13730 xmm16+ reg and output is a mem.
13732 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
13734 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
13735 also for flag_dwarf2_cfi_asm.
13737 2018-04-12 Jakub Jelinek <jakub@redhat.com>
13739 PR rtl-optimization/85342
13740 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
13741 a bool scalar var inside of the loop instead. Don't try to update
13742 recog_data.operand after failed apply_change_group.
13744 2018-04-12 Tom de Vries <tom@codesourcery.com>
13747 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
13748 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
13749 array with flexible array member as array without given dimension.
13750 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
13751 argument for undefined param to true.
13753 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
13756 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
13757 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
13758 from PowerPC section.
13759 * config/rs6000/sysv4.opt (mcall-): Improve help text.
13760 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
13761 help text that is too long.
13762 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
13763 help text that is too long.
13764 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
13765 help text that is too long.
13767 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
13769 * config/alpha/alpha.md (stack_probe_internal): Rename
13770 from "probe_stack". Update all callers.
13772 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
13774 PR rtl-optimization/84566
13775 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
13776 sched_macro_fuse_insns.
13778 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
13781 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
13782 (compute_block_dependences): ... from here.
13784 2018-04-11 Jakub Jelinek <jakub@redhat.com>
13786 PR tree-optimization/85331
13787 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
13788 from int to HOST_WIDE_INT.
13790 2018-04-11 Martin Jambor <mjambor@suse.cz>
13793 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
13794 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
13795 not the same as the source val.
13796 (cgraph_edge_brings_value_p): New parameter.
13797 (gather_edges_for_value): Pass destination value to
13798 cgraph_edge_brings_value_p.
13799 (perhaps_add_new_callers): Likewise.
13800 (get_info_about_necessary_edges): Likewise and exclude values brought
13801 only by self-recursive edges.
13802 (create_specialized_node): Redirect only clones of self-calling edges.
13803 (+self_recursive_pass_through_p): New function.
13804 (find_more_scalar_values_for_callers_subset): Use it.
13805 (find_aggregate_values_for_callers_subset): Likewise.
13806 (known_aggs_to_agg_replacement_list): Removed.
13807 (decide_whether_version_node): Re-calculate known constants for all
13808 remaining context clones.
13810 2018-04-11 Richard Biener <rguenther@suse.de>
13813 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
13814 from early DWARF output.
13815 (dwarf2out_early_finish): Output line info unconditionally into
13816 early DWARF and add reference to it.
13818 2018-04-11 Jakub Jelinek <jakub@redhat.com>
13821 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
13822 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
13823 other than V2DFmode using iptr mode attribute.
13824 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
13826 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
13828 PR rtl-optimization/84659
13829 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
13831 2018-04-11 Jakub Jelinek <jakub@redhat.com>
13834 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
13836 (output_loc_list): Pass address of a dummy size variable even in the
13837 locview handling loop.
13838 (index_location_lists): Add comment on why skip_loc_list_entry can't
13841 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
13844 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
13847 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
13850 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
13851 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
13852 and -mstring-compare-inline-limit.
13854 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
13857 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
13858 for stack clash protection in a register whenever we need it to be in
13861 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
13863 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
13864 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
13866 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
13869 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
13871 (mlong-double-): Ditto.
13872 * config/rs6000/sysv4.opt (msdata=): Ditto.
13873 (mtls-size=): Ditto.
13875 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
13877 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
13878 erroneous entries for
13879 "vector int vec_ldl (int, long int *)", and
13880 "vector unsigned int vec_ldl (int, unsigned long int *)".
13881 Add comments and entries for
13882 "vector bool char vec_ldl (int, bool char *)",
13883 "vector bool short vec_ldl (int, bool short *)",
13884 "vector bool int vec_ldl (int, bool int *)",
13885 "vector bool long long vec_ldl (int, bool long long *)",
13886 "vector pixel vec_ldl (int, pixel *)",
13887 "vector long long vec_ldl (int, long long *)",
13888 "vector unsigned long long vec_ldl (int, unsigned long long *)".
13889 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
13890 type tree bool_long_long_type_node and correct definition of
13891 bool_V2DI_type_node to make reference to this new type tree.
13892 (rs6000_mangle_type): Replace erroneous reference to
13893 bool_long_type_node with bool_long_long_type_node.
13894 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
13895 comments to emphasize sign distinctions for char and int types and
13896 replace RS6000_BTI_bool_long constant with
13897 RS6000_BTI_bool_long_long constant. Also add comment to restrict
13898 use of RS6000_BTI_pixel.
13899 (bool_long_type_node): Remove this macro definition.
13900 (bool_long_long_type_node): New macro definition
13902 2018-04-10 Jakub Jelinek <jakub@redhat.com>
13904 PR rtl-optimization/85300
13905 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
13906 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
13907 simplify_unary_operation fails.
13909 2018-04-10 Martin Liska <mliska@suse.cz>
13911 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
13912 cgraph_edge and ipa_ref.
13914 2018-04-10 Jakub Jelinek <jakub@redhat.com>
13918 * config/i386/sse.md
13919 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
13920 computation of the VEC_MERGE selector from mask.
13921 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
13922 Fix decoding of the VEC_MERGE selector into mask.
13924 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
13926 PR tree-optimization/85286
13927 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
13929 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
13931 * final.c (final_1): Set insn_last_address as well as
13932 insn_current_address.
13934 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13937 * explow.c (emit_stack_probe): Call validize_mem on memory location
13938 before passing it to gen_probe_stack. Create address operand and
13939 legitimize it for the probe_stack_address case.
13941 2018-04-09 Jan Hubicka <jh@suse.cz>
13944 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
13945 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
13946 * tree.c (free_lang_data_in_type): Fix handling of binfos;
13948 (free_lang_data): Rebuild type inheritance graph.
13950 2018-04-09 Martin Sebor <msebor@redhat.com>
13952 * invoke.texi (-finline-small-functions): Mention other optimization
13954 (-findirect-inlining, -fpartial-inlining): Same.
13955 (-finline-functions-called-once): Same.
13956 (-freorder-blocks-and-partition): Same.
13958 2018-04-09 Jan Hubicka <jh@suse.cz>
13961 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
13962 jumps; choose last target that matches the criteria (i.e.
13963 no partition changes for non-crossing jumps).
13964 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
13965 support for redirecting crossing jumps to non-crossing.
13967 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
13969 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
13970 also for naked functions.
13972 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
13974 * config/arc/arc.md (add_shift): New pattern.
13975 (add_shift2): Likewise.
13976 (sub_shift): Likewise.
13977 (sub_shift_cmp0_noout): Likewise.
13978 (compare_si_ashiftsi): Likewise.
13979 (xbfu_cmp0_noout): New combine pattern.
13980 (xbfu_cmp0"): Likewise.
13981 (movsi_set_cc_insn): Place the predicable variant first.
13982 (commutative_binary_cmp0_noout): Remove clobber.
13983 (commutative_binary_cmp0): New pattern.
13984 (noncommutative_binary_cmp0): Likewise.
13985 (noncommutative_binary_cmp0_noout): Likewise.
13986 (noncommutative_binary_comparison_result_used): Removed.
13987 (rsub_cmp0): New pattern.
13988 (rsub_cmp0_noout): Likewise.
13989 (extzvsi): Changed, keep only meaningful variants.
13990 (SQH, SEZ): New iterators.
13991 (SQH_postfix): New mode attribute.
13992 (SEZ_prefix): New code attribute.
13993 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
13994 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
13995 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
13996 of numerical value.
13997 (noncommutative_operator): Check the availability of barrel
14000 2018-04-09 Richard Biener <rguenther@suse.de>
14002 PR tree-optimization/85284
14003 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
14004 Only use the niter constraining form of simple_iv when the exit
14005 is always executed.
14007 2018-04-09 Tom de Vries <tom@codesourcery.com>
14010 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
14011 (define_expand "*memory_barrier"): New define_expand.
14012 (define_insn "memory_barrier"): New insn.
14014 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14016 PR rtl-optimization/80463
14017 PR rtl-optimization/83972
14018 PR rtl-optimization/83480
14020 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
14021 correct producer for the insn.
14022 (tidy_control_flow): Fixup seqnos in case of debug insns.
14024 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14026 PR rtl-optimization/83913
14028 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
14029 different sched-times when merging exprs.
14031 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14033 PR rtl-optimization/83962
14035 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
14036 tidy_fallthru_edge and tidy_control_flow.
14038 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14040 PR rtl-optimization/83530
14042 * sel-sched.c (force_next_insn): New global variable.
14043 (remove_insn_for_debug): When force_next_insn is true, also leave only
14044 next insn in the ready list.
14045 (sel_sched_region): When the region wasn't scheduled, make another pass
14046 over it with force_next_insn set to 1.
14048 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
14050 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
14052 * config/nds32/constants.md (unspec_volatile_element): Add enum values
14053 for interrupt control.
14054 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
14055 functions for interrupt control.
14056 * config/nds32/nds32-intrinsic.md: Likewise.
14057 * config/nds32/nds32_intrinsic.h: Likewise.
14058 * config/nds32/nds32.h (nds32_builtins): Likewise.
14060 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
14062 * config/nds32/nds32.c (nds32_init_machine_status,
14063 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
14064 strict_aligned_p field.
14065 (nds32_expand_to_rtl_hook): New function.
14066 (TARGET_EXPAND_TO_RTL_HOOK): Define.
14067 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
14069 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14070 Chung-Ju Wu <jasonwucj@gmail.com>
14072 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
14073 * config/nds32/nds32-n7.md: New file.
14074 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
14075 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
14077 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
14078 * config/nds32/nds32.md (pipeline_model): Add n7.
14079 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
14080 * config/nds32/pipelines.md: Include n7 settings.
14082 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14083 Chung-Ju Wu <jasonwucj@gmail.com>
14085 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
14086 * config/nds32/nds32-e8.md: New file.
14087 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
14088 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
14090 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
14091 * config/nds32/nds32.md (pipeline_model): Add e8.
14092 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
14093 * config/nds32/pipelines.md: Include e8 settings.
14095 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14096 Chung-Ju Wu <jasonwucj@gmail.com>
14098 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
14099 * config/nds32/nds32-n8.md: New file.
14100 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
14101 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
14103 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
14104 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
14105 * config/nds32/nds32.md (pipeline_model): Add n8.
14106 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
14107 * config/nds32/pipelines.md: Include n8 settings.
14109 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14110 Chung-Ju Wu <jasonwucj@gmail.com>
14112 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
14113 * config/nds32/nds32-n9-2r1w.md: New file.
14114 * config/nds32/nds32-n9-3r2w.md: New file.
14115 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
14116 nds32_register_ports): New or modify for cpu n9.
14117 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
14119 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
14120 * config/nds32/nds32-utils.c: New file.
14121 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
14122 TARGET_MUL_SLOW): Define.
14123 * config/nds32/nds32.md (pipeline_model): New attribute.
14124 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
14125 New options that support cpu n9.
14126 * config/nds32/pipelines.md: Include n9 settings.
14127 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
14129 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
14131 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
14132 information if necessary.
14133 (output_cond_branch_compare_zero): Likewise.
14134 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
14135 (nds32_target_alignment): Refine for alignment.
14136 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
14137 (FUNCTION_BOUNDARY): Modify.
14138 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
14140 * config/nds32/nds32.opt (malways-align, malign-functions): New.
14142 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
14144 * config/nds32/constants.md (unspec_volatile_element): Add values for
14145 TLB operation and data prefetch.
14146 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
14147 functions for TLB operation and data prefetch.
14148 * config/nds32/nds32-intrinsic.md: Likewise.
14149 * config/nds32/nds32_intrinsic.h: Likewise.
14150 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
14151 (nds32_print_operand): Likewise.
14152 * config/nds32/nds32.h (nds32_builtins): Likewise.
14154 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
14155 Andrew Pinski <pinsika@gcc.gnu.org>
14157 PR middle-end/82976
14158 * match.pd: Use constant_boolean_node of correct type instead of
14159 boolean_true_node or boolean_false_node for simplifying
14160 pointer comparisons to zero.
14162 2018-04-07 Jakub Jelinek <jakub@redhat.com>
14164 PR tree-optimization/80021
14165 * tree.c (verify_type_variant): Make error call in verify_variant_match
14166 translatable and remove final full stop.
14168 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14170 * config/nds32/constants.md (unspec_volatile_element): Add
14171 UNSPEC_VOLATILE_EH_RETURN.
14172 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
14173 nds32_output_stack_pop): Support dwarf exception handling process.
14174 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
14175 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
14176 exception handling process.
14177 (nds32_compute_stack_frame): Likewise.
14178 (nds32_return_addr_rtx): Likewise.
14179 (nds32_initial_elimination_offset): Likewise.
14180 (nds32_expand_prologue): Likewise.
14181 (nds32_expand_epilogue): Likewise.
14182 (nds32_dynamic_chain_address): New function.
14183 * config/nds32/nds32.h (machine_function): Add fields for dwarf
14184 exception handling.
14185 (DYNAMIC_CHAIN_ADDRESS): Define.
14186 (EH_RETURN_DATA_REGNO): Define.
14187 (EH_RETURN_STACKADJ_RTX): Define.
14188 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
14189 patterns for dwarf exception handling.
14191 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14193 * config/nds32/nds32.h: Clean up obsolete macros.
14195 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14197 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
14198 Add enum values for particular instructions.
14199 * config/nds32/nds32-intrinsic.c: Implementation of expanding
14200 particular intrinsic functions.
14201 * config/nds32/nds32-intrinsic.md: Likewise.
14202 * config/nds32/nds32_intrinsic.h: Likewise.
14203 * config/nds32/nds32.h (nds32_builtins): Likewise.
14204 * config/nds32/nds32.md (type): Add pbsad and pbsada.
14205 (btst, ave): New patterns for particular instructions.
14207 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14209 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
14210 Add enum values for atomic load/store and memory sync.
14211 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
14213 * config/nds32/nds32-intrinsic.md: Likewise.
14214 * config/nds32/nds32_intrinsic.h: Likewise.
14215 * config/nds32/nds32.h (nds32_builtins): Likewise.
14217 2018-04-07 Jakub Jelinek <jakub@redhat.com>
14219 PR tree-optimization/85257
14220 * fold-const.c (native_encode_vector): If not all elts could fit
14221 and off is -1, return 0 rather than offset.
14222 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
14223 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
14224 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
14225 adjust buffer in native_interpret_expr call.
14227 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14229 * config/nds32/constants.md (unspec_volatile_element): Add cache
14230 control enum values.
14231 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
14232 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
14233 * config/nds32/nds32.c (nds32_cctl_names): New.
14234 (nds32_print_operand): Handle cache control register names.
14235 * config/nds32/nds32.h (nds32_builtins): New enum values.
14236 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
14238 * config/nds32/nds32.md (type): Add mmu.
14239 * config/nds32/pipelines.md (simple_insn): Add mmu.
14241 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14243 * config/nds32/nds32.md (type): Remove call.
14244 * config/nds32/pipelines.md (simple_insn): Likewise.
14246 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14248 * config/nds32/constants.md (unspec_volatile_element): Add
14249 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
14250 UNSPEC_VOLATILE_FMFCFG.
14251 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
14252 description for fmfcfg and fmfcsr.
14253 (bdesc_1arg): Add fmtcsr.
14254 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
14255 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
14256 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
14257 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
14258 unspec_fmfcfg): New patterns.
14259 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
14260 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
14261 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
14262 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
14263 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
14264 __nds32__fmfcfg): Define.
14266 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14268 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
14269 intrinsic register names.
14270 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
14271 intrinsic register enum values and macros.
14273 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14275 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
14276 for load/store addressing form.
14277 (nds32_print_operand_address): Likewise.
14279 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
14282 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
14283 based on LABEL_REF. Remove useless assertion.
14284 (pic_address_needs_scratch): Fix formatting.
14285 (sparc_legitimize_pic_address): Minor tweaks.
14286 (sparc_delegitimize_address): Adjust assertion accordingly.
14287 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
14288 into symbolic_operand.
14289 (movsi_high_pic_label_ref): Likewise.
14290 (movsi_lo_sum_pic_label_ref): Likewise.
14291 (movdi_pic_label_ref): Likewise.
14292 (movdi_high_pic_label_ref): Likewise.
14293 (movdi_lo_sum_pic_label_ref): Likewise.
14295 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
14297 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
14298 custom LIB_SPEC setup.
14300 2018-04-06 Ruslan Bukin <br@bsdpad.com>
14301 Kito Cheng <kito.cheng@gmail.com>
14303 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
14304 * config/riscv/freebsd.h: New.
14306 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
14308 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
14309 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
14312 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
14313 Kito Cheng <kito.cheng@gmail.com>
14315 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
14316 nds32_output_call, nds32_symbol_binds_local_p): New functions.
14317 * config/nds32/nds32-protos.h (nds32_output_call,
14318 nds32_output_return): Declare.
14319 * config/nds32/nds32.md: Refine all the call and return patterns.
14321 2018-04-06 Jakub Jelinek <jakub@redhat.com>
14324 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
14325 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
14327 PR rtl-optimization/84872
14328 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
14329 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
14330 EDGE_CROSSING edge.
14332 2018-04-06 Tamar Christina <tamar.christina@arm.com>
14334 * expr.c (copy_blkmode_to_reg): Revert 254862.
14335 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
14337 2018-04-06 Richard Biener <rguenther@suse.de>
14339 PR middle-end/85244
14340 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
14341 after seeing a component reference with an adjacent field. Treat
14342 refs to arrays at struct end of external decls similar to
14343 refs to unconstrained commons.
14345 2018-04-06 Jakub Jelinek <jakub@redhat.com>
14348 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
14349 look through SAVE_EXPRs with non-side-effects argument. Adjust
14351 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
14354 2018-04-06 Richard Biener <rguenther@suse.de>
14356 PR middle-end/85180
14357 * alias.c (find_base_term): New wrapper around find_base_term
14358 unwinding CSELIB_VAL_PTR changes.
14359 (find_base_term): Do not restore CSELIB_VAL_PTR during the
14362 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14364 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
14366 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
14367 constant definitions.
14368 ("nop"): lr 0,0 -> nopr r0
14369 ("nop_lr0", "nop_lr1"): New insn definitions.
14371 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
14373 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
14374 NDS32_V3PUSH_AVAILABLE_P macro.
14376 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
14377 Chung-Ju Wu <jasonwucj@gmail.com>
14379 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
14380 (nds32*-*-*): Add float and fpu_config into supported_defaults.
14381 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
14382 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
14383 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
14384 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
14385 * config/nds32/constraints.md: New constraints and checking for hard
14386 float configuration.
14387 * config/nds32/iterators.md: New mode iterator and attribute for hard
14388 float configuration.
14389 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
14391 * config/nds32/nds32-fpu.md: New file.
14392 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
14393 deal with hard float code generation.
14394 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
14396 (abi_type, float_reg_number): New enum type.
14397 * config/nds32/nds32-predicates.c: New predicates for hard float.
14398 * config/nds32/nds32-protos.h: Declare functions for hard float.
14399 * config/nds32/nds32.c: Implementation for hard float configuration.
14400 * config/nds32/nds32.h: Definitions for hard float configuration.
14401 * config/nds32/nds32.md: Include hard float machine description and
14402 modify patterns for hard float configuration.
14403 * config/nds32/nds32.opt: New options for hard float configuration.
14404 * config/nds32/predicates.md: New predicates for hard float
14407 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
14409 * common/config/nds32/nds32-common.c
14410 (nds32_option_optimization_table): Enable -mreleax-hint by default.
14412 2018-04-05 Jakub Jelinek <jakub@redhat.com>
14414 PR middle-end/85195
14415 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
14416 CONSTRUCTOR_ELT (ctor, ...)->value.
14418 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
14421 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
14423 2018-04-05 Tom de Vries <tom@codesourcery.com>
14426 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
14429 2018-04-05 Shiva Chen <shiva0217@gmail.com>
14430 Kito Cheng <kito.cheng@gmail.com>
14432 * config/nds32/constraints.md (U33): Fine-tune checking condition.
14433 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
14434 * config/nds32/nds32.h (nds32_16bit_address_type): Add
14435 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
14437 2018-04-05 Shiva Chen <shiva0217@gmail.com>
14438 Kito Cheng <kito.cheng@gmail.com>
14440 * config/nds32/constraints.md (Ufe): New memory constraint.
14441 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
14442 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
14443 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
14445 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
14446 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
14448 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14450 * config/nds32/nds32.md: Use optimize_size in the condition for
14451 alu-shift instructions.
14453 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14455 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
14457 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14459 * config/nds32/nds32.md (negsi2): Refine pattern.
14461 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
14462 Chung-Ju Wu <jasonwucj@gmail.com>
14464 * config/nds32/iterators.md (shift_rotate): New code iterator.
14465 (shift): New code attribute.
14466 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
14467 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
14468 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
14469 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
14470 bit-wise operations.
14471 (andsi3, *andsi3): Ditto.
14472 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
14473 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
14474 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
14475 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
14476 nds32_ior_operand, nds32_xor_operand): New predicates.
14478 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14480 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
14481 (addsi3, subsi3): ... this.
14483 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14485 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
14487 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14489 * config/nds32/nds32.md: Adjust indention.
14491 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
14493 * config/nds32/nds32.md (feature): New attribute.
14495 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14497 * config/nds32/nds32.md (subtype): New attribute.
14499 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
14502 * config/arm/arm-builtins.c (arm_expand_builtin): Change
14503 expansion to perform a bitwise AND of the argument followed by a
14504 boolean negation of the result.
14506 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
14508 PR rtl-optimization/84878
14509 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
14510 the basic block. Assert the use reference is not artificial and that
14511 it has an associated insn.
14513 2018-04-04 Michael Matz <matz@suse.de>
14515 * builtins.c (compute_objsize): Pass correct operand
14516 to array_at_struct_end_p.
14518 2018-04-04 Richard Biener <rguenther@suse.de>
14521 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
14522 from contexts for DINFO_LEVEL_TERSE and below.
14524 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
14526 * config/nds32/nds32-doubleword.md (move_<mode>): Require
14527 resiter_operand condition.
14528 * config/nds32/nds32.md (*move<mode>): Ditto.
14530 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
14531 Monk Chiang <sh.chiang04@gmail.com>
14533 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
14535 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14537 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
14539 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14540 Kito Cheng <kito.cheng@gmail.com>
14542 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
14543 nds32_cond_code_str, output_cond_branch,
14544 output_cond_branch_compare_zero, nds32_expand_cbranch,
14545 nds32_expand_cstore, nds32_expand_movcc,
14546 nds32_output_cbranchsi4_equality_zero,
14547 nds32_output_cbranchsi4_equality_reg,
14548 nds32_output_cbranchsi4_equality_reg_or_const_int,
14549 nds32_output_cbranchsi4_greater_less_zero: New functions.
14550 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
14551 nds32_expand_cstore, nds32_expand_movcc,
14552 nds32_output_cbranchsi4_equality_zero,
14553 nds32_output_cbranchsi4_equality_reg,
14554 nds32_output_cbranchsi4_equality_reg_or_const_int,
14555 nds32_output_cbranchsi4_greater_less_zero): Declare.
14556 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
14557 nds32_rimm11s_operand): New predicates.
14558 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
14559 * config/nds32/nds32.md: Rewrite all the branch and conditional move
14562 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
14564 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
14565 * config/nds32/nds32.md: Ditto.
14566 * config/nds32/pipelines.md: Ditto.
14568 2018-04-04 Richard Biener <rguenther@suse.de>
14570 PR tree-optimization/85168
14571 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
14572 propagating abnormals.
14574 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14576 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
14578 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14579 Kito Cheng <kito.cheng@gmail.com>
14581 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
14582 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
14583 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
14584 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
14585 * config/nds32/nds32.md (sibcall_internal): New.
14586 (sibcall_register): Remove.
14587 (sibcall_immediate): Remove.
14588 (sibcall_value_internal): New.
14589 (sibcall_value_register): Remove.
14590 (sibcall_value_immediate): Remove.
14591 * config/nds32/predicates.md (nds32_general_register_operand): New.
14592 (nds32_call_address_operand): New.
14594 2018-04-03 Jakub Jelinek <jakub@redhat.com>
14596 PR rtl-optimization/85167
14597 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
14598 bb_defs if *split_p, instead preinitialize it to NULL.
14600 PR tree-optimization/85156
14601 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
14602 evaluating the argument multiple times.
14604 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
14606 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
14608 (_mm_cvtpd_ps): Likewise.
14609 (_mm_cvttpd_epi32): Likewise.
14610 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
14611 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
14612 vector, pixel, and bool following altivec.h include.
14614 2018-04-03 Martin Sebor <msebor@redhat.com>
14616 * doc/extend.texi (Common Function Attributes): Clarify.
14617 (const attribute): Likewise.
14618 (pure attribute): Likewise.
14620 2018-04-03 Jakub Jelinek <jakub@redhat.com>
14623 * config/i386/i386.c (ix86_expand_vector_set): Use
14624 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
14626 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
14628 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
14629 instructions when changing rounding bits to preserve precision bits
14630 in the x87 control word.
14632 2018-04-03 Martin Liska <mliska@suse.cz>
14634 PR tree-optimization/82491
14635 * rtl.h (strip_offset_and_add): Replace += suboffset with
14636 poly_uint64 () + suboffset.
14638 2018-03-29 Martin Liska <mliska@suse.cz>
14639 Martin Jambor <mjambor@suse.cz>
14642 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
14643 param_type is not an integral or pointer type.
14645 2018-04-03 Richard Biener <rguenther@suse.de>
14647 * sese.h (recompute_all_dominators): Remove.
14649 2018-04-02 Martin Sebor <msebor@redhat.com>
14651 * doc/invoke.texi (-Wrestrict): Fix typos.
14653 2018-04-02 Jim Wilson <jimw@sifive.com>
14655 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
14656 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
14657 (<optab>di3, <optab>si3_extend): Likewise.
14658 (<optab>si3_mask, <optab>si3_mask_1): New.
14659 (<optab>di3_mask, <optab>di3_mask_1): New.
14660 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
14661 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
14662 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
14664 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
14666 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
14669 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
14671 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
14672 (nds32_canonicalize_comparison): New function.
14674 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
14675 Kito Cheng <kito.cheng@gmail.com>
14676 Kuan-Lin Chen <kuanlinchentw@gmail.com>
14678 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
14679 * config/nds32/constants.md (unspec_volatile_element): Add
14680 UNSPEC_VOLATILE_RELAX_GROUP.
14681 * config/nds32/nds32-relax-opt.c: New file.
14682 * config/nds32/nds32-predicates.c
14683 (nds32_symbol_load_store_p): New function.
14684 * config/nds32/nds32-protos.h
14685 (nds32_symbol_load_store_p): Declare function.
14686 (make_pass_nds32_relax_opt): Declare new rtl pass function.
14687 * config/nds32/nds32.c
14688 (nds32_register_pass): New function to register pass.
14689 (nds32_register_passes): New function to register passes.
14690 * config/nds32/nds32.md (relax_group): New pattern.
14691 * config/nds32/nds32.opt (mrelax-hint): New option.
14692 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
14694 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
14696 * config/nds32/t-nds32: Modify files dependency.
14698 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
14700 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
14701 (PROFILE_HOOK): Define its implementation.
14703 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
14705 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
14706 type and 32-bit size.
14708 2018-04-01 Jakub Jelinek <jakub@redhat.com>
14710 PR middle-end/85090
14711 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
14712 (V_128_256): New mode iterator.
14713 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
14714 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
14715 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
14717 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
14718 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
14720 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
14723 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
14724 NaN inputs correctly.
14726 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
14729 * config/rs6000/vsx.md (??r): New mode attribute.
14730 (*vsx_mov<mode>_64bit): Use it.
14731 (*vsx_mov<mode>_32bit): Likewise.
14733 2018-03-30 Martin Sebor <msebor@redhat.com>
14735 PR tree-optimization/84818
14736 * builtins.c (check_access): Use warning_n.
14738 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
14741 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
14743 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
14746 2018-03-30 Julia Koval <julia.koval@intel.com>
14749 * x86-tune.def (movx, partial_reg_dependency): Enable for
14752 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
14754 PR inline-asm/84985
14755 * lra-constraints.c (process_alt_operands): Move setting
14756 this_alternative_matches below.
14758 2018-03-29 Martin Liska <mliska@suse.cz>
14761 * doc/invoke.texi: Document how LTO works with debug info.
14762 Describe auto-load support of binutils. Mention 'x86-64'
14763 as valid option value of -march option.
14765 2018-03-29 Jakub Jelinek <jakub@redhat.com>
14767 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
14770 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
14771 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
14772 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
14775 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
14778 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
14779 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
14780 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
14781 for RS6000_BTM_POWERPC64.
14782 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
14783 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
14784 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
14787 (DIVDEU): Likewise.
14789 2018-03-28 Carl Love <cel@us.ibm.com>
14792 2017-09-27 Carl Love <cel@us.ibm.com>
14794 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
14795 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
14796 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
14799 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14801 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
14802 instead of __vector bool.
14803 (_mm_max_pu8): Likewise.
14804 (_mm_min_pi16): Likewise.
14806 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
14809 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
14810 (DIVWEUO): Likewise.
14811 (DIVDEO): Likewise.
14812 (DIVDEUO): Likewise.
14813 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
14814 DIVWEUO and DIVDEUO.
14815 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
14816 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
14817 (div_extend): Likewise.
14818 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
14820 (__builtin_divweuo): Likewise.
14821 (__builtin_divdeo): Likewise.
14822 (__builtin_divdeuo): Likewise.
14824 2018-03-28 Jakub Jelinek <jakub@redhat.com>
14827 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
14828 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
14830 PR tree-optimization/82004
14831 * gimple-match-head.c (optimize_pow_to_exp): New function.
14832 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
14833 Don't fold to exp if optimize_pow_to_exp is false.
14835 2018-03-28 Martin Liska <mliska@suse.cz>
14838 * calls.c (initialize_argument_information): Fix trailing space.
14839 * common.opt: Fix typo and provide better explanation for
14840 -fsanitize-coverage option.
14841 * config/i386/i386.opt: Fix typo.
14843 2018-03-28 Jakub Jelinek <jakub@redhat.com>
14844 Martin Liska <mliska@suse.cz>
14847 * gimplify.c (asan_poison_variable): Don't do the check for
14848 gimplify_omp_ctxp here.
14849 (gimplify_decl_expr): Do it here.
14850 (gimplify_target_expr): Likewise.
14852 2018-03-28 Martin Liska <mliska@suse.cz>
14855 * config/i386/i386.c (ix86_function_arg_advance): Do not call
14856 chkp_type_bounds_count if MPX is not enabled.
14858 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
14860 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
14862 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
14865 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
14866 function to create the function decl for complex long double
14867 multiply and divide for -mabi=ieeelongdouble.
14868 (init_float128_ieee): Call it.
14870 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
14873 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
14874 -fcf-protection=branch -mibt.
14875 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
14877 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
14880 * config/arm/arm.c (arm_valid_symbolic_address): Handle
14881 arm_word_relocations.
14883 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
14886 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
14887 extern array declarations.
14889 2018-03-27 Richard Biener <rguenther@suse.de>
14891 PR middle-end/84067
14892 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
14893 explicit single_use checks.
14895 2018-03-27 Richard Biener <rguenther@suse.de>
14897 PR tree-optimization/85082
14898 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
14901 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
14903 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
14904 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
14905 Turn on fasynchronous-unwind-tables and funwind-tables.
14907 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
14910 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
14911 (*bmi_blsr_<mode>_ccz): Ditto.
14913 2018-03-26 Tom de Vries <tom@codesourcery.com>
14915 PR tree-optimization/85063
14916 * omp-general.c (offloading_function_p): New function. Factor out
14918 * omp-offload.c (pass_omp_target_link::gate): ... here.
14919 * omp-general.h (offloading_function_p): Declare.
14920 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
14921 with attribute omp declare target for offloading functions.
14923 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
14925 PR tree-optimization/84005
14926 * tree-data-ref.h (get_base_for_alignment): Declare.
14927 * tree-data-ref.c (get_base_for_alignment_1): New function.
14928 (get_base_for_alignment): Likewise.
14929 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
14930 get_base_for_alignment to find a suitable base object, instead
14931 of always using drb->base_address.
14933 2018-03-23 Jakub Jelinek <jakub@redhat.com>
14935 PR inline-asm/85022
14936 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
14937 known size by default.
14939 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
14941 PR inline-asm/85030
14942 * lra-constraints.c (process_alt_operands): Don't match BLKmode
14943 and non BLKmode operands.
14945 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14948 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
14949 Clean up attributes.
14951 2018-03-23 Richard Biener <rguenther@suse.de>
14954 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
14955 we are going to emit early debug for LTO.
14957 2018-03-23 Jakub Jelinek <jakub@redhat.com>
14959 PR inline-asm/85034
14960 * function.c (match_asm_constraints_1): Don't optimize if input
14961 doesn't satisfy general_operand predicate for output's mode.
14963 PR inline-asm/85022
14964 * alias.c (write_dependence_p): Don't require for x_canonicalized
14965 non-VOIDmode if x has VOIDmode.
14968 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
14969 just don't try to optimize it rather than assert it never happens.
14971 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
14973 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
14974 macro expansions for definition of ST_INTERNAL_<mode> and
14975 LD_INTERNAL_<mode> builtins.
14976 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
14978 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
14980 (altivec_expand_st_builtin): Likewise.
14981 (altivec_expand_builtin): Remove calls to deleted functions.
14982 (rs6000_address_for_altivec): Delete this function.
14983 * config/rs6000/vector.md: Remove expands for
14984 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
14986 2018-03-22 Sudakshina Das <sudi.das@arm.com>
14989 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
14990 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
14991 re-computing once computed.
14992 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
14993 (arm_init_machine_status): Initialize
14994 machine->static_chain_stack_bytes.
14996 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
14999 * doc/extend.texi: Add four new prototypes for vec_ld.
15000 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
15001 definitions for more logical presentation.
15002 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
15003 entries for V1TI variants of __builtin_altivec_ld builtin.
15004 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
15005 handling of V1TI variant of LVX icode pattern.
15006 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
15007 (rs6000_gimple_fold_builtin): Likewise.
15008 (altivec_init_builtins): Add code to define
15009 __builtin_altivec_lvx_v1ti function.
15011 2018-03-22 Jakub Jelinek <jakub@redhat.com>
15013 PR inline-asm/84941
15014 * function.c (match_asm_constraints_1): Don't do the optimization
15015 if input isn't a REG, SUBREG, MEM or constant.
15017 2018-03-22 Tom de Vries <tom@codesourcery.com>
15019 PR tree-optimization/84956
15020 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
15021 bb_has_abnormal_pred.
15023 2018-03-22 Jakub Jelinek <jakub@redhat.com>
15026 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
15027 DECL_INITIAL (decl) to decl at the end.
15028 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
15029 adjust the comment.
15031 2018-03-21 Joseph Myers <joseph@codesourcery.com>
15033 * doc/extend.texi (__builtin_tgmath): Document when complex
15034 integer types are treated as _Complex _Float64.
15036 2018-03-21 Tom de Vries <tom@codesourcery.com>
15038 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
15040 2018-03-21 Jakub Jelinek <jakub@redhat.com>
15042 PR tree-optimization/84960
15043 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
15044 if it is ENTRY block, move them into single succ of ENTRY in that case.
15046 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
15048 PR tree-optimization/84811
15049 * poly-int.h (poly_span_traits): Remove the T3 parameter and
15050 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
15051 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
15052 (known_subrange_p): Update accordingly. Cast each value involved
15053 in the size comparison, rather than casting the result of the
15056 2018-03-21 Jakub Jelinek <jakub@redhat.com>
15058 PR tree-optimization/84982
15059 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
15060 by flipping the least significant bit rather than all bits from
15061 bitpos to bitpos + bitsize - 1.
15063 2018-03-21 Nathan Sidwell <nathan@acm.org>
15065 * doc/extend.texi (Deprecated Features): Remove mention of
15066 long-deleted deprecations.
15068 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15071 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
15072 * configure: Regenerate.
15074 2018-03-21 Tom de Vries <tom@codesourcery.com>
15076 PR tree-optimization/83126
15077 * tree-parloops.c (num_phis): New function.
15078 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
15080 2018-03-21 Nathan Sidwell <nathan@acm.org>
15082 * doc/extend.texi (Deprecated Features): Update deprecated flags,
15083 mention anon-struct/union members and trailing attributes.
15085 2018-03-21 Bin Cheng <bin.cheng@arm.com>
15087 PR tree-optimization/84969
15088 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
15089 builtin memset partitions if they set different rhs values.
15091 2018-03-21 Jakub Jelinek <jakub@redhat.com>
15093 PR rtl-optimization/84989
15094 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
15095 VEC_DUPLICATE with scalar result mode.
15097 2018-03-21 Martin Liska <mliska@suse.cz>
15100 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
15101 not intended return statement.
15103 2018-03-21 Martin Liska <mliska@suse.cz>
15106 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
15107 (chkp_find_bound_slots_1): Limit number of iterations.
15109 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
15112 * Minor grammar fixes for x86 options.
15114 2018-03-20 Jakub Jelinek <jakub@redhat.com>
15117 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
15118 holding REG_CFA_RESTORE notes, instead turn them into a USE.
15120 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
15123 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
15124 (altivec_lvx_<mode>_1op): Likewise.
15125 (altivec_stvx_<mode>_2op): Likewise.
15126 (altivec_stvx_<mode>_1op): Likewise.
15127 (altivec_lvx_<VM2:mode>): New define_expand.
15128 (altivec_stvx_<VM2:mode>): Likewise.
15129 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
15130 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
15131 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
15132 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
15133 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
15134 (rs6000_gen_lvx): Likewise.
15135 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
15136 (altivec_expand_stv_builtin): Likewise.
15137 (altivec_expand_builtin): Likewise.
15138 * config/rs6000/vector.md: Likewise.
15140 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15143 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
15146 2018-03-20 Richard Biener <rguenther@suse.de>
15149 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
15150 sign-conversions as zero, fall back to standard scalar_stmt
15153 2018-03-20 Martin Liska <mliska@suse.cz>
15156 * predict.c (rebuild_frequencies): Handle case when we have
15157 PROFILE_ABSENT, but flag_guess_branch_prob is false.
15159 2018-03-20 Jakub Jelinek <jakub@redhat.com>
15162 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
15163 flag_section_anchors.
15164 * varasm.c (use_blocks_for_decl_p): Remove hack for
15165 dw2_force_const_mem.
15168 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
15170 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
15171 be created, use lowpart_subreg of operands[0] rather than operands[0]
15173 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
15174 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
15175 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
15176 and n constraint instead of aarch64_shift_imm_di and Usd.
15177 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
15178 (*aarch64_<optab>_reg_minus<mode>3): ... this.
15180 2018-03-20 Sudakshina Das <sudi.das@arm.com>
15183 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
15184 to favor GPR over NEON registers.
15185 (<shift>di3_neon): Likewise.
15187 2018-03-20 Tom de Vries <tom@codesourcery.com>
15190 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
15191 (nvptx_process_pars): Emit bar.sync asap and alap.
15193 2018-03-20 Tom de Vries <tom@codesourcery.com>
15196 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
15197 seen_label if seen_label is already set.
15199 2018-03-20 Jakub Jelinek <jakub@redhat.com>
15202 * config/i386/i386.c (fold_builtin_cpu): For features above 31
15203 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
15204 Use 1U instead of 1. Formatting fixes.
15207 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
15208 instead of TREE_TYPE (s1) for the return value.
15210 2018-03-19 Jakub Jelinek <jakub@redhat.com>
15212 PR tree-optimization/84946
15213 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
15214 bitsize + bitsize in poly_uint64 rather than poly_int64.
15217 * dwarf2asm.c: Include fold-const.c.
15218 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
15219 of decl rather than decl itself.
15221 PR rtl-optimization/84643
15222 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
15224 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
15227 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
15228 calling assemble_variable.
15230 2018-03-19 Sudakshina Das <sudi.das@arm.com>
15233 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
15234 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
15236 2018-03-19 Jim Wilson <jimw@sifive.com>
15239 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
15240 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
15241 (riscv_first_stack_step): Likewise.
15242 (riscv_option_override): Use STACK_BOUNDARY instead of
15243 MIN_STACK_BOUNDARY.
15244 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
15245 MIN_STACK_BOUNDARY.
15246 (BIGGEST_ALIGNMENT): Set to 128.
15247 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
15248 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
15251 2018-03-19 Richard Biener <rguenther@suse.de>
15253 PR tree-optimization/84933
15254 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
15255 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
15257 2018-03-19 Richard Biener <rguenther@suse.de>
15259 PR tree-optimization/84859
15260 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
15261 (cond_if_else_store_replacement): Perform sinking operation on
15262 single-store BBs regardless of MAX_STORES_TO_SINK setting.
15263 Generalize what a BB with a single eligible store is.
15265 2018-03-19 Richard Biener <rguenther@suse.de>
15267 PR tree-optimization/84929
15268 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
15269 chrec_is_positive against non-chrec arg.
15271 2018-03-19 Tamar Christina <tamar.christina@arm.com>
15274 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
15276 2018-03-18 Martin Liska <mliska@suse.cz>
15278 PR rtl-optimization/84635
15279 * regrename.c (build_def_use): Use matches_mode only when
15282 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
15284 PR tree-optimization/84913
15285 * tree-vect-loop.c (vectorizable_reduction): Don't try to
15286 vectorize chains of COND_EXPRs.
15288 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
15290 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
15292 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
15294 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
15296 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
15298 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
15300 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
15301 Kito Cheng <kito.cheng@gmail.com>
15303 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
15304 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
15305 (nds32_adjust_reg_alloc_order): New function.
15306 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
15308 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
15310 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
15311 nds32_print_operand, nds32_print_operand_address): Use
15312 HOST_WIDE_INT_PRINT_DEC instead.
15314 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
15316 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
15318 2018-03-17 Jakub Jelinek <jakub@redhat.com>
15321 * config/i386/i386.c (initial_ix86_tune_features,
15322 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
15323 unsigned long long.
15324 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
15325 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
15326 rather than 1u << ix86_tune. Formatting fix.
15327 (ix86_option_override_internal): Change ix86_arch_mask from
15328 unsigned int to unsigned HOST_WIDE_INT, initialize to
15329 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
15330 (ix86_function_specific_restore): Likewise.
15332 2018-03-16 Jakub Jelinek <jakub@redhat.com>
15335 * postreload.c (reload_combine_recognize_pattern): Perform
15336 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
15337 truncate_int_for_mode the result for the destination's mode.
15340 * hsa-gen.c (mem_type_for_type): Fix comment typo.
15341 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
15343 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
15346 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
15349 * lra-assigns.c (lra_split_hard_reg_for): Don't use
15350 regno_allocno_class_array and sorted_pseudos.
15351 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
15352 insns where regno is used.
15354 2018-03-16 Martin Liska <mliska@suse.cz>
15357 * multiple_target.c (create_dispatcher_calls): Redirect
15358 reference in the symbol table.
15360 2018-03-16 Martin Liska <mliska@suse.cz>
15363 * multiple_target.c (create_dispatcher_calls): Redirect also
15366 2018-03-16 Jakub Jelinek <jakub@redhat.com>
15370 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
15371 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
15372 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
15374 2018-03-16 Julia Koval <julia.koval@intel.com>
15376 * doc/invoke.texi (Skylake Server): Add CLWB.
15377 Cannonlake): Remove CLWB.
15379 2018-03-16 Jakub Jelinek <jakub@redhat.com>
15381 PR tree-optimization/84841
15382 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
15384 (FLOAT_ONE_CONST_TYPE): Define.
15385 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
15386 (sort_by_operand_rank): Put entries with higher constant_type last
15387 rather than first to match comments.
15389 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
15391 * config/nios2/nios2.md (movsi_internal): Fix thinko in
15394 2018-03-15 Jakub Jelinek <jakub@redhat.com>
15397 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
15398 check and use address of target always.
15400 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
15403 * config/i386/i386.c (indirect_thunk_needed): Update comments.
15404 (indirect_thunk_bnd_needed): Likewise.
15405 (indirect_thunks_used): Likewise.
15406 (indirect_thunks_bnd_used): Likewise.
15407 (indirect_return_needed): New.
15408 (indirect_return_bnd_needed): Likewise.
15409 (output_indirect_thunk_function): Add a bool argument for
15411 (output_indirect_thunk_function): Don't generate alias for
15412 function return thunk.
15413 (ix86_code_end): Call output_indirect_thunk_function to generate
15414 function return thunks.
15415 (ix86_output_function_return): Set indirect_return_bnd_needed
15416 and indirect_return_needed instead of indirect_thunk_bnd_needed
15417 and indirect_thunk_needed.
15419 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
15421 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
15422 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
15423 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
15425 2018-03-15 David Malcolm <dmalcolm@redhat.com>
15426 Paul Hua <paul.hua.gm@gmail.com>
15429 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
15431 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
15433 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
15434 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
15435 resp. SFmode cases.
15437 2018-03-15 Tamar Christina <tamar.christina@arm.com>
15440 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
15441 instead of GET_MODE_SIZE when comparing Units.
15443 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
15446 * varasm.c (hash_section): Return an unchangeble hash value
15447 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
15448 Return !aarch64_can_use_per_function_literal_pools_p ().
15450 2018-03-15 Jakub Jelinek <jakub@redhat.com>
15453 * optabs.c (emit_conditional_move): Pass address of cmode's copy
15454 rather than address of cmode as last argument to prepare_cmp_insn.
15456 2018-03-15 Julia Koval <julia.koval@intel.com>
15458 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
15459 F_AVX512VNNI, F_AVX512BITALG): New.
15461 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
15464 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
15465 insn for floating-point loads and stores.
15467 2018-03-14 Carl Love <cel@us.ibm.com>
15469 * config/rs6000/rs6000-c.c: Add macro definitions for
15470 ALTIVEC_BUILTIN_VEC_PERMXOR.
15471 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
15472 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
15473 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
15474 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
15476 * config/doc/extend.texi: Add prototypes for vec_permxor.
15478 2018-03-14 David Malcolm <dmalcolm@redhat.com>
15481 * diagnostic-show-locus.c (class layout_point): Convert m_line
15482 from int to linenum_type.
15483 (line_span::comparator): Use linenum "compare" function when
15484 comparing line numbers.
15485 (test_line_span): New function.
15486 (layout_range::contains_point): Convert param "row" from int to
15488 (layout_range::intersects_line_p): Likewise.
15489 (layout::will_show_line_p): Likewise.
15490 (layout::print_source_line): Likewise.
15491 (layout::should_print_annotation_line_p): Likewise.
15492 (layout::print_annotation_line): Likewise.
15493 (layout::print_leading_fixits): Likewise.
15494 (layout::annotation_line_showed_range_p): Likewise.
15495 (struct line_corrections): Likewise for field m_row.
15496 (line_corrections::line_corrections): Likewise for param "row".
15497 (layout::print_trailing_fixits): Likewise.
15498 (layout::get_state_at_point): Likewise.
15499 (layout::get_x_bound_for_row): Likewise.
15500 (layout::print_line): Likewise.
15501 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
15502 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
15503 * input.c (selftest::test_linenum_comparisons): New function.
15504 (selftest::input_c_tests): Call it.
15505 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
15506 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
15507 * selftest.h (ASSERT_GT): New macro.
15508 (ASSERT_GT_AT): New macro.
15509 (ASSERT_LT): New macro.
15510 (ASSERT_LT_AT): New macro.
15512 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
15514 PR rtl-optimization/84780
15515 * combine.c (distribute_links): Don't make a link based on pc_rtx.
15517 2018-03-14 Martin Liska <mliska@suse.cz>
15519 * tree.c (record_node_allocation_statistics): Use
15520 get_stats_node_kind.
15521 (get_stats_node_kind): New function extracted from
15522 record_node_allocation_statistics.
15523 (free_node): Use get_stats_node_kind.
15525 2018-03-14 Richard Biener <rguenther@suse.de>
15527 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
15528 that the value-set of ANTIC_IN doesn't grow.
15531 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
15533 (BB_VISITED_WITH_VISITED_SUCCS): New define.
15534 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
15536 2018-03-14 Julia Koval <julia.koval@intel.com>
15538 * config.gcc (icelake-client, icelake-server): New.
15540 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
15541 (initial_ix86_arch_features): Ditto.
15542 (PTA_SKYLAKE): Add SGX.
15543 (PTA_ICELAKE): Remove.
15544 (PTA_ICELAKE_CLIENT): New.
15545 (PTA_ICELAKE_SERVER): New.
15546 (ix86_option_override_internal): Split up icelake on icelake client and
15548 (get_builtin_code_for_version): Ditto.
15549 (fold_builtin_cpu): Ditto.
15550 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
15551 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
15552 * config/i386/i386.h (processor_type): Ditto.
15553 * doc/invoke.texi: Ditto.
15555 2018-03-14 Jakub Jelinek <jakub@redhat.com>
15558 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
15559 INTEGER_CST offset, add it together with bitpos / 8 and
15560 sign extend based on POINTER_SIZE.
15564 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
15567 * config/i386/constraints.md (Yc): New register constraint.
15568 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
15569 Use Yc constraint for alternative 2 of operand 0. Remove
15570 preferred_for_speed attribute.
15572 2018-03-14 Richard Biener <rguenther@suse.de>
15574 PR tree-optimization/84830
15575 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
15576 with the old one to avoid oscillations.
15578 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
15581 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
15583 (assign_by_spills): Return a flag of reload assignment failure.
15584 Do not process the reload assignment failures. Do not spill other
15585 reload pseudos if they has the same reg class. Update n if
15587 (lra_assign): Add a return arg. Set up from the result of
15588 assign_by_spills call.
15589 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15590 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
15591 usage_insns if it is not NULL.
15592 (spill_hard_reg_in_range): New function.
15593 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15594 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15595 function prototypes.
15596 (lra_assign): Change prototype.
15597 * lra.c (lra): Add code to deal with fails by splitting hard reg
15600 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
15602 * config/riscv/riscv.opt (mrelax): New option.
15603 * config/riscv/riscv.c (riscv_file_start): Emit ".option
15604 "norelax" when riscv_mrelax is disabled.
15605 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
15607 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15610 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
15611 reassociation for int modes.
15613 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
15615 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
15616 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
15618 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
15619 * config/aarch64/aarch64-sve.md
15620 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
15621 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
15622 (*extend<mode><Vwide>2): Rename to...
15623 (aarch64_sve_extend<mode><Vwide>2): ...this.
15624 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
15625 renaming the old pattern to...
15626 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
15628 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
15629 define_expand, renaming the old pattern to...
15630 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
15631 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
15632 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
15633 account when deciding which SVE instruction the optab should use.
15634 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
15636 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
15638 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
15639 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
15640 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
15641 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
15642 (tlsdesc_small_<mode>): Turn a define_expand and use
15643 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
15644 (tlsdesc_small_advsimd_<mode>): ...this.
15645 (tlsdesc_small_sve_<mode>): New pattern.
15647 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
15649 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
15650 (UNSPEC_UMUL_HIGHPART): New constants.
15651 (MUL_HIGHPART): New int iteraor.
15652 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
15653 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
15655 (*<su>mul<mode>3_highpart): New define_insn.
15657 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
15660 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
15663 2018-03-13 Martin Liska <mliska@suse.cz>
15666 * (sem_item_optimizer::sem_item_optimizer): Initialize new
15668 (sem_item_optimizer::~sem_item_optimizer): Release it.
15669 (sem_item_optimizer::merge_classes): Register variable aliases.
15670 (sem_item_optimizer::fixup_pt_set): New function.
15671 (sem_item_optimizer::fixup_points_to_sets): Likewise.
15672 * ipa-icf.h: Declare new variables and functions.
15674 2018-03-13 Jakub Jelinek <jakub@redhat.com>
15676 PR middle-end/84834
15677 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
15678 integer_pow2p@2 and test integer_pow2p in condition.
15679 (A < 0 ? C : 0): Similarly for @1.
15681 PR middle-end/84831
15682 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
15683 characters starting at p contain '\0' character, don't look beyond
15687 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
15688 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
15691 * reg-stack.c (change_stack): Change update_end var from int to
15692 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
15693 also call set_block_for_insn on the newly added insns and rescan.
15696 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
15697 on the last operand.
15700 * tree.c (stabilize_reference_1): Return save_expr (e) for
15701 STATEMENT_LIST even if it doesn't have side-effects.
15703 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
15705 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
15707 2018-03-12 Renlin Li <renlin.li@arm.com>
15709 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
15710 aarch64_output_scalar_simd_mov_immediate.
15712 2018-03-12 Martin Sebor <msebor@redhat.com>
15714 PR tree-optimization/83456
15715 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
15716 for perfectly overlapping calls to memcpy.
15717 (gimple_fold_builtin_memory_chk): Same.
15718 (gimple_fold_builtin_strcpy): Handle no-warning.
15719 (gimple_fold_builtin_stxcpy_chk): Same.
15720 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
15722 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
15724 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
15725 parameter. Use it for SFmode.
15726 (rs6000_function_arg_advance_1): Adjust.
15727 (rs6000_function_arg): Adjust.
15728 (rs6000_gimplify_va_arg): Pass false for that new parameter.
15730 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
15732 PR rtl-optimization/84169
15733 PR rtl-optimization/84780
15734 * combine.c (can_combine_p): Check for a 2-insn combination whether
15735 the destination register is used between the two insns, too.
15737 2018-03-12 Richard Biener <rguenther@suse.de>
15739 PR tree-optimization/84803
15740 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
15741 for refs DR analysis didn't process.
15743 2018-03-12 Richard Biener <rguenther@suse.de>
15745 PR tree-optimization/84777
15746 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
15747 force-vectorize loops ignore whether we are optimizing for size.
15749 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
15751 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
15752 (TARGET_MD_ASM_ADJUST): Define.
15754 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
15755 Kito Cheng <kito.cheng@gmail.com>
15756 Chung-Ju Wu <jasonwucj@gmail.com>
15758 * config/nds32/nds32.c (nds32_compute_stack_frame,
15759 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
15760 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
15761 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
15762 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
15763 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
15764 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
15765 * config/nds32/nds32.md (prologue, epilogue): Use macro
15766 NDS32_V3PUSH_AVAILABLE_P to do checking.
15768 2018-03-11 Jakub Jelinek <jakub@redhat.com>
15771 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
15772 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
15773 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
15774 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
15775 addition of most attributes on !orig_type_die or the attribute not
15776 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
15778 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
15779 Chung-Ju Wu <jasonwucj@gmail.com>
15781 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
15782 __NDS32_VH__ macro.
15783 * config/nds32/nds32.opt (mvh): New option.
15785 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
15786 Chung-Ju Wu <jasonwucj@gmail.com>
15788 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
15790 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
15791 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
15794 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
15795 Chung-Ju Wu <jasonwucj@gmail.com>
15797 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
15799 * config/nds32/nds32-multiple.md (strlensi): New pattern.
15800 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
15802 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
15803 Kito Cheng <kito.cheng@gmail.com>
15804 Chung-Ju Wu <jasonwucj@gmail.com>
15806 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
15807 UNSPEC_FFMISM and UNSPEC_FLMISM.
15808 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
15809 for ffb, ffmism and flmism.
15810 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
15811 (unspec_ffmism): Ditto.
15812 (unspec_flmism): Ditto.
15813 (nds32_expand_builtin_impl): Check if string extension is available.
15814 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
15815 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
15817 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
15820 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
15823 * lra-assigns.c (assign_by_spills): Return a flag of reload
15824 assignment failure. Do not process the reload assignment
15825 failures. Do not spill other reload pseudos if they has the same
15827 (lra_assign): Add a return arg. Set up from the result of
15828 assign_by_spills call.
15829 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15830 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
15831 usage_insns if it is not NULL.
15832 (spill_hard_reg_in_range): New function.
15833 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15834 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15835 function prototypes.
15836 (lra_assign): Change prototype.
15837 * lra.c (lra): Add code to deal with fails by splitting hard reg
15840 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
15843 * config/i386/i386.opt: Replace Enforcment with Enforcement.
15845 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
15848 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
15849 (dw_val_node): Add val_symbolic_view.
15850 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
15851 (symview_upper_bound): New.
15852 (new_line_info_table): Initialize symviews_since_reset.
15853 (dwarf2out_source_line): Count symviews_since_reset and set
15854 symview_upper_bound.
15855 (dw_val_equal_p): Handle symview.
15856 (add_AT_symview): New.
15857 (print_dw_val): Handle symview.
15858 (attr_checksum, attr_checksum_ordered): Likewise.
15859 (same_dw_val_p, size_of_die): Likewise.
15860 (value_format, output_die): Likewise.
15861 (add_high_low_attributes): Use add_AT_symview for entry_view.
15862 (dwarf2out_finish): Reset symview_upper_bound, clear
15865 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
15868 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
15869 Add strict argument and use it.
15870 (rs6000_split_multireg_move): Update for new strict argument.
15871 (mem_operand_gpr): Disallow all non-offsettable addresses.
15872 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
15874 2018-03-09 Jakub Jelinek <jakub@redhat.com>
15877 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
15878 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
15879 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
15882 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
15883 decl, use remap_type if we want to use the type.
15885 2018-03-09 Martin Sebor <msebor@redhat.com>
15887 PR tree-optimization/84526
15888 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
15890 (builtin_access::generic_overlap): Be prepared to handle non-array
15893 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
15895 PR rtl-optimization/84682
15896 * lra-constraints.c (process_address_1): Check is_address flag
15897 for address constraints.
15898 (process_alt_operands): Likewise.
15899 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
15900 preprocess_constraints.
15901 * recog.h (preprocess_constraints): Add oploc parameter.
15903 * recog.c (preprocess_constraints): Test address_operand for
15904 CT_ADDRESS constraints.
15906 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
15909 * lra-assigns.c (assign_by_spills): Return a flag of reload
15910 assignment failure. Do not process the reload assignment
15911 failures. Do not spill other reload pseudos if they has the same
15913 (lra_assign): Add a return arg. Set up from the result of
15914 assign_by_spills call.
15915 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15916 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
15917 usage_insns if it is not NULL.
15918 (spill_hard_reg_in_range): New function.
15919 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15920 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15921 function prototypes.
15922 (lra_assign): Change prototype.
15923 * lra.c (lra): Add code to deal with fails by splitting hard reg
15926 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15929 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
15930 Accept complain bool parameter. Only emit errors if it is true.
15931 (arm_parse_cpu_option_name): Likewise.
15932 (arm_target_thumb_only): Adjust callers of the above.
15933 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
15934 prototype to take a default true bool parameter.
15935 (arm_parse_arch_option_name): Likewise.
15937 2018-03-09 David Malcolm <dmalcolm@redhat.com>
15938 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
15942 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
15943 * configure: Regenerate.
15944 * configure.ac ("linker --version-script option"): New.
15945 ("linker soname option"): New.
15947 2018-03-09 Richard Biener <rguenther@suse.de>
15949 PR tree-optimization/84775
15950 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
15951 immediate uses of predicate stmts and mark them modified.
15954 PR tree-optimization/84178
15955 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
15957 (version_loop_for_if_conversion): Delay update_ssa call.
15958 (tree_if_conversion): Delay update_ssa until after predicate
15961 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
15964 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
15965 when the function accesses prior frames.
15967 2018-03-08 Jakub Jelinek <jakub@redhat.com>
15970 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
15971 gen_llsym, otherwise call maybe_gen_llsym.
15973 PR inline-asm/84742
15974 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
15975 has ',' character inside of it.
15977 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15980 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
15981 as clobbering CC_REGNUM.
15983 2018-03-08 Richard Biener <rguenther@suse.de>
15985 PR middle-end/84552
15986 * tree-scalar-evolution.c: Include tree-into-ssa.h.
15987 (follow_copies_to_constant): Do not follow SSA names registered
15990 2018-03-08 Richard Biener <rguenther@suse.de>
15992 PR tree-optimization/84178
15993 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
15995 (version_loop_for_if_conversion): Delay update_ssa call.
15996 (tree_if_conversion): Delay update_ssa until after predicate
15999 2018-03-08 David Malcolm <dmalcolm@redhat.com>
16001 PR tree-optimization/84178
16002 * tree-if-conv.c (release_bb_predicate): Remove the
16003 the assertion that the stmts have NULL use_ops.
16004 Discard the statements, asserting that they haven't
16005 yet been added to a BB.
16007 2018-03-08 Richard Biener <rguenther@suse.de>
16009 PR tree-optimization/84746
16010 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
16011 (phi_translate): Pass in destination ANTIC_OUT set.
16012 (phi_translate_1): Likewise. For a simplified result lookup
16013 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
16014 (phi_translate_set): Adjust.
16015 (do_pre_regular_insertion): Likewise.
16016 (do_pre_partial_partial_insertion): Likewise.
16018 2018-03-08 Martin Liska <mliska@suse.cz>
16020 PR gcov-profile/84735
16021 * doc/gcov.texi: Document usage of profile files.
16022 * gcov-io.h: Document changes in the format.
16024 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
16028 * dwarf2out.c (struct dw_line_info_table): Update comments for
16030 (FORCE_RESET_NEXT_VIEW): New.
16031 (FORCE_RESETTING_VIEW_P): New.
16032 (RESETTING_VIEW_P): Check for -1 too.
16033 (ZERO_VIEW_P): Likewise.
16034 (new_line_info_table): Force-reset next view.
16035 (dwarf2out_begin_function): Likewise.
16036 (dwarf2out_source_line): Simplify zero_view_p initialization.
16037 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
16038 view directly. Omit view when omitting .loc at line 0.
16040 2018-03-08 Jakub Jelinek <jakub@redhat.com>
16042 PR tree-optimization/84740
16043 * tree-switch-conversion.c (process_switch): Call build_constructors
16044 only if info.phi_count is non-zero.
16046 PR tree-optimization/84739
16047 * tree-tailcall.c (find_tail_calls): Check call arguments against
16048 DECL_ARGUMENTS (current_function_decl) rather than
16049 DECL_ARGUMENTS (func) when checking for tail recursion.
16051 2018-03-07 Jakub Jelinek <jakub@redhat.com>
16053 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
16054 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
16055 Volker Reichelt's entry and add entries for people that perform
16056 GCC fuzzy testing and report numerous bugs.
16058 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
16061 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
16062 readonly data in sdata, if that is disabled.
16063 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
16064 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
16065 -mreadonly-in-sdata option.
16067 2018-03-07 Martin Sebor <msebor@redhat.com>
16069 PR tree-optimization/84468
16070 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
16071 basic block when looking for nul assignment.
16073 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
16076 * except.h (output_function_exception_table): Adjust prototype.
16077 * except.c (output_function_exception_table): Remove FNNAME parameter
16078 and add SECTION parameter. Ouput one part of the table at a time.
16079 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
16080 the first part of the exception table and emit unwind directives.
16081 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
16082 (i386_pe_seh_cold_init): Likewise.
16083 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
16084 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
16085 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
16086 (ix86_output_call_insn): Emit a nop in one more case for SEH.
16087 * config/i386/winnt.c: Include except.h.
16088 (struct seh_frame_state): Add reg_offset, after_prologue and
16089 in_cold_section fields.
16090 (i386_pe_seh_end_prologue): Set seh->after_prologue.
16091 (i386_pe_seh_cold_init): New function.
16092 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
16093 to seh->in_cold_section.
16094 (seh_emit_push): Record the offset of the push.
16095 (seh_emit_save): Record the offet of the save.
16096 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
16097 Test seh->after_prologue to disregard the epilogue.
16098 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
16099 (i386_pe_end_cold_function): New function.
16101 2018-03-07 Jakub Jelinek <jakub@redhat.com>
16104 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
16105 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
16108 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
16110 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
16111 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
16113 PR middle-end/84723
16114 * multiple_target.c: Include tree-inline.h and intl.h.
16115 (expand_target_clones): Diagnose and fail if node->definition and
16116 !tree_versionable_function_p (node->decl).
16118 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
16120 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
16122 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
16123 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
16124 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
16126 2018-03-06 Jakub Jelinek <jakub@redhat.com>
16129 * combine.c (try_combine): Use reg_or_subregno instead of handling
16130 just paradoxical SUBREGs and REGs.
16132 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
16134 * config/arc/arc.c (arc_finalize_pic): Remove function.
16135 (arc_must_save_register): We use single base PIC register, remove
16136 checks to save/restore the PIC register.
16137 (arc_expand_prologue): Likewise.
16138 * config/arc/arc-protos.h (arc_set_default_type_attributes):
16140 (arc_verify_short): Likewise.
16141 (arc_attr_type): Likewise.
16142 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
16143 (walk_stores): Likewise.
16144 (arc_address_cost): Make it static.
16145 (arc_verify_short): Likewise.
16146 (branch_dest): Likewise.
16147 (arc_attr_type): Likewise.
16148 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
16149 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
16150 (arc_final_prescan_insn): Remove inserting the nops due to
16151 hardware hazards. It is done in reorg step.
16152 (insn_length_variant_t): Remove.
16153 (insn_length_parameters_t): Likewise.
16154 (arc_insn_length_parameters): Likewise.
16155 (arc_get_insn_variants): Likewise.
16156 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
16158 2018-03-06 Jakub Jelinek <jakub@redhat.com>
16160 PR inline-asm/84683
16161 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
16164 PR tree-optimization/84687
16165 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
16167 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
16169 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16171 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
16172 Rename to ppc_speculation_barrier.
16173 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
16174 __builtin_ppc_speculation_barrier.
16176 2018-03-05 Jakub Jelinek <jakub@redhat.com>
16179 * combine.c (combine_simplify_rtx): Don't try to simplify if
16180 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
16183 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
16185 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
16186 to 32 bytes when compiling for POWER9.
16188 2018-03-05 Jakub Jelinek <jakub@redhat.com>
16191 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
16192 regparm >= 3 with no arg reg available also for calls with
16193 flag_force_indirect_call. Pass decl to ix86_function_regparm.
16196 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
16198 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
16200 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
16203 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
16205 2018-03-05 Richard Biener <rguenther@suse.de>
16207 PR tree-optimization/84486
16208 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
16209 When inserting a __builtin_assume_aligned call set the LHS
16210 SSA name alignment info accordingly.
16212 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
16214 PR tree-optimization/84114
16215 * config/aarch64/aarch64.c (aarch64_reassociation_width)
16216 Avoid reassociation of FLOAT_MODE addition.
16218 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
16220 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
16221 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
16222 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
16223 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
16224 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
16225 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
16226 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
16228 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
16229 __builtin_ia32_wbinvd): New builtins.
16230 (SPECIAL_ARGS2): New.
16231 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
16232 (SPECIAL_ARGS2): New.
16233 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
16234 (ix86_valid_target_attribute_inner_p): Ditto.
16235 (ix86_init_mmx_sse_builtins): Add special_args2.
16236 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
16237 TARGET_WBNOINVD_P): New.
16238 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
16239 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
16240 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
16241 * config/i386/immintrin.h (_wbinvd): New intrinsic.
16242 * config/i386/pconfigintrin.h: New file.
16243 * config/i386/wbnoinvdintrin.h: Ditto.
16244 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
16246 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
16248 2018-03-05 Richard Biener <rguenther@suse.de>
16250 PR tree-optimization/84670
16251 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16253 (BB_VISITED_WITH_VISITED_SUCCS): New define.
16254 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16255 (compute_antic_aux): Only assert the number of values in ANTIC_IN
16256 doesn't grow if all successors (recursively) were visited at least
16259 2018-03-05 Richard Biener <rguenther@suse.de>
16261 PR tree-optimization/84650
16262 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
16263 if executed in the loop pipeline.
16265 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
16267 * doc/configfiles.texi (Configuration Files): Move info about
16268 conditionalizing $target-protos.h to...
16269 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
16270 differs from $target-protos.h.
16272 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
16273 Chung-Ju Wu <jasonwucj@gmail.com>
16275 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
16276 * config/nds32/nds32-multiple.md (setmemsi): Define.
16277 * config/nds32/nds32-memory-manipulation.c
16278 (nds32_gen_dup_4_byte_to_word_value): New.
16279 (emit_setmem_word_loop): New.
16280 (emit_setmem_byte_loop): New.
16281 (nds32_expand_setmem_loop): New.
16282 (nds32_expand_setmem_loop_v3m): New.
16283 (nds32_expand_setmem_unroll): New.
16284 (nds32_expand_setmem): New.
16286 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
16287 Chung-Ju Wu <jasonwucj@gmail.com>
16289 * config/nds32/nds32-memory-manipulation.c
16290 (nds32_emit_load_store): New.
16291 (nds32_emit_post_inc_load_store): New.
16292 (nds32_emit_mem_move): New.
16293 (nds32_emit_mem_move_block): New.
16294 (nds32_expand_movmemsi_loop_unknown_size): New.
16295 (nds32_expand_movmemsi_loop_known_size): New.
16296 (nds32_expand_movmemsi_loop): New.
16297 (nds32_expand_movmemsi_unroll): New.
16298 (nds32_expand_movmemqi): Rename ...
16299 (nds32_expand_movmemsi): ... to this.
16300 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
16301 (movmemsi): ... to this.
16302 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
16303 (nds32_expand_movmemsi): ... to this.
16305 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
16306 Monk Chiang <sh.chiang04@gmail.com>
16307 Chung-Ju Wu <jasonwucj@gmail.com>
16309 * config/nds32/nds32-protos.h
16310 (nds32_expand_load_multiple): New arguments.
16311 (nds32_expand_store_multiple): Ditto.
16312 (nds32_valid_multiple_load_store): Rename ...
16313 (nds32_valid_multiple_load_store_p): ... to this.
16314 * config/nds32/nds32-memory-manipulation.c
16315 (nds32_expand_load_multiple): Refine implementation.
16316 (nds32_expand_store_multiple): Ditto.
16317 * config/nds32/nds32-multiple.md
16318 (load_multiple): Update nds32_expand_load_multiple interface.
16319 (store_multiple): Update nds32_expand_store_multiple interface.
16320 * config/nds32/nds32-predicates.c
16321 (nds32_valid_multiple_load_store): Rename ...
16322 (nds32_valid_multiple_load_store_p): ... to this and refine
16324 * config/nds32/predicates.md
16325 (nds32_load_multiple_and_update_address_operation): New predicate.
16326 (nds32_store_multiple_and_update_address_operation): New predicate.
16328 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
16329 Chung-Ju Wu <jasonwucj@gmail.com>
16331 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
16332 (combo): New attribute.
16333 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
16335 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
16337 * config/nds32/nds32.opt: Change -mcmodel= default value.
16339 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
16340 Monk Chiang <sh.chiang04@gmail.com>
16341 Chung-Ju Wu <jasonwucj@gmail.com>
16343 * config/nds32/constants.md (unspec_element): New enum.
16344 * config/nds32/constraints.md (Umw): New constraint.
16345 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
16346 * config/nds32/nds32-intrinsic.md: Likewise.
16347 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
16348 (nds32_valid_smw_lwm_base_p): New.
16349 (nds32_output_smw_single_word): New.
16350 (nds32_output_lmw_single_word): New.
16351 (nds32_expand_unaligned_load): New.
16352 (nds32_expand_unaligned_store): New.
16353 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
16354 (nds32_output_smw_single_word): Declare.
16355 (nds32_output_lmw_single_word): Declare.
16356 (nds32_expand_unaligned_load): Declare.
16357 (nds32_expand_unaligned_store): Declare.
16358 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
16359 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
16360 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
16361 NDS32_BUILTIN_UASTORE_DW.
16362 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
16365 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
16366 Kito Cheng <kito.cheng@gmail.com>
16367 Chung-Ju Wu <jasonwucj@gmail.com>
16369 * config/nds32/nds32-intrinsic.c
16370 (nds32_expand_builtin_null_ftype_reg): Delete.
16371 (nds32_expand_builtin_reg_ftype_imm): Ditto.
16372 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
16373 (nds32_read_argument): New.
16374 (nds32_legitimize_target): Ditto.
16375 (nds32_legitimize_argument): Ditto.
16376 (nds32_check_constant_argument): Ditto.
16377 (nds32_expand_unop_builtin): Ditto.
16378 (nds32_expand_unopimm_builtin): Ditto.
16379 (nds32_expand_binop_builtin): Ditto.
16380 (nds32_builtin_decl_impl): Ditto.
16381 (builtin_description): Ditto.
16382 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
16383 (nds32_init_builtins_impl): Ditto.
16384 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
16385 (nds32_builtin_decl): New.
16386 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
16387 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
16389 2018-03-02 Jeff Law <law@redhat.com>
16391 * reorg.c (stop_search_p): Handle DEBUG_INSN.
16392 (redundant_insn, fill_simple_delay_slots): Likewise.
16393 (fill_slots_from_thread): Likewise.
16394 * resource.c (mark_referenced_resources): Likewise.
16395 (mark_set_resources, find_dead_or_set_registers): Likewise.
16397 2018-03-02 Jakub Jelinek <jakub@redhat.com>
16399 * substring-locations.h (format_warning_va): Formatting fix for
16400 ATTRIBUTE_GCC_DIAG.
16401 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
16403 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
16404 * substring-locations.c: Include intl.h.
16405 (format_warning_va): Turned into small wrapper around
16406 format_warning_n_va, renamed to ...
16407 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
16408 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
16410 (format_warning_at_substring_n): New function.
16411 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
16412 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
16413 format_warning_at_substring with just a shorter name instead of
16414 const function pointer.
16415 (fmtwarn_n): New function.
16416 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
16417 appropriate, get rid of all the fmtstr temporaries, move conditionals
16418 with G_() wrapped string literals directly into fmtwarn arguments,
16419 cast dir.len to (int), formatting fixes.
16421 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
16423 * doc/invoke.texi: Remove "Cilk Plus" references.
16425 2018-03-02 Jakub Jelinek <jakub@redhat.com>
16426 Richard Biener <rguenther@suse.de>
16429 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
16430 for error or warning attributes if CALL_FROM_THUNK_P is set.
16433 2018-03-02 Jakub Jelinek <jakub@redhat.com>
16436 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
16437 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
16440 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
16441 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
16443 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
16444 instead of -1U in last predictors element's probability member.
16446 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
16449 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
16450 arguments if they are comparable.
16452 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
16454 PR tree-optimization/84634
16455 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
16456 masks and masked_loop_p with a single loop_masks, making sure it's
16457 null for bb vectorization.
16459 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
16461 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
16462 (vect_analyze_data_ref_access): Use loop->safe_len rather than
16463 loop->force_vectorize to check whether there is no alias.
16465 2018-03-02 Jakub Jelinek <jakub@redhat.com>
16468 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
16470 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
16472 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
16473 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
16474 instead of a loop around prev_real_insn.
16475 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
16478 PR inline-asm/84625
16479 * config/i386/i386.c (ix86_print_operand): Use conditional
16480 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
16483 2018-03-02 Richard Biener <rguenther@suse.de>
16485 PR tree-optimization/84427
16486 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
16487 (bitmap_set_subtract_values): Rewrite to handle multiple
16490 (prune_clobbered_mems): Likewise.
16491 (phi_translate): Take edge instead of pred/phiblock.
16492 (phi_translate_1): Likewise.
16493 (phi_translate_set): Likewise. Insert all translated
16494 exprs for a value into the set, keeping possibly multiple
16495 expressions per value.
16496 (compute_antic_aux): Adjust for phi_translate changes.
16497 When intersecting union the expressions and prune those
16498 not in the final value set, keeping possibly multiple
16499 expressions per value. Do not use value-insertion
16500 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
16501 all expressions. Add verification that the value-sets
16502 only shrink during iteration.
16503 (compute_partial_antic_aux): Adjust for the phi_translate changes.
16504 (do_pre_regular_insertion): Likewise.
16505 (do_pre_partial_partial_insertion): Likewise.
16507 2018-03-02 Richard Biener <rguenther@suse.de>
16510 * config/darwin.c (saved_debug_info_level): New static global.
16511 (darwin_asm_lto_start): Disable debug info generation for LTO out.
16512 (darwin_asm_lto_end): Restore debug info generation settings.
16514 2018-03-01 Martin Liska <mliska@suse.cz>
16517 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
16518 volatile arguments.
16520 2018-03-01 Richard Biener <rguenther@suse.de>
16523 * dwarf2out.c (gen_variable_die): Properly handle late VLA
16524 type annotation with LTO when debug was disabled at compile-time.
16526 2018-03-01 Matthew Fortune <mfortune@gmail.com>
16528 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
16530 (mips_final_postscan_insn): Likewise.
16532 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
16534 PR rtl-optimization/84528
16535 * alias.c (init_alias_target): Add commentary.
16536 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
16537 a unique base value if the frame pointer is not eliminated
16538 to the stack pointer.
16540 2018-03-01 Tom de Vries <tom@codesourcery.com>
16542 PR rtl-optimization/83327
16543 * lra-int.h (hard_regs_spilled_into): Declare.
16544 * lra.c (hard_regs_spilled_into): Define.
16545 (init_reg_info): Init hard_regs_spilled_into.
16546 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
16547 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
16548 (process_bb_lives): Handle hard_regs_spilled_into.
16549 (lra_create_live_ranges_1): Before doing liveness propagation, clear
16550 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
16552 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
16554 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
16555 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
16556 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
16557 * config/rs6000/aix72.h: New file.
16559 2018-02-28 Jakub Jelinek <jakub@redhat.com>
16561 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
16562 instead of warning_at with conditional singular and plural messages
16566 * stor-layout.c (update_alignment_for_field): For
16567 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
16568 && !DECL_PACKED (field), do the alignment update, just use
16569 only desired_align instead of MAX (type_align, desired_align)
16571 (place_field): Don't do known_align < desired_align handling
16572 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
16573 is non-NULL, instead do it after rli->prev_field handling and
16574 only if not within a bitfield word. For DECL_PACKED (field)
16575 use type_align of BITS_PER_UNIT.
16577 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
16579 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
16580 superfluous parentheses and trailing spaces.
16582 2018-02-28 Richard Biener <rguenther@suse.de>
16584 PR tree-optimization/84584
16585 * graphite-scop-detection.c (scop_detection::add_scop): Discard
16586 SCoPs with fake exit edge.
16588 2018-02-28 Martin Liska <mliska@suse.cz>
16591 * timevar.c (timer::print): Fix format to properly print 100%
16594 2018-02-28 Richard Biener <rguenther@suse.de>
16596 PR middle-end/84607
16597 * genmatch.c (capture_info::walk_match): Do not mark
16598 captured expressions without operands as expr_p given
16599 they act more like predicates and should be subject to
16600 "lost tail" side-effect preserving.
16602 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
16604 PR rtl-optimization/81611
16605 * auto-inc-dec.c (attempt_change): Move dead note from
16606 mem_insn if it's the next use of regno
16607 (find_address): Take address use of reg holding
16608 non-incremented value. Add parm to limit search to the named
16610 (merge_in_block): Attempt to use a mem insn that is the next
16611 use of the original regno.
16613 2018-02-27 Martin Sebor <msebor@redhat.com>
16616 * doc/invoke.texi (-Wmissing-attributes): New option.
16617 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
16619 2018-02-27 Martin Sebor <msebor@redhat.com>
16621 PR translation/84207
16622 * diagnostic-core.h (warning_n, error_n, inform_n): Change
16623 n argument to unsigned HOST_WIDE_INT.
16624 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
16625 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
16626 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
16627 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
16629 2018-02-27 Richard Biener <rguenther@suse.de>
16631 PR tree-optimization/84512
16632 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
16633 Do not use the estimate returned from record_stmt_cost for
16634 the scalar iteration cost but sum properly using add_stmt_cost.
16636 2018-02-27 Richard Biener <rguenther@suse.de>
16638 PR tree-optimization/84466
16639 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
16640 Adjust last change to less strictly validate use operands.
16642 2018-02-27 Martin Liska <mliska@suse.cz>
16644 PR gcov-profile/84548
16645 * gcov.c (process_file): Allow partial overlap and consider it
16646 also as group functions.
16647 (output_lines): Properly calculate range of lines for a group.
16649 2018-02-27 Martin Liska <mliska@suse.cz>
16651 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
16652 'ggc' suffixes. Change first column width.
16653 (timer::print): Fix formatting of the column.
16655 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
16657 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
16658 preserve inline entry blocks for the sake of debug inline
16659 entry point markers alone.
16660 (remove_unused_locals): Suggest in comments a better place to
16661 force the preservation of inline entry blocks that are
16662 otherwise unused, but do not preserve them.
16664 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
16666 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
16668 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
16671 * config/i386/constraints.md (Bs): Replace
16672 ix86_indirect_branch_register with
16673 TARGET_INDIRECT_BRANCH_REGISTER.
16675 * config/i386/i386.md (indirect_jump): Likewise.
16676 (tablejump): Likewise.
16677 (*sibcall_memory): Likewise.
16678 (*sibcall_value_memory): Likewise.
16679 Peepholes of indirect call and jump via memory: Likewise.
16680 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
16681 (*sibcall_value_GOT_32): Likewise.
16682 * config/i386/predicates.md (indirect_branch_operand): Likewise.
16683 (GOT_memory_operand): Likewise.
16684 (call_insn_operand): Likewise.
16685 (sibcall_insn_operand): Likewise.
16686 (GOT32_symbol_operand): Likewise.
16687 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
16689 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
16691 PR rtl-optimization/83496
16692 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
16693 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
16694 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
16695 redundant insn, if any.
16696 (relax_delay_slots): Likewise.
16697 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
16699 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
16701 PR tree-optimization/83965
16702 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
16703 that grouped statements are part of a reduction chain. Return
16704 true if the statement is not marked as a reduction itself but
16705 is part of a group.
16706 (vect_recog_dot_prod_pattern): Don't check whether the statement
16707 is part of a group here.
16708 (vect_recog_sad_pattern): Likewise.
16709 (vect_recog_widen_sum_pattern): Likewise.
16711 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
16714 * final.c (rest_of_clean_state): Also look for calls inside sequences.
16716 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
16719 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
16721 (ix86_output_indirect_function_return): New prototype.
16722 (ix86_split_simple_return_pop_internal): Likewise.
16723 * config/i386/i386.c (indirect_return_via_cx): New.
16724 (indirect_return_via_cx_bnd): Likewise.
16725 (indirect_thunk_name): Handle return va CX_REG.
16726 (output_indirect_thunk_function): Create alias for
16727 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
16728 (ix86_output_indirect_jmp): Remove the bool argument.
16729 (ix86_output_indirect_function_return): New function.
16730 (ix86_split_simple_return_pop_internal): Likewise.
16731 * config/i386/i386.md (*indirect_jump): Don't pass false
16732 to ix86_output_indirect_jmp.
16733 (*tablejump_1): Likewise.
16734 (simple_return_pop_internal): Change it to define_insn_and_split.
16735 Call ix86_split_simple_return_pop_internal to split it for
16736 -mfunction-return=.
16737 (simple_return_indirect_internal): Call
16738 ix86_output_indirect_function_return instead of
16739 ix86_output_indirect_jmp.
16741 2018-02-26 Jakub Jelinek <jakub@redhat.com>
16744 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
16745 memset and value initialization afterwards.
16747 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
16749 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
16751 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16754 * common/config/aarch64/aarch64-common.c
16755 (aarch_option_optimization_table[]): Switch
16756 off fomit-frame-pointer
16758 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
16759 Chung-Ju Wu <jasonwucj@gmail.com>
16761 * config/nds32/nds32-multiple.md (load_multiple): Disallow
16763 (store_multiple): Ditto.
16765 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
16767 * config.gcc: Add --with-cpu support for nds32 target.
16768 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
16769 * config/nds32/nds32.opt: Add -mcpu= option.
16771 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
16773 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
16774 isel=yes): Warn for these deprecated options.
16776 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
16778 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
16779 ISA_2_5_MASKS_EMBEDDED.
16781 2018-02-23 Jakub Jelinek <jakub@redhat.com>
16783 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
16784 p->max as pointers rather than using iterative_hash_expr.
16786 2018-02-23 Carl Love <cel@us.ibm.com>
16788 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
16789 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
16791 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
16792 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
16793 P8V_BUILTIN_VEC_VUNSIGNED2.
16795 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
16798 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
16799 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
16801 * lra-constraints.c (curr_insn_transform): Set up
16802 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
16804 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
16805 * lra-eliminations.c (spill_pseudos): Ditto.
16806 (process_insn_for_elimination): Ditto.
16807 * lra-lives.c (reg_early_clobber_p): Use the new macros.
16808 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
16809 LRA_NON_CLOBBERED_ALT.
16811 2018-02-22 Martin Sebor <msebor@redhat.com>
16813 PR tree-optimization/84480
16814 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
16815 to maybe_diag_stxncpy_trunc. Call it.
16816 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
16817 from gimple_fold_builtin_strcpy. Print inlining stack.
16818 (handle_builtin_stxncpy): Print inlining stack.
16819 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
16821 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
16824 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
16825 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
16826 and -fcheck-pointer-bounds are used together.
16827 (indirect_thunk_prefix): New enum.
16828 (indirect_thunk_need_prefix): New function.
16829 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
16830 "_nt" instead of "_bnd" for NOTRACK prefix.
16831 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
16832 (output_indirect_thunk_function): Likewise.
16834 (ix86_code_end): Update output_indirect_thunk_function calls.
16835 (ix86_output_indirect_branch_via_reg): Replace
16836 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
16837 (ix86_output_indirect_branch_via_push): Likewise.
16838 (ix86_output_function_return): Likewise.
16839 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
16840 incompatible with -fcf-protection=branch and
16841 -fcheck-pointer-bounds.
16843 2018-02-22 Steve Ellcey <sellcey@cavium.com>
16846 * config/aarch64/aarch64.c (aarch64_print_address_internal):
16847 Change gcc_assert call to output_operand_lossage.
16849 2018-02-22 Steve Ellcey <sellcey@cavium.com>
16851 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
16853 2018-02-22 DJ Delorie <dj@redhat.com>
16854 Sebastian Perta <sebastian.perta@renesas.com>
16855 Oleg Endo <olegendo@gcc.gnu.org>
16857 * config/rx/rx.c (rx_rtx_costs): New function.
16858 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
16860 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
16862 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
16864 2018-02-22 Martin Liska <mliska@suse.cz>
16867 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
16868 Add "native" as a possible value.
16870 2018-02-22 Martin Liska <mliska@suse.cz>
16873 * config/i386/i386.c (ix86_option_override_internal):
16874 Add "native" as a possible value for -march and -mtune.
16876 2018-02-22 Jakub Jelinek <jakub@redhat.com>
16879 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
16880 to all type variants.
16882 PR tree-optimization/84503
16883 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
16884 width as info->bitpos + info->bitsize - start.
16885 (merged_store_group::merge_overlapping): Simplify width computation.
16886 (check_no_overlap): New function.
16887 (imm_store_chain_info::try_coalesce_bswap): Compute expected
16888 start + width and last_order of the group, fail if check_no_overlap
16890 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
16891 to group if check_no_overlap fails.
16893 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
16895 * config/rs6000/altivec.md: Delete contraint arguments to
16896 define_expand, define_split, and define_peephole2, and in
16897 define_insn_and_split if always unused.
16898 * config/rs6000/darwin.md: Ditto.
16899 * config/rs6000/dfp.md: Ditto.
16900 * config/rs6000/rs6000.md: Ditto.
16901 * config/rs6000/sync.md: Ditto.
16902 * config/rs6000/vector.md: Ditto.
16903 * config/rs6000/vsx.md: Ditto.
16905 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
16907 * config/rs6000/altivec.md: Write output control strings as braced
16908 blocks instead of double-quoted strings.
16909 * config/rs6000/darwin.md: Ditto.
16910 * config/rs6000/rs6000.md: Ditto.
16911 * config/rs6000/vector.md: Ditto.
16912 * config/rs6000/vsx.md: Ditto.
16914 2018-02-21 Jason Merrill <jason@redhat.com>
16916 PR c++/84314 - ICE with templates and fastcall attribute.
16917 * attribs.c (build_type_attribute_qual_variant): Remove assert.
16919 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
16921 * ipa-cp.c (determine_versionability): Fix comment typos.
16923 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
16926 * ipa-cp.c (determine_versionability): Do not version functions caling
16929 2018-02-21 Martin Liska <mliska@suse.cz>
16932 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
16933 Add "native" as a possible value.
16934 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
16935 the macro when native cpu detection is available.
16937 2018-02-21 Martin Liska <mliska@suse.cz>
16940 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
16941 Add "native" as a possible value.
16942 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
16943 when native cpu detection is available.
16945 2018-02-21 Jakub Jelinek <jakub@redhat.com>
16946 Martin Sebor <msebor@redhat.com>
16948 PR tree-optimization/84478
16949 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
16951 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
16952 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
16953 support which is conservatively correct, for 2 only stay conservative
16954 for maxlen. Formatting and comment capitalization fixes. Add STRICT
16955 argument to the 2 argument get_range_strlen, adjust 6 arg
16956 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
16958 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
16959 (gimple_fold_builtin_strlen): Pass true as last argument to
16962 2018-02-20 Martin Sebor <msebor@redhat.com>
16964 PR middle-end/84095
16965 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
16966 (builtin_memref::set_base_and_offset): Same. Handle inner references.
16967 (builtin_memref::builtin_memref): Factor out parts into
16968 set_base_and_offset and call it.
16970 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
16972 PR middle-end/84406
16973 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
16974 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
16975 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
16976 search at the associated MODE_INT.
16978 2018-02-20 Jeff Law <law@redhat.com>
16980 PR middle-end/82123
16981 PR tree-optimization/81592
16982 PR middle-end/79257
16983 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
16984 for range data rather than using global data.
16985 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
16986 range data rather than using global data.
16987 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
16988 pass it to children as needed.
16989 (struct directive::fmtresult): Similarly.
16990 (struct directive::set_width): Similarly.
16991 (struct directive::set_precision): Similarly.
16992 (format_integer, format_directive, parse_directive): Similarly.
16993 (format_none): Accept unnamed vr_values parameter.
16994 (format_percent, format_floating, format_character): Similarly.
16995 (format_string, format_plain): Similarly.
16996 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
16997 the EVRP range analyzer for range data rather than using global data.
16998 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
16999 gimple-ssa-evrp-analyze.h
17000 (class sprintf_dom_walker): Add after_dom_children member function.
17001 Add evrp_range_analyzer member.
17002 (sprintf_dom_walker::before_dom_children): Call into the EVRP
17003 range analyzer as needed.
17004 (sprintf_dom_walker::after_dom_children): New member function.
17005 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
17007 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
17008 (evrp_range_analyzer::pop_to_marker): Likewise.
17010 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
17012 PR tree-optimization/84419
17013 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
17014 with the required type if its current type is compatible but
17017 2018-02-20 Jakub Jelinek <jakub@redhat.com>
17019 PR middle-end/82004
17020 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
17021 after vectorization.
17023 2018-02-20 Martin Liska <mliska@suse.cz>
17026 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
17027 possible values if we don't have a hint.
17029 2018-02-20 Martin Liska <mliska@suse.cz>
17033 * final.c (shorten_branches): Build align_tab array with one
17035 * opts.c (finish_options): Add alignment option limit check.
17036 (MAX_CODE_ALIGN): Likewise.
17037 (MAX_CODE_ALIGN_VALUE): Likewise.
17038 * doc/invoke.texi: Document maximum allowed option value for
17039 all -falign-* options.
17041 2018-02-19 Jakub Jelinek <jakub@redhat.com>
17044 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
17045 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
17046 * var-tracking.c (emit_note_insn_var_location): Remove all references
17047 to NOTE_INSN_CALL_ARG_LOCATION.
17048 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
17049 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
17050 Use copy_rtx_if_shared.
17051 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
17052 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
17053 (dwarf2out_var_location): Remove handling of
17054 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
17056 * final.c (final_scan_insn): Remove all references to
17057 NOTE_INSN_CALL_ARG_LOCATION.
17058 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
17059 before dumping final insns.
17060 * except.c (emit_note_eh_region_end): Remove all references to
17061 NOTE_INSN_CALL_ARG_LOCATION.
17062 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
17063 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
17064 * config/arc/arc.c (hwloop_optimize): Likewise.
17065 * config/arm/arm.c (create_fix_barrier): Likewise.
17066 * config/s390/s390.c (s390_chunkify_start): Likewise.
17067 * config/sh/sh.c (find_barrier): Likewise.
17068 * config/i386/i386.c (rest_of_insert_endbranch,
17069 ix86_seh_fixup_eh_fallthru): Likewise.
17070 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
17071 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
17072 * config/frv/frv.c (frv_function_prologue): Likewise.
17073 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
17075 (note_outside_basic_block_p): Remove all references to
17076 NOTE_INSN_CALL_ARG_LOCATION.
17077 * gengtype.c (adjust_field_rtx_def): Likewise.
17078 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
17080 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
17081 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
17084 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
17087 PR tree-optimization/84452
17088 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
17089 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
17092 2018-02-19 Martin Liska <mliska@suse.cz>
17095 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
17097 2018-02-19 Martin Liska <mliska@suse.cz>
17098 Richard Sandiford <richard.sandiford@linaro.org>
17100 PR tree-optimization/82491
17101 * gimple-fold.c (get_base_constructor): Make earlier bail out
17104 2018-02-19 Carl Love <cel@us.ibm.com>
17106 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
17107 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
17109 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
17110 P8V_BUILTIN_VEC_NEG.
17112 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
17114 * config/rl78/rl78.md (movdf): New define expand.
17116 2018-02-19 Martin Liska <mliska@suse.cz>
17119 * doc/invoke.texi: Fix typo.
17120 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
17122 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
17124 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
17125 handle rs6000_single_float and rs6000_double_float specially for
17128 2018-02-16 Jeff Law <law@redhat.com>
17130 * config/rx/rx.c (add_pop_cfi_notes): New function.;
17131 (pop_regs): Use it.
17133 2018-02-16 Jakub Jelinek <jakub@redhat.com>
17136 * ipa-inline.c (inline_small_functions): Fix a typo.
17138 2018-02-16 Nathan Sidwell <nathan@acm.org>
17140 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
17142 2018-02-16 Carl Love <cel@us.ibm.com>
17144 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
17145 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
17146 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
17147 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
17148 expansion to P8V_BUILTIN_VEC_FLOAT2.
17150 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
17152 PR rtl-optimization/70023
17153 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
17154 src_regno into account.
17156 2018-02-16 Carl Love <cel@us.ibm.com>
17158 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
17159 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
17160 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
17161 * config/rs6000/rs6000.c: Remove case statements for
17162 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
17163 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
17164 and P9V_BUILTIN_VEC_VINSERT4B.
17165 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
17166 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
17167 * config/rs6000/vsx.md:
17168 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
17171 2018-02-16 Carl Love <cel@us.ibm.com>
17173 * config/rs6000/altivec.h: Add builtin names vec_extract4b
17175 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
17177 * config/rs6000/rs6000-c.c: Add the definitions for
17178 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
17179 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
17180 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
17181 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
17182 definition for insert4b and define insn *insert3b_internal.
17183 * doc/extend.texi: Add documentation for vec_extract4b.
17185 2018-02-16 Nathan Sidwell <nathan@acm.org>
17187 * doc/extend.texi (Backwards Compatibility): Mention friend
17188 injection. Note for-scope is deprecated.
17189 * doc/invoke.texi (-ffriend-injection): Deprecate.
17191 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
17193 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
17194 that moved to I2, also allow destinations that are a paradoxical
17195 subreg (instead of a normal reg).
17197 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
17200 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
17203 2018-02-16 Richard Biener <rguenther@suse.de>
17205 PR tree-optimization/84037
17206 PR tree-optimization/84016
17208 * config/i386/i386.c (ix86_builtin_vectorization_cost):
17209 Adjust vec_construct for the fact we need additional higher latency
17210 128bit inserts for AVX256 and AVX512 vector builds.
17211 (ix86_add_stmt_cost): Scale vector construction cost for
17214 2018-02-16 Richard Biener <rguenther@suse.de>
17216 PR tree-optimization/84417
17217 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
17218 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
17219 (non_rewritable_lvalue_p): Likewise, use poly-ints.
17221 2018-02-16 Martin Liska <mliska@suse.cz>
17224 * internal-fn.def (ASAN_CHECK): Set proper flags.
17225 (ASAN_MARK): Likewise.
17227 2018-02-16 Julia Koval <julia.koval@intel.com>
17229 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
17230 from PTA_CANNONLAKE.
17232 2018-02-16 Jakub Jelinek <jakub@redhat.com>
17235 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
17236 Use ++iter rather than iter++ for std::list iterators.
17237 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
17238 defer deleting them until all nodes in the forest are processed. Do
17239 free even leaf nodes. Change to_process into auto_vec.
17242 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
17243 * vec.h (vec_default_construct): Use memset instead of placement new
17244 if BROKEN_VALUE_INITIALIZATION is defined.
17245 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
17246 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
17249 PR rtl-optimization/83723
17250 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
17251 * lra.c (lra_substitute_pseudo): Likewise. If true, use
17252 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
17254 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
17256 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
17258 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
17260 PR rtl-optimization/81443
17261 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
17262 from inner REGs to paradoxical SUBREGs.
17264 2018-02-16 Richard Biener <rguenther@suse.de>
17266 PR tree-optimization/84399
17267 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17268 For operands we can analyze at their definition make sure we can
17269 analyze them at each use as well.
17271 2018-02-16 Richard Biener <rguenther@suse.de>
17273 PR tree-optimization/84190
17274 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
17275 volatile accesses if the decl isn't volatile.
17277 2018-02-15 Jason Merrill <jason@redhat.com>
17279 PR c++/84314 - ICE with templates and fastcall attribute.
17280 * attribs.c (build_type_attribute_qual_variant): Don't clobber
17281 TYPE_CANONICAL on an existing type.
17283 2018-02-15 Jakub Jelinek <jakub@redhat.com>
17285 PR tree-optimization/84383
17286 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
17287 dstoff nor call operand_equal_p if dstbase is NULL.
17289 PR tree-optimization/84334
17290 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
17291 also a CONSTANT_CLASS_P, punt.
17293 2018-02-14 Jim Wilson <jimw@sifive.com>
17295 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
17296 first SMALL_OPERAND check. New local min_second_step. Move assert
17297 to where locals are set. Add TARGET_RVC support.
17298 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
17300 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
17302 * doc/invoke.texi: Correct -Wformat-overflow code sample.
17304 2018-02-14 Martin Sebor <msebor@redhat.com>
17306 PR tree-optimization/83698
17307 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
17308 arrays constrain the offset range to their bounds.
17309 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
17310 (builtin_access::overlap): Avoid setting the size of overlap if it's
17312 (maybe_diag_overlap): Also consider arrays when deciding what values
17313 of offsets to include in diagnostics.
17315 2018-02-14 Martin Sebor <msebor@redhat.com>
17318 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
17319 that correspond to the kind of a declaration.
17321 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
17324 * config/pa/pa.md: Load address of PIC label using the linkage table
17325 if the label is nonlocal.
17327 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
17329 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
17330 warning message if user requests -maltivec=be.
17331 * doc/invoke.texi: Document deprecation of -maltivec=be.
17333 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
17336 * config/rs6000/rs6000-c.c: Update definitions for
17337 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
17338 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
17340 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
17343 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
17344 add _get_ssp intrinsics. Remove argument from
17345 __builtin_ia32_rdssp[d|q].
17346 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
17347 * config/i386/i386-builtin.def: Remove argument from
17348 __builtin_ia32_rdssp[d|q].
17349 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
17350 ix86_expand_special_args_builtin for _rdssp[d|q].
17351 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
17352 Clear register before usage.
17353 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
17354 Add documentation for new _get_ssp and _inc_ssp intrinsics.
17356 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
17358 PR tree-optimization/84357
17359 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
17360 operand 1 of an ARRAY_REF too.
17362 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
17365 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
17366 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
17368 (set_of_reg): New struct.
17369 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
17370 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
17371 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
17373 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
17374 Split into bitclr, bitset, bitinvert patterns if appropriate.
17375 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
17376 use rx_fuse_in_memory_bitop.
17377 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
17378 to named insn, correct maximum insn length.
17380 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
17383 * machmode.def: Define a complex mode for PARTIAL_INT.
17384 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
17386 * doc/rtl.texi: Document CSPImode.
17387 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
17389 (msp430_hard_regno_nregs_with_padding): Likewise.
17391 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
17394 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
17396 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
17398 PR rtl-optimization/84169
17399 * combine.c (try_combine): New variable split_i2i3. Set it to true if
17400 we generated a parallel as new i3 and we split that to new i2 and i3
17401 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
17402 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
17403 those to i2, not i1. Partially rewrite this scan code.
17405 2018-02-13 Jakub Jelinek <jakub@redhat.com>
17408 * stor-layout.c (place_field): For variable length fields, adjust
17409 offset_align afterwards not just based on the field's alignment,
17410 but also on the size.
17412 PR middle-end/84309
17413 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
17414 of exps and logs in the use_exp2 case.
17416 2018-02-13 Jeff Law <law@redhat.com>
17418 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
17419 entry for "vector".
17421 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
17424 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
17428 * common.opt (gas-loc-support, gas-locview-support): New.
17429 (ginline-points, ginternal-reset-location-views): New.
17430 * doc/invoke.texi: Document them. Use @itemx where intended.
17431 (gvariable-location-views): Adjust.
17432 * target.def (reset_location_view): New.
17433 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
17434 (TARGET_RESET_LOCATION_VIEW): New.
17435 * doc/tm.texi: Rebuilt.
17436 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
17437 (dwarf2out_default_as_locview_support): New.
17438 (output_asm_line_debug_info): Use option variables.
17439 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
17440 (output_loc_list): Likewise.
17441 (add_high_low_attributes): Check option variables.
17442 Don't output entry view attribute in strict mode.
17443 (gen_inlined_subroutine_die): Check option variables.
17444 (dwarf2out_inline_entry): Likewise.
17445 (init_sections_and_labels): Likewise.
17446 (dwarf2out_early_finish): Likewise.
17447 (maybe_reset_location_view): New, from...
17448 (dwarf2out_var_location): ... here. Call it.
17449 * debug.h (dwarf2out_default_as_loc_support): Declare.
17450 (dwarf2out_default_as_locview_support): Declare.
17451 * hooks.c (hook_int_rtx_insn_0): New.
17452 * hooks.h (hook_int_rtx_insn_0): Declare.
17453 * toplev.c (process_options): Take -gas-loc-support and
17454 -gas-locview-support from dwarf2out. Enable
17455 -gvariable-location-views by default only with locview
17456 assembler support. Enable -ginternal-reset-location-views by
17457 default only if the target defines the corresponding hook.
17458 Enable -ginline-points by default if location views are
17459 enabled; force it disabled if statement frontiers are
17461 * tree-inline.c (expand_call_inline): Check option variables.
17462 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
17464 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
17466 PR tree-optimization/84321
17467 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
17468 handling. Also check whether the anti-range contains any values
17469 that satisfy the mask; switch to a VR_RANGE if not.
17471 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
17474 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
17476 2018-02-13 Martin Jambor <mjambor@suse.cz>
17479 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
17480 of call statements, also set location of a load to a temporary.
17482 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
17484 * config/rl78/rl78.c (add_vector_labels): New function.
17485 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
17486 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
17487 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
17488 which checks that no arguments are passed.
17489 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
17490 * doc/extend.texi: Documentation for the new attribute.
17492 2018-02-13 Andreas Schwab <schwab@suse.de>
17494 * config/riscv/linux.h (CPP_SPEC): Define.
17496 2018-02-13 Jakub Jelinek <jakub@redhat.com>
17499 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
17500 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
17501 OPTION_MASK_ISA_AES as first argument to def_builtin_const
17502 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
17503 instead of OPTION_MASK_ISA_PCLMUL as first argument to
17504 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
17505 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
17506 temporarily for AES and PCLMUL builtins.
17508 PR tree-optimization/84339
17509 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
17510 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
17513 PR middle-end/84309
17514 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
17515 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
17516 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
17518 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
17520 * omp-simd-clone.h: New file.
17521 * omp-simd-clone.c: Include omp-simd-clone.h.
17522 (expand_simd_clones): No longer static.
17523 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
17524 cgraph.h and omp-simd-clone.h.
17525 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
17526 (vect_recog_widen_shift_pattern): Formatting fix.
17527 (vect_pattern_recog_1): Don't check optab for calls.
17530 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
17531 operands[2] into a REG before using gen_lowpart on it.
17533 2018-02-12 Jeff Law <law@redhat.com>
17536 * config/sh/sh.c (find_barrier): Consider a sibling call
17539 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
17540 successfully back substituting a reg.
17542 2018-02-12 Richard Biener <rguenther@suse.de>
17544 PR tree-optimization/84037
17545 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
17546 parameter, move visited init to caller.
17547 (vect_slp_analyze_operations): Separate cost from validity
17548 check, initialize visited once for all instances.
17549 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
17551 * tree-vect-stmts.c (vect_model_simple_cost): Make early
17553 (vect_model_promotion_demotion_cost): Likewise.
17554 (vectorizable_bswap): Guard cost modeling with !slp_node
17555 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
17557 (vectorizable_call): Likewise.
17558 (vectorizable_conversion): Likewise.
17559 (vectorizable_assignment): Likewise.
17560 (vectorizable_shift): Likewise.
17561 (vectorizable_operation): Likewise.
17562 (vectorizable_store): Likewise.
17563 (vectorizable_load): Likewise.
17564 (vectorizable_condition): Likewise.
17565 (vectorizable_comparison): Likewise.
17567 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
17570 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
17571 (ASAN_MARK): Fix fnspec to account for return value, change pointer
17572 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
17574 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
17576 PR middle-end/83665
17577 * params.def (inline-min-speedup): Increase from 8 to 15.
17578 (max-inline-insns-auto): Decrease from 40 to 30.
17579 * ipa-split.c (consider_split): Add some buffer for function to
17580 be considered inlining candidate.
17581 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
17584 2018-02-12 Richard Biener <rguenther@suse.de>
17586 PR tree-optimization/84037
17587 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
17588 matched stmts if we cannot swap the non-matched ones.
17590 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
17592 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
17593 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
17594 _mm_maskz_scalef_round_ss): New intrinsics.
17595 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
17596 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
17597 __builtin_ia32_scalefss_round): Remove.
17598 (__builtin_ia32_scalefsd_mask_round,
17599 __builtin_ia32_scalefss_mask_round): New intrinsics.
17600 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
17601 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
17602 ((match_operand:VF_128 2 "<round_nimm_predicate>"
17603 "<round_constraint>")): Changed to ...
17604 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
17605 "<round_scalar_constraint>")): ... this.
17606 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
17607 %0, %1, %2<round_op3>}"): Changed to ...
17608 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
17609 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
17610 %2<round_scalar_mask_op3>}"): ... this.
17611 * config/i386/subst.md (round_scalar_nimm_predicate): New.
17613 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
17615 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
17616 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
17617 (_mm_maskz_sqrt_round_ss): New intrinsics.
17618 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
17619 (__builtin_ia32_sqrtsd_mask_round)
17620 (__builtin_ia32_sqrtss_mask_round): New builtins.
17621 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
17622 (__builtin_ia32_sqrtss_round): Remove.
17623 (__builtin_ia32_sqrtsd_mask_round)
17624 (__builtin_ia32_sqrtss_mask_round): New builtins.
17625 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
17626 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
17627 ((match_operand:VF_128 1 "vector_operand"
17628 "xBm,<round_constraint>")): Changed to ...
17629 ((match_operand:VF_128 1 "vector_operand"
17630 "xBm,<round_scalar_constraint>")): ... this.
17631 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
17632 %0, %2, %<iptr>1<round_op3>}): Changed to ...
17633 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
17634 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
17635 %<iptr>1<round_scalar_mask_op3>}): ... this.
17636 ((set_attr "prefix" "<round_prefix>")): Changed to ...
17637 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
17639 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
17642 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
17643 Cast vec_cmpeq result to correct type.
17644 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
17645 Cast vec_cmpgt result to correct type.
17647 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
17649 * final.c (final_scan_insn_1): Renamed from...
17650 (final_scan_insn): ... this. New wrapper, to recover
17651 seen from the outermost call in recursive ones.
17652 * config/sparc/sparc.c (output_return): Drop seen from call.
17653 (output_sibcall): Likewise.
17654 * config/visium/visium.c (output_branch): Likewise.
17656 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
17658 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
17661 2018-02-10 Alan Modra <amodra@gmail.com>
17664 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
17665 Specify LR as an input.
17667 2018-02-10 Jakub Jelinek <jakub@redhat.com>
17670 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
17671 remove_member_access_dummy_vars): New functions.
17672 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
17673 lower_omp_1, execute_lower_omp): Use them.
17675 PR rtl-optimization/84308
17676 * shrink-wrap.c (spread_components): Release todo vector.
17678 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
17680 PR rtl-optimization/57193
17681 * ira-color.c (struct allocno_color_data): Add member
17682 conflict_allocno_hard_prefs.
17683 (update_conflict_allocno_hard_prefs): New.
17684 (bucket_allocno_compare_func): Add a preference based on
17685 conflict_allocno_hard_prefs.
17686 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
17687 (color_allocnos): Remove a dead code. Initiate
17688 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
17690 2018-02-09 Jakub Jelinek <jakub@redhat.com>
17693 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
17694 constraint from =wa to wa. Avoid a subreg on the output operand,
17695 instead use a pseudo and subreg it in a move.
17696 (p9_xxbrd_<mode>): Changed to ...
17697 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
17698 (p9_xxbrd_v2df): New expander.
17699 (p9_xxbrw_<mode>): Changed to ...
17700 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
17701 (p9_xxbrw_v4sf): New expander.
17703 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
17705 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
17707 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
17710 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
17711 multiply in 32-bit mode.
17712 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
17713 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
17716 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
17718 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
17719 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
17720 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
17721 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
17723 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
17726 * dwarf2out.c (is_trivial_indirect_ref): New function.
17727 (dwarf2out_late_global_decl): Do not generate a location
17728 attribute for variables that have a non-trivial DECL_VALUE_EXPR
17729 and that are not defined in the current unit.
17731 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
17733 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
17734 instead of a libcall for UNORDERED.
17736 2018-02-09 Tamar Christina <tamar.christina@arm.com>
17739 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
17740 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
17742 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17745 * config/s390/s390.c (s390_set_current_function): Invoke
17746 s390_indirect_branch_settings also if fndecl didn't change.
17748 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
17750 * config/rs6000/rs6000.md (blockage): Set length to zero.
17752 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
17754 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
17756 2018-02-09 Jakub Jelinek <jakub@redhat.com>
17759 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
17760 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
17764 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
17765 PARALLEL incoming that failed vt_get_decl_and_offset check.
17767 PR middle-end/84237
17768 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
17769 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
17771 (get_variable_section): For decls in named .bss* sections pass true as
17772 second argument to bss_initializer_p.
17774 2018-02-09 Marek Polacek <polacek@redhat.com>
17775 Jakub Jelinek <jakub@redhat.com>
17778 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
17779 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
17780 Sync some changes from cxx_fold_indirect_ref.
17782 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
17784 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
17786 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
17787 (BLOCK_INLINE_ENTRY_LABEL): New.
17788 (dwarf2out_var_location): Disregard inline entry markers.
17789 (inline_entry_data): New struct.
17790 (inline_entry_data_hasher): New hashtable type.
17791 (inline_entry_data_hasher::hash): New.
17792 (inline_entry_data_hasher::equal): New.
17793 (inline_entry_data_table): New variable.
17794 (add_high_low_attributes): Add DW_AT_entry_pc and
17795 DW_AT_GNU_entry_view attributes if a pending entry is found
17796 in inline_entry_data_table. Add old entry_pc attribute only
17797 if debug nonbinding markers are disabled.
17798 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
17799 markers are enabled.
17800 (block_within_block_p, dwarf2out_inline_entry): New.
17801 (dwarf2out_finish): Check that no entries remained in
17802 inline_entry_data_table.
17803 * final.c (reemit_insn_block_notes): Handle inline entry notes.
17804 (final_scan_insn, notice_source_line): Likewise.
17805 (rest_of_clean_state): Skip inline entry markers.
17806 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
17808 * gimple.c (gimple_build_debug_inline_entry): New.
17809 * gimple.h (enum gimple_debug_subcode): Add
17810 GIMPLE_DEBUG_INLINE_ENTRY.
17811 (gimple_build_debug_inline_entry): Declare.
17812 (gimple_debug_inline_entry_p): New.
17813 (gimple_debug_nonbind_marker_p): Adjust.
17814 * insn-notes.def (INLINE_ENTRY): New.
17815 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
17816 inline entry marker notes.
17817 (print_insn): Likewise.
17818 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
17819 (INSN_DEBUG_MARKER_KIND): Likewise.
17820 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
17821 * tree-inline.c (expand_call_inline): Build and insert
17822 debug_inline_entry stmt.
17823 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
17824 inline entry blocks early, if nonbind markers are enabled.
17825 (dump_scope_block): Dump fragment info.
17826 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
17827 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
17828 (gimple_build_debug_inline_entry): New.
17829 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
17830 Enable/disable inline entry points too.
17831 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
17832 (DEBUG_INSN): Describe inline entry markers.
17834 * common.opt (gvariable-location-views): New.
17835 (gvariable-location-views=incompat5): New.
17836 * config.in: Rebuilt.
17837 * configure: Rebuilt.
17838 * configure.ac: Test assembler for view support.
17839 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
17840 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
17841 * dwarf2out.c (var_loc_view): New typedef.
17842 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
17843 (dwarf2out_locviews_in_attribute): New.
17844 (dwarf2out_locviews_in_loclist): New.
17845 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
17846 (enum dw_line_info_opcode): Add LI_adv_address.
17847 (struct dw_line_info_table): Add view.
17848 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
17849 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
17850 (zero_view_p): New variable.
17851 (ZERO_VIEW_P): New macro.
17852 (output_asm_line_debug_info): New.
17853 (struct var_loc_node): Add view.
17854 (add_AT_view_list, AT_loc_list): New.
17855 (add_var_loc_to_decl): Add view param. Test it against last.
17856 (new_loc_list): Add view params. Record them.
17857 (AT_loc_list_ptr): Handle loc and view lists.
17858 (view_list_to_loc_list_val_node): New.
17859 (print_dw_val): Handle dw_val_class_view_list.
17860 (size_of_die): Likewise.
17861 (value_format): Likewise.
17862 (loc_list_has_views): New.
17863 (gen_llsym): Set vl_symbol too.
17864 (maybe_gen_llsym, skip_loc_list_entry): New.
17865 (dwarf2out_maybe_output_loclist_view_pair): New.
17866 (output_loc_list): Output view list or entries too.
17867 (output_view_list_offset): New.
17868 (output_die): Handle dw_val_class_view_list.
17869 (output_dwarf_version): New.
17870 (output_compilation_unit_header): Use it.
17871 (output_skeleton_debug_sections): Likewise.
17872 (output_rnglists, output_line_info): Likewise.
17873 (output_pubnames, output_aranges): Update version comments.
17874 (output_one_line_info_table): Output view numbers in asm comments.
17875 (dw_loc_list): Determine current endview, pass it to new_loc_list.
17876 Call maybe_gen_llsym.
17877 (loc_list_from_tree_1): Adjust.
17878 (add_AT_location_description): Create view list attribute if
17879 needed, check it's absent otherwise.
17880 (convert_cfa_to_fb_loc_list): Adjust.
17881 (maybe_emit_file): Call output_asm_line_debug_info for test.
17882 (dwarf2out_var_location): Reset views as needed. Precompute
17883 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
17884 attribute. Set view.
17885 (new_line_info_table): Reset next view.
17886 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
17887 (dwarf2out_source_line): Likewise. Output view resets and labels to
17888 the assembler, or select appropriate line info opcodes.
17889 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
17890 (optimize_string_length): Catch it. Adjust.
17891 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
17892 dw_val_class_view_list, and remove it if no longer needed.
17893 (hash_loc_list): Hash view numbers.
17894 (loc_list_hasher::equal): Compare them.
17895 (optimize_location_lists): Check whether a view list symbol is
17896 needed, and whether the locview attribute is present, and
17897 whether they match. Remove the locview attribute if no longer
17899 (index_location_lists): Call skip_loc_list_entry for test.
17900 (dwarf2out_finish): Call output_asm_line_debug_info for test.
17901 Use output_dwarf_version.
17902 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
17903 (struct dw_val_node): Add val_view_list.
17904 * final.c (SEEN_NEXT_VIEW): New.
17905 (set_next_view_needed): New.
17906 (clear_next_view_needed): New.
17907 (maybe_output_next_view): New.
17908 (final_start_function): Rename to...
17909 (final_start_function_1): ... this. Take pointer to FIRST,
17910 add SEEN parameter. Emit param bindings in the initial view.
17911 (final_start_function): Reintroduce SEEN-less interface.
17912 (final): Rename to...
17913 (final_1): ... this. Take SEEN parameter. Output final pending
17914 next view at the end.
17915 (final): Reintroduce seen-less interface.
17916 (final_scan_insn): Output pending next view before switching
17917 sections or ending a block. Mark the next view as needed when
17918 outputting variable locations. Notify debug backend of section
17919 changes, and of location view changes.
17920 (rest_of_handle_final): Adjust.
17921 * toplev.c (process_options): Autodetect value for debug variable
17922 location views option. Warn on incompat5 without -gdwarf-5.
17923 * doc/invoke.texi (gvariable-location-views): New.
17924 (gvariable-location-views=incompat5): New.
17925 (gno-variable-location-views): New.
17927 2018-02-08 David Malcolm <dmalcolm@redhat.com>
17929 PR tree-optimization/84136
17930 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
17931 that the result of find_edge is non-NULL.
17933 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
17936 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
17937 storing integer register in SImode. Fix cost of 256 and 512
17938 byte aligned SSE register store.
17940 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
17942 * config/i386/i386.c (ix86_multiplication_cost): Fix
17943 multiplication cost for TARGET_AVX512DQ.
17945 2018-02-08 Marek Polacek <polacek@redhat.com>
17947 PR tree-optimization/84238
17948 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
17951 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
17953 PR tree-optimization/84265
17954 * tree-vect-stmts.c (vectorizable_store): Don't treat
17955 VMAT_CONTIGUOUS accesses as grouped.
17956 (vectorizable_load): Likewise.
17958 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
17960 PR tree-optimization/81635
17961 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
17962 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
17963 (test_round_for_mask): New functions.
17964 (wide_int_cc_tests): Call test_round_for_mask.
17965 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
17966 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
17967 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
17968 range returned by get_range_info.
17970 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
17973 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
17974 * symtab.c: Include builtins.h
17975 (symtab_node::output_to_lto_symbol_table_p): Move here
17976 from lto-streamer-out.c:output_symbol_p.
17977 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
17978 (output_symbol_p): Move all logic to symtab.c
17979 (produce_symtab): Update.
17981 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17983 * config/s390/s390-opts.h (enum indirect_branch): Define.
17984 * config/s390/s390-protos.h (s390_return_addr_from_memory)
17985 (s390_indirect_branch_via_thunk)
17986 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
17987 (enum s390_indirect_branch_type): Define.
17988 * config/s390/s390.c (struct s390_frame_layout, struct
17989 machine_function): Remove.
17990 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
17991 (indirect_branch_table_label_no, indirect_branch_table_name):
17993 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
17994 (enum s390_indirect_branch_option): Define.
17995 (s390_return_addr_from_memory): New function.
17996 (s390_handle_string_attribute): New function.
17997 (s390_attribute_table): Add new attribute handler.
17998 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
17999 (s390_indirect_branch_via_thunk): New function.
18000 (s390_indirect_branch_via_inline_thunk): New function.
18001 (s390_function_ok_for_sibcall): When jumping via thunk disallow
18002 sibling call optimization for non z10 compiles.
18003 (s390_emit_call): Force indirect branch target to be a single
18004 register. Add r1 clobber for non-z10 compiles.
18005 (s390_emit_epilogue): Emit return jump via return_use expander.
18006 (s390_reorg): Handle JUMP_INSNs as execute targets.
18007 (s390_option_override_internal): Perform validity checks for the
18008 new command line options.
18009 (s390_indirect_branch_attrvalue): New function.
18010 (s390_indirect_branch_settings): New function.
18011 (s390_set_current_function): Invoke s390_indirect_branch_settings.
18012 (s390_output_indirect_thunk_function): New function.
18013 (s390_code_end): Implement target hook.
18014 (s390_case_values_threshold): Implement target hook.
18015 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
18017 * config/s390/s390.h (struct s390_frame_layout)
18018 (struct machine_function): Move here from s390.c.
18019 (TARGET_INDIRECT_BRANCH_NOBP_RET)
18020 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
18021 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
18022 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
18023 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
18024 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
18025 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
18026 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
18027 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
18028 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
18029 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
18030 (mnemonic attribute): Add values which aren't recognized
18032 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
18033 pattern for branch conversion. Fix mnemonic attribute.
18034 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
18035 indirect branch via thunk if requested.
18036 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
18037 ("*indirect_jump"): Disable for branch conversion using out of
18039 ("indirect_jump_via_thunk<mode>_z10")
18040 ("indirect_jump_via_thunk<mode>")
18041 ("indirect_jump_via_inlinethunk<mode>_z10")
18042 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
18043 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
18044 ("casesi_jump_via_inlinethunk<mode>_z10")
18045 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
18046 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
18047 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
18048 ("*indirect2_jump"): Disable for branch conversion.
18049 ("casesi_jump"): Turn into expander and expand patterns for branch
18051 ("return_use"): New expander.
18052 ("*return"): Emit return via thunk and rename it to ...
18053 ("*return<mode>"): ... this one.
18054 * config/s390/s390.opt: Add new options and and enum for the
18057 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18059 * lra-constraints.c (match_reload): Unconditionally use
18060 gen_lowpart_SUBREG, rather than selecting between that
18061 and equivalent gen_rtx_SUBREG code.
18063 2018-02-08 Richard Biener <rguenther@suse.de>
18065 PR tree-optimization/84233
18066 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
18067 changed flag instead of boguously re-using phi_inserted.
18069 2018-02-08 Martin Jambor <mjambor@suse.cz>
18071 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
18072 static local variables.
18074 2018-02-08 Richard Biener <rguenther@suse.de>
18076 PR tree-optimization/84278
18077 * tree-vect-stmts.c (vectorizable_store): When looking for
18078 smaller vector types to perform grouped strided loads/stores
18079 make sure the mode is supported by the target.
18080 (vectorizable_load): Likewise.
18082 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
18084 * config/aarch64/aarch64.c (aarch64_components_for_bb):
18085 Increase LDP/STP opportunities by adding adjacent callee-saves.
18087 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
18089 PR rtl-optimization/84068
18090 PR rtl-optimization/83459
18091 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
18093 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
18095 PR tree-optimization/84224
18096 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
18097 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
18098 non-zero arguments.
18100 2018-02-07 Iain Sandoe <iain@codesourcery.com>
18103 * config/rs6000/altivec.md (*restore_world): Remove LR use.
18104 * config/rs6000/predicates.md (restore_world_operation): Adjust op
18105 count, remove one USE.
18107 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
18109 * doc/install.texi (Configuration): Document the
18110 --with-long-double-format={ibm,ieee} PowerPC configuration
18114 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
18115 Convert from define_expand to be define_insn_and_split. Rework
18116 float/double/_Float128 conversions to QI/HI/SImode to work with
18117 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
18118 conversions to QI/HImode types did a store and then a load to
18119 truncate the value. For conversions to VSX registers, don't split
18120 the insn, instead emit the code directly. Use the code iterator
18121 any_fix to combine signed and unsigned conversions.
18122 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
18123 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
18124 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
18125 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
18126 (fix_<mode>di2_hw): Likewise.
18127 (fixuns_<mode>di2_hw): Likewise.
18128 (fix_<mode>si2_hw): Likewise.
18129 (fixuns_<mode>si2_hw): Likewise.
18130 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
18131 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
18132 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
18133 fix<uns>_trunc<SFDF:mode>si2_p8.
18134 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
18135 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
18136 (fix<uns>_<mode>_mem): Likewise.
18137 (fctiw<u>z_<mode>_mem): Likewise.
18138 (fix<uns>_<mode>_mem): Likewise.
18139 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
18140 the register allocator from doing a direct move to the GPRs to do
18141 a store, and instead use the ISA 3.0 store byte/half-word from
18142 vector register instruction. For IEEE 128-bit floating point,
18143 also optimize stores of 32-bit ints.
18144 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
18146 2018-02-07 Alan Hayward <alan.hayward@arm.com>
18148 * genextract.c (push_pathstr_operand): New function to support
18150 (walk_rtx): Call push_pathstr_operand.
18151 (print_path): Support [a-zA-Z].
18153 2018-02-07 Richard Biener <rguenther@suse.de>
18155 PR tree-optimization/84037
18156 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
18157 (cse_and_gimplify_to_preheader): Declare.
18158 (vect_get_place_in_interleaving_chain): Likewise.
18159 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18161 (_loop_vec_info::~_loop_vec_info): Delete it.
18162 (cse_and_gimplify_to_preheader): New function.
18163 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
18164 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
18165 (vectorizable_load): Likewise. For grouped stores always base
18166 the IV on the first element.
18167 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
18168 condition before gimplifying.
18170 2018-02-07 Jakub Jelinek <jakub@redhat.com>
18172 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
18173 *DIV_EXPR and *MOD_EXPR.
18175 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
18178 * config/i386/i386.c (ix86_option_override_internal): Mask out
18179 the CF_SET bit when checking -fcf-protection.
18181 2018-02-07 Tom de Vries <tom@codesourcery.com>
18184 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
18187 2018-02-07 Richard Biener <rguenther@suse.de>
18189 PR tree-optimization/84204
18190 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
18193 PR tree-optimization/84205
18194 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
18195 special-case isl_ast_op_zdiv_r.
18197 PR tree-optimization/84223
18198 * graphite-scop-detection.c (gather_bbs::before_dom_children):
18199 Only add conditions from within the region.
18200 (gather_bbs::after_dom_children): Adjust.
18202 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
18205 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
18206 * config/avr/avr.md: Only post-reload split REG-REG moves if
18207 either register is GENERAL_REG_P.
18209 2018-02-07 Jakub Jelinek <jakub@redhat.com>
18211 PR tree-optimization/84235
18212 * tree-ssa-scopedtables.c
18213 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
18214 if the subtraction is performed in floating point type where NaNs are
18215 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
18216 build 1. Formatting fix.
18218 2018-02-06 Jakub Jelinek <jakub@redhat.com>
18221 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
18222 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
18223 and skip it regardless of bb boundaries. Use CALL_P macro,
18224 don't test INSN_P (insn) together with CALL_P or JUMP_P check
18225 unnecessarily, formatting fix.
18227 2018-02-06 Michael Collison <michael.collison@arm.com>
18229 * config/arm/thumb2.md:
18230 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
18231 (*thumb_mov_notscc): Ditto.
18233 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
18236 * config/rs6000/rs6000.md (su code attribute): Use "u" for
18237 unsigned_fix, not "s".
18239 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18241 * configure.ac (gcc_fn_eh_frame_ro): New function.
18242 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
18243 correct .eh_frame permissions.
18244 * configure: Regenerate.
18246 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
18248 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
18249 irrelevant options.
18251 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18253 * config/rs6000/rs6000.c (rs6000_option_override_internal):
18254 Display warning message for -mno-speculate-indirect-jumps.
18256 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
18258 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
18260 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
18262 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
18264 PR tree-optimization/84225
18265 * tree-eh.c (find_trapping_overflow): Only call
18266 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
18268 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18271 * config/i386/i386.c: Reimplement the check of possible options
18272 -mibt/-mshstk conbination. Change error messages.
18273 * doc/invoke.texi: Fix a typo: remove extra '='.
18275 2018-02-06 Marek Polacek <polacek@redhat.com>
18277 PR tree-optimization/84228
18278 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
18280 2018-02-06 Tamar Christina <tamar.christina@arm.com>
18283 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
18284 emitted arch directives.
18285 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
18286 __ARM_FEATURE_COPROC before changing architectures.
18288 2018-02-06 Richard Biener <rguenther@suse.de>
18290 * config/i386/i386.c (print_reg): Fix typo.
18291 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
18293 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
18295 * configure: Regenerate.
18297 2018-02-05 Martin Sebor <msebor@redhat.com>
18299 PR tree-optimization/83369
18300 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
18303 2018-02-05 Martin Liska <mliska@suse.cz>
18305 * doc/invoke.texi: Cherry-pick upstream r323995.
18307 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
18309 * ira.c (ira_init_register_move_cost): Adjust comment.
18311 2018-02-05 Martin Liska <mliska@suse.cz>
18313 PR gcov-profile/84137
18314 * doc/gcov.texi: Fix typo in documentation.
18316 2018-02-05 Martin Liska <mliska@suse.cz>
18318 PR gcov-profile/83879
18319 * doc/gcov.texi: Document necessity of --dynamic-list-data when
18320 using dlopen functionality.
18322 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
18324 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
18325 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
18326 _mm_maskz_range_ss, _mm_mask_range_round_ss,
18327 _mm_maskz_range_round_ss): New intrinsics.
18328 (__builtin_ia32_rangesd128_round)
18329 (__builtin_ia32_rangess128_round): Remove.
18330 (__builtin_ia32_rangesd128_mask_round,
18331 __builtin_ia32_rangess128_mask_round): New builtins.
18332 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
18333 __builtin_ia32_rangess128_round): Remove.
18334 (__builtin_ia32_rangesd128_mask_round,
18335 __builtin_ia32_rangess128_mask_round): New builtins.
18336 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
18337 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
18338 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
18339 "<round_saeonly_constraint>")): Changed to ...
18340 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
18341 "<round_saeonly_scalar_constraint>")): ... this.
18342 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
18343 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
18344 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
18345 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
18346 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
18348 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
18350 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
18352 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
18353 Remove all values except native, 8540 and 8548.
18355 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
18357 * config/i386/i386.c (ix86_output_function_return): Pass
18358 INVALID_REGNUM, instead of -1, as invalid register number to
18359 indirect_thunk_name and output_indirect_thunk.
18361 2018-02-02 Julia Koval <julia.koval@intel.com>
18363 * config.gcc: Add -march=icelake.
18364 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
18365 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
18366 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
18367 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
18368 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
18369 (processor_target_table): Add icelake.
18370 (ix86_option_override_internal): Handle new PTAs.
18371 (get_builtin_code_for_version): Handle icelake.
18372 (M_INTEL_COREI7_ICELAKE): New.
18373 (fold_builtin_cpu): Handle icelake.
18374 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
18375 * doc/invoke.texi: Add -march=icelake.
18377 2018-02-02 Julia Koval <julia.koval@intel.com>
18379 * config/i386/i386.c (ix86_option_override_internal): Change flags type
18380 to wide_int_bitmask.
18381 * wide-int-bitmask.h: New.
18383 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18386 * config/i386/i386.md: Replace Pmode with word_mode in
18387 builtin_setjmp_setup and builtin_longjmp to support x32.
18389 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
18393 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
18395 (rs6000_supported_cpu_names): New static variable.
18396 (linux_cpu_translation_table): Likewise.
18397 (elf_platform) <cpu>: Define new static variable and use it.
18398 Translate kernel AT_PLATFORM name to canonical name if needed.
18399 Error if platform name is unknown.
18401 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
18404 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
18406 2018-02-01 Jeff Law <law@redhat.com>
18409 * config/i386/i386.c (release_scratch_register_on_entry): Add new
18410 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
18411 the scratch if RELEASE_VIA_POP is false.
18412 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
18413 If we have to save a temporary register, decrement SIZE appropriately.
18414 Pass new arguments to release_scratch_register_on_entry.
18415 (ix86_adjust_stack_and_probe): Likewise.
18416 (ix86_emit_probe_stack_range): Pass new arguments to
18417 release_scratch_register_on_entry.
18419 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
18421 PR rtl-optimization/84157
18422 * combine.c (change_zero_ext): Use REG_P predicate in
18423 front of HARD_REGISTER_P predicate.
18425 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
18427 * config/avr/avr.c (avr_option_override): Move disabling of
18428 -fdelete-null-pointer-checks to...
18429 * common/config/avr/avr-common.c (avr_option_optimization_table):
18432 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18434 PR tree-optimization/81635
18435 * tree-data-ref.c (split_constant_offset_1): For types that
18436 wrap on overflow, try to use range info to prove that wrapping
18439 2018-02-01 Renlin Li <renlin.li@arm.com>
18442 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
18443 TAILCALL_ADDR_REGS.
18444 (aarch64_register_move_cost): Likewise.
18445 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
18446 TAILCALL_ADDR_REGS.
18447 (REG_CLASS_NAMES): Likewise.
18448 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
18449 TAILCALL_ADDR_REGS. Remove IP registers.
18450 * config/aarch64/aarch64.md (Ucs): Update register constraint.
18452 2018-02-01 Richard Biener <rguenther@suse.de>
18454 * domwalk.h (dom_walker::dom_walker): Add additional constructor
18455 for specifying RPO order and allow NULL for that.
18456 * domwalk.c (dom_walker::dom_walker): Likewise.
18457 (dom_walker::walk): Handle NULL RPO order.
18458 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
18460 (rewrite_update_dom_walker): Likewise.
18461 (mark_def_dom_walker): Likewise.
18463 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18465 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
18466 (aarch64_maybe_expand_sve_subreg_move): Declare.
18467 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
18468 * config/aarch64/predicates.md (aarch64_any_register_operand): New
18470 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
18471 that are semantically a reverse operation.
18472 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
18473 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
18474 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
18476 (aarch64_can_change_mode_class): For big-endian, forbid changes
18477 between two SVE modes if they have different element sizes.
18479 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18481 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
18482 the TImode handling for big-endian targets.
18484 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18486 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
18487 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
18489 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
18490 Remove BSWAP handing for big-endian targets and use the form of
18491 LD1RQ appropariate for the mode.
18493 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18495 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
18496 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
18497 duplicated element.
18499 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18502 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
18503 check for operands that need to go through aarch64_sve_reload_be.
18505 2018-02-01 Jakub Jelinek <jakub@redhat.com>
18507 PR tree-optimization/81661
18508 PR tree-optimization/84117
18509 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
18510 * tree-eh.c: Include gimplify.h.
18511 (find_trapping_overflow, replace_trapping_overflow,
18512 rewrite_to_non_trapping_overflow): New functions.
18513 * tree-vect-loop.c: Include tree-eh.h.
18514 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
18515 * tree-data-ref.c: Include tree-eh.h.
18516 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
18518 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
18520 PR rtl-optimization/84123
18521 * combine.c (change_zero_ext): Check if hard register satisfies
18522 can_change_dest_mode before calling gen_lowpart_SUBREG.
18524 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
18527 * ira.c (ira_init_register_move_cost): Remove assert.
18529 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
18531 PR rtl-optimization/84071
18532 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
18533 * doc/tm.texi: Regenerate.
18535 2018-01-31 Richard Biener <rguenther@suse.de>
18537 PR tree-optimization/84132
18538 * tree-data-ref.c (analyze_miv_subscript): Properly
18539 check whether evolution_function_is_affine_multivariate_p
18540 before calling gcd_of_steps_may_divide_p.
18542 2018-01-31 Julia Koval <julia.koval@intel.com>
18545 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
18546 * config/i386/i386.md (rdpid_rex64) New.
18547 (rdpid): Make 32bit only.
18549 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
18552 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
18553 an IDENTIFIER_NODE for FUNCTION_TYPE's.
18555 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
18558 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
18560 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
18562 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
18564 PR rtl-optimization/84071
18565 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
18566 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
18568 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
18570 * config/arc/arc.c (arc_handle_aux_attribute): New function.
18571 (arc_attribute_table): Add 'aux' attribute.
18572 (arc_in_small_data_p): Consider aux like variables.
18573 (arc_is_aux_reg_p): New function.
18574 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
18575 (arc_get_aux_arg): New function.
18576 (prepare_move_operands): Handle aux-register access.
18577 (arc_handle_aux_attribute): New function.
18578 * doc/extend.texi (ARC Variable attributes): Add subsection.
18580 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
18582 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
18583 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
18584 (arc_attribute_table): Add 'uncached' attribute.
18585 (arc_print_operand): Print '.di' flag for uncached memory
18587 (arc_in_small_data_p): Do not consider for small data the uncached
18589 (arc_is_uncached_mem_p): New function.
18590 * config/arc/predicates.md (compact_store_memory_operand): Check
18591 for uncached memory accesses.
18592 (nonvol_nonimm_operand): Likewise.
18593 * doc/extend.texi (ARC Type Attribute): New subsection.
18595 2018-01-31 Jakub Jelinek <jakub@redhat.com>
18598 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
18599 falign-loops=): Add Optimization flag.
18601 2018-01-30 Jeff Law <law@redhat.com>
18604 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
18605 INT_REGISTERS_SAVED. Check it prior to calling
18606 get_scratch_register_on_entry.
18607 (ix86_adjust_stack_and_probe): Similarly.
18608 (ix86_emit_probe_stack_range): Similarly.
18609 (ix86_expand_prologue): Corresponding changes.
18611 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18614 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
18615 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
18617 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
18620 * lra-constraints.c (curr_insn_transform): Process AND in the
18623 2018-01-30 Jakub Jelinek <jakub@redhat.com>
18625 PR rtl-optimization/83986
18626 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
18627 dependence against last_pending_memory_flush in addition to
18628 pending_jump_insns.
18630 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
18632 PR tree-optimization/81611
18633 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
18636 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18639 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
18642 2018-01-30 Richard Biener <rguenther@suse.de>
18643 Jakub Jelinek <jakub@redhat.com>
18645 PR tree-optimization/84111
18646 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
18647 inner loops added during recursion, as they don't have up-to-date
18650 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
18653 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
18654 (can_inline_edge_by_limits_p): ... here.
18655 (can_early_inline_edge_p, check_callers,
18656 update_caller_keys, update_callee_keys, recursive_inlining,
18657 add_new_edges_to_heap, speculation_useful_p,
18658 inline_small_functions,
18659 inline_small_functions, flatten_function,
18660 inline_to_all_callers_1): Update.
18662 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
18664 * profile-count.c (profile_count::combine_with_ipa_count): Handle
18667 2018-01-30 Richard Biener <rguenther@suse.de>
18669 PR tree-optimization/83008
18670 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
18671 invariant and constant vector uses in stmts when they need
18672 more than one stmt.
18674 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18677 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
18678 * configure: Regenerate.
18680 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
18682 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
18684 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
18685 Use gen_rtx_REG rather than gen_lowpart.
18687 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
18689 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
18690 rather than 0 when creating partial subregs.
18692 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
18694 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
18697 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
18700 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
18701 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
18702 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
18703 flags. This restores the settings used before the 2017-07-24.
18704 Turning off pre increment/decrement/modify allows IVOPTS to
18705 optimize DF/SF loops where the index is an int.
18707 2018-01-29 Richard Biener <rguenther@suse.de>
18708 Kelvin Nilsen <kelvin@gcc.gnu.org>
18711 * tree-vect-stmts.c (vectorizable_call): Don't call
18712 targetm.vectorize_builtin_md_vectorized_function if callee is
18715 2018-01-22 Carl Love <cel@us.ibm.com>
18717 * doc/extend.tex: Fix typo in second arg in
18718 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
18720 2018-01-29 Richard Biener <rguenther@suse.de>
18722 PR tree-optimization/84086
18723 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
18724 (flush_ssaname_freelist): When SSA names were released reset
18725 the SCEV hash table.
18727 2018-01-29 Richard Biener <rguenther@suse.de>
18729 PR tree-optimization/84057
18730 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
18731 removed paths when removing edges.
18733 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
18735 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
18736 -mfunction-return=@var{choice}.
18738 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
18740 PR diagnostic/84034
18741 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
18742 Handle CR like TAB.
18743 (layout::print_source_line): Likewise.
18744 (test_get_line_width_without_trailing_whitespace): Add test cases.
18746 2018-01-27 Jakub Jelinek <jakub@redhat.com>
18748 PR middle-end/84040
18749 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
18752 2018-01-26 Jim Wilson <jimw@sifive.com>
18754 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
18756 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
18759 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18761 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
18762 and CMP + SUB-immediate -> SUBS.
18764 2018-01-26 Martin Sebor <msebor@redhat.com>
18766 PR tree-optimization/83896
18767 * tree-ssa-strlen.c (get_string_len): Rename...
18768 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
18769 Avoid assuming length is constant.
18770 (handle_char_store): Use HOST_WIDE_INT for string length.
18772 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
18775 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
18776 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
18778 2018-01-26 Richard Biener <rguenther@suse.de>
18780 PR rtl-optimization/84003
18781 * dse.c (record_store): Only record redundant stores when
18782 the earlier store aliases at least all accesses the later one does.
18784 2018-01-26 Jakub Jelinek <jakub@redhat.com>
18786 PR rtl-optimization/83985
18787 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
18788 REG_CFA_RESTORE insns.
18789 (delete_unmarked_insns): Don't ignore separate shrink wrapping
18790 REG_CFA_RESTORE insns here.
18793 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
18794 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
18796 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18798 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
18799 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
18800 (arc_init): Likewise.
18801 (arc_override_options): Likewise.
18802 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
18804 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
18806 * config/arc/arc.h (TARGET_DBNZ): Define.
18807 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
18808 properly set the tune attribute.
18809 (dbnz): Use TARGET_DBNZ guard.
18810 * config/arc/arc.opt (mtune): Add core3 option.
18812 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18814 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
18815 recognize new pic like addresses.
18816 (arc_delegitimize_address): Clean up.
18818 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18820 * config/arc/arc-arches.def: Option mrf16 valid for all
18822 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
18823 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
18824 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
18825 * config/arc/arc-tables.opt: Regenerate.
18826 * config/arc/arc.c (arc_conditional_register_usage): Handle
18827 reduced register file case.
18828 (arc_file_start): Set must have build attributes.
18829 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
18830 mrf16 option value.
18831 * config/arc/arc.opt (mrf16): Add new option.
18832 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
18833 * config/arc/genmultilib.awk: Handle new mrf16 option.
18834 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
18835 * config/arc/t-multilib: Regenerate.
18836 * doc/invoke.texi (ARC Options): Document mrf16 option.
18838 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18840 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
18841 * config/arc/arc.c (arc_handle_secure_attribute): New function.
18842 (arc_attribute_table): Add 'secure_call' attribute.
18843 (arc_print_operand): Print secure call operand.
18844 (arc_function_ok_for_sibcall): Don't optimize tail calls when
18846 (arc_is_secure_call_p): New function. * config/arc/arc.md
18847 (call_i): Add support for sjli instruction.
18848 (call_value_i): Likewise.
18849 * config/arc/constraints.md (Csc): New constraint.
18851 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18852 John Eric Martin <John.Martin@emmicro-us.com>
18854 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
18855 * config/arc/arc.c (_arc_jli_section): New struct.
18856 (arc_jli_section): New type.
18857 (rc_jli_sections): New static variable.
18858 (arc_handle_jli_attribute): New function.
18859 (arc_attribute_table): Add jli_always and jli_fixed attribute.
18860 (arc_file_end): New function.
18861 (TARGET_ASM_FILE_END): Define.
18862 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
18863 (arc_add_jli_section): New function.
18864 (jli_call_scan): Likewise.
18865 (arc_reorg): Call jli_call_scan.
18866 (arc_output_addsi): Remove 'S' from printing asm operand.
18867 (arc_is_jli_call_p): New function.
18868 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
18870 (movhi_insn): Likewise.
18871 (movsi_insn): Likewise.
18872 (movsi_set_cc_insn): Likewise.
18873 (loadqi_update): Likewise.
18874 (load_zeroextendqisi_update): Likewise.
18875 (load_signextendqisi_update): Likewise.
18876 (loadhi_update): Likewise.
18877 (load_zeroextendhisi_update): Likewise.
18878 (load_signextendhisi_update): Likewise.
18879 (loadsi_update): Likewise.
18880 (loadsf_update): Likewise.
18881 (movsicc_insn): Likewise.
18882 (bset_insn): Likewise.
18883 (bxor_insn): Likewise.
18884 (bclr_insn): Likewise.
18885 (bmsk_insn): Likewise.
18886 (bicsi3_insn): Likewise.
18887 (cmpsi_cc_c_insn): Likewise.
18888 (movsi_ne): Likewise.
18889 (movsi_cond_exec): Likewise.
18890 (clrsbsi2): Likewise.
18891 (norm_f): Likewise.
18901 (call_i): Remove 'S' asm letter, add jli instruction.
18902 (call_value_i): Likewise.
18903 * config/arc/arc.op (mjli-always): New option.
18904 * config/arc/constraints.md (Cji): New constraint.
18905 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
18907 (subsf3_fpx): Likewise.
18908 (mulsf3_fpx): Likewise.
18909 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
18911 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
18912 function attrbutes.
18913 * doc/invoke.texi (ARC): Document mjli-always option.
18915 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
18917 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
18918 avoid addition with 0 and use incw and decw where possible.
18920 2018-01-26 Richard Biener <rguenther@suse.de>
18922 PR tree-optimization/81082
18923 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
18924 association if it requires casting to unsigned.
18925 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
18926 from fold_plusminus_mult_expr to catch important cases late when
18927 range info is available.
18929 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18931 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
18932 * configure.ac (hidden_linkonce): New test.
18933 * configure: Regenerate.
18934 * config.in: Regenerate.
18936 2018-01-26 Julia Koval <julia.koval@intel.com>
18938 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
18939 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
18940 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
18941 _mm_mask_bitshuffle_epi64_mask): Fix type.
18942 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
18943 USI_FTYPE_V4DI_V4DI_USI): Remove.
18944 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
18945 __builtin_ia32_vpshufbitqmb256_mask,
18946 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
18947 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
18948 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
18950 2018-01-26 Alan Modra <amodra@gmail.com>
18953 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
18954 UNSPEC_VBPERMQ. Sort other unspecs.
18956 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
18958 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
18960 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
18962 PR middle-end/83055
18963 * predict.c (drop_profile): Do not push/pop cfun; update also
18965 (handle_missing_profiles): Fix logic looking for zero profiles.
18967 2018-01-25 Jakub Jelinek <jakub@redhat.com>
18969 PR middle-end/83977
18970 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
18971 on functions with #pragma omp declare simd or functions with simd
18973 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
18974 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
18975 Remove trailing \n from warning_at calls.
18977 2018-01-25 Tom de Vries <tom@codesourcery.com>
18980 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
18981 for neutered workers.
18983 2018-01-24 Joseph Myers <joseph@codesourcery.com>
18986 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
18987 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
18989 2018-01-24 Jeff Law <law@redhat.com>
18992 * i386.c (get_probe_interval): Move to earlier point.
18993 (ix86_compute_frame_layout): If -fstack-clash-protection and
18994 the frame is larger than the probe interval, then use pushes
18995 to save registers rather than reg->mem moves.
18996 (ix86_expand_prologue): Remove conditional for int_registers_saved
18999 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
19002 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
19003 min/max for never referenced object.
19005 2018-01-24 Jakub Jelinek <jakub@redhat.com>
19007 PR middle-end/83977
19008 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
19010 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
19011 attributes from DECL_ATTRIBUTES (decl) without affecting
19012 DECL_ATTRIBUTES (current_function_decl).
19013 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
19014 functions with non-NULL DECL_ABSTRACT_ORIGIN.
19016 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
19018 PR tree-optimization/83979
19019 * fold-const.c (fold_comparison): Use constant_boolean_node
19020 instead of boolean_{true,false}_node.
19022 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
19024 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
19027 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19029 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19030 Simplify the clause that sets the length attribute.
19031 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19032 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
19033 clause that sets the length attribute.
19034 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19036 2018-01-24 Tom de Vries <tom@codesourcery.com>
19039 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
19040 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
19041 Add strict parameter.
19042 (prevent_branch_around_nothing): Insert dummy insn between branch to
19043 label and label with no ptx insn inbetween.
19044 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
19046 2018-01-24 Tom de Vries <tom@codesourcery.com>
19049 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
19050 for neutered threads in warp.
19051 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
19053 2018-01-24 Richard Biener <rguenther@suse.de>
19055 PR tree-optimization/83176
19056 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
19059 2018-01-24 Richard Biener <rguenther@suse.de>
19061 PR tree-optimization/82819
19062 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
19063 code generating pluses that are no-ops in the target precision.
19065 2018-01-24 Richard Biener <rguenther@suse.de>
19067 PR middle-end/84000
19068 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
19070 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
19072 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
19073 to merge probabilities.
19074 * predict.c (probably_never_executed): Also mark as cold functions
19075 with global 0 profile and guessed local profile.
19076 * profile-count.c (profile_probability::combine_with_count): New
19078 * profile-count.h (profile_probability::operator*,
19079 profile_probability::operator*=, profile_probability::operator/,
19080 profile_probability::operator/=): Reduce precision to adjusted
19081 and set value to guessed on contradictory divisions.
19082 (profile_probability::combine_with_freq): Remove.
19083 (profile_probability::combine_wiht_count): Declare.
19084 (profile_count::force_nonzero):: Set to adjusted.
19085 (profile_count::probability_in):: Set quality to adjusted.
19086 * tree-ssa-tail-merge.c (replace_block_by): Use
19087 combine_with_count.
19089 2018-01-23 Andrew Waterman <andrew@sifive.com>
19090 Jim Wilson <jimw@sifive.com>
19092 * config/riscv/riscv.c (riscv_stack_boundary): New.
19093 (riscv_option_override): Set riscv_stack_boundary. Handle
19094 riscv_preferred_stack_boundary_arg.
19095 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
19096 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
19097 (STACK_BOUNDARY): Set to riscv_stack_boundary.
19098 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
19099 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
19100 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
19102 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
19105 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
19106 of struct ix86_frame.
19107 (ix86_expand_epilogue): Likewise. Add a local variable for
19108 the reg_save_offset field in struct ix86_frame.
19110 2018-01-23 Bin Cheng <bin.cheng@arm.com>
19112 PR tree-optimization/82604
19113 * tree-loop-distribution.c (enum partition_kind): New enum item
19114 PKIND_PARTIAL_MEMSET.
19115 (partition_builtin_p): Support above new enum item.
19116 (generate_code_for_partition): Ditto.
19117 (compute_access_range): Differentiate cases that equality can be
19118 proven at all loops, the innermost loops or no loops.
19119 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
19120 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
19121 (finalize_partitions, distribute_loop): Don't fuse partition of
19122 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
19123 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
19124 parloop is enabled.
19126 2018-01-23 Martin Liska <mliska@suse.cz>
19128 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
19129 order to ignore the predictor.
19130 (PRED_POLYMORPHIC_CALL): Likewise.
19131 (PRED_RECURSIVE_CALL): Likewise.
19133 2018-01-23 Martin Liska <mliska@suse.cz>
19135 * tree-profile.c (tree_profiling): Print function header to
19136 aware reader which function we are working on.
19137 * value-prof.c (gimple_find_values_to_profile): Do not print
19138 not interesting value histograms.
19140 2018-01-23 Martin Liska <mliska@suse.cz>
19142 * profile-count.h (enum profile_quality): Add
19143 profile_uninitialized as the first value. Do not number values
19144 as they are zero based.
19145 (profile_count::verify): Update sanity check.
19146 (profile_probability::verify): Likewise.
19148 2018-01-23 Nathan Sidwell <nathan@acm.org>
19150 * doc/invoke.texi (ffor-scope): Deprecate.
19152 2018-01-23 David Malcolm <dmalcolm@redhat.com>
19154 PR tree-optimization/83510
19155 * domwalk.c (set_all_edges_as_executable): New function.
19156 (dom_walker::dom_walker): Convert bool param
19157 "skip_unreachable_blocks" to enum reachability. Move setup of
19158 edge flags to set_all_edges_as_executable and only do it when
19159 reachability is REACHABLE_BLOCKS.
19160 * domwalk.h (enum dom_walker::reachability): New enum.
19161 (dom_walker::dom_walker): Convert bool param
19162 "skip_unreachable_blocks" to enum reachability.
19163 (set_all_edges_as_executable): New decl.
19164 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
19165 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
19167 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
19168 but converting true to REACHABLE_BLOCKS.
19169 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
19171 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
19172 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
19173 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
19175 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
19176 if check_all_array_refs will be called.
19178 2018-01-23 David Malcolm <dmalcolm@redhat.com>
19180 * tree.c (selftest::test_location_wrappers): Add more test
19183 2018-01-23 David Malcolm <dmalcolm@redhat.com>
19185 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
19186 (selftest::test_bit_in_range): Likewise.
19188 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
19191 * doc/sourcebuild.texi (vect_float): Say that the selector
19192 only describes the situation when -funsafe-math-optimizations is on.
19193 (vect_float_strict): Document.
19195 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
19197 PR tree-optimization/83965
19198 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
19199 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
19200 instead of checking only for a reduction.
19201 (vect_recog_widen_sum_pattern): Likewise.
19203 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
19205 * predict.c (probably_never_executed): Only use precise profile info.
19206 (compute_function_frequency): Skip after inlining hack since we now
19207 have quality checking.
19209 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
19211 * profile-count.h (profile_probability::very_unlikely,
19212 profile_probability::unlikely, profile_probability::even): Set
19213 precision to guessed.
19215 2018-01-23 Richard Biener <rguenther@suse.de>
19217 PR tree-optimization/83963
19218 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
19219 Properly terminate dominator walk when crossing the exit edge not
19220 when visiting its source block.
19222 2018-01-23 Jakub Jelinek <jakub@redhat.com>
19225 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
19226 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
19228 2018-01-22 Jakub Jelinek <jakub@redhat.com>
19230 PR tree-optimization/83957
19231 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
19232 semicolon after for body surrounded by braces.
19234 PR tree-optimization/83081
19235 * profile-count.h (profile_probability::split): New method.
19236 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
19237 Use profile_probability::split.
19238 (do_compare_rtx_and_jump): Fix adjustment of probabilities
19239 when splitting a single conditional jump into 2.
19241 2018-01-22 David Malcolm <dmalcolm@redhat.com>
19243 PR tree-optimization/69452
19244 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
19247 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19249 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
19250 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
19251 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
19253 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19255 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
19257 * config/rl78/rl78.md (movdi): New define_expand.
19258 * config/rl78/rl78.c (rl78_split_movdi): New function.
19260 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
19263 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
19265 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
19266 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
19267 128-bit to produce an UNSPEC move to get the double word with the
19268 signbit and then a shift directly to do signbit.
19269 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
19270 implementation with a new version that just does either a direct
19271 move or a regular move. Move memory interface to separate insns.
19272 Move insns so they are next to the expander.
19273 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
19274 with signbit move. Split big and little endian case.
19275 (signbit<mode>2_dm_mem_le): Likewise.
19276 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
19277 (signbit<mode>2_dm2): Likewise.
19279 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19281 * config/rl78/rl78.md (anddi3): New define_expand.
19283 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19285 * config/rl78/rl78.md (umindi3): New define_expand.
19287 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19289 * config/rl78/rl78.md (smindi3): New define_expand.
19291 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19293 * config/rl78/rl78.md (smaxdi3): New define_expand.
19295 2018-01-22 Carl Love <cel@us.ibm.com>
19297 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
19298 LVX_V1TI): Add macro expansion.
19299 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
19300 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
19301 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
19302 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
19303 Change check to determine if the instruction is a byte reversing
19304 entry. Fix typo in comment.
19305 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
19306 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
19307 Add def_builtin calls for new builtins.
19308 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
19309 Add define_insn expansion.
19311 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19313 * config/rl78/rl78.md (umaxdi3): New define_expand.
19315 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19317 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
19318 for non-QImode registers.
19320 2018-01-22 Richard Biener <rguenther@suse.de>
19322 PR tree-optimization/83963
19323 * graphite-scop-detection.c (scop_detection::get_sese): Delay
19324 including the loop exit block.
19325 (scop_detection::merge_sese): Likewise.
19326 (scop_detection::add_scop): Do it here instead.
19328 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19330 * doc/sourcebuild.texi (arm_softfloat): Document.
19332 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
19335 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
19336 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
19337 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
19339 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19340 David Edelsohn <dje.gcc@gmail.com>
19343 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19344 Change "crset eq" to "crset 2".
19345 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19346 (*call_indirect_aix<mode>_nospec): Likewise.
19347 (*call_value_indirect_aix<mode>_nospec): Likewise.
19348 (*call_indirect_elfv2<mode>_nospec): Likewise.
19349 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
19350 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
19351 change assembly output from . to $.
19352 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19353 (indirect_jump<mode>_nospec): Change assembly output from . to $.
19354 (*tablejump<mode>_internal1_nospec): Likewise.
19356 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
19359 * config/sh/sh_optimize_sett_clrt.cc:
19360 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
19362 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
19364 PR tree-optimization/83940
19365 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
19366 offset_dt to vect_constant_def rather than vect_unknown_def_type.
19367 (vect_check_load_store_mask): Add a mask_dt_out parameter and
19368 use it to pass back the definition type.
19369 (vect_check_store_rhs): Likewise rhs_dt_out.
19370 (vect_build_gather_load_calls): Add a mask_dt argument and use
19371 it instead of a call to vect_is_simple_use.
19372 (vectorizable_store): Update calls to vect_check_load_store_mask
19373 and vect_check_store_rhs. Use the dt returned by the latter instead
19374 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
19375 instead of calls to vect_is_simple_use. Pass the scalar rather
19376 than the vector operand to vect_is_simple_use when handling
19377 second and subsequent copies of an rhs value.
19378 (vectorizable_load): Update calls to vect_check_load_store_mask
19379 and vect_build_gather_load_calls. Use the cached mask_dt and
19380 gs_info.offset_dt instead of calls to vect_is_simple_use.
19382 2018-01-20 Jakub Jelinek <jakub@redhat.com>
19384 PR middle-end/83945
19385 * tree-emutls.c: Include gimplify.h.
19386 (lower_emutls_2): New function.
19387 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
19388 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
19389 it before further processing.
19392 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
19393 UINTVAL (trueop1) instead of INTVAL (op1).
19395 2018-01-19 Jakub Jelinek <jakub@redhat.com>
19399 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
19400 INCOMING_FRAME_SP_OFFSET if not defined.
19401 (scan_trace): Add ENTRY argument. If true and
19402 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
19403 emit a note to adjust the CFA offset.
19404 (create_cfi_notes): Adjust scan_trace callers.
19405 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
19406 INCOMING_FRAME_SP_OFFSET in the CIE.
19407 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
19408 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
19410 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
19411 * doc/tm.texi: Regenerated.
19413 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19415 PR rtl-optimization/83147
19416 * lra-constraints.c (remove_inheritance_pseudos): Use
19417 lra_substitute_pseudo_within_insn.
19419 2018-01-19 Tom de Vries <tom@codesourcery.com>
19420 Cesar Philippidis <cesar@codesourcery.com>
19423 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
19425 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
19428 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
19429 spaces for function labels.
19431 2018-01-19 Martin Liska <mliska@suse.cz>
19433 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
19434 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
19435 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
19436 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
19437 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
19438 (PRED_CONST_RETURN): Change from 69 to 65.
19439 (PRED_NULL_RETURN): Change from 91 to 71.
19440 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
19441 (PRED_LOOP_GUARD): Change from 66 to 73.
19443 2018-01-19 Martin Liska <mliska@suse.cz>
19445 * predict.c (predict_insn_def): Add new assert.
19446 (struct branch_predictor): Change type to signed integer.
19447 (test_prediction_value_range): Amend test to cover
19448 PROB_UNINITIALIZED.
19449 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
19450 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
19451 (PRED_LOOP_ITERATIONS_MAX): Likewise.
19452 (PRED_LOOP_IV_COMPARE): Likewise.
19453 * predict.h (PROB_UNINITIALIZED): Define new constant.
19455 2018-01-19 Martin Liska <mliska@suse.cz>
19457 * predict.c (dump_prediction): Add new format for
19458 analyze_brprob.py script which is enabled with -details
19460 * profile-count.h (precise_p): New function.
19462 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
19464 PR tree-optimization/83922
19465 * tree-vect-loop.c (vect_verify_full_masking): Return false if
19466 there are no statements that need masking.
19467 (vect_active_double_reduction_p): New function.
19468 (vect_analyze_loop_operations): Use it when handling phis that
19469 are not in the loop header.
19471 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
19473 PR tree-optimization/83914
19474 * tree-vect-loop.c (vectorizable_induction): Don't convert
19475 init_expr or apply the peeling adjustment for inductions
19476 that are nested within the vectorized loop.
19478 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19480 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
19483 2018-01-18 Jakub Jelinek <jakub@redhat.com>
19487 * function.h (gimplify_parameters): Add gimple_seq * argument.
19488 * function.c: Include gimple.h and options.h.
19489 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
19490 for the added local temporaries if needed.
19491 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
19492 if there are any parameter cleanups, wrap whole body into a
19493 try/finally with the cleanups.
19495 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
19498 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
19499 Use GET_MODE_CLASS for scalar floating point.
19501 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
19505 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
19506 Fix call of call_cgraph_insertion_hooks.
19508 2018-01-18 Martin Sebor <msebor@redhat.com>
19510 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
19512 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
19515 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
19518 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
19521 * common.opt: (-ffile-prefix-map): New option.
19522 * opts.c (common_handle_option): Defer it.
19523 * opts-global.c (handle_common_deferred_options): Handle it.
19524 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
19525 * file-prefix-map.h: New file.
19526 (remap_debug_filename, add_debug_prefix_map): ...here.
19527 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
19528 * final.c (debug_prefix_map, add_debug_prefix_map
19529 remap_debug_filename): Move to...
19530 * file-prefix-map.c: New file.
19531 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
19532 generalize, get rid of alloca(), use strrchr() instead of strchr().
19533 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
19534 Implement in terms of add_prefix_map().
19535 (remap_macro_filename, remap_debug_filename): Implement in term of
19537 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
19538 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
19539 * dbxout.c: Include file-prefix-map.h.
19540 * varasm.c: Likewise.
19541 * vmsdbgout.c: Likewise.
19542 * xcoffout.c: Likewise.
19543 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
19544 * doc/cppopts.texi (-fmacro-prefix-map): Document.
19545 * doc/invoke.texi (-ffile-prefix-map): Document.
19546 (-fdebug-prefix-map): Update description.
19548 2018-01-18 Martin Liska <mliska@suse.cz>
19550 * config/i386/i386.c (indirect_thunk_name): Document that also
19552 (output_indirect_thunk): Document why both instructions
19553 (pause and lfence) are generated.
19555 2018-01-18 Richard Biener <rguenther@suse.de>
19557 PR tree-optimization/83887
19558 * graphite-scop-detection.c
19559 (scop_detection::get_nearest_dom_with_single_entry): Remove.
19560 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
19561 (scop_detection::merge_sese): Re-implement with a flood-fill
19562 algorithm that properly finds a SESE region if it exists.
19564 2018-01-18 Jakub Jelinek <jakub@redhat.com>
19567 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
19568 pointer_diff optimizations use view_convert instead of convert.
19570 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19572 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19573 Generate different code for -mno-speculate-indirect-jumps.
19574 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19575 (*call_indirect_aix<mode>): Disable for
19576 -mno-speculate-indirect-jumps.
19577 (*call_indirect_aix<mode>_nospec): New define_insn.
19578 (*call_value_indirect_aix<mode>): Disable for
19579 -mno-speculate-indirect-jumps.
19580 (*call_value_indirect_aix<mode>_nospec): New define_insn.
19581 (*sibcall_nonlocal_sysv<mode>): Generate different code for
19582 -mno-speculate-indirect-jumps.
19583 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19585 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
19587 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
19588 long double type, set the flags for noting the default long double
19589 type, even if we don't pass or return a long double type.
19591 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
19594 * ipa-inline.c (flatten_function): Do not overwrite final inlining
19597 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
19599 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
19600 support for merge[hl].
19601 (fold_mergehl_helper): New helper function.
19602 (tree-vector-builder.h): New #include for tree_vector_builder usage.
19603 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
19604 (altivec_vmrglw_direct): Add xxmrglw insn.
19606 2018-01-17 Andrew Waterman <andrew@sifive.com>
19608 * config/riscv/riscv.c (riscv_conditional_register_usage): If
19609 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
19611 2018-01-17 David Malcolm <dmalcolm@redhat.com>
19614 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
19615 call the lto_location_cache before reading the
19616 DECL_SOURCE_LOCATION of the types.
19618 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
19619 Richard Sandiford <richard.sandiford@linaro.org>
19621 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
19622 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
19623 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
19624 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
19625 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
19627 * config/aarch64/constraints.md (aarch64_movti_operand):
19629 * config/aarch64/predicates.md (Uti): Add new constraint.
19631 2018-01-17 Carl Love <cel@us.ibm.com>
19633 * config/rs6000/vsx.md (define_expand xl_len_r,
19634 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
19635 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
19637 (define_expand, define_insn): Move the shift left from the
19638 define_insn to the define_expand for lxvl and stxvl instructions.
19639 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
19640 and XL_LEN_R definitions to PURE.
19642 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
19644 * config/i386/i386.c (indirect_thunk_name): Declare regno
19645 as unsigned int. Compare regno with INVALID_REGNUM.
19646 (output_indirect_thunk): Ditto.
19647 (output_indirect_thunk_function): Ditto.
19648 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
19649 in the call to output_indirect_thunk_function.
19651 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
19653 PR middle-end/83884
19654 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
19655 rather than the size of inner_type to determine the stack slot size
19656 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
19658 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
19661 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
19664 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
19666 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
19667 endian Linux systems to optionally enable multilibs for selecting
19668 the long double type if the user configured an explicit type.
19669 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
19670 have no long double multilibs if not defined.
19671 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
19672 warn if the user used -mabi={ieee,ibm}longdouble and we built
19673 multilibs for long double.
19674 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
19675 appropriate multilib option.
19676 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
19678 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
19679 for building long double multilibs.
19680 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
19682 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
19684 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
19687 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
19689 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
19692 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
19695 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
19698 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
19700 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
19701 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
19703 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
19705 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
19706 different rtl trees depending on TARGET_64BIT.
19707 (rs6000_gen_lvx): Likewise.
19709 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
19711 * config/visium/visium.md (nop): Tweak comment.
19712 (hazard_nop): Likewise.
19714 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19716 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
19717 -mspeculate-indirect-jumps.
19718 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
19719 for -mno-speculate-indirect-jumps.
19720 (*call_indirect_elfv2<mode>_nospec): New define_insn.
19721 (*call_value_indirect_elfv2<mode>): Disable for
19722 -mno-speculate-indirect-jumps.
19723 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
19724 (indirect_jump): Emit different RTL for
19725 -mno-speculate-indirect-jumps.
19726 (*indirect_jump<mode>): Disable for
19727 -mno-speculate-indirect-jumps.
19728 (*indirect_jump<mode>_nospec): New define_insn.
19729 (tablejump): Emit different RTL for
19730 -mno-speculate-indirect-jumps.
19731 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
19732 (tablejumpsi_nospec): New define_expand.
19733 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
19734 (tablejumpdi_nospec): New define_expand.
19735 (*tablejump<mode>_internal1): Disable for
19736 -mno-speculate-indirect-jumps.
19737 (*tablejump<mode>_internal1_nospec): New define_insn.
19738 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
19741 2018-01-16 Artyom Skrobov tyomitch@gmail.com
19743 * caller-save.c (insert_save): Drop unnecessary parameter. All
19746 2018-01-16 Jakub Jelinek <jakub@redhat.com>
19747 Richard Biener <rguenth@suse.de>
19750 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
19751 return early, inline manually is_gimple_sizepos. Make sure if we
19752 call gimplify_expr we don't end up with a gimple constant.
19753 * tree.c (variably_modified_type_p): Don't return true for
19754 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
19755 * gimplify.h (is_gimple_sizepos): Remove.
19757 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19759 PR tree-optimization/83857
19760 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
19761 vectorizable_live_operation for pure SLP statements.
19762 (vectorizable_live_operation): Handle PHIs.
19764 2018-01-16 Richard Biener <rguenther@suse.de>
19766 PR tree-optimization/83867
19767 * tree-vect-stmts.c (vect_transform_stmt): Precompute
19768 nested_in_vect_loop_p since the scalar stmt may get invalidated.
19770 2018-01-16 Jakub Jelinek <jakub@redhat.com>
19773 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
19774 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
19775 If off is not INTEGER_CST, issue a may not be aligned warning
19776 rather than isn't aligned. Use isn%'t rather than isn't.
19777 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
19779 <case MULT_EXPR>: Improve the case when bottom and one of the
19780 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
19781 operand, in that case check if the other operand is multiple of
19782 bottom divided by the INTEGER_CST operand.
19784 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19787 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
19788 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
19789 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
19790 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
19791 * config/pa/pa.c (pa_function_arg_advance): Likewise.
19792 (pa_function_arg, pa_arg_partial_bytes): Likewise.
19793 (pa_function_arg_size): New function.
19795 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19797 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
19798 in a separate statement.
19800 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19802 PR tree-optimization/83847
19803 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
19804 group gathers and scatters.
19806 2018-01-16 Jakub Jelinek <jakub@redhat.com>
19808 PR rtl-optimization/86620
19809 * params.def (max-sched-ready-insns): Bump minimum value to 1.
19811 PR rtl-optimization/83213
19812 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
19813 to last if both are JUMP_INSNs.
19815 PR tree-optimization/83843
19816 * gimple-ssa-store-merging.c
19817 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
19818 store_immediate_info for bswap/nop orig_stores.
19820 2018-01-15 Andrew Waterman <andrew@sifive.com>
19822 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
19824 <UDIV>: Increase cost if !TARGET_DIV.
19826 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
19828 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
19829 (define_attr "cr_logical_3op"): New.
19830 (cceq_ior_compare): Adjust.
19831 (cceq_ior_compare_complement): Adjust.
19832 (*cceq_rev_compare): Adjust.
19833 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
19834 (is_cracked_insn): Adjust.
19835 (insn_must_be_first_in_group): Adjust.
19836 * config/rs6000/40x.md: Adjust.
19837 * config/rs6000/440.md: Adjust.
19838 * config/rs6000/476.md: Adjust.
19839 * config/rs6000/601.md: Adjust.
19840 * config/rs6000/603.md: Adjust.
19841 * config/rs6000/6xx.md: Adjust.
19842 * config/rs6000/7450.md: Adjust.
19843 * config/rs6000/7xx.md: Adjust.
19844 * config/rs6000/8540.md: Adjust.
19845 * config/rs6000/cell.md: Adjust.
19846 * config/rs6000/e300c2c3.md: Adjust.
19847 * config/rs6000/e500mc.md: Adjust.
19848 * config/rs6000/e500mc64.md: Adjust.
19849 * config/rs6000/e5500.md: Adjust.
19850 * config/rs6000/e6500.md: Adjust.
19851 * config/rs6000/mpc.md: Adjust.
19852 * config/rs6000/power4.md: Adjust.
19853 * config/rs6000/power5.md: Adjust.
19854 * config/rs6000/power6.md: Adjust.
19855 * config/rs6000/power7.md: Adjust.
19856 * config/rs6000/power8.md: Adjust.
19857 * config/rs6000/power9.md: Adjust.
19858 * config/rs6000/rs64.md: Adjust.
19859 * config/rs6000/titan.md: Adjust.
19861 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19863 * config/i386/predicates.md (indirect_branch_operand): Rewrite
19864 ix86_indirect_branch_register logic.
19866 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19868 * config/i386/constraints.md (Bs): Update
19869 ix86_indirect_branch_register check. Don't check
19870 ix86_indirect_branch_register with GOT_memory_operand.
19872 * config/i386/predicates.md (GOT_memory_operand): Don't check
19873 ix86_indirect_branch_register here.
19874 (GOT32_symbol_operand): Likewise.
19876 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19878 * config/i386/predicates.md (constant_call_address_operand):
19879 Rewrite ix86_indirect_branch_register logic.
19880 (sibcall_insn_operand): Likewise.
19882 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19884 * config/i386/constraints.md (Bs): Replace
19885 ix86_indirect_branch_thunk_register with
19886 ix86_indirect_branch_register.
19888 * config/i386/i386.md (indirect_jump): Likewise.
19889 (tablejump): Likewise.
19890 (*sibcall_memory): Likewise.
19891 (*sibcall_value_memory): Likewise.
19892 Peepholes of indirect call and jump via memory: Likewise.
19893 * config/i386/i386.opt: Likewise.
19894 * config/i386/predicates.md (indirect_branch_operand): Likewise.
19895 (GOT_memory_operand): Likewise.
19896 (call_insn_operand): Likewise.
19897 (sibcall_insn_operand): Likewise.
19898 (GOT32_symbol_operand): Likewise.
19900 2018-01-15 Jakub Jelinek <jakub@redhat.com>
19902 PR middle-end/83837
19903 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
19904 type rather than type addr's type points to.
19905 (expand_omp_atomic_mutex): Likewise.
19906 (expand_omp_atomic): Likewise.
19908 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19911 * config/i386/i386.c (output_indirect_thunk_function): Use
19912 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
19913 for __x86_return_thunk.
19915 2018-01-15 Richard Biener <rguenther@suse.de>
19917 PR middle-end/83850
19918 * expmed.c (extract_bit_field_1): Fix typo.
19920 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19923 * config/arm/iterators.md (VF): New mode iterator.
19924 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
19925 Remove integer-related logic from pattern.
19926 (neon_vabd<mode>_3): Likewise.
19928 2018-01-15 Jakub Jelinek <jakub@redhat.com>
19930 PR middle-end/82694
19931 * common.opt (fstrict-overflow): No longer an alias.
19932 (fwrapv-pointer): New option.
19933 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
19934 also for pointer types based on flag_wrapv_pointer.
19935 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
19936 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
19937 opts->x_flag_wrapv got set.
19938 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
19939 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
19940 POINTER_TYPE_OVERFLOW_UNDEFINED.
19941 * match.pd: Likewise in address comparison pattern.
19942 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
19944 2018-01-15 Richard Biener <rguenther@suse.de>
19947 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
19948 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
19949 Reset type names to their identifier if their TYPE_DECL doesn't
19950 have linkage (and thus is used for ODR and devirt).
19951 (save_debug_info_for_decl): Remove.
19952 (save_debug_info_for_type): Likewise.
19953 (add_tree_to_fld_list): Adjust.
19954 * tree-pretty-print.c (dump_generic_node): Make dumping of
19955 type names more robust.
19957 2018-01-15 Richard Biener <rguenther@suse.de>
19959 * BASE-VER: Bump to 8.0.1.
19961 2018-01-14 Martin Sebor <msebor@redhat.com>
19964 * builtins.c (check_access): Avoid warning when the no-warning bit
19967 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
19969 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
19970 * ira-color (allocno_hard_regs_compare): Likewise.
19972 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
19975 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
19976 Use .pushsection/.popsection.
19978 2018-01-14 Martin Sebor <msebor@redhat.com>
19981 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
19983 2018-01-14 Jakub Jelinek <jakub@redhat.com>
19985 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
19986 entry from extra_headers.
19987 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
19988 extra_headers, make the list bitwise identical to the i?86-*-* one.
19990 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
19992 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
19993 -mcmodel=large with -mindirect-branch=thunk,
19994 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
19995 -mfunction-return=thunk-extern.
19996 * doc/invoke.texi: Document -mcmodel=large is incompatible with
19997 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
19998 -mfunction-return=thunk and -mfunction-return=thunk-extern.
20000 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20002 * config/i386/i386.c (print_reg): Print the name of the full
20003 integer register without '%'.
20004 (ix86_print_operand): Handle 'V'.
20005 * doc/extend.texi: Document 'V' modifier.
20007 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20009 * config/i386/constraints.md (Bs): Disallow memory operand for
20010 -mindirect-branch-register.
20012 * config/i386/predicates.md (indirect_branch_operand): Likewise.
20013 (GOT_memory_operand): Likewise.
20014 (call_insn_operand): Likewise.
20015 (sibcall_insn_operand): Likewise.
20016 (GOT32_symbol_operand): Likewise.
20017 * config/i386/i386.md (indirect_jump): Call convert_memory_address
20018 for -mindirect-branch-register.
20019 (tablejump): Likewise.
20020 (*sibcall_memory): Likewise.
20021 (*sibcall_value_memory): Likewise.
20022 Disallow peepholes of indirect call and jump via memory for
20023 -mindirect-branch-register.
20024 (*call_pop): Replace m with Bw.
20025 (*call_value_pop): Likewise.
20026 (*sibcall_pop_memory): Replace m with Bs.
20027 * config/i386/i386.opt (mindirect-branch-register): New option.
20028 * doc/invoke.texi: Document -mindirect-branch-register option.
20030 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20032 * config/i386/i386-protos.h (ix86_output_function_return): New.
20033 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
20034 set function_return_type.
20035 (indirect_thunk_name): Add ret_p to indicate thunk for function
20037 (output_indirect_thunk_function): Pass false to
20038 indirect_thunk_name.
20039 (ix86_output_indirect_branch_via_reg): Likewise.
20040 (ix86_output_indirect_branch_via_push): Likewise.
20041 (output_indirect_thunk_function): Create alias for function
20042 return thunk if regno < 0.
20043 (ix86_output_function_return): New function.
20044 (ix86_handle_fndecl_attribute): Handle function_return.
20045 (ix86_attribute_table): Add function_return.
20046 * config/i386/i386.h (machine_function): Add
20047 function_return_type.
20048 * config/i386/i386.md (simple_return_internal): Use
20049 ix86_output_function_return.
20050 (simple_return_internal_long): Likewise.
20051 * config/i386/i386.opt (mfunction-return=): New option.
20052 (indirect_branch): Mention -mfunction-return=.
20053 * doc/extend.texi: Document function_return function attribute.
20054 * doc/invoke.texi: Document -mfunction-return= option.
20056 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20058 * config/i386/i386-opts.h (indirect_branch): New.
20059 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
20060 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
20061 with local indirect jump when converting indirect call and jump.
20062 (ix86_set_indirect_branch_type): New.
20063 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
20064 (indirectlabelno): New.
20065 (indirect_thunk_needed): Likewise.
20066 (indirect_thunk_bnd_needed): Likewise.
20067 (indirect_thunks_used): Likewise.
20068 (indirect_thunks_bnd_used): Likewise.
20069 (INDIRECT_LABEL): Likewise.
20070 (indirect_thunk_name): Likewise.
20071 (output_indirect_thunk): Likewise.
20072 (output_indirect_thunk_function): Likewise.
20073 (ix86_output_indirect_branch_via_reg): Likewise.
20074 (ix86_output_indirect_branch_via_push): Likewise.
20075 (ix86_output_indirect_branch): Likewise.
20076 (ix86_output_indirect_jmp): Likewise.
20077 (ix86_code_end): Call output_indirect_thunk_function if needed.
20078 (ix86_output_call_insn): Call ix86_output_indirect_branch if
20080 (ix86_handle_fndecl_attribute): Handle indirect_branch.
20081 (ix86_attribute_table): Add indirect_branch.
20082 * config/i386/i386.h (machine_function): Add indirect_branch_type
20083 and has_local_indirect_jump.
20084 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
20086 (tablejump): Likewise.
20087 (*indirect_jump): Use ix86_output_indirect_jmp.
20088 (*tablejump_1): Likewise.
20089 (simple_return_indirect_internal): Likewise.
20090 * config/i386/i386.opt (mindirect-branch=): New option.
20091 (indirect_branch): New.
20094 (thunk-inline): Likewise.
20095 (thunk-extern): Likewise.
20096 * doc/extend.texi: Document indirect_branch function attribute.
20097 * doc/invoke.texi: Document -mindirect-branch= option.
20099 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
20102 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
20104 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
20106 * ipa-inline.c (want_inline_small_function_p): Return false if
20107 inlining has already failed with CIF_FINAL_ERROR.
20108 (update_caller_keys): Call want_inline_small_function_p before
20110 (update_callee_keys): Likewise.
20112 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
20114 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
20116 (rs6000_quadword_masked_address_p): Likewise.
20117 (quad_aligned_load_p): Likewise.
20118 (quad_aligned_store_p): Likewise.
20119 (const_load_sequence_p): Add comment to describe the outer-most loop.
20120 (mimic_memory_attributes_and_flags): New function.
20121 (rs6000_gen_stvx): Likewise.
20122 (replace_swapped_aligned_store): Likewise.
20123 (rs6000_gen_lvx): Likewise.
20124 (replace_swapped_aligned_load): Likewise.
20125 (replace_swapped_load_constant): Capitalize argument name in
20126 comment describing this function.
20127 (rs6000_analyze_swaps): Add a third pass to search for vector loads
20128 and stores that access quad-word aligned addresses and replace
20129 with stvx or lvx instructions when appropriate.
20130 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
20131 New function prototype.
20132 (rs6000_quadword_masked_address_p): Likewise.
20133 (rs6000_gen_lvx): Likewise.
20134 (rs6000_gen_stvx): Likewise.
20135 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
20136 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
20137 when memory address is aligned.
20138 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
20139 this split to select lvx instruction when memory address is aligned.
20140 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
20141 instruction when memory address is aligned.
20142 (*vsx_le_perm_load_v16qi): Likewise.
20143 (four unnamed splitters): Modify to select the stvx instruction
20144 when memory is aligned.
20146 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
20148 * predict.c (determine_unlikely_bbs): Handle correctly BBs
20149 which appears in the queue multiple times.
20151 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20152 Alan Hayward <alan.hayward@arm.com>
20153 David Sherwood <david.sherwood@arm.com>
20155 * tree-vectorizer.h (vec_lower_bound): New structure.
20156 (_loop_vec_info): Add check_nonzero and lower_bounds.
20157 (LOOP_VINFO_CHECK_NONZERO): New macro.
20158 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
20159 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
20160 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
20161 fields. Make seg_len the distance travelled, not including the
20163 (dr_direction_indicator): Declare.
20164 (dr_zero_step_indicator): Likewise.
20165 (dr_known_forward_stride_p): Likewise.
20166 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
20168 (runtime_alias_check_p): Allow runtime alias checks with
20170 (operator ==): Compare access_size and align.
20171 (prune_runtime_alias_test_list): Rework for new distinction between
20172 the access_size and seg_len.
20173 (create_intersect_range_checks_index): Likewise. Cope with polynomial
20175 (get_segment_min_max): New function.
20176 (create_intersect_range_checks): Use it.
20177 (dr_step_indicator): New function.
20178 (dr_direction_indicator): Likewise.
20179 (dr_zero_step_indicator): Likewise.
20180 (dr_known_forward_stride_p): Likewise.
20181 * tree-loop-distribution.c (data_ref_segment_size): Return
20182 DR_STEP * (niters - 1).
20183 (compute_alias_check_pairs): Update call to the dr_with_seg_len
20185 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
20186 (vect_preserves_scalar_order_p): New function, split out from...
20187 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
20188 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
20189 (vect_vfa_access_size): New function.
20190 (vect_vfa_align): Likewise.
20191 (vect_compile_time_alias): Take access_size_a and access_b arguments.
20192 (dump_lower_bound): New function.
20193 (vect_check_lower_bound): Likewise.
20194 (vect_small_gap_p): Likewise.
20195 (vectorizable_with_step_bound_p): Likewise.
20196 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
20197 depencies if the vectorization factor is 1. Convert the checks
20198 for nonzero steps into checks on the bounds of DR_STEP. Try using
20199 a bunds check for variable steps if the minimum required step is
20200 relatively small. Update calls to the dr_with_seg_len
20201 constructor and to vect_compile_time_alias.
20202 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
20204 (vect_loop_versioning): Call it.
20205 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
20207 (vect_estimate_min_profitable_iters): Account for any bounds checks.
20209 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20210 Alan Hayward <alan.hayward@arm.com>
20211 David Sherwood <david.sherwood@arm.com>
20213 * doc/sourcebuild.texi (vect_scatter_store): Document.
20214 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
20216 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
20218 * genopinit.c (main): Add supports_vec_scatter_store and
20219 supports_vec_scatter_store_cached to target_optabs.
20220 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
20221 IFN_MASK_SCATTER_STORE.
20222 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
20224 * internal-fn.h (internal_store_fn_p): Declare.
20225 (internal_fn_stored_value_index): Likewise.
20226 * internal-fn.c (scatter_store_direct): New macro.
20227 (expand_scatter_store_optab_fn): New function.
20228 (direct_scatter_store_optab_supported_p): New macro.
20229 (internal_store_fn_p): New function.
20230 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
20231 IFN_MASK_SCATTER_STORE.
20232 (internal_fn_mask_index): Likewise.
20233 (internal_fn_stored_value_index): New function.
20234 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
20235 for scatter stores.
20236 * optabs-query.h (supports_vec_scatter_store_p): Declare.
20237 * optabs-query.c (supports_vec_scatter_store_p): New function.
20238 * tree-vectorizer.h (vect_get_store_rhs): Declare.
20239 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
20240 true for scatter stores.
20241 (vect_gather_scatter_fn_p): Handle scatter stores too.
20242 (vect_check_gather_scatter): Consider using scatter stores if
20243 supports_vec_scatter_store_p.
20244 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
20245 scatter stores too.
20246 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
20247 internal_fn_stored_value_index.
20248 (check_load_store_masking): Handle scatter stores too.
20249 (vect_get_store_rhs): Make public.
20250 (vectorizable_call): Use internal_store_fn_p.
20251 (vectorizable_store): Handle scatter store internal functions.
20252 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
20253 when deciding whether the end of the group has been reached.
20254 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
20255 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
20256 (mask_scatter_store<mode>): New insns.
20258 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20259 Alan Hayward <alan.hayward@arm.com>
20260 David Sherwood <david.sherwood@arm.com>
20262 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
20263 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
20264 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
20266 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
20267 Use vect_truncate_gather_scatter_offset if we can't treat the
20268 operation as a normal gather load or scatter store.
20269 (get_group_load_store_type): Take the gather_scatter_info
20270 as argument. Try using a gather load or scatter store for
20271 single-element groups.
20272 (get_load_store_type): Update calls to get_group_load_store_type
20273 and vect_use_strided_gather_scatters_p.
20275 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20276 Alan Hayward <alan.hayward@arm.com>
20277 David Sherwood <david.sherwood@arm.com>
20279 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
20280 optional tree argument.
20281 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
20283 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
20284 but continue to use the current value as a fallback.
20285 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
20286 to compare the updates.
20287 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
20288 (get_load_store_type): Use it when handling a strided access.
20289 (vect_get_strided_load_store_ops): New function.
20290 (vect_get_data_ptr_increment): Likewise.
20291 (vectorizable_load): Handle strided gather loads. Always pass
20292 a step to vect_create_data_ref_ptr and bump_vector_ptr.
20294 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20295 Alan Hayward <alan.hayward@arm.com>
20296 David Sherwood <david.sherwood@arm.com>
20298 * doc/md.texi (gather_load@var{m}): Document.
20299 (mask_gather_load@var{m}): Likewise.
20300 * genopinit.c (main): Add supports_vec_gather_load and
20301 supports_vec_gather_load_cached to target_optabs.
20302 * optabs-tree.c (init_tree_optimization_optabs): Use
20303 ggc_cleared_alloc to allocate target_optabs.
20304 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
20305 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
20307 * internal-fn.h (internal_load_fn_p): Declare.
20308 (internal_gather_scatter_fn_p): Likewise.
20309 (internal_fn_mask_index): Likewise.
20310 (internal_gather_scatter_fn_supported_p): Likewise.
20311 * internal-fn.c (gather_load_direct): New macro.
20312 (expand_gather_load_optab_fn): New function.
20313 (direct_gather_load_optab_supported_p): New macro.
20314 (direct_internal_fn_optab): New function.
20315 (internal_load_fn_p): Likewise.
20316 (internal_gather_scatter_fn_p): Likewise.
20317 (internal_fn_mask_index): Likewise.
20318 (internal_gather_scatter_fn_supported_p): Likewise.
20319 * optabs-query.c (supports_at_least_one_mode_p): New function.
20320 (supports_vec_gather_load_p): Likewise.
20321 * optabs-query.h (supports_vec_gather_load_p): Declare.
20322 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
20323 and memory_type field.
20324 (NUM_PATTERNS): Bump to 15.
20325 * tree-vect-data-refs.c: Include internal-fn.h.
20326 (vect_gather_scatter_fn_p): New function.
20327 (vect_describe_gather_scatter_call): Likewise.
20328 (vect_check_gather_scatter): Try using internal functions for
20329 gather loads. Recognize existing calls to a gather load function.
20330 (vect_analyze_data_refs): Consider using gather loads if
20331 supports_vec_gather_load_p.
20332 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
20333 (vect_get_gather_scatter_offset_type): Likewise.
20334 (vect_convert_mask_for_vectype): Likewise.
20335 (vect_add_conversion_to_patterm): Likewise.
20336 (vect_try_gather_scatter_pattern): Likewise.
20337 (vect_recog_gather_scatter_pattern): New pattern recognizer.
20338 (vect_vect_recog_func_ptrs): Add it.
20339 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
20340 internal_fn_mask_index and internal_gather_scatter_fn_p.
20341 (check_load_store_masking): Take the gather_scatter_info as an
20342 argument and handle gather loads.
20343 (vect_get_gather_scatter_ops): New function.
20344 (vectorizable_call): Check internal_load_fn_p.
20345 (vectorizable_load): Likewise. Handle gather load internal
20347 (vectorizable_store): Update call to check_load_store_masking.
20348 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
20349 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
20350 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
20351 (aarch64_gather_scale_operand_d): New predicates.
20352 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
20353 (mask_gather_load<mode>): New insns.
20355 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20356 Alan Hayward <alan.hayward@arm.com>
20357 David Sherwood <david.sherwood@arm.com>
20359 * optabs.def (fold_left_plus_optab): New optab.
20360 * doc/md.texi (fold_left_plus_@var{m}): Document.
20361 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
20362 * internal-fn.c (fold_left_direct): Define.
20363 (expand_fold_left_optab_fn): Likewise.
20364 (direct_fold_left_optab_supported_p): Likewise.
20365 * fold-const-call.c (fold_const_fold_left): New function.
20366 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
20367 * tree-parloops.c (valid_reduction_p): New function.
20368 (gather_scalar_reductions): Use it.
20369 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
20370 (vect_finish_replace_stmt): Declare.
20371 * tree-vect-loop.c (fold_left_reduction_fn): New function.
20372 (needs_fold_left_reduction_p): New function, split out from...
20373 (vect_is_simple_reduction): ...here. Accept reductions that
20374 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
20375 (vect_force_simple_reduction): Also store the reduction type in
20376 the assignment's STMT_VINFO_REDUC_TYPE.
20377 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
20378 (merge_with_identity): New function.
20379 (vect_expand_fold_left): Likewise.
20380 (vectorize_fold_left_reduction): Likewise.
20381 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
20382 scalar phi in place for it. Check for target support and reject
20383 cases that would reassociate the operation. Defer the transform
20384 phase to vectorize_fold_left_reduction.
20385 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
20386 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
20387 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
20389 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20391 * tree-if-conv.c (predicate_mem_writes): Remove redundant
20392 call to ifc_temp_var.
20394 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20395 Alan Hayward <alan.hayward@arm.com>
20396 David Sherwood <david.sherwood@arm.com>
20398 * target.def (legitimize_address_displacement): Take the original
20399 offset as a poly_int.
20400 * targhooks.h (default_legitimize_address_displacement): Update
20402 * targhooks.c (default_legitimize_address_displacement): Likewise.
20403 * doc/tm.texi: Regenerate.
20404 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
20405 as an argument, moving assert of ad->disp == ad->disp_term to...
20406 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
20407 Try calling targetm.legitimize_address_displacement before expanding
20408 the address rather than afterwards, and adjust for the new interface.
20409 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
20410 Match the new hook interface. Handle SVE addresses.
20411 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
20412 new hook interface.
20414 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20416 * Makefile.in (OBJS): Add early-remat.o.
20417 * target.def (select_early_remat_modes): New hook.
20418 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
20419 * doc/tm.texi: Regenerate.
20420 * targhooks.h (default_select_early_remat_modes): Declare.
20421 * targhooks.c (default_select_early_remat_modes): New function.
20422 * timevar.def (TV_EARLY_REMAT): New timevar.
20423 * passes.def (pass_early_remat): New pass.
20424 * tree-pass.h (make_pass_early_remat): Declare.
20425 * early-remat.c: New file.
20426 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
20428 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
20430 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20431 Alan Hayward <alan.hayward@arm.com>
20432 David Sherwood <david.sherwood@arm.com>
20434 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
20435 vfm1 with a bound_epilog parameter.
20436 (vect_do_peeling): Update calls accordingly, and move the prologue
20437 call earlier in the function. Treat the base bound_epilog as 0 for
20438 fully-masked loops and retain vf - 1 for other loops. Add 1 to
20439 this base when peeling for gaps.
20440 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
20441 with fully-masked loops.
20442 (vect_estimate_min_profitable_iters): Handle the single peeled
20443 iteration in that case.
20445 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20446 Alan Hayward <alan.hayward@arm.com>
20447 David Sherwood <david.sherwood@arm.com>
20449 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
20450 single-element interleaving even if the size is not a power of 2.
20451 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
20452 accesses for single-element interleaving if the group size is
20455 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20456 Alan Hayward <alan.hayward@arm.com>
20457 David Sherwood <david.sherwood@arm.com>
20459 * doc/md.texi (fold_extract_last_@var{m}): Document.
20460 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
20461 * optabs.def (fold_extract_last_optab): New optab.
20462 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
20463 * internal-fn.c (fold_extract_direct): New macro.
20464 (expand_fold_extract_optab_fn): Likewise.
20465 (direct_fold_extract_optab_supported_p): Likewise.
20466 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
20467 * tree-vect-loop.c (vect_model_reduction_cost): Handle
20468 EXTRACT_LAST_REDUCTION.
20469 (get_initial_def_for_reduction): Do not create an initial vector
20470 for EXTRACT_LAST_REDUCTION reductions.
20471 (vectorizable_reduction): Leave the scalar phi in place for
20472 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
20473 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
20474 epilogue code for EXTRACT_LAST_REDUCTION and defer the
20475 transform phase to vectorizable_condition.
20476 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
20478 (vect_finish_stmt_generation): ...here.
20479 (vect_finish_replace_stmt): New function.
20480 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
20481 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
20483 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
20485 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20486 Alan Hayward <alan.hayward@arm.com>
20487 David Sherwood <david.sherwood@arm.com>
20489 * doc/md.texi (extract_last_@var{m}): Document.
20490 * optabs.def (extract_last_optab): New optab.
20491 * internal-fn.def (EXTRACT_LAST): New internal function.
20492 * internal-fn.c (cond_unary_direct): New macro.
20493 (expand_cond_unary_optab_fn): Likewise.
20494 (direct_cond_unary_optab_supported_p): Likewise.
20495 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
20496 loops using EXTRACT_LAST.
20497 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
20498 (extract_last_<mode>): ...this optab.
20499 (vec_extract<mode><Vel>): Update accordingly.
20501 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20502 Alan Hayward <alan.hayward@arm.com>
20503 David Sherwood <david.sherwood@arm.com>
20505 * target.def (empty_mask_is_expensive): New hook.
20506 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
20507 * doc/tm.texi: Regenerate.
20508 * targhooks.h (default_empty_mask_is_expensive): Declare.
20509 * targhooks.c (default_empty_mask_is_expensive): New function.
20510 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
20511 if the target says that empty masks are expensive.
20512 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
20514 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
20516 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20517 Alan Hayward <alan.hayward@arm.com>
20518 David Sherwood <david.sherwood@arm.com>
20520 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
20521 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
20522 (vect_use_loop_mask_for_alignment_p): New function.
20523 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
20524 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
20525 niters_skip argument. Make sure that the first niters_skip elements
20526 of the first iteration are inactive.
20527 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
20528 Update call to vect_set_loop_masks_directly.
20529 (get_misalign_in_elems): New function, split out from...
20530 (vect_gen_prolog_loop_niters): ...here.
20531 (vect_update_init_of_dr): Take a code argument that specifies whether
20532 the adjustment should be added or subtracted.
20533 (vect_update_init_of_drs): Likewise.
20534 (vect_prepare_for_masked_peels): New function.
20535 (vect_do_peeling): Skip prologue peeling if we're using a mask
20536 instead. Update call to vect_update_inits_of_drs.
20537 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
20539 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
20540 alignment. Do not include the number of peeled iterations in
20541 the minimum threshold in that case.
20542 (vectorizable_induction): Adjust the start value down by
20543 LOOP_VINFO_MASK_SKIP_NITERS iterations.
20544 (vect_transform_loop): Call vect_prepare_for_masked_peels.
20545 Take the number of skipped iterations into account when calculating
20547 * tree-vect-stmts.c (vect_gen_while_not): New function.
20549 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20550 Alan Hayward <alan.hayward@arm.com>
20551 David Sherwood <david.sherwood@arm.com>
20553 * doc/sourcebuild.texi (vect_fully_masked): Document.
20554 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
20555 default value to 0.
20556 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
20558 (vect_analyze_loop_2): ...here. Don't check the vectorization
20559 factor against the number of loop iterations if the loop is
20562 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20563 Alan Hayward <alan.hayward@arm.com>
20564 David Sherwood <david.sherwood@arm.com>
20566 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
20567 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
20568 (dump_groups): Update accordingly.
20569 (iv_use::mem_type): New member variable.
20570 (address_p): New function.
20571 (record_use): Add a mem_type argument and initialize the new
20573 (record_group_use): Add a mem_type argument. Use address_p.
20574 Remove obsolete null checks of base_object. Update call to record_use.
20575 (find_interesting_uses_op): Update call to record_group_use.
20576 (find_interesting_uses_cond): Likewise.
20577 (find_interesting_uses_address): Likewise.
20578 (get_mem_type_for_internal_fn): New function.
20579 (find_address_like_use): Likewise.
20580 (find_interesting_uses_stmt): Try find_address_like_use before
20581 calling find_interesting_uses_op.
20582 (addr_offset_valid_p): Use the iv mem_type field as the type
20583 of the addressed memory.
20584 (add_autoinc_candidates): Likewise.
20585 (get_address_cost): Likewise.
20586 (split_small_address_groups_p): Use address_p.
20587 (split_address_groups): Likewise.
20588 (add_iv_candidate_for_use): Likewise.
20589 (autoinc_possible_for_pair): Likewise.
20590 (rewrite_groups): Likewise.
20591 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
20592 (determine_group_iv_cost): Update after split of USE_ADDRESS.
20593 (get_alias_ptr_type_for_ptr_address): New function.
20594 (rewrite_use_address): Rewrite address uses in calls that were
20595 identified by find_address_like_use.
20597 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20598 Alan Hayward <alan.hayward@arm.com>
20599 David Sherwood <david.sherwood@arm.com>
20601 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
20603 * gimple-expr.h (is_gimple_addressable: Likewise.
20604 * gimple-expr.c (is_gimple_address): Likewise.
20605 * internal-fn.c (expand_call_mem_ref): New function.
20606 (expand_mask_load_optab_fn): Use it.
20607 (expand_mask_store_optab_fn): Likewise.
20609 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20610 Alan Hayward <alan.hayward@arm.com>
20611 David Sherwood <david.sherwood@arm.com>
20613 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
20614 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
20615 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
20616 (cond_umax@var{mode}): Document.
20617 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
20618 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
20619 (cond_umin_optab, cond_umax_optab): New optabs.
20620 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
20621 (COND_IOR, COND_XOR): New internal functions.
20622 * internal-fn.h (get_conditional_internal_fn): Declare.
20623 * internal-fn.c (cond_binary_direct): New macro.
20624 (expand_cond_binary_optab_fn): Likewise.
20625 (direct_cond_binary_optab_supported_p): Likewise.
20626 (get_conditional_internal_fn): New function.
20627 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
20628 Cope with reduction statements that are vectorized as calls rather
20630 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
20631 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
20632 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
20633 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
20634 (UNSPEC_COND_EOR): New unspecs.
20635 (optab): Add mappings for them.
20636 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
20637 (sve_int_op, sve_fp_op): New int attributes.
20639 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20640 Alan Hayward <alan.hayward@arm.com>
20641 David Sherwood <david.sherwood@arm.com>
20643 * optabs.def (while_ult_optab): New optab.
20644 * doc/md.texi (while_ult@var{m}@var{n}): Document.
20645 * internal-fn.def (WHILE_ULT): New internal function.
20646 * internal-fn.h (direct_internal_fn_supported_p): New override
20647 that takes two types as argument.
20648 * internal-fn.c (while_direct): New macro.
20649 (expand_while_optab_fn): New function.
20650 (convert_optab_supported_p): Likewise.
20651 (direct_while_optab_supported_p): New macro.
20652 * wide-int.h (wi::udiv_ceil): New function.
20653 * tree-vectorizer.h (rgroup_masks): New structure.
20654 (vec_loop_masks): New typedef.
20655 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
20656 and fully_masked_p.
20657 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
20658 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
20659 (vect_max_vf): New function.
20660 (slpeel_make_loop_iterate_ntimes): Delete.
20661 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
20662 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
20663 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
20664 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
20665 internal-fn.h, stor-layout.h and optabs-query.h.
20666 (vect_set_loop_mask): New function.
20667 (add_preheader_seq): Likewise.
20668 (add_header_seq): Likewise.
20669 (interleave_supported_p): Likewise.
20670 (vect_maybe_permute_loop_masks): Likewise.
20671 (vect_set_loop_masks_directly): Likewise.
20672 (vect_set_loop_condition_masked): Likewise.
20673 (vect_set_loop_condition_unmasked): New function, split out from
20674 slpeel_make_loop_iterate_ntimes.
20675 (slpeel_make_loop_iterate_ntimes): Rename to..
20676 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
20677 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
20678 (vect_do_peeling): Update call accordingly.
20679 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
20681 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
20682 mask_compare_type, can_fully_mask_p and fully_masked_p.
20683 (release_vec_loop_masks): New function.
20684 (_loop_vec_info): Use it to free the loop masks.
20685 (can_produce_all_loop_masks_p): New function.
20686 (vect_get_max_nscalars_per_iter): Likewise.
20687 (vect_verify_full_masking): Likewise.
20688 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
20689 retries, and free the mask rgroups before retrying. Check loop-wide
20690 reasons for disallowing fully-masked loops. Make the final decision
20691 about whether use a fully-masked loop or not.
20692 (vect_estimate_min_profitable_iters): Do not assume that peeling
20693 for the number of iterations will be needed for fully-masked loops.
20694 (vectorizable_reduction): Disable fully-masked loops.
20695 (vectorizable_live_operation): Likewise.
20696 (vect_halve_mask_nunits): New function.
20697 (vect_double_mask_nunits): Likewise.
20698 (vect_record_loop_mask): Likewise.
20699 (vect_get_loop_mask): Likewise.
20700 (vect_transform_loop): Handle the case in which the final loop
20701 iteration might handle a partial vector. Call vect_set_loop_condition
20702 instead of slpeel_make_loop_iterate_ntimes.
20703 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
20704 (check_load_store_masking): New function.
20705 (prepare_load_store_mask): Likewise.
20706 (vectorizable_store): Handle fully-masked loops.
20707 (vectorizable_load): Likewise.
20708 (supportable_widening_operation): Use vect_halve_mask_nunits for
20710 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
20711 (vect_gen_while): New function.
20712 * config/aarch64/aarch64.md (umax<mode>3): New expander.
20713 (aarch64_uqdec<mode>): New insn.
20715 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20716 Alan Hayward <alan.hayward@arm.com>
20717 David Sherwood <david.sherwood@arm.com>
20719 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
20720 (reduc_xor_scal_optab): New optabs.
20721 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
20722 (reduc_xor_scal_@var{m}): Document.
20723 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
20724 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
20725 internal functions.
20726 * fold-const-call.c (fold_const_call): Handle them.
20727 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
20728 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
20729 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
20730 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
20731 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
20732 (UNSPEC_XORV): New unspecs.
20733 (optab): Add entries for them.
20734 (BITWISEV): New int iterator.
20735 (bit_reduc_op): New int attributes.
20737 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20738 Alan Hayward <alan.hayward@arm.com>
20739 David Sherwood <david.sherwood@arm.com>
20741 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
20742 * internal-fn.def (VEC_SHL_INSERT): New internal function.
20743 * optabs.def (vec_shl_insert_optab): New optab.
20744 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
20745 (duplicate_and_interleave): Likewise.
20746 * tree-vect-loop.c: Include internal-fn.h.
20747 (neutral_op_for_slp_reduction): New function, split out from
20748 get_initial_defs_for_reduction.
20749 (get_initial_def_for_reduction): Handle option 2 for variable-length
20750 vectors by loading the neutral value into a vector and then shifting
20751 the initial value into element 0.
20752 (get_initial_defs_for_reduction): Replace the code argument with
20753 the neutral value calculated by neutral_op_for_slp_reduction.
20754 Use gimple_build_vector for constant-length vectors.
20755 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
20756 but the first group_size elements have a neutral value.
20757 Use duplicate_and_interleave otherwise.
20758 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
20759 Update call to get_initial_defs_for_reduction. Handle SLP
20760 reductions for variable-length vectors by creating one vector
20761 result for each scalar result, with the elements associated
20762 with other scalar results stubbed out with the neutral value.
20763 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
20764 Require IFN_VEC_SHL_INSERT for double reductions on
20765 variable-length vectors, or SLP reductions that have
20766 a neutral value. Require can_duplicate_and_interleave_p
20767 support for variable-length unchained SLP reductions if there
20768 is no neutral value, such as for MIN/MAX reductions. Also require
20769 the number of vector elements to be a multiple of the number of
20770 SLP statements when doing variable-length unchained SLP reductions.
20771 Update call to vect_create_epilog_for_reduction.
20772 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
20773 and remove initial values.
20774 (duplicate_and_interleave): Make public.
20775 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
20776 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
20778 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20779 Alan Hayward <alan.hayward@arm.com>
20780 David Sherwood <david.sherwood@arm.com>
20782 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
20783 (can_duplicate_and_interleave_p): New function.
20784 (vect_get_and_check_slp_defs): Take the vector of statements
20785 rather than just the current one. Remove excess parentheses.
20786 Restriction rejectinon of vect_constant_def and vect_external_def
20787 for variable-length vectors to boolean types, or types for which
20788 can_duplicate_and_interleave_p is false.
20789 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
20790 (duplicate_and_interleave): New function.
20791 (vect_get_constant_vectors): Use gimple_build_vector for
20792 constant-length vectors and suitable variable-length constant
20793 vectors. Use duplicate_and_interleave for other variable-length
20794 vectors. Don't defer the update when inserting new statements.
20796 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20797 Alan Hayward <alan.hayward@arm.com>
20798 David Sherwood <david.sherwood@arm.com>
20800 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
20801 min_profitable_iters doesn't go negative.
20803 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20804 Alan Hayward <alan.hayward@arm.com>
20805 David Sherwood <david.sherwood@arm.com>
20807 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
20808 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
20809 * optabs.def (vec_mask_load_lanes_optab): New optab.
20810 (vec_mask_store_lanes_optab): Likewise.
20811 * internal-fn.def (MASK_LOAD_LANES): New internal function.
20812 (MASK_STORE_LANES): Likewise.
20813 * internal-fn.c (mask_load_lanes_direct): New macro.
20814 (mask_store_lanes_direct): Likewise.
20815 (expand_mask_load_optab_fn): Handle masked operations.
20816 (expand_mask_load_lanes_optab_fn): New macro.
20817 (expand_mask_store_optab_fn): Handle masked operations.
20818 (expand_mask_store_lanes_optab_fn): New macro.
20819 (direct_mask_load_lanes_optab_supported_p): Likewise.
20820 (direct_mask_store_lanes_optab_supported_p): Likewise.
20821 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
20823 (vect_load_lanes_supported): Likewise.
20824 * tree-vect-data-refs.c (strip_conversion): New function.
20825 (can_group_stmts_p): Likewise.
20826 (vect_analyze_data_ref_accesses): Use it instead of checking
20827 for a pair of assignments.
20828 (vect_store_lanes_supported): Take a masked_p parameter.
20829 (vect_load_lanes_supported): Likewise.
20830 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
20831 vect_store_lanes_supported and vect_load_lanes_supported.
20832 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
20833 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
20834 parameter. Don't allow gaps for masked accesses.
20835 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
20836 and vect_load_lanes_supported.
20837 (get_load_store_type): Take a masked_p parameter and update
20838 call to get_group_load_store_type.
20839 (vectorizable_store): Update call to get_load_store_type.
20840 Handle IFN_MASK_STORE_LANES.
20841 (vectorizable_load): Update call to get_load_store_type.
20842 Handle IFN_MASK_LOAD_LANES.
20844 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20845 Alan Hayward <alan.hayward@arm.com>
20846 David Sherwood <david.sherwood@arm.com>
20848 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
20850 * config/aarch64/aarch64-protos.h
20851 (aarch64_sve_struct_memory_operand_p): Declare.
20852 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
20853 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
20854 (VPRED, vpred): Handle SVE structure modes.
20855 * config/aarch64/constraints.md (Utx): New constraint.
20856 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
20857 (aarch64_sve_struct_nonimmediate_operand): New predicates.
20858 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
20859 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
20860 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
20861 structure modes. Split into pieces after RA.
20862 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
20863 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
20865 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
20866 SVE structure modes.
20867 (aarch64_classify_address): Likewise.
20868 (sizetochar): Move earlier in file.
20869 (aarch64_print_operand): Handle SVE register lists.
20870 (aarch64_array_mode): New function.
20871 (aarch64_sve_struct_memory_operand_p): Likewise.
20872 (TARGET_ARRAY_MODE): Redefine.
20874 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20875 Alan Hayward <alan.hayward@arm.com>
20876 David Sherwood <david.sherwood@arm.com>
20878 * target.def (array_mode): New target hook.
20879 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
20880 * doc/tm.texi: Regenerate.
20881 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
20882 * hooks.c (hook_optmode_mode_uhwi_none): New function.
20883 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
20884 targetm.array_mode.
20885 * stor-layout.c (mode_for_array): Likewise. Support polynomial
20888 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20889 Alan Hayward <alan.hayward@arm.com>
20890 David Sherwood <david.sherwood@arm.com>
20892 * fold-const.c (fold_binary_loc): Check the argument types
20893 rather than the result type when testing for a vector operation.
20895 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20897 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
20898 * doc/tm.texi: Regenerate.
20900 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20901 Alan Hayward <alan.hayward@arm.com>
20902 David Sherwood <david.sherwood@arm.com>
20904 * doc/invoke.texi (-msve-vector-bits=): Document new option.
20905 (sve): Document new AArch64 extension.
20906 * doc/md.texi (w): Extend the description of the AArch64
20907 constraint to include SVE vectors.
20908 (Upl, Upa): Document new AArch64 predicate constraints.
20909 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
20911 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
20912 (msve-vector-bits=): New option.
20913 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
20914 SVE when these are disabled.
20915 (sve): New extension.
20916 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
20917 modes. Adjust their number of units based on aarch64_sve_vg.
20918 (MAX_BITSIZE_MODE_ANY_MODE): Define.
20919 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
20920 aarch64_addr_query_type.
20921 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
20922 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
20923 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
20924 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
20925 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
20926 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
20927 (aarch64_simd_imm_zero_p): Delete.
20928 (aarch64_check_zero_based_sve_index_immediate): Declare.
20929 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
20930 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
20931 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
20932 (aarch64_sve_float_mul_immediate_p): Likewise.
20933 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
20934 rather than an rtx.
20935 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
20936 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
20937 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
20938 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
20939 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
20940 (aarch64_regmode_natural_size): Likewise.
20941 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
20942 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
20944 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
20945 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
20946 for VG and the SVE predicate registers.
20947 (V_ALIASES): Add a "z"-prefixed alias.
20948 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
20949 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
20950 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
20951 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
20952 (REG_CLASS_NAMES): Add entries for them.
20953 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
20954 and the predicate registers.
20955 (aarch64_sve_vg): Declare.
20956 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
20957 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
20958 (REGMODE_NATURAL_SIZE): Define.
20959 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
20961 * config/aarch64/aarch64.c: Include cfgrtl.h.
20962 (simd_immediate_info): Add a constructor for series vectors,
20963 and an associated step field.
20964 (aarch64_sve_vg): New variable.
20965 (aarch64_dbx_register_number): Handle VG and the predicate registers.
20966 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
20967 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
20968 (VEC_ANY_DATA, VEC_STRUCT): New constants.
20969 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
20970 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
20971 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
20972 (aarch64_get_mask_mode): New functions.
20973 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
20974 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
20975 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
20976 predicate modes and predicate registers. Explicitly restrict
20977 GPRs to modes of 16 bytes or smaller. Only allow FP registers
20978 to store a vector mode if it is recognized by
20979 aarch64_classify_vector_mode.
20980 (aarch64_regmode_natural_size): New function.
20981 (aarch64_hard_regno_caller_save_mode): Return the original mode
20983 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
20984 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
20985 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
20986 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
20988 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
20989 does not overlap dest if the function is frame-related. Handle
20991 (aarch64_split_add_offset): New function.
20992 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
20993 them aarch64_add_offset.
20994 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
20995 and update call to aarch64_sub_sp.
20996 (aarch64_add_cfa_expression): New function.
20997 (aarch64_expand_prologue): Pass extra temporary registers to the
20998 functions above. Handle the case in which we need to emit new
20999 DW_CFA_expressions for registers that were originally saved
21000 relative to the stack pointer, but now have to be expressed
21001 relative to the frame pointer.
21002 (aarch64_output_mi_thunk): Pass extra temporary registers to the
21004 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
21005 IP0 and IP1 values for SVE frames.
21006 (aarch64_expand_vec_series): New function.
21007 (aarch64_expand_sve_widened_duplicate): Likewise.
21008 (aarch64_expand_sve_const_vector): Likewise.
21009 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
21010 Handle SVE constants. Use emit_move_insn to move a force_const_mem
21011 into the register, rather than emitting a SET directly.
21012 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
21013 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
21014 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
21015 (offset_9bit_signed_scaled_p): New functions.
21016 (aarch64_replicate_bitmask_imm): New function.
21017 (aarch64_bitmask_imm): Use it.
21018 (aarch64_cannot_force_const_mem): Reject expressions involving
21019 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
21020 (aarch64_classify_index): Handle SVE indices, by requiring
21021 a plain register index with a scale that matches the element size.
21022 (aarch64_classify_address): Handle SVE addresses. Assert that
21023 the mode of the address is VOIDmode or an integer mode.
21024 Update call to aarch64_classify_symbol.
21025 (aarch64_classify_symbolic_expression): Update call to
21026 aarch64_classify_symbol.
21027 (aarch64_const_vec_all_in_range_p): New function.
21028 (aarch64_print_vector_float_operand): Likewise.
21029 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
21030 "vN" for FP registers with SVE modes. Handle (const ...) vectors
21031 and the FP immediates 1.0 and 0.5.
21032 (aarch64_print_address_internal): Handle SVE addresses.
21033 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
21034 (aarch64_regno_regclass): Handle predicate registers.
21035 (aarch64_secondary_reload): Handle big-endian reloads of SVE
21037 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
21038 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
21039 (aarch64_convert_sve_vector_bits): New function.
21040 (aarch64_override_options): Use it to handle -msve-vector-bits=.
21041 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
21042 rather than an rtx.
21043 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
21044 Handle SVE vector and predicate modes. Accept VL-based constants
21045 that need only one temporary register, and VL offsets that require
21046 no temporary registers.
21047 (aarch64_conditional_register_usage): Mark the predicate registers
21048 as fixed if SVE isn't available.
21049 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
21050 Return true for SVE vector and predicate modes.
21051 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
21052 rather than an unsigned int. Handle SVE modes.
21053 (aarch64_preferred_simd_mode): Update call accordingly. Handle
21055 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
21057 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
21058 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
21059 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
21060 (aarch64_sve_float_mul_immediate_p): New functions.
21061 (aarch64_sve_valid_immediate): New function.
21062 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
21063 Explicitly reject structure modes. Check for INDEX constants.
21064 Handle PTRUE and PFALSE constants.
21065 (aarch64_check_zero_based_sve_index_immediate): New function.
21066 (aarch64_simd_imm_zero_p): Delete.
21067 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
21068 vector modes. Accept constants in the range of CNT[BHWD].
21069 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
21070 ask for an Advanced SIMD mode.
21071 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
21072 (aarch64_simd_vector_alignment): Handle SVE predicates.
21073 (aarch64_vectorize_preferred_vector_alignment): New function.
21074 (aarch64_simd_vector_alignment_reachable): Use it instead of
21076 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
21077 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
21079 (MAX_VECT_LEN): Delete.
21080 (expand_vec_perm_d): Add a vec_flags field.
21081 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
21082 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
21083 (aarch64_evpc_ext): Don't apply a big-endian lane correction
21085 (aarch64_evpc_rev): Rename to...
21086 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
21087 (aarch64_evpc_rev_global): New function.
21088 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
21089 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
21091 (aarch64_evpc_sve_tbl): New function.
21092 (aarch64_expand_vec_perm_const_1): Update after rename of
21093 aarch64_evpc_rev. Handle SVE permutes too, trying
21094 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
21095 than aarch64_evpc_tbl.
21096 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
21097 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
21098 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
21099 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
21100 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
21101 (aarch64_expand_sve_vcond): New functions.
21102 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
21103 of aarch64_vector_mode_p.
21104 (aarch64_dwarf_poly_indeterminate_value): New function.
21105 (aarch64_compute_pressure_classes): Likewise.
21106 (aarch64_can_change_mode_class): Likewise.
21107 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
21108 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
21109 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
21110 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
21111 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
21112 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
21113 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
21114 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
21116 (Dn, Dl, Dr): Accept const as well as const_vector.
21117 (Dz): Likewise. Compare against CONST0_RTX.
21118 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
21119 of "vector" where appropriate.
21120 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
21121 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
21122 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
21123 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
21124 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
21125 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
21126 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
21127 (v_int_equiv): Extend to SVE modes.
21128 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
21130 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
21131 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
21132 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
21133 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
21134 (SVE_COND_FP_CMP): New int iterators.
21135 (perm_hilo): Handle the new unpack unspecs.
21136 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
21138 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
21139 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
21140 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
21141 (aarch64_equality_operator, aarch64_constant_vector_operand)
21142 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
21143 (aarch64_sve_nonimmediate_operand): Likewise.
21144 (aarch64_sve_general_operand): Likewise.
21145 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
21146 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
21147 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
21148 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
21149 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
21150 (aarch64_sve_float_arith_immediate): Likewise.
21151 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
21152 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
21153 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
21154 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
21155 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
21156 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
21157 (aarch64_sve_float_arith_operand): Likewise.
21158 (aarch64_sve_float_arith_with_sub_operand): Likewise.
21159 (aarch64_sve_float_mul_operand): Likewise.
21160 (aarch64_sve_vec_perm_operand): Likewise.
21161 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
21162 (aarch64_mov_operand): Accept const_poly_int and const_vector.
21163 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
21164 as well as const_vector.
21165 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
21166 in file. Use CONST0_RTX and CONSTM1_RTX.
21167 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
21168 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
21169 Use aarch64_simd_imm_zero.
21170 * config/aarch64/aarch64-sve.md: New file.
21171 * config/aarch64/aarch64.md: Include it.
21172 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
21173 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
21174 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
21175 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
21176 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
21177 (sve): New attribute.
21178 (enabled): Disable instructions with the sve attribute unless
21180 (movqi, movhi): Pass CONST_POLY_INT operaneds through
21181 aarch64_expand_mov_immediate.
21182 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
21183 CNT[BHSD] immediates.
21184 (movti): Split CONST_POLY_INT moves into two halves.
21185 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
21186 Split additions that need a temporary here if the destination
21187 is the stack pointer.
21188 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
21189 (*add<mode>3_poly_1): New instruction.
21190 (set_clobber_cc): New expander.
21192 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21194 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
21195 parameter and use it instead of GET_MODE_SIZE (innermode). Use
21196 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
21197 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
21198 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
21199 Change innermode from fixed_mode_size to machine_mode.
21200 (simplify_subreg): Update call accordingly. Handle a constant-sized
21201 subreg of a variable-length CONST_VECTOR.
21203 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21204 Alan Hayward <alan.hayward@arm.com>
21205 David Sherwood <david.sherwood@arm.com>
21207 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
21208 (add_offset_to_base): New function, split out from...
21209 (create_mem_ref): ...here. When handling a scale other than 1,
21210 check first whether the address is valid without the offset.
21211 Add it into the base if so, leaving the index and scale as-is.
21213 2018-01-12 Jakub Jelinek <jakub@redhat.com>
21216 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
21217 fold_for_warn before checking if arg2 is INTEGER_CST.
21219 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
21221 * config/rs6000/predicates.md (load_multiple_operation): Delete.
21222 (store_multiple_operation): Delete.
21223 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
21224 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
21225 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
21226 guarded by TARGET_STRING.
21227 (rs6000_output_load_multiple): Delete.
21228 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
21229 OPTION_MASK_STRING / TARGET_STRING handling.
21230 (print_operand) <'N', 'O'>: Add comment that these are unused now.
21231 (const rs6000_opt_masks) <"string">: Change mask to 0.
21232 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
21233 (MASK_STRING): Delete.
21234 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
21236 (load_multiple): Delete.
21243 (store_multiple): Delete.
21250 (movmemsi_8reg): Delete.
21251 (corresponding unnamed define_insn): Delete.
21252 (movmemsi_6reg): Delete.
21253 (corresponding unnamed define_insn): Delete.
21254 (movmemsi_4reg): Delete.
21255 (corresponding unnamed define_insn): Delete.
21256 (movmemsi_2reg): Delete.
21257 (corresponding unnamed define_insn): Delete.
21258 (movmemsi_1reg): Delete.
21259 (corresponding unnamed define_insn): Delete.
21260 * config/rs6000/rs6000.opt (mno-string): New.
21261 (mstring): Replace by deprecation warning stub.
21262 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
21264 2018-01-12 Jakub Jelinek <jakub@redhat.com>
21266 * regrename.c (regrename_do_replace): If replacing the same
21267 reg multiple times, try to reuse last created gen_raw_REG.
21270 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
21271 main to workaround a bug in GDB.
21273 2018-01-12 Tom de Vries <tom@codesourcery.com>
21276 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
21278 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
21280 PR rtl-optimization/80481
21281 * ira-color.c (get_cap_member): New function.
21282 (allocnos_conflict_by_live_ranges_p): Use it.
21283 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
21284 (setup_slot_coalesced_allocno_live_ranges): Ditto.
21286 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
21289 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
21290 (*saddl_se_1): Ditto.
21291 (*ssubsi_1): Ditto.
21292 (*ssubl_se_1): Ditto.
21294 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
21296 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
21297 rather than wi::to_widest for DR_INITs.
21298 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
21299 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
21300 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
21302 (vect_analyze_group_access_1): Note that here.
21304 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
21306 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
21307 polynomial type sizes.
21309 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
21311 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
21312 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
21313 (gimple_add_tmp_var): Likewise.
21315 2018-01-12 Martin Liska <mliska@suse.cz>
21317 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
21318 (gimple_alloc_sizes): Likewise.
21319 (dump_gimple_statistics): Use PRIu64 in printf format.
21320 * gimple.h: Change uint64_t to int.
21322 2018-01-12 Martin Liska <mliska@suse.cz>
21324 * tree-core.h: Use uint64_t instead of int.
21325 * tree.c (tree_node_counts): Likewise.
21326 (tree_node_sizes): Likewise.
21327 (dump_tree_statistics): Use PRIu64 in printf format.
21329 2018-01-12 Martin Liska <mliska@suse.cz>
21331 * Makefile.in: As qsort_chk is implemented in vec.c, add
21332 vec.o to linkage of gencfn-macros.
21333 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
21334 passing the info to record_node_allocation_statistics.
21335 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
21337 * ggc-common.c (struct ggc_usage): Add operator== and use
21338 it in operator< and compare function.
21339 * mem-stats.h (struct mem_usage): Likewise.
21340 * vec.c (struct vec_usage): Remove operator< and compare
21341 function. Can be simply inherited.
21343 2018-01-12 Martin Jambor <mjambor@suse.cz>
21346 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
21347 * tree-ssa-math-opts.c: Include domwalk.h.
21348 (convert_mult_to_fma_1): New function.
21349 (fma_transformation_info): New type.
21350 (fma_deferring_state): Likewise.
21351 (cancel_fma_deferring): New function.
21352 (result_of_phi): Likewise.
21353 (last_fma_candidate_feeds_initial_phi): Likewise.
21354 (convert_mult_to_fma): Added deferring logic, split actual
21355 transformation to convert_mult_to_fma_1.
21356 (math_opts_dom_walker): New type.
21357 (math_opts_dom_walker::after_dom_children): New method, body moved
21358 here from pass_optimize_widening_mul::execute, added deferring logic
21360 (pass_optimize_widening_mul::execute): Moved most of code to
21361 math_opts_dom_walker::after_dom_children.
21362 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
21363 * config/i386/i386.c (ix86_option_override_internal): Added
21364 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
21366 2018-01-12 Richard Biener <rguenther@suse.de>
21369 * dwarf2out.c (gen_variable_die): Do not reset old_die for
21370 inline instance vars.
21372 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
21375 * config/rx/rx.c (rx_is_restricted_memory_address):
21376 Handle SUBREG case.
21378 2018-01-12 Richard Biener <rguenther@suse.de>
21380 PR tree-optimization/80846
21381 * target.def (split_reduction): New target hook.
21382 * targhooks.c (default_split_reduction): New function.
21383 * targhooks.h (default_split_reduction): Declare.
21384 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
21385 target requests first reduce vectors by combining low and high
21387 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
21388 (get_vectype_for_scalar_type_and_size): Export.
21389 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
21390 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
21391 * doc/tm.texi: Regenerate.
21392 * config/i386/i386.c (ix86_split_reduction): Implement
21393 TARGET_VECTORIZE_SPLIT_REDUCTION.
21395 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
21398 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
21399 in PIC mode except for TARGET_VXWORKS_RTP.
21400 * config/sparc/sparc.c: Include cfgrtl.h.
21401 (TARGET_INIT_PIC_REG): Define.
21402 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
21403 (sparc_pic_register_p): New predicate.
21404 (sparc_legitimate_address_p): Use it.
21405 (sparc_legitimize_pic_address): Likewise.
21406 (sparc_delegitimize_address): Likewise.
21407 (sparc_mode_dependent_address_p): Likewise.
21408 (gen_load_pcrel_sym): Remove 4th parameter.
21409 (load_got_register): Adjust call to above. Remove obsolete stuff.
21410 (sparc_expand_prologue): Do not call load_got_register here.
21411 (sparc_flat_expand_prologue): Likewise.
21412 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
21413 (sparc_use_pseudo_pic_reg): New function.
21414 (sparc_init_pic_reg): Likewise.
21415 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
21416 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
21418 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
21420 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
21421 Add item for branch_cost.
21423 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
21425 PR rtl-optimization/83565
21426 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
21427 not extend the result to a larger mode for rotate operations.
21428 (num_sign_bit_copies1): Likewise.
21430 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
21433 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
21435 Use values-Xc.o for -pedantic.
21436 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
21438 2018-01-12 Martin Liska <mliska@suse.cz>
21441 * ipa-devirt.c (final_warning_record::grow_type_warnings):
21443 (possible_polymorphic_call_targets): Use it.
21444 (ipa_devirt): Likewise.
21446 2018-01-12 Martin Liska <mliska@suse.cz>
21448 * profile-count.h (enum profile_quality): Use 0 as invalid
21449 enum value of profile_quality.
21451 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
21453 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
21454 -mext-string options.
21456 2018-01-12 Richard Biener <rguenther@suse.de>
21458 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
21459 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
21460 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
21462 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
21464 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
21466 * configure.ac (--with-long-double-format): Add support for the
21467 configuration option to change the default long double format on
21469 * config.gcc (powerpc*-linux*-*): Likewise.
21470 * configure: Regenerate.
21471 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
21472 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
21473 used without modification.
21475 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21477 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
21478 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
21479 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
21480 MISC_BUILTIN_SPEC_BARRIER.
21481 (rs6000_init_builtins): Likewise.
21482 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
21484 (speculation_barrier): New define_insn.
21485 * doc/extend.texi: Document __builtin_speculation_barrier.
21487 2018-01-11 Jakub Jelinek <jakub@redhat.com>
21490 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
21491 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
21492 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
21494 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
21495 integral modes instead of "ss" and "sd".
21496 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
21497 vectors with 32-bit and 64-bit elements.
21498 (vecdupssescalarmodesuffix): New mode attribute.
21499 (vec_dup<mode>): Use it.
21501 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
21504 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
21505 frame if argument is passed on stack.
21507 2018-01-11 Jakub Jelinek <jakub@redhat.com>
21510 * ree.c (combine_reaching_defs): Optimize also
21511 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
21512 reg2=any_extend(exp); reg1=reg2;, formatting fix.
21514 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
21516 PR middle-end/83189
21517 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
21519 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
21521 PR middle-end/83718
21522 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
21523 after they are computed.
21525 2018-01-11 Bin Cheng <bin.cheng@arm.com>
21527 PR tree-optimization/83695
21528 * gimple-loop-linterchange.cc
21529 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
21530 reset cached scev information after interchange.
21531 (pass_linterchange::execute): Remove call to scev_reset_htab.
21533 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21535 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
21536 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
21537 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
21538 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
21539 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
21540 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
21541 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
21542 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
21543 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
21544 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
21545 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
21546 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
21547 (V_lane_reg): Likewise.
21548 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
21550 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
21551 (vfmal_lane_low<mode>_intrinsic,
21552 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
21553 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
21554 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
21555 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
21556 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
21557 vfmsl_lane_high<mode>_intrinsic): New define_insns.
21559 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21561 * config/arm/arm-cpus.in (fp16fml): New feature.
21562 (ALL_SIMD): Add fp16fml.
21563 (armv8.2-a): Add fp16fml as an option.
21564 (armv8.3-a): Likewise.
21565 (armv8.4-a): Add fp16fml as part of fp16.
21566 * config/arm/arm.h (TARGET_FP16FML): Define.
21567 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
21569 * config/arm/arm-modes.def (V2HF): Define.
21570 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
21571 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
21572 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
21573 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
21574 vfmsl_low, vfmsl_high): New set of builtins.
21575 * config/arm/iterators.md (PLUSMINUS): New code iterator.
21576 (vfml_op): New code attribute.
21577 (VFMLHALVES): New int iterator.
21578 (VFML, VFMLSEL): New mode attributes.
21579 (V_reg): Define mapping for V2HF.
21580 (V_hi, V_lo): New mode attributes.
21581 (VF_constraint): Likewise.
21582 (vfml_half, vfml_half_selector): New int attributes.
21583 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
21585 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
21586 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
21588 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
21589 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
21590 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
21591 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
21593 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
21594 Document new effective target and option set.
21596 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21598 * config/arm/arm-cpus.in (armv8_4): New feature.
21599 (ARMv8_4a): New fgroup.
21600 (armv8.4-a): New arch.
21601 * config/arm/arm-tables.opt: Regenerate.
21602 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
21603 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
21604 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
21605 Add matching rules for -march=armv8.4-a and extensions.
21606 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
21608 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
21611 * config/rx/rx.md (BW): New mode attribute.
21612 (sync_lock_test_and_setsi): Add mode suffix to insn output.
21614 2018-01-11 Richard Biener <rguenther@suse.de>
21616 PR tree-optimization/83435
21617 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
21618 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
21619 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
21621 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21622 Alan Hayward <alan.hayward@arm.com>
21623 David Sherwood <david.sherwood@arm.com>
21625 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
21627 (aarch64_classify_address): Initialize it. Track polynomial offsets.
21628 (aarch64_print_address_internal): Use it to check for a zero offset.
21630 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21631 Alan Hayward <alan.hayward@arm.com>
21632 David Sherwood <david.sherwood@arm.com>
21634 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
21635 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
21636 Return a poly_int64 rather than a HOST_WIDE_INT.
21637 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
21638 rather than a HOST_WIDE_INT.
21639 * config/aarch64/aarch64.h (aarch64_frame): Protect with
21640 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
21641 hard_fp_offset, frame_size, initial_adjust, callee_offset and
21642 final_offset from HOST_WIDE_INT to poly_int64.
21643 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
21644 to_constant when getting the number of units in an Advanced SIMD
21646 (aarch64_builtin_vectorized_function): Check for a constant number
21648 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
21650 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
21651 attribute instead of GET_MODE_NUNITS.
21652 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
21653 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
21654 GET_MODE_SIZE for fixed-size registers.
21655 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
21656 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
21657 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
21658 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
21659 (aarch64_print_operand, aarch64_print_address_internal)
21660 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
21661 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
21662 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
21663 Handle polynomial GET_MODE_SIZE.
21664 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
21665 wider than SImode without modification.
21666 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
21667 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
21668 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
21669 passing and returning SVE modes.
21670 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
21671 rather than GEN_INT.
21672 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
21673 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
21674 (aarch64_allocate_and_probe_stack_space): Likewise.
21675 (aarch64_layout_frame): Cope with polynomial offsets.
21676 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
21677 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
21678 polynomial offsets.
21679 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
21680 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
21681 poly_int64 rather than a HOST_WIDE_INT.
21682 (aarch64_get_separate_components, aarch64_process_components)
21683 (aarch64_expand_prologue, aarch64_expand_epilogue)
21684 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
21685 (aarch64_anchor_offset): New function, split out from...
21686 (aarch64_legitimize_address): ...here.
21687 (aarch64_builtin_vectorization_cost): Handle polynomial
21688 TYPE_VECTOR_SUBPARTS.
21689 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
21691 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
21692 number of elements from the PARALLEL rather than the mode.
21693 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
21694 rather than GET_MODE_BITSIZE.
21695 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
21696 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
21697 (aarch64_expand_vec_perm_const_1): Handle polynomial
21698 d->perm.length () and d->perm elements.
21699 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
21700 Apply to_constant to d->perm elements.
21701 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
21702 polynomial CONST_VECTOR_NUNITS.
21703 (aarch64_move_pointer): Take amount as a poly_int64 rather
21705 (aarch64_progress_pointer): Avoid temporary variable.
21706 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
21707 the mode attribute instead of GET_MODE.
21709 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21710 Alan Hayward <alan.hayward@arm.com>
21711 David Sherwood <david.sherwood@arm.com>
21713 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
21714 x exists before using it.
21715 (aarch64_add_constant_internal): Rename to...
21716 (aarch64_add_offset_1): ...this. Replace regnum with separate
21717 src and dest rtxes. Handle the case in which they're different,
21718 including when the offset is zero. Replace scratchreg with an rtx.
21719 Use 2 additions if there is no spare register into which we can
21720 move a 16-bit constant.
21721 (aarch64_add_constant): Delete.
21722 (aarch64_add_offset): Replace reg with separate src and dest
21723 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
21724 Use aarch64_add_offset_1.
21725 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
21726 an rtx rather than an int. Take the delta as a poly_int64
21727 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
21728 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
21729 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
21730 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
21731 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
21732 and aarch64_add_sp.
21733 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
21734 aarch64_add_constant.
21736 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21738 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
21739 Use scalar_float_mode.
21741 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21743 * config/aarch64/aarch64-simd.md
21744 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
21745 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
21746 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
21747 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
21748 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
21749 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
21750 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
21751 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
21752 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
21753 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
21755 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21758 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
21759 targ_options->x_arm_arch_string is non NULL.
21761 2018-01-11 Tamar Christina <tamar.christina@arm.com>
21763 * config/aarch64/aarch64.h
21764 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
21766 2018-01-11 Sudakshina Das <sudi.das@arm.com>
21769 * expmed.c (emit_store_flag_force): Swap if const op0
21770 and change VOIDmode to mode of op0.
21772 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21774 PR rtl-optimization/83761
21775 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
21776 than bytes to mode_for_size.
21778 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
21780 PR middle-end/83189
21781 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
21782 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
21785 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
21787 PR middle-end/83575
21788 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
21789 when in layout mode.
21790 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
21791 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
21794 2018-01-10 Michael Collison <michael.collison@arm.com>
21796 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
21797 * config/aarch64/aarch64-option-extension.def: Add
21798 AARCH64_OPT_EXTENSION of 'fp16fml'.
21799 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21800 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
21801 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
21802 * config/aarch64/constraints.md (Ui7): New constraint.
21803 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
21804 (VFMLA_SEL_W): Ditto.
21807 (VFMLA16_LOW): New int iterator.
21808 (VFMLA16_HIGH): Ditto.
21809 (UNSPEC_FMLAL): New unspec.
21810 (UNSPEC_FMLSL): Ditto.
21811 (UNSPEC_FMLAL2): Ditto.
21812 (UNSPEC_FMLSL2): Ditto.
21813 (f16mac): New code attribute.
21814 * config/aarch64/aarch64-simd-builtins.def
21815 (aarch64_fmlal_lowv2sf): Ditto.
21816 (aarch64_fmlsl_lowv2sf): Ditto.
21817 (aarch64_fmlalq_lowv4sf): Ditto.
21818 (aarch64_fmlslq_lowv4sf): Ditto.
21819 (aarch64_fmlal_highv2sf): Ditto.
21820 (aarch64_fmlsl_highv2sf): Ditto.
21821 (aarch64_fmlalq_highv4sf): Ditto.
21822 (aarch64_fmlslq_highv4sf): Ditto.
21823 (aarch64_fmlal_lane_lowv2sf): Ditto.
21824 (aarch64_fmlsl_lane_lowv2sf): Ditto.
21825 (aarch64_fmlal_laneq_lowv2sf): Ditto.
21826 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
21827 (aarch64_fmlalq_lane_lowv4sf): Ditto.
21828 (aarch64_fmlsl_lane_lowv4sf): Ditto.
21829 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
21830 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
21831 (aarch64_fmlal_lane_highv2sf): Ditto.
21832 (aarch64_fmlsl_lane_highv2sf): Ditto.
21833 (aarch64_fmlal_laneq_highv2sf): Ditto.
21834 (aarch64_fmlsl_laneq_highv2sf): Ditto.
21835 (aarch64_fmlalq_lane_highv4sf): Ditto.
21836 (aarch64_fmlsl_lane_highv4sf): Ditto.
21837 (aarch64_fmlalq_laneq_highv4sf): Ditto.
21838 (aarch64_fmlsl_laneq_highv4sf): Ditto.
21839 * config/aarch64/aarch64-simd.md:
21840 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
21841 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
21842 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
21843 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
21844 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
21845 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
21846 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
21847 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
21848 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
21849 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
21850 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
21851 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
21852 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
21853 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
21854 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
21855 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
21856 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
21857 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
21858 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
21859 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
21860 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
21861 (vfmlsl_low_u32): Ditto.
21862 (vfmlalq_low_u32): Ditto.
21863 (vfmlslq_low_u32): Ditto.
21864 (vfmlal_high_u32): Ditto.
21865 (vfmlsl_high_u32): Ditto.
21866 (vfmlalq_high_u32): Ditto.
21867 (vfmlslq_high_u32): Ditto.
21868 (vfmlal_lane_low_u32): Ditto.
21869 (vfmlsl_lane_low_u32): Ditto.
21870 (vfmlal_laneq_low_u32): Ditto.
21871 (vfmlsl_laneq_low_u32): Ditto.
21872 (vfmlalq_lane_low_u32): Ditto.
21873 (vfmlslq_lane_low_u32): Ditto.
21874 (vfmlalq_laneq_low_u32): Ditto.
21875 (vfmlslq_laneq_low_u32): Ditto.
21876 (vfmlal_lane_high_u32): Ditto.
21877 (vfmlsl_lane_high_u32): Ditto.
21878 (vfmlal_laneq_high_u32): Ditto.
21879 (vfmlsl_laneq_high_u32): Ditto.
21880 (vfmlalq_lane_high_u32): Ditto.
21881 (vfmlslq_lane_high_u32): Ditto.
21882 (vfmlalq_laneq_high_u32): Ditto.
21883 (vfmlslq_laneq_high_u32): Ditto.
21884 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
21885 (AARCH64_FL_FOR_ARCH8_4): New.
21886 (AARCH64_ISA_F16FML): New ISA flag.
21887 (TARGET_F16FML): New feature flag for fp16fml.
21888 (doc/invoke.texi): Document new fp16fml option.
21890 2018-01-10 Michael Collison <michael.collison@arm.com>
21892 * config/aarch64/aarch64-builtins.c:
21893 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
21894 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21895 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
21896 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
21897 (AARCH64_ISA_SHA3): New ISA flag.
21898 (TARGET_SHA3): New feature flag for sha3.
21899 * config/aarch64/iterators.md (sha512_op): New int attribute.
21900 (CRYPTO_SHA512): New int iterator.
21901 (UNSPEC_SHA512H): New unspec.
21902 (UNSPEC_SHA512H2): Ditto.
21903 (UNSPEC_SHA512SU0): Ditto.
21904 (UNSPEC_SHA512SU1): Ditto.
21905 * config/aarch64/aarch64-simd-builtins.def
21906 (aarch64_crypto_sha512hqv2di): New builtin.
21907 (aarch64_crypto_sha512h2qv2di): Ditto.
21908 (aarch64_crypto_sha512su0qv2di): Ditto.
21909 (aarch64_crypto_sha512su1qv2di): Ditto.
21910 (aarch64_eor3qv8hi): Ditto.
21911 (aarch64_rax1qv2di): Ditto.
21912 (aarch64_xarqv2di): Ditto.
21913 (aarch64_bcaxqv8hi): Ditto.
21914 * config/aarch64/aarch64-simd.md:
21915 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
21916 (aarch64_crypto_sha512su0qv2di): Ditto.
21917 (aarch64_crypto_sha512su1qv2di): Ditto.
21918 (aarch64_eor3qv8hi): Ditto.
21919 (aarch64_rax1qv2di): Ditto.
21920 (aarch64_xarqv2di): Ditto.
21921 (aarch64_bcaxqv8hi): Ditto.
21922 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
21923 (vsha512h2q_u64): Ditto.
21924 (vsha512su0q_u64): Ditto.
21925 (vsha512su1q_u64): Ditto.
21926 (veor3q_u16): Ditto.
21927 (vrax1q_u64): Ditto.
21928 (vxarq_u64): Ditto.
21929 (vbcaxq_u16): Ditto.
21930 * config/arm/types.md (crypto_sha512): New type attribute.
21931 (crypto_sha3): Ditto.
21932 (doc/invoke.texi): Document new sha3 option.
21934 2018-01-10 Michael Collison <michael.collison@arm.com>
21936 * config/aarch64/aarch64-builtins.c:
21937 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
21938 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21939 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
21940 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
21941 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
21942 (AARCH64_ISA_SM4): New ISA flag.
21943 (TARGET_SM4): New feature flag for sm4.
21944 * config/aarch64/aarch64-simd-builtins.def
21945 (aarch64_sm3ss1qv4si): Ditto.
21946 (aarch64_sm3tt1aq4si): Ditto.
21947 (aarch64_sm3tt1bq4si): Ditto.
21948 (aarch64_sm3tt2aq4si): Ditto.
21949 (aarch64_sm3tt2bq4si): Ditto.
21950 (aarch64_sm3partw1qv4si): Ditto.
21951 (aarch64_sm3partw2qv4si): Ditto.
21952 (aarch64_sm4eqv4si): Ditto.
21953 (aarch64_sm4ekeyqv4si): Ditto.
21954 * config/aarch64/aarch64-simd.md:
21955 (aarch64_sm3ss1qv4si): Ditto.
21956 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
21957 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
21958 (aarch64_sm4eqv4si): Ditto.
21959 (aarch64_sm4ekeyqv4si): Ditto.
21960 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
21961 (sm3part_op): Ditto.
21962 (CRYPTO_SM3TT): Ditto.
21963 (CRYPTO_SM3PART): Ditto.
21964 (UNSPEC_SM3SS1): New unspec.
21965 (UNSPEC_SM3TT1A): Ditto.
21966 (UNSPEC_SM3TT1B): Ditto.
21967 (UNSPEC_SM3TT2A): Ditto.
21968 (UNSPEC_SM3TT2B): Ditto.
21969 (UNSPEC_SM3PARTW1): Ditto.
21970 (UNSPEC_SM3PARTW2): Ditto.
21971 (UNSPEC_SM4E): Ditto.
21972 (UNSPEC_SM4EKEY): Ditto.
21973 * config/aarch64/constraints.md (Ui2): New constraint.
21974 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
21975 * config/arm/types.md (crypto_sm3): New type attribute.
21976 (crypto_sm4): Ditto.
21977 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
21978 (vsm3tt1aq_u32): Ditto.
21979 (vsm3tt1bq_u32): Ditto.
21980 (vsm3tt2aq_u32): Ditto.
21981 (vsm3tt2bq_u32): Ditto.
21982 (vsm3partw1q_u32): Ditto.
21983 (vsm3partw2q_u32): Ditto.
21984 (vsm4eq_u32): Ditto.
21985 (vsm4ekeyq_u32): Ditto.
21986 (doc/invoke.texi): Document new sm4 option.
21988 2018-01-10 Michael Collison <michael.collison@arm.com>
21990 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
21991 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
21992 (AARCH64_FL_FOR_ARCH8_4): New.
21993 (AARCH64_FL_V8_4): New flag.
21994 (doc/invoke.texi): Document new armv8.4-a option.
21996 2018-01-10 Michael Collison <michael.collison@arm.com>
21998 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21999 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
22000 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
22001 * config/aarch64/aarch64-option-extension.def: Add
22002 AARCH64_OPT_EXTENSION of 'sha2'.
22003 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
22004 (crypto): Disable sha2 and aes if crypto disabled.
22005 (crypto): Enable aes and sha2 if enabled.
22006 (simd): Disable sha2 and aes if simd disabled.
22007 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
22009 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
22010 (TARGET_SHA2): New feature flag for sha2.
22011 (TARGET_AES): New feature flag for aes.
22012 * config/aarch64/aarch64-simd.md:
22013 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
22014 conditional on TARGET_AES.
22015 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
22016 (aarch64_crypto_sha1hsi): Make pattern conditional
22018 (aarch64_crypto_sha1hv4si): Ditto.
22019 (aarch64_be_crypto_sha1hv4si): Ditto.
22020 (aarch64_crypto_sha1su1v4si): Ditto.
22021 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
22022 (aarch64_crypto_sha1su0v4si): Ditto.
22023 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
22024 (aarch64_crypto_sha256su0v4si): Ditto.
22025 (aarch64_crypto_sha256su1v4si): Ditto.
22026 (doc/invoke.texi): Document new aes and sha2 options.
22028 2018-01-10 Martin Sebor <msebor@redhat.com>
22030 PR tree-optimization/83781
22031 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
22034 2018-01-11 Martin Sebor <msebor@gmail.com>
22035 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22037 PR tree-optimization/83501
22038 PR tree-optimization/81703
22040 * tree-ssa-strlen.c (get_string_cst): Rename...
22041 (get_string_len): ...to this. Handle global constants.
22042 (handle_char_store): Adjust.
22044 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
22045 Jim Wilson <jimw@sifive.com>
22047 * config/riscv/riscv-protos.h (riscv_output_return): New.
22048 * config/riscv/riscv.c (struct machine_function): New naked_p field.
22049 (riscv_attribute_table, riscv_output_return),
22050 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
22051 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
22052 (riscv_compute_frame_info): Only compute frame->mask if not a naked
22054 (riscv_expand_prologue): Add early return for naked function.
22055 (riscv_expand_epilogue): Likewise.
22056 (riscv_function_ok_for_sibcall): Return false for naked function.
22057 (riscv_set_current_function): New.
22058 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
22059 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
22060 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
22061 * doc/extend.texi (RISC-V Function Attributes): New.
22063 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
22065 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
22066 check for 128-bit long double before checking TCmode.
22067 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
22068 128-bit long doubles before checking TFmode or TCmode.
22069 (FLOAT128_IBM_P): Likewise.
22071 2018-01-10 Martin Sebor <msebor@redhat.com>
22073 PR tree-optimization/83671
22074 * builtins.c (c_strlen): Unconditionally return zero for the empty
22076 Use -Warray-bounds for warnings.
22077 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
22078 for non-constant array indices with COMPONENT_REF, arrays of
22079 arrays, and pointers to arrays.
22080 (gimple_fold_builtin_strlen): Determine and set length range for
22081 non-constant character arrays.
22083 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
22085 PR middle-end/81897
22086 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
22089 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
22091 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
22093 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
22096 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
22097 VECTOR_MEM_ALTIVEC_OR_VSX_P.
22098 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
22099 indexed_or_indirect_operand predicate.
22100 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
22101 (*vsx_le_perm_load_v8hi): Likewise.
22102 (*vsx_le_perm_load_v16qi): Likewise.
22103 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
22104 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
22105 (*vsx_le_perm_store_v8hi): Likewise.
22106 (*vsx_le_perm_store_v16qi): Likewise.
22107 (eight unnamed splitters): Likewise.
22109 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
22111 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
22112 * config/rs6000/emmintrin.h: Likewise.
22113 * config/rs6000/mmintrin.h: Likewise.
22114 * config/rs6000/xmmintrin.h: Likewise.
22116 2018-01-10 David Malcolm <dmalcolm@redhat.com>
22119 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
22121 * tree.c (tree_nop_conversion): Return true for location wrapper
22123 (maybe_wrap_with_location): New function.
22124 (selftest::check_strip_nops): New function.
22125 (selftest::test_location_wrappers): New function.
22126 (selftest::tree_c_tests): Call it.
22127 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
22128 (maybe_wrap_with_location): New decl.
22129 (EXPR_LOCATION_WRAPPER_P): New macro.
22130 (location_wrapper_p): New inline function.
22131 (tree_strip_any_location_wrapper): New inline function.
22133 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
22136 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
22137 stack_realign_offset for the largest alignment of stack slot
22139 (ix86_find_max_used_stack_alignment): New function.
22140 (ix86_finalize_stack_frame_flags): Use it. Set
22141 max_used_stack_alignment if we don't realign stack.
22142 * config/i386/i386.h (machine_function): Add
22143 max_used_stack_alignment.
22145 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
22147 * config/arm/arm.opt (-mbranch-cost): New option.
22148 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
22151 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
22154 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
22155 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
22157 2018-01-10 Richard Biener <rguenther@suse.de>
22160 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
22161 early out so it also covers the case where we have a non-NULL
22164 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
22166 PR tree-optimization/83753
22167 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
22168 for non-strided grouped accesses if the number of elements is 1.
22170 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22173 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
22174 * i386.h (TARGET_USE_GATHER): Define.
22175 * x86-tune.def (X86_TUNE_USE_GATHER): New.
22177 2018-01-10 Martin Liska <mliska@suse.cz>
22180 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
22181 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
22183 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
22184 CLEANUP_NO_PARTITIONING is not set.
22186 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
22188 * doc/rtl.texi: Remove documentation of (const ...) wrappers
22189 for vectors, as a partial revert of r254296.
22190 * rtl.h (const_vec_p): Delete.
22191 (const_vec_duplicate_p): Don't test for vector CONSTs.
22192 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
22193 * expmed.c (make_tree): Likewise.
22196 * common.md (E, F): Use CONSTANT_P instead of checking for
22198 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
22199 checking for CONST_VECTOR.
22201 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
22203 PR middle-end/83575
22204 * predict.c (force_edge_cold): Handle in more sane way edges
22205 with no prediction.
22207 2018-01-09 Carl Love <cel@us.ibm.com>
22209 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
22211 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
22212 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
22213 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
22214 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
22215 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
22216 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
22217 * config/rs6000/rs6000-protos.h: Add extern defition for
22218 rs6000_generate_float2_double_code.
22219 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
22221 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
22222 (float2_v2df): Add define_expand.
22224 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
22227 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
22228 op_mode in the force_to_mode call.
22230 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
22232 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
22233 instead of checking each element individually.
22234 (aarch64_evpc_uzp): Likewise.
22235 (aarch64_evpc_zip): Likewise.
22236 (aarch64_evpc_ext): Likewise.
22237 (aarch64_evpc_rev): Likewise.
22238 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
22239 instead of checking each element individually. Return true without
22241 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
22242 whether all selected elements come from the same input, instead of
22243 checking each element individually. Remove calls to gen_rtx_REG,
22244 start_sequence and end_sequence and instead assert that no rtl is
22247 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
22249 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
22250 order of HIGH and CONST checks.
22252 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
22254 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
22255 if the destination isn't an SSA_NAME.
22257 2018-01-09 Richard Biener <rguenther@suse.de>
22259 PR tree-optimization/83668
22260 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
22262 (canonicalize_loop_form): ... here, renamed from ...
22263 (canonicalize_loop_closed_ssa_form): ... this and amended to
22264 swap successor edges for loop exit blocks to make us use
22265 the RPO order we need for initial schedule generation.
22267 2018-01-09 Joseph Myers <joseph@codesourcery.com>
22269 PR tree-optimization/64811
22270 * match.pd: When optimizing comparisons with Inf, avoid
22271 introducing or losing exceptions from comparisons with NaN.
22273 2018-01-09 Martin Liska <mliska@suse.cz>
22276 * asan.c (shadow_mem_size): Add gcc_assert.
22278 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
22280 Don't save registers in main().
22283 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
22284 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
22285 * config/avr/avr.c (avr_set_current_function): Don't error if
22286 naked, OS_task or OS_main are specified at the same time.
22287 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
22289 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
22291 * common/config/avr/avr-common.c (avr_option_optimization_table):
22292 Switch on -mmain-is-OS_task for optimizing compilations.
22294 2018-01-09 Richard Biener <rguenther@suse.de>
22296 PR tree-optimization/83572
22297 * graphite.c: Include cfganal.h.
22298 (graphite_transform_loops): Connect infinite loops to exit
22299 and remove fake edges at the end.
22301 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
22303 * ipa-inline.c (edge_badness): Revert accidental checkin.
22305 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
22308 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
22309 symbols; not inline clones.
22311 2018-01-09 Jakub Jelinek <jakub@redhat.com>
22314 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
22315 hard registers. Formatting fixes.
22317 PR preprocessor/83722
22318 * gcc.c (try_generate_repro): Pass
22319 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
22320 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
22323 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
22324 Kito Cheng <kito.cheng@gmail.com>
22326 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
22327 (riscv_leaf_function_p): Delete.
22328 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
22330 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22332 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
22334 (do_ifelse): New function.
22335 (do_isel): New function.
22336 (do_sub3): New function.
22337 (do_add3): New function.
22338 (do_load_mask_compare): New function.
22339 (do_overlap_load_compare): New function.
22340 (expand_compare_loop): New function.
22341 (expand_block_compare): Call expand_compare_loop() when appropriate.
22342 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
22343 option description.
22344 (-mblock-compare-inline-loop-limit): New option.
22346 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22349 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
22350 Reverse order of second and third operands in first alternative.
22351 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
22352 of first and second elements in UNSPEC_VPERMR vector.
22353 (altivec_expand_vec_perm_le): Likewise.
22355 2018-01-08 Jeff Law <law@redhat.com>
22357 PR rtl-optimizatin/81308
22358 * tree-switch-conversion.c (cfg_altered): New file scoped static.
22359 (process_switch): If group_case_labels makes a change, then set
22361 (pass_convert_switch::execute): If a switch is converted, then
22362 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
22364 PR rtl-optimization/81308
22365 * recog.c (split_all_insns): Conditionally cleanup the CFG after
22368 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
22370 PR target/83663 - Revert r255946
22371 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
22372 generation for cases where splatting a value is not useful.
22373 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
22374 across a vec_duplicate and a paradoxical subreg forming a vector
22375 mode to a vec_concat.
22377 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22379 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
22380 -march=armv8.3-a variants.
22381 * config/arm/t-multilib: Likewise.
22382 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
22384 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22386 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
22388 (cceq_ior_compare_complement): Give it a name so I can use it, and
22389 change boolean_or_operator predicate to boolean_operator so it can
22390 be used to generate a crand.
22391 (eqne): New code iterator.
22392 (bd/bd_neg): New code_attrs.
22393 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
22394 a single define_insn.
22395 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
22396 decrement (bdnzt/bdnzf/bdzt/bdzf).
22397 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
22398 with the new names of the branch decrement patterns, and added the
22399 names of the branch decrement conditional patterns.
22401 2018-01-08 Richard Biener <rguenther@suse.de>
22403 PR tree-optimization/83563
22404 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
22407 2018-01-08 Richard Biener <rguenther@suse.de>
22409 PR middle-end/83713
22410 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
22412 2018-01-08 Richard Biener <rguenther@suse.de>
22414 PR tree-optimization/83685
22415 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
22416 references to abnormals.
22418 2018-01-08 Richard Biener <rguenther@suse.de>
22421 * dwarf2out.c (output_indirect_strings): Handle empty
22422 skeleton_debug_str_hash.
22423 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
22425 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
22427 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
22428 (emit_store_direct): Likewise.
22429 (arc_trampoline_adjust_address): Likewise.
22430 (arc_asm_trampoline_template): New function.
22431 (arc_initialize_trampoline): Use asm_trampoline_template.
22432 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
22433 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
22434 * config/arc/arc.md (flush_icache): Delete pattern.
22436 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
22438 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
22439 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
22442 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
22445 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
22446 by not USED_FOR_TARGET.
22447 (make_pass_resolve_sw_modes): Likewise.
22449 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
22451 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
22454 2018-01-08 Richard Biener <rguenther@suse.de>
22456 PR middle-end/83580
22457 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
22459 2018-01-08 Richard Biener <rguenther@suse.de>
22461 PR middle-end/83517
22462 * match.pd ((t * 2) / 2) -> t): Add missing :c.
22464 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
22466 PR middle-end/81897
22467 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
22468 basic blocks with a small number of successors.
22469 (convert_control_dep_chain_into_preds): Improve handling of
22471 (dump_predicates): Split apart into...
22472 (dump_pred_chain): ...here...
22473 (dump_pred_info): ...and here.
22474 (can_one_predicate_be_invalidated_p): Add debugging printfs.
22475 (can_chain_union_be_invalidated_p): Improve check for invalidation
22477 (uninit_uses_cannot_happen): Avoid unnecessary if
22478 convert_control_dep_chain_into_preds yielded nothing.
22480 2018-01-06 Martin Sebor <msebor@redhat.com>
22482 PR tree-optimization/83640
22483 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
22484 subtracting negative offset from size.
22485 (builtin_access::overlap): Adjust offset bounds of the access to fall
22486 within the size of the object if possible.
22488 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
22490 PR rtl-optimization/83699
22491 * expmed.c (extract_bit_field_1): Restrict the vector usage of
22492 extract_bit_field_as_subreg to cases in which the extracted
22493 value is also a vector.
22495 * lra-constraints.c (process_alt_operands): Test for the equivalence
22496 substitutions when detecting a possible reload cycle.
22498 2018-01-06 Jakub Jelinek <jakub@redhat.com>
22501 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
22502 by default if flag_selective_schedling{,2}. Formatting fixes.
22504 PR rtl-optimization/83682
22505 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
22506 if it has non-VECTOR_MODE element mode.
22507 (vec_duplicate_p): Likewise.
22509 PR middle-end/83694
22510 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
22511 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
22513 2018-01-05 Jakub Jelinek <jakub@redhat.com>
22516 * config/i386/i386-builtin.def
22517 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
22518 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
22519 Require also OPTION_MASK_ISA_AVX512F in addition to
22520 OPTION_MASK_ISA_GFNI.
22521 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
22522 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
22523 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
22524 to OPTION_MASK_ISA_GFNI.
22525 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
22526 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
22527 OPTION_MASK_ISA_AVX512BW.
22528 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
22529 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
22530 addition to OPTION_MASK_ISA_GFNI.
22531 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
22532 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
22533 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
22534 to OPTION_MASK_ISA_GFNI.
22535 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
22536 a requirement for all ISAs rather than any of them with a few
22538 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
22540 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
22541 bitmasks to be enabled with 3 exceptions, instead of requiring any
22542 enabled ISA with lots of exceptions.
22543 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
22544 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
22545 Change avx512bw in isa attribute to avx512f.
22546 * config/i386/sgxintrin.h: Add license boilerplate.
22547 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
22548 to __AVX512F__ and __AVX512VL to __AVX512VL__.
22549 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
22550 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
22552 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
22553 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
22554 temporarily sse2 rather than sse if not enabled already.
22557 * config/i386/sse.md (VI248_VLBW): Rename to ...
22558 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
22559 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
22560 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
22561 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
22562 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
22563 mode iterator instead of VI248_VLBW.
22565 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
22567 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
22568 (record_modified): Skip clobbers; add debug output.
22569 (param_change_prob): Use sreal frequencies.
22571 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
22573 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
22574 punt for user-aligned variables.
22576 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
22578 * tree-chrec.c (chrec_contains_symbols): Return true for
22581 2018-01-05 Sudakshina Das <sudi.das@arm.com>
22584 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
22585 of (x|y) == x for BICS pattern.
22587 2018-01-05 Jakub Jelinek <jakub@redhat.com>
22589 PR tree-optimization/83605
22590 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
22591 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
22594 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
22596 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
22597 * config/epiphany/rtems.h: New file.
22599 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22600 Uros Bizjak <ubizjak@gmail.com>
22603 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
22604 QIreg_operand instead of register_operand predicate.
22605 * config/i386/i386.c (ix86_rop_should_change_byte_p,
22606 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
22607 comments instead of -fmitigate[-_]rop.
22609 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22612 * cgraphunit.c (symbol_table::compile): Switch to text_section
22613 before calling assembly_start debug hook.
22614 * run-rtl-passes.c (run_rtl_passes): Likewise.
22617 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22619 * tree-vrp.c (extract_range_from_binary_expr_1): Check
22620 range_int_cst_p rather than !symbolic_range_p before calling
22621 extract_range_from_multiplicative_op_1.
22623 2018-01-04 Jeff Law <law@redhat.com>
22625 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
22626 redundant test in assertion.
22628 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22630 * doc/rtl.texi: Document machine_mode wrapper classes.
22632 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22634 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
22635 using tree_to_uhwi.
22637 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22639 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
22640 the VEC_PERM_EXPR fold to fail.
22642 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22645 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
22646 to switched_sections.
22648 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22651 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
22652 test for d.testing.
22654 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
22657 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
22658 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
22660 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22663 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
22664 is BLKmode and bitpos not zero or mode change is needed.
22666 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22669 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
22672 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
22675 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
22676 instead of MULT rtx. Update all corresponding splitters.
22677 (*saddl_se): Ditto.
22678 (*ssub<modesuffix>): Ditto.
22679 (*ssubl_se): Ditto.
22680 (*cmp_sadd_di): Update split patterns.
22681 (*cmp_sadd_si): Ditto.
22682 (*cmp_sadd_sidi): Ditto.
22683 (*cmp_ssub_di): Ditto.
22684 (*cmp_ssub_si): Ditto.
22685 (*cmp_ssub_sidi): Ditto.
22686 * config/alpha/predicates.md (const23_operand): New predicate.
22687 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
22688 Look for ASHIFT, not MULT inner operand.
22689 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
22691 2018-01-04 Martin Liska <mliska@suse.cz>
22693 PR gcov-profile/83669
22694 * gcov.c (output_intermediate_file): Add version to intermediate
22696 * doc/gcov.texi: Document new field 'version' in intermediate
22697 file format. Fix location of '-k' option of gcov command.
22699 2018-01-04 Martin Liska <mliska@suse.cz>
22702 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
22704 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22706 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
22708 2018-01-03 Martin Sebor <msebor@redhat.com>
22710 PR tree-optimization/83655
22711 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
22712 checking calls with invalid arguments.
22714 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22716 * tree-vect-stmts.c (vect_get_store_rhs): New function.
22717 (vectorizable_mask_load_store): Delete.
22718 (vectorizable_call): Return false for masked loads and stores.
22719 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
22720 instead of gimple_assign_rhs1.
22721 (vectorizable_load): Handle IFN_MASK_LOAD.
22722 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
22724 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22726 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
22728 (vectorizable_mask_load_store): ...here.
22729 (vectorizable_load): ...and here.
22731 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22733 * tree-vect-stmts.c (vect_build_all_ones_mask)
22734 (vect_build_zero_merge_argument): New functions, split out from...
22735 (vectorizable_load): ...here.
22737 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22739 * tree-vect-stmts.c (vect_check_store_rhs): New function,
22741 (vectorizable_mask_load_store): ...here.
22742 (vectorizable_store): ...and here.
22744 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22746 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
22748 (vectorizable_mask_load_store): ...here.
22750 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22752 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
22753 (vect_model_store_cost): Take a vec_load_store_type instead of a
22755 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
22756 (vect_model_store_cost): Take a vec_load_store_type instead of a
22758 (vectorizable_mask_load_store): Update accordingly.
22759 (vectorizable_store): Likewise.
22760 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
22762 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22764 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
22765 IFN_MASK_LOAD calls here rather than...
22766 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
22768 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22769 Alan Hayward <alan.hayward@arm.com>
22770 David Sherwood <david.sherwood@arm.com>
22772 * expmed.c (extract_bit_field_1): For vector extracts,
22773 fall back to extract_bit_field_as_subreg if vec_extract
22776 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22777 Alan Hayward <alan.hayward@arm.com>
22778 David Sherwood <david.sherwood@arm.com>
22780 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
22781 they are variable or constant sized.
22782 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
22783 slots for constant-sized data.
22785 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22786 Alan Hayward <alan.hayward@arm.com>
22787 David Sherwood <david.sherwood@arm.com>
22789 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
22790 handling COND_EXPRs with boolean comparisons, try to find a better
22791 basis for the mask type than the boolean itself.
22793 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22795 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
22796 is calculated and how it can be overridden.
22797 * genmodes.c (max_bitsize_mode_any_mode): New variable.
22798 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
22800 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
22803 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22804 Alan Hayward <alan.hayward@arm.com>
22805 David Sherwood <david.sherwood@arm.com>
22807 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
22808 Remove the mode argument.
22809 (aarch64_simd_valid_immediate): Remove the mode and inverse
22811 * config/aarch64/iterators.md (bitsize): New iterator.
22812 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
22813 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
22814 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
22815 aarch64_simd_valid_immediate.
22816 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
22817 (aarch64_reg_or_bic_imm): Likewise.
22818 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
22819 with an insn_type enum and msl with a modifier_type enum.
22820 Replace element_width with a scalar_mode. Change the shift
22821 to unsigned int. Add constructors for scalar_float_mode and
22822 scalar_int_mode elements.
22823 (aarch64_vect_float_const_representable_p): Delete.
22824 (aarch64_can_const_movi_rtx_p)
22825 (aarch64_simd_scalar_immediate_valid_for_move)
22826 (aarch64_simd_make_constant): Update call to
22827 aarch64_simd_valid_immediate.
22828 (aarch64_advsimd_valid_immediate_hs): New function.
22829 (aarch64_advsimd_valid_immediate): Likewise.
22830 (aarch64_simd_valid_immediate): Remove mode and inverse
22831 arguments. Rewrite to use the above. Use const_vec_duplicate_p
22832 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
22833 and aarch64_float_const_representable_p on the result.
22834 (aarch64_output_simd_mov_immediate): Remove mode argument.
22835 Update call to aarch64_simd_valid_immediate and use of
22836 simd_immediate_info.
22837 (aarch64_output_scalar_simd_mov_immediate): Update call
22840 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22841 Alan Hayward <alan.hayward@arm.com>
22842 David Sherwood <david.sherwood@arm.com>
22844 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
22845 (mode_nunits): Likewise CONST_MODE_NUNITS.
22846 * machmode.def (ADJUST_NUNITS): Document.
22847 * genmodes.c (mode_data::need_nunits_adj): New field.
22848 (blank_mode): Update accordingly.
22849 (adj_nunits): New variable.
22850 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
22852 (emit_mode_size_inline): Set need_bytesize_adj for all modes
22853 listed in adj_nunits.
22854 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
22855 listed in adj_nunits. Don't emit case statements for such modes.
22856 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
22857 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
22858 nothing if adj_nunits is nonnull.
22859 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
22860 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
22861 (emit_mode_fbit): Update use of print_maybe_const_decl.
22862 (emit_move_size): Likewise. Treat the array as non-const
22864 (emit_mode_adjustments): Handle adj_nunits.
22866 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22868 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
22869 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
22870 (VECTOR_MODES): Use it.
22871 (make_vector_modes): Take the prefix as an argument.
22873 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22874 Alan Hayward <alan.hayward@arm.com>
22875 David Sherwood <david.sherwood@arm.com>
22877 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
22878 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
22879 for MODE_VECTOR_BOOL.
22880 * machmode.def (VECTOR_BOOL_MODE): Document.
22881 * genmodes.c (VECTOR_BOOL_MODE): New macro.
22882 (make_vector_bool_mode): New function.
22883 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
22885 * lto-streamer-in.c (lto_input_mode_table): Likewise.
22886 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
22888 * stor-layout.c (int_mode_for_mode): Likewise.
22889 * tree.c (build_vector_type_for_mode): Likewise.
22890 * varasm.c (output_constant_pool_2): Likewise.
22891 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
22892 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
22893 for MODE_VECTOR_BOOL.
22894 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
22895 of mode class checks.
22896 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
22897 instead of a list of mode class checks.
22898 (expand_vector_scalar_condition): Likewise.
22899 (type_for_widest_vector_mode): Handle BImode as an inner mode.
22901 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22902 Alan Hayward <alan.hayward@arm.com>
22903 David Sherwood <david.sherwood@arm.com>
22905 * machmode.h (mode_size): Change from unsigned short to
22907 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
22908 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
22909 or if measurement_type is not polynomial.
22910 (fixed_size_mode::includes_p): Check for constant-sized modes.
22911 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
22912 return a poly_uint16 rather than an unsigned short.
22913 (emit_mode_size): Change the type of mode_size from unsigned short
22914 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
22915 (emit_mode_adjustments): Cope with polynomial vector sizes.
22916 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22918 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22920 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
22921 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
22922 * caller-save.c (setup_save_areas): Likewise.
22923 (replace_reg_with_saved_mem): Likewise.
22924 * calls.c (emit_library_call_value_1): Likewise.
22925 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
22926 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
22927 (gen_lowpart_for_combine): Likewise.
22928 * convert.c (convert_to_integer_1): Likewise.
22929 * cse.c (equiv_constant, cse_insn): Likewise.
22930 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
22931 (cselib_subst_to_values): Likewise.
22932 * dce.c (word_dce_process_block): Likewise.
22933 * df-problems.c (df_word_lr_mark_ref): Likewise.
22934 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
22935 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
22936 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
22937 (rtl_for_decl_location): Likewise.
22938 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
22939 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
22940 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
22941 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
22942 (expand_expr_real_1): Likewise.
22943 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
22944 (pad_below): Likewise.
22945 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
22946 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
22947 * ira.c (get_subreg_tracking_sizes): Likewise.
22948 * ira-build.c (ira_create_allocno_objects): Likewise.
22949 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
22950 (ira_sort_regnos_for_alter_reg): Likewise.
22951 * ira-costs.c (record_operand_costs): Likewise.
22952 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
22953 (resolve_simple_move): Likewise.
22954 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
22955 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
22956 (lra_constraints): Likewise.
22957 (CONST_POOL_OK_P): Reject variable-sized modes.
22958 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
22959 (add_pseudo_to_slot, lra_spill): Likewise.
22960 * omp-low.c (omp_clause_aligned_alignment): Likewise.
22961 * optabs-query.c (get_best_extraction_insn): Likewise.
22962 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
22963 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
22964 (expand_mult_highpart, valid_multiword_target_p): Likewise.
22965 * recog.c (offsettable_address_addr_space_p): Likewise.
22966 * regcprop.c (maybe_mode_change): Likewise.
22967 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
22968 * regrename.c (build_def_use): Likewise.
22969 * regstat.c (dump_reg_info): Likewise.
22970 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
22971 (find_reloads, find_reloads_subreg_address): Likewise.
22972 * reload1.c (eliminate_regs_1): Likewise.
22973 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
22974 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
22975 (simplify_binary_operation_1, simplify_subreg): Likewise.
22976 * targhooks.c (default_function_arg_padding): Likewise.
22977 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
22978 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
22979 (verify_gimple_assign_ternary): Likewise.
22980 * tree-inline.c (estimate_move_cost): Likewise.
22981 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22982 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
22983 (get_address_cost_ainc): Likewise.
22984 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
22985 (vect_supportable_dr_alignment): Likewise.
22986 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
22987 (vectorizable_reduction): Likewise.
22988 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
22989 (vectorizable_operation, vectorizable_load): Likewise.
22990 * tree.c (build_same_sized_truth_vector_type): Likewise.
22991 * valtrack.c (cleanup_auto_inc_dec): Likewise.
22992 * var-tracking.c (emit_note_insn_var_location): Likewise.
22993 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
22994 (ADDR_VEC_ALIGN): Likewise.
22996 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22997 Alan Hayward <alan.hayward@arm.com>
22998 David Sherwood <david.sherwood@arm.com>
23000 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
23002 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
23003 or if measurement_type is polynomial.
23004 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
23005 * combine.c (make_extraction): Likewise.
23006 * dse.c (find_shift_sequence): Likewise.
23007 * dwarf2out.c (mem_loc_descriptor): Likewise.
23008 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
23009 (extract_bit_field, extract_low_bits): Likewise.
23010 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
23011 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
23012 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
23013 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
23014 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
23015 * reload.c (find_reloads): Likewise.
23016 * reload1.c (alter_reg): Likewise.
23017 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
23018 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
23019 * tree-if-conv.c (predicate_mem_writes): Likewise.
23020 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
23021 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
23022 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
23023 * valtrack.c (dead_debug_insert_temp): Likewise.
23024 * varasm.c (mergeable_constant_section): Likewise.
23025 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
23027 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23028 Alan Hayward <alan.hayward@arm.com>
23029 David Sherwood <david.sherwood@arm.com>
23031 * expr.c (expand_assignment): Cope with polynomial mode sizes
23032 when assigning to a CONCAT.
23034 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23035 Alan Hayward <alan.hayward@arm.com>
23036 David Sherwood <david.sherwood@arm.com>
23038 * machmode.h (mode_precision): Change from unsigned short to
23040 (mode_to_precision): Return a poly_uint16 rather than an unsigned
23042 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
23043 or if measurement_type is not polynomial.
23044 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
23045 in which the mode is already known to be a scalar_int_mode.
23046 * genmodes.c (emit_mode_precision): Change the type of mode_precision
23047 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
23049 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23050 for GET_MODE_PRECISION.
23051 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23052 for GET_MODE_PRECISION.
23053 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
23055 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
23056 (expand_field_assignment, make_extraction): Likewise.
23057 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
23058 (get_last_value): Likewise.
23059 * convert.c (convert_to_integer_1): Likewise.
23060 * cse.c (cse_insn): Likewise.
23061 * expr.c (expand_expr_real_1): Likewise.
23062 * lra-constraints.c (simplify_operand_subreg): Likewise.
23063 * optabs-query.c (can_atomic_load_p): Likewise.
23064 * optabs.c (expand_atomic_load): Likewise.
23065 (expand_atomic_store): Likewise.
23066 * ree.c (combine_reaching_defs): Likewise.
23067 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
23068 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
23069 * tree.h (type_has_mode_precision_p): Likewise.
23070 * ubsan.c (instrument_si_overflow): Likewise.
23072 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23073 Alan Hayward <alan.hayward@arm.com>
23074 David Sherwood <david.sherwood@arm.com>
23076 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
23077 polynomial numbers of units.
23078 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
23079 (valid_vector_subparts_p): New function.
23080 (build_vector_type): Remove temporary shim and take the number
23081 of units as a poly_uint64 rather than an int.
23082 (build_opaque_vector_type): Take the number of units as a
23083 poly_uint64 rather than an int.
23084 * tree.c (build_vector_from_ctor): Handle polynomial
23085 TYPE_VECTOR_SUBPARTS.
23086 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
23087 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
23088 (build_vector_from_val): If the number of units is variable,
23089 use build_vec_duplicate_cst for constant operands and
23090 VEC_DUPLICATE_EXPR otherwise.
23091 (make_vector_type): Remove temporary is_constant ().
23092 (build_vector_type, build_opaque_vector_type): Take the number of
23093 units as a poly_uint64 rather than an int.
23094 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
23096 * cfgexpand.c (expand_debug_expr): Likewise.
23097 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
23098 (store_constructor, expand_expr_real_1): Likewise.
23099 (const_scalar_mask_from_tree): Likewise.
23100 * fold-const-call.c (fold_const_reduction): Likewise.
23101 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
23102 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
23103 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
23104 (fold_relational_const): Likewise.
23105 (native_interpret_vector): Likewise. Change the size from an
23106 int to an unsigned int.
23107 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
23108 TYPE_VECTOR_SUBPARTS.
23109 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
23110 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
23111 duplicating a non-constant operand into a variable-length vector.
23112 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
23113 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
23114 * ipa-icf.c (sem_variable::equals): Likewise.
23115 * match.pd: Likewise.
23116 * omp-simd-clone.c (simd_clone_subparts): Likewise.
23117 * print-tree.c (print_node): Likewise.
23118 * stor-layout.c (layout_type): Likewise.
23119 * targhooks.c (default_builtin_vectorization_cost): Likewise.
23120 * tree-cfg.c (verify_gimple_comparison): Likewise.
23121 (verify_gimple_assign_binary): Likewise.
23122 (verify_gimple_assign_ternary): Likewise.
23123 (verify_gimple_assign_single): Likewise.
23124 * tree-pretty-print.c (dump_generic_node): Likewise.
23125 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23126 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
23127 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
23128 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
23129 (vect_shift_permute_load_chain): Likewise.
23130 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
23131 (expand_vector_condition, optimize_vector_constructor): Likewise.
23132 (lower_vec_perm, get_compute_type): Likewise.
23133 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
23134 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
23135 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
23136 (vect_recog_mask_conversion_pattern): Likewise.
23137 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
23138 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
23139 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23140 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
23141 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
23142 (vectorizable_shift, vectorizable_operation, vectorizable_store)
23143 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
23144 (supportable_widening_operation): Likewise.
23145 (supportable_narrowing_operation): Likewise.
23146 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
23148 * varasm.c (output_constant): Likewise.
23150 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23151 Alan Hayward <alan.hayward@arm.com>
23152 David Sherwood <david.sherwood@arm.com>
23154 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
23155 so that both the length == 3 and length != 3 cases set up their
23156 own permute vectors. Add comments explaining why we know the
23157 number of elements is constant.
23158 (vect_permute_load_chain): Likewise.
23160 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23161 Alan Hayward <alan.hayward@arm.com>
23162 David Sherwood <david.sherwood@arm.com>
23164 * machmode.h (mode_nunits): Change from unsigned char to
23166 (ONLY_FIXED_SIZE_MODES): New macro.
23167 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
23168 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
23169 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
23171 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
23172 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
23173 or if measurement_type is not polynomial.
23174 * genmodes.c (ZERO_COEFFS): New macro.
23175 (emit_mode_nunits_inline): Make mode_nunits_inline return a
23177 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
23178 Use ZERO_COEFFS when emitting initializers.
23179 * data-streamer.h (bp_pack_poly_value): New function.
23180 (bp_unpack_poly_value): Likewise.
23181 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23182 for GET_MODE_NUNITS.
23183 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23184 for GET_MODE_NUNITS.
23185 * tree.c (make_vector_type): Remove temporary shim and make
23186 the real function take the number of units as a poly_uint64
23187 rather than an int.
23188 (build_vector_type_for_mode): Handle polynomial nunits.
23189 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
23190 * emit-rtl.c (const_vec_series_p_1): Likewise.
23191 (gen_rtx_CONST_VECTOR): Likewise.
23192 * fold-const.c (test_vec_duplicate_folding): Likewise.
23193 * genrecog.c (validate_pattern): Likewise.
23194 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
23195 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
23196 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
23197 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
23198 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
23199 * rtlanal.c (subreg_get_info): Likewise.
23200 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23201 (vect_grouped_load_supported): Likewise.
23202 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
23203 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
23204 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
23205 (simplify_const_unary_operation, simplify_binary_operation_1)
23206 (simplify_const_binary_operation, simplify_ternary_operation)
23207 (test_vector_ops_duplicate, test_vector_ops): Likewise.
23208 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
23209 instead of CONST_VECTOR_NUNITS.
23210 * varasm.c (output_constant_pool_2): Likewise.
23211 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
23212 explicit-encoded elements in the XVEC for variable-length vectors.
23214 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23216 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
23218 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23219 Alan Hayward <alan.hayward@arm.com>
23220 David Sherwood <david.sherwood@arm.com>
23222 * coretypes.h (fixed_size_mode): Declare.
23223 (fixed_size_mode_pod): New typedef.
23224 * builtins.h (target_builtins::x_apply_args_mode)
23225 (target_builtins::x_apply_result_mode): Change type to
23226 fixed_size_mode_pod.
23227 * builtins.c (apply_args_size, apply_result_size, result_vector)
23228 (expand_builtin_apply_args_1, expand_builtin_apply)
23229 (expand_builtin_return): Update accordingly.
23231 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23233 * cse.c (hash_rtx_cb): Hash only the encoded elements.
23234 * cselib.c (cselib_hash_rtx): Likewise.
23235 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
23236 CONST_VECTOR encoding.
23238 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23239 Jeff Law <law@redhat.com>
23242 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
23243 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
23244 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
23245 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
23248 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
23249 explicitly probe *sp in a noreturn function if there were any callee
23250 register saves or frame pointer is needed.
23252 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23255 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
23256 BLKmode for ternary, binary or unary expressions.
23259 * var-tracking.c (delete_vta_debug_insn): New inline function.
23260 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
23261 insns from get_insns () to NULL instead of each bb separately.
23262 Use delete_vta_debug_insn. No longer static.
23263 (vt_debug_insns_local, variable_tracking_main_1): Adjust
23264 delete_vta_debug_insns callers.
23265 * rtl.h (delete_vta_debug_insns): Declare.
23266 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
23267 instead of variable_tracking_main.
23269 2018-01-03 Martin Sebor <msebor@redhat.com>
23271 PR tree-optimization/83603
23272 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
23273 arguments past the endof the argument list in functions declared
23274 without a prototype.
23275 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
23276 Avoid checking when arguments are null.
23278 2018-01-03 Martin Sebor <msebor@redhat.com>
23281 * doc/extend.texi (attribute const): Fix a typo.
23282 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
23283 issuing -Wsuggest-attribute for void functions.
23285 2018-01-03 Martin Sebor <msebor@redhat.com>
23287 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
23288 offset_int::from instead of wide_int::to_shwi.
23289 (maybe_diag_overlap): Remove assertion.
23290 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
23291 * gimple-ssa-sprintf.c (format_directive): Same.
23292 (parse_directive): Same.
23293 (sprintf_dom_walker::compute_format_length): Same.
23294 (try_substitute_return_value): Same.
23296 2018-01-03 Jeff Law <law@redhat.com>
23298 PR middle-end/83654
23299 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
23300 non-constant residual for zero at runtime and avoid probing in
23301 that case. Reorganize code for trailing problem to mirror handling
23304 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23306 PR tree-optimization/83501
23307 * tree-ssa-strlen.c (get_string_cst): New.
23308 (handle_char_store): Call get_string_cst.
23310 2018-01-03 Martin Liska <mliska@suse.cz>
23312 PR tree-optimization/83593
23313 * tree-ssa-strlen.c: Include tree-cfg.h.
23314 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
23315 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
23316 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
23318 (strlen_dom_walker::before_dom_children): Call
23319 gimple_purge_dead_eh_edges. Dump tranformation with details
23321 (strlen_dom_walker::before_dom_children): Update call by adding
23322 new argument cleanup_eh.
23323 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
23325 2018-01-03 Martin Liska <mliska@suse.cz>
23328 * cif-code.def (VARIADIC_THUNK): New enum value.
23329 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
23332 2018-01-03 Jan Beulich <jbeulich@suse.com>
23334 * sse.md (mov<mode>_internal): Tighten condition for when to use
23335 vmovdqu<ssescalarsize> for TI and OI modes.
23337 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23339 Update copyright years.
23341 2018-01-03 Martin Liska <mliska@suse.cz>
23344 * ipa-visibility.c (function_and_variable_visibility): Skip
23345 functions with noipa attribure.
23347 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23349 * gcc.c (process_command): Update copyright notice dates.
23350 * gcov-dump.c (print_version): Ditto.
23351 * gcov.c (print_version): Ditto.
23352 * gcov-tool.c (print_version): Ditto.
23353 * gengtype.c (create_file): Ditto.
23354 * doc/cpp.texi: Bump @copying's copyright year.
23355 * doc/cppinternals.texi: Ditto.
23356 * doc/gcc.texi: Ditto.
23357 * doc/gccint.texi: Ditto.
23358 * doc/gcov.texi: Ditto.
23359 * doc/install.texi: Ditto.
23360 * doc/invoke.texi: Ditto.
23362 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23364 * vector-builder.h (vector_builder::m_full_nelts): Change from
23365 unsigned int to poly_uint64.
23366 (vector_builder::full_nelts): Update prototype accordingly.
23367 (vector_builder::new_vector): Likewise.
23368 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
23369 (vector_builder::operator ==): Likewise.
23370 (vector_builder::finalize): Likewise.
23371 * int-vector-builder.h (int_vector_builder::int_vector_builder):
23372 Take the number of elements as a poly_uint64 rather than an
23374 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
23375 from unsigned int to poly_uint64.
23376 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
23377 (vec_perm_indices::new_vector): Likewise.
23378 (vec_perm_indices::length): Likewise.
23379 (vec_perm_indices::nelts_per_input): Likewise.
23380 (vec_perm_indices::input_nelts): Likewise.
23381 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
23382 number of elements per input as a poly_uint64 rather than an
23383 unsigned int. Use the original encoding for variable-length
23384 vectors, rather than clamping each individual element.
23385 For the second and subsequent elements in each pattern,
23386 clamp the step and base before clamping their sum.
23387 (vec_perm_indices::series_p): Handle polynomial element counts.
23388 (vec_perm_indices::all_in_range_p): Likewise.
23389 (vec_perm_indices_to_tree): Likewise.
23390 (vec_perm_indices_to_rtx): Likewise.
23391 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
23392 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
23393 (tree_vector_builder::new_binary_operation): Handle polynomial
23394 element counts. Return false if we need to know the number
23395 of elements at compile time.
23396 * fold-const.c (fold_vec_perm): Punt if the number of elements
23397 isn't known at compile time.
23399 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23401 * vec-perm-indices.h (vec_perm_builder): Change element type
23402 from HOST_WIDE_INT to poly_int64.
23403 (vec_perm_indices::element_type): Update accordingly.
23404 (vec_perm_indices::clamp): Handle polynomial element_types.
23405 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
23406 (vec_perm_indices::all_in_range_p): Likewise.
23407 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
23409 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
23410 polynomial vec_perm_indices element types.
23411 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
23412 * fold-const.c (fold_vec_perm): Likewise.
23413 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
23414 * tree-vect-generic.c (lower_vec_perm): Likewise.
23415 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
23416 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
23417 element type to HOST_WIDE_INT.
23419 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23420 Alan Hayward <alan.hayward@arm.com>
23421 David Sherwood <david.sherwood@arm.com>
23423 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
23424 rather than an int. Use plus_constant.
23425 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
23426 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
23428 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23429 Alan Hayward <alan.hayward@arm.com>
23430 David Sherwood <david.sherwood@arm.com>
23432 * calls.c (emit_call_1, expand_call): Change struct_value_size from
23433 a HOST_WIDE_INT to a poly_int64.
23435 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23436 Alan Hayward <alan.hayward@arm.com>
23437 David Sherwood <david.sherwood@arm.com>
23439 * calls.c (load_register_parameters): Cope with polynomial
23440 mode sizes. Require a constant size for BLKmode parameters
23441 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
23442 forces a parameter to be padded at the lsb end in order to
23443 fill a complete number of words, require the parameter size
23444 to be ordered wrt UNITS_PER_WORD.
23446 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23447 Alan Hayward <alan.hayward@arm.com>
23448 David Sherwood <david.sherwood@arm.com>
23450 * reload1.c (spill_stack_slot_width): Change element type
23451 from unsigned int to poly_uint64_pod.
23452 (alter_reg): Treat mode sizes as polynomial.
23454 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23455 Alan Hayward <alan.hayward@arm.com>
23456 David Sherwood <david.sherwood@arm.com>
23458 * reload.c (complex_word_subreg_p): New function.
23459 (reload_inner_reg_of_subreg, push_reload): Use it.
23461 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23462 Alan Hayward <alan.hayward@arm.com>
23463 David Sherwood <david.sherwood@arm.com>
23465 * lra-constraints.c (process_alt_operands): Reject matched
23466 operands whose sizes aren't ordered.
23467 (match_reload): Refer to this check here.
23469 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23470 Alan Hayward <alan.hayward@arm.com>
23471 David Sherwood <david.sherwood@arm.com>
23473 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
23474 that the mode size is in the set {1, 2, 4, 8, 16}.
23476 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23477 Alan Hayward <alan.hayward@arm.com>
23478 David Sherwood <david.sherwood@arm.com>
23480 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
23481 Use plus_constant instead of gen_rtx_PLUS.
23483 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23484 Alan Hayward <alan.hayward@arm.com>
23485 David Sherwood <david.sherwood@arm.com>
23487 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
23488 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
23489 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
23490 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
23491 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
23492 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
23493 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
23494 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
23495 * config/i386/i386.c (ix86_push_rounding): ...this new function.
23496 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
23498 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
23499 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
23500 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
23501 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
23502 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
23503 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
23504 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
23505 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
23506 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
23507 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
23509 * expr.c (emit_move_resolve_push): Treat the input and result
23510 of PUSH_ROUNDING as a poly_int64.
23511 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
23512 (emit_push_insn): Likewise.
23513 * lra-eliminations.c (mark_not_eliminable): Likewise.
23514 * recog.c (push_operand): Likewise.
23515 * reload1.c (elimination_effects): Likewise.
23516 * rtlanal.c (nonzero_bits1): Likewise.
23517 * calls.c (store_one_arg): Likewise. Require the padding to be
23518 known at compile time.
23520 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23521 Alan Hayward <alan.hayward@arm.com>
23522 David Sherwood <david.sherwood@arm.com>
23524 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
23525 Use plus_constant instead of gen_rtx_PLUS.
23527 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23528 Alan Hayward <alan.hayward@arm.com>
23529 David Sherwood <david.sherwood@arm.com>
23531 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
23532 rather than an int.
23534 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23535 Alan Hayward <alan.hayward@arm.com>
23536 David Sherwood <david.sherwood@arm.com>
23538 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
23539 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
23540 via stack temporaries. Treat the mode size as polynomial too.
23542 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23543 Alan Hayward <alan.hayward@arm.com>
23544 David Sherwood <david.sherwood@arm.com>
23546 * expr.c (expand_expr_real_2): When handling conversions involving
23547 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
23548 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
23549 as a poly_uint64 too.
23551 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23552 Alan Hayward <alan.hayward@arm.com>
23553 David Sherwood <david.sherwood@arm.com>
23555 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
23557 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23558 Alan Hayward <alan.hayward@arm.com>
23559 David Sherwood <david.sherwood@arm.com>
23561 * combine.c (can_change_dest_mode): Handle polynomial
23562 REGMODE_NATURAL_SIZE.
23563 * expmed.c (store_bit_field_1): Likewise.
23564 * expr.c (store_constructor): Likewise.
23565 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
23566 and polynomial REGMODE_NATURAL_SIZE.
23567 (gen_lowpart_common): Likewise.
23568 * reginfo.c (record_subregs_of_mode): Likewise.
23569 * rtlanal.c (read_modify_subreg_p): Likewise.
23571 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23572 Alan Hayward <alan.hayward@arm.com>
23573 David Sherwood <david.sherwood@arm.com>
23575 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
23576 numbers of elements.
23578 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23579 Alan Hayward <alan.hayward@arm.com>
23580 David Sherwood <david.sherwood@arm.com>
23582 * match.pd: Cope with polynomial numbers of vector elements.
23584 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23585 Alan Hayward <alan.hayward@arm.com>
23586 David Sherwood <david.sherwood@arm.com>
23588 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
23589 in a POINTER_PLUS_EXPR.
23591 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23592 Alan Hayward <alan.hayward@arm.com>
23593 David Sherwood <david.sherwood@arm.com>
23595 * omp-simd-clone.c (simd_clone_subparts): New function.
23596 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
23597 (ipa_simd_modify_function_body): Likewise.
23599 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23600 Alan Hayward <alan.hayward@arm.com>
23601 David Sherwood <david.sherwood@arm.com>
23603 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
23604 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
23605 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
23606 (expand_vector_condition, vector_element): Likewise.
23607 (subparts_gt): New function.
23608 (get_compute_type): Use subparts_gt.
23609 (count_type_subparts): Delete.
23610 (expand_vector_operations_1): Use subparts_gt instead of
23611 count_type_subparts.
23613 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23614 Alan Hayward <alan.hayward@arm.com>
23615 David Sherwood <david.sherwood@arm.com>
23617 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
23618 (vect_compile_time_alias): ...this new function. Do the calculation
23619 on poly_ints rather than trees.
23620 (vect_prune_runtime_alias_test_list): Update call accordingly.
23622 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23623 Alan Hayward <alan.hayward@arm.com>
23624 David Sherwood <david.sherwood@arm.com>
23626 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
23628 (vect_schedule_slp_instance): Likewise.
23630 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23631 Alan Hayward <alan.hayward@arm.com>
23632 David Sherwood <david.sherwood@arm.com>
23634 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
23635 constant and extern definitions for variable-length vectors.
23636 (vect_get_constant_vectors): Note that the number of units
23637 is known to be constant.
23639 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23640 Alan Hayward <alan.hayward@arm.com>
23641 David Sherwood <david.sherwood@arm.com>
23643 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
23644 of units as polynomial. Choose between WIDE and NARROW based
23647 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23648 Alan Hayward <alan.hayward@arm.com>
23649 David Sherwood <david.sherwood@arm.com>
23651 * tree-vect-stmts.c (simd_clone_subparts): New function.
23652 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
23654 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23655 Alan Hayward <alan.hayward@arm.com>
23656 David Sherwood <david.sherwood@arm.com>
23658 * tree-vect-stmts.c (vectorizable_call): Treat the number of
23659 vectors as polynomial. Use build_index_vector for
23660 IFN_GOMP_SIMD_LANE.
23662 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23663 Alan Hayward <alan.hayward@arm.com>
23664 David Sherwood <david.sherwood@arm.com>
23666 * tree-vect-stmts.c (get_load_store_type): Treat the number of
23667 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
23668 for variable-length vectors.
23669 (vectorizable_mask_load_store): Treat the number of units as
23670 polynomial, asserting that it is constant if the condition has
23671 already been enforced.
23672 (vectorizable_store, vectorizable_load): Likewise.
23674 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23675 Alan Hayward <alan.hayward@arm.com>
23676 David Sherwood <david.sherwood@arm.com>
23678 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
23679 of units as polynomial. Punt if we can't tell at compile time
23680 which vector contains the final result.
23682 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23683 Alan Hayward <alan.hayward@arm.com>
23684 David Sherwood <david.sherwood@arm.com>
23686 * tree-vect-loop.c (vectorizable_induction): Treat the number
23687 of units as polynomial. Punt on SLP inductions. Use an integer
23688 VEC_SERIES_EXPR for variable-length integer reductions. Use a
23689 cast of such a series for variable-length floating-point
23692 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23693 Alan Hayward <alan.hayward@arm.com>
23694 David Sherwood <david.sherwood@arm.com>
23696 * tree.h (build_index_vector): Declare.
23697 * tree.c (build_index_vector): New function.
23698 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
23699 of units as polynomial, forcibly converting it to a constant if
23700 vectorizable_reduction has already enforced the condition.
23701 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
23702 to create a {1,2,3,...} vector.
23703 (vectorizable_reduction): Treat the number of units as polynomial.
23704 Choose vectype_in based on the largest scalar element size rather
23705 than the smallest number of units. Enforce the restrictions
23708 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23709 Alan Hayward <alan.hayward@arm.com>
23710 David Sherwood <david.sherwood@arm.com>
23712 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
23713 number of units as polynomial.
23715 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23716 Alan Hayward <alan.hayward@arm.com>
23717 David Sherwood <david.sherwood@arm.com>
23719 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
23720 * target.def (autovectorize_vector_sizes): Return the vector sizes
23721 by pointer, using vector_sizes rather than a bitmask.
23722 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
23723 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
23724 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
23726 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
23727 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
23728 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
23729 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
23730 * omp-general.c (omp_max_vf): Likewise.
23731 * omp-low.c (omp_clause_aligned_alignment): Likewise.
23732 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
23733 * tree-vect-loop.c (vect_analyze_loop): Likewise.
23734 * tree-vect-slp.c (vect_slp_bb): Likewise.
23735 * doc/tm.texi: Regenerate.
23736 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
23738 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
23739 the vector size as a poly_uint64 rather than an unsigned int.
23740 (current_vector_size): Change from an unsigned int to a poly_uint64.
23741 (get_vectype_for_scalar_type): Update accordingly.
23742 * tree.h (build_truth_vector_type): Take the size and number of
23743 units as a poly_uint64 rather than an unsigned int.
23744 (build_vector_type): Add a temporary overload that takes
23745 the number of units as a poly_uint64 rather than an unsigned int.
23746 * tree.c (make_vector_type): Likewise.
23747 (build_truth_vector_type): Take the number of units as a poly_uint64
23748 rather than an unsigned int.
23750 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23751 Alan Hayward <alan.hayward@arm.com>
23752 David Sherwood <david.sherwood@arm.com>
23754 * target.def (get_mask_mode): Take the number of units and length
23755 as poly_uint64s rather than unsigned ints.
23756 * targhooks.h (default_get_mask_mode): Update accordingly.
23757 * targhooks.c (default_get_mask_mode): Likewise.
23758 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
23759 * doc/tm.texi: Regenerate.
23761 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23762 Alan Hayward <alan.hayward@arm.com>
23763 David Sherwood <david.sherwood@arm.com>
23765 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
23766 * omp-general.c (omp_max_vf): Likewise.
23767 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
23768 (expand_omp_simd): Handle polynomial safelen.
23769 * omp-low.c (omplow_simd_context): Add a default constructor.
23770 (omplow_simd_context::max_vf): Change from int to poly_uint64.
23771 (lower_rec_simd_input_clauses): Update accordingly.
23772 (lower_rec_input_clauses): Likewise.
23774 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23775 Alan Hayward <alan.hayward@arm.com>
23776 David Sherwood <david.sherwood@arm.com>
23778 * tree-vectorizer.h (vect_nunits_for_cost): New function.
23779 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
23780 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
23781 (vect_analyze_slp_cost): Likewise.
23782 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
23783 (vect_model_load_cost): Likewise.
23785 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23786 Alan Hayward <alan.hayward@arm.com>
23787 David Sherwood <david.sherwood@arm.com>
23789 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
23790 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
23791 from an unsigned int * to a poly_uint64_pod *.
23792 (calculate_unrolling_factor): New function.
23793 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
23795 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23796 Alan Hayward <alan.hayward@arm.com>
23797 David Sherwood <david.sherwood@arm.com>
23799 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
23800 from an unsigned int to a poly_uint64.
23801 (_loop_vec_info::slp_unrolling_factor): Likewise.
23802 (_loop_vec_info::vectorization_factor): Change from an int
23804 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
23805 (vect_get_num_vectors): New function.
23806 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
23807 (vect_get_num_copies): Use vect_get_num_vectors.
23808 (vect_analyze_data_ref_dependences): Change max_vf from an int *
23809 to an unsigned int *.
23810 (vect_analyze_data_refs): Change min_vf from an int * to a
23812 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
23813 than an unsigned HOST_WIDE_INT.
23814 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
23815 (vect_analyze_data_ref_dependence): Change max_vf from an int *
23816 to an unsigned int *.
23817 (vect_analyze_data_ref_dependences): Likewise.
23818 (vect_compute_data_ref_alignment): Handle polynomial vf.
23819 (vect_enhance_data_refs_alignment): Likewise.
23820 (vect_prune_runtime_alias_test_list): Likewise.
23821 (vect_shift_permute_load_chain): Likewise.
23822 (vect_supportable_dr_alignment): Likewise.
23823 (dependence_distance_ge_vf): Take the vectorization factor as a
23824 poly_uint64 rather than an unsigned HOST_WIDE_INT.
23825 (vect_analyze_data_refs): Change min_vf from an int * to a
23827 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
23828 vfm1 as a poly_uint64 rather than an int. Make the same change
23829 for the returned bound_scalar.
23830 (vect_gen_vector_loop_niters): Handle polynomial vf.
23831 (vect_do_peeling): Likewise. Update call to
23832 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
23833 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
23835 * tree-vect-loop.c (vect_determine_vectorization_factor)
23836 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
23837 (vect_get_known_peeling_cost): Likewise.
23838 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
23839 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
23840 (vect_transform_loop): Likewise. Use the lowest possible VF when
23841 updating the upper bounds of the loop.
23842 (vect_min_worthwhile_factor): Make static. Return an unsigned int
23843 rather than an int.
23844 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
23845 polynomial unroll factors.
23846 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
23847 (vect_make_slp_decision): Likewise.
23848 (vect_supported_load_permutation_p): Likewise, and polynomial
23850 (vect_analyze_slp_cost): Handle polynomial vf.
23851 (vect_slp_analyze_node_operations): Likewise.
23852 (vect_slp_analyze_bb_1): Likewise.
23853 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
23854 than an unsigned HOST_WIDE_INT.
23855 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
23856 (vectorizable_load): Handle polynomial vf.
23857 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
23859 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
23861 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23862 Alan Hayward <alan.hayward@arm.com>
23863 David Sherwood <david.sherwood@arm.com>
23865 * match.pd: Handle bit operations involving three constants
23866 and try to fold one pair.
23868 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23870 * tree-vect-loop-manip.c: Include gimple-fold.h.
23871 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
23872 niters_maybe_zero parameters. Handle other cases besides a step of 1.
23873 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
23874 Add a path that uses a step of VF instead of 1, but disable it
23876 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
23877 and niters_no_overflow parameters. Update calls to
23878 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
23879 Create a new SSA name if the latter choses to use a ste other
23880 than zero, and return it via niters_vector_mult_vf_var.
23881 * tree-vect-loop.c (vect_transform_loop): Update calls to
23882 vect_do_peeling, vect_gen_vector_loop_niters and
23883 slpeel_make_loop_iterate_ntimes.
23884 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
23885 (vect_gen_vector_loop_niters): Update declarations after above changes.
23887 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
23889 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
23890 128-bit round to integer instructions.
23891 (ceil<mode>2): Likewise.
23892 (btrunc<mode>2): Likewise.
23893 (round<mode>2): Likewise.
23895 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23897 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
23898 unaligned VSX load/store on P8/P9.
23899 (expand_block_clear): Allow the use of unaligned VSX
23900 load/store on P8/P9.
23902 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23904 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
23906 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
23907 swap associated with both a load and a store.
23909 2018-01-02 Andrew Waterman <andrew@sifive.com>
23911 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
23912 * config/riscv/riscv.md (clear_cache): Use it.
23914 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
23916 * web.c: Remove out-of-date comment.
23918 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23920 * expr.c (fixup_args_size_notes): Check that any existing
23921 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
23922 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
23923 (emit_single_push_insn): ...here.
23925 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23927 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
23928 (const_vector_encoded_nelts): New function.
23929 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
23930 (const_vector_int_elt, const_vector_elt): Declare.
23931 * emit-rtl.c (const_vector_int_elt_1): New function.
23932 (const_vector_elt): Likewise.
23933 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
23934 of CONST_VECTOR_ELT.
23936 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23938 * expr.c: Include rtx-vector-builder.h.
23939 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
23940 directly on the tree encoding.
23941 (const_vector_from_tree): Likewise.
23942 * optabs.c: Include rtx-vector-builder.h.
23943 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
23944 sequence of "u" values.
23945 * vec-perm-indices.c: Include rtx-vector-builder.h.
23946 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
23947 directly on the vec_perm_indices encoding.
23949 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23951 * doc/rtl.texi (const_vector): Describe new encoding scheme.
23952 * Makefile.in (OBJS): Add rtx-vector-builder.o.
23953 * rtx-vector-builder.h: New file.
23954 * rtx-vector-builder.c: Likewise.
23955 * rtl.h (rtx_def::u2): Add a const_vector field.
23956 (CONST_VECTOR_NPATTERNS): New macro.
23957 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
23958 (CONST_VECTOR_DUPLICATE_P): Likewise.
23959 (CONST_VECTOR_STEPPED_P): Likewise.
23960 (CONST_VECTOR_ENCODED_ELT): Likewise.
23961 (const_vec_duplicate_p): Check for a duplicated vector encoding.
23962 (unwrap_const_vec_duplicate): Likewise.
23963 (const_vec_series_p): Check for a non-duplicated vector encoding.
23964 Say that the function only returns true for integer vectors.
23965 * emit-rtl.c: Include rtx-vector-builder.h.
23966 (gen_const_vec_duplicate_1): Delete.
23967 (gen_const_vector): Call gen_const_vec_duplicate instead of
23968 gen_const_vec_duplicate_1.
23969 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
23970 (gen_const_vec_duplicate): Use rtx_vector_builder.
23971 (gen_const_vec_series): Likewise.
23972 (gen_rtx_CONST_VECTOR): Likewise.
23973 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
23974 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
23975 Build a new vector rather than modifying a CONST_VECTOR in-place.
23976 (handle_special_swappables): Update call accordingly.
23977 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
23978 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
23979 Build a new vector rather than modifying a CONST_VECTOR in-place.
23980 (handle_special_swappables): Update call accordingly.
23982 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23984 * simplify-rtx.c (simplify_const_binary_operation): Use
23985 CONST_VECTOR_ELT instead of XVECEXP.
23987 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23989 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
23990 the selector elements to be different from the data elements
23991 if the selector is a VECTOR_CST.
23992 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
23993 ssizetype for the selector.
23995 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23997 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
23998 before testing each element individually.
23999 * tree-vect-generic.c (lower_vec_perm): Likewise.
24001 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24003 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
24004 * selftest-run-tests.c (selftest::run_tests): Call it.
24005 * vector-builder.h (vector_builder::operator ==): New function.
24006 (vector_builder::operator !=): Likewise.
24007 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
24008 (vec_perm_indices::all_from_input_p): New function.
24009 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24010 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
24011 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
24012 instead of reading the VECTOR_CST directly. Detect whether both
24013 vector inputs are the same before constructing the vec_perm_indices,
24014 and update the number of inputs argument accordingly. Use the
24015 utility functions added above. Only construct sel2 if we need to.
24017 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24019 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
24020 the broadcast of the low byte.
24021 (expand_mult_highpart): Use an explicit encoding for the permutes.
24022 * optabs-query.c (can_mult_highpart_p): Likewise.
24023 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
24024 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24025 (vectorizable_bswap): Likewise.
24026 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
24027 explicit encoding for the power-of-2 permutes.
24028 (vect_permute_store_chain): Likewise.
24029 (vect_grouped_load_supported): Likewise.
24030 (vect_permute_load_chain): Likewise.
24032 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24034 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
24035 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
24036 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
24037 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24038 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
24039 (vect_gen_perm_mask_any): Likewise.
24041 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24043 * int-vector-builder.h: New file.
24044 * vec-perm-indices.h: Include int-vector-builder.h.
24045 (vec_perm_indices): Redefine as an int_vector_builder.
24046 (auto_vec_perm_indices): Delete.
24047 (vec_perm_builder): Redefine as a stand-alone class.
24048 (vec_perm_indices::vec_perm_indices): New function.
24049 (vec_perm_indices::clamp): Likewise.
24050 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
24051 (vec_perm_indices::new_vector): New function.
24052 (vec_perm_indices::new_expanded_vector): Update for new
24053 vec_perm_indices class.
24054 (vec_perm_indices::rotate_inputs): New function.
24055 (vec_perm_indices::all_in_range_p): Operate directly on the
24056 encoded form, without computing elided elements.
24057 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
24058 encoding. Update for new vec_perm_indices class.
24059 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
24060 the given vec_perm_builder.
24061 (expand_vec_perm_var): Update vec_perm_builder constructor.
24062 (expand_mult_highpart): Use vec_perm_builder instead of
24063 auto_vec_perm_indices.
24064 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
24065 vec_perm_indices instead of auto_vec_perm_indices. Use a single
24066 or double series encoding as appropriate.
24067 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
24068 vec_perm_indices instead of auto_vec_perm_indices.
24069 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24070 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24071 (vect_permute_store_chain): Likewise.
24072 (vect_grouped_load_supported): Likewise.
24073 (vect_permute_load_chain): Likewise.
24074 (vect_shift_permute_load_chain): Likewise.
24075 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
24076 (vect_transform_slp_perm_load): Likewise.
24077 (vect_schedule_slp_instance): Likewise.
24078 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24079 (vectorizable_mask_load_store): Likewise.
24080 (vectorizable_bswap): Likewise.
24081 (vectorizable_store): Likewise.
24082 (vectorizable_load): Likewise.
24083 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
24084 vec_perm_indices instead of auto_vec_perm_indices. Use
24085 tree_to_vec_perm_builder to read the vector from a tree.
24086 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
24087 vec_perm_builder instead of a vec_perm_indices.
24088 (have_whole_vector_shift): Use vec_perm_builder and
24089 vec_perm_indices instead of auto_vec_perm_indices. Leave the
24090 truncation to calc_vec_perm_mask_for_shift.
24091 (vect_create_epilog_for_reduction): Likewise.
24092 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
24093 from auto_vec_perm_indices to vec_perm_indices.
24094 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
24095 instead of changing individual elements.
24096 (aarch64_vectorize_vec_perm_const): Use new_vector to install
24097 the vector in d.perm.
24098 * config/arm/arm.c (expand_vec_perm_d::perm): Change
24099 from auto_vec_perm_indices to vec_perm_indices.
24100 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
24101 instead of changing individual elements.
24102 (arm_vectorize_vec_perm_const): Use new_vector to install
24103 the vector in d.perm.
24104 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
24105 Update vec_perm_builder constructor.
24106 (rs6000_expand_interleave): Likewise.
24107 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
24108 (rs6000_expand_interleave): Likewise.
24110 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24112 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
24113 to qimode could truncate the indices.
24114 * optabs.c (expand_vec_perm_var): Likewise.
24116 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24118 * Makefile.in (OBJS): Add vec-perm-indices.o.
24119 * vec-perm-indices.h: New file.
24120 * vec-perm-indices.c: Likewise.
24121 * target.h (vec_perm_indices): Replace with a forward class
24123 (auto_vec_perm_indices): Move to vec-perm-indices.h.
24124 * optabs.h: Include vec-perm-indices.h.
24125 (expand_vec_perm): Delete.
24126 (selector_fits_mode_p, expand_vec_perm_var): Declare.
24127 (expand_vec_perm_const): Declare.
24128 * target.def (vec_perm_const_ok): Replace with...
24129 (vec_perm_const): ...this new hook.
24130 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
24131 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
24132 * doc/tm.texi: Regenerate.
24133 * optabs.def (vec_perm_const): Delete.
24134 * doc/md.texi (vec_perm_const): Likewise.
24135 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
24136 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
24137 expand_vec_perm for constant permutation vectors. Assert that
24138 the mode of variable permutation vectors is the integer equivalent
24139 of the mode that is being permuted.
24140 * optabs-query.h (selector_fits_mode_p): Declare.
24141 * optabs-query.c: Include vec-perm-indices.h.
24142 (selector_fits_mode_p): New function.
24143 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
24144 is defined, instead of checking whether the vec_perm_const_optab
24145 exists. Use targetm.vectorize.vec_perm_const instead of
24146 targetm.vectorize.vec_perm_const_ok. Check whether the indices
24147 fit in the vector mode before using a variable permute.
24148 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
24149 vec_perm_indices instead of an rtx.
24150 (expand_vec_perm): Replace with...
24151 (expand_vec_perm_const): ...this new function. Take the selector
24152 as a vec_perm_indices rather than an rtx. Also take the mode of
24153 the selector. Update call to shift_amt_for_vec_perm_mask.
24154 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
24155 Use vec_perm_indices::new_expanded_vector to expand the original
24156 selector into bytes. Check whether the indices fit in the vector
24157 mode before using a variable permute.
24158 (expand_vec_perm_var): Make global.
24159 (expand_mult_highpart): Use expand_vec_perm_const.
24160 * fold-const.c: Includes vec-perm-indices.h.
24161 * tree-ssa-forwprop.c: Likewise.
24162 * tree-vect-data-refs.c: Likewise.
24163 * tree-vect-generic.c: Likewise.
24164 * tree-vect-loop.c: Likewise.
24165 * tree-vect-slp.c: Likewise.
24166 * tree-vect-stmts.c: Likewise.
24167 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
24169 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
24170 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
24171 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
24172 (aarch64_vectorize_vec_perm_const): ...this new function.
24173 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24174 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24175 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
24176 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
24177 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24178 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24179 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
24181 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
24182 check for NEON modes.
24183 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
24184 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
24185 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
24186 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
24188 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
24189 the old VEC_PERM_CONST conditions.
24190 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
24191 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
24192 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
24193 (ia64_vectorize_vec_perm_const_ok): Merge into...
24194 (ia64_vectorize_vec_perm_const): ...this new function.
24195 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
24196 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
24197 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
24198 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
24199 * config/mips/mips.c (mips_expand_vec_perm_const)
24200 (mips_vectorize_vec_perm_const_ok): Merge into...
24201 (mips_vectorize_vec_perm_const): ...this new function.
24202 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
24203 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
24204 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
24205 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
24206 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
24207 (rs6000_expand_vec_perm_const): Delete.
24208 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
24210 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24211 (altivec_expand_vec_perm_const_le): Take each operand individually.
24212 Operate on constant selectors rather than rtxes.
24213 (altivec_expand_vec_perm_const): Likewise. Update call to
24214 altivec_expand_vec_perm_const_le.
24215 (rs6000_expand_vec_perm_const): Delete.
24216 (rs6000_vectorize_vec_perm_const_ok): Delete.
24217 (rs6000_vectorize_vec_perm_const): New function.
24218 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
24219 an element count and rtx array.
24220 (rs6000_expand_extract_even): Update call accordingly.
24221 (rs6000_expand_interleave): Likewise.
24222 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
24223 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
24224 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
24225 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
24226 (rs6000_expand_vec_perm_const): Delete.
24227 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24228 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24229 (altivec_expand_vec_perm_const_le): Take each operand individually.
24230 Operate on constant selectors rather than rtxes.
24231 (altivec_expand_vec_perm_const): Likewise. Update call to
24232 altivec_expand_vec_perm_const_le.
24233 (rs6000_expand_vec_perm_const): Delete.
24234 (rs6000_vectorize_vec_perm_const_ok): Delete.
24235 (rs6000_vectorize_vec_perm_const): New function. Remove stray
24236 reference to the SPE evmerge intructions.
24237 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
24238 an element count and rtx array.
24239 (rs6000_expand_extract_even): Update call accordingly.
24240 (rs6000_expand_interleave): Likewise.
24241 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
24242 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
24244 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24246 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24248 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
24249 vector mode and that that mode matches the mode of the data
24251 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
24252 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
24253 directly using expand_vec_perm_1 when forcing selectors into
24255 (expand_vec_perm_var): New function, split out from expand_vec_perm.
24257 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24259 * optabs-query.h (can_vec_perm_p): Delete.
24260 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
24261 * optabs-query.c (can_vec_perm_p): Split into...
24262 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
24263 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
24264 particular selector is valid.
24265 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24266 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24267 (vect_grouped_load_supported): Likewise.
24268 (vect_shift_permute_load_chain): Likewise.
24269 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
24270 (vect_transform_slp_perm_load): Likewise.
24271 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24272 (vectorizable_bswap): Likewise.
24273 (vect_gen_perm_mask_checked): Likewise.
24274 * fold-const.c (fold_ternary_loc): Likewise. Don't take
24275 implementations of variable permutation vectors into account
24276 when deciding which selector to use.
24277 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
24278 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
24279 with a false third argument.
24280 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
24281 to test whether the constant selector is valid and can_vec_perm_var_p
24282 to test whether a variable selector is valid.
24284 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24286 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
24287 * optabs-query.c (can_vec_perm_p): Likewise.
24288 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
24289 instead of vec_perm_indices.
24290 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
24291 (vect_gen_perm_mask_checked): Likewise,
24292 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
24293 (vect_gen_perm_mask_checked): Likewise,
24295 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24297 * optabs-query.h (qimode_for_vec_perm): Declare.
24298 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
24299 (qimode_for_vec_perm): ...this new function.
24300 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
24302 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24304 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
24305 does not have a conditional at the top.
24307 2018-01-02 Richard Biener <rguenther@suse.de>
24309 * ipa-inline.c (big_speedup_p): Fix expression.
24311 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
24314 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
24317 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
24321 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
24322 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
24323 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
24324 cond_taken_branch_cost 3->4.
24326 2018-01-01 Jakub Jelinek <jakub@redhat.com>
24328 PR tree-optimization/83581
24329 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
24330 TODO_cleanup_cfg if any changes have been made.
24332 PR middle-end/83608
24333 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
24334 convert_modes if target mode has the right side, but different mode
24337 PR middle-end/83609
24338 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
24339 last argument when extracting from CONCAT. If either from_real or
24340 from_imag is NULL, use expansion through memory. If result is not
24341 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
24342 the parts directly to inner mode, if even that fails, use expansion
24345 PR middle-end/83623
24346 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
24347 check for bswap in mode rather than HImode and use that in expand_unop
24350 Copyright (C) 2018 Free Software Foundation, Inc.
24352 Copying and distribution of this file, with or without modification,
24353 are permitted in any medium without royalty provided the copyright
24354 notice and this notice are preserved.