1 2018-08-28 Jim Wilson <jimw@sifive.com>
3 * config/riscv/pic.md: Rewrite.
4 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
6 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
7 (SOFTF, default_load, softload, softstore): New.
9 2018-08-28 Jeff Law <law@redhat.com>
11 * fold-const.c (fold_binary_loc): Remove recently added assert.
13 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
15 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
16 to OP parmeter of generated function.
18 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
20 PR tree-optimization/87009
21 * match.pd: Add boolean optimizations.
23 2018-08-28 Martin Sebor <msebor@redhat.com>
26 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
27 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
28 (pass_walloca::gate): Use it.
29 (alloca_call_type): Same.
30 (pass_walloca::execute): Same.
31 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
33 2018-08-28 David Malcolm <dmalcolm@redhat.com>
35 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
36 GCC_VERSION for usage of "__gcc_dump_printf__" format from
39 2018-08-28 Richard Biener <rguenther@suse.de>
41 PR tree-optimization/87124
42 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
43 constants before looking up avail.
45 2018-08-28 Jakub Jelinek <jakub@redhat.com>
48 * calls.c (maybe_warn_nonstring_arg): Punt early if
49 warn_stringop_overflow is zero. Don't call get_range_strlen
50 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
51 Swap comparison operands to have constants on rhs. Only use
52 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
55 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
57 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
58 use of tree_to_shwi. Remove duplicated test for the size being
59 a whole number of bytes.
61 2018-08-28 Richard Biener <rguenther@suse.de>
63 PR tree-optimization/87117
64 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
65 Handle removed stmt without LHS (GIMPLE_NOP).
67 2018-08-28 Richard Biener <rguenther@suse.de>
69 PR tree-optimization/87117
70 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
71 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
73 2018-08-28 Richard Biener <rguenther@suse.de>
75 PR tree-optimization/87117
76 * tree-ssa-pre.c (compute_avail): Do not make expressions
77 with predicated values available.
78 (get_expr_value_id): Assert we do not run into predicated value
81 2018-08-28 Richard Biener <rguenther@suse.de>
83 PR tree-optimization/87117
84 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
86 (get_expr_operands): Handle STRING_CST like other decls.
88 2018-08-28 Martin Liska <mliska@suse.cz>
90 * tree.h: Update documentation of fndecl_built_in_p
94 2018-08-27 Jeff Law <law@redhat.com>
95 PR tree-optimization/87110
96 * tree-ssa-dse.c (compute_trims): Handle non-constant
99 2018-08-27 Martin Sebor <msebor@redhat.com>
101 PR tree-optimization/86914
102 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
104 2018-08-27 Martin Sebor <msebor@redhat.com>
106 PR tree-optimization/87112
107 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
108 the type of the bound argument.
110 2018-08-27 Jeff Law <law@redhat.com>
112 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
113 type does not have a TYPE_SIZE_UNIT.
115 2018-08-27 Steve Ellcey <sellcey@cavium.com>
117 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
118 with include of backend.h.
120 2018-08-27 Richard Biener <rguenther@suse.de>
122 PR tree-optimization/86927
123 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
124 use const cond reduction code.
126 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
128 PR tree-optimization/85758
129 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
131 2018-08-27 David Malcolm <dmalcolm@redhat.com>
134 * diagnostic-show-locus.c (class layout_range): Update for
135 conversion of show_caret_p to a tri-state.
136 (layout_range::layout_range): Likewise.
137 (make_range): Likewise.
138 (layout::maybe_add_location_range): Likewise.
139 (layout::should_print_annotation_line_p): Don't show annotation
140 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
141 (layout::get_state_at_point): Update for conversion of
142 show_caret_p to a tri-state. Bail out early for
143 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
144 underlining or source colorization.
145 (gcc_rich_location::add_location_if_nearby): Update for conversion
146 of show_caret_p to a tri-state.
147 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
148 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
150 (selftest::test_one_liner_labels): Likewise.
151 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
152 conversion of show_caret_p to a tri-state.
153 * pretty-print.c (text_info::set_location): Likewise.
154 * pretty-print.h (text_info::set_location): Likewise.
155 * substring-locations.c (format_warning_n_va): Likewise.
156 * tree-diagnostic.c (default_tree_printer): Likewise.
157 * tree-pretty-print.c (newline_and_indent): Likewise.
159 2018-08-27 David Malcolm <dmalcolm@redhat.com>
162 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
163 line above for line-insertion fix-it hints.
164 (selftest::test_fixit_insert_containing_newline): Update the
165 expected results, and add a test with line-numbering enabled.
167 2018-08-27 Martin Liska <mliska@suse.cz>
170 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
171 params with DECL_HAS_VALUE_EXPR_P.
173 2018-08-27 Martin Liska <mliska@suse.cz>
175 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
176 selected expansion strategy.
178 2018-08-27 Martin Liska <mliska@suse.cz>
180 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
181 * builtins.c (is_builtin_fn): Likewise.
182 * attribs.c (diag_attr_exclusions): Use new function
183 fndecl_built_in_p and remove check for FUNCTION_DECL if
185 (builtin_mathfn_code): Likewise.
186 (fold_builtin_expect): Likewise.
187 (fold_call_expr): Likewise.
188 (fold_builtin_call_array): Likewise.
189 (fold_call_stmt): Likewise.
190 (set_builtin_user_assembler_name): Likewise.
191 (is_simple_builtin): Likewise.
192 * calls.c (gimple_alloca_call_p): Likewise.
193 (maybe_warn_nonstring_arg): Likewise.
194 * cfgexpand.c (expand_call_stmt): Likewise.
195 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
196 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
197 (cgraph_node::verify_node): Likewise.
198 * cgraphclones.c (build_function_decl_skip_args): Likewise.
199 (cgraph_node::create_clone): Likewise.
200 * config/arm/arm.c (arm_insert_attributes): Likewise.
201 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
202 * dse.c (scan_insn): Likewise.
203 * expr.c (expand_expr_real_1): Likewise.
204 * fold-const.c (operand_equal_p): Likewise.
205 (fold_binary_loc): Likewise.
206 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
207 * gimple-low.c (lower_stmt): Likewise.
208 * gimple-pretty-print.c (dump_gimple_call): Likewise.
209 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
210 * gimple.c (gimple_build_call_from_tree): Likewise.
211 (gimple_call_builtin_p): Likewise.
212 (gimple_call_combined_fn): Likewise.
213 * gimplify.c (gimplify_call_expr): Likewise.
214 (gimple_boolify): Likewise.
215 (gimplify_modify_expr): Likewise.
216 (gimplify_addr_expr): Likewise.
217 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
218 * ipa-cp.c (determine_versionability): Likewise.
219 * ipa-fnsummary.c (compute_fn_summary): Likewise.
220 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
221 * ipa-split.c (visit_bb): Likewise.
222 (split_function): Likewise.
223 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
224 * lto-cgraph.c (input_node): Likewise.
225 * lto-streamer-out.c (write_symbol): Likewise.
226 * omp-low.c (setjmp_or_longjmp_p): Likewise.
227 (lower_omp_1): Likewise.
228 * predict.c (strip_predict_hints): Likewise.
229 * print-tree.c (print_node): Likewise.
230 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
231 * trans-mem.c (is_tm_irrevocable): Likewise.
232 (is_tm_load): Likewise.
233 (is_tm_simple_load): Likewise.
234 (is_tm_store): Likewise.
235 (is_tm_simple_store): Likewise.
236 (is_tm_abort): Likewise.
237 (tm_region_init_1): Likewise.
238 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
239 * tree-cfg.c (verify_gimple_call): Likewise.
240 (move_stmt_r): Likewise.
241 (stmt_can_terminate_bb_p): Likewise.
242 * tree-eh.c (lower_eh_constructs_2): Likewise.
243 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
244 * tree-inline.c (remap_gimple_stmt): Likewise.
246 (estimate_num_insns): Likewise.
247 (fold_marked_statements): Likewise.
248 * tree-sra.c (scan_function): Likewise.
249 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
250 (optimize_stack_restore): Likewise.
251 (pass_fold_builtins::execute): Likewise.
252 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
253 (mark_all_reaching_defs_necessary_1): Likewise.
254 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
255 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
256 (pass_forwprop::execute): Likewise.
257 * tree-ssa-loop-im.c (stmt_cost): Likewise.
258 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
259 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
260 * tree-ssa-strlen.c (get_string_length): Likewise.
261 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
262 (find_func_aliases_for_call): Likewise.
263 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
264 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
265 * tree-tailcall.c (find_tail_calls): Likewise.
266 * tree.c (need_assembler_name_p): Likewise.
267 (free_lang_data_in_decl): Likewise.
268 (get_call_combined_fn): Likewise.
269 * ubsan.c (is_ubsan_builtin_p): Likewise.
270 * varasm.c (incorporeal_function_p): Likewise.
271 * tree.h (DECL_BUILT_IN): Remove and replace with
273 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
274 (fndecl_built_in_p): New.
276 2018-08-27 Martin Liska <mliska@suse.cz>
278 PR tree-optimization/86847
279 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
280 Dump also subtree probability.
281 (switch_decision_tree::do_jump_if_equal): New function.
282 (switch_decision_tree::emit_case_nodes): Handle special
283 situations in balanced tree that can be emitted much simpler.
284 Fix calculation of probabilities that happen in tree expansion.
285 * tree-switch-conversion.h (struct cluster): Add
287 (struct simple_cluster): Likewise.
288 (struct case_tree_node): Add new function has_child.
289 (do_jump_if_equal): New.
291 2018-08-27 Martin Liska <mliska@suse.cz>
293 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
294 Add new argument to bit_test_cluster constructor.
295 (bit_test_cluster::emit): Set bits really number of values
297 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
298 probability argument.
299 * tree-switch-conversion.h (struct bit_test_cluster):
300 Add m_handles_entire_switch.
302 2018-08-27 Martin Liska <mliska@suse.cz>
304 PR tree-optimization/86702
305 * tree-switch-conversion.c (jump_table_cluster::emit):
306 Make probabilities even for values in jump table
307 according to number of cases handled.
308 (switch_decision_tree::compute_cases_per_edge): Pass
309 argument to reset_out_edges_aux function.
310 (switch_decision_tree::analyze_switch_statement): Likewise.
311 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
314 2018-08-27 Martin Liska <mliska@suse.cz>
316 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
317 cfun argument explicitly.
318 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
319 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
320 function gimple_switch_default_bb.
321 (convert_switch_statements):
323 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
324 * stmt.c (label_to_block_fn): Use label_to_block and pass
325 cfun argument explicitly and use gimple_switch_label_bb.
326 (expand_case): Likewise.
327 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
328 cfun argument explicitly. Likewise.
329 (make_edges_bb): Likewise.
330 (make_cond_expr_edges): Likewise.
331 (get_cases_for_edge): Likewise.
332 (make_gimple_switch_edges): Likewise.
333 (label_to_block_fn): Likewise.
334 (label_to_block): Likewise.
335 (make_goto_expr_edges): Likewise.
336 (make_gimple_asm_edges): Likewise.
337 (main_block_label): Likewise.
338 (group_case_labels_stmt): Likewise.
339 (find_taken_edge_computed_goto): Likewise.
340 (find_taken_edge_switch_expr): Likewise.
341 (gimple_verify_flow_info): Likewise.
342 (gimple_redirect_edge_and_branch): Likewise.
343 (gimple_switch_label_bb): New function.
344 (gimple_switch_default_bb): Likewise.
345 (gimple_switch_edge): Likewise.
346 (gimple_switch_default_edge): Likewise.
347 * tree-cfg.h (label_to_block_fn): Remove and replace ...
348 (label_to_block): ... with this.
349 (gimple_switch_label_bb): New.
350 (gimple_switch_default_bb): Likewise.
351 (gimple_switch_edge): Likewise.
352 (gimple_switch_default_edge): Likewise.
353 * tree-cfgcleanup.c (convert_single_case_switch): Use
354 new gimple functions and pass new argument to label_to_block.
355 (cleanup_control_flow_bb):
356 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
357 cfun argument explicitly.
358 (make_eh_edges): Likewise.
359 (redirect_eh_dispatch_edge): Likewise.
360 (lower_resx): Likewise.
361 (lower_eh_dispatch): Likewise.
362 (maybe_remove_unreachable_handlers): Likewise.
363 (unsplit_eh): Likewise.
364 (cleanup_empty_eh): Likewise.
365 (verify_eh_edges): Likewise.
366 (verify_eh_dispatch_edge): Likewise.
367 * tree-ssa-dom.c (record_edge_info): Likewise.
368 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
369 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
370 (thread_through_normal_block): Likewise.
371 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
372 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
373 * tree-switch-conversion.c (switch_conversion::collect): Use new
375 (switch_conversion::check_final_bb): Likewise.
376 (switch_conversion::gather_default_values): Pass new argument
378 (switch_conversion::build_constructors): Likewise.
379 (switch_decision_tree::compute_cases_per_edge): Use new
380 gimple_switch_edge function.
381 (switch_decision_tree::analyze_switch_statement): Pass new argument
383 (switch_decision_tree::try_switch_expansion): Use
384 gimple_switch_default_edge.
385 * tree-vrp.c (find_switch_asserts): Pass new argument
387 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
388 (vr_values::simplify_switch_using_ranges): Likewise.
390 2018-08-27 Richard Biener <rguenther@suse.de>
392 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
393 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
395 * tree-ssa-sccvn.h (struct vn_pval): New structure.
396 (struct vn_nary_op_s): Add unwind_to member. Add
397 predicated_values flag and put result into a union together
398 with a linked list of vn_pval.
399 (struct vn_ssa_aux): Add name member to make maintaining
400 a map of SSA name to vn_ssa_aux possible. Remove no longer
401 needed info, dfsnum, low, visited, on_sccstack, use_processed
402 and range_info_anti_range_p members.
403 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
404 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
406 (vn_valueize): New global.
407 (vn_context_bb): Likewise.
408 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
409 VN_INFO_PTR_INFO): Remove.
410 * tree-ssa-sccvn.c: ... (rewrite)
411 (pass_fre::execute): For -O2+ initialize loops and run
412 RPO VN in optimistic mode (iterating). For -O1 and -Og
413 run RPO VN in non-optimistic mode.
414 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
415 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
416 * doc/invoke.texi (sccvn-max-scc-size): Remove.
417 (rpo-vn-max-loop-depth): Document.
418 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
419 when valuezing the VUSE signals we walked out of the region.
420 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
421 (phi_translate): Set VN context block to use for availability
423 (compute_avail): Likewise.
424 (pre_valueize): New function.
425 (pass_pre::execute): Adjust to the RPO VN API.
427 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
428 (propagate_constants_for_unrolling): Remove.
429 (tree_unroll_loops_completely): Perform value-numbering
430 on the unrolled bodies loop parent.
432 2018-08-27 Richard Biener <rguenther@suse.de>
434 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
435 for partial antic compute.
437 2018-08-27 Jakub Jelinek <jakub@redhat.com>
439 PR rtl-optimization/87065
440 * combine.c (simplify_if_then_else): Formatting fix.
441 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
443 (known_cond): Don't return const_true_rtx for vector modes. Use
444 CONST0_RTX instead of const0_rtx. Formatting fixes.
446 2018-08-27 Martin Liska <mliska@suse.cz>
448 PR gcov-profile/87069
449 * gcov.c (process_file): Record files already processed
450 and warn about a file being processed multiple times.
452 2018-08-27 Martin Liska <mliska@suse.cz>
455 * config/aarch64/aarch64.c (aarch64_override_options_internal):
456 Set default values for x_aarch64_*_string strings.
457 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
458 prefix. For -mabi do not print '=ABI' in help and use
459 <option_value> format for -msve-vector-bits and -moverride
462 2018-08-26 Jeff Law <law@redhat.com>
464 * config/mips/frame-header-opt.c: Include "backend.h" rather than
467 2018-08-26 Marek Polacek <polacek@redhat.com>
469 PR c++/87029, Implement -Wredundant-move.
470 * doc/invoke.texi: Document -Wredundant-move.
472 2018-08-25 Martin Sebor <msebor@redhat.com>
474 PR tree-optimization/87059
475 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
476 to the same type as the other.
477 * fold-const.c (fold_binary_loc): Assert expectation.
479 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
481 * config/darwin.c (machopic_legitimize_pic_address): Clean up
482 extraneous parentheses, dead code section and formatting.
484 2018-08-24 David Malcolm <dmalcolm@redhat.com>
487 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
488 wide enough for jumps in the line-numbering to be visible.
489 (layout::print_gap_in_line_numbering): New member function.
490 (layout::calculate_line_spans): When using line numbering, merge
491 line spans that are only 1 line apart.
492 (diagnostic_show_locus): When printing line numbers, show gaps in
493 line numbering directly, rather than printing headers.
494 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
495 line-numbering with multiple line spans.
496 (selftest::test_fixit_insert_containing_newline_2): Add test of
497 line-numbering, in which the spans are close enough to be merged.
499 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
501 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
502 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
503 * tree-vrp.c (range_is_nonnull): Remove.
504 (range_includes_zero_p): Accept value_range instead of min/max.
505 (extract_range_from_binary_expr_1): Do not early bail on
507 Use range_includes_zero_p instead of range_is_nonnull.
508 (extract_range_from_unary_expr): Use range_includes_zero_p instead
510 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
511 special case VR_ANTI_RANGE.
512 (vrp_finalize): Same.
513 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
515 (range_is_nonnull): Remove.
516 * vr-values.c (vrp_stmt_computes_nonzero): Use
517 range_includes_zero_p instead of range_is_nonnull.
518 (extract_range_basic): Pass value_range to range_includes_zero_p
519 instead of range_is_nonnull.
521 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
523 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
524 * emit-rtl.h (rtl_data): Remove return_bnd.
525 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
526 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
527 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
528 (POINTER_BOUNDS_MODE): Remove definition.
529 (make_pointer_bounds_mode): Remove.
530 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
531 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
532 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
533 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
534 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
535 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
536 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
538 * config/i386/i386-modes.def (BND32, BND64): Remove.
539 * config/i386/i386.c (dbx_register_map): Remove bound registers.
540 (dbx64_register_map): Ditto.
541 (svr4_dbx_register_map): Ditto.
542 (indirect_thunk_bnd_needed): Remove.
543 (indirect_thunks_bnd_used): Ditto.
544 (indirect_return_bnd_needed): Ditto.
545 (indirect_return_via_cx_bnd): Ditto.
546 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
547 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
548 (output_indirect_thunk): Ditto. Remove need_prefix argument.
549 (output_indirect_thunk_function): Remove handling of
550 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
551 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
552 (ix86_save_reg): Remove handling of crtl->return_bnd.
553 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
554 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
555 and UNSPEC_BNDLX_ADDR.
556 (ix86_output_indirect_branch_via_reg): Remove handling of
557 indirect_thunk_prefix_bnd.
558 (ix86_output_indirect_branch_via_push): Ditto.
559 (ix86_output_function_return): Ditto.
560 (ix86_output_indirect_function_return): Ditto.
561 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
562 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
563 (CALL_USED_REGISTERS): Ditto.
564 (REG_ALLOC_ORDER): Update for removal of bound registers.
565 (HI_REGISTER_NAMES): Ditto.
566 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
567 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
568 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
569 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
570 (FIRST_PSEUDO_REG): Update.
571 (BND): Remove mode iterator.
572 * config/i386/predicates.md (bnd_mem_operator): Remove.
574 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
576 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
579 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
581 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
582 the case in which the permute needs only a single element and
583 repeats for every vector of the result. Extend that case to
584 handle variable-length vectors.
585 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
587 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
590 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
591 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
593 2018-08-24 Richard Biener <rguenther@suse.de>
595 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
596 bb_flags_allocated members.
597 (auto_flag): New RAII class for allocating flags.
598 (auto_edge_flag): New RAII class for allocating edge flags.
599 (auto_bb_flag): New RAII class for allocating bb flags.
600 * cfgloop.c (verify_loop_structure): Allocate temporary edge
602 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
603 in favor of temporarily allocated BB flag.
604 * hsa-brig.c: Re-order includes.
605 * hsa-dump.c: Likewise.
606 * hsa-regalloc.c: Likewise.
607 * print-rtl.c: Likewise.
608 * profile-count.c: Likewise.
610 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
613 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
616 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
619 * wide-int-range.cc (wide_int_range_div): Do not ignore result
620 from wide_int_range_multiplicative_op.
622 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
624 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
627 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
629 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
632 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
634 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
635 full GENERIC expression used for replacement.
637 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
639 * tree-vrp.c (abs_extent_range): Remove.
640 (extract_range_into_wide_ints): Pass wide ints by reference.
641 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
642 Pass wide ints by reference in all calls to
643 extract_range_into_wide_ints.
644 * wide-int-range.cc (wide_int_range_div): New.
645 * wide-int-range.h (wide_int_range_div): New.
646 (wide_int_range_includes_zero_p): New.
647 (wide_int_range_zero_p): New.
649 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
651 * config/aarch64/aarch64.md (arches): New enum.
652 (arch): New enum attr.
653 (arch_enabled): New attr.
654 (enabled): Now uses arch_enabled only.
655 (simd, sve, fp16): Removed attribute.
656 (fp): Attr now defined in terms of 'arch'.
657 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
658 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
659 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
660 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
661 attributes into 'arch'.
662 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
663 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
664 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
665 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
666 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
667 'simd' attribute into 'arch'.
668 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
669 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
670 Convert use of 'fp' attribute to 'arch'.
671 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
672 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
674 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
675 (different modes) Merge 'fp' and 'simd' into 'arch'.
676 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
679 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
681 PR rtl-optimization/87026
682 * expmed.c (canonicalize_comparison): If we can no longer create
683 pseudoregisters, don't.
685 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
688 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
690 * config/arm/arm.c (speculation_barrier_libfunc): New static
692 (arm_init_libfuncs): Initialize it.
693 (arm_emit_speculation_barrier): New function.
694 * config/arm/arm.md (speculation_barrier): Call
695 arm_emit_speculation_barrier for architectures that do not have
697 (speculation_barrier_insn): Only match on Armv7 or later.
699 2018-08-23 Richard Biener <rguenther@suse.de>
702 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
705 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
707 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
708 of single-vector TBLs.
709 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
712 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
715 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
716 aarch64_evpc_tbl guard.
718 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
720 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
723 2018-08-22 Martin Sebor <msebor@redhat.com>
726 * tree-pretty-print.c (pretty_print_string): Add argument.
727 (dump_generic_node): Call to pretty_print_string with string size.
729 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
731 PR rtl-optimization/86771
732 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
733 of two SETs into those two SETs, one to be placed at i2, if that SETs
734 destination is modified between i2 and i3.
736 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
738 PR tree-optimization/86725
739 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
741 (vect_analyze_scalar_cycles_1): Check it.
743 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
745 PR tree-optimization/86725
746 * tree-vect-loop.c (vect_is_simple_reduction): When treating
747 an outer loop phi as a double reduction, make sure that the
748 single user of the phi result is an inner loop phi.
750 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
752 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
753 grouped stores with gaps to a strided group.
755 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
757 * tree-vect-stmts.c (get_group_load_store_type)
758 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
759 first statement in a group.
761 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
763 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
764 the sequence used in gcc/gcc.c.
766 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
769 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
772 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
774 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
775 Darwin10-specific unwinder-shim.
776 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
777 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
778 New to cater for Darwin10 Rosetta.
780 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
782 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
783 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
785 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
790 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
791 (dwarf2out_switch_text_section): Generate a local label for the
792 second function sub-section and apply it as the second FDE start
794 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
795 second sub-section start.
797 2018-08-22 Richard Biener <rguenther@suse.de>
799 PR tree-optimization/86988
800 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
802 2018-08-22 Richard Biener <rguenther@suse.de>
804 PR tree-optimization/86945
805 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
807 2018-08-22 Alexandre Oliva <oliva@adacore.com>
809 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
810 a comment about how uses of r2 for .sdata2 come about.
812 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
814 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
816 2018-08-21 Marek Polacek <polacek@redhat.com>
818 PR c++/86981, Implement -Wpessimizing-move.
819 * doc/invoke.texi: Document -Wpessimizing-move.
821 2018-08-21 Jan Hubicka <jh@suse.cz>
823 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
824 * tree.h (is_redundant_typedef): Remove.
825 * dwarf2out.c (is_redundant_typedef): Turn into static function.
827 2018-08-21 Jan Hubicka <jh@suse.cz>
829 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
832 2018-08-21 Tamar Christina <tamar.christina@arm.com>
834 * expmed.c (extract_low_bits): Reject invalid subregs early.
836 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
839 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
842 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
844 * config/vxworks.h: Guard vxworks_asm_out_constructor and
845 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
846 * config/vxworks.c: Likewise.
848 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
850 * config/vxworks.c: Set targetm.have_ctors_dtors
851 if HAVE_INITFINI_ARRAY_SUPPORT.
852 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
853 if HAVE_INITFINI_ARRAY_SUPPORT.
855 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
857 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
858 default search path for VxWorks < 7.
860 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
862 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
863 (get_format_string): Refer to c_getstr.
865 2018-08-21 Tom de Vries <tdevries@suse.de>
867 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
868 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
869 (debuginfo_early_stop): Declare.
870 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
871 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
872 (debuginfo_early_stop): New function.
873 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
874 and debuginfo_early_stop.
875 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
876 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
877 (general_init): Call debuginfo_early_init.
878 (finalize): Call debuginfo_fini.
879 (do_compile): Call debuginfo_init.
880 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
882 (@item -fdump-debug, @item -fdump-earlydebug): Add.
884 2018-08-21 Tom de Vries <tdevries@suse.de>
886 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
887 flag_dump_noaddr and flag_dump_unnumbered.
889 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
891 * wide-int-range.cc (wide_int_range_abs): New.
892 (wide_int_range_order_set): Rename from wide_int_range_min_max.
893 * wide-int-range.h (wide_int_range_abs): New.
894 (wide_int_range_min_max): New.
895 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
896 case to call wide_int_range_abs.
897 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
898 (extract_range_from_abs_expr): Delete.
900 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
903 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
904 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
907 2018-08-20 Nathan Sidwell <nathan@acm.org>
908 Jeff Law <law@redhat.com>
910 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
911 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
913 2018-08-20 David Malcolm <dmalcolm@redhat.com>
916 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
917 (decl_attributes): Likewise.
918 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
920 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
921 * diagnostic-core.h (class auto_diagnostic_group): New class.
922 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
923 (diagnostic_report_diagnostic): Handle the first diagnostics within
925 (emit_diagnostic): Add auto_diagnostic_group instance.
927 (inform_n): Likewise.
929 (warning_at): Likewise.
930 (warning_n): Likewise.
932 (permerror): Likewise.
935 (error_at): Likewise.
937 (fatal_error): Likewise.
938 (internal_error): Likewise.
939 (internal_error_no_backtrace): Likewise.
940 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
941 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
942 * diagnostic.h (struct diagnostic_context): Add fields
943 "diagnostic_group_nesting_depth",
944 "diagnostic_group_emission_count", "begin_group_cb",
946 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
947 Add auto_diagnostic_group instance(s).
948 (find_explicit_erroneous_behavior): Likewise.
949 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
950 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
951 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
952 (gimplify_va_arg_expr): Likewise.
953 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
954 (HSA_SORRY_AT): Likewise.
955 * ipa-devirt.c (compare_virtual_tables): Likewise.
956 (warn_odr): Likewise.
957 * multiple_target.c (expand_target_clones): Likewise.
958 * opts-common.c (cmdline_handle_error): Likewise.
959 * reginfo.c (globalize_reg): Likewise.
960 * substring-locations.c (format_warning_n_va): Likewise.
961 * tree-inline.c (expand_call_inline): Likewise.
962 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
963 * tree-ssa-loop-niter.c
964 (do_warn_aggressive_loop_optimizations): Likewise.
965 * tree-ssa-uninit.c (warn_uninit): Likewise.
966 * tree.c (warn_deprecated_use): Likewise.
968 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
971 * config/i386/i386.md (eh_return): Always update EH return
972 address in word_mode.
974 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
976 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
977 TARGET_SPLIT_COMPLEX_ARG is defined.
979 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
981 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
983 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
986 * expr.c (expand_assignment): Assert that bitpos is positive.
987 (store_field): Likewise
988 (expand_expr_real_1): Make sure that bitpos is positive.
989 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
992 2018-08-20 Nathan Sidwell <nathan@acm.org>
994 * Makefile.in (CPP_ID_DATA_H): Delete.
995 (CPP_INTERNAL_H): Don't add it.
996 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
997 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
999 2018-08-20 Richard Biener <rguenther@suse.de>
1001 PR tree-optimization/78655
1002 * tree-vrp.c (extract_range_from_binary_expr_1): Make
1003 pointer + offset nonnull if either operand is nonnull work.
1005 2018-08-20 Tom de Vries <tdevries@suse.de>
1007 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
1008 unless the referenced die describes the added property using
1009 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
1010 Otherwise, add a DW_AT_location to the referenced die.
1012 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
1015 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
1016 register_operand when calling ix86_set_reg_reg_cost.
1017 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
1018 Set *total to 0 for operands that satisfy x86_64_immediate_operand
1019 predicate and to 1 otherwise.
1021 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
1023 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
1024 emit a diagnostic that it is not supported and reset the option.
1025 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
1026 supported and consume the option. (ASM_FINAL_SPEC): New.
1028 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
1030 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
1033 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
1035 C-SKY port: Documentation
1037 * doc/extend.texi (C-SKY Function Attributes): New section.
1038 * doc/invoke.texi (Option Summary): Add C-SKY options.
1039 (C-SKY Options): New section.
1040 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
1042 2018-08-17 Jojo <jijie_rong@c-sky.com>
1043 Huibin Wang <huibin_wang@c-sky.com>
1044 Sandra Loosemore <sandra@codesourcery.com>
1045 Chung-Lin Tang <cltang@codesourcery.com>
1047 C-SKY port: Backend implementation
1049 * config/csky/*: New.
1050 * common/config/csky/*: New.
1052 2018-08-17 Jojo <jijie_rong@c-sky.com>
1053 Huibin Wang <huibin_wang@c-sky.com>
1054 Sandra Loosemore <sandra@codesourcery.com>
1055 Chung-Lin Tang <cltang@codesourcery.com>
1056 Andrew Jenner <andrew@codesourcery.com>
1058 C-SKY port: Configury
1060 * config.gcc (csky-*-*): New.
1061 * configure.ac: Add csky to targets for dwarf2 debug_line support.
1062 * configure: Regenerated.
1064 2018-08-17 David Malcolm <dmalcolm@redhat.com>
1066 * dump-context.h: Include "dumpfile.h".
1067 (dump_context::dump_printf_va): Convert final param from va_list
1068 to va_list *. Convert from ATTRIBUTE_PRINTF to
1069 ATTRIBUTE_GCC_DUMP_PRINTF.
1070 (dump_context::dump_printf_loc_va): Likewise.
1071 * dumpfile.c: Include "stringpool.h".
1072 (make_item_for_dump_printf_va): Delete.
1073 (make_item_for_dump_printf): Delete.
1074 (class dump_pretty_printer): New class.
1075 (dump_pretty_printer::dump_pretty_printer): New ctor.
1076 (dump_pretty_printer::emit_items): New member function.
1077 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
1079 (dump_pretty_printer::emit_item): New member function.
1080 (dump_pretty_printer::stash_item): New member function.
1081 (dump_pretty_printer::format_decoder_cb): New member function.
1082 (dump_pretty_printer::decode_format): New member function.
1083 (dump_context::dump_printf_va): Reimplement in terms of
1084 dump_pretty_printer.
1085 (dump_context::dump_printf_loc_va): Convert final param from va_list
1087 (dump_context::begin_scope): Reimplement call to
1088 make_item_for_dump_printf.
1089 (dump_printf): Update for change to dump_printf_va.
1090 (dump_printf_loc): Likewise.
1091 (selftest::test_capture_of_dump_calls): Convert "stmt" from
1092 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
1093 with %T, %E, and %G.
1094 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
1095 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
1096 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
1097 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
1098 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
1099 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
1100 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
1101 within a dump_printf_loc call to "%wu".
1102 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
1103 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
1104 missing space after "=".
1105 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
1106 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
1107 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
1108 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
1109 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
1110 duplicate "vectorized" from message.
1112 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1114 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
1115 polyNxK_t element's TYPE_STRING_FLAG.
1117 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
1119 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
1120 (they were unnamed before). Fix comments.
1122 2018-08-17 Nathan Sidwell <nathan@acm.org>
1124 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
1126 2018-08-17 Richard Biener <rguenther@suse.de>
1128 PR tree-optimization/86841
1129 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
1131 2018-08-17 Martin Liska <mliska@suse.cz>
1133 * common.opt: Remove Warn, Init and Report for options with
1134 Ignore/Deprecated flag. Warning is done automatically for
1136 * config/i386/i386.opt: Likewise.
1137 * config/ia64/ia64.opt: Likewise.
1138 * config/rs6000/rs6000.opt: Likewise.
1139 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
1140 Remove usage of flag_check_pointer_bounds.
1141 * lto-wrapper.c (merge_and_complain): Do not handle
1142 OPT_fcheck_pointer_bounds.
1143 (append_compiler_options): Likewise.
1144 * opt-functions.awk: Do not handle Deprecated.
1145 * optc-gen.awk: Check that Var, Report and Init are not
1146 used for an option with Ignore/Deprecated flag.
1147 * opts-common.c (decode_cmdline_option): Do not report
1149 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
1151 * opts.h (struct cl_option): Remove cl_deprecated flag.
1152 (CL_ERR_DEPRECATED): Remove error enum value.
1154 2018-08-17 Richard Biener <rguenther@suse.de>
1157 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
1158 across a va-arg-pack using call adjust its return value accordingly.
1160 2018-08-16 Martin Sebor <msebor@redhat.com>
1162 PR tree-optimization/86853
1163 * gimple-ssa-sprintf.c (struct format_result): Rename member.
1164 (struct fmtresult): Add member and initialize it in ctors.
1165 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
1166 (format_string): Handle %S the same as %ls. Set MAYFAIL.
1167 (format_directive): Set POSUNDER4K when MAYFAIL is set.
1168 (parse_directive): Handle %C same as %c.
1169 (sprintf_dom_walker::compute_format_length): Adjust.
1170 (is_call_safe): Adjust.
1172 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1174 * builtins.c (c_strlen): Add new parameter eltsize. Use it
1175 for determining how to count the elements.
1176 * builtins.h (c_strlen): Adjust prototype.
1177 * expr.c (string_constant): Add new parameter mem_size.
1178 Set *mem_size appropriately.
1179 * expr.h (string_constant): Adjust protoype.
1180 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
1181 * gimple-fold.h (get_range_strlen): Adjust prototype.
1182 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
1183 (format_string): Call get_string_length with eltsize.
1185 2018-08-16 David Malcolm <dmalcolm@redhat.com>
1187 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
1188 to emit the span, rather than setting it as the prefix.
1190 2018-08-16 David Malcolm <dmalcolm@redhat.com>
1192 * diagnostic-show-locus.c (layout::start_annotation_line): Add
1193 "margin_char" parameter, defaulting to space. Use it in place
1194 of pp_space for the initial part of the margin.
1195 (layout::print_leading_fixits): Use '+' when filling the margin
1196 of line-insertion fix-it hints.
1198 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1200 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
1203 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1205 * config/rs6000/altivec.md: Don't set length attribute to the default
1207 * config/rs6000/darwin.md: Ditto.
1208 * config/rs6000/dfp.md: Ditto.
1209 * config/rs6000/htm.md: Ditto.
1210 * config/rs6000/rs6000.md: Ditto.
1211 * config/rs6000/sync.md: Ditto.
1212 * config/rs6000/vsx.md: Ditto.
1214 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1216 * config/rs6000/altivec.md: Don't set length attribute to the default
1217 value, for branch instructions.
1218 * config/rs6000/darwin.md: Ditto.
1219 * config/rs6000/rs6000.md: Ditto.
1221 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1223 * config/rs6000/rs6000.md (length): Always define as const_int 4.
1224 (unnamed conditional branch define_insn): Set length to 4 or 8
1225 depending on offset.
1226 (<bd>_<mode>): Similar, for alternative 0.
1227 (<bd>tf_<mode>): Ditto.
1229 2018-08-16 Tamar Christina <tamar.christina@arm.com>
1231 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
1233 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
1235 * doc/rtl.texi: Replace old RTX class names with new names.
1238 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
1240 * expmed.h (canonicalize_comparison): New declaration.
1241 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
1242 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
1243 * optabs.c (prepare_cmp_insn): Likewise.
1244 * rtl.h (unsigned_condition_p): New function which checks if a
1245 comparison operator is unsigned.
1247 2018-08-16 Nathan Sidwell <nathan@acm.org>
1249 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
1250 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
1252 2018-08-16 Tamar Christina <tamar.christina@arm.com>
1255 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
1256 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
1257 (mov<mov>): ..this and enable unconditionally.
1259 2018-08-16 Tamar Christina <tamar.christina@arm.com>
1261 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
1263 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
1265 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
1266 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
1267 "Common" with "Target".
1269 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
1271 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
1272 * doc/invoke.texi (mmitigate-rop): Remove.
1273 * config/i386/i386.c: Do not include "regrename.h".
1274 (ix86_rop_should_change_byte_p, reg_encoded_number)
1275 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
1277 (ix86_reorg): Remove call to ix86_mitigate_rop.
1278 * config/i386/i386.md (attr "modrm_class"): Remove.
1279 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
1280 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
1281 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
1283 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
1285 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
1286 allow folding of mergeh() and mergel() for the float and double types.
1287 (fold_mergehl_helper): Rework to handle building a permute tree
1290 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
1292 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
1295 2018-08-15 David Malcolm <dmalcolm@redhat.com>
1297 * common.opt (fdiagnostics-show-labels): New option.
1298 * diagnostic-show-locus.c (class layout_range): Add field
1300 (class layout): Add field "m_show_labels_p".
1301 (layout_range::layout_range): Add param "label" and use it to
1303 (make_range): Pass in NULL for new "label" param of layout_range's
1305 (layout::layout): Initialize m_show_labels_p.
1306 (layout::maybe_add_location_range): Pass in loc_range->m_label
1307 when constructing layout_range instances.
1308 (struct line_label): New struct.
1309 (layout::print_any_labels): New member function.
1310 (layout::print_line): Call it if label-printing is enabled.
1311 (selftest::test_one_liner_labels): New test.
1312 (selftest::test_diagnostic_show_locus_one_liner): Call it.
1313 * diagnostic.c (diagnostic_initialize): Initialize
1314 context->show_labels_p.
1315 * diagnostic.h (struct diagnostic_context): Add field
1317 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
1318 -fno-diagnostics-show-labels.
1319 * dwarf2out.c (gen_producer_string): Add
1320 OPT_fdiagnostics_show_labels to the ignored options.
1321 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
1323 (gcc_rich_location::maybe_add_expr): Likewise.
1324 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
1325 label" param, defaulting to NULL.
1326 (gcc_rich_location::add_expr): Add "label" param.
1327 (gcc_rich_location::maybe_add_expr): Likewise.
1328 (class text_range_label): New class.
1329 (class range_label_for_type_mismatch): New class.
1330 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
1331 of format_warning_va.
1332 (fmtwarn_n): Likewise for new params of format_warning_n_va.
1333 * lto-wrapper.c (merge_and_complain): Add
1334 OPT_fdiagnostics_show_labels to the "pick one setting" options.
1335 (append_compiler_options): Likewise to the dropped options.
1336 (append_diag_options): Likewise to the passed-on options.
1337 * opts.c (common_handle_option): Handle the new option.
1338 * selftest-diagnostic.c
1339 (test_diagnostic_context::test_diagnostic_context): Enable
1341 * substring-locations.c: Include "gcc-rich-location.h".
1342 (format_warning_n_va): Add "fmt_label" and "param_label" params
1343 and use them as appropriate.
1344 (format_warning_va): Add "fmt_label" and "param_label" params,
1345 passing them on to format_warning_n_va.
1346 (format_warning_at_substring): Likewise.
1347 (format_warning_at_substring_n): Likewise.
1348 * substring-locations.h (format_warning_va): Add "fmt_label" and
1349 "param_label" params.
1350 (format_warning_n_va): Likewise.
1351 (format_warning_at_substring): Likewise.
1352 (format_warning_at_substring_n): Likewise.
1353 * toplev.c (general_init): Initialize global_dc->show_labels_p.
1355 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
1358 * builtins.c (expand_builtin_memcmp): Do not expand the call
1359 when overflow is detected.
1361 2018-08-15 Martin Sebor <msebor@redhat.com>
1363 PR tree-optimization/71625
1364 * config/aarch64/aarch64-builtins.c
1365 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
1367 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
1369 * config/s390/s390.c (s390_reorg): Remove loop.
1371 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1374 (darwin_function_switched_text_sections): Delete.
1375 * gcc/config/darwin.h
1376 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
1378 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1381 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
1382 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
1383 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
1385 2018-08-15 Martin Liska <mliska@suse.cz>
1387 PR tree-optimization/86925
1388 * predict.c (expr_expected_value_1): When taking
1389 later predictor, assign also probability.
1390 Use fold_build2_initializer_loc in order to fold
1391 the expression in -frounding-math.
1393 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
1395 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
1397 (expand_vec_perm_1): Try the new method.
1399 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
1402 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
1403 Check whether lra_live_max_point is 0 before dividing.
1405 2018-08-14 Martin Sebor <msebor@redhat.com>
1407 PR tree-optimization/86650
1408 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
1409 (vrp_prop::check_mem_ref): Same.
1411 2018-08-13 Liu Hao <lh_mouse@126.com>
1413 * pretty-print.c (eat_esc_sequence): Swap the foreground and
1414 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
1415 and clear it thereafter, as it only works for DBCS.
1417 2018-08-13 Liu Hao <lh_mouse@126.com>
1419 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
1420 handle returned by _get_osf_handle().
1422 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
1424 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
1425 for folding vec_perm.
1427 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
1429 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
1430 Add support for gimple-folding of vec_pack() and vec_unpack()
1433 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
1435 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
1436 vec_xst variants to the list.
1437 (rs6000_gimple_fold_builtin): Add support for folding unaligned
1438 vector loads and stores.
1440 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
1442 * config.gcc (rs6000-ibm-aix4.x): Delete.
1443 (rs6000-ibm-aix5.1): Delete.
1444 (rs6000-ibm-aix5.2): Delete.
1445 (rs6000-ibm-aix5.3): Delete.
1446 * config/rs6000/aix43.h: Delete.
1447 * config/rs6000/aix51.h: Delete.
1448 * config/rs6000/aix52.h: Delete.
1449 * config/rs6000/t-aix43: Delete.
1451 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
1453 * config/s390/s390.c (s390_decompose_constant_pool_ref):
1455 (s390_decompose_address): Factor out constant pool ref
1458 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1460 * config/nds32/nds32-predicates.c
1461 (nds32_can_use_bclr_p): Change return type as bool.
1462 (nds32_can_use_bset_p): Ditto.
1463 (nds32_can_use_btgl_p): Ditto.
1464 (nds32_can_use_bitci_p): Ditto.
1465 * config/nds32/nds32-protos.h
1466 (nds32_can_use_bclr_p): Change declaration.
1467 (nds32_can_use_bset_p): Ditto.
1468 (nds32_can_use_btgl_p): Ditto.
1469 (nds32_can_use_bitci_p): Ditto.
1471 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1473 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
1474 Support -msched-prolog-epilog option.
1475 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
1477 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1479 * common/config/nds32/nds32-common.c
1480 (nds32_option_optimization_table): Enalbe -malways-align.
1482 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1484 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
1486 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
1487 OPT_misr_secure_ case.
1488 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
1489 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
1490 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
1492 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
1493 (nds32_isr_info): New field security_level.
1494 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
1495 * config/nds32/nds32.md (return_internal): Consider critical attribute.
1496 * config/nds32/nds32.opt (misr-secure): New option.
1497 * config/nds32/nds32_init.inc: New file.
1498 * config/nds32/nds32_isr.h: New file.
1500 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
1502 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
1503 Update comment for atomic instructions.
1504 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
1505 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
1507 (atomic_loaddi): Revise fence expansion to only emit fence prior to
1508 load for __ATOMIC_SEQ_CST model.
1509 (atomic_loaddi_1): Remove float register target.
1510 (atomic_storedi): Handle CONST_INT values.
1511 (atomic_storedi_1): Remove float register source. Add special case
1513 (memory_barrier): New expander and insn.
1515 2018-08-11 Jakub Jelinek <jakub@redhat.com>
1517 PR tree-optimization/86835
1518 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
1519 new_stmt after def_gsi, make sure to insert new_square_stmt after
1520 that stmt, not 2 stmts before it.
1522 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
1525 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
1528 2018-08-10 Martin Liska <mliska@suse.cz>
1531 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
1533 * builtins.c (expand_builtin_expect_with_probability):
1535 (expand_builtin_expect_with_probability): New function.
1536 (build_builtin_expect_predicate): Add new argumnet probability
1537 for BUILT_IN_EXPECT_WITH_PROBABILITY.
1538 (fold_builtin_expect):
1541 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
1542 * builtins.h (fold_builtin_expect): Set new argument.
1543 * doc/extend.texi: Document __builtin_expect_with_probability.
1544 * doc/invoke.texi: Likewise.
1545 * gimple-fold.c (gimple_fold_call): Pass new argument.
1546 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
1547 also BUILT_IN_EXPECT_WITH_PROBABILITY.
1548 * predict.c (get_predictor_value): New function.
1549 (expr_expected_value): Add new argument probability. Assume
1550 that predictor and probability are always non-null.
1551 (expr_expected_value_1): Likewise. For __builtin_expect and
1552 __builtin_expect_with_probability set probability. Handle
1553 combination in binary expressions.
1554 (tree_predict_by_opcode): Simplify code by simply calling
1555 get_predictor_value.
1556 (pass_strip_predict_hints::execute): Add handling of
1557 BUILT_IN_EXPECT_WITH_PROBABILITY.
1558 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
1560 * tree.h (DECL_BUILT_IN_P): New function.
1562 2018-08-10 Martin Liska <mliska@suse.cz>
1564 PR tree-optimization/85799
1565 * passes.def: Add argument for pass_strip_predict_hints.
1566 * predict.c (class pass_strip_predict_hints): Add new argument
1568 (strip_predictor_early): New function.
1569 (pass_strip_predict_hints::execute): Call the function to
1571 (strip_predict_hints): New function.
1572 * predict.def: Fix comment.
1574 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
1576 * Makefile.in: Clarify which tm.texi to copy over to assert the
1577 right to grant a GFDL license for all.
1579 2018-08-09 Jeff Law <law@redhat.com>
1581 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
1584 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
1586 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
1589 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
1591 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
1592 reductions for variable-length vectors.
1594 2018-08-09 David Malcolm <dmalcolm@redhat.com>
1597 * common.opt (fdiagnostics-show-line-numbers): New option.
1598 * diagnostic-show-locus.c (class layout): Add fields
1599 "m_show_line_numbers_p" and "m_linenum_width";
1600 (num_digits): New function.
1601 (test_num_digits): New function.
1602 (layout::layout): Initialize new fields. Update m_x_offset
1603 logic to handle any left margin.
1604 (layout::print_source_line): Print line number when requested.
1605 (layout::start_annotation_line): New member function.
1606 (layout::print_annotation_line): Call it.
1607 (layout::print_leading_fixits): Likewise.
1608 (layout::print_trailing_fixits): Likewise. Update calls to
1609 move_to_column for new parameter.
1610 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
1611 it to potentially call start_annotation_line.
1612 (layout::show_ruler): Call start_annotation_line.
1613 (selftest::test_line_numbers_multiline_range): New selftest.
1614 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
1615 and selftest::test_line_numbers_multiline_range.
1616 * diagnostic.c (diagnostic_initialize): Initialize
1617 show_line_numbers_p.
1618 * diagnostic.h (struct diagnostic_context): Add field
1619 "show_line_numbers_p".
1620 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
1621 -fno-diagnostics-show-line-numbers.
1622 * dwarf2out.c (gen_producer_string): Add
1623 OPT_fdiagnostics_show_line_numbers to the ignored options.
1624 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
1625 one setting" options.
1626 (append_compiler_options): Likewise to the dropped options.
1627 (append_diag_options): Likewise to the passed-on options.
1628 * opts.c (common_handle_option): Handle the new option.
1629 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
1631 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
1633 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
1634 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
1635 third argument of type "const signed char" to descriptions of
1636 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
1637 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
1638 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
1639 __builtin_bcdsub_ov functions.
1641 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
1643 PR tree-optimization/86858
1644 * tree-vect-loop.c (vect_is_simple_reduction): Restore
1645 flow_bb_inside_loop_p calls.
1647 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
1649 PR tree-optimization/86871
1650 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
1651 instead of gimple_assign_lhs.
1653 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
1656 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
1657 register constraint to operand 0.
1658 (add<mode>3_carryinC): Likewise.
1659 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
1661 2018-08-09 Martin Liska <mliska@suse.cz>
1664 * common.opt: Remove extra line.
1666 2018-08-09 Martin Liska <mliska@suse.cz>
1668 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
1669 at the end of a line, make first letter capital and end up
1670 a sentence with a dot.
1671 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
1672 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
1673 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
1674 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
1675 (PARAM_MAX_ISL_OPERATIONS): Likewise.
1676 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
1677 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
1678 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
1679 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
1680 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
1681 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
1682 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
1683 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
1684 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
1685 (PARAM_TREE_REASSOC_WIDTH): Likewise.
1686 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
1687 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
1688 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
1690 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
1693 * config/s390/s390.c (s390_option_override_internal): Reduce the
1694 stack-clash-protection-probe-interval param if it would be too big
1697 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
1700 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
1701 * config/m68k/m68k.c (handle_move_double): Don't call
1702 m68k_final_prescan_insn.
1703 (m68k_adjust_decorated_operand): Renamed from
1704 m68k_final_prescan_insn, remove first and third operand and
1706 (print_operand): Call it.
1707 (print_operand_address): Call it.
1709 2018-08-08 Nathan Sidwell <nathan@acm.org>
1711 * diagnostic.c (diagnostic_report_current_module): Use
1712 linemap_included_from & linemap_included_from_linemap.
1714 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
1716 * config/aarch64/aarch64-cores.def: Add phecda core.
1717 * config/aarch64/aarch64-tune.md: Regenerate.
1718 * doc/invoke.texi: Add phecda core.
1720 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
1723 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
1725 * config/s390/s390.md ("movti"): Add more alternatives for
1726 constant to GPR copies.
1728 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
1730 * config/s390/s390.c: Fix whitespace damage throughout the file.
1731 * config/s390/s390.h: Likewise.
1732 * config/s390/tpf.h: Likewise.
1734 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
1736 * config/s390/s390.c (s390_loadrelative_operand_p):
1737 Remove TARGET_CPU_ZARCH usages.
1738 (s390_rtx_costs): Likewise.
1739 (s390_legitimate_constant_p): Likewise.
1740 (s390_cannot_force_const_mem): Likewise.
1741 (legitimate_reload_constant_p): Likewise.
1742 (s390_preferred_reload_class): Likewise.
1743 (legitimize_pic_address): Likewise.
1744 (legitimize_tls_address): Likewise.
1745 (s390_split_branches): Removed.
1746 (s390_add_execute): Removed.
1747 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
1748 (s390_mainpool_start): Likewise.
1749 (s390_mainpool_finish): Likewise.
1750 (s390_mainpool_cancel): Removed.
1751 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
1752 (s390_chunkify_cancel): Likewise.
1753 (s390_return_addr_rtx): Likewise.
1754 (s390_register_info): Remove split_branches_pending_p uages.
1755 (s390_optimize_register_info): Likewise.
1756 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
1757 split_branches_pending_p usages.
1758 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
1759 (s390_load_got): Likewise.
1760 (s390_expand_split_stack_prologue): Likewise.
1761 (output_asm_nops): Likewise.
1762 (s390_function_profiler): Likewise.
1763 (s390_emit_call): Likewise.
1764 (s390_conditional_register_usage): Likewise.
1765 (s390_optimize_prologue): Likewise.
1766 (s390_reorg): Remove TARGET_CPU_ZARCH and
1767 split_branches_pending_p usages.
1768 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
1770 (s390_output_indirect_thunk_function): Likewise.
1771 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
1772 (TARGET_CPU_ZARCH_P): Removed.
1773 (struct machine_function): Remove split_branches_pending_p.
1774 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
1776 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
1778 * common/config/s390/s390-common.c (processor_flags_table):
1780 * config.gcc: Remove with_arch/with_tune support.
1781 * config/s390/2064.md: Remove cpu attribute comparisons.
1782 * config/s390/driver-native.c (s390_host_detect_local_cpu):
1784 * config/s390/linux.h (ASM_SPEC):
1785 Remove -march support.
1786 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
1787 Use a table to get an arch level.
1788 * config/s390/s390-opts.h (enum processor_type):
1790 * config/s390/s390.c
1791 (processor_table): Remove entries, add arch_level values.
1792 (s390_issue_rate): Remove cases.
1793 (s390_option_override): Adjust
1794 s390_option_override_internal() call.
1795 (s390_option_override_internal): Remove deprecation warning.
1796 (s390_valid_target_attribute_tree): Adjust
1797 s390_option_override_internal() call.
1798 * config/s390/s390.h (struct s390_processor):
1799 Share with s390-c.c, add arch_level field.
1800 * config/s390/s390.md:
1801 Remove occurrences in cpu attribute.
1802 * config/s390/s390.opt: Remove -march/-mtune support.
1803 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
1804 * doc/invoke.texi: Remove deprecation warning.
1806 2018-08-08 Luis Machado <luis.machado@linaro.org>
1808 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
1810 (qdf24xx_tunings): Set vector cost structure to
1811 qdf24xx_vector_cost.
1813 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
1814 <register_sextend>: Set to 3.
1816 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
1819 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
1820 * config/aarch64/aarch64-simd.md
1821 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
1822 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
1823 (aarch64_frecpx<mode>): ...this new pattern.
1824 * config/aarch64/aarch64-simd-builtins.def: Remove comment
1825 about aarch64_frecp<FRECP:frecp_suffix><mode>.
1827 2018-08-07 Martin Liska <mliska@suse.cz>
1830 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
1831 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
1832 * predict.def (PRED_MALLOC_NONNULL): New predictor.
1833 * doc/extend.texi: Document that malloc attribute adds
1836 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
1839 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1840 Define to speculation_safe_value_not_needed.
1842 2018-08-06 Jeff Law <law@redhat.com>
1844 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
1845 the vr_values instance to cprop_into_stmt.
1846 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
1847 (cprop_operand): Also query EVRP to determine if OP is a constant.
1849 2018-08-06 Nathan Sidwell <nathan@acm.org>
1851 * diagnostic.c (diagnostic_report_current_module): Reroll
1852 included-at loop. Translate text.
1854 2018-08-06 David Malcolm <dmalcolm@redhat.com>
1856 * function-tests.c (selftest::test_expansion_to_rtl): Call
1857 free_after_compilation.
1859 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1861 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
1863 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
1865 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
1866 loops with memory block operations from getting unrolled.
1868 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
1871 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1872 Define to speculation_safe_value_not_needed.
1874 2018-08-06 Jeff Law <law@redhat.com>
1876 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
1879 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1882 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
1883 with all enabled __intN types.
1885 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
1887 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1889 * alias.c (record_set): Check for clobber high.
1890 * cfgexpand.c (expand_gimple_stmt): Likewise.
1891 * combine-stack-adj.c (single_set_for_csa): Likewise.
1892 * combine.c (find_single_use_1): Likewise.
1893 (set_nonzero_bits_and_sign_copies): Likewise.
1894 (get_combine_src_dest): Likewise.
1895 (is_parallel_of_n_reg_sets): Likewise.
1896 (try_combine): Likewise.
1897 (record_dead_and_set_regs_1): Likewise.
1898 (reg_dead_at_p_1): Likewise.
1899 (reg_dead_at_p): Likewise.
1900 * dce.c (deletable_insn_p): Likewise.
1901 (mark_nonreg_stores_1): Likewise.
1902 (mark_nonreg_stores_2): Likewise.
1903 * df-scan.c (df_find_hard_reg_defs): Likewise.
1904 (df_uses_record): Likewise.
1905 (df_get_call_refs): Likewise.
1906 * dwarf2out.c (mem_loc_descriptor): Likewise.
1907 * haifa-sched.c (haifa_classify_rtx): Likewise.
1908 * ira-build.c (create_insn_allocnos): Likewise.
1909 * ira-costs.c (scan_one_insn): Likewise.
1910 * ira.c (equiv_init_movable_p): Likewise.
1911 (rtx_moveable_p): Likewise.
1912 (interesting_dest_for_shprep): Likewise.
1913 * jump.c (mark_jump_label_1): Likewise.
1914 * postreload-gcse.c (record_opr_changes): Likewise.
1915 * postreload.c (reload_cse_simplify): Likewise.
1916 (struct reg_use): Add source expr.
1917 (reload_combine): Check for clobber high.
1918 (reload_combine_note_use): Likewise.
1919 (reload_cse_move2add): Likewise.
1920 (move2add_note_store): Likewise.
1921 * print-rtl.c (print_pattern): Likewise.
1922 * recog.c (decode_asm_operands): Likewise.
1923 (store_data_bypass_p): Likewise.
1924 (if_test_bypass_p): Likewise.
1925 * regcprop.c (kill_clobbered_value): Likewise.
1926 (kill_set_value): Likewise.
1927 * reginfo.c (reg_scan_mark_refs): Likewise.
1928 * reload1.c (maybe_fix_stack_asms): Likewise.
1929 (eliminate_regs_1): Likewise.
1930 (elimination_effects): Likewise.
1931 (mark_not_eliminable): Likewise.
1932 (scan_paradoxical_subregs): Likewise.
1933 (forget_old_reloads_1): Likewise.
1934 * reorg.c (find_end_label): Likewise.
1935 (try_merge_delay_insns): Likewise.
1936 (redundant_insn): Likewise.
1937 (own_thread_p): Likewise.
1938 (fill_simple_delay_slots): Likewise.
1939 (fill_slots_from_thread): Likewise.
1940 (dbr_schedule): Likewise.
1941 * resource.c (update_live_status): Likewise.
1942 (mark_referenced_resources): Likewise.
1943 (mark_set_resources): Likewise.
1944 * rtl.c (copy_rtx): Likewise.
1945 * rtlanal.c (reg_referenced_p): Likewise.
1946 (single_set_2): Likewise.
1947 (noop_move_p): Likewise.
1948 (note_stores): Likewise.
1949 * sched-deps.c (sched_analyze_reg): Likewise.
1950 (sched_analyze_insn): Likewise.
1952 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1954 * cse.c (invalidate_reg): New function extracted from...
1955 (invalidate): ...here.
1956 (canonicalize_insn): Check for clobber high.
1957 (invalidate_from_clobbers): invalidate clobber highs.
1958 (invalidate_from_sets_and_clobbers): Likewise.
1959 (count_reg_usage): Check for clobber high.
1960 (insn_live_p): Likewise.
1961 * cselib.c (cselib_expand_value_rtx_1):Likewise.
1962 (cselib_invalidate_regno): Check for clobber in setter.
1963 (cselib_invalidate_rtx): Pass through setter.
1964 (cselib_invalidate_rtx_note_stores):
1965 (cselib_process_insn): Check for clobber high.
1966 * cselib.h (cselib_invalidate_rtx): Add operand.
1968 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1970 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
1971 (mark_not_eliminable): Likewise.
1972 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
1973 * lra-lives.c (process_bb_lives): Check for clobber high.
1974 * lra.c (new_insn_reg): Remember clobber highs.
1975 (collect_non_operand_hard_regs): Check for clobber high.
1976 (lra_set_insn_recog_data): Likewise.
1977 (add_regs_to_insn_regno_info): Likewise.
1978 (lra_update_insn_regno_info): Likewise.
1980 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1982 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
1983 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
1985 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1987 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
1988 (copy_insn_1): Likewise.
1989 (gen_hard_reg_clobber_high): New gen function.
1990 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
1991 * genemit.c (gen_exp): Likewise.
1992 (gen_emit_seq): Pass through info.
1993 (gen_insn): Check for CLOBBER_HIGH.
1994 (gen_expand): Pass through info.
1995 (gen_split): Likewise.
1996 (output_add_clobbers): Likewise.
1997 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
1998 (remove_clobbers): Likewise.
1999 * rtl.h (gen_hard_reg_clobber_high): New declaration.
2001 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2003 * doc/rtl.texi (clobber_high): Add.
2004 (parallel): Add in clobber high
2005 * rtl.c (rtl_check_failed_code3): Add function.
2006 * rtl.def (CLOBBER_HIGH): Add expression.
2007 * rtl.h (RTL_CHECKC3): Add macro.
2008 (rtl_check_failed_code3): Add declaration.
2009 (XC3EXP): Add macro.
2011 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
2014 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
2015 cfun->machine->max_used_stack_alignment if needed.
2017 2018-08-04 Martin Sebor <msebor@redhat.com>
2019 PR tree-optimization/86571
2020 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
2023 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
2026 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2029 2018-08-03 Jeff Law <law@redhat.com>
2032 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2033 Define to speculation_safe_value_not_needed.
2035 2018-08-03 David Malcolm <dmalcolm@redhat.com>
2037 * doc/gcov.texi (-x): Remove duplicate "to".
2038 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
2039 (-Wif-not-aligned): Remove duplicate "is".
2040 (-flto): Remove duplicate "the".
2041 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
2042 duplicate "v5.00.b".
2043 (MSP430 Options): Remove duplicate "and" from the description
2044 of "-mgprel-sec=regexp".
2045 (x86 Options): Remove duplicate copies of "vmldLog102" and
2046 vmlsLog104 from description of "-mveclibabi=type".
2048 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
2050 * internal-fn.h (first_commutative_argument): Declare.
2051 * internal-fn.c (first_commutative_argument): New function.
2052 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
2053 restrictions for pattern statements. Use first_commutative_argument
2054 to look for commutative operands in calls to internal functions.
2056 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
2058 * Makefile.in (wide-int-range.o): New.
2059 * tree-vrp.c: Move all the wide_int_* functions to...
2060 * wide-int-range.cc: ...here.
2061 * tree-vrp.h: Move all the wide_int_* prototypes to...
2062 * wide-int-range.h: ...here.
2064 2018-08-03 Tom de Vries <tdevries@suse.de>
2066 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
2068 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
2069 * except.c (output_function_exception_table): Do early exit if
2070 targetm_common.except_unwind_info (&global_options) == UI_NONE.
2072 2018-08-03 Martin Liska <mliska@suse.cz>
2074 * predict.c (dump_prediction): Change to 2 digits
2077 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
2079 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
2081 (falkor_am_1_gtov_gtov): ... a new insn reservation.
2083 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
2085 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
2086 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
2087 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
2088 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
2089 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
2091 2018-08-02 David Malcolm <dmalcolm@redhat.com>
2093 * diagnostic-show-locus.c (diagnostic_show_locus): Use
2094 pp_take_prefix when saving the existing prefix.
2095 * diagnostic.c (diagnostic_append_note): Likewise.
2096 * langhooks.c (lhd_print_error_function): Likewise.
2097 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
2098 param's type. Free the existing prefix.
2099 (pp_take_prefix): New function.
2100 (pretty_printer::pretty_printer): Drop the prefix parameter.
2101 Rename the length parameter to match the comment.
2102 (pretty_printer::~pretty_printer): Free the prefix.
2103 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
2105 (struct pretty_printer): Drop the "const" from "prefix" field's
2106 type and clarify memory management.
2107 (pp_set_prefix): Drop the "const" from the 2nd param.
2108 (pp_take_prefix): New decl.
2110 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
2112 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
2113 for word_mode_ok here instead of passing as argument.
2114 (expand_block_compare): Change select_block_compare_mode() call.
2115 (expand_strncmp_gpr_sequence): New function.
2116 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
2118 2018-08-02 Jeff Law <law@redhat.com>
2121 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2122 Define to speculation_safe_value_not_needed.
2125 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2126 Define to speculation_safe_value_not_needed.
2128 2018-08-02 Tom de Vries <tdevries@suse.de>
2131 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
2132 function. Return UI_TARGET unconditionally.
2133 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
2134 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
2136 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
2138 * genemit.c (print_overload_test): Fix typo.
2140 2018-08-02 Richard Biener <rguenther@suse.de>
2142 PR tree-optimization/86816
2143 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
2144 which checks for value availability before querying it.
2145 (gvn_uses_equal): Use it.
2146 (same_succ_hash): Likewise.
2147 (gimple_equal_p): Likewise.
2149 2018-08-02 Nick Clifton <nickc@redhat.com>
2152 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2153 Define to speculation_safe_value_not_needed.
2156 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2157 Define to speculation_safe_value_not_needed.
2160 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2161 Define to speculation_safe_value_not_needed.
2164 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2165 Define to speculation_safe_value_not_needed.
2168 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2169 Define to speculation_safe_value_not_needed.
2172 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2173 Define to speculation_safe_value_not_needed.
2176 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2177 Define to speculation_safe_value_not_needed.
2180 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2181 Define to speculation_safe_value_not_needed.
2184 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
2185 speculation_safe_value_not_needed.
2188 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
2189 to speculation_safe_value_not_needed.
2191 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
2193 * doc/md.texi: Expand the documentation of instruction names
2194 to mention port-local uses. Document '@' in pattern names.
2195 * read-md.h (overloaded_instance, overloaded_name): New structs.
2197 (md_reader::handle_overloaded_name): New member function.
2198 (md_reader::get_overloads): Likewise.
2199 (md_reader::m_first_overload): New member variable.
2200 (md_reader::m_next_overload_ptr): Likewise.
2201 (md_reader::m_overloads_htab): Likewise.
2202 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
2203 m_next_overload_ptr and m_overloads_htab.
2204 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
2205 (get_mode_token, get_code_token, get_int_token): New functions.
2206 (map_attr_string): Add an optional argument that passes back
2207 the associated iterator.
2208 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
2209 (md_reader::handle_overloaded_name, add_overload_instance): New
2211 (apply_iterators): Handle '@' names. Report an error if '@'
2212 is used without iterators.
2213 (initialize_iterators): Initialize the new iterator_group fields.
2214 * genopinit.c (handle_overloaded_code_for)
2215 (handle_overloaded_gen): New functions.
2216 (main): Use them to print declarations of maybe_code_for_* and
2217 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
2218 * genemit.c (print_overload_arguments, print_overload_test)
2219 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
2220 (main): Use it to print definitions of maybe_code_for_* and
2221 maybe_gen_* functions.
2222 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
2223 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
2224 instead of explicit mode checks.
2225 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
2226 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
2227 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
2228 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
2229 (aarch64_expand_compare_and_swap): Likewise
2230 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
2231 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
2232 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
2233 (aarch64_constant_pool_reload_icode): Delete.
2234 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
2235 instead of aarch64_constant_pool_reload_icode. Use
2236 code_for_aarch64_reload_mov instead of explicit mode checks.
2237 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
2238 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
2239 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
2240 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
2241 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
2242 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
2243 (aarch64_atomic_load_op_code): Delete.
2244 (aarch64_emit_atomic_load_op): Likewise.
2245 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
2246 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
2247 instead of aarch64_emit_atomic_load_op.
2248 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
2249 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
2250 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
2251 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
2252 character before the pattern name.
2253 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
2254 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
2255 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
2256 (aarch64_frecps<mode>): Likewise.
2257 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
2258 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
2259 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
2260 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
2261 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
2263 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
2265 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
2266 Allow HFmode constants if TARGET_FP_F16INST.
2268 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
2271 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
2272 No longer check last store for clobber of address register.
2274 2018-08-02 Martin Liska <mliska@suse.cz>
2276 PR gcov-profile/86817
2277 * gcov.c (process_all_functions): New function.
2279 (process_file): Move functions processing to
2280 process_all_functions.
2282 2018-08-02 David Malcolm <dmalcolm@redhat.com>
2284 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
2285 "const" to the "gimple *" and "rtx_insn *" parameters.
2286 * dumpfile.h (dump_user_location_t::dump_user_location_t):
2288 (dump_location_t::dump_location_t): Likewise.
2290 2018-08-01 Martin Sebor <msebor@redhat.com>
2292 PR tree-optimization/86650
2293 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
2294 rather than a "gcall *". Directly pass the data of interest
2295 to percent_K_format, rather than building a temporary CALL_EXPR
2297 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
2298 (gimple_fold_builtin_strncat): Adjust.
2299 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
2300 gcall* argument with gimple*.
2301 * gimple-ssa-warn-restrict.c (check_call): Same.
2302 (wrestrict_dom_walker::before_dom_children): Same.
2303 (builtin_access::builtin_access): Same.
2304 (check_bounds_or_overlap): Same
2305 (maybe_diag_overlap): Same.
2306 (maybe_diag_offset_bounds): Same.
2307 * tree-diagnostic.c (default_tree_printer): Move usage of
2308 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
2310 * tree-pretty-print.c (percent_K_format): Add argument.
2311 * tree-pretty-print.h: Add argument.
2312 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
2313 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
2314 (maybe_diag_stxncpy_trunc): Same.
2315 (handle_builtin_stxncpy): Same.
2316 (handle_builtin_strcat): Same.
2318 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2320 * match.pd: Optimise pointer range checks.
2322 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2324 PR tree-optimization/86758
2325 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
2326 to remove pattern statements.
2328 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2330 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
2331 result of dfs_enumerate_from when constructing stmt_vec_infos,
2332 instead of additionally calling get_loop_body.
2334 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2336 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
2338 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
2339 When creating an iv, assert that the step is not known to be zero.
2340 (vect_setup_realignment): Update call accordingly.
2341 * tree-vect-stmts.c (vectorizable_store): Likewise.
2342 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
2344 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2346 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
2347 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
2348 (vectorizable_reduction): Likewise.
2349 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2350 (vect_detect_hybrid_slp_stmts): Likewise.
2351 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2353 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
2355 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
2356 (wide_int_set_zero_nonzero_bits): ...this.
2357 (zero_nonzero_bits_from_vr): Rename to...
2358 (vrp_set_zero_nonzero_bits): ...this.
2359 (extract_range_from_multiplicative_op_1): Abstract wide int
2361 (wide_int_range_multiplicative_op): ...here.
2362 (extract_range_from_binary_expr_1): Extract wide int binary
2363 operations into their own functions.
2364 (wide_int_range_lshift): New.
2365 (wide_int_range_can_optimize_bit_op): New.
2366 (wide_int_range_shift_undefined_p): New.
2367 (wide_int_range_bit_xor): New.
2368 (wide_int_range_bit_ior): New.
2369 (wide_int_range_bit_and): New.
2370 (wide_int_range_trunc_mod): New.
2371 (extract_range_into_wide_ints): New.
2372 (vrp_shift_undefined_p): New.
2373 (extract_range_from_multiplicative_op): New.
2374 (vrp_can_optimize_bit_op): New.
2375 * tree-vrp.h (value_range::dump): New.
2376 (wide_int_range_multiplicative_op): New.
2377 (wide_int_range_lshift):New.
2378 (wide_int_range_shift_undefined_p): New.
2379 (wide_int_range_bit_xor): New.
2380 (wide_int_range_bit_ior): New.
2381 (wide_int_range_bit_and): New.
2382 (wide_int_range_trunc_mod): New.
2383 (zero_nonzero_bits_from_bounds): Rename to...
2384 (wide_int_set_zero_nonzero_bits): ...this.
2385 (zero_nonzero_bits_from_vr): Rename to...
2386 (vrp_set_zero_nonzero_bits): ...this.
2387 (range_easy_mask_min_max): Rename to...
2388 (wide_int_range_can_optimize_bit_op): this.
2389 * vr-values.c (simplify_bit_ops_using_ranges): Rename
2390 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
2392 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2394 * tree-vectorizer.h (vect_orig_stmt): New function.
2395 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
2396 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
2397 (vect_create_epilog_for_reduction): Likewise.
2398 (vectorizable_live_operation): Likewise.
2399 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
2400 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
2401 * tree-vect-stmts.c (vectorizable_call): Likewise.
2402 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
2404 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2406 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
2408 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
2409 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
2410 (vect_transform_loop): Likewise.
2411 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
2413 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2415 * tree-vectorizer.h (vect_schedule_slp): Return void.
2416 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
2417 (vect_schedule_slp): Likewise.
2419 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2421 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
2423 (vect_transform_loop): Update calls accordingly. Schedule SLP
2424 instances before the main loop, if any exist.
2426 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2428 PR tree-optimization/86749
2429 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
2430 If the lhs is used in a COND_EXPR, check that it is being used
2431 as the "then" or "else" value.
2433 2018-08-01 Tom de Vries <tdevries@suse.de>
2436 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
2437 speculation_safe_value_not_needed.
2439 2018-08-01 Richard Biener <rguenther@suse.de>
2441 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
2444 2018-08-01 Martin Liska <mliska@suse.cz>
2446 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
2447 format how successful transformation is dumped.
2448 (gimple_mod_pow2_value_transform): Likewise.
2449 (gimple_mod_subtract_transform): Likewise.
2450 (gimple_stringops_transform): Likewise.
2452 2018-08-01 Martin Liska <mliska@suse.cz>
2455 * value-prof.c (interesting_stringop_to_profile_p):
2456 Simplify the code and add BUILT_IN_MEMMOVE.
2457 (gimple_stringops_transform): Likewise.
2459 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
2461 * config/aarch64/aarch64-simd.md
2462 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
2463 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
2464 use GPI iterator instead of SI mode.
2466 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
2468 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
2469 rs6000_speculation_barrier.
2470 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
2471 new barrier pattern name.
2473 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
2475 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
2476 (speculation_barrier): New insn.
2478 2018-08-01 Richard Biener <rguenther@suse.de>
2481 * graphite.h: Include isl/id.h and isl/space.h to allow build
2484 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
2487 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
2488 mode for COFF targets.
2489 * defaults.h (TARGET_COFF): Define.
2490 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
2491 TARGET_COFF): Define.
2492 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
2493 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
2494 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
2496 2018-07-31 Alexandre Oliva <oliva@adacore.com>
2498 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
2499 * gimple-streamer-out.c (output_bb): Save it.
2500 * lto-streamer-in.c (input_struct_function_base): Restore
2501 instance discriminator if available. Create map on demand.
2502 * lto-streamer-out.c (output_struct_function_base): Save it if
2504 * final.c (decl_to_instance_map): Document LTO strategy.
2506 2018-07-31 Alexandre Oliva <oliva@adacore.com>
2507 Olivier Hainque <hainque@adacore.com>
2509 * debug.h (decl_to_instance_map_t): New type.
2510 (decl_to_instance_map): Declare.
2511 (maybe_create_decl_to_instance_map): New inline function.
2512 * final.c (bb_discriminator, last_bb_discriminator): New statics,
2513 to track basic block discriminators.
2514 (final_start_function_1): Initialize them.
2515 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
2517 (decl_to_instance_map): New variable.
2518 (map_decl_to_instance, maybe_set_discriminator): New functions.
2519 (notice_source_line): Set discriminator.
2521 2018-07-31 Ian Lance Taylor <iant@golang.org>
2523 * targhooks.c (default_have_speculation_safe_value): Add
2526 2018-07-31 David Malcolm <dmalcolm@redhat.com>
2528 * dump-context.h: Include "pretty-print.h".
2529 (dump_context::refresh_dumps_are_enabled): New decl.
2530 (dump_context::emit_item): New decl.
2531 (class dump_context): Add fields "m_test_pp" and
2533 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
2534 (temp_dump_context::get_dumped_text): New decl.
2535 (class temp_dump_context): Add field "m_pp".
2536 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
2537 (dump_context::refresh_dumps_are_enabled): ...and add a test for
2539 (set_dump_file): Update for above change.
2540 (set_alt_dump_file): Likewise.
2541 (dump_loc): New overload, taking a pretty_printer *.
2542 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
2543 to any test pretty-printer.
2544 (make_item_for_dump_gimple_stmt): New function, adapted from
2545 optinfo::add_gimple_stmt.
2546 (dump_context::dump_gimple_stmt): Call it, and use the result,
2547 eliminating the direct usage of dump_file and alt_dump_file in
2548 favor of indirectly using them via emit_item.
2549 (make_item_for_dump_gimple_expr): New function, adapted from
2550 optinfo::add_gimple_expr.
2551 (dump_context::dump_gimple_expr): Call it, and use the result,
2552 eliminating the direct usage of dump_file and alt_dump_file in
2553 favor of indirectly using them via emit_item.
2554 (make_item_for_dump_generic_expr): New function, adapted from
2556 (dump_context::dump_generic_expr): Call it, and use the result,
2557 eliminating the direct usage of dump_file and alt_dump_file in
2558 favor of indirectly using them via emit_item.
2559 (make_item_for_dump_printf_va): New function, adapted from
2560 optinfo::add_printf_va.
2561 (make_item_for_dump_printf): New function.
2562 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
2563 and use the result, eliminating the direct usage of dump_file and
2564 alt_dump_file in favor of indirectly using them via emit_item.
2565 (make_item_for_dump_dec): New function.
2566 (dump_context::dump_dec): Call it, and use the result,
2567 eliminating the direct usage of dump_file and alt_dump_file in
2568 favor of indirectly using them via emit_item.
2569 (make_item_for_dump_symtab_node): New function, adapted from
2570 optinfo::add_symtab_node.
2571 (dump_context::dump_symtab_node): Call it, and use the result,
2572 eliminating the direct usage of dump_file and alt_dump_file in
2573 favor of indirectly using them via emit_item.
2574 (dump_context::begin_scope): Reimplement, avoiding direct usage
2575 of dump_file and alt_dump_file in favor of indirectly using them
2577 (dump_context::emit_item): New member function.
2578 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
2579 Set up test pretty-printer on the underlying context. Call
2580 refresh_dumps_are_enabled.
2581 (temp_dump_context::~temp_dump_context): Call
2582 refresh_dumps_are_enabled.
2583 (temp_dump_context::get_dumped_text): New member function.
2584 (selftest::verify_dumped_text): New function.
2585 (ASSERT_DUMPED_TEXT_EQ): New macro.
2586 (selftest::test_capture_of_dump_calls): Run all tests twice, with
2587 and then without optinfo enabled. Add uses of
2588 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
2589 * dumpfile.h: Update comment for the dump_* API.
2590 * optinfo-emit-json.cc
2591 (selftest::test_building_json_from_dump_calls): Update for new
2592 param for temp_dump_context ctor.
2593 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
2594 and "m_owned" field.
2595 (optinfo_item::~optinfo_item): Likewise.
2596 (optinfo::add_item): New member function.
2597 (optinfo::emit): Update comment.
2598 (optinfo::add_string): Delete.
2599 (optinfo::add_printf): Delete.
2600 (optinfo::add_printf_va): Delete.
2601 (optinfo::add_gimple_stmt): Delete.
2602 (optinfo::add_gimple_expr): Delete.
2603 (optinfo::add_tree): Delete.
2604 (optinfo::add_symtab_node): Delete.
2605 (optinfo::add_dec): Delete.
2606 * optinfo.h (class dump_context): New forward decl.
2607 (optinfo::add_item): New decl.
2608 (optinfo::add_string): Delete.
2609 (optinfo::add_printf): Delete.
2610 (optinfo::add_printf_va): Delete.
2611 (optinfo::add_gimple_stmt): Delete.
2612 (optinfo::add_gimple_expr): Delete.
2613 (optinfo::add_tree): Delete.
2614 (optinfo::add_symtab_node): Delete.
2615 (optinfo::add_dec): Delete.
2616 (optinfo::add_poly_int): Delete.
2617 (optinfo_item::optinfo_item): Remove "owned" param.
2618 (class optinfo_item): Remove field "m_owned".
2620 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2623 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
2624 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
2625 requested variable alignment.
2626 (expand_one_ssa_partition): Likewise.
2627 (expand_one_var): Likewise.
2629 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2631 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
2632 to speculation_safe_value_not_needed.
2634 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2636 * targhooks.h (speculation_safe_value_not_needed): New prototype.
2637 * targhooks.c (speculation_safe_value_not_needed): New function.
2638 * target.def (have_speculation_safe_value): Update documentation.
2639 * doc/tm.texi: Regenerated.
2641 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2643 * config/aarch64/iterators.md (ALLI_TI): New iterator.
2644 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
2646 (despeculate_copy<ALLI:mode>_insn): New insn.
2647 (despeculate_copyti_insn): New insn.
2648 (despeculate_simple<ALLI:mode>): New insn
2649 (despeculate_simpleti): New insn.
2650 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
2652 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
2653 aarch64_speculation_safe_value.
2654 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
2656 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2658 * config/aarch64/aarch64-speculation.cc: New file.
2659 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
2660 before pass_reorder_blocks.
2661 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
2663 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
2664 X14 and X15 when tracking speculation.
2665 * config/aarch64/aarch64.md (register name constants): Add
2666 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
2667 (unspec): Add UNSPEC_SPECULATION_TRACKER.
2668 (speculation_barrier): New insn attribute.
2669 (cmp<mode>): Allow SP in comparisons.
2670 (speculation_tracker): New insn.
2671 (speculation_barrier): Add speculation_barrier attribute.
2672 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
2673 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
2674 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
2676 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2678 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
2679 aarch64_track_speculation is true.
2680 (tb<optab><mode>1): Likewise.
2681 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
2682 generate CB[N]Z when tracking speculation.
2683 (aarch64_split_compare_and_swap): Likewise.
2684 (aarch64_split_atomic_op): Likewise.
2686 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2688 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
2690 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2692 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
2693 (speculation_barrier): New insn.
2695 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2697 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
2698 * config/arm/arm.md (speculation_barrier): New expand.
2699 (speculation_barrier_insn): New pattern.
2701 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2703 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
2704 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
2705 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
2706 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
2708 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
2709 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
2710 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
2711 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
2712 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
2713 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
2714 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
2715 * builtins.c (expand_speculation_safe_value): New function.
2716 (expand_builtin): Call it.
2717 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
2718 * doc/extend.texi: Document __builtin_speculation_safe_value.
2719 * doc/md.texi: Document "speculation_barrier" pattern.
2720 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
2721 TARGET_HAVE_SPECULATION_SAFE_VALUE.
2722 * doc/tm.texi: Regenerated.
2723 * target.def (have_speculation_safe_value, speculation_safe_value): New
2725 * targhooks.c (default_have_speculation_safe_value): New function.
2726 (default_speculation_safe_value): New function.
2727 * targhooks.h (default_have_speculation_safe_value): Add prototype.
2728 (default_speculation_safe_value): Add prototype.
2730 2018-07-31 David Malcolm <dmalcolm@redhat.com>
2732 * dump-context.h (dump_context::dump_loc): New decl.
2733 * dumpfile.c (dump_context::dump_loc): New member function.
2734 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
2735 and dump_gimple_stmt.
2736 (dump_context::dump_gimple_expr_loc): Likewise, using
2738 (dump_context::dump_generic_expr_loc): Likewise, using
2740 (dump_context::dump_printf_loc_va): Likewise, using
2742 (dump_context::begin_scope): Explicitly using the global function
2743 "dump_loc", rather than the member function.
2745 2018-07-31 Martin Sebor <msebor@redhat.com>
2747 PR tree-optimization/86741
2748 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
2750 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
2752 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
2753 depend on whether prefetch instructions will be emitted or not.
2754 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
2755 will be emitted or not.
2756 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
2757 (TARGET_SETMEM_PFD): New macros.
2759 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2761 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
2762 (NULL_STMT_VEC_INFO): Delete.
2763 (stmt_vec_info::operator*): Likewise.
2764 (stmt_vec_info::operator gimple *): Likewise.
2765 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
2766 of NULL_STMT_VEC_INFO.
2767 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2768 (vect_reassociating_reduction_p): Likewise.
2769 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
2770 (vectorizable_store): Likewise.
2771 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
2772 (vec_info::free_stmt_vec_infos): Likewise.
2774 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2776 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
2777 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
2779 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2781 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
2782 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
2783 (vec_info::free_stmt_vec_info): New private member functions.
2784 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
2785 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
2786 * tree-parloops.c (gather_scalar_reductions): Remove calls to
2787 set_stmt_vec_info_vec and free_stmt_vec_infos.
2788 * tree-vect-loop.c (_loop_vec_info): Remove call to
2789 set_stmt_vec_info_vec.
2790 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
2791 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
2792 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
2793 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
2794 (vec_info::free_stmt_vec_info): ...these new functions. Remove
2795 assignments in {vec_info::,}new_stmt_vec_info that are redundant
2796 with the clearing in the xcalloc.
2797 (stmt_vec_info_vec): Delete.
2798 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
2799 (vectorize_loops): Likewise.
2800 (vec_info::~vec_info): Remove argument from call to
2801 free_stmt_vec_infos.
2802 (vec_info::add_stmt): Remove vinfo argument from call to
2805 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2807 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
2808 rather than a gimple stmt.
2809 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
2810 information for pattern statements when passed the original
2811 statement; instead wait to be passed the pattern statement itself.
2812 Don't call set_vinfo_for_stmt here.
2813 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
2814 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
2815 stmt_vec_infos here.
2816 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
2817 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
2818 stmt_vec_infos entry.
2820 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2822 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
2823 * tree-vectorizer.c (vec_info::replace_stmt): New function.
2824 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
2825 * tree-vect-stmts.c (vectorizable_call): Likewise.
2826 (vectorizable_simd_clone_call): Likewise.
2828 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2830 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
2831 * tree-vectorizer.c (vec_info::remove_stmt): New function.
2832 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
2833 * tree-vect-loop.c (vect_transform_loop): Likewise.
2834 * tree-vect-slp.c (vect_schedule_slp): Likewise.
2835 * tree-vect-stmts.c (vect_remove_stores): Likewise.
2837 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2839 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
2840 (vect_dr_stmt): Delete.
2841 * tree-vectorizer.c (vec_info::lookup_dr): New function.
2842 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
2844 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
2845 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
2846 (vect_verify_datarefs_alignment, vect_peeling_supportable)
2847 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
2848 (vect_analyze_data_refs): Likewise.
2849 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
2851 (vect_find_same_alignment_drs): Likewise.
2852 (vect_slp_analyze_node_dependences): Update calls accordingly.
2853 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
2854 instead of DR_VECT_AUX.
2855 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
2856 of a vector data references. Use vec_info::lookup_dr instead of
2858 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
2859 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
2860 instead of DR_VECT_AUX.
2862 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2864 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
2866 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
2868 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2869 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2870 (vect_gen_prolog_loop_niters): Likewise.
2872 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2874 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
2875 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
2876 (vect_known_alignment_in_bytes, vect_dr_behavior)
2877 (vect_get_scalar_dr_size): Take references as dr_vec_infos
2878 instead of data_references. Update calls to other routines for
2879 which the same change has been made.
2880 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
2881 dr_vec_infos instead of stmt_vec_infos.
2882 (vect_analyze_data_ref_dependence): Update call accordingly.
2883 (vect_slp_analyze_data_ref_dependence)
2884 (vect_record_base_alignments): Use DR_VECT_AUX.
2885 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
2886 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
2887 (vector_alignment_reachable_p, vect_get_data_access_cost)
2888 (vect_peeling_supportable, vect_analyze_group_access_1)
2889 (vect_analyze_group_access, vect_analyze_data_ref_access)
2890 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
2891 (vect_compile_time_alias, vect_small_gap_p)
2892 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
2893 (vect_supportable_dr_alignment): Take references as dr_vec_infos
2894 instead of data_references. Update calls to other routines for
2895 which the same change has been made.
2896 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
2897 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
2898 (vect_slp_analyze_and_verify_node_alignment)
2899 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
2900 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
2901 (vect_setup_realignment): Use dr_vec_infos. Update calls after
2903 (_vect_peel_info::dr): Replace with...
2904 (_vect_peel_info::dr_info): ...this new field.
2905 (vect_peeling_hash_get_most_frequent)
2906 (vect_peeling_hash_choose_best_peeling): Update accordingly.
2907 (vect_peeling_hash_get_lowest_cost):
2908 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
2909 routines for which the same change has been made.
2910 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
2912 * tree-vect-loop-manip.c (get_misalign_in_elems)
2913 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
2915 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2916 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
2917 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
2918 (get_group_load_store_type, get_negative_load_store_type)
2919 (vect_get_data_ptr_increment, vectorizable_store)
2920 (vectorizable_load): Likewise.
2921 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
2922 Update calls to other routines for which the same change has been made.
2924 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2926 * tree-vectorizer.h (vec_info::move_dr): New member function.
2927 (dataref_aux): Rename to...
2928 (dr_vec_info): ...this and add "dr" and "stmt" fields.
2929 (_stmt_vec_info::dr_aux): Update accordingly.
2930 (_stmt_vec_info::data_ref_info): Delete.
2931 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
2932 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
2933 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
2934 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
2936 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
2937 (STMT_VINFO_DR_INFO): New macro.
2938 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
2939 (set_dr_misalignment): Update after rename of dataref_aux.
2940 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
2941 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
2942 initialization of STMT_VINFO_DATA_REF.
2943 * tree-vectorizer.c (vec_info::move_dr): New function.
2944 * tree-vect-patterns.c (vect_recog_bool_pattern)
2945 (vect_recog_mask_conversion_pattern)
2946 (vect_recog_gather_scatter_pattern): Use it.
2947 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
2948 the "dr" and "stmt" fields of dr_vec_info instead of
2949 STMT_VINFO_DATA_REF.
2951 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2953 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
2954 (is_pattern_stmt_p): Use it.
2955 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
2956 on pattern statements.
2958 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2960 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
2961 original stmt as a stmt_vec_info rather than a gimple stmt.
2962 (vect_pattern_recog_1): Take the statement directly as a
2963 stmt_vec_info, rather than via a gimple_stmt_iterator.
2964 Update call to vect_mark_pattern_stmts.
2965 (vect_pattern_recog): Update calls accordingly.
2967 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2969 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
2970 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
2971 a vect_def_type for the first argument.
2972 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
2973 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
2974 operand if it isn't defined by a vectorized statement.
2975 (vect_build_gather_load_calls): Remove the mask_dt argument and
2976 update calls to vect_get_vec_def_for_stmt_copy.
2977 (vectorizable_bswap): Likewise the dt argument.
2978 (vectorizable_call): Update calls to vectorizable_bswap and
2979 vect_get_vec_def_for_stmt_copy.
2980 (vectorizable_simd_clone_call, vectorizable_assignment)
2981 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
2982 (vectorizable_comparison): Update calls to
2983 vect_get_vec_def_for_stmt_copy.
2984 (vectorizable_store): Likewise. Remove now-unnecessary calls to
2986 (vect_get_loop_based_defs): Remove dt argument and update call
2987 to vect_get_vec_def_for_stmt_copy.
2988 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
2989 and vect_get_vec_def_for_stmt_copy.
2990 (vectorizable_load): Update calls to vect_build_gather_load_calls
2991 and vect_get_vec_def_for_stmt_copy.
2992 * tree-vect-loop.c (vect_create_epilog_for_reduction)
2993 (vectorizable_reduction, vectorizable_live_operation): Update calls
2994 to vect_get_vec_def_for_stmt_copy.
2996 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2998 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
2999 and gimple stmt arguments with a stmt_vec_info.
3000 (vect_record_base_alignments): Update calls accordingly.
3001 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
3002 and gimple stmt arguments with a stmt_vec_info.
3003 (vect_build_slp_tree_1): Remove vinfo argument and update call
3004 to vect_record_max_nunits.
3005 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
3006 and vect_record_max_nunits.
3008 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3010 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
3011 file and take a stmt_vec_info instead of a gimple stmt.
3012 (supportable_widening_operation, vect_finish_replace_stmt)
3013 (vect_finish_stmt_generation, vect_get_store_rhs)
3014 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
3015 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
3016 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
3017 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
3018 (vect_create_data_ref_ptr, bump_vector_ptr)
3019 (vect_permute_store_chain, vect_setup_realignment)
3020 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
3021 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
3022 (vectorizable_reduction, vectorizable_induction)
3023 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
3024 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
3025 than gimple stmts as arguments.
3026 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
3027 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
3028 (can_group_stmts_p, vect_check_gather_scatter)
3029 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3030 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
3031 (vect_permute_load_chain, vect_shift_permute_load_chain)
3032 (vect_transform_grouped_load)
3033 (vect_record_grouped_load_vectors): Likewise.
3034 * tree-vect-loop.c (vect_fixup_reduc_chain)
3035 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
3036 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
3037 (vectorizable_reduction, vectorizable_induction)
3038 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
3039 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
3040 (vect_get_load_store_mask): Likewise.
3041 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
3042 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
3043 * tree-vect-stmts.c (vect_mark_relevant)
3044 (is_simple_and_all_uses_invariant)
3045 (exist_non_indexing_operands_for_use_p, process_use)
3046 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
3047 (vect_get_vec_def_for_operand, vect_get_vec_defs)
3048 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
3049 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
3050 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
3051 (get_negative_load_store_type, get_load_store_type)
3052 (vect_check_load_store_mask, vect_check_store_rhs)
3053 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
3054 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3055 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3056 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3057 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
3058 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
3059 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
3060 (supportable_widening_operation): Likewise.
3062 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3064 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
3065 a stmt_vec_info instead of a gcall.
3066 (vect_check_gather_scatter): Update call accordingly.
3067 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
3069 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
3070 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
3071 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
3072 instead of a gimple stmt.
3073 (vect_transform_loop): Update calls accordingly.
3074 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
3075 stmt_vec_infos instead of gimple stmts.
3076 (vect_analyze_slp_instance): Update use accordingly.
3077 * tree-vect-stmts.c (read_vector_array, write_vector_array)
3078 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
3079 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
3080 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
3081 (vect_gen_widened_results_half, vect_get_loop_based_defs)
3082 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
3083 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
3084 down to subroutines.
3086 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3088 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
3089 of the worklist from a vector of gimple stmts to a vector of
3091 * tree-vect-stmts.c (vect_mark_relevant, process_use)
3092 (vect_mark_stmts_to_be_vectorized): Likewise
3094 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3096 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
3097 statement before passing it to vect_analyze_stmt.
3098 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
3099 the chain of phi vector definitions. Track the exit phi via its
3101 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
3102 STMT_VINFO_REDUC_DEF.
3103 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
3104 stmt_vec_infos to handle the statement chains.
3105 (vect_get_slp_defs): Record the first statement in the node
3106 using a stmt_vec_info.
3107 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
3108 statements here and pass their stmt_vec_info down to subroutines.
3109 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
3110 down to vect_finish_stmt_generation.
3111 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
3112 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
3113 stmt_vec_infos to subroutines.
3114 (vect_remove_stores): Use stmt_vec_infos to handle the statement
3117 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3119 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
3120 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
3121 (vect_permute_store_chain, vect_setup_realignment)
3122 (vect_permute_load_chain, vect_shift_permute_load_chain)
3123 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
3124 stmts internally, and when passing values to other vectorizer routines.
3125 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
3126 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
3127 (vect_analyze_loop_operations, get_initial_def_for_reduction)
3128 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
3129 (vectorizable_reduction, vectorizable_induction)
3130 (vectorizable_live_operation, vect_transform_loop_stmt)
3131 (vect_transform_loop): Likewise.
3132 * tree-vect-patterns.c (vect_reassociating_reduction_p)
3133 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
3134 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
3135 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3136 (vect_slp_analyze_node_operations_1): Likewise.
3137 * tree-vect-stmts.c (vect_mark_relevant, process_use)
3138 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
3139 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
3140 (vect_finish_stmt_generation_1, get_group_load_store_type)
3141 (get_load_store_type, vect_build_gather_load_calls)
3142 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3143 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3144 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3145 (vectorizable_store, vectorizable_load, vectorizable_condition)
3146 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
3147 (supportable_widening_operation): Likewise.
3148 (vect_get_vector_types_for_stmt): Likewise.
3149 * tree-vectorizer.h (vect_dr_behavior): Likewise.
3151 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3153 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
3154 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
3155 (vect_permute_store_chain, vect_permute_load_chain)
3156 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
3157 repeated stmt_vec_info lookups.
3158 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
3159 (vect_update_ivs_after_vectorizer): Likewise.
3160 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
3161 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
3162 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
3163 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3164 (vect_bb_slp_scalar_cost): Likewise.
3165 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
3167 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3169 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
3170 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
3171 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
3172 to get gassigns and gcalls, rather than operating on generc gimple
3174 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
3175 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
3176 (vectorizable_load, vect_analyze_stmt): Likewise.
3177 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
3179 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3181 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
3182 return stmt_vec_infos rather than gimple stmts. Do not accept
3184 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
3186 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3187 Update use of get_later_stmt.
3188 (vect_get_constant_vectors): Update call accordingly.
3189 (vect_schedule_slp_instance): Likewise
3190 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
3191 (vect_slp_analyze_instance_dependence): Likewise.
3192 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
3194 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3196 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
3197 (stmt_info_for_cost::stmt_info): ...this new field.
3198 (add_stmt_costs): Update accordingly.
3199 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
3200 (vect_get_known_peeling_cost): Likewise.
3201 (vect_estimate_min_profitable_iters): Likewise.
3202 * tree-vect-stmts.c (record_stmt_cost): Likewise.
3204 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3206 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
3207 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3208 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3210 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
3212 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3214 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
3215 a gimple stmt to a stmt_vec_info.
3216 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
3218 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3220 * tree-vectorizer.h (vec_info::grouped_stores): Change from
3221 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3222 (_loop_vec_info::reduction_chains): Likewise.
3223 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
3225 * tree-vect-slp.c (vect_analyze_slp): Likewise.
3227 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3229 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
3230 a gimple stmt to a stmt_vec_info.
3231 (_stmt_vec_info::next_element): Likewise.
3232 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
3233 (vect_slp_analyze_and_verify_node_alignment)
3234 (vect_analyze_group_access_1, vect_analyze_group_access)
3235 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
3236 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
3237 (vect_supportable_dr_alignment): Update accordingly.
3238 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
3239 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
3240 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
3241 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
3242 * tree-vect-slp.c (vect_build_slp_tree_1)
3243 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
3244 (vect_split_slp_store_group, vect_analyze_slp_instance)
3245 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
3246 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
3247 (get_group_load_store_type, get_load_store_type)
3248 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
3249 (vect_transform_stmt, vect_remove_stores): Likewise.
3251 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3253 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
3255 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
3256 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
3257 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
3258 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
3259 (vector_alignment_reachable_p, vect_get_data_access_cost)
3260 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
3261 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
3262 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3263 (vect_analyze_group_access_1, vect_analyze_group_access)
3264 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
3265 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
3266 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
3267 result of vect_dr_stmt and use the stmt_vec_info instead of
3268 the associated gimple stmt.
3269 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3270 (vect_gen_prolog_loop_niters): Likewise.
3271 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3273 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3275 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
3276 to a vec<stmt_vec_info>.
3277 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
3278 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
3280 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
3281 to a vec<stmt_vec_info>.
3282 (bst_traits::value_type, bst_traits::value_type): Likewise.
3283 (bst_traits::hash): Update accordingly.
3284 (vect_get_and_check_slp_defs): Change the stmts parameter from
3285 a vec<gimple *> to a vec<stmt_vec_info>.
3286 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
3287 (vect_build_slp_tree): Likewise.
3288 (vect_build_slp_tree_2): Likewise. Update uses of
3289 SLP_TREE_SCALAR_STMTS.
3290 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
3291 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
3292 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
3293 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
3294 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
3295 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
3296 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
3297 (vect_get_constant_vectors, vect_get_slp_defs)
3298 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
3299 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
3300 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
3301 instead of gimple stmts.
3302 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
3303 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
3304 (vect_slp_analyze_instance_dependence): Update uses of
3305 SLP_TREE_SCALAR_STMTS.
3306 (vect_slp_analyze_and_verify_node_alignment): Likewise.
3307 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
3308 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
3309 (get_initial_defs_for_reduction): Likewise.
3310 (vect_create_epilog_for_reduction): Likewise.
3311 (vectorize_fold_left_reduction): Likewise.
3312 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
3313 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
3314 (can_vectorize_live_stmts): Likewise.
3316 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3318 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
3319 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3320 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
3322 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
3324 (gather_scalar_reductions): Update after above interface changes.
3325 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
3326 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
3328 (vect_force_simple_reduction): Likewise.
3329 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
3330 LOOP_VINFO_REDUCTIONS.
3331 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3333 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3335 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
3336 a gimple stmt to a stmt_vec_info.
3337 * tree-vect-loop.c (vect_active_double_reduction_p)
3338 (vect_force_simple_reduction, vectorizable_reduction): Update
3341 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3343 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
3344 vec<gimple *> to a vec<stmt_vec_info>.
3345 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
3346 the reduction_phis argument from a vec<gimple *> to a
3348 (vectorizable_reduction): Likewise the phis local variable that
3349 is passed to vect_create_epilog_for_reduction. Update for new type
3350 of SLP_TREE_VEC_STMTS.
3351 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
3352 (vectorizable_live_operation): Likewise.
3353 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
3354 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
3356 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3358 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
3359 a gimple stmt to a stmt_vec_info.
3360 (vectorizable_condition, vectorizable_live_operation)
3361 (vectorizable_reduction, vectorizable_induction): Pass back the
3362 vectorized statement as a stmt_vec_info.
3363 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
3364 use of STMT_VINFO_VEC_STMT.
3365 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
3366 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
3367 as stmt_vec_infos rather than gimple stmts.
3368 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
3370 (vectorizable_live_operation): Likewise.
3371 (vectorizable_reduction, vectorizable_induction): Likewise,
3372 updating use of STMT_VINFO_VEC_STMT.
3373 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
3374 of STMT_VINFO_VEC_STMT.
3375 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
3376 (vectorizable_simd_clone_call, vectorizable_conversion)
3377 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3378 (vectorizable_store, vectorizable_load, vectorizable_condition)
3379 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
3380 from a gimple stmt to a stmt_vec_info.
3381 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
3382 pointer to a stmt_vec_info to the vectorizable_* routines.
3384 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3386 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
3387 a gimple stmt to a stmt_vec_info.
3388 (is_pattern_stmt_p): Update accordingly.
3389 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
3390 (vect_record_grouped_load_vectors): Likewise.
3391 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
3392 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
3393 (vect_model_reduction_cost): Likewise.
3394 (vect_create_epilog_for_reduction): Likewise.
3395 (vectorizable_reduction, vectorizable_induction): Likewise.
3396 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3397 Return the stmt_vec_info for the pattern statement.
3398 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
3399 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
3400 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
3401 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
3402 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
3403 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
3404 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
3405 (free_stmt_vec_info, vect_is_simple_use): Likewise.
3407 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3409 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
3410 (vect_finish_stmt_generation): Likewise.
3411 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3412 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
3413 (vect_build_gather_load_calls): Use the return value of the above
3414 functions instead of a separate call to vinfo_for_stmt. Use narrow
3415 scopes for the input gimple stmt and wider scopes for the associated
3416 stmt_vec_info. Use vec_info::lookup_def when setting these
3417 stmt_vec_infos from an SSA_NAME definition.
3418 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3419 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3420 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3421 (vectorizable_store, vectorizable_load, vectorizable_condition)
3422 (vectorizable_comparison): Likewise.
3423 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
3424 (vectorizable_reduction): Likewise.
3426 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3428 * tree-vectorizer.h (vect_is_simple_use): Add an optional
3429 stmt_vec_info * parameter before the optional gimple **.
3430 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3431 (process_use, vect_get_vec_def_for_operand_1): Update callers.
3432 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
3433 * tree-vect-loop.c (vectorizable_reduction): Likewise.
3434 (vectorizable_live_operation): Likewise.
3435 * tree-vect-patterns.c (type_conversion_p): Likewise.
3436 (vect_look_through_possible_promotion): Likewise.
3437 (vect_recog_rotate_pattern): Likewise.
3438 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3440 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3442 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
3443 a typedef to a wrapper class.
3444 (NULL_STMT_VEC_INFO): New macro.
3445 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
3446 (stmt_vec_info::operator*): New function.
3447 (stmt_vec_info::operator gimple *): Likewise.
3448 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
3449 (add_stmt_costs): Likewise.
3450 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
3451 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
3452 (vect_get_known_peeling_cost): Likewise.
3453 (vect_estimate_min_profitable_iters): Likewise.
3454 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3455 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
3456 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3457 (vectorizable_store, free_stmt_vec_infos): Likewise.
3458 (new_stmt_vec_info): Change return type of xcalloc to
3461 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3463 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
3464 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
3465 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
3466 a single_imm_use-based sequence.
3467 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
3469 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3471 * tree-vectorizer.h (vec_info::lookup_def): Declare.
3472 * tree-vectorizer.c (vec_info::lookup_def): New function.
3473 * tree-vect-patterns.c (vect_get_internal_def): Use it.
3474 (vect_widened_op_tree): Likewise.
3475 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3476 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
3477 (vectorizable_reduction): Likewise.
3478 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
3480 (vect_is_slp_reduction): Update calls accordingly. Use
3481 vec_info::lookup_def.
3482 (vect_is_simple_reduction): Likewise
3483 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
3485 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3487 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
3488 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
3489 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
3491 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
3492 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
3493 (vect_update_vf_for_slp, vect_analyze_loop_operations)
3494 (vect_is_slp_reduction, vectorizable_induction)
3495 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
3496 * tree-vect-patterns.c (vect_init_pattern_stmt):
3497 (vect_determine_min_output_precision_1, vect_determine_precisions)
3498 (vect_pattern_recog): Likewise.
3499 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
3500 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
3501 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
3502 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
3503 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
3504 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
3505 info field from a loop to a loop_vec_info.
3507 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3509 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
3510 (vec_info::add_stmt): Declare.
3511 * tree-vectorizer.c (vec_info::add_stmt): New function.
3512 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
3513 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
3514 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
3515 (vectorizable_induction): Likewise.
3516 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
3517 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3518 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
3519 (vectorizable_load): Likewise.
3520 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3521 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
3522 (vect_recog_gather_scatter_pattern): Likewise.
3523 (append_pattern_def_seq): Likewise. Remove a check that is
3524 performed by add_stmt itself.
3526 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3528 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
3529 which make_ssa_name was called with new_stmt before new_stmt
3532 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3534 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
3536 (vect_is_slp_reduction): ...here...
3537 (vect_is_simple_reduction): ...and here. Remove repetition of tests
3538 that are already known to be false.
3540 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3542 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
3543 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
3544 STMT_VINFO_NUM_SLP_USES when it's true.
3545 (vect_free_slp_instance): Add a final_p parameter and pass it to
3547 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
3548 (vect_analyze_slp_instance): Likewise.
3549 (vect_slp_analyze_operations): Likewise.
3550 (vect_slp_analyze_bb_1): Likewise.
3551 * tree-vectorizer.c (vec_info): Likewise.
3552 * tree-vect-loop.c (vect_transform_loop): Likewise.
3554 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3556 * tree-vect-loop.c (vectorizable_reduction): Assert that the
3557 function is not called for second and subsequent members of
3560 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3562 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
3563 cases for nested loops from here to ...
3564 (vect_create_epilog_for_reduction): ...here. Only call
3565 vect_is_simple_use for inner-loop reductions.
3567 2018-07-31 Martin Liska <mliska@suse.cz>
3569 PR gcov-profile/85338
3570 PR gcov-profile/85350
3571 PR gcov-profile/85372
3572 * profile.c (struct location_triplet): New.
3573 (struct location_triplet_hash): Likewise.
3574 (output_location): Do not output a BB that
3575 is already recorded for a line.
3576 (branch_prob): Use streamed_locations.
3578 2018-07-31 Martin Liska <mliska@suse.cz>
3580 PR gcov-profile/85370
3581 * coverage.c (coverage_begin_function): Do not mark target
3582 clones as artificial functions.
3584 2018-07-31 Martin Liska <mliska@suse.cz>
3586 PR gcov-profile/83813
3587 PR gcov-profile/84758
3588 PR gcov-profile/85217
3589 PR gcov-profile/85332
3590 * profile.c (branch_prob): Do not record GOTO expressions
3591 for GIMPLE statements which locations are already streamed.
3593 2018-07-31 Olivier Hainque <hainque@adacore.com>
3595 * gcc.c (handle_spec_function): Accept a soft_matched_part
3596 argument, as do_spec_1. Pass it down to ...
3597 (eval_spec_function): Accept a soft_matched_part argument,
3598 and pass it down to ...
3599 (do_spec_2): Accept a soft_matched_part argument, and pass
3600 it down to do_spec_1.
3601 (do_spec_1): Pass soft_matched_part to handle_spec_function.
3602 (handle_braces): Update call to handle_spec_function.
3603 (driver::set_up_specs): Update calls to do_spec_2.
3604 (compare_debug_dump_opt_spec_function): Likewise.
3605 (compare_debug_self_opt_spec_function): Likewise.
3607 2018-07-31 Olivier Hainque <hainque@adacore.com>
3609 * common.opt (nolibc): New option.
3610 * doc/invoke.texi (Link Options): Document it.
3611 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
3612 * config/alpha/linux.h: Likewise.
3613 * config/arc/elf.h: Likewise.
3614 * config/arm/uclinux-elf.h: Likewise.
3615 * config/arm/unknown-elf.h: Likewise.
3616 * config/avr/avrlibc.h: Likewise.
3617 * config/bfin/bfin.h: Likewise.
3618 * config/bfin/linux.h: Likewise.
3619 * config/bfin/uclinux.h: Likewise.
3620 * config/darwin.h: Likewise.
3621 * config/darwin10.h: Likewise.
3622 * config/darwin12.h: Likewise.
3623 * config/gnu-user.h: Likewise.
3624 * config/lm32/uclinux-elf.h: Likewise.
3625 * config/pa/pa-hpux11.h: Likewise.
3626 * config/pa/pa64-hpux.h: Likewise.
3627 * config/sparc/sparc.h: Likewise.
3629 2018-07-31 Olivier Hainque <hainque@adacore.com>
3631 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
3632 undefined variables.
3634 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
3637 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
3640 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
3642 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
3643 terminated string literal.
3645 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
3647 PR rtl-optimization/85160
3648 * combine.c (is_just_move): New function.
3649 (try_combine): Allow combining two instructions into two if neither of
3650 the original instructions was a move.
3652 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
3655 * doc/extend.texi (Global Register Variables): Discourage use of type
3657 (Local Register Variables): Likewise.
3659 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
3661 PR tree-optimization/86506
3662 * hwint.h (ceil_log2): Resync with hwint.c implementation.
3664 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
3667 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
3668 hard_regno, make sure no insn between `from` and `to` clobbers it.
3670 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
3671 Tom de Vries <tdevries@suse.de>
3673 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
3674 (PTX_DEFAULT_RUNTIME_DIM): ... this.
3675 (nvptx_goacc_validate_dims): Set default worker and gang dims to
3676 PTX_DEFAULT_RUNTIME_DIM.
3677 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
3679 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
3681 * config/pa/pa.c (pa_output_addr_vec): Align address table.
3682 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
3683 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
3685 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
3687 * config/rs6000/constraints.md (wG constraint): Delete, no longer
3689 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
3690 predicate to reflect toc fusion has been deleted.
3691 (toc_fusion_mem_raw): Delete, no longer used.
3692 (toc_fusion_mem_wrapped): Likewise.
3693 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
3695 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
3696 Delete, no longer used.
3697 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
3698 meant to be used for toc fusion.
3699 (rs6000_debug_print_mode): Delete toc fusion debugging.
3700 (rs6000_debug_reg_global): Likewise.
3701 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
3702 fusion and secondary reload support that were never used.
3703 (rs6000_option_override_internal): Delete TOC fusion, that was only
3704 partially defined, and it did not work unless you also used the
3706 (rs6000_legitimate_address_p): Delete TOC fusion support.
3707 (rs6000_opt_masks): Likewise.
3708 (fusion_wrap_memory_address): Delete function, no longer used.
3709 (fusion_split_address); Delete TOC fusion support.
3710 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
3711 longer used with toc fusion being deleted.
3712 (TARGET_TOC_FUSION_FP): Likewise.
3713 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
3715 (toc fusion spliter): Delete TOC fusion support.
3716 (toc_fusionload_<mode>): Likewise.
3717 (toc_fusionload_di): Likewise.
3718 (fusion_gpr_load_<mode>): Delete generator function, this insn no
3719 longer needs to be named. Rename predicate to delete TOC fusion.
3720 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
3721 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
3722 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
3723 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
3724 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
3726 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
3728 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
3729 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
3730 __int128 in built-in function prototypes.
3731 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
3732 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
3734 2018-07-27 Martin Sebor <msebor@redhat.com>
3736 PR tree-optimization/86696
3737 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
3738 types, including enums.
3739 (handle_char_store): Be prepared for the above function to fail.
3741 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
3743 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
3744 when optimization level is lower than 2 or optimize for size.
3746 2018-07-26 Martin Sebor <msebor@redhat.com>
3748 PR tree-optimization/86043
3749 PR tree-optimization/86042
3750 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
3751 (get_string_cst_length): Rename...
3752 (get_min_string_length): ...to this. Add argument.
3753 (handle_char_store): Extend to handle multi-character stores by
3755 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
3756 * tree.h (initializer_zerop): Add argument.
3758 2018-07-26 Jakub Jelinek <jakub@redhat.com>
3761 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
3762 declare target to variables if they have always,{to,from,tofrom} map
3765 2018-07-26 Martin Liska <mliska@suse.cz>
3768 * lto-wrapper.c: Add linker_output as prefix
3769 for ltrans_output_file.
3771 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
3773 PR rtl-optimization/85805
3774 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
3775 value for hard registers if that was written in the same mode.
3777 2018-07-26 Martin Liska <mliska@suse.cz>
3779 PR gcov-profile/86536
3780 * gcov.c (format_gcov): Use printf format %.*f directly
3781 and do not handle special values.
3783 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3785 * common/config/arc/arc-common.c (arc_option_optimization_table):
3786 Update default optimizations for size.
3788 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3790 * config/arc/arc.md (movsf_insn): Add short instruction selection.
3791 * config/arc/constraints.md (CfZ): New constraint.
3792 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
3793 (subsf3_fpu): Likewise.
3794 (cmpsf_fpu): Likewise.
3795 (cmpsf_fpu_uneq): Likewise.
3797 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3799 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
3801 (arc_is_uncached_mem_p): uncached applies to both the variable and
3804 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3806 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
3809 2018-07-25 David Malcolm <dmalcolm@redhat.com>
3811 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
3812 field "m_scopes" from vec to auto_vec.
3814 2018-07-25 Martin Liska <mliska@suse.cz>
3816 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
3819 2018-07-25 Richard Biener <rguenther@suse.de>
3822 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
3823 special wrt context_die late.
3824 (gen_subprogram_die): Re-use DIEs in local scope.
3826 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
3828 PR tree-optimization/86644
3829 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
3831 2018-07-25 Martin Liska <mliska@suse.cz>
3834 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
3835 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
3837 2018-07-25 Martin Liska <mliska@suse.cz>
3840 * params.def: Explain ASan abbreviation and provide
3841 a documentation link.
3843 2018-07-24 Martin Sebor <msebor@redhat.com>
3845 PR tree-optimization/86622
3846 PR tree-optimization/86532
3847 * builtins.h (string_length): Declare.
3848 * builtins.c (c_strlen): Correct handling of non-constant offsets.
3849 (check_access): Be prepared for non-constant length ranges.
3850 (string_length): Make extern.
3851 * expr.c (string_constant): Only handle the minor non-constant
3852 array index. Use string_constant to compute the length of
3853 a generic string constant.
3855 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
3857 PR tree-optimization/86618
3858 * tree-vect-stmts.c (vectorizable_call): Don't take the address
3859 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
3861 2018-07-24 David Malcolm <dmalcolm@redhat.com>
3863 PR tree-optimization/86636
3864 * json.cc (json::object::set): Fix comment. Add assertions.
3865 (json::array::append): Move here from json.h. Add comment and an
3867 (json::string::string): Likewise.
3868 * json.h (json::array::append): Move to json.cc.
3869 (json::string::string): Likewise.
3870 * optinfo-emit-json.cc
3871 (optrecord_json_writer::impl_location_to_json): Assert that we
3872 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
3873 wrapper around it. Expand the location once, rather than three
3875 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
3876 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
3878 (optrecord_json_writer::optinfo_to_json): Likewise, in four
3879 places. Fix some overlong lines.
3881 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
3883 * config/aarch64/aarch64-simd.md
3884 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
3885 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
3886 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
3887 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
3888 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
3889 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
3890 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
3891 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
3892 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
3894 2018-07-24 Jakub Jelinek <jakub@redhat.com>
3897 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
3898 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
3899 and abs_d == d, do the power of two handling if profitable.
3901 2018-07-24 Richard Biener <rguenther@suse.de>
3903 * match.pd: Add BIT_FIELD_REF canonicalizations.
3905 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
3908 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
3910 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
3912 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
3913 terminated STRING_CST object.
3915 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
3917 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
3919 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
3921 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
3922 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
3923 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
3924 the elements into a register.
3925 (rs6000_split_v4si_init_di_reg): Delete.
3926 (rs6000_split_v4si_init): Delete.
3927 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
3928 (vsx_init_v4si): Rewrite as a define_expand.
3930 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
3932 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
3933 zero_extend argument from memory): New.
3935 2018-07-22 Martin Sebor <msebor@redhat.com>
3938 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
3939 diagnosing calls with unknown arguments unless -Walloca-larger-than
3940 is restricted to less than PTRDIFF_MAX bytes.
3942 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
3944 * doc/gcov.texi (Invoking Gcov): Editorial changes.
3946 2018-07-20 David Malcolm <dmalcolm@redhat.com>
3948 * pretty-print.c (text_info::set_location): Remove redundant
3949 "line_table" parameter from call to rich_location::set_range.
3951 2018-07-20 Martin Sebor <msebor@redhat.com>
3954 * builtins.c (expand_builtin_alloca): Adjust.
3955 * calls.c (alloc_max_size): Simplify.
3956 * cgraphunit.c (cgraph_node::expand): Adjust.
3957 * common.opt (larger_than_size, warn_frame_larger_than): Remove
3959 (frame_larger_than_size): Same.
3960 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
3961 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
3963 * doc/invoke.texi (GCC Command Options): Document option arguments.
3964 Explain byte-size arguments and suffixes.
3965 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
3966 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
3967 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
3968 * doc/options.texi (UInteger): Expand.
3969 (Host_Wide_Int, ByteSize): Document new properties.
3970 * final.c (final_start_function_1): Include sizes in an error message.
3971 * function.c (frame_offset_overflow): Same.
3972 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
3973 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
3974 Diagnose unbounded alloca calls only for limits of less than
3976 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
3977 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
3979 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
3980 only for limits of less than PTRDIFF_MAX.
3981 * langhooks-def.h (lhd_handle_option): Change function argument
3983 * langhooks.c (lhd_handle_option): Same.
3984 * langhooks.h (handle_option): Same.
3985 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
3987 (var_type, var_type_struct): Same.
3988 (var_set): Handle ByteSize flag.
3989 * optc-gen.awk: Add comments to output to ease debugging. Make
3990 use of HOST_WIDE_INT where appropriate.
3991 * opts-gen-save.awk: Use %lx to format unsigned long.
3992 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
3993 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
3994 arguments. Parse bytes-size suffixes.
3995 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
3996 (enum_value_to_arg): Same.
3997 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
3998 (handle_option): Adjust.
3999 (generate_option): Change function argument to HOST_WIDE_INT.
4000 (cmdline_handle_error): Adjust.
4001 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
4002 (set_option): Change function argument to HOST_WIDE_INT.
4003 (option_enabled): Handle cl_host_wide_int.
4004 (get_option_state): Handle CLVC_SIZE.
4005 (control_warning_option): Same.
4006 * opts.c (common_handle_option): Change function argument to
4007 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
4008 OPT_Wvla_larger_than_.
4009 * opts.h (enum cl_var_type): Add an enumerator.
4010 * stor-layout.c (layout_decl): Print a more meaningful warning.
4011 * toplev.c (output_stack_usage): Adjust.
4013 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
4015 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
4016 call to inline_expand_builtin_string_cmp.
4017 (expand_builtin_strcmp): Likewise.
4018 (expand_builtin_strncmp): Likewise.
4019 (inline_string_cmp): Delete the last parameter, change char_type_node
4020 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
4022 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
4023 the inlining expansion on target where the type of the call has same or
4024 narrower precision than unsigned char.
4026 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4028 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
4029 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
4030 * common.opt (fsave-optimization-record): New option.
4031 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
4032 * doc/invoke.texi (-fsave-optimization-record): New option.
4033 * dumpfile.c: Include "optinfo-emit-json.h".
4034 (struct kv_pair): Move to coretypes.h.
4035 (optgroup_options): Make non-static.
4036 (dump_context::end_scope): Call
4037 optimization_records_maybe_pop_dump_scope.
4038 * dumpfile.h (optgroup_options): New decl.
4039 * json.cc: New file.
4041 * optinfo-emit-json.cc: New file.
4042 * optinfo-emit-json.h: New file.
4043 * optinfo.cc: Include "optinfo-emit-json.h".
4044 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
4045 (optinfo_enabled_p): Check optimization_records_enabled_p.
4046 (optinfo_wants_inlining_info_p): Likewise.
4047 * optinfo.h: Update comment.
4048 * profile-count.c (profile_quality_as_string): New function.
4049 * profile-count.h (profile_quality_as_string): New decl.
4050 (profile_count::quality): New accessor.
4051 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
4052 and optinfo_emit_json_cc_tests.
4053 * selftest.h (selftest::json_cc_tests): New decl.
4054 (selftest::optinfo_emit_json_cc_tests): New decl.
4055 * toplev.c: Include "optinfo-emit-json.h".
4056 (compile_file): Call optimization_records_finish.
4057 (do_compile): Call optimization_records_start.
4058 * tree-ssa-live.c: Include optinfo.h.
4059 (remove_unused_scope_block_p): Retain inlining information if
4060 optinfo_wants_inlining_info_p returns true.
4062 2018-07-20 Richard Biener <rguenther@suse.de>
4065 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
4066 to cover -flto-partition=none.
4068 2018-07-20 Martin Liska <mliska@suse.cz>
4070 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
4071 (get_decl_source_range): Remove unused function.
4073 2018-07-20 Richard Biener <rguenther@suse.de>
4075 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
4076 (struct vn_phi_s): Likewise.
4077 (struct vn_reference_s): Likewise.
4078 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
4079 for searching the slot of an entry known to be in the hash itself.
4080 (vn_phi_hasher::equal): Likewise.
4081 (vn_reference_hasher::equal): Likewise.
4082 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
4084 (optimistic_info, current_info): Remove, keeping only valid_info.
4085 (vn_reference_lookup_1): Remove fallback lookup.
4086 (vn_reference_lookup_2): Likewise.
4087 (vn_nary_op_lookup_1): Likewise.
4088 (vn_phi_lookup): Likewise.
4089 (vn_nary_build_or_lookup_1): Make sure to not chain the built
4091 (vn_reference_insert): Adjust, chain the inserted hash element
4092 at last_inserted_ref.
4093 (vn_reference_insert_pieces): Likewise.
4094 (visit_reference_op_call): Likewise.
4095 (vn_nary_op_insert_into): Chain the inserted hash element at
4097 (vn_nary_op_insert_pieces): Adjust.
4098 (vn_nary_op_insert): Likewise.
4099 (vn_nary_op_insert_stmt): Likewise.
4100 (vn_phi_insert): Adjust, chain the inserted hash element at
4102 (process_scc): Remove clearing and copying the optimistic
4103 table. Instead remove elements inserted during an optimistic
4104 iteration from the single table we maintain.
4105 (init_scc_vn): Adjust.
4106 (free_scc_vn): Likewise.
4107 (sccvn_dom_walker::record_cond): Likewise.
4108 (sccvn_dom_walker::after_dom_children): Likewise.
4110 2018-07-19 Martin Sebor <msebor@redhat.com>
4112 PR tree-optimization/84047
4113 PR tree-optimization/83776
4114 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
4115 (check_array_bounds): Call it.
4117 2018-07-19 Martin Sebor <msebor@redhat.com>
4119 * align.h (align_flags): Use member initialization.
4121 2018-07-19 David Malcolm <dmalcolm@redhat.com>
4123 * Makefile.in (OBJS): Add optinfo.o.
4124 * coretypes.h (class symtab_node): New forward decl.
4125 (struct cgraph_node): New forward decl.
4126 (class varpool_node): New forward decl.
4127 * dump-context.h: New file.
4128 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
4130 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
4131 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
4132 (set_alt_dump_file): Likewise.
4133 (dump_context::~dump_context): New dtor.
4134 (dump_gimple_stmt): Move implementation to...
4135 (dump_context::dump_gimple_stmt): ...this new member function.
4136 Add the stmt to any pending optinfo, creating one if need be.
4137 (dump_gimple_stmt_loc): Move implementation to...
4138 (dump_context::dump_gimple_stmt_loc): ...this new member function.
4139 Start a new optinfo and add the stmt to it.
4140 (dump_gimple_expr): Move implementation to...
4141 (dump_context::dump_gimple_expr): ...this new member function.
4142 Add the stmt to any pending optinfo, creating one if need be.
4143 (dump_gimple_expr_loc): Move implementation to...
4144 (dump_context::dump_gimple_expr_loc): ...this new member function.
4145 Start a new optinfo and add the stmt to it.
4146 (dump_generic_expr): Move implementation to...
4147 (dump_context::dump_generic_expr): ...this new member function.
4148 Add the tree to any pending optinfo, creating one if need be.
4149 (dump_generic_expr_loc): Move implementation to...
4150 (dump_context::dump_generic_expr_loc): ...this new member
4151 function. Add the tree to any pending optinfo, creating one if
4153 (dump_printf): Move implementation to...
4154 (dump_context::dump_printf_va): ...this new member function. Add
4155 the text to any pending optinfo, creating one if need be.
4156 (dump_printf_loc): Move implementation to...
4157 (dump_context::dump_printf_loc_va): ...this new member function.
4158 Start a new optinfo and add the stmt to it.
4159 (dump_dec): Move implementation to...
4160 (dump_context::dump_dec): ...this new member function. Add the
4161 value to any pending optinfo, creating one if need be.
4162 (dump_context::dump_symtab_node): New member function.
4163 (dump_context::get_scope_depth): New member function.
4164 (dump_context::begin_scope): New member function.
4165 (dump_context::end_scope): New member function.
4166 (dump_context::ensure_pending_optinfo): New member function.
4167 (dump_context::begin_next_optinfo): New member function.
4168 (dump_context::end_any_optinfo): New member function.
4169 (dump_context::s_current): New global.
4170 (dump_context::s_default): New global.
4171 (dump_scope_depth): Delete global.
4172 (dumpfile_ensure_any_optinfo_are_flushed): New function.
4173 (dump_symtab_node): New function.
4174 (get_dump_scope_depth): Reimplement in terms of dump_context.
4175 (dump_begin_scope): Likewise.
4176 (dump_end_scope): Likewise.
4177 (selftest::temp_dump_context::temp_dump_context): New ctor.
4178 (selftest::temp_dump_context::~temp_dump_context): New dtor.
4179 (selftest::verify_item): New function.
4180 (ASSERT_IS_TEXT): New macro.
4181 (ASSERT_IS_TREE): New macro.
4182 (ASSERT_IS_GIMPLE): New macro.
4183 (selftest::test_capture_of_dump_calls): New test.
4184 (selftest::dumpfile_c_tests): Call it.
4185 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
4186 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
4187 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
4188 descriptive comment.
4189 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
4190 (dump_node, dump_bb): Move these unrelated decls.
4191 (class dump_manager): Add leading comment.
4192 * optinfo.cc: New file.
4193 * optinfo.h: New file.
4195 2018-07-19 Michael Collison <michael.collison@arm.com>
4196 Richard Henderson <rth@redhat.com>
4198 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
4199 (subti): Handle op1 zero.
4200 (subvti4, usub4ti4): New.
4201 (*sub<GPI>3_compare1_imm): New.
4202 (sub<GPI>3_carryinCV): New.
4203 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
4204 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
4206 2018-07-19 Michael Collison <michael.collison@arm.com>
4207 Richard Henderson <rth@redhat.com>
4209 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
4210 (addti3): Create simpler code if low part is already known to be 0.
4211 (addvti4, uaddvti4): New.
4212 (*add<GPI>3_compareC_cconly_imm): New.
4213 (*add<GPI>3_compareC_cconly): New.
4214 (*add<GPI>3_compareC_imm): New.
4215 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
4216 handle constants within this pattern..
4217 (*add<GPI>3_compareV_cconly_imm): New.
4218 (*add<GPI>3_compareV_cconly): New.
4219 (*add<GPI>3_compareV_imm): New.
4220 (add<GPI>3_compareV): New.
4221 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
4222 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
4223 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
4224 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
4225 with 'comparison' operator.
4226 (*add<GPI>3_compareV_cconly_imm): Ditto.
4227 (*add<GPI>3_compareV_cconly): Ditto.
4228 (*add<GPI>3_compareV_imm): Ditto.
4229 (add<GPI>3_compareV): Ditto.
4230 (add<mode>3_carryinC): Ditto.
4231 (*add<mode>3_carryinC_zero): Ditto.
4232 (*add<mode>3_carryinC): Ditto.
4233 (add<mode>3_carryinV): Ditto.
4234 (*add<mode>3_carryinV_zero): Ditto.
4235 (*add<mode>3_carryinV): Ditto.
4237 2018-07-19 Michael Collison <michael.collison@arm.com>
4238 Richard Henderson <rth@redhat.com>
4240 * config/aarch64/aarch64-modes.def (CC_V): New.
4241 * config/aarch64/aarch64-protos.h
4242 (aarch64_addti_scratch_regs): Declare
4243 (aarch64_subvti_scratch_regs): Declare.
4244 (aarch64_expand_subvti): Declare.
4245 (aarch64_gen_unlikely_cbranch): Declare
4246 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
4247 for signed overflow using CC_Vmode.
4248 (aarch64_get_condition_code_1): Handle CC_Vmode.
4249 (aarch64_gen_unlikely_cbranch): New function.
4250 (aarch64_addti_scratch_regs): New function.
4251 (aarch64_subvti_scratch_regs): New function.
4252 (aarch64_expand_subvti): New function.
4254 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
4256 * config/aarch64/aarch64-option-extensions.def: New entry for profile
4258 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
4259 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
4262 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
4265 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
4266 address check not strict.
4268 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
4270 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
4272 (store_pair_lanes<mode>): Likewise.
4273 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
4274 enum value 'ADDR_QUERY_LDP_STP_N'.
4275 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
4276 (aarch64_print_address_internal): Add declaration.
4277 (aarch64_print_ldpstp_address): Remove.
4278 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
4279 (aarch64_print_operand): Change printing of 'y'.
4280 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
4281 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
4282 'true' rather than '1'.
4283 * config/aarch64/constraints.md (Uml): Likewise.
4284 (Uml): Rename to Umn.
4287 2018-07-19 Richard Biener <rguenther@suse.de>
4289 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
4291 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
4292 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
4293 (vn_reference_hasher): Likewise.
4294 (struct vn_tables_s): Remove obstack and alloc-pool members.
4295 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
4296 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
4297 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
4298 (vn_reference_insert_pieces): Likewise.
4299 (alloc_vn_nary_op_noinit): Adjust.
4300 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
4301 (vn_phi_eq): Adjust.
4302 (shared_lookup_phiargs): Remove.
4303 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
4304 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
4305 (visit_reference_op_call): Likewise.
4306 (copy_nary, copy_phi, copy_reference): Remove.
4307 (process_scc): Rewind the obstack when iterating. Do not
4308 copy the elements to valid_info but just move them from one
4309 hashtable to the other.
4310 (allocate_vn_table): Adjust.
4311 (free_vn_table): Likewise.
4312 (init_scc_vn): Likewise.
4313 (free_scc_vn): Likewise.
4315 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
4318 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
4319 indirect_return as function type attribute.
4320 (ix86_attribute_table): Change indirect_return to function
4322 * doc/extend.texi: Update indirect_return attribute.
4324 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
4326 * wide-int.h (widest2_int): New.
4327 * gimple-fold.c (arith_overflowed_p): Use it.
4328 * tree.h (widest2_int_cst): New.
4329 * tree-vrp.c (wide_int_binop_overflow): Rename from
4330 vrp_int_const_binop.
4331 Rewrite to work on trees.
4332 (extract_range_from_multiplicative_op_1): Abstract code to...
4333 (wide_int_range_min_max): ...here.
4334 (wide_int_range_cross_product): ...and here.
4335 (extract_range_from_binary_expr_1): Abstract overflow code to...
4336 (wide_int_range_mult_wrapping): ...here.
4337 * tree-vrp.h (wide_int_range_cross_product): New.
4338 (wide_int_range_mult_wrapping): New.
4340 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
4341 Julia Koval <julia.koval@intel.com>
4343 * config/i386/x86-tune-costs.h (skylake_memcpy,
4344 skylake_memset): Replace rep_prefix with unrolling for size 512.
4346 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
4349 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
4350 comparision with EQ_EXPR in last stmt.
4352 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
4354 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
4355 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
4356 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
4357 previously known as "PowerPC AltiVec Built-in Functions". Move
4358 some material to new subsubsections "PowerPC AltiVec Built-in
4359 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
4361 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
4362 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
4363 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
4364 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
4366 2018-07-18 Richard Biener <rguenther@suse.de>
4368 PR tree-optimization/86557
4369 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
4372 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
4374 * config/s390/s390.c (s390_function_profiler): Generate CFI.
4376 2018-07-17 Jeff Law <law@redhat.com>
4378 * config/arm/arm.c (get_label_padding): Update for recent
4379 changes to label_to_alignment.
4381 PR tree-optimization/86010
4382 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
4384 * config/mips/mips.c (vr4130_align_insns): Update for recent
4385 changes to label_to_alignment.
4387 * config/frv/frv.c (frv_label_align): Update for recent changes
4388 to label_to_alignment.
4390 * config/nios2/nios2.c (nios2_label_align): Update for recent
4391 changes which dropped ALIGN_LABELS_LOG.
4393 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
4395 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
4396 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
4398 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
4400 * config/arc/arc.c (arc_label_align): Use align_labels instead of
4401 deprecated align_labels_log.
4403 2018-07-17 Richard Biener <rguenther@suse.de>
4406 * dwarf2out.c (init_sections_and_labels): Always generate
4407 a debug_line_str_section for early LTO debug.
4408 (dwarf2out_finish): Reset debug_line_str_hash output early.
4409 Bump counter for extra dwarf5 .debug_loc labels to not conflict
4411 (dwarf2out_early_finish): Output debug_line_str.
4413 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
4415 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
4416 index register on z196 or later.
4418 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
4420 * config/s390/s390.c (s390_default_align): Set default function
4422 (s390_override_options_after_change): Call s390_default align.
4423 (s390_option_override_internal): Call s390_default_align.
4424 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
4426 2018-07-17 Jakub Jelinek <jakub@redhat.com>
4429 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
4430 to _looptemp_ clauses, other than the first two.
4432 2018-07-17 Martin Liska <mliska@suse.cz>
4434 * opts.c: Do not enable OPT_falign_* for -Os.
4436 2018-07-17 Martin Liska <mliska@suse.cz>
4438 * align.h (MAX_CODE_ALIGN): New.
4439 (MAX_CODE_ALIGN_VALUE): New.
4440 * common/config/i386/i386-common.c (ix86_handle_option):
4441 (MAX_CODE_ALIGN): Moved to align.h.
4442 * final.c (MAX_CODE_ALIGN): Likewise.
4443 * opts.c (parse_and_check_align_values):
4444 (MAX_CODE_ALIGN): Likewise.
4445 (MAX_CODE_ALIGN_VALUE): Likewise.
4447 2018-07-17 Martin Liska <mliska@suse.cz>
4449 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
4450 in order to fulfil coding style.
4451 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
4452 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4453 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4454 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
4455 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
4456 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
4457 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
4458 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
4459 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4461 2018-07-17 Martin Liska <mliska@suse.cz>
4463 * align.h: New file.
4464 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
4466 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
4467 align_flags of label_to_alignment.
4468 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
4470 * config/m68k/m68k.c: Do not use removed align_labels_value and
4472 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
4473 (LOOP_ALIGN): Likewise.
4474 (LABEL_ALIGN): Likewise.
4475 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
4476 Remove not used macro.
4477 (rs6000_loop_align): Change return type to align_flags.
4478 (rs6000_loop_align_max_skip): Remove.
4479 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
4480 Change return type to align_flags.
4481 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
4482 Remove not used macro.
4483 (rs6000_loop_align): Change return type to align_flags.
4484 (rs6000_loop_align_max_skip): Remove.
4485 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
4486 * config/rx/rx-protos.h (rx_align_for_label): Make it
4488 * config/rx/rx.c (rx_align_for_label): Change return type
4490 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
4492 into align_flags class.
4493 (LABEL_ALIGN): Likewise.
4494 (LOOP_ALIGN): Likewise.
4495 * config/s390/s390.c (s390_label_align): Use align_flags
4497 (s390_asm_output_function_label): Likewise.
4498 * config/sh/sh.c (sh_override_options_after_change):
4499 Use align_flags class directly without macros.
4500 (find_barrier): Likewise.
4501 (barrier_align): Likewise.
4502 (sh_loop_align): Likewise.
4503 * config/spu/spu.c (spu_option_override):
4504 Use align_flags_tuple::get_value instead of removed macros.
4505 (spu_sched_init): Likewise.
4506 * config/spu/spu.h (GTY): Likewise.
4507 * config/visium/visium.c (visium_option_override):
4508 Set "8" as default secondary alignment.
4509 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
4510 in order to guarantee secondary alignment of 8.
4511 * coretypes.h: Include align.h header file.
4512 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
4513 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
4514 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
4515 * doc/tm.texi.in: Likewise.
4516 * final.c (struct label_alignment): Remove not used structure.
4517 (LABEL_ALIGN): Change type to align_flags.
4518 (LOOP_ALIGN): Likewise.
4519 (JUMP_ALIGN): Likewise.
4520 (default_loop_align_max_skip): Remove.
4521 (default_label_align_max_skip): Likewise.
4522 (default_jump_align_max_skip): Likewise.
4523 (default_label_align_after_barrier_max_skip):
4524 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
4525 (LABEL_TO_MAX_SKIP): Remove.
4526 (label_to_alignment): Return align_flags type instead of integer.
4527 (label_to_max_skip): Remove.
4528 (align_fuzz): Use align_flags type.
4529 (compute_alignments): Use align_flags type and use align_flags::max
4530 to combine multiple alignments.
4531 (grow_label_align): Grow vec instead of C array.
4532 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
4533 (shorten_branches): Use align_flags type and use align_flags::max
4534 to combine multiple alignments.
4535 (final_scan_insn_1): Remove usage of secondary alignment that comes
4536 from label alignment, but instead use proper secondary alignment
4537 which is computed in grow_label_align.
4538 * flags.h (struct align_flags_tuple): Move to align.h.
4539 (struct align_flags): Likewise.
4540 (state_align_loops): Rename to align_loops.
4541 (state_align_jumps): Rename to align_jumps.
4542 (state_align_labels): Rename to align_labels.
4543 (state_align_functions): Rename to align_functions.
4544 (align_loops_log): Remove.
4545 (align_jumps_log): Remove.
4546 (align_labels_log): Remove.
4547 (align_functions_log): Remove.
4548 (align_loops_max_skip): Remove.
4549 (align_jumps_max_skip): Remove.
4550 (align_labels_max_skip): Remove.
4551 (align_functions_max_skip): Remove.
4552 (align_loops_value): Remove.
4553 (align_jumps_value): Remove.
4554 (align_labels_value): Remove.
4555 (align_functions_value): Remove.
4556 * output.h (label_to_alignment): Change return type to align_flags.
4557 (label_to_max_skip): Remove.
4558 * target.def: Remove loop_align_max_skip, label_align_max_skip,
4559 jump_align_max_skip macros.
4560 * targhooks.h (default_loop_align_max_skip): Remove.
4561 (default_label_align_max_skip): Likewise.
4562 (default_jump_align_max_skip): Likewise.
4563 (default_label_align_after_barrier_max_skip): Remove.
4564 * toplev.c (read_log_maxskip): Use ::normalize function.
4565 (parse_N_M): Remove not used argument and also call ::normalize.
4566 (parse_alignment_opts): Do not pass unused arguments.
4567 * varasm.c (assemble_start_function): Use directly align_functions
4568 instead of removed macros.
4569 * system.h: Do not poison removed macros.
4571 2018-07-17 Jakub Jelinek <jakub@redhat.com>
4574 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
4575 and cond temporaries don't have reference type if iterator has
4576 pointer type. For init use &for_pre_body instead of pre_p if
4577 for_pre_body is non-empty.
4579 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
4581 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
4582 double-double modes to SFmode directly directly.
4583 (trunc<mode>sf2_fprs): Delete.
4585 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
4587 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
4588 for conversions between IFmode and the decimal floating point modes.
4589 (init_float128_ieee): Use the correct names for conversions between
4590 KFmode and the decimal floating point modes.
4592 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
4594 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
4595 for the conversions between TDmode and IFmode.
4596 (init_float128_ieee): Use more correct names for the conversions
4597 between TDmode and KFmode.
4599 2018-07-16 Jakub Jelinek <jakub@redhat.com>
4601 PR tree-optimization/86526
4602 * builtins.c (expand_builtin_memcmp): Formatting fixes.
4603 (inline_expand_builtin_string_cmp): Likewise.
4604 (inline_string_cmp): Likewise. Use c_readstr instead of
4605 builtin_memcpy_read_str. Add unit_mode temporary.
4607 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4610 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
4611 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
4613 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
4615 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
4616 Alphabetize prototypes of built-in functions, separating out
4617 built-in functions that are listed in this section but should be
4618 described elsewhere.
4620 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
4623 * expmed.c (emit_store_flag): Do not emit setcc followed by a
4624 conditional move when trapping comparison was split to a
4625 non-trapping one (and vice versa).
4627 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
4629 * config/s390/s390.c (s390_function_profiler): Generate nops
4630 instead of profiler call sequences.
4631 * config/s390/s390.opt: Add the new option.
4633 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
4635 * config/s390/s390.c (s390_function_profiler): Generate
4636 __mcount_loc section.
4637 * config/s390/s390.opt: Add the new option.
4639 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
4641 * common.opt: Add the new warning.
4642 * config/s390/s390.c (s390_function_profiler): Emit "brasl
4643 %r0,__fentry__" when -mfentry is specified.
4644 (s390_option_override_internal): Disallow -mfentry for 31-bit
4646 * config/s390/s390.opt: Add the new option.
4648 2018-07-16 Richard Biener <rguenther@suse.de>
4651 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
4652 for function-local FUNCTION_DECL and RESULT_DECL immediately.
4654 2018-07-16 Martin Liska <mliska@suse.cz>
4657 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
4660 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
4662 * config/arc/arcHS.md: Update ARCHS scheduling rules.
4664 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
4666 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
4668 * config/arc/arc-cpus.def (hs4x): New cpu.
4670 * config/arc/arc-tables.opt: Regenerate.
4671 * config/arc/arc.c (arc_sched_issue_rate): New function.
4672 (TARGET_SCHED_ISSUE_RATE): Define.
4673 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
4674 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
4676 (attr tune): Add ARCHS4x tune values.
4677 (attr tune_dspmpy): Define.
4678 (*tst): Correct instruction type.
4679 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
4680 * config/arc/arcHS4x.md: New file.
4681 * config/arc/fpu.md: Update instruction type attributes.
4682 * config/arc/t-multilib: Regenerate.
4684 2018-07-16 Tom de Vries <tdevries@suse.de>
4687 * var-tracking.c (vt_initialize): Fix pre_dec handling.
4689 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4691 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
4694 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
4696 PR tree-optimization/86514
4697 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
4698 conversion to a boolean type from a type with greater precision.
4700 2018-07-16 Tom de Vries <tdevries@suse.de>
4702 * var-tracking.c (vt_initialize): Print adjusted insn slim if
4703 dump_flags request TDF_SLIM.
4705 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
4707 * fold-const.c (int_const_binop_1): Abstract...
4708 (wide_int_binop): ...wide int code here.
4709 (poly_int_binop): ...poly int code here.
4710 Abstract the rest of int_const_binop_1 into int_const_binop.
4711 * fold-const.h (wide_int_binop): New.
4712 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
4713 Remove useless PLUS/MINUS_EXPR case.
4714 (zero_nonzero_bits_from_vr): Move wide int code...
4715 (zero_nonzero_bits_from_bounds): ...here.
4716 (extract_range_from_binary_expr_1): Move mask optimization code...
4717 (range_easy_mask_min_max): ...here.
4718 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
4719 (range_easy_mask_min_max): New.
4721 2018-07-15 Jeff Law <law@redhat.com>
4724 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
4727 2018-07-14 Jim Wilson <jimw@sifive.com>
4729 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
4731 2018-07-14 Paul Koning <ni1d@arrl.net>
4733 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
4735 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
4737 * lto-streamer-out.c (copy_function_or_variable): Dump info about
4740 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
4741 Steve Munroe <munroesj52@gmail.com>
4743 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
4744 (_mm_andnot_si128): Likewise.
4745 (_mm_or_si128): Likewise.
4746 (_mm_xor_si128): Likewise.
4748 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
4751 * builtins.c (expand_builtin_memcmp): Inline the calls first
4752 when result_eq is false.
4753 (expand_builtin_strcmp): Inline the calls first.
4754 (expand_builtin_strncmp): Likewise.
4755 (inline_string_cmp): New routine. Expand a string compare
4756 call by using a sequence of char comparison.
4757 (inline_expand_builtin_string_cmp): New routine. Inline expansion
4758 a call to str(n)cmp/memcmp.
4759 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
4761 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
4763 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
4765 * config/arm/driver-arm.c: Include arm-native.h.
4766 (host_detect_local_cpu): Use auto-generated data tables.
4767 (vendors, arm_cpu_table): Delete. Move part information to ...
4768 * config/arm/arm-cpus.in: ... here.
4769 * config/arm/parsecpu.awk (gen_native): New function.
4770 (vendor, part): New CPU fields.
4771 (END): Add support for building the native CPU detection tables.
4772 * config/arm/t-arm (arm-native.h): Add build rule.
4773 (driver-arm.o): Add dependency on arm-native.h.
4775 2018-07-13 Richard Biener <rguenther@suse.de>
4778 * match.pd (addr1 - addr2): Allow either of the operand to
4781 2018-07-13 Tom de Vries <tdevries@suse.de>
4783 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
4786 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
4788 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
4789 arrays instead of numbered variables.
4791 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
4793 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
4794 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
4796 2018-07-13 Richard Biener <rguenther@suse.de>
4799 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
4800 instead of get_context_die.
4802 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
4803 Richard Biener <rguenther@suse.de>
4806 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
4807 that the loop latch destination where phi is defined.
4809 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
4811 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
4812 (riscv_expand_epilogue): Add assertion to check interrupt mode.
4813 (riscv_set_current_function): Extract getting interrupt type to new
4815 (riscv_get_interrupt_type): New function.
4816 (riscv_merge_decl_attributes): New function, checking interrupt type is
4818 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
4820 2018-07-12 Paul Koning <ni1d@arrl.net>
4822 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
4825 2018-07-12 Paul Koning <ni1d@arrl.net>
4827 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
4828 zero reference, add doloop_end instead.
4829 * doc/md.texi (decrement_and_branch_until_zero): Remove.
4830 (Looping patterns): Remove decrement_and_branch_until_zero. Add
4831 detail for doloop_end.
4833 2018-07-12 Martin Sebor <msebor@redhat.com>
4836 * attribs.c (decl_attributes): Reject conflicting attributes before
4837 calling attribute handlers.
4839 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
4841 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
4843 (gcc::dump_manager::get_dump_file_name): likewise.
4844 (dump_begin): Likewise.
4845 * dumpfile.h (dump_begin): Update prototype.
4846 (gcc::dump_manager::get_dump_file_name,
4847 gcc::dump_manager::get_dump_file_name): Update prototype.
4849 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4851 * internal-fn.h (vectorizable_internal_fn_p): New function.
4852 * tree-vect-slp.c (compatible_calls_p): Likewise.
4853 (vect_build_slp_tree_1): Remove nops argument. Handle calls
4854 to internal functions.
4855 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
4857 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4859 * fold-const.h (inverse_conditions_p): Declare.
4860 * fold-const.c (inverse_conditions_p): New function.
4861 * match.pd: Use inverse_conditions_p. Add folds of view_converts
4862 that test the inverse condition of a conditional internal function.
4863 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
4864 * internal-fn.c (internal_fn_mask_index): Handle conditional
4866 (vectorized_internal_fn_supported_p): New function.
4867 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
4868 (any_pred_load_store): Replace with...
4869 (need_to_predicate): ...this new variable.
4870 (redundant_ssa_names): New variable.
4871 (ifcvt_can_use_mask_load_store): Move initial checks to...
4872 (ifcvt_can_predicate): ...this new function. Handle tree codes
4873 for which a conditional internal function exists.
4874 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
4875 instead of ifcvt_can_use_mask_load_store. Update after variable
4877 (predicate_load_or_store): New function, split out from
4878 predicate_mem_writes.
4879 (check_redundant_cond_expr): New function.
4880 (value_available_p): Likewise.
4881 (predicate_rhs_code): Likewise.
4882 (predicate_mem_writes): Rename to...
4883 (predicate_statements): ...this. Use predicate_load_or_store
4884 and predicate_rhs_code.
4885 (combine_blocks, tree_if_conversion): Update after above name changes.
4886 (ifcvt_local_dce): Handle redundant_ssa_names.
4887 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
4888 general conditional functions.
4889 * tree-vect-stmts.c (vectorizable_call): Likewise.
4891 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4892 Alan Hayward <alan.hayward@arm.com>
4893 David Sherwood <david.sherwood@arm.com>
4895 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
4896 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
4897 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
4898 plus and minus and convert them into IFN_COND_FMA-based sequences.
4899 (convert_mult_to_fma): Handle conditional plus and minus.
4901 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4903 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
4904 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
4905 (cond_fnms_optab): New optabs.
4906 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
4908 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
4909 * internal-fn.h (get_conditional_internal_fn): Declare.
4910 (get_unconditional_internal_fn): Likewise.
4911 * internal-fn.c (cond_ternary_direct): New macro.
4912 (expand_cond_ternary_optab_fn): Likewise.
4913 (direct_cond_ternary_optab_supported_p): Likewise.
4914 (FOR_EACH_COND_FN_PAIR): Likewise.
4915 (get_conditional_internal_fn): New function.
4916 (get_unconditional_internal_fn): Likewise.
4917 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
4918 (gimple_match_op::gimple_match_op): Add a new overload for 5
4920 (gimple_match_op::set_op): Likewise.
4921 (gimple_resimplify5): Declare.
4922 * genmatch.c (decision_tree::gen): Generate simplifications for
4924 * gimple-match-head.c (gimple_simplify): Define an overload for
4925 5 operands. Handle calls with 5 arguments in the top-level overload.
4926 (convert_conditional_op): Handle conversions from unconditional
4927 internal functions to conditional ones.
4928 (gimple_resimplify5): New function.
4929 (build_call_internal): Pass a fifth operand.
4930 (maybe_push_res_to_seq): Likewise.
4931 (try_conditional_simplification): Try converting conditional
4932 internal functions to unconditional internal functions.
4933 Handle 3-operand unconditional forms.
4934 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
4935 Define ternary equivalents of the current rules for binary conditional
4937 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
4939 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
4940 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
4941 (optab): Handle them.
4942 (SVE_COND_FP_TERNARY): New int iterator.
4943 (sve_fmla_op, sve_fmad_op): New int attributes.
4944 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
4945 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
4946 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
4948 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4950 * target.def (preferred_else_value): New target hook.
4951 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
4952 * doc/tm.texi: Regenerate.
4953 * targhooks.h (default_preferred_else_value): Declare.
4954 * targhooks.c (default_preferred_else_value): New function.
4955 * internal-fn.h (conditional_internal_fn_code): Declare.
4956 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
4957 (get_conditional_internal_fn): Use it.
4958 (conditional_internal_fn_code): New function.
4959 * gimple-match.h (gimple_match_cond): New struct.
4960 (gimple_match_op): Add a cond member function.
4961 (gimple_match_op::gimple_match_op): Update all forms to take a
4963 * genmatch.c (expr::gen_transform): Use the same condition as res_op
4964 for the suboperation, but don't specify a particular else_value.
4965 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
4966 (visit_nary_op, visit_reference_op_load): Pass
4967 gimple_match_cond::UNCOND to the gimple_match_op constructor.
4968 * gimple-match-head.c: Include tree-eh.h
4969 (convert_conditional_op): New function.
4970 (maybe_resimplify_conditional_op): Likewise.
4971 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
4972 (gimple_resimplify2): Likewise.
4973 (gimple_resimplify3): Likewise.
4974 (gimple_resimplify4): Likewise.
4975 (maybe_push_res_to_seq): Return null for conditional operations.
4976 (try_conditional_simplification): New function.
4977 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
4979 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
4981 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
4983 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
4985 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
4987 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
4989 (hash_tree): Do not hash DECL_FCONTEXT
4990 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
4991 Do not stream DECL_FCONTEXT.
4992 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
4993 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
4995 2018-07-12 Richard Biener <rguenther@suse.de>
4998 * dwarf2out.c (gen_block_die): Only output blocks when they have
4999 at least one !DECL_IGNORED_P variable.
5001 2018-07-12 Richard Biener <rguenther@suse.de>
5004 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
5005 Remove -mieee-fp handling.
5007 2018-07-12 Richard Biener <rguenther@suse.de>
5009 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
5010 left-over from last patch.
5012 2018-07-12 Jakub Jelinek <jakub@redhat.com>
5014 PR tree-optimization/86492
5015 * gimple-ssa-store-merging.c
5016 (imm_store_chain_info::coalesce_immediate_stores): Call
5017 check_no_overlap even for the merge_overlapping case. Formatting fix.
5019 2018-07-12 Richard Biener <rguenther@suse.de>
5022 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
5023 move possibly trapping operations into the conditional.
5025 2018-07-12 Richard Biener <rguenther@suse.de>
5027 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
5028 (vn_lookup_simplify_result): Remove recursion limit applied
5030 (vn_nary_build_or_lookup_1): Adjust.
5031 (try_to_simplify): Likewise.
5032 * gimple-match-head.c (gimple_resimplify1): Instead apply one
5034 (gimple_resimplify2): Likewise.
5035 (gimple_resimplify3): Likewise.
5036 (gimple_resimplify4): Likewise.
5038 2018-07-11 Jakub Jelinek <jakub@redhat.com>
5040 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
5041 Use __mmask64 type instead of __mmask8 for __M argument.
5042 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
5043 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
5045 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
5046 __mmask16 for __M argument.
5047 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
5048 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
5049 to __mmask16 instead of __mmask8.
5050 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
5051 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
5052 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
5053 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
5054 instead of __mmask16 for __U argument.
5055 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
5056 __mmask16 instead of __mmask8 for __U argument.
5057 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
5059 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
5061 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
5063 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
5065 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
5067 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
5069 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
5071 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
5073 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
5075 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
5077 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
5078 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
5079 return type as well as __M argument type and all casts from __mmask8
5081 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
5082 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
5083 return type as well as __M argument type and all casts from __mmask8
5085 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
5086 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
5087 return type as well as __M argument type and all casts from __mmask8
5089 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
5090 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
5091 return type as well as __M argument type and all casts from __mmask8
5093 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
5094 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
5097 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
5099 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
5100 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
5103 2018-07-11 Paul Koning <ni1d@arrl.net>
5105 * doc/md.texi (define_subst): Document how multiple occurrences of
5106 the same argument in the replacement pattern are handled.
5108 2018-07-11 Paul Koning <ni1d@arrl.net>
5110 * doc/extend.texi (Common Variable Attributes): Move "mode" into
5112 (Common Type Attributes): Add "mode" attribute.
5114 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
5116 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
5117 stream DECL_ORIGINAL_TYPE.
5118 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
5119 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
5120 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
5121 Do not walk original type.
5122 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
5124 (write_ts_decl_non_common_tree_pointers): Do not stream
5126 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
5127 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
5129 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
5131 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
5132 thread twice from the same starting edge.
5134 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
5136 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
5137 * gimple.c (gimple_call_nonnull_result_p): ...here...
5138 (gimple_call_nonnull_arg): ...and here.
5139 * gimple.h (gimple_call_nonnull_result_p): New.
5140 (gimple_call_nonnull_arg): New.
5142 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
5144 * config/arm/arm-cpus.in: Move information from fpu field of each
5145 cpu definition to the isa field.
5146 * config/arm/parsecpu.awk (fpu): Delete match rule.
5147 (gen_comm_data): Don't add bits from the CPU's FPU entry.
5149 2018-07-11 Richard Biener <rguenther@suse.de>
5152 * dwarf2out.c (init_sections_and_labels): Use
5153 output_asm_line_debug_info consistently.
5154 (dwarf2out_early_finish): Likewise.
5155 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
5158 2018-07-11 Richard Biener <rguenther@suse.de>
5160 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
5161 Rework father_bb setting in a way to avoid propagating constants
5162 multiple times on a loop body.
5164 2018-07-10 Mark Wielaard <mark@klomp.org>
5167 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
5169 2018-07-10 Richard Biener <rguenther@suse.de>
5171 * hash-map.h (hash_map::iterator::operator*): Return
5172 references to key and value.
5174 2018-07-10 Jakub Jelinek <jakub@redhat.com>
5177 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
5178 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
5179 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
5180 (gimplify_omp_for): For composite loops, move outer
5181 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
5182 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
5183 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
5184 TREE_LIST for both the original class iterator and the "last" helper
5185 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
5186 loop, remember has_decl_expr from outer composite loops for the
5187 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
5189 2018-07-09 Martin Sebor <msebor@redhat.com>
5193 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
5194 accessing implicitly initialized array elements.
5195 * expr.c (string_constant): Handle string initializers of
5196 character arrays within aggregates.
5197 * gimple-fold.c (fold_array_ctor_reference): Add argument.
5198 Store element offset. As a special case, handle zero size.
5199 (fold_nonarray_ctor_reference): Same.
5200 (fold_ctor_reference): Add argument. Store subobject offset.
5201 * gimple-fold.h (fold_ctor_reference): Add argument.
5203 2018-07-09 Paul Koning <ni1d@arrl.net>
5205 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
5206 (pdp11_insn_cost): New function.
5207 (pdp11_md_asm_adjust): New function.
5208 (TARGET_INVALID_WITHIN_DOLOOP): Define.
5209 (pdp11_rtx_costs): Update to match machine better.
5210 (output_addr_const_pdp11): Correct format mismatch warnings.
5211 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
5212 * config/pdp11/pdp11.md: General change to add base_cost and/or
5213 length attributes for use by new pdp11_insn_cost function.
5214 (MIN_BRANCH): Correct definition.
5216 (doloop_end): Use standard pattern name for looping pattern.
5217 (doloop_end_nocc): New.
5218 (movsf): Add another constraint alternative.
5219 (zero_extendqihi2): Add constraint alternatives for not in place
5221 (zero_extendhisi2): Remove.
5222 (shift patterns): Add CC handling variants.
5226 (define_peephole2): New peephole to recognize mov that sets CC for
5229 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5231 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
5232 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
5235 2018-07-09 Jakub Jelinek <jakub@redhat.com>
5238 * real.c (real_nextafter): Return true if result is denormal.
5240 2018-07-09 Martin Liska <mliska@suse.cz>
5242 * common.opt: Add back wrongly removed attribute.
5244 2018-07-09 Richard Biener <rguenther@suse.de>
5247 * dwarf2out.c (gen_block_die): For an early generated DIE
5248 always output high/low PC attributes.
5250 2018-07-09 Tom de Vries <tdevries@suse.de>
5252 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
5253 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
5254 onto VAR_DECL with abstract origin.
5256 2018-07-07 Jim Wilson <jimw@sifive.com>
5258 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
5260 2018-07-07 Tom de Vries <tdevries@suse.de>
5262 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
5264 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
5266 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
5268 (combine_bound): Use wide-int overflow calculation instead of
5270 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
5272 * fold-const.c (int_const_binop_2): Same.
5273 (extract_muldiv_1): Same.
5274 (fold_div_compare): Same.
5275 (fold_abs_const): Same.
5277 * poly-int.h (add): Same.
5281 * predict.c (predict_iv_comparison): Same.
5282 * profile-count.c (slow_safe_scale_64bit): Same.
5283 * simplify-rtx.c (simplify_const_binary_operation): Same.
5284 * tree-chrec.c (tree_fold_binomial): Same.
5285 * tree-data-ref.c (split_constant_offset_1): Same.
5286 * tree-if-conv.c (idx_within_array_bound): Same.
5287 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
5288 * tree-ssa-phiopt.c (minmax_replacement): Same.
5289 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
5290 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
5291 * vr-values.c (vr_values::adjust_range_with_scev): Same.
5292 * wide-int.cc (wi::add_large): Same.
5293 (wi::mul_internal): Same.
5294 (wi::sub_large): Same.
5295 (wi::divmod_internal): Same.
5296 * wide-int.h: Change overflow type to overflow_type for neg, add,
5297 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
5298 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
5299 mul_internal, divmod_internal.
5300 (overflow_type): New enum.
5301 (accumulate_overflow): New.
5303 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
5305 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
5306 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
5308 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
5310 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
5311 argument is checked for zero before entering loop, avoid checking again.
5313 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
5315 * gimplify.h (generic_expr_could_trap_p): Set as global function.
5316 * gimplify.h (generic_expr_could_trap_p): Likwise.
5317 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
5319 2018-07-06 Jakub Jelinek <jakub@redhat.com>
5321 PR tree-optimization/86401
5322 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
5323 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
5324 (fold_bit_and_mask): ... here. New helper function for match.pd.
5325 * fold-const.h (fold_bit_and_mask): Declare.
5326 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
5328 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
5331 * target.def (translate_mode_attribute): New hook.
5332 * targhooks.h (default_translate_mode_attribute): Declare.
5333 * targhooks.c (default_translate_mode_attribute): New function.
5334 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
5335 * doc/tm.texi: Regenerate.
5336 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
5337 (rs6000_translate_mode_attribute): New function.
5339 2018-07-06 Paul Koning <ni1d@arrl.net>
5341 * doc/md.texi (define_split): Document DONE and FAIL.
5342 (define_peephole2): Ditto.
5344 2018-07-05 Jeff Law <law@redhat.com>
5346 PR tree-optimization/86010
5347 * tree-ssa-dse.c (compute_trims): More aggressively trim at
5348 both the head and tail of mem* and str* calls.
5350 2018-07-05 Jim Wilson <jimw@sifive.com>
5352 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
5354 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
5356 * config/aarch64/aarch64-simd.md: correct flags text for
5357 MIN_EXPR replacement.
5359 2018-07-05 James Clarke <jrtc27@jrtc27.com>
5361 * configure: Regenerated.
5363 2018-07-05 Carl Love <cel@us.ibm.com>
5365 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
5366 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
5367 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
5368 VSX_BUILTIN_DOUBLEL_V4SF.
5370 2018-07-05 Martin Sebor <msebor@redhat.com>
5373 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
5374 than its domain to compute its the upper bound of a char array.
5376 2018-07-05 Nathan Sidwell <nathan@acm.org>
5378 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
5379 * doc/cpp.texi: Update comment.
5380 * doc/tm.texi: Rebuilt.
5381 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
5382 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
5383 * doc/extend.texi (Backwards Compatibility): Clarify it is system
5384 headers affected by extern "C".
5385 * system.h: Poison NO_IMPLICIT_EXTERN_C.
5386 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
5387 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
5388 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
5389 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
5390 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
5391 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
5392 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
5393 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
5394 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
5395 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
5396 config/sparc/sp64-elf.h, config/spu/spu.h,
5397 config/stormy16/stormy16.h, config/v850/v850.h,
5398 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
5399 define NO_IMPLICIT_EXTERN_C.
5400 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
5402 2018-07-05 Tamar Christina <tamar.christina@arm.com>
5405 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
5406 instead of GET_MODE_SIZE when comparing Units.
5408 2018-07-05 Tamar Christina <tamar.christina@arm.com>
5411 * rtlanal.c (set_noop_p): Constrain on mode change,
5412 include hard-reg-set.h
5414 2018-07-05 Tamar Christina <tamar.christina@arm.com>
5416 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
5418 2018-07-05 Jakub Jelinek <jakub@redhat.com>
5421 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
5424 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
5426 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
5428 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
5431 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
5433 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
5435 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
5438 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
5440 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
5442 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
5443 neg_*_op* variables.
5445 2018-07-04 Martin Liska <mliska@suse.cz>
5447 * tree-switch-conversion.c: Define
5448 max_ratio_for_speed and max_ratio_for_size constants.
5450 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
5451 Martin Liska <mliska@suse.cz>
5456 * common.opt: Rename align options with 'str_' prefix.
5457 * common/config/i386/i386-common.c (set_malign_value): New
5459 (ix86_handle_option): Use it to set -falign-* options/
5460 * config/aarch64/aarch64-protos.h (struct tune_params): Change
5461 type from int to string.
5462 * config/aarch64/aarch64.c: Update default values from int
5464 * config/alpha/alpha.c (alpha_override_options_after_change):
5466 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
5467 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5468 max skip conditionally.
5469 * config/i386/freebsd.h (SUBALIGN_LOG): New.
5470 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5471 max skip conditionally.
5472 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5473 max skip conditionally.
5474 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
5475 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5476 max skip conditionally.
5477 * config/i386/i386.c (struct ptt): Change type from int to
5479 (ix86_default_align): Set default values.
5480 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
5481 max skip conditionally.
5482 * config/i386/iamcu.h (SUBALIGN_LOG): New.
5483 (ASM_OUTPUT_MAX_SKIP_ALIGN):
5484 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
5485 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5486 max skip conditionally.
5487 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
5488 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
5489 * config/i386/x86-64.h (SUBALIGN_LOG): New.
5490 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5491 max skip conditionally.
5492 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5493 * config/ia64/ia64.c (ia64_option_override): Set default values
5494 for alignment options.
5495 * config/m68k/m68k.c: Handle new str_align_* options.
5496 * config/mips/mips.c (mips_set_compression_mode): Change
5498 (mips_option_override): Set default values for options.
5499 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
5501 * config/rs6000/rs6000.c (rs6000_option_override_internal):
5503 * config/rx/rx.c (rx_option_override): Likewise.
5504 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
5505 (LABEL_ALIGN): Use align_labels_log.
5506 (LOOP_ALIGN): Use align_loops_align.
5507 * config/s390/s390.c (s390_asm_output_function_label): Use new
5509 * config/sh/sh.c (sh_override_options_after_change):
5510 Change type of constants.
5511 * config/spu/spu.c (spu_sched_init): Likewise.
5512 * config/sparc/sparc.c (sparc_option_override): Set default
5514 * config/visium/visium.c (visium_option_override): Likewise.
5515 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
5516 emit p2align format with last argument if it's not needed.
5517 * doc/invoke.texi: Document extended format of -falign-*.
5518 * final.c: Use align_labels alignment.
5519 * flags.h (struct target_flag_state): Change type to use
5521 (struct align_flags_tuple): New.
5522 (struct align_flags): Likewise.
5523 (align_loops_log): Redefine macro to use new types.
5524 (align_loops_max_skip): Redefine macro to use new types.
5525 (align_jumps_log): Redefine macro to use new types.
5526 (align_jumps_max_skip): Redefine macro to use new types.
5527 (align_labels_log): Redefine macro to use new types.
5528 (align_labels_max_skip): Redefine macro to use new types.
5529 (align_functions_log): Redefine macro to use new types.
5530 (align_loops): Redefine macro to use new types.
5531 (align_jumps): Redefine macro to use new types.
5532 (align_labels): Redefine macro to use new types.
5533 (align_functions): Redefine macro to use new types.
5534 (align_functions_max_skip): Redefine macro to use new types.
5535 (align_loops_value): New macro.
5536 (align_jumps_value): New macro.
5537 (align_labels_value): New macro.
5538 (align_functions_value): New macro.
5539 * function.c (invoke_set_current_function_hook): Propagate
5540 alignment values from flags to global variables default in
5542 * ipa-icf.c (sem_function::equals_wpa): Use
5543 cl_optimization_option_eq instead of memcmp.
5544 * lto-streamer.h (cl_optimization_stream_out): Support streaming
5546 (cl_optimization_stream_in): Likewise.
5547 * optc-save-gen.awk: Support strings in cl_optimization.
5548 * opth-gen.awk: Likewise.
5549 * opts.c (finish_options): Remove error checking of invalid
5551 (MAX_CODE_ALIGN): Remove.
5552 (MAX_CODE_ALIGN_VALUE): Likewise.
5553 (parse_and_check_align_values): New function.
5554 (check_alignment_argument): Likewise.
5555 (common_handle_option): Use check_alignment_argument.
5556 * opts.h (parse_and_check_align_values): Declare.
5557 * toplev.c (init_alignments): Remove.
5558 (read_log_maxskip): New.
5559 (parse_N_M): Likewise.
5560 (parse_alignment_opts): Likewise.
5561 (backend_init_target): Remove usage of init_alignments.
5562 * toplev.h (parse_alignment_opts): Declare.
5563 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
5565 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
5566 * tree.c (cl_option_hasher::equal): New.
5567 * varasm.c: Use new global macros.
5569 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
5571 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
5572 Use a simpler align directive also if MAXSKIP = ALIGN-1.
5573 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5574 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5575 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5576 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5577 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
5578 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
5579 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
5580 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5581 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5582 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5583 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5585 2018-07-04 Martin Liska <mliska@suse.cz>
5586 Jonathan Wakely <jwakely@redhat.com>
5588 * coverage.c: Use correct type.
5589 * doc/invoke.texi: Language correction.
5591 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
5594 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
5595 ENDBRANCH for non-tail call which may return via indirect branch.
5596 * doc/extend.texi: Document indirect_return attribute.
5598 2018-07-03 Martin Sebor <msebor@redhat.com>
5600 PR tree-optimization/86274
5601 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
5603 (format_floating): Correct handling of infinities and NaNs.
5605 2018-07-03 Martin Sebor <msebor@redhat.com>
5607 * print-tree.c (print_real_cst): New function.
5608 (print_node_brief): Call it.
5609 (print_node): Ditto.
5611 2018-07-03 Jeff Law <law@redhat.com>
5613 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
5614 into a single pattern.
5616 * config/h8300/h8300.md (ors code_iterator): New.
5617 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
5618 a single pattern and single splitter.
5619 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
5620 (iorqi3_1, xorqi3_1): Likewise.
5621 (iorqi3, xorqi3 expanders): Similarly.
5623 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
5624 (movmd_internal) into a single pattern using the P mode iterator.
5625 (movmd splitters): Similarly.
5626 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
5627 (movsd splitters): Similarly.
5629 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
5630 ADDB, ADDW and ADDL into a single ADD attribute which selects the
5631 right table based on the size of the operand.
5632 * config/h8300/h8300.md (length_table): Corresponding changes. All
5633 references to "addb", "addw" and "addl" changed to "add".
5634 (btst patterns): Merge two variants into a single pattern.
5635 (tstqi, tsthi): Likewise.
5636 (addhi3_incdec, addsi3_incdec): Likewise.
5637 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
5638 (mulhi3, mulsi3): Likewise.
5639 (udivhi3, udivsi3): Likewise.
5640 (divhi3, divsi3): Likewise.
5641 (andorqi3, andorhi3, andorsi3): Likewise.
5643 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
5646 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
5647 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
5649 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5651 PR tree-optimization/85694
5652 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
5653 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
5655 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
5656 (<u>avg<mode>3_ceil): New patterns.
5658 2018-07-03 David Malcolm <dmalcolm@redhat.com>
5660 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
5661 scan-tree-dump directive.
5662 * gcc.dg/vect/slp-perm-2.c: Likewise.
5663 * gcc.dg/vect/slp-perm-3.c: Likewise.
5664 * gcc.dg/vect/slp-perm-5.c: Likewise.
5665 * gcc.dg/vect/slp-perm-6.c: Likewise.
5666 * gcc.dg/vect/slp-perm-7.c: Likewise.
5667 * gcc.dg/vect/slp-perm-8.c: Likewise.
5669 2018-07-03 Marek Polacek <polacek@redhat.com>
5672 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
5674 2018-07-03 Richard Biener <rguenther@suse.de>
5677 * tree-ssa-structalias.c (find_func_clobbers): Properly
5678 handle indirect calls.
5680 2018-07-03 Jeff Law <law@redhat.com>
5682 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
5683 (shifts): New code iterator.
5684 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
5685 expander. Fix HImode handling on H8/SX.
5686 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
5687 (subqi3, subhi3, subsi3 expanders): Likewise.
5688 (andqi3, andhi3, andsi3 expanders): Likewise.
5689 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
5690 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
5691 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
5692 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
5693 (zero_extendqihi2, zero_extendqisi2): Likewise.
5694 (extendqihi2, extendqisi2): Likewise.
5695 (rotlqi3, rotlhi3, rotlsi3): Likewise.
5696 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
5697 (rotlqi3_1, rotlhi3_1): Likewise.
5698 (logicalhi3_sn, logicalsi3_sn): Likewise.
5699 (logicalhi3, logicalsi3): Likewise.
5701 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5703 * tree-vect-patterns.c (vect_recog_rotate_pattern)
5704 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
5705 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
5706 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
5707 type to append_pattern_def_seq instead of creating a stmt_vec_info
5709 (build_mask_conversion): Likewise. Remove vinfo argument.
5710 (vect_add_conversion_to_patterm): Likewise, renaming to...
5711 (vect_add_conversion_to_pattern): ...this.
5712 (vect_recog_mask_conversion_pattern): Update call to
5713 build_mask_conversion. Pass the vector type to
5714 append_pattern_def_seq here too.
5715 (vect_recog_gather_scatter_pattern): Update call to
5716 vect_add_conversion_to_pattern.
5718 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5720 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
5721 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5722 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
5723 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
5724 STMT_VINFO_PATTERN_DEF_SEQ to null here.
5725 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
5726 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
5727 append_pattern_def_seq instead of new_pattern_def_seq.
5728 (vect_recog_divmod_pattern): Do both of the above.
5729 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
5732 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5734 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
5735 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
5736 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
5737 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
5738 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
5739 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
5740 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
5741 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
5742 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
5743 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
5744 parameter with a single stmt_vec_info.
5745 (vect_recog_func_ptr): Likewise.
5746 (vect_recog_gather_scatter_pattern): Likewise, folding in...
5747 (vect_try_gather_scatter_pattern): ...this.
5748 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
5749 the stmt_vec_info of the statement to be matched. Don't clear
5750 STMT_VINFO_RELATED_STMT.
5751 (vect_pattern_recog): Update call accordingly.
5753 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5755 PR tree-optimization/85694
5756 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
5757 (uavgM3_ceil): Document new optabs.
5758 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
5759 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
5761 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
5762 (savg_ceil_optab): New optabs.
5763 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
5764 (vect_vect_recog_func_ptrs): Add it.
5765 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
5766 constant directly from the associated lhs.
5768 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5770 * tree-vect-patterns.c (vect_split_statement): New function.
5771 (vect_convert_input): Use it to try to split an existing cast.
5773 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5775 * poly-int.h (print_hex): New function.
5776 * dumpfile.h (dump_dec, dump_hex): Declare.
5777 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
5778 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
5779 min_input_precision, operation_precision and operation_sign.
5780 * tree-vect-patterns.c (vect_get_range_info): New function.
5781 (vect_same_loop_or_bb_p, vect_single_imm_use)
5782 (vect_operation_fits_smaller_type): Delete.
5783 (vect_look_through_possible_promotion): Add an optional
5784 single_use_p parameter.
5785 (vect_recog_over_widening_pattern): Rewrite to use new
5786 stmt_vec_info infomration. Handle one operation at a time.
5787 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
5788 (vect_truncatable_operation_p, vect_set_operation_type)
5789 (vect_set_min_input_precision): New functions.
5790 (vect_determine_min_output_precision_1): Likewise.
5791 (vect_determine_min_output_precision): Likewise.
5792 (vect_determine_precisions_from_range): Likewise.
5793 (vect_determine_precisions_from_users): Likewise.
5794 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
5795 (vect_vect_recog_func_ptrs): Put over_widening first.
5797 (vect_pattern_recog): Call vect_determine_precisions.
5799 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5801 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
5802 statements that have been replaced by further pattern statements.
5803 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
5805 2018-07-03 Richard Biener <rguenther@suse.de>
5807 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
5808 always set *dt. Dump vectype in vectype overload.
5809 * dumpfile.h (dump_gimple_expr): New function.
5810 (dump_gimple_expr_loc): Likewise.
5811 * dumpfile.c (dump_gimple_expr): New function.
5812 (dump_gimple_expr_loc): Likewise.
5814 2018-07-02 Jeff Law <law@redhat.com>
5816 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
5817 the H8/300, H8/300H and H8/S variants into a single pattern.
5818 (movhi_h8300, movqi_h8300hs): Similarly.
5819 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
5820 (QHI mode iterator): New.
5822 * config/h8300/h8300.md: Remove trailing whitespace.
5824 2018-07-02 Jim Wilson <jimw@sifive.com>
5826 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
5827 instead of emit_insn for interrupt returns.
5828 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
5829 (riscv_sret, riscv_uret): Likewise.
5831 2018-07-02 David Malcolm <dmalcolm@redhat.com>
5833 * pretty-print.c (selftest::test_pp_format): Move save and restore
5834 of quotes to class auto_fix_quotes, and add an instance.
5835 * selftest.c: Include "intl.h".
5836 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
5837 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
5838 * selftest.h (selftest::auto_fix_quotes): New class.
5840 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
5842 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
5843 (aarch64_sve_prepare_conditional_op): Remove.
5844 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
5845 Allow aarch64_simd_reg_or_zero as select operand; remove
5846 the aarch64_sve_prepare_conditional_op call.
5847 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
5848 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
5849 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
5850 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
5851 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
5852 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
5853 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
5854 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
5855 and a splitters to match all of the *_any patterns.
5856 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
5858 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
5859 (SVE_COND_FP_BINARY_REV): Remove.
5860 (sve_int_op_rev, sve_fp_op_rev): New.
5861 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
5862 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
5863 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
5864 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
5865 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
5866 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
5867 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
5868 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
5869 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
5871 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
5872 Remove match_dup 1 from the inner unspec.
5873 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
5875 * config/aarch64/aarch64.md (movprfx): New attr.
5876 (length): Default movprfx to 8.
5877 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
5878 (*madd<SVE_I>, *msub<SVE_I): Likewise.
5879 (*<su>mul<SVE_I>3_highpart): Likewise.
5880 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
5881 (*v<ASHIFT><SVE_I>3): Likewise.
5882 (*<su><MAXMIN><SVE_I>3): Likewise.
5883 (*<su><MAXMIN><SVE_F>3): Likewise.
5884 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
5885 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
5886 (*div<SVE_F>4): Likewise.
5888 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
5890 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
5893 2018-07-02 Richard Biener <rguenther@suse.de>
5895 PR tree-optimization/86363
5896 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
5897 memset argument refers to a non-variable address.
5899 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
5901 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
5902 {PLUS,MINUS}_EXPR code to...
5903 (adjust_symbolic_bound): ...here,
5904 (combine_bound): ...here,
5905 (set_value_range_with_overflow): ...and here.
5907 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
5909 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
5911 (extract_range_from_abs_expr): ...here.
5913 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
5915 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
5916 -fno-omit-frame-pointer when not optimizing.
5918 2018-07-02 Martin Liska <mliska@suse.cz>
5921 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
5922 (propagate_nothrow): Likewise.
5924 2018-07-02 Martin Liska <mliska@suse.cz>
5927 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
5929 2018-07-02 David Malcolm <dmalcolm@redhat.com>
5931 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
5932 function in r262149, changing "loc" param from source_location to
5933 const dump_location_t &.
5934 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
5935 declaration, as above.
5937 2018-07-01 Paul Koning <ni1d@arrl.net>
5939 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
5940 -munit-asm, -mgnu-asm, -mdec-asm.
5941 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
5942 (pdp11_output_labelref): New.
5943 (pdp11_output_def): New.
5944 (pdp11_output_addr_vec_elt): New.
5945 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
5946 %# and %@ format codes.
5947 (pdp11_option_override): New.
5948 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
5949 (pdp11_output_ident): New.
5950 (pdp11_asm_named_section): New.
5951 (pdp11_asm_init_sections): New.
5952 (pdp11_file_start): New.
5953 (pdp11_file_end): New.
5954 (output_ascii): Use .ascii/.asciz for -mdec-asm.
5955 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
5956 %o, like %c but octal.
5957 (pdp11_option_override): New.
5958 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
5960 (DATA_SECTION_ASM_OP): Ditto.
5961 (READONLY_DATA_SECTION_ASM_OP): New.
5962 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
5963 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
5964 (ASM_OUTPUT_LABELREF): Ditto.
5965 (ASM_OUTPUT_DEF): Ditto.
5966 (ASM_OUTPUT_EXTERNAL): New.
5967 (ASM_OUTPUT_SOURCE_FILENAME): New.
5968 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
5969 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
5970 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
5971 %# and %@ format codes.
5972 * config/pdp11/pdp11.opt (mgnu-asm): New.
5973 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
5974 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
5975 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
5977 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
5979 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
5980 dereferencing path[] beyond its length.
5982 (debug_all_paths): New.
5983 (rewire_first_differing_edge): New.
5984 (adjust_paths_after_duplication): New.
5985 (duplicate_thread_path): Call adjust_paths_after_duplication.
5987 (thread_through_all_blocks): Add new argument to
5988 duplicate_thread_path.
5990 2018-06-30 Jim Wilson <jimw@sifive.com>
5992 * config/riscv/predicates.md (p2m1_shift_operand): New.
5993 (high_mask_shift_operand): New.
5994 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
5995 pattern using p2m1_shift_operand.
5996 (lshsi3_zero_extend_3+2): New combiner pattern using
5997 high_mask_shift_operand.
5999 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6001 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
6003 (vect_recog_rotate_pattern): ...here.
6004 (vect_convert_input): Try to insert casts of invariants in the
6006 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
6007 preheader to be empty.
6009 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6011 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
6012 vector type. If given, install it in the new statement's
6014 (vect_element_precision): New function.
6015 (vect_unpromoted_value): New struct.
6016 (vect_unpromoted_value::vect_unpromoted_value): New function.
6017 (vect_unpromoted_value::set_op): Likewise.
6018 (vect_look_through_possible_promotion): Likewise.
6019 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
6020 (vect_widened_op_tree, vect_convert_input): Likewise.
6021 (vect_convert_inputs, vect_convert_output): Likewise.
6022 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
6023 to handle the optional cast of the multiplication result and
6024 vect_widened_op_tree to detect the widened multiplication itself.
6025 Do not require the input and output of promotion casts to have
6026 the same sign, but base the signedness of the operation on the
6027 input rather than the result. If the pattern includes two
6028 promotions, check that those promotions have the same sign.
6029 Do not restrict the MULT_EXPR handling to a double-width result;
6030 handle quadruple-width results and wider. Use vect_convert_inputs
6031 to convert the inputs to the common type.
6032 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
6033 to handle the optional cast of the ABS result. Also allow a sign
6034 change or a sign extension between the ABS and MINUS.
6035 Use vect_widened_op_tree to detect the widened subtraction and use
6036 vect_convert_inputs to convert the inputs to the common type.
6037 (vect_handle_widen_op_by_const): Delete.
6038 (vect_recog_widen_op_pattern): New function.
6039 (vect_recog_widen_mult_pattern): Use it.
6040 (vect_recog_widen_shift_pattern): Likewise.
6041 (vect_recog_widen_sum_pattern): Use
6042 vect_look_through_possible_promotion to handle the promoted
6045 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6047 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
6048 the containing gimple_seq *.
6049 * gimple-iterator.h (gsi_for_stmt): Declare it.
6050 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
6051 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
6052 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6053 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6054 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
6056 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
6058 (vect_mark_pattern_stmts): ...here. Handle cases in which the
6059 statement being replaced is part of an existing pattern
6060 definition sequence, inserting the new pattern statements before
6062 (vect_pattern_recog_1): Don't return a bool. If the statement
6063 is already part of a pattern, instead apply pattern matching
6064 to the pattern definition statements. Don't clear the
6065 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
6066 (vect_pattern_recog): Don't break after the first match;
6067 continue processing the pattern definition statements instead.
6068 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
6070 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6072 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
6073 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6074 (vect_recog_widen_sum_pattern): Use it.
6076 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6078 * tree-vect-loop.c (vectorizable_reduction): Assert that the
6079 phi is not a pattern statement and has not been replaced by
6080 a pattern statement.
6081 * tree-vect-patterns.c (type_conversion_p): Don't check
6082 STMT_VINFO_IN_PATTERN_P.
6083 (vect_recog_vector_vector_shift_pattern): Likewise.
6084 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
6085 the pattern statement rather than the original statement; check
6086 directly for a WIDEN_MULT_EXPR here.
6087 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
6088 vect_is_simple_use to return the pattern statement rather
6089 than the original statement; use is_pattern_stmt_p to check
6090 for such a pattern statement.
6091 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
6092 to return the pattern statement rather than the original statement;
6093 don't do the same transformation here.
6094 (vect_is_simple_use): If the defining statement has been replaced
6095 by a pattern statement, return the pattern statement instead.
6096 Remove the corresponding (local) transformation from the vectype
6099 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6101 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
6102 end and default to null.
6103 * tree-vect-loop.c (vect_create_epilog_for_reduction)
6104 (vectorizable_reduction): Update calls accordingly, dropping the
6105 gimple ** argument if the passed-back statement isn't needed.
6106 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
6107 (vect_recog_rotate_pattern): Likewise.
6108 (vect_recog_mask_conversion_pattern): Likewise.
6109 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6110 (vect_mask_constant_operand_p): Likewise.
6111 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
6112 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
6113 (get_group_load_store_type, get_load_store_type): Likewise.
6114 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
6115 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
6116 (vectorizable_conversion, vectorizable_assignment): Likewise.
6117 (vectorizable_shift, vectorizable_operation): Likewise.
6118 (vectorizable_store, vect_is_simple_cond): Likewise.
6119 (vectorizable_condition, vectorizable_comparison): Likewise.
6120 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
6121 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
6122 and move it to the end. Cope with null def_stmt_outs.
6124 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
6126 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
6128 2018-06-29 Jeff Law <law@redhat.com>
6130 * config/v850/v850.c (v850_legitimate_address_p): Handle large
6131 displacements for TARGET_V850E2V3 and newer.
6132 (TARGET_LRA_P): Remove. Defaults to LRA now.
6133 * config/v850/v850.md (sign23byte_load): Remove.
6134 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
6135 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
6137 2018-06-29 Martin Liska <mliska@suse.cz>
6140 * coverage.c (coverage_init): Mangle full path name.
6141 * doc/invoke.texi: Document the change.
6142 * gcov-io.c (mangle_path): New.
6143 * gcov-io.h (mangle_path): Likewise.
6144 * gcov.c (mangle_name): Use mangle_path for path mangling.
6146 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6148 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
6149 if starting source register is not even.
6151 2018-06-29 Martin Liska <mliska@suse.cz>
6153 PR tree-optimization/86263
6154 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
6155 Make edge redirection.
6157 2018-06-29 David Malcolm <dmalcolm@redhat.com>
6159 * dumpfile.c (dump_loc): Add indentation based on scope depth.
6160 (dump_scope_depth): New variable.
6161 (get_dump_scope_depth): New function.
6162 (dump_begin_scope): New function.
6163 (dump_end_scope): New function.
6164 * dumpfile.h (get_dump_scope_depth): New declaration.
6165 (dump_begin_scope): New declaration.
6166 (dump_end_scope): New declaration.
6167 (class auto_dump_scope): New class.
6168 (AUTO_DUMP_SCOPE): New macro.
6169 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
6172 2018-06-29 Richard Biener <rguenther@suse.de>
6174 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
6175 compute_all_dependences succeeds.
6176 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
6177 exceed --param loop-max-datarefs-for-datadeps.
6179 2018-06-29 Jakub Jelinek <jakub@redhat.com>
6181 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
6183 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
6186 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
6187 alternative 0 in preferred_for_speed attribute.
6189 2018-06-28 Paul Koning <ni1d@arrl.net>
6191 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
6192 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
6193 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
6194 * config/pdp11/pdp11.md: Correct "length" attribute calculation
6195 for shift insn patterns.
6197 2018-06-28 David Malcolm <dmalcolm@redhat.com>
6199 * cgraph.c (cgraph_node::get_body): Replace assignments to
6200 "dump_file" with calls to set_dump_file.
6201 * dumpfile.c (alt_dump_file): Make static, and group with...
6202 (alt_flags): ...this definition.
6203 (dumps_are_enabled): New variable.
6204 (refresh_dumps_are_enabled): New function.
6205 (set_dump_file): New function.
6206 (set_alt_dump_file): New function.
6207 (gcc::dump_manager::dump_start): Replace assignments to
6208 "dump_file" and "alt_dump_file" with calls to set_dump_file and
6210 (gcc::dump_manager::dump_finish): Likewise.
6211 * dumpfile.h (alt_dump_file): Delete decl.
6212 (dumps_are_enabled): New variable decl.
6213 (set_dump_file): New function decl.
6214 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
6216 * tree-nested.c (lower_nested_functions): Replace assignments to
6217 "dump_file" with calls to set_dump_file.
6219 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
6221 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
6222 goto_locus of each outgoing edge of each basic block.
6224 2018-06-28 Richard Biener <rguenther@suse.de>
6226 * dwarf2out.c (decl_scope_table): Remove.
6227 (push_decl_scope): Likewise.
6228 (pop_decl_scope): Likewise.
6229 (gen_type_die_for_member): Do not call push/pop_decl_scope.
6230 (gen_struct_or_union_type_die): Likewise.
6231 (gen_tagged_type_die): Likewise.
6232 (dwarf2out_init): Do not initialize decl_scope_table.
6233 (dwarf2out_c_finalize): Do not free it.
6235 2018-06-28 Richard Biener <rguenther@suse.de>
6237 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
6238 deciding whether to not re-use a DIE.
6240 2018-06-28 Richard Biener <rguenther@suse.de>
6242 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
6243 DW_AT_abstract_origin attribute.
6245 2018-06-28 Martin Liska <mliska@suse.cz>
6247 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
6248 Use newly introduced constants.
6249 * tree-switch-conversion.h (struct jump_table_cluster):
6250 Define max_ratio_for_size and max_ratio_for_speed.
6252 2018-06-28 Martin Liska <mliska@suse.cz>
6254 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6255 Add new checking assert to catch invalid state.
6256 (jump_table_cluster::can_be_handled): Handle single case
6258 (jump_table_cluster::is_beneficial): Bail out for such case.
6259 (bit_test_cluster::find_bit_tests):
6260 Add new checking assert to catch invalid state.
6261 (bit_test_cluster::can_be_handled): Handle single case
6263 (bit_test_cluster::is_beneficial): Bail out for such case.
6264 (switch_decision_tree::analyze_switch_statement):
6267 2018-06-28 Martin Liska <mliska@suse.cz>
6269 * common.opt: Introduce -completion option.
6270 * gcc.c (driver_handle_option): Handle it.
6271 (driver::main): Print completions if completion
6273 * opt-suggestions.c (option_proposer::get_completions):
6275 (option_proposer::suggest_completion): Likewise.
6276 (option_proposer::find_param_completions): Likewise.
6277 (verify_autocompletions): Likewise.
6278 (test_completion_valid_options): Likewise.
6279 (test_completion_valid_params): Likewise.
6280 (in_completion_p): Likewise.
6281 (empty_completion_p): Likewise.
6282 (test_completion_partial_match): Likewise.
6283 (test_completion_garbage): Likewise.
6284 (opt_proposer_c_tests): Likewise.
6285 * opt-suggestions.h: Declare new functions.
6286 * opts.c (common_handle_option): Handle OPT__completion_.
6287 * selftest-run-tests.c (selftest::run_tests): Add
6288 opt_proposer_c_tests.
6289 * selftest.c (assert_str_startswith): New.
6290 * selftest.h (assert_str_startswith): Likewise.
6291 (opt_proposer_c_tests): New.
6292 (ASSERT_STR_STARTSWITH): Likewise.
6294 2018-06-28 Martin Liska <mliska@suse.cz>
6296 * Makefile.in: Add opt-suggestions.o.
6297 * gcc-main.c: Include opt-suggestions.h.
6298 * gcc.c (driver::driver): Likewise.
6299 (driver::~driver): Remove m_option_suggestions.
6300 (driver::build_option_suggestions): Moved to option_proposer.
6301 (driver::suggest_option): Likewise.
6302 (driver::handle_unrecognized_options): Use option_proposer.
6303 * gcc.h (class driver): Add new memver m_option_proposer.
6304 * opt-suggestions.c: New file.
6305 * opt-suggestions.h: New file.
6307 2018-06-28 Martin Liska <mliska@suse.cz>
6309 * vec.h (class auto_string_vec): New (moved from auto_argvec).
6310 (auto_string_vec::~auto_string_vec): Likewise.
6312 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
6314 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
6315 prevent_decl_creation_for_types fields up and add reset_location field.
6316 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
6317 statement if id->reset_location is true.
6318 (copy_edges_for_bb): Do not set goto_locus on the new edges if
6319 id->reset_location is true.
6320 (copy_phis_for_bb): Force input_location on the arguments if
6321 id->reset_location is true.
6322 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
6323 is set on the function to be inlined.
6325 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
6327 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
6329 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
6331 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
6332 registers for Pmode.
6333 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
6334 hard registers for the clobbered pseudo.
6336 2018-06-27 Paul Koning <ni1d@arrl.net>
6338 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6339 mutually exclusive options.
6340 * config/pdp11/constraints.md (h): New constraint.
6341 (O): Update definition to match shift code generation.
6342 (D): New constraint.
6343 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
6345 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
6347 (output_jump): Change arguments.
6348 (pdp11_fixed_cc_regs): New function.
6349 (pdp11_cc_mode): Ditto.
6350 (pdp11_expand_shift): Ditto.
6351 (pdp11_assemble_shift): Ditto.
6352 (pdp11_small_shift): Ditto.
6353 (pdp11_branch_cost): Remove.
6354 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
6356 (pdp11_register_move_cost): Update for CC registers.
6357 (pdp11_rtx_costs): Add case for LSHIFTRT.
6358 (pdp11_output_jump): Add CCNZ mode conditional branches.
6359 (notice_update_cc_on_set): Remove.
6360 (pdp11_cc_mode): New function.
6361 (simple_memory_operand): Correct pre/post decrement case.
6362 (no_side_effect_operand): New function.
6363 (pdp11_regno_reg_class): Add CC_REGS class.
6364 (pdp11_fixed_cc_regs): New function.
6365 (pdp11_small_shift): New function.
6366 (pdp11_expand_shift): New function to expand shift insns.
6367 (pdp11_assemble_shift): New function to output shifts.
6368 (pdp11_branch_cost): Remove.
6369 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
6370 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
6371 (WCHAR_TYPE): Ditto.
6372 (PTRDIFF_TYPE): Ditto.
6373 (ADJUST_INSN_LENGTH): New macro.
6374 (FIXED_REGISTERS): Add CC registers.
6375 (CALL_USED_REGISTERS): Ditto.
6377 (REG_CLASS_NAMES): Ditto.
6378 (REG_CLASS_CONTENTS): Ditto.
6379 (SELECT_CC_MODE): Use new function.
6380 (TARGET_FLAGS_REGNUM): New macro.
6381 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
6382 (cc0_reg_rtx): Remove.
6383 (CC_STATUS_MDEP): Remove.
6384 (CC_STATUS_MDEFP_INIT): Remove.
6385 (CC_IN_FPU): Remove.
6386 (NOTICE_UPDATE_CC): Remove.
6387 (REGISTER_NAMES): Add CC registers.
6388 (BRANCH_COST): Change to constant 1.
6389 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
6391 * config/pdp11/pdp11.opt (mbcopy): Remove.
6392 (mbcopy-builtin): Remove.
6393 (mbranch-cheap): Remove.
6394 (mbranch-expensive): Remove.
6395 * config/pdp11/predicates.md (expand_shift_operand): Update to
6396 match shift code generation.
6397 (ccnz_operator): New predicate.
6398 * doc/invoke.texi (PDP-11 Options): Remove deleted options
6399 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
6400 Remove non-existent option -mabshi, -mno-abshi. Document mutually
6402 * doc/md.texi (PDP-11): Document new D and h constraints. Update
6403 description of O constraint.
6405 2018-06-27 Jeff Law <law@redhat.com>
6406 Austin Law <austinklaw@gmail.com>
6408 * config/v850/v850.md (addsi3_set_flags): New pattern.
6409 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
6410 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
6411 (zero_extendhisi2_v850_set_flags): Likewise.
6412 (zero_extendqisi2_v850_set_flags): Likewise.
6413 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
6414 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
6415 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
6417 * config/v850/v850-protos.h (notice_update_cc): Remove.
6418 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
6419 (v850_print_operand): Handle 'D' and "d".
6420 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
6421 Add handling of arithmetic/logical operations compared against zero.
6422 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
6423 Do not look at v850_compare_op, instead get mode from last argument.
6424 (v850_gen_compare): Remove
6425 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
6426 after reload for prologue insns.
6427 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
6429 (construct_save_jarl): Likewise.
6430 (TARGET_FLAGS_REGNUM): Define.
6431 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
6432 (NOTICE_UPDATE_CC): Remove.
6433 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
6434 than cc0. Conditionalize on reload_completed.
6435 (cmpsi_insn, setfcc_insn): Likewise.
6436 (tst1 splitter): Turn into define_and_split which sets the flags
6438 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
6439 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
6440 (cstoresf4, cstoredf4): Clobber the flags.
6441 (cmpsi, cmpsf, cmpdf): Remove expanders.
6442 (setf_insn): Remove pattern.
6443 (addsi3): Turn into define_and_split which clobbers the flags after
6444 reload and a suitable pattern (addsi3_clobber_flags) for use after
6446 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
6447 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
6448 (ashrsi3, ashrsi3_v850e2): Likewise.
6449 (bins): Clobber the flags.
6450 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
6451 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
6452 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
6453 (call_value_internal_short, call_value_internal_long): Likewise.
6454 (callt_save_interrupt, callt_return_interrupt): Likewise.
6455 (save_interrupt, return_interrupt): Likewise.
6456 (callt_save_all_interrupt, save_all_interrupt): Likewise.
6457 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
6458 (restore_all_interrupt, _restore_all_interrupt): Likewise.
6459 (All FP comparisons): Only allow after reload has completed.
6461 (divh, divhu): Tweak output template.
6462 (branch_z_normal, branch_z_invert): Remove
6463 (branch_nz_normal, branch_nz_invert): Likewise.
6464 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
6466 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
6467 * config/v850/v850.c (notice_update_cc): Remove.
6468 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
6469 (CC_NO_CARRY): Likewise.
6470 (NOTICE_UPDATE_CC): Define to nothing.
6471 * config/v850/v850.md: Remove block comment on cc0 handling
6472 Remove "cc" attribute from all patterns. Remove cc_status handling
6473 from all patterns. Minor formatting fixes.
6475 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6477 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
6478 (cortex-a76.cortex-a55): Likewise.
6479 * config/aarch64/aarch64-tune.md: Regenerate.
6480 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
6481 cortex-a76.cortex-a55.
6483 2018-06-27 Jeff Law <law@redhat.com>
6485 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
6486 (MULTILIB_DIRNAMES): Similarly.
6488 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
6490 * gimple.h (gimple_return_retbnd): Delete.
6491 (gimple_return_set_retbnd): Likewise.
6492 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
6493 gimple_return_set_retbnd.
6494 * gimple-pretty-print.c (dump_gimple_return): Remove call to
6495 gimple_return_retbnd and adjust.
6496 * tree-inline.h (struct copy_body_data): Remove retbnd field.
6497 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
6498 Explicitly return NULL in a couple more cases. Move assertion
6499 on debug statements and remove unreachable code.
6500 (reset_debug_binding): Do not test id->retbnd.
6501 (expand_call_inline): Do not set it.
6503 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6505 * configure.ac: Add --disable-gcov option.
6506 * configure: Regenerate.
6507 * Makefile.in: Honour @enable_gcov@.
6508 * doc/install.texi: Document --disable-gcov.
6510 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6512 * config/arm/arm-cpus.in (cortex-a76): New entry.
6513 (cortex-a76.cortex-a55): Likewise.
6514 * config/arm/arm-tables.opt: Regenerate.
6515 * config/arm/arm-tune.md: Likewise.
6516 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
6517 * doc/invoke.texi (ARM Options): Document cortex-a76 and
6518 cortex-a76.cortex-a55.
6520 2018-06-27 Tamar Christina <tamar.christina@arm.com>
6523 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
6525 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
6527 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
6529 (EPILOGUE_USES): Likewise.
6531 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
6533 * tree-inline.c (remap_location): New function extracted from...
6534 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
6535 (copy_phis_for_bb): ...here. Call remap_location.
6536 (copy_cfg_body): Adjust call to copy_edges_for_bb.
6538 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
6540 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
6541 unaligned vsx for 16B memset.
6543 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
6546 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
6547 ieee128_float_type_node to long_double_type_node unless
6548 TARGET_LONG_DOUBLE_128 is set.
6550 2018-06-26 David Malcolm <dmalcolm@redhat.com>
6552 * cfgloop.c (get_loop_location): Convert return type from
6553 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
6554 by implicit construction from rtx_insn *, and using
6555 dump_user_location_t::from_function_decl for the fallback case.
6556 * cfgloop.h (get_loop_location): Convert return type from
6557 location_t to dump_user_location_t.
6558 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
6559 dump_printf_loc to pass in a dump_location_t rather than a
6560 location_t, via the gimple stmt.
6561 * coverage.c (get_coverage_counts): Update calls to
6562 dump_printf_loc to pass in dump_location_t rather than a
6564 * doc/optinfo.texi (Dump types): Convert example of
6565 dump_printf_loc from taking "locus" to taking "insn". Update
6566 description of the "_loc" calls to cover dump_location_t.
6567 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
6569 (dump_user_location_t::dump_user_location_t): New constructors,
6570 from gimple *stmt and rtx_insn *.
6571 (dump_user_location_t::from_function_decl): New function.
6572 (dump_loc): Make static.
6573 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
6574 const dump_location_t &.
6575 (dump_generic_expr_loc): Delete.
6576 (dump_printf_loc): Convert param "loc" from location_t to
6577 const dump_location_t &.
6578 (selftest::test_impl_location): New function.
6579 (selftest::dumpfile_c_tests): New function.
6580 * dumpfile.h: Include "profile-count.h".
6581 (class dump_user_location_t): New class.
6582 (struct dump_impl_location_t): New struct.
6583 (class dump_location_t): New class.
6584 (dump_printf_loc): Convert 2nd param from source_location to
6585 const dump_location_t &.
6586 (dump_generic_expr_loc): Delete.
6587 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
6588 const dump_location_t &.
6589 * gimple-fold.c (fold_gimple_assign): Update call to
6590 dump_printf_loc to pass in a dump_location_t rather than a
6591 location_t, via the gimple stmt.
6592 (gimple_fold_call): Likewise.
6593 * gimple-loop-interchange.cc
6594 (loop_cand::analyze_iloop_reduction_var): Update for change to
6595 check_reduction_path.
6596 (tree_loop_interchange::interchange): Update for change to
6598 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
6599 change in return-type of find_loop_location.
6600 (graphite_regenerate_ast_isl): Likewise.
6601 * graphite-optimize-isl.c (optimize_isl): Likewise.
6602 * graphite.c (graphite_transform_loops): Likewise.
6603 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
6604 pass in a dump_location_t rather than a location_t, via the
6606 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6607 * ipa.c (walk_polymorphic_call_targets): Likewise.
6608 * loop-unroll.c (report_unroll): Convert "locus" param from
6609 location_t to dump_location_t.
6610 (decide_unrolling): Update for change to get_loop_location's
6612 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
6613 location_t to dump_user_location_t.
6614 (grid_find_single_omp_among_assignments_1): Updates calls to
6615 dump_printf_loc to pass in a dump_location_t rather than a
6616 location_t, via the gimple stmt.
6617 (grid_parallel_clauses_gridifiable): Convert "tloc" from
6618 location_t to dump_location_t. Updates calls to dump_printf_loc
6619 to pass in a dump_location_t rather than a location_t, via the
6621 (grid_inner_loop_gridifiable_p): Likewise.
6622 (grid_dist_follows_simple_pattern): Likewise.
6623 (grid_gfor_follows_tiling_pattern): Likewise.
6624 (grid_target_follows_gridifiable_pattern): Likewise.
6625 (grid_attempt_target_gridification): Convert initialization
6626 of local "grid" from memset to zero-initialization; FIXME: does
6627 this require C++11? Update call to dump_printf_loc to pass in a
6628 optinfo_location rather than a location_t, via the gimple stmt.
6629 * profile.c (read_profile_edge_counts): Updates call to
6630 dump_printf_loc to pass in a dump_location_t rather than a
6632 (compute_branch_probabilities): Likewise.
6633 * selftest-run-tests.c (selftest::run_tests): Call
6635 * selftest.h (dumpfile_c_tests): New decl.
6636 * tree-loop-distribution.c (pass_loop_distribution::execute):
6637 Update for change in return type of find_loop_location.
6638 * tree-parloops.c (parallelize_loops): Likewise.
6639 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
6640 "locus" from location_t to dump_user_location_t.
6641 (canonicalize_loop_induction_variables): Likewise.
6642 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
6643 for change in return type of find_loop_location.
6644 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
6645 to dump_printf_loc to pass in a dump_location_t rather than a
6646 location_t, via the stmt.
6647 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
6649 * tree-vect-loop-manip.c (find_loop_location): Convert return
6650 type from source_location to dump_user_location_t.
6651 (vect_do_peeling): Update for above change.
6652 (vect_loop_versioning): Update for change in type of
6654 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
6655 from location_t to dump_user_location_t.
6656 (vect_estimate_min_profitable_iters): Update for change in type
6658 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
6659 location_t to dump_location_t.
6660 (vect_slp_bb): Update for change in type of vect_location.
6661 * tree-vectorizer.c (vect_location): Convert from source_location
6662 to dump_user_location_t.
6663 (try_vectorize_loop_1): Update for change in vect_location's type.
6664 (vectorize_loops): Likewise.
6665 (increase_alignment): Likewise.
6666 * tree-vectorizer.h (vect_location): Convert from source_location
6667 to dump_user_location_t.
6668 (find_loop_location): Convert return type from source_location to
6669 dump_user_location_t.
6670 (check_reduction_path): Convert 1st param from location_t to
6671 dump_user_location_t.
6672 * value-prof.c (check_counter): Update call to dump_printf_loc to
6673 pass in a dump_user_location_t rather than a location_t; update
6674 call to error_at for change in type of "locus".
6675 (check_ic_target): Update call to dump_printf_loc to
6676 pass in a dump_user_location_t rather than a location_t, via the
6679 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
6681 * config/s390/s390.h (enum processor_flags): Do not use
6682 default tune parameter when -march was specified.
6684 2018-06-26 Jakub Jelinek <jakub@redhat.com>
6687 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
6688 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
6691 2018-06-26 Richard Biener <rguenther@suse.de>
6693 PR tree-optimization/86287
6695 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
6696 (vect_analyze_loop): Initialize n_stmts.
6698 2018-06-26 Richard Biener <rguenther@suse.de>
6701 * fold-const.c (fold_convertible_p): Pointer extension
6704 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
6707 * dwarf2out.c (loc_list_has_views): Adjust comments.
6708 (dw_loc_list): Split single cross-partition range with
6711 2018-06-25 Jeff Law <law@redhat.com>
6713 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
6714 on -mbig-switch by default.
6716 * config/v850/predicates.md (const_float_1_operand): Fix match_code
6718 (const_float_0_operand): Remove unused predicate.
6719 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
6720 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
6721 (recipsf2): New expander. Original pattern now called
6723 (recipdf2, recipdf2_insn): Similarly.
6724 (rsqrtsf2, rsqrtsf2_insn): Similarly
6725 (rsqrtdf2, rsqrtdf2_insn): Similarly
6727 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
6729 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
6730 Simplify logic for FreeBSD (twice).
6732 2018-06-25 Martin Sebor <msebor@redhat.com>
6734 PR tree-optimization/86204
6735 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
6736 a strnlen result if it's less than the length of the string.
6738 2018-06-25 Martin Sebor <msebor@redhat.com>
6740 PR tree-optimization/85700
6741 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
6742 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
6743 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
6745 2018-06-25 Martin Sebor <msebor@redhat.com>
6747 * doc/extend.texi (Zero-length arrays): Update and clarify.
6749 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
6751 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
6752 added IEEE/IBM long double multilib support on PowerPC little
6753 endian Linux systems.
6754 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
6755 (MULTILIB_DEFAULTS): Likewise.
6756 * config/rs6000/rs6000.c (rs6000_option_override_internal):
6758 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
6759 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
6760 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
6762 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
6765 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
6766 (REORDER_45): Likewise.
6768 2018-06-25 Jeff Law <law@redhat.com>
6770 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
6771 dividend to 32 bits. Adjust length.
6772 (udivmodhi4): Cleanup output template. Fix length.
6774 2018-06-25 Carl Love <cel@us.ibm.com>
6776 * config/rs6000/vsx.md: Change word selector to prefered location.
6778 2018-06-25 Richard Biener <rguenther@suse.de>
6780 PR tree-optimization/86304
6781 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
6782 epilogue-if-converted loops as well.
6784 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
6786 * lto-section-out.c (lto_begin_section): Do not print section
6787 name for noaddr and unnumbered dumps.
6789 2018-06-25 Richard Biener <rguenther@suse.de>
6791 * tree-vectorizer.h (struct vec_info_shared): New structure
6792 with parts split out from struct vec_info and loop_nest from
6793 struct _loop_vec_info.
6794 (struct vec_info): Adjust accordingly.
6795 (struct _loop_vec_info): Likewise.
6796 (LOOP_VINFO_LOOP_NEST): Adjust.
6797 (LOOP_VINFO_DATAREFS): Likewise.
6798 (LOOP_VINFO_DDRS): Likewise.
6799 (struct _bb_vec_info): Likewise.
6800 (BB_VINFO_DATAREFS): Likewise.
6801 (BB_VINFO_DDRS): Likewise.
6802 (struct _stmt_vec_info): Add dr_aux member.
6803 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
6804 (DR_MISALIGNMENT_UNINITIALIZED): New.
6805 (set_dr_misalignment): Adjust.
6806 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
6807 (vect_analyze_loop): Adjust prototype.
6808 (vect_analyze_loop_form): Likewise.
6809 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
6810 Compute dependences lazily.
6811 (vect_record_base_alignments): Use shared datarefs/ddrs.
6812 (vect_verify_datarefs_alignment): Likewise.
6813 (vect_analyze_data_refs_alignment): Likewise.
6814 (vect_analyze_data_ref_accesses): Likewise.
6815 (vect_analyze_data_refs): Likewise.
6816 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
6817 constructor parameter for shared part.
6818 (vect_analyze_loop_form): Pass in shared part and adjust.
6819 (vect_analyze_loop_2): Pass in storage for the number of
6820 stmts. Move loop nest finding to the caller. Compute
6822 (vect_analyze_loop): Pass in shared part.
6823 (vect_transform_loop): Verify shared datarefs are unchanged.
6824 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
6825 constructor parameter for shared part.
6826 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
6827 (vect_slp_bb): Verify shared datarefs are unchanged before
6829 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
6831 (new_stmt_vec_info): Initialize DR_AUX misalignment to
6832 DR_MISALIGNMENT_UNINITIALIZED.
6833 * tree-vectorizer.c (vec_info::vec_info): Add constructor
6834 parameter for shared part.
6835 (vec_info::~vec_info): Adjust.
6836 (vec_info_shared::vec_info_shared): New.
6837 (vec_info_shared::~vec_info_shared): Likewise.
6838 (vec_info_shared::save_datarefs): Likewise.
6839 (vec_info_shared::check_datarefs): Likewise.
6840 (try_vectorize_loop_1): Construct shared part live for analyses
6841 of a single loop for multiple vector sizes.
6842 * tree-parloops.c (gather_scalar_reductions): Adjust.
6844 2018-06-25 Richard Biener <rguenther@suse.de>
6846 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
6847 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
6848 (vect_analyze_data_refs): Remove similar code from here and
6849 simplify accordingly.
6851 2018-06-25 Richard Biener <rguenther@suse.de>
6853 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
6854 for reverse storage order accesses rather than asserting
6855 they cannot happen here.
6857 2018-06-25 Tom de Vries <tdevries@suse.de>
6860 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
6861 Use data16 instead of .byte for insn prefix.
6863 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
6866 * parser.c (make_char_string_pack): Pass this literal chars
6867 through cpp_interpret_string.
6868 (cp_parser_userdef_numeric_literal): Check the result of
6869 make_char_string_pack.
6871 2018-06-24 Maya Rashish <coypu@sdf.org>
6873 * ginclude/stddef.h: Simplify conditions around avoiding
6874 re-definition of __size_t.
6876 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
6878 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
6879 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
6881 2018-06-22 Maya Rashish <coypu@sdf.org>
6883 * doc/invoke.texi (mno-fancy-math-387): Update for changes
6884 made to OpenBSD and NetBSD through the years.
6886 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
6888 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
6889 behavior of vec_pack (vector double, vector double) to match
6890 behavior of vec_float2 (vector double, vector double).
6892 2018-06-22 Olivier Hainque <hainque@adacore.com>
6894 * gimplify.c (gimplify_function_tree): Prevent creation
6895 of a trampoline for the address of the current function
6896 passed to entry/exit instrumentation hooks.
6898 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
6901 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
6904 2018-06-22 Martin Liska <mliska@suse.cz>
6906 PR tree-optimization/86263
6907 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6908 Bail out if is_enabled is false.
6909 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
6911 (jump_table_cluster::is_enabled): New function.
6913 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
6915 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
6916 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
6917 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
6918 (lto_input_ts_binfo_tree_pointers): Likewise.
6919 * tree-streamer-out.c (streamer_write_tree_bitfields,
6920 write_ts_binfo_tree_pointers): Likewise.
6921 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
6923 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
6925 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
6927 2018-06-22 Martin Liska <mliska@suse.cz>
6929 * symbol-summary.h (get): Make it pure and inline move
6930 functionality from ::get function.
6931 (get): Remove and inline into ::get and ::get_create.
6932 (get_create): Move code from ::get function.
6934 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6937 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
6938 -x assembler-with-cpp.
6940 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6942 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
6943 _FILE_OFFSET_BITS=64 for C++.
6945 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
6947 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
6948 conversion insn that shows up when pr85657-3.c is compiled using
6949 IEEE 128-bit long double.
6950 (neg<mode>2_internal): Use the correct mode to check whether the
6951 mode is IBM extended.
6952 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
6953 multiply and divide external functions from being created more
6956 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6958 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
6960 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
6961 the edge can be forwarded.
6962 (cfg_layout_merge_blocks): Likewise.
6964 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6966 * except.c (finish_eh_generation): Commit edge insertions only after
6967 the EH edges have been redirected from post-landing to landing pads.
6969 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6971 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
6972 create_tmp_var_for to create the FRAME decl.
6973 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
6975 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6977 * tree-inline.c (copy_edges_for_bb): Minor tweak.
6978 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
6979 debug statement when resetting its value.
6980 (expand_call_inline): Copy the locus of the call onto the assignment
6981 of the return value, if any. Use local variable in more cases.
6983 2018-06-21 Martin Liska <mliska@suse.cz>
6985 * ipa-pure-const.c (propagate_nothrow): Use
6986 funct_state_summaries->get.
6987 (dump_malloc_lattice): Likewise.
6988 (propagate_malloc): Likewise.
6990 2018-06-21 Richard Biener <rguenther@suse.de>
6992 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
6993 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
6994 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
6996 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
6997 BLOCK_ABSTRACT_ORIGIN unconditionally.
6999 2018-06-21 David Malcolm <dmalcolm@redhat.com>
7001 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
7003 * ipa-reference.c (ipa_reference_c_finalize): Delete
7004 ipa_ref_opt_sum_summaries and set it to NULL.
7006 2018-06-21 Tom de Vries <tdevries@suse.de>
7008 PR tree-optimization/85859
7009 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
7010 test with comment from bb_no_side_effects_p.
7012 2018-06-21 Richard Biener <rguenther@suse.de>
7014 PR tree-optimization/86232
7015 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
7016 max for constant niter.
7018 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
7020 * config/aarch64/aarch64-simd.md
7021 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
7023 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
7025 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
7026 Make opernads of the unspec commutative.
7028 2018-06-21 Richard Biener <rguenther@suse.de>
7030 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
7031 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
7032 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
7033 (vect_analyze_data_ref_dependence): Re-order checks to deal with
7035 (vect_record_base_alignments): Do not record base alignment
7036 for gathers or scatters.
7037 (vect_compute_data_ref_alignment): Drop return value that is always
7038 true. Bail out early for gathers or scatters.
7039 (vect_enhance_data_refs_alignment): Bail out early for gathers
7041 (vect_find_same_alignment_drs): Likewise.
7042 (vect_analyze_data_refs_alignment): Remove dead code.
7043 (vect_slp_analyze_and_verify_node_alignment): Likewise.
7044 (vect_analyze_data_refs): For possible gathers or scatters do
7045 not create an alternate DR, just check their possible validity
7046 and mark them. Adjust DECL_NONALIASED handling to not rely
7048 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
7049 update inits of gathers or scatters.
7050 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
7051 Also copy gather/scatter flag to pattern vinfo.
7053 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
7055 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7056 behavior of vec_packsu (vector unsigned long long, vector unsigned
7057 long long) to match behavior of vec_packs with same signature.
7059 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
7060 Thomas Schwinge <thomas@codesourcery.com>
7061 Cesar Philippidis <cesar@codesourcery.com>
7063 * gimplify.c (gimplify_scan_omp_clauses): Add support for
7064 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7065 (gimplify_adjust_omp_clauses): Likewise.
7066 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
7067 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
7068 (gimplify_omp_target_update): Update handling of acc update and
7070 * omp-low.c (install_var_field): Remove unused parameter
7071 base_pointers_restrict.
7072 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
7073 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
7075 (omp_target_base_pointers_restrict_p): Delete.
7076 (scan_omp_target): Update call to scan_sharing_clauses.
7077 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
7079 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
7080 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7081 (convert_local_omp_clauses): Likewise.
7082 * tree-pretty-print.c (dump_omp_clause): Likewise.
7083 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
7085 (omp_clause_code_name): Likewise.
7087 2018-06-20 Jakub Jelinek <jakub@redhat.com>
7090 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
7093 PR tree-optimization/86231
7094 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
7095 anti-range don't overwrite *vr0min before using it to compute *vr0max.
7097 2018-06-20 Tom de Vries <tdevries@suse.de>
7099 PR tree-optimization/86097
7100 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
7101 iv type if signedness of iv type is not the same as that of *nit.
7103 2018-06-20 Jakub Jelinek <jakub@redhat.com>
7105 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
7106 EDGE_EH edges, verify they are all EDGE_EH.
7108 2018-06-20 Maya Rashish <coypu@sdf.org>
7110 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
7112 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7114 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
7115 * config/aarch64/aarch64.c (xgene1_tunings): Add
7116 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
7117 (aarch64_mode_valid_for_sched_fusion_p):
7118 Allow 16-byte modes.
7119 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
7120 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
7122 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
7124 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
7125 * config/aarch64/iterators.md (VQ2): New mode iterator.
7127 2018-06-20 Martin Liska <mliska@suse.cz>
7129 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7130 Change default ratio from 10 to 8.
7132 2018-06-20 Martin Liska <mliska@suse.cz>
7134 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7136 (bit_test_cluster::find_bit_tests): Likewise.
7137 (switch_decision_tree::analyze_switch_statement): Find clusters.
7138 * tree-switch-conversion.h (struct jump_table_cluster): Document
7141 2018-06-20 Martin Liska <mliska@suse.cz>
7143 * tree-switch-conversion.c (switch_conversion::collect):
7144 Record m_uniq property.
7145 (switch_conversion::expand): Bail out for special conditions.
7146 (group_cluster::~group_cluster): New.
7147 (group_cluster::group_cluster): Likewise.
7148 (group_cluster::dump): Likewise.
7149 (jump_table_cluster::emit): New.
7150 (switch_decision_tree::fix_phi_operands_for_edges): New.
7151 (struct case_node): Remove struct.
7152 (jump_table_cluster::can_be_handled): New.
7153 (case_values_threshold): Moved to header.
7154 (reset_out_edges_aux): Likewise.
7155 (jump_table_cluster::is_beneficial): New.
7156 (bit_test_cluster::can_be_handled): Likewise.
7157 (add_case_node): Remove.
7158 (bit_test_cluster::is_beneficial): New.
7159 (case_bit_test::cmp): New.
7160 (bit_test_cluster::emit): New.
7161 (expand_switch_as_decision_tree_p): Remove.
7162 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
7163 (fix_phi_operands_for_edge): Likewise.
7164 (switch_decision_tree::analyze_switch_statement): New.
7165 (compute_cases_per_edge): Move ...
7166 (switch_decision_tree::compute_cases_per_edge): ... here.
7167 (try_switch_expansion): Likewise.
7168 (switch_decision_tree::try_switch_expansion): Likewise.
7169 (record_phi_operand_mapping): Likewise.
7170 (switch_decision_tree::record_phi_operand_mapping): Likewise.
7171 (emit_case_decision_tree): Likewise.
7172 (switch_decision_tree::emit): Likewise.
7173 (balance_case_nodes): Likewise.
7174 (switch_decision_tree::balance_case_nodes): Likewise.
7175 (dump_case_nodes): Likewise.
7176 (switch_decision_tree::dump_case_nodes): Likewise.
7177 (emit_jump): Likewise.
7178 (switch_decision_tree::emit_jump): Likewise.
7179 (emit_cmp_and_jump_insns): Likewise.
7180 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
7181 (emit_case_nodes): Likewise.
7182 (switch_decision_tree::emit_case_nodes): Likewise.
7183 (conditional_probability): Remove.
7184 * tree-switch-conversion.h (enum cluster_type): New.
7186 (struct cluster): Likewise.
7187 (cluster::cluster): Likewise.
7188 (struct simple_cluster): Likewise.
7189 (simple_cluster::simple_cluster): Likewise.
7190 (struct group_cluster): Likewise.
7191 (struct jump_table_cluster): Likewise.
7192 (struct bit_test_cluster): Likewise.
7193 (struct min_cluster_item): Likewise.
7194 (struct case_tree_node): Likewise.
7195 (case_tree_node::case_tree_node): Likewise.
7196 (jump_table_cluster::case_values_threshold): Likewise.
7197 (struct case_bit_test): Likewise.
7198 (struct switch_decision_tree): Likewise.
7199 (struct switch_conversion): Likewise.
7200 (switch_decision_tree::reset_out_edges_aux): Likewise.
7202 2018-06-20 Martin Liska <mliska@suse.cz>
7204 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
7205 (hoist_edge_and_branch_if_true): Likewise.
7206 (expand_switch_using_bit_tests_p): Likewise.
7207 (struct case_bit_test): Likewise.
7208 (case_bit_test_cmp): Likewise.
7209 (emit_case_bit_tests): Likewise.
7210 (switch_conversion::switch_conversion): New class.
7211 (struct switch_conv_info): Remove old struct.
7212 (collect_switch_conv_info): More to ...
7213 (switch_conversion::collect): ... this.
7214 (check_range): Likewise.
7215 (switch_conversion::check_range): Likewise.
7216 (check_all_empty_except_final): Likewise.
7217 (switch_conversion::check_all_empty_except_final): Likewise.
7218 (check_final_bb): Likewise.
7219 (switch_conversion::check_final_bb): Likewise.
7220 (create_temp_arrays): Likewise.
7221 (switch_conversion::create_temp_arrays): Likewise.
7222 (free_temp_arrays): Likewise.
7223 (gather_default_values): Likewise.
7224 (switch_conversion::gather_default_values): Likewise.
7225 (build_constructors): Likewise.
7226 (switch_conversion::build_constructors): Likewise.
7227 (constructor_contains_same_values_p): Likewise.
7228 (switch_conversion::contains_same_values_p): Likewise.
7229 (array_value_type): Likewise.
7230 (switch_conversion::array_value_type): Likewise.
7231 (build_one_array): Likewise.
7232 (switch_conversion::build_one_array): Likewise.
7233 (build_arrays): Likewise.
7234 (switch_conversion::build_arrays): Likewise.
7235 (gen_def_assigns): Likewise.
7236 (switch_conversion::gen_def_assigns): Likewise.
7237 (prune_bbs): Likewise.
7238 (switch_conversion::prune_bbs): Likewise.
7239 (fix_phi_nodes): Likewise.
7240 (switch_conversion::fix_phi_nodes): Likewise.
7241 (gen_inbound_check): Likewise.
7242 (switch_conversion::gen_inbound_check): Likewise.
7243 (process_switch): Use the newly created class.
7244 (switch_conversion::expand): New.
7245 (switch_conversion::~switch_conversion): New.
7246 * tree-switch-conversion.h: New file.
7248 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7250 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
7251 tree-vect-patterns.c.
7252 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
7253 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
7254 (vect_recog_sad_pattern): Likewise.
7255 (vect_recog_widen_sum_pattern): Likewise.
7256 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
7257 (vect_recog_widen_shift_pattern): Remove the type_in argument.
7258 (vect_recog_rotate_pattern): Likewise.
7259 (vect_recog_mult_pattern): Likewise.
7260 (vect_recog_vector_vector_shift_pattern): Likewise.
7261 (vect_recog_divmod_pattern): Likewise.
7262 (vect_recog_mixed_size_cond_pattern): Likewise.
7263 (vect_recog_bool_pattern): Likewise.
7264 (vect_recog_mask_conversion_pattern): Likewise.
7265 (vect_try_gather_scatter_pattern): Likewise.
7266 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
7267 (vect_recog_over_widening_pattern): Likewise.
7268 (vect_recog_gather_scatter_pattern): Likewise.
7269 (vect_recog_func_ptr): Move from tree-vectorizer.h
7270 (vect_vect_recog_func_ptrs): Move further down the file.
7271 (vect_recog_func): Likewise. Remove the third argument.
7272 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
7273 (vect_pattern_recog_1): Expect the pattern function to do any
7274 necessary target tests. Also expect it to provide a vector type.
7275 Remove the type_in handling.
7277 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7279 * tree-vect-patterns.c (vect_pattern_detected): New function.
7280 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
7281 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
7282 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
7283 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
7284 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
7285 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
7286 (vect_recog_mask_conversion_pattern)
7287 (vect_try_gather_scatter_pattern): Likewise.
7289 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7291 * tree-vect-patterns.c (vect_get_internal_def): New function.
7292 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7293 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
7294 (search_type_for_mask_1): Use it.
7296 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7298 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
7299 redundant WIDEN_SUM_EXPR handling.
7300 (vect_recog_sad_pattern): Likewise.
7302 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7304 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
7305 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
7306 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
7307 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
7308 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
7310 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7312 * tree-vect-stmts.c (vectorizable_call): Make sure that we
7313 use the stmt_vec_info of the original bb statement for the
7314 new zero assignment, even if the call is part of a pattern.
7316 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7318 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
7319 that the sequence is attached to the original statement rather
7320 than the pattern statement.
7321 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
7322 PATTERN_DEF_SEQ from the original statement rather than
7323 the main pattern statement.
7324 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
7325 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
7326 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
7328 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7330 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
7331 definition statements before the early exit for statements that aren't
7333 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
7335 (vect_transform_loop): ...here. Process pattern definition
7336 statements without first checking whether the main pattern
7337 statement is live or relevant.
7339 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
7341 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
7342 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
7344 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
7346 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
7347 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
7348 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
7349 (expand_block_compare): Change select_block_compare_mode call.
7350 (expand_strncmp_align_check): Use new functions, fix comment.
7351 (emit_final_str_compare_gpr): New function.
7352 (expand_strn_compare): Refactor and clean up code.
7353 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
7355 2018-06-19 Tony Reix <tony.reix@atos.com>
7356 Damien Bergamini <damien.bergamini@atos.com>
7357 David Edelsohn <dje.gcc@gmail.com>
7359 * collect2.c (static_obj): New variable.
7360 (static_libs): New variable.
7361 (is_in_list): Uncomment declaration.
7362 (main): Track AIX libraries linked statically.
7363 (is_in_list): Uncomment definition.
7364 (scan_prog_file): Don't add AIX shared libraries initializer
7365 to constructor list if linking statically.
7367 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
7369 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
7371 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
7373 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
7375 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
7378 2018-06-19 Martin Liska <mliska@suse.cz>
7380 * config/i386/i386.c (ix86_can_inline_p): Do not use
7381 ipa_fn_summaries::get_create.
7382 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
7384 (devirtualization_time_bonus): Likewise.
7385 (ipcp_propagate_stage): Likewise.
7386 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
7387 (edge_set_predicate): Likewise.
7388 (evaluate_conditions_for_known_args): Likewise.
7389 (evaluate_properties_for_edge): Likewise.
7390 (ipa_call_summary::reset): Tranform to ...
7391 (ipa_call_summary::~ipa_call_summary): ... this.
7392 (ipa_fn_summary::reset): Transform to ...
7393 (ipa_fn_summary::~ipa_fn_summary): ... this.
7394 (ipa_fn_summary_t::remove): Rename to ...
7395 (ipa_fn_summary_t::remove_callees): ... this.
7396 (ipa_fn_summary_t::duplicate): Use placement new
7397 instead of memory copy.
7398 (ipa_call_summary_t::duplicate): Likewise.
7399 (ipa_call_summary_t::remove): Remove.
7400 (dump_ipa_call_summary): Change get_create to get.
7401 (ipa_dump_fn_summary): Dump only when summary exists.
7402 (analyze_function_body): Use symbol_summary::get instead
7404 (compute_fn_summary): Likewise.
7405 (estimate_edge_devirt_benefit): Likewise.
7406 (estimate_edge_size_and_time): Likewise.
7407 (inline_update_callee_summaries): Likewise.
7408 (remap_edge_change_prob): Likewise.
7409 (remap_edge_summaries): Likewise.
7410 (ipa_merge_fn_summary_after_inlining): Likewise.
7411 (write_ipa_call_summary): Likewise.
7412 (ipa_fn_summary_write): Likewise.
7413 (ipa_free_fn_summary): Likewise.
7414 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
7415 (struct ipa_call_summary): Likewise.
7416 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
7418 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
7419 (estimate_size_after_inlining): Likewise.
7420 (estimate_growth): Likewise.
7421 (growth_likely_positive): Likewise.
7422 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
7423 (inline_call): Likewise.
7424 * ipa-inline.c (caller_growth_limits): Likewise.
7425 (can_inline_edge_p): Likewise.
7426 (can_inline_edge_by_limits_p): Likewise.
7427 (compute_uninlined_call_time): Likewise.
7428 (compute_inlined_call_time): Likewise.
7429 (want_inline_small_function_p): Likewise.
7430 (edge_badness): Likewise.
7431 (update_caller_keys): Likewise.
7432 (update_callee_keys): Likewise.
7433 (inline_small_functions): Likewise.
7434 (inline_to_all_callers_1): Likewise.
7435 (dump_overall_stats): Likewise.
7436 (early_inline_small_functions): Likewise.
7437 (early_inliner): Likewise.
7438 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
7439 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7440 * ipa-pure-const.c (malloc_candidate_p): Likewise.
7441 * ipa-split.c (execute_split_functions): Likewise.
7442 * symbol-summary.h: Likewise.
7443 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
7445 2018-06-19 Richard Biener <rguenther@suse.de>
7447 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
7448 (vectorize_loops): ... here. Fix dbgcnt handling.
7449 (try_vectorize_loop): Wrap try_vectorize_loop_1.
7451 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
7454 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
7455 ieee128 argument takes up only one (vector) register, not two (floating
7458 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
7460 * gimplify.c (gimplify_init_constructor): Really never clear for an
7461 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
7463 2018-06-19 Richard Biener <rguenther@suse.de>
7465 PR tree-optimization/86179
7466 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
7467 after failed recognition.
7469 2018-06-18 Martin Sebor <msebor@redhat.com>
7472 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
7473 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
7474 Handle integer subtraction.
7475 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
7476 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
7478 2018-06-18 David Malcolm <dmalcolm@redhat.com>
7480 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
7481 param from rtx to rtx_insn *.
7482 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
7484 (frv_ifcvt_modify_insn): Likwise.
7485 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
7486 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
7487 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
7488 as_a <rtx_insn *> cast to local "unprotected_region" once
7489 it's been established that it's not NULL or pc_rtx.
7490 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
7491 param "sethi" from rtx to rtx_insn *.
7492 (nds32_group_float_insns): Likewise for param "insn".
7493 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
7495 (vax_output_int_subtract): Likewise.
7496 * config/vax/vax.c (vax_output_int_add): Likewise for param
7498 (vax_output_int_subtract): Likewise.
7499 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
7500 (emit_pattern_after): Likewise for param "after".
7501 (emit_insn_after): Likewise.
7502 (emit_jump_insn_after): Likewise.
7503 (emit_call_insn_after): Likewise.
7504 (emit_debug_insn_after): Likewise.
7505 (emit_pattern_before): Likewise for param "before".
7506 (emit_insn_before): Likewise.
7507 (emit_jump_insn_before): Likewise.
7508 * final.c (get_insn_template): Likewise for param "insn", removing
7510 * output.h (get_insn_template): Likewise for 2nd param.
7511 * rtl.h (emit_insn_before): Likewise.
7512 (emit_jump_insn_before): Likewise.
7513 (emit_debug_insn_before_noloc): Likewise.
7514 (emit_insn_after): Likewise.
7515 (emit_jump_insn_after): Likewise.
7516 (emit_call_insn_after): Likewise.
7517 (emit_debug_insn_after): Likewise.
7518 (set_insn_deleted): Likewise for param.
7520 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
7523 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
7524 floating point modes, so that IFmode is numerically greater than
7525 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
7526 to declare the ordering. This prevents IFmode from being
7527 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
7528 machine. Include rs6000-modes.h to share the fractional values
7529 between genmodes* and the rest of the compiler.
7533 * config/rs6000/rs6000-modes.h: New file.
7534 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
7535 meaning of rs6000_long_double_size so that 126..128 selects an
7536 appropriate 128-bit floating point type.
7537 (rs6000_option_override_internal): Likewise.
7538 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
7539 (TARGET_LONG_DOUBLE_128): Change the meaning of
7540 rs6000_long_double_size so that 126..128 selects an appropriate
7541 128-bit floating point type.
7542 (LONG_DOUBLE_TYPE_SIZE): Update comment.
7543 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
7544 source and destination to match the standard usage.
7545 (truncifkf2): Likewise.
7546 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
7547 ISA 2.07 to use an explicit clobber, instead of passing in a
7549 (copysign<mode>3_soft): Likewise.
7551 2018-06-18 David Malcolm <dmalcolm@redhat.com>
7553 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
7554 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
7555 (vect_slp_analyze_instance_dependence): Likewise.
7556 (vect_enhance_data_refs_alignment): Likewise.
7557 (vect_analyze_data_refs_alignment): Likewise.
7558 (vect_slp_analyze_and_verify_instance_alignment
7559 (vect_analyze_data_ref_accesses): Likewise.
7560 (vect_prune_runtime_alias_test_list): Likewise.
7561 (vect_analyze_data_refs): Likewise.
7562 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
7563 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
7564 (vect_analyze_scalar_cycles_1): Likewise.
7565 (vect_get_loop_niters): Likewise.
7566 (vect_analyze_loop_form_1): Likewise.
7567 (vect_update_vf_for_slp): Likewise.
7568 (vect_analyze_loop_operations): Likewise.
7569 (vect_analyze_loop): Likewise.
7570 (vectorizable_induction): Likewise.
7571 (vect_transform_loop): Likewise.
7572 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
7573 * tree-vect-slp.c (vect_analyze_slp): Likewise.
7574 (vect_make_slp_decision): Likewise.
7575 (vect_detect_hybrid_slp): Likewise.
7576 (vect_slp_analyze_operations): Likewise.
7577 (vect_slp_bb): Likewise.
7578 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
7579 (vectorizable_bswap): Likewise.
7580 (vectorizable_call): Likewise.
7581 (vectorizable_simd_clone_call): Likewise.
7582 (vectorizable_conversion): Likewise.
7583 (vectorizable_assignment): Likewise.
7584 (vectorizable_shift): Likewise.
7585 (vectorizable_operation): Likewise.
7586 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
7588 2018-06-18 Martin Sebor <msebor@redhat.com>
7590 PR tree-optimization/81384
7591 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
7592 * builtins.c (expand_builtin_strnlen): New function.
7593 (expand_builtin): Call it.
7594 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
7595 * builtins.def (BUILT_IN_STRNLEN): New.
7596 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
7597 Warn for bounds in excess of maximum object size.
7598 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
7599 single-value ranges. Handle strnlen.
7600 (handle_builtin_strlen): Handle strnlen.
7601 (strlen_check_and_optimize_stmt): Same.
7602 * doc/extend.texi (Other Builtins): Document strnlen.
7604 2018-06-18 Maya Rashish <coypu@sdf.org>
7606 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
7607 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
7608 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
7610 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
7612 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
7614 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7616 * tree.c (escaped_string::escape): Replace cast to char * by
7617 const_cast<char *> (unescaped).
7619 2018-06-18 Nick Clifton <nickc@redhat.com>
7622 * tree.c (escaped_string): New class. Converts an unescaped
7623 string into its escaped equivalent.
7624 (warn_deprecated_use): Use the new class to convert the
7625 deprecation message, if present.
7626 (test_escaped_strings): New self test.
7627 (test_c_tests): Add test_escaped_strings.
7628 * doc/extend.texi (deprecated): Add a note that the
7629 deprecation message is affected by the -fmessage-length
7630 option, and that control characters will be escaped.
7631 (#pragma GCC error): Document this pragma.
7632 (#pragma GCC warning): Likewise.
7633 * doc/invoke.texi (-fmessage-length): Document this option's
7634 effect on the #warning and #error preprocessor directives and
7635 the deprecated attribute.
7637 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
7639 * tree.c (decl_value_expr_lookup): Revert latest change.
7640 (decl_value_expr_insert): Likewise.
7642 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
7644 * gimplify.c (nonlocal_vlas): Delete.
7645 (nonlocal_vla_vars): Likewise.
7646 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
7648 (gimplify_body): Do not create and destroy nonlocal_vlas.
7649 * tree-nested.c: Include diagnostic.h.
7650 (use_pointer_in_frame): Tweak.
7651 (lookup_field_for_decl): Add assertion and declare the transformation.
7652 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
7653 internal error when the reference is in a wrong context. Do not
7654 create a debug decl by default.
7655 (note_nonlocal_block_vlas): Delete.
7656 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
7657 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
7658 create a debug decl by default.
7659 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
7660 call is in a wrong context.
7661 (fixup_vla_decls): New function.
7662 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
7663 debug variables were created.
7664 * tree.c (decl_value_expr_lookup): Add checking assertion.
7665 (decl_value_expr_insert): Likewise.
7667 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
7670 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
7671 * tree-scalar-evolution.c (interpret_expr): Likewise.
7672 (expression_expensive_p): Likewise.
7673 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
7674 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
7675 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
7676 (ssa_defined_by_minus_one_stmt_p): New.
7678 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
7681 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
7682 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
7683 * dojump.c (do_jump): Likewise.
7684 * expr.c (expand_expr_real_2): Check operand type's sign.
7685 * fold-const.c (const_unop): Handle ABSU_EXPR.
7686 (fold_abs_const): Likewise.
7687 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
7688 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
7689 (strip_sign_op_1): Likesise.
7690 * match.pd: Add new pattern to generate ABSU_EXPR.
7691 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
7692 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
7693 * tree-eh.c (operation_could_trap_helper_p): Likewise.
7694 * tree-inline.c (estimate_operator_cost): Likewise.
7695 * tree-pretty-print.c (dump_generic_node): Likewise.
7696 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
7697 * tree.def (ABSU_EXPR): New.
7699 2018-06-16 Jakub Jelinek <jakub@redhat.com>
7702 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
7703 documented as preserved for backward compatibility only.
7704 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
7706 PR rtl-optimization/86108
7707 * bb-reorder.c (create_forwarder_block): Renamed to ...
7708 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
7709 jump from new landing pad to the second part.
7710 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
7713 2018-06-15 Jakub Jelinek <jakub@redhat.com>
7716 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
7717 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
7718 Only call store_expr for halves if the mode is the same.
7721 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
7722 Fix up comment formatting.
7724 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
7726 * typed-splay-tree.h (typed_splay_tree::remove): New function.
7727 (typed_splay_tree::closure,
7728 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
7729 (typed_splay_tree::typed_splay_tree,
7730 typed_splay_tree::operator =): Declared private.
7731 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
7732 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
7733 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
7734 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
7735 typed_splay_tree::splay_tree_splay,
7736 typed_splay_tree::splay_tree_foreach_helper,
7737 typed_splay_tree::splay_tree_insert,
7738 typed_splay_tree::splay_tree_remove,
7739 typed_splay_tree::splay_tree_lookup,
7740 typed_splay_tree::splay_tree_predecessor,
7741 typed_splay_tree::splay_tree_successor,
7742 typed_splay_tree::splay_tree_min,
7743 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
7744 (typed_splay_tree::root, typed_splay_tree::comp,
7745 typed_splay_tree::delete_key,
7746 typed_splay_tree::delete_value): New data members.
7747 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
7748 typed_splay_tree::remove.
7750 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
7752 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
7753 -mginv and -mno-ginv to the assembler.
7754 * config/mips/mips.opt (-mcrc): New option.
7756 * doc/invoke.text (-mcrc): Document.
7759 2018-06-15 Nick Clifton <nickc@redhat.com>
7762 * tree.c (escaped_string): New class. Converts an unescaped
7763 string into its escaped equivalent.
7764 (warn_deprecated_use): Use the new class to convert the
7765 deprecation message, if present.
7766 (test_escaped_strings): New self test.
7767 (test_c_tests): Add test_escaped_strings.
7768 * doc/extend.texi (deprecated): Add a note that the
7769 deprecation message is affected by the -fmessage-length
7770 option, and that control characters will be escaped.
7771 (#pragma GCC error): Document this pragma.
7772 (#pragma GCC warning): Likewise.
7773 * doc/invoke.texi (-fmessage-length): Document this option's
7774 effect on the #warning and #error preprocessor directives and
7775 the deprecated attribute.
7777 2018-06-15 Richard Biener <rguenther@suse.de>
7779 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
7780 here, also noting vector size used.
7781 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
7782 size used in MSG_OPTIMIZED_LOCATIONS dump.
7783 (pass_slp_vectorize::execute): Adjust.
7785 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
7788 * config/arc/arc.c (arc_return_address_register): Fix
7791 2018-06-15 Richard Biener <rguenther@suse.de>
7794 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
7795 leave useless conversion stripping to force_gimple_operand_gsi.
7796 (gimplify_build2): Likewise.
7797 (gimplify_build1): Likewise.
7799 2018-06-15 Richard Biener <rguenther@suse.de>
7802 * tree-cfg.c (move_stmt_op): unshare invariant addresses
7803 before adjusting their block.
7805 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
7807 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
7808 multilibs for *-*-rtems*.
7809 * config/riscv/t-rtems: New file.
7811 2018-06-14 Jakub Jelinek <jakub@redhat.com>
7814 * match.pd ((A +- CST1) +- CST2): Punt if last resort
7815 unsigned_type_for returns NULL.
7818 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
7819 subregs of multi-word pseudos unless the float mode has word size.
7821 2018-06-14 Richard Biener <rguenther@suse.de>
7824 * tree-vect-generic.c (build_word_mode_vector_type): Remove
7825 duplicate and harmful type_hash_canon.
7826 * tree.c (type_hash_canon): Assert we didn't find ourselves.
7828 2018-06-14 Richard Biener <rguenther@suse.de>
7831 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
7834 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
7836 * config/rtems.h (STDINT_LONG32): Define.
7838 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
7839 Prachi Godbole <prachi.godbole@imgtec.com>
7841 * config/mips/mips-cpus.def: Define P6600.
7842 * config/mips/mips-tables.opt: Regenerate.
7843 * config/mips/mips.c (mips_ucbranch_type): New enum.
7844 (mips_rtx_cost_data): Add support for P6600.
7845 (mips_issue_rate): Likewise.
7846 (mips_multipass_dfa_lookahead): Likewise.
7847 (mips_avoid_hazard): Likewise.
7848 (mips_reorg_process_insns): Likewise.
7849 (mips_classify_branch_p6600): New function.
7850 * config/mips/mips.h (TUNE_P6600): New define.
7851 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
7852 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
7853 * config/mips/mips.md: Include p6600.md.
7854 (processor): Add p6600.
7855 * config/mips/p6600.md: New file.
7856 * doc/invoke.texi: Add p6600 to supported architectures.
7858 2018-06-13 Martin Sebor <msebor@redhat.com>
7860 PR tree-optimization/86114
7861 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
7863 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
7865 2018-06-13 Richard Biener <rguenther@suse.de>
7867 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
7868 Properly set vector type of the intermediate stmt.
7869 * tree-vect-stmts.c (vectorizable_operation): The destination
7870 var always has vectype_out type.
7872 2018-06-13 Jeff Law <law@redhat.com>
7874 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
7875 integer 0 for argument to print_rtl_with_bb.
7876 (rl78_reorg): Likewise.
7878 2018-06-13 David Malcolm <dmalcolm@redhat.com>
7880 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
7881 from rtx to rtx_insn *.
7882 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
7884 (add_sched_insns_for_speculation): Likewise for local "target",
7885 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
7886 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
7887 from rtx_insn ** to rtx_code_label **.
7888 (reorg_emit_nops): Likewise.
7889 (c6x_reorg): Likewise for local "call_labels".
7890 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
7892 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
7893 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
7894 the loops over LABEL_REFS.
7895 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
7897 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
7898 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
7899 (split_branches): Strengthen local "olabel" from rtx to
7900 rtx_insn *, adding a safe_as_a cast.
7901 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
7903 (add_insn_after): Likewise for first two params.
7904 (add_insn_before): Likewise.
7905 (remove_insn): Likewise for param.
7906 (emit_pattern_before_noloc): Likewise for second and third params.
7907 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
7908 (emit_call_insn_before_noloc): Likewise.
7909 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
7911 (emit_barrier_before): Likewise.
7912 (emit_label_before): Strengthen "label" param from "rtx" to
7913 "rtx_code_label *". Strengthen "before" param from "rtx" to
7915 (emit_insn_after_1): Strengthen "after" param from "rtx" to
7917 (emit_pattern_after_noloc): Likewise.
7918 (emit_insn_after_noloc): Likewise.
7919 (emit_jump_insn_after_noloc): Likewise.
7920 (emit_call_insn_after_noloc): Likewise.
7921 (emit_debug_insn_after_noloc): Likewise.
7922 (emit_barrier_after): Likewise.
7923 (emit_label_after): Likewise for both params.
7924 (emit_pattern_after_setloc): Likewise for "after" param. Convert
7925 "loc" param from "int" to "location_t".
7926 (emit_insn_after_setloc): Likewise.
7927 (emit_jump_insn_after_setloc): Likewise.
7928 (emit_call_insn_after_setloc): Likewise.
7929 (emit_debug_insn_after_setloc): Likewise.
7930 (emit_pattern_before_setloc): Likewise for "before" param. Convert
7931 "loc" param from "int" to "location_t".
7932 (emit_pattern_before): Convert NULL_RTX to NULL.
7933 (emit_insn_before_setloc): Convert "loc" param from "int" to
7935 (emit_jump_insn_before_setloc): Likewise.
7936 (emit_call_insn_before_setloc): Likewise.
7937 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
7938 rtx_insn *. Convert "loc" param from "int" to "location_t".
7939 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
7940 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
7941 Convert 3rd param from "int" to "location_t".
7942 (emit_barrier_before, emit_barrier_after, next_real_insn):
7943 Strengthen param from rtx to rtx_insn *.
7944 (emit_label_before): Strengthen 1st param from "rtx" to
7945 "rtx_code_label *". Strengthen 2nd param from "rtx" to
7947 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
7948 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
7949 Strengthen 2nd param from "rtx" to "rtx_insn *".
7950 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
7951 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
7952 Likewise. Convert 3rd param from "int" to "location_t".
7953 (emit_label_after): Strengthen 1st param from "rtx" to
7955 (next_real_insn, remove_insn): Strengthen param from "rtx" to
7957 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
7958 from "rtx" to "rtx_insn *".
7960 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
7962 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
7963 bodies streamed in with -Q.
7964 * dumpfile.c (dump_files): Add lto-stream-out dump file.
7965 * dumpfile.h (tree_dump_index): Add lto_stream_out.
7966 * gimple-streamer-out.c: Include gimple-pretty-print.h
7967 (output_bb): Dump stmts streamed.
7968 * lto-section-out.c: Include print-tree.h
7969 (lto_begin_section): Dump sections created.
7970 (lto_output_decl_index): Dump decl encoded.
7971 * lto-streamer-out.c: Include print-tree.h
7972 (create_output_block): Dump output block created.
7973 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
7974 (output_function): Dump function output.
7975 (output_constructor): Dump constructor streamed.
7976 (write_global_stream): Output indexes encoded.
7977 (produce_asm_for_decls): Dump streams encoded.
7978 * lto-streamer.c (streamer_dump_file): New global var.
7979 * lto-streamer.h (streamer_dump_file): Declare.
7980 * passes.c (ipa_write_summaries): Initialize streamer dump.
7981 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
7984 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
7987 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
7988 offsets for register save directives. Emit a second batch of save
7989 directives, if need be, when the function accesses prior frames.
7991 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7993 * config/arc/fpu.md (fmasf4): Force operand to register.
7994 (fnmasf4): Likewise.
7996 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7998 * config/arc/arc-protos.h (arc_pad_return): Remove.
7999 * config/arc/arc.c (machine_function): Remove force_short_suffix
8001 (arc_print_operand): Adjust printing of '&'.
8002 (arc_verify_short): Remove conditional printing of short suffix.
8003 (arc_final_prescan_insn): Remove reference to size_reason.
8004 (pad_return): New function.
8005 (arc_reorg): Call pad_return.
8006 (arc_pad_return): Remove.
8007 (arc_init_machine_status): Remove reference to force_short_suffix.
8008 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
8009 (attr length): When attribute iscompact is true force to 2
8010 regardless; in the case of maybe check if we want to force the
8011 instruction to have 4 bytes length.
8012 (nopv): Change it to generate 4 byte long nop as well.
8013 (blockage): New pattern.
8014 (simple_return): Remove call to arc_pad_return.
8015 (p_return_i): Likewise.
8017 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8019 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
8021 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8023 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
8026 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8028 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
8029 for ARC700 and ARCv2.
8031 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
8034 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
8035 operands[2] instead of operands[1].
8038 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
8040 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
8041 case, check whether the outer register overlaps an unallocatable
8042 register, not just whether it fits the required class.
8044 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
8046 * poly-int.h (can_div_trunc_p): Add new overload in which all values
8048 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
8049 (memrefs_conflict_p): Likewise.
8050 (init_alias_analysis): Likewise.
8051 * cfgexpand.c (expand_debug_expr): Likewise.
8052 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
8053 * cse.c (fold_rtx): Likewise.
8054 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
8055 * expr.c (emit_block_move_hints): Likewise.
8056 (clear_storage_hints, push_block, emit_push_insn): Likewise.
8057 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
8058 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
8059 (emit_group_store): Likewise.
8060 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
8061 to read the PRE/POST_MODIFY increment.
8062 * calls.c (store_one_arg): Use strip_offset.
8063 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
8065 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
8067 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
8068 (simplify_binary_operation_1): Extend CONST_INT handling to
8070 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
8071 than a HOST_WIDE_INT.
8072 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
8074 (adjust_mems, add_stores): Update accodingly.
8075 (vt_canonicalize_addr): Track polynomial offsets.
8076 (emit_note_insn_var_location): Likewise.
8077 (vt_add_function_parameter): Likewise.
8078 (vt_initialize): Likewise.
8080 2018-06-12 Jeff Law <law@redhat.com>
8082 * config.gcc (alpha*-*-freebsd*): Remove.
8083 * config/alpha/freebsd.h: Remove.
8085 2018-06-12 David Malcolm <dmalcolm@redhat.com>
8088 * spellcheck-tree.c (levenshtein_distance): Rename to...
8089 (get_edit_distance): ...this, and update for underlying renaming.
8090 * spellcheck-tree.h (levenshtein_distance): Rename to...
8091 (get_edit_distance): ...this.
8092 * spellcheck.c (levenshtein_distance): Rename to...
8093 (get_edit_distance): ...this. Convert from Levenshtein distance
8094 to Damerau-Levenshtein distance by supporting transpositions of
8095 adjacent characters. Rename "v1" to "v_next" and "v0" to
8097 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
8098 (selftest::test_edit_distance_unit_test_oneway): ...this, and
8099 update for underlying renaming.
8100 (selftest::levenshtein_distance_unit_test): Rename to...
8101 (selftest::test_get_edit_distance_unit): ...this, and update for
8102 underlying renaming.
8103 (selftest::test_find_closest_string): Add example from PR 69968
8104 where transposition helps
8105 (selftest::test_metric_conditions): Update for renaming.
8106 (selftest::test_metric_conditions): Likewise.
8107 (selftest::spellcheck_c_tests): Likewise.
8108 * spellcheck.h (levenshtein_distance): Rename both overloads to...
8109 (get_edit_distance): ...this.
8110 (best_match::consider): Update for renaming.
8112 2018-06-12 Martin Sebor <msebor@redhat.com>
8114 PR tree-optimization/85259
8115 * builtins.c (compute_objsize): Handle constant offsets.
8116 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
8117 true iff a warning has been issued.
8118 * gimple.h (gimple_nonartificial_location): New function.
8119 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
8120 gimple_nonartificial_location and handle -Wno-system-headers.
8121 (handle_builtin_stxncpy): Same.
8123 2018-06-12 Martin Sebor <msebor@redhat.com>
8126 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
8128 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
8130 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
8131 BUILTIN_VEC_XST entries for pointer to double and long long.
8133 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
8136 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
8138 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
8141 2018-06-12 Martin Liska <mliska@suse.cz>
8143 * doc/options.texi: Document IntegerRange.
8145 2018-06-12 Martin Liska <mliska@suse.cz>
8147 * config/i386/i386.opt: Make MPX-related options as Deprecated.
8148 * opt-functions.awk: Handle Deprecated flag.
8149 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
8151 (read_cmdline_option): Report warning for a deprecated option.
8152 * opts.h (struct cl_option): Add new field cl_deprecated.
8153 (CL_ERR_DEPRECATED): New.
8155 2018-06-12 Martin Liska <mliska@suse.cz>
8157 * doc/options.texi: Document Deprecated option flag.
8159 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8161 * config/arc/arc-arch.h (arc_extras): New enum.
8162 (arc_cpu_t):Add field extra.
8163 (arc_cpu_types): Consider the extras.
8164 * config/arc/arc-cpus.def: Add extras info.
8165 * config/arc/arc-opts.h (processor_type): Consider extra field.
8166 * config/arc/arc.c (arc_override_options): Handle extra field.
8168 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8170 * config/arc/arc-arch.h: Update ARC_OPTX macro.
8171 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
8173 * config/arc/arc.c (arc_init): Update pic warning.
8174 (irq_range): Update irq range parsing warnings.
8175 (arc_override_options): Update various warning messages.
8176 (arc_handle_aux_attribute): Likewise.
8178 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
8180 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
8182 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8184 * doc/sourcebuild.texi: Document usage of line number 0 in verify
8185 compiler messages directives.
8187 2018-06-12 Matthew Fortune <mfortune@gmail.com>
8189 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
8190 * config/mips/mips-tables.opt: Regenerate.
8191 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
8193 * doc/invoke.texi: Document -march=i6500.
8195 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
8197 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
8198 (i6400_gpmul): Add cpu_unit.
8199 (i6400_gpdiv): Likewise.
8200 (i6400_msa_add_d): Update reservations.
8201 (i6400_msa_int_add) Likewise.
8202 (i6400_msa_short_logic3) Likewise.
8203 (i6400_msa_short_logic2) Likewise.
8204 (i6400_msa_short_logic) Likewise.
8205 (i6400_msa_move) Likewise.
8206 (i6400_msa_cmp) Likewise.
8207 (i6400_msa_short_float2) Likewise.
8208 (i6400_msa_div_d) Likewise.
8209 (i6400_msa_long_logic1) Likewise.
8210 (i6400_msa_long_logic2) Likewise.
8211 (i6400_msa_mult) Likewise.
8212 (i6400_msa_long_float2) Likewise.
8213 (i6400_msa_long_float4) Likewise.
8214 (i6400_msa_long_float5) Likewise.
8215 (i6400_msa_long_float8) Likewise.
8216 (i6400_fpu_fadd): Include frint type.
8217 (i6400_fpu_store): New define_insn_reservation.
8218 (i6400_fpu_load): Likewise.
8219 (i6400_fpu_move): Likewise.
8220 (i6400_fpu_fcmp): Likewise.
8221 (i6400_fpu_fmadd): Likewise.
8222 (i6400_int_mult): Include imul3nc type and update reservation.
8223 (i6400_int_div): Include idiv3 type and update reservation.
8224 (i6400_int_load): Update to check type not move_type.
8225 (i6400_int_store): Likewise.
8226 (i6400_int_prefetch): Set zero latency.
8228 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
8230 * gcc.c: Document new %@{...} sequence.
8231 (LINK_COMMAND_SPEC): Use it for the -L switches.
8232 (cpp_unique_options): Use it for the -I switches.
8233 (at_file_argbuf): New global variable.
8234 (in_at_file): Likewise.
8235 (alloc_args): Create at_file_argbuf.
8236 (clear_args): Truncate at_file_argbuf.
8237 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
8238 (open_at_file): New function.
8239 (close_at_file): Likewise.
8240 (create_at_file): Delete.
8241 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
8244 (validate_switches_from_spec): Deal with %@{...} sequence.
8245 (validate_switches): Likewise.
8246 (driver::finalize): Call clear_args.
8248 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
8250 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
8252 2018-06-11 Martin Sebor <msebor@redhat.com>
8254 * doc/invoke.texi (-Wall): List -Wc++17-compat.
8255 (Wno-class-memaccess): Add @opindex.
8256 (Wno-templates, Wno-multiple-inheritance): Same.
8257 (Wno-virtual-inheritance, Wno-namespaces): Same.
8258 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
8259 (Wno-format-overflow, Wno-format-truncation): Same.
8260 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
8261 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
8262 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
8263 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
8264 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
8265 (Wno-misspelled-isr): Same.
8267 2018-06-11 Martin Sebor <msebor@redhat.com>
8269 * PR tree-optimization/86083
8270 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
8272 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
8274 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
8276 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
8279 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
8280 on the correct operand.
8281 (*movdi_internal64): Ditto.
8283 2018-06-11 Martin Liska <mliska@suse.cz>
8285 PR tree-optimization/86089
8286 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
8288 2018-06-11 Julia Koval <julia.koval@intel.com>
8290 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
8291 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
8292 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
8294 2018-06-11 Olivier Hainque <hainque@adacore.com>
8296 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
8297 for Ada with strict dwarf2.
8299 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
8302 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
8305 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
8307 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
8309 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
8311 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
8314 2018-06-08 Martin Liska <mliska@suse.cz>
8316 * tree-cfg.h (debug_function): Fix argument type to match
8319 2018-06-08 Martin Liska <mliska@suse.cz>
8321 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
8322 Remove usage of MPX-related (and removed) fields.
8323 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
8325 2018-06-08 David Malcolm <dmalcolm@redhat.com>
8327 * cfg.c (debug): Use TDF_NONE rather than 0.
8328 * cfghooks.c (debug): Likewise.
8329 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
8330 (struct dump_option_value_info): Convert to...
8331 (struct kv_pair): ...this template type.
8332 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
8334 (optinfo_verbosity_options): Likewise.
8335 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
8337 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
8338 than int for "optgroup_flags" param.
8339 (dump_generic_expr_loc): Use dump_flags_t rather than int for
8341 (dump_dec): Likewise.
8342 (dump_finish): Use TDF_NONE rather than 0.
8343 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
8344 rather than int for "optgroup_flags" param. Use TDF_NONE rather
8345 than 0. Update for change to option_ptr.
8346 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
8347 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
8348 0. Update for changes to optinfo_verbosity_options and
8350 (opt_info_switch_p): Convert optgroup_flags from int to
8352 (dump_basic_block): Use dump_flags_t rather than int
8353 for "dump_kind" param.
8354 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
8355 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
8356 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
8357 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
8358 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
8359 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
8360 TDF_NONE): Convert from macros to...
8361 (enum dump_flag): ...this new enum.
8362 (dump_flags_t): Update to use enum.
8363 (operator|, operator&, operator~, operator|=, operator&=):
8364 Implement for dump_flags_t.
8365 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
8366 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
8367 Convert from macros to...
8368 (enum optgroup_flag): ...this new enum.
8369 (optgroup_flags_t): New typedef.
8370 (operator|, operator|=): Implement for optgroup_flags_t.
8371 (struct dump_file_info): Convert field "alt_flags" to
8372 dump_flags_t. Convert field "optgroup_flags" to
8374 (dump_basic_block): Use dump_flags_t rather than int for param.
8375 (dump_generic_expr_loc): Likewise.
8376 (dump_dec): Likewise.
8377 (dump_register): Convert param "optgroup_flags" to
8379 (opt_info_enable_passes): Likewise.
8380 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
8382 * gimple-pretty-print.c (debug): Likewise.
8383 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
8384 (merged_store_group::apply_stores): Likewise.
8385 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
8386 * gimple.c (verify_gimple_pp): Likewise.
8387 * graphite-poly.c (print_pbb_body): Likewise.
8388 * passes.c (pass_manager::register_one_dump_file): Convert
8389 local "optgroup_flags" to optgroup_flags_t.
8390 * print-tree.c (print_node): Use TDF_NONE rather than 0.
8392 (debug_body): Likewise.
8393 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
8394 to optgroup_flags_t.
8395 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
8397 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
8398 (convert_mult_to_fma): Likewise.
8399 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
8400 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
8401 * tree-vect-data-refs.c (dump_lower_bound): Convert param
8402 "dump_kind" to dump_flags_t.
8404 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
8406 * config/rs6000/rs6000.c (min, max): Delete.
8408 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
8410 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
8411 -mabi=spe and -mabi=no-spe.
8413 2018-06-08 Martin Liska <mliska@suse.cz>
8415 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
8416 where we expect an existing summary.
8418 2018-06-08 Martin Liska <mliska@suse.cz>
8420 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
8421 * ipa-inline.h (estimate_edge_growth): Likewise.
8423 2018-06-08 Martin Liska <mliska@suse.cz>
8425 * cgraph.c (function_version_hasher::hash): Use
8426 cgraph_node::get_uid ().
8427 (function_version_hasher::equal):
8428 * cgraph.h (cgraph_node::get_uid): New method.
8429 * ipa-inline.c (update_caller_keys): Use
8430 cgraph_node::get_uid ().
8431 (update_callee_keys): Likewise.
8432 * ipa-utils.c (searchc): Likewise.
8433 (ipa_reduced_postorder): Likewise.
8434 * lto-cgraph.c (input_node): Likewise.
8435 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
8436 * symbol-summary.h (symtab_insertion): Likewise.
8437 (symtab_removal): Likewise.
8438 (symtab_duplication): Likewise.
8439 * tree-pretty-print.c (dump_function_header): Likewise.
8440 * tree-sra.c (convert_callers_for_node): Likewise.
8442 2018-06-08 Martin Liska <mliska@suse.cz>
8444 * cgraph.c (symbol_table::create_edge): Always assign a new
8446 (symbol_table::free_edge): Do not recycle numbers.
8447 * cgraph.h (cgraph_edge::get): New method.
8448 * symbol-summary.h (symtab_removal): Use it.
8449 (symtab_duplication): Likewise.
8450 (call_summary::hashable_uid): Remove.
8452 2018-06-08 Martin Liska <mliska@suse.cz>
8454 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
8455 (initialize_growth_caches): Remove.
8456 (free_growth_caches): Likewise.
8457 (do_estimate_edge_time): Use edge_growth_cache.
8458 (do_estimate_edge_size): Likewise.
8459 (do_estimate_edge_hints): Likewise.
8460 * ipa-inline.c (reset_edge_caches): Likewise.
8461 (recursive_inlining): Likewise.
8462 (inline_small_functions): Likewise.
8463 * ipa-inline.h (initialize_growth_caches): Remove.
8464 (estimate_edge_size): Likewise.
8465 (estimate_edge_time): Likewise.
8466 (estimate_edge_hints): Likewise.
8467 (reset_edge_growth_cache): Likewise.
8468 * symbol-summary.h (call_summary::remove): New method.
8470 2018-06-08 Martin Liska <mliska@suse.cz>
8472 * ipa-cp.c (class edge_clone_summary): New summary.
8473 (grow_edge_clone_vectors): Remove.
8474 (ipcp_edge_duplication_hook): Remove.
8475 (class edge_clone_summary_t): New call_summary class.
8476 (ipcp_edge_removal_hook): Remove.
8477 (edge_clone_summary_t::duplicate): New function.
8478 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
8479 (create_specialized_node): Likewise.
8480 (ipcp_driver): Initialize edge_clone_summaries and do not
8483 2018-06-08 Martin Liska <mliska@suse.cz>
8485 * symbol-summary.h (get): New function.
8486 (call_summary::m_initialize_when_cloning): New class member.
8488 2018-06-08 Martin Liska <mliska@suse.cz>
8490 * cgraph.c (cgraph_node::remove): Do not recycle uid.
8491 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
8492 (symbol_table::allocate_cgraph_symbol): Do not set uid.
8493 * passes.c (uid_hash_t): Record removed_nodes by their uids.
8494 (remove_cgraph_node_from_order): Use the removed_nodes set.
8495 (do_per_function_toporder): Likwise.
8496 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
8497 instead of summary_uid.
8498 (symtab_removal): Likewise.
8499 (symtab_duplication): Likewise.
8501 2018-06-08 Martin Liska <mliska@suse.cz>
8503 * ipa-cp.c (ipcp_store_bits_results): Use
8504 ipcp_transformation_sum.
8505 (ipcp_store_vr_results): Likewise.
8506 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
8508 (ipcp_transformation_initialize): ... this.
8509 (ipa_set_node_agg_value_chain):
8510 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
8511 (write_ipcp_transformation_info): Likewise.
8512 (read_ipcp_transformation_info): Likewise.
8513 (ipcp_update_bits): Likewise.
8514 (ipcp_update_vr): Likewise.
8515 (ipcp_transform_function): Likewise.
8516 * ipa-prop.h: Rename ipcp_transformation_summary to
8517 ipcp_transformation.
8518 (class ipcp_transformation_t): New function summary.
8519 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
8520 (ipa_get_agg_replacements_for_node): Likewise.
8522 2018-06-08 Martin Liska <mliska@suse.cz>
8524 * ipa-pure-const.c (struct funct_state_d): Do it class instead
8526 (class funct_state_summary_t): New function_summary class.
8527 (has_function_state): Remove.
8528 (get_function_state): Likewise.
8529 (set_function_state): Likewise.
8530 (add_new_function): Likewise.
8531 (funct_state_summary_t::insert): New function.
8532 (duplicate_node_data): Remove.
8533 (remove_node_data): Remove.
8534 (funct_state_summary_t::duplicate): New function.
8535 (register_hooks): Create new funct_state_summaries.
8536 (pure_const_generate_summary): Use it.
8537 (pure_const_write_summary): Likewise.
8538 (pure_const_read_summary): Likewise.
8539 (propagate_pure_const): Likewise.
8540 (propagate_nothrow): Likewise.
8541 (dump_malloc_lattice): Likewise.
8542 (propagate_malloc): Likewise.
8543 (execute): Do not register hooks, just remove summary
8545 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
8548 2018-06-08 Martin Liska <mliska@suse.cz>
8550 * ipa-reference.c (remove_node_data): Remove.
8551 (duplicate_node_data): Likewise.
8552 (class ipa_ref_var_info_summary_t): New class.
8553 (class ipa_ref_opt_summary_t): Likewise.
8554 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
8555 (get_reference_optimization_summary): Use
8556 ipa_ref_opt_sum_summaries.
8557 (set_reference_vars_info): Remove.
8558 (set_reference_optimization_summary): Likewise.
8559 (ipa_init): Create summaries.
8560 (init_function_info): Use function summary.
8561 (ipa_ref_opt_summary_t::duplicate): New function.
8562 (ipa_ref_opt_summary_t::remove): New function.
8563 (get_read_write_all_from_node): Fix GNU coding style.
8564 (propagate): Use function summary.
8565 (write_node_summary_p): Fix GNU coding style.
8566 (stream_out_bitmap): Likewise.
8567 (ipa_reference_read_optimization_summary): Use function summary.
8568 (ipa_reference_c_finalize): Do not release hooks.
8570 2018-06-08 Martin Liska <mliska@suse.cz>
8572 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
8573 (analyze_function_body): Extract multiple calls of get_create.
8574 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
8575 * ipa-inline.c (recursive_inlining): Use ::get method.
8576 * ipa-inline.h (estimate_edge_growth): Likewise.
8578 2018-06-08 Martin Liska <mliska@suse.cz>
8580 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
8582 (hsa_function_summary::hsa_function_summary): Use the new enum
8584 (hsa_gpu_implementation_p): Use hsa_summaries::get.
8585 * hsa-gen.c (hsa_get_host_function): Likewise.
8586 (get_brig_function_name): Likewise.
8587 * ipa-hsa.c (process_hsa_functions): Likewise.
8588 (ipa_hsa_write_summary): Likewise.
8589 * symbol-summary.h (symtab_duplication): Use ::get function/
8590 (get): New function.
8592 2018-06-08 Martin Liska <mliska@suse.cz>
8594 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
8596 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
8597 (hsa_register_kernel): Likewise.
8598 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
8599 * hsa-gen.c (hsa_get_host_function): Likewise.
8600 (get_brig_function_name): Likewise.
8601 (generate_hsa): Likewise.
8602 (pass_gen_hsail::execute): Likewise.
8603 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
8604 (devirtualization_time_bonus): Likewise.
8605 (ipcp_propagate_stage): Likewise.
8606 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
8607 (edge_set_predicate): Likewise.
8608 (evaluate_conditions_for_known_args): Likewise.
8609 (evaluate_properties_for_edge): Likewise.
8610 (ipa_fn_summary::reset): Likewise.
8611 (ipa_fn_summary_t::duplicate): Likewise.
8612 (dump_ipa_call_summary): Likewise.
8613 (ipa_dump_fn_summary): Likewise.
8614 (analyze_function_body): Likewise.
8615 (compute_fn_summary): Likewise.
8616 (estimate_edge_devirt_benefit): Likewise.
8617 (estimate_edge_size_and_time): Likewise.
8618 (estimate_calls_size_and_time): Likewise.
8619 (estimate_node_size_and_time): Likewise.
8620 (inline_update_callee_summaries): Likewise.
8621 (remap_edge_change_prob): Likewise.
8622 (remap_edge_summaries): Likewise.
8623 (ipa_merge_fn_summary_after_inlining): Likewise.
8624 (ipa_update_overall_fn_summary): Likewise.
8625 (read_ipa_call_summary): Likewise.
8626 (inline_read_section): Likewise.
8627 (write_ipa_call_summary): Likewise.
8628 (ipa_fn_summary_write): Likewise.
8629 (ipa_free_fn_summary): Likewise.
8630 * ipa-hsa.c (process_hsa_functions): Likewise.
8631 (ipa_hsa_write_summary): Likewise.
8632 (ipa_hsa_read_section): Likewise.
8633 * ipa-icf.c (sem_function::merge): Likewise.
8634 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
8635 (do_estimate_edge_time): Likewise.
8636 (estimate_size_after_inlining): Likewise.
8637 (estimate_growth): Likewise.
8638 (growth_likely_positive): Likewise.
8639 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
8640 (inline_call): Likewise.
8641 * ipa-inline.c (caller_growth_limits): Likewise.
8642 (can_inline_edge_p): Likewise.
8643 (can_inline_edge_by_limits_p): Likewise.
8644 (compute_uninlined_call_time): Likewise.
8645 (compute_inlined_call_time): Likewise.
8646 (want_inline_small_function_p): Likewise.
8647 (edge_badness): Likewise.
8648 (update_caller_keys): Likewise.
8649 (update_callee_keys): Likewise.
8650 (recursive_inlining): Likewise.
8651 (inline_small_functions): Likewise.
8652 (inline_to_all_callers_1): Likewise.
8653 (dump_overall_stats): Likewise.
8654 (early_inline_small_functions): Likewise.
8655 (early_inliner): Likewise.
8656 * ipa-inline.h (estimate_edge_growth): Likewise.
8657 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
8658 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8659 * ipa-prop.h (IPA_NODE_REF): Likewise.
8660 (IPA_EDGE_REF): Likewise.
8661 * ipa-pure-const.c (malloc_candidate_p): Likewise.
8662 (propagate_malloc): Likewise.
8663 * ipa-split.c (execute_split_functions): Likewise.
8664 * symbol-summary.h: Rename get to get_create.
8666 (get_create): Likewise.
8667 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
8669 2018-06-08 Martin Liska <mliska@suse.cz>
8671 * symbol-summary.h (release): Move definition out of class
8673 (symtab_removal): Likewise.
8674 (symtab_duplication): Likewise.
8676 2018-06-08 Martin Liska <mliska@suse.cz>
8678 * symbol-summary.h (function_summary): Move constructor
8679 implementation out of class declaration.
8680 (release): Likewise.
8681 (symtab_insertion): Likewise.
8682 (symtab_removal): Likewise.
8683 (symtab_duplication): Likewise.
8686 2018-06-08 Martin Liska <mliska@suse.cz>
8688 * Makefile.in: Remove support for MPX (macros, related functions,
8689 fields in cgraph_node, ...).
8690 * builtin-types.def (BT_BND): Likewise.
8691 (BT_FN_BND_CONST_PTR): Likewise.
8692 (BT_FN_CONST_PTR_BND): Likewise.
8693 (BT_FN_VOID_PTR_BND): Likewise.
8694 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
8695 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
8696 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
8697 (expand_builtin_mempcpy_with_bounds): Likewise.
8698 (expand_builtin_memset_with_bounds): Likewise.
8699 (expand_builtin_memset_args): Likewise.
8700 (std_expand_builtin_va_start): Likewise.
8701 (expand_builtin): Likewise.
8702 (expand_builtin_with_bounds): Likewise.
8703 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
8704 (DEF_LIB_BUILTIN_CHKP): Likewise.
8705 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
8706 (DEF_CHKP_BUILTIN): Likewise.
8707 (BUILT_IN_MEMCPY): Likewise.
8708 (BUILT_IN_MEMMOVE): Likewise.
8709 (BUILT_IN_MEMPCPY): Likewise.
8710 (BUILT_IN_MEMSET): Likewise.
8711 (BUILT_IN_STPCPY): Likewise.
8712 (BUILT_IN_STRCAT): Likewise.
8713 (BUILT_IN_STRCHR): Likewise.
8714 (BUILT_IN_STRCPY): Likewise.
8715 (BUILT_IN_STRLEN): Likewise.
8716 (BUILT_IN_MEMCPY_CHK): Likewise.
8717 (BUILT_IN_MEMMOVE_CHK): Likewise.
8718 (BUILT_IN_MEMPCPY_CHK): Likewise.
8719 (BUILT_IN_MEMSET_CHK): Likewise.
8720 (BUILT_IN_STPCPY_CHK): Likewise.
8721 (BUILT_IN_STRCAT_CHK): Likewise.
8722 (BUILT_IN_STRCPY_CHK): Likewise.
8723 * calls.c (store_bounds): Likewise.
8724 (emit_call_1): Likewise.
8725 (special_function_p): Likewise.
8726 (maybe_warn_nonstring_arg): Likewise.
8727 (initialize_argument_information): Likewise.
8728 (finalize_must_preallocate): Likewise.
8729 (compute_argument_addresses): Likewise.
8730 (expand_call): Likewise.
8731 * cfgexpand.c (expand_call_stmt): Likewise.
8732 (expand_return): Likewise.
8733 (expand_gimple_stmt_1): Likewise.
8734 (pass_expand::execute): Likewise.
8735 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
8736 (cgraph_node::remove): Likewise.
8737 (cgraph_node::dump): Likewise.
8738 (cgraph_node::verify_node): Likewise.
8739 * cgraph.h (chkp_function_instrumented_p): Likewise.
8740 (symtab_node::get_alias_target): Likewise.
8741 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
8742 (cgraph_local_p): Likewise.
8743 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
8744 (cgraph_edge::rebuild_references): Likewise.
8745 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
8746 (walk_polymorphic_call_targets): Likewise.
8747 (cgraph_node::expand_thunk): Likewise.
8748 (symbol_table::output_weakrefs): Likewise.
8749 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
8750 (ix86_handle_option): Likewise.
8751 * config/i386/constraints.md: Likewise.
8752 * config/i386/i386-builtin-types.def (BND): Likewise.
8756 * config/i386/i386-builtin.def (BDESC_END): Likewise.
8757 (BDESC_FIRST): Likewise.
8759 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
8760 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
8761 * config/i386/i386.c (enum reg_class): Likewise.
8762 (ix86_target_string): Likewise.
8763 (ix86_option_override_internal): Likewise.
8764 (ix86_conditional_register_usage): Likewise.
8765 (ix86_valid_target_attribute_inner_p): Likewise.
8766 (ix86_set_indirect_branch_type): Likewise.
8767 (ix86_set_current_function): Likewise.
8768 (ix86_function_arg_regno_p): Likewise.
8769 (init_cumulative_args): Likewise.
8770 (ix86_function_arg_advance): Likewise.
8771 (ix86_function_arg): Likewise.
8772 (ix86_pass_by_reference): Likewise.
8773 (ix86_function_value_regno_p): Likewise.
8774 (ix86_function_value_1): Likewise.
8775 (ix86_function_value_bounds): Likewise.
8776 (ix86_return_in_memory): Likewise.
8777 (ix86_setup_incoming_vararg_bounds): Likewise.
8778 (ix86_va_start): Likewise.
8779 (indirect_thunk_need_prefix): Likewise.
8780 (print_reg): Likewise.
8781 (ix86_print_operand): Likewise.
8782 (ix86_expand_call): Likewise.
8783 (ix86_output_function_return): Likewise.
8784 (reg_encoded_number): Likewise.
8785 (BDESC_VERIFYS): Likewise.
8786 (ix86_init_mpx_builtins): Likewise.
8787 (ix86_init_builtins): Likewise.
8788 (ix86_emit_cmove): Likewise.
8789 (ix86_emit_move_max): Likewise.
8790 (ix86_expand_builtin): Likewise.
8791 (ix86_builtin_mpx_function): Likewise.
8792 (ix86_get_arg_address_for_bt): Likewise.
8793 (ix86_load_bounds): Likewise.
8794 (ix86_store_bounds): Likewise.
8795 (ix86_load_returned_bounds): Likewise.
8796 (ix86_store_returned_bounds): Likewise.
8797 (ix86_class_likely_spilled_p): Likewise.
8798 (ix86_hard_regno_mode_ok): Likewise.
8799 (x86_order_regs_for_local_alloc): Likewise.
8800 (ix86_mitigate_rop): Likewise.
8801 (ix86_bnd_prefixed_insn_p): Likewise.
8802 (ix86_mpx_bound_mode): Likewise.
8803 (ix86_make_bounds_constant): Likewise.
8804 (ix86_initialize_bounds): Likewise.
8805 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
8806 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
8807 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
8808 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
8809 (TARGET_CHKP_BOUND_MODE): Likewise.
8810 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
8811 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
8812 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
8813 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
8814 * config/i386/i386.h (TARGET_MPX): Likewise.
8815 (TARGET_MPX_P): Likewise.
8816 (VALID_BND_REG_MODE): Likewise.
8817 (FIRST_BND_REG): Likewise.
8818 (LAST_BND_REG): Likewise.
8819 (enum reg_class): Likewise.
8820 (BND_REG_P): Likewise.
8821 (BND_REGNO_P): Likewise.
8822 (BNDmode): Likewise.
8823 (ADJUST_INSN_LENGTH): Likewise.
8824 * config/i386/i386.md: Likewise.
8825 * config/i386/i386.opt: Likewise.
8826 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
8827 (defined): Likewise.
8828 (LINK_MPX): Likewise.
8829 (MPX_SPEC): Likewise.
8830 (LIBMPX_SPEC): Likewise.
8831 (LIBMPXWRAPPERS_SPEC): Likewise.
8832 (CHKP_SPEC): Likewise.
8833 * config/i386/predicates.md: Likewise.
8834 * dbxout.c (dbxout_type): Likewise.
8835 * doc/extend.texi: Likewise.
8836 * doc/invoke.texi: Likewise.
8837 * doc/md.texi: Likewise.
8838 * doc/tm.texi: Likewise.
8839 * doc/tm.texi.in: Likewise.
8840 * dwarf2out.c (is_base_type): Likewise.
8841 (gen_formal_types_die): Likewise.
8842 (gen_subprogram_die): Likewise.
8843 (gen_type_die_with_usage): Likewise.
8844 (gen_decl_die): Likewise.
8845 (dwarf2out_late_global_decl): Likewise.
8846 * expr.c (expand_assignment): Likewise.
8847 (emit_storent_insn): Likewise.
8848 (store_expr_with_bounds): Likewise.
8849 (store_expr): Likewise.
8850 (expand_expr_real_1): Likewise.
8851 * expr.h (store_expr_with_bounds): Likewise.
8852 * function.c (use_register_for_decl): Likewise.
8853 (struct bounds_parm_data): Likewise.
8854 (assign_parms_augmented_arg_list): Likewise.
8855 (assign_parm_find_entry_rtl): Likewise.
8856 (assign_parm_is_stack_parm): Likewise.
8857 (assign_parm_load_bounds): Likewise.
8858 (assign_bounds): Likewise.
8859 (assign_parms): Likewise.
8860 (expand_function_start): Likewise.
8861 * gcc.c (CHKP_SPEC): Likewise.
8862 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
8863 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
8864 (wrestrict_dom_walker::check_call): Likewise.
8865 * gimple.c (gimple_build_call_from_tree): Likewise.
8866 * gimple.h (enum gf_mask): Likewise.
8867 (gimple_call_with_bounds_p): Likewise.
8868 (gimple_call_set_with_bounds): Likewise.
8869 * gimplify.c (gimplify_init_constructor): Likewise.
8870 * ipa-cp.c (initialize_node_lattices): Likewise.
8871 (propagate_constants_across_call): Likewise.
8872 (find_more_scalar_values_for_callers_subset): Likewise.
8873 * ipa-hsa.c (process_hsa_functions): Likewise.
8874 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
8875 * ipa-icf.c (sem_function::merge): Likewise.
8876 * ipa-inline.c (early_inliner): Likewise.
8877 * ipa-pure-const.c (warn_function_noreturn): Likewise.
8878 (warn_function_cold): Likewise.
8879 (propagate_pure_const): Likewise.
8880 * ipa-ref.h (enum GTY): Likewise.
8881 * ipa-split.c (find_retbnd): Likewise.
8882 (consider_split): Likewise.
8883 (split_function): Likewise.
8884 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
8885 * ipa.c (walk_polymorphic_call_targets): Likewise.
8886 (symbol_table::remove_unreachable_nodes): Likewise.
8887 (process_references): Likewise.
8888 (cgraph_build_static_cdtor_1): Likewise.
8889 * lto-cgraph.c (lto_output_node): Likewise.
8890 (output_refs): Likewise.
8891 (compute_ltrans_boundary): Likewise.
8892 (input_overwrite_node): Likewise.
8893 (input_node): Likewise.
8894 (input_cgraph_1): Likewise.
8895 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
8896 * passes.c (pass_manager::execute_early_local_passes): Likewise.
8897 (class pass_chkp_instrumentation_passes): Likewise.
8898 (make_pass_chkp_instrumentation_passes): Likewise.
8899 * passes.def: Likewise.
8900 * rtl.h (struct GTY): Likewise.
8901 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
8902 * stor-layout.c (layout_type): Likewise.
8903 * symtab.c: Likewise.
8904 * target.def: Likewise.
8905 * targhooks.c (default_chkp_bound_type): Likewise.
8906 (default_chkp_bound_mode): Likewise.
8907 (default_builtin_chkp_function): Likewise.
8908 (default_chkp_function_value_bounds): Likewise.
8909 (default_chkp_make_bounds_constant): Likewise.
8910 (default_chkp_initialize_bounds): Likewise.
8911 * targhooks.h (default_chkp_bound_type): Likewise.
8912 (default_chkp_bound_mode): Likewise.
8913 (default_builtin_chkp_function): Likewise.
8914 (default_chkp_function_value_bounds): Likewise.
8915 (default_chkp_make_bounds_constant): Likewise.
8916 (default_chkp_initialize_bounds): Likewise.
8917 * toplev.c (compile_file): Likewise.
8918 (process_options): Likewise.
8919 * tree-core.h (DEF_BUILTIN): Likewise.
8920 (DEF_BUILTIN_CHKP): Likewise.
8921 * tree-inline.c (declare_return_variable): Likewise.
8922 (remap_gimple_stmt): Likewise.
8923 (copy_bb): Likewise.
8924 (initialize_inlined_parameters): Likewise.
8925 (expand_call_inline): Likewise.
8926 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
8927 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
8928 (make_pass_ipa_chkp_produce_thunks): Likewise.
8929 (make_pass_chkp): Likewise.
8930 (make_pass_chkp_opt): Likewise.
8931 (make_pass_chkp_instrumentation_passes): Likewise.
8932 * tree-pretty-print.c (dump_generic_node): Likewise.
8933 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
8934 * tree-ssa-dce.c (propagate_necessity): Likewise.
8935 (eliminate_unnecessary_stmts): Likewise.
8936 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
8937 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
8938 * tree-ssa-sccvn.h: Likewise.
8939 * tree-ssa-strlen.c (get_string_length): Likewise.
8940 (valid_builtin_call): Likewise.
8941 (adjust_last_stmt): Likewise.
8942 (handle_builtin_strchr): Likewise.
8943 (handle_builtin_strcpy): Likewise.
8944 (handle_builtin_stxncpy): Likewise.
8945 (handle_builtin_memcpy): Likewise.
8946 (handle_builtin_strcat): Likewise.
8947 (strlen_check_and_optimize_stmt): Likewise.
8948 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
8949 * tree-streamer-in.c: Likewise.
8950 * tree-streamer.c (record_common_node): Likewise.
8951 * tree.c (tree_code_size): Likewise.
8952 (wide_int_to_tree_1): Likewise.
8953 (type_contains_placeholder_1): Likewise.
8954 (build_common_tree_nodes): Likewise.
8955 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
8956 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
8957 (POINTER_BOUNDS_P): Likewise.
8958 (BOUNDED_TYPE_P): Likewise.
8959 (BOUNDED_P): Likewise.
8960 (CALL_WITH_BOUNDS_P): Likewise.
8961 (pointer_bounds_type_node): Likewise.
8962 * value-prof.c (gimple_ic): Likewise.
8963 * var-tracking.c (vt_add_function_parameters): Likewise.
8964 * varasm.c (make_decl_rtl): Likewise.
8965 (assemble_start_function): Likewise.
8966 (output_constant): Likewise.
8967 (maybe_assemble_visibility): Likewise.
8968 * varpool.c (ctor_for_folding): Likewise.
8969 * chkp-builtins.def: Remove.
8970 * ipa-chkp.c: Remove.
8971 * ipa-chkp.h: Remove.
8972 * rtl-chkp.c: Remove.
8973 * rtl-chkp.h: Remove.
8974 * tree-chkp-opt.c: Remove.
8975 * tree-chkp.c: Remove.
8976 * tree-chkp.h: Remove.
8978 2018-06-07 Carl Love <cel@us.ibm.com>
8980 * config/rs6000/vsx.md (vextract_fp_from_shorth,
8981 vextract_fp_from_shortl): Add BE support.
8983 2018-06-07 Paul Koning <ni1d@arrl.net>
8985 * compare-elim.c (try_merge_compare): Don't merge compare if
8986 address contains a side effect.
8987 (try_eliminate_compare): Likewise.
8989 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
8991 * config.gcc: Support "tremont".
8992 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
8993 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8995 * config/i386/i386.c (m_TREMONT): Define.
8996 (processor_target_table): Add "tremont".
8997 (PTA_TREMONT): Define.
8998 (ix86_lea_outperforms): Add TARGET_TREMONT.
8999 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
9000 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
9001 and M_INTEL_GOLDMONT_PLUS.
9002 (fold_builtin_cpu): Add "tremont".
9003 (ix86_add_stmt_cost): Add TARGET_TREMONT.
9004 (ix86_option_override_internal): Add "tremont".
9005 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
9006 (processor_type): Add PROCESSOR_TREMONT.
9007 * config/i386/x86-tune.def: Add m_TREMONT.
9008 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
9010 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9012 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
9013 symbol defined for msp430i* devices to be lower case.
9015 2018-06-07 Richard Biener <rguenther@suse.de>
9017 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
9018 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
9019 Properly wrap signed arithmetic if overflow wraps.
9021 2018-06-07 Jakub Jelinek <jakub@redhat.com>
9023 PR tree-optimization/69615
9024 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
9025 of a cast from a same precision integral SSA_NAME in a bb dominated
9026 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
9027 cast to utype if rhs2 has already a compatible type.
9029 2018-06-07 Richard Biener <rguenther@suse.de>
9031 PR tree-optimization/85935
9032 * graphite-scop-detection.c (find_params_in_bb): Analyze
9033 condition operands with respect to the correct loop. Assert
9034 the analysis doesn't fail.
9036 2018-06-04 Carl Love <cel@us.ibm.com>
9038 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
9039 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
9040 as it is slightly cheaper.
9041 (first_match_or_eos_index_<mode>):
9042 Calculate index using natural element order.
9043 (first_match_index_<mode>):
9044 Calculate index using natural element order.
9045 (first_match_or_eos_index_<mode>):
9046 Calculate index using natural order.
9047 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
9048 for BE and LE modes.
9049 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
9050 P9V_BUILTIN_VCLZLSBB_V16QI.
9051 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
9054 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
9056 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
9057 indentation and line wrap for many prototypes. Add missing
9058 @smallexample directives around block of prototypes for vec_xl and
9061 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
9063 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
9064 track if we pass or return IEEE 128-bit floating point.
9065 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
9066 C++ mangling that is compatible with GCC 8.1.
9067 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
9068 (init_cumulative_args): Note if we pass or return IEEE 128-bit
9069 floating point types.
9070 (rs6000_function_arg_advance_1): Likewise.
9071 (rs6000_mangle_type): Optionally generate mangled names that match
9072 what GCC 8.1 generated for IEEE 128-bit floating point types.
9073 (rs6000_globalize_decl_name): If we have an external function that
9074 passes or returns IEEE 128-bit types, generate a weak reference
9075 from the mangled name used in GCC 8.1 to the current mangled
9077 (rs6000_init_builtins): Make __ibm128 use the long double type if
9078 long double is IBM extended double. Make __float128 use the long
9079 double type if long double is IEEE 128-bit.
9082 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
9083 macro for __ibm128 built-in functions.
9084 (PACK_IF): Add __ibm128 pack/unpack functions.
9085 (UNPACK_IF): Likewise.
9086 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
9087 enable long double built-in functions if long double is IEEE
9088 128-bit floating point.
9089 (rs6000_invalid_builtin): Update long double built-in function
9091 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
9092 functions, adjust the built-in function to use the long double
9093 built-in function if __ibm128 and long double are the same type.
9094 * doc/extend.texi (PowerPC builtins): Update documention for
9095 __builtin_{,un}pack_longdouble. Add documentation for
9096 __builtin_{,un}pack_ibm128.
9098 2018-06-06 Jim Wilson <jimw@sifive.com>
9100 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
9101 (struct machine_function): New field interrupt_mode.
9102 (riscv_handle_type_attribute): New function. Add forward declaration.
9103 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
9104 (riscv_expand_epilogue): Check interrupt_mode field.
9105 (riscv_set_current_function): Check interrupt attribute args and
9106 set interrupt_mode field.
9107 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
9108 (riscv_sret, riscv_uret): New.
9109 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
9110 new arguments to interrupt attribute.
9112 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
9115 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
9116 Don't handle -mcpu=power8 if -mpower9-vector is also used.
9118 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
9120 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
9121 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
9122 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
9123 several redundant entries.
9125 2018-06-06 David Malcolm <dmalcolm@redhat.com>
9127 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
9128 type from "rtx" to "rtx_insn *".
9129 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
9130 for local "call_insn", removing cast.
9131 (ix86_expand_call): Likewise, introducing a "call_insn" local.
9133 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
9135 PR tree-optimization/86066
9136 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
9137 for BIT_INSERT_EXPR stores.
9139 2018-06-06 Richard Biener <rguenther@suse.de>
9141 PR tree-optimization/86062
9142 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
9143 component refs ontop
9144 of to be offsetted base.
9146 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9148 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
9149 to be static and remove check on interrupt attribute name.
9151 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
9153 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
9154 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
9156 2018-06-05 Steve Ellcey <sellcey@cavium.com>
9159 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
9161 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
9162 Remove second argument, change how error is called.
9163 (aarch64_layout_arg): Remove second argument from
9164 aarch64_err_no_fpadvsimd call.
9165 (aarch64_init_cumulative_args): Ditto.
9166 (aarch64_gimplify_va_arg_expr): Ditto.
9167 * config/aarch64/aarch64.md (mov<mode>): Ditto.
9169 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
9171 * config/i386/i386.md (simple_return_indirect_internal): New expander.
9172 (*simple_return_indirect_internal<mode>): Rename from
9173 simple_return_indirect_internal. Use W mode iterator.
9174 (rstorssp): New expander.
9175 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
9176 (clrssbsy): New expander.
9177 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
9179 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
9181 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
9183 (cmse_check_pointed_object): Likewise.
9185 2018-06-05 Martin Liska <mliska@suse.cz>
9187 PR gcov-profile/47618
9188 * doc/invoke.texi: Document how -fprofile-dir format
9191 2018-06-05 Richard Biener <rguenther@suse.de>
9193 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
9194 removal pretend DOM info isn't available so we do not update
9195 it and only remove edges, not dominated blocks. Actually free
9196 DOM info in case we removed something. Remove unreachable blocks.
9197 (mfb_keep_latches): Work with either DOM info or marked backedges.
9198 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
9199 first. Mark backedges if DOM info isn't available.
9200 (Re-)compute DOM info after cleanup_control_flow_pre.
9202 2018-06-05 Richard Biener <rguenther@suse.de>
9204 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
9205 (locus_discrim_hasher::hash): Adjust.
9206 (locus_discrim_hasher::equal): Likewise.
9207 (next_discriminator_for_locus): Work on line directly.
9208 (same_line_p): Pass in expanded locus1 as well.
9209 (assign_discriminators): Avoid redundant location expansions.
9211 2018-06-05 Richard Biener <rguenther@suse.de>
9213 PR tree-optimization/86046
9214 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
9215 if required after clearing TREE_ADDRESSABLE.
9217 2018-06-05 Richard Biener <rguenther@suse.de>
9219 PR tree-optimization/86047
9220 * tree-ssa-loop.c (for_each_index): Glob handling of all
9221 decls and constants and really handle all of them.
9223 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9226 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
9227 qualifier_void_pointer and qualifier_const_void_pointer.
9228 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
9229 (arm_init_builtins): Handle the above.
9230 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
9231 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
9232 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
9235 2018-06-05 Martin Liska <mliska@suse.cz>
9237 * auto-profile.c (read_autofdo_file): Do not use
9238 gcov_ctr_summary struct.
9239 (afdo_callsite_hot_enough_for_early_inline): Likewise.
9240 * coverage.c (struct counts_entry): Likewise.
9241 (read_counts_file): Read just single summary entry.
9242 (get_coverage_counts): Use gcov_summary struct.
9243 * coverage.h (get_coverage_counts): Likewise.
9244 * gcov-dump.c (dump_working_sets): Likewise.
9245 (tag_summary): Dump just single summary.
9246 * gcov-io.c (gcov_write_summary): Write just histogram
9248 (gcov_read_summary): Read just single summary.
9249 (compute_working_sets): Use gcov_summary struct.
9250 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
9251 of GCOV_COUNTERS_SUMMABLE.
9252 (GCOV_COUNTERS_SUMMABLE): Remove.
9253 (GCOV_FIRST_VALUE_COUNTER): Replace with
9254 GCOV_COUNTER_V_INTERVAL.
9255 (struct gcov_ctr_summary): Remove.
9256 (struct gcov_summary): Directly use fields of former
9258 (compute_working_sets): Use gcov_summary struct.
9259 * gcov.c (read_count_file): Do not use ctrs fields.
9260 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
9262 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
9264 * profile.c: Likewise.
9265 * profile.h: Likewise.
9267 2018-06-05 Martin Liska <mliska@suse.cz>
9269 PR gcov-profile/84846
9270 * gcov.c (output_lines): Print working directory only
9271 in intermediate format.
9273 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
9275 * config/s390/s390-builtin-types.def: Add void function type.
9276 * config/s390/s390-builtins.def: Use the function type for the
9279 2018-06-04 Jim Wilson <jimw@sifive.com>
9281 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
9283 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
9284 and maybe_eh_return. Change regno to unsigned int. Use new args to
9285 handle EH_RETURN_DATA_REGNO registers properly.
9286 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
9287 (riscv_expand_epilogue): Update comment. Change argument name and
9288 type. Update code to use new name and type. Pass new args to
9289 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
9291 * config/riscv/riscv.md (NORMAL_RETURN): New.
9292 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
9293 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
9294 (eh_return): Call gen_eh_return_internal and emit barrier.
9295 (eh_return_internal): Call riscv_expand_epilogue.
9297 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
9299 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
9300 bit_insertion field and declare can_be_merged_into method.
9301 (merged_store_group::can_be_merged_into): New method.
9302 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
9303 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
9304 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
9306 2018-06-04 Richard Biener <rguenther@suse.de>
9308 PR tree-optimization/85955
9309 * builtins.c (fold_builtin_sincos): Convert pointers to
9310 destination to appropriate type before dereferencing.
9312 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
9314 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
9316 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
9318 * expr.c (expand_expr_real_1): Force the operand into memory if
9319 its TYPE_MODE is BLKmode and if there is no integer mode for
9320 the number of bits being extracted.
9322 2018-06-04 Jakub Jelinek <jakub@redhat.com>
9326 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
9327 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
9329 2018-06-04 Richard Biener <rguenther@suse.de>
9331 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
9332 (cleanup_tree_cfg_noloop): ... single caller. Do
9333 start_recording_case_labels later.
9335 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
9337 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
9338 to _IMMINTRIN_H_INCLUDED.
9339 * config/i386/pconfigintrin.h: Ditto.
9340 * config/i386/waitpkgintrin.h: Ditto.
9341 * config/i386/immintrin.h: Add includes for sgxintrin.h,
9342 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
9343 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
9344 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
9345 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
9346 waitpkgintrin.h and cldemoteintrin.h.
9348 2018-06-04 Richard Biener <rguenther@suse.de>
9350 PR tree-optimization/86038
9351 * tracer.c (find_best_successor): Check probability for
9352 being initialized, bail out if not.
9354 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
9357 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
9358 of bits to ignore when comparing architectures.
9360 2018-06-04 Jakub Jelinek <jakub@redhat.com>
9362 PR tree-optimization/69615
9363 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
9364 maximum or minimum of the type, try to merge it also as if
9365 range1 is + [-, x - 1] or + [x + 1, -].
9368 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
9370 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
9372 PR tree-optimization/86034
9373 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
9374 the unsigned bitfield type in a bit insertion sequence if it does not
9375 have a larger precision than the bitfield size.
9376 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
9378 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
9380 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
9382 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
9384 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
9385 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
9386 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
9387 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
9389 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
9391 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
9392 Disable -fdelete-null-pointer-checks for ELF toolchain.
9394 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
9395 Kito Cheng <kito.cheng@gmail.com>
9397 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
9398 (nds32le-*-*, nds32be-*-*): Integrate checking process.
9399 (nds32*-*-*): Add glibc and uclibc conditions.
9400 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
9401 (TARGET_EXCEPT_UNWIND_INFO): Define.
9402 * config/nds32/elf.h: New file.
9403 * config/nds32/linux.h: New file.
9404 * config/nds32/nds32-elf.opt: New file.
9405 * config/nds32/nds32-linux.opt: New file.
9406 * config/nds32/nds32-fp-as-gp.c
9407 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
9408 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
9410 (nds32_asm_file_end): Ditto.
9411 (nds32_print_operand): Ditto.
9412 (nds32_insert_attributes): Ditto.
9413 (nds32_init_libfuncs): New function.
9414 (TARGET_HAVE_TLS): Define.
9415 (TARGET_INIT_LIBFUNCS): Define.
9416 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
9418 (TARGET_ELF): Apply different mcmodel setting.
9419 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
9420 been migrated into elf.h and linux.h files.
9421 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
9422 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
9423 (mcmodel): The content has been migrated into nds32-elf.opt and
9424 nds32-linux.opt files.
9425 * config/nds32/t-elf: New file.
9426 * config/nds32/t-linux: New file.
9428 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
9429 Shiva Chen <shiva0217@gmail.com>
9431 * config/nds32/constants.md (unspec_volatile_element): Add
9432 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
9433 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
9435 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
9436 (make_pass_nds32_fp_as_gp): Declare.
9437 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
9439 (nds32_asm_function_end_prologue): Remove unused asm output.
9440 (nds32_asm_function_begin_epilogue): Remove unused asm output.
9441 (nds32_asm_file_start): Output necessary fp_as_gp information.
9442 (nds32_option_override): Adjust register usage.
9443 (nds32_expand_prologue): Consider fp_as_gp situation.
9444 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
9445 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
9448 (simple_return): Ditto.
9449 (omit_fp_begin): Output special directive for fp_as_gp.
9450 (omit_fp_end): Output special directive for fp_as_gp.
9451 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
9452 mforbid-fp-as-gp): New options.
9454 2018-06-01 Mark Wielaard <mark@klomp.org>
9456 * dwarf2out.c (dwarf2out_finish): Remove generation of
9457 DW_AT_loclists_base.
9459 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
9461 * gimple-ssa-store-merging.c: Include gimple-fold.h.
9462 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
9463 (struct merged_store_group): Add bit_insertion field.
9464 (dump_char_array): Use standard hexadecimal format.
9465 (merged_store_group::merged_store_group): Set bit_insertion to false.
9466 (merged_store_group::apply_stores): Use optimal buffer size. Deal
9467 with BIT_INSERT_EXPR stores. Move up code updating the mask and
9468 also print the mask in the dump file.
9469 (pass_store_merging::gate): Minor tweak.
9470 (imm_store_chain_info::coalesce_immediate): Fix wrong association
9471 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
9472 stores with INTEGER_CST stores.
9473 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
9474 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
9475 and use it throughout. Generate bit insertion sequences if need be.
9476 (pass_store_merging::process_store): Remove redundant condition.
9477 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
9479 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
9481 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
9482 the 128-bit floating point types. Fix function comment.
9484 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9486 * config/aarch64/aarch64-simd.md
9487 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
9489 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
9492 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
9494 PR tree-optimization/85989
9495 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
9497 (backprop::intersect_uses): Check it when deciding whether this
9498 is a backedge reference.
9499 (backprop::process_block): Add each phi to m_visited_phis
9500 after visiting it, then clear it at the end.
9502 2018-06-01 Richard Biener <rguenther@suse.de>
9504 * tree-vectorizer.h (vect_dr_stmt): New function.
9505 (vect_get_load_cost): Adjust.
9506 (vect_get_store_cost): Likewise.
9507 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
9508 Use vect_dr_stmt instead of DR_SMTT.
9509 (vect_record_base_alignments): Likewise.
9510 (vect_calculate_target_alignment): Likewise.
9511 (vect_compute_data_ref_alignment): Likewise and make static.
9512 (vect_update_misalignment_for_peel): Likewise.
9513 (vect_verify_datarefs_alignment): Likewise.
9514 (vector_alignment_reachable_p): Likewise.
9515 (vect_get_data_access_cost): Likewise. Pass down
9516 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
9517 (vect_get_peeling_costs_all_drs): Likewise.
9518 (vect_peeling_hash_get_lowest_cost): Likewise.
9519 (vect_enhance_data_refs_alignment): Likewise.
9520 (vect_find_same_alignment_drs): Likewise.
9521 (vect_analyze_data_refs_alignment): Likewise.
9522 (vect_analyze_group_access_1): Likewise.
9523 (vect_analyze_group_access): Likewise.
9524 (vect_analyze_data_ref_access): Likewise.
9525 (vect_analyze_data_ref_accesses): Likewise.
9526 (vect_vfa_segment_size): Likewise.
9527 (vect_small_gap_p): Likewise.
9528 (vectorizable_with_step_bound_p): Likewise.
9529 (vect_prune_runtime_alias_test_list): Likewise.
9530 (vect_analyze_data_refs): Likewise.
9531 (vect_supportable_dr_alignment): Likewise.
9532 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
9533 (vect_gen_prolog_loop_niters): Likewise.
9534 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
9535 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
9537 (vect_recog_mask_conversion_pattern): Likewise.
9538 (vect_try_gather_scatter_pattern): Likewise.
9539 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
9540 to vect_get_store_cost.
9541 (vect_get_store_cost): Get stmt_info instead of DR.
9542 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
9543 (vect_get_load_cost): Get stmt_info instead of DR.
9545 2018-06-01 Richard Biener <rguenther@suse.de>
9548 * gimple-fold.c (var_decl_component_p): Also allow offsetted
9549 vars wrapped in MEM_REFs.
9551 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
9553 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
9554 Fix subreg tests so that we only return a choice between
9555 GENERAL_REGS and FP_REGS if the original classes included both.
9557 2018-06-01 Richard Biener <rguenther@suse.de>
9560 * tree-ssa-structalias.c (get_function_part_constraint):
9561 Handle NULL fi->decl.
9562 (find_func_aliases_for_call): Properly handle indirect
9563 fi from direct call.
9564 (find_func_clobbers): Likewise.
9565 (ipa_pta_execute): Likewise.
9566 (create_variable_info_for): For functions that are ifunc_resolver
9567 resolve to a varinfo that contains the result of the resolver call.
9568 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
9571 2018-05-31 Michael Collison <michael.collison@arm.com>
9573 * config/aarch64/aarch64.md:
9574 (*fix_to_zero_extenddfdi2): New pattern.
9575 * gcc.target/aarch64/fix_extend1.c: New testcase.
9577 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
9581 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
9582 and BUILT_IN_STRNCMP_EQ.
9583 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
9584 BUILT_IN_STRNCMP_EQ.
9585 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
9586 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
9587 (gimple_fold_builtin): Likewise.
9588 * tree-ssa-strlen.c (compute_string_length): New function.
9589 (determine_min_obsize): New function.
9590 (handle_builtin_string_cmp): New function to handle calls to
9591 string compare functions.
9592 (strlen_optimize_stmt): Add handling to builtin string compare
9594 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
9595 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
9596 * tree.c (build_common_builtin_nodes): Add new defines of
9597 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
9599 2018-05-31 Jakub Jelinek <jakub@redhat.com>
9602 * bb-reorder.c (pass_partition_blocks::gate): Return false for
9603 functions with naked attribute.
9605 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
9607 * config/i386/sse.md (avx_vec_concat<mode>):
9608 Substitute concat_tg_mode mode attribute with xtg_mode.
9609 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
9610 (concat_tg_mode): Remove mode attribute.
9612 2018-05-31 Martin Sebor <msebor@redhat.com>
9615 * calls.c (alloc_max_size): Correct a logic error/typo.
9616 Treat excessive arguments as infinite. Warn for invalid arguments.
9617 * doc/invoke.texi (-Walloc-size-larger-than): Update.
9619 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
9622 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
9623 and movx for Haswell.
9625 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
9626 Cesar Philippidis <cesar@codesourcery.com>
9629 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
9630 when emitting error on private/firstprivate reductions.
9631 * omp-low.c (lower_omp_target): Avoid reference-type processing
9632 on pointers for firstprivate clause.
9634 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
9636 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
9639 * config/aarch64/aarch64-simd.md
9640 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
9641 (aarch64_ld1_x3_<mode>): Likewise
9642 (aarch64_st1x2<VALLDIF:mode>): Likewise
9643 (aarch64_st1_x2_<mode>): Likewise
9644 (aarch64_st1x3<VALLDIF:mode>): Likewise
9645 (aarch64_st1_x3_<mode>): Likewise
9646 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
9647 (vld1_s8_x3): Likewise.
9648 (vld1_u16_x3): Likewise.
9649 (vld1_s16_x3): Likewise.
9650 (vld1_u32_x3): Likewise.
9651 (vld1_s32_x3): Likewise.
9652 (vld1_u64_x3): Likewise.
9653 (vld1_s64_x3): Likewise.
9654 (vld1_f16_x3): Likewise.
9655 (vld1_f32_x3): Likewise.
9656 (vld1_f64_x3): Likewise.
9657 (vld1_p8_x3): Likewise.
9658 (vld1_p16_x3): Likewise.
9659 (vld1_p64_x3): Likewise.
9660 (vld1q_u8_x3): Likewise.
9661 (vld1q_s8_x3): Likewise.
9662 (vld1q_u16_x3): Likewise.
9663 (vld1q_s16_x3): Likewise.
9664 (vld1q_u32_x3): Likewise.
9665 (vld1q_s32_x3): Likewise.
9666 (vld1q_u64_x3): Likewise.
9667 (vld1q_s64_x3): Likewise.
9668 (vld1q_f16_x3): Likewise.
9669 (vld1q_f32_x3): Likewise.
9670 (vld1q_f64_x3): Likewise.
9671 (vld1q_p8_x3): Likewise.
9672 (vld1q_p16_x3): Likewise.
9673 (vld1q_p64_x3): Likewise.
9674 (vst1_s64_x2): Likewise.
9675 (vst1_u64_x2): Likewise.
9676 (vst1_f64_x2): Likewise.
9677 (vst1_s8_x2): Likewise.
9678 (vst1_p8_x2): Likewise.
9679 (vst1_s16_x2): Likewise.
9680 (vst1_p16_x2): Likewise.
9681 (vst1_s32_x2): Likewise.
9682 (vst1_u8_x2): Likewise.
9683 (vst1_u16_x2): Likewise.
9684 (vst1_u32_x2): Likewise.
9685 (vst1_f16_x2): Likewise.
9686 (vst1_f32_x2): Likewise.
9687 (vst1_p64_x2): Likewise.
9688 (vst1q_s8_x2): Likewise.
9689 (vst1q_p8_x2): Likewise.
9690 (vst1q_s16_x2): Likewise.
9691 (vst1q_p16_x2): Likewise.
9692 (vst1q_s32_x2): Likewise.
9693 (vst1q_s64_x2): Likewise.
9694 (vst1q_u8_x2): Likewise.
9695 (vst1q_u16_x2): Likewise.
9696 (vst1q_u32_x2): Likewise.
9697 (vst1q_u64_x2): Likewise.
9698 (vst1q_f16_x2): Likewise.
9699 (vst1q_f32_x2): Likewise.
9700 (vst1q_f64_x2): Likewise.
9701 (vst1q_p64_x2): Likewise.
9702 (vst1_s64_x3): Likewise.
9703 (vst1_u64_x3): Likewise.
9704 (vst1_f64_x3): Likewise.
9705 (vst1_s8_x3): Likewise.
9706 (vst1_p8_x3): Likewise.
9707 (vst1_s16_x3): Likewise.
9708 (vst1_p16_x3): Likewise.
9709 (vst1_s32_x3): Likewise.
9710 (vst1_u8_x3): Likewise.
9711 (vst1_u16_x3): Likewise.
9712 (vst1_u32_x3): Likewise.
9713 (vst1_f16_x3): Likewise.
9714 (vst1_f32_x3): Likewise.
9715 (vst1_p64_x3): Likewise.
9716 (vst1q_s8_x3): Likewise.
9717 (vst1q_p8_x3): Likewise.
9718 (vst1q_s16_x3): Likewise.
9719 (vst1q_p16_x3): Likewise.
9720 (vst1q_s32_x3): Likewise.
9721 (vst1q_s64_x3): Likewise.
9722 (vst1q_u8_x3): Likewise.
9723 (vst1q_u16_x3): Likewise.
9724 (vst1q_u32_x3): Likewise.
9725 (vst1q_u64_x3): Likewise.
9726 (vst1q_f16_x3): Likewise.
9727 (vst1q_f32_x3): Likewise.
9728 (vst1q_f64_x3): Likewise.
9729 (vst1q_p64_x3): Likewise.
9731 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9733 * config/msp430/msp430.c (msp430_output_labelref): Prepend
9734 user_label_prefix to name.
9736 * tree-core.h: Update comment about the format of NAME string
9737 passed to handler in attribute_spec.
9739 * config/msp430/msp430.md: Remove erroneous subreg expression from
9740 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
9741 zero_extend{q,h}isi2.
9743 2018-05-30 Borislav Petkov <bp@suse.de>
9745 * doc/extend.texi: Document some architecture specific
9746 constraints and sort entries.
9748 2018-05-30 Martin Sebor <msebor@redhat.com>
9751 * builtins.c (expand_builtin_stpcpy_1): New function.
9752 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
9753 only if the former succeeds.
9755 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
9757 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
9760 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9762 * doc/invoke.texi (-flinker-output): Document
9764 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9766 * passes.c (ipa_write_summaries): Only modify statements if body
9768 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
9769 incrementally linking.
9770 (ipa_passes): Likewise.
9771 * lto-cgraph.c (lto_output_node): When incrementally linking do not
9772 pass down resolution info.
9773 * common.opt (flag_incremental_link): Update info.
9774 * gcc.c (plugin specs): Turn flinker-output=* to
9775 -plugin-opt=-linker-output-known
9776 * toplev.c (compile_file): Also cut compilation when doing incremental
9778 * flag-types. (enum lto_partition_model): Add
9779 LTO_LINKER_OUTPUT_NOLTOREL.
9780 (invoke.texi): Add -flinker-output docs.
9781 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
9782 link same way as WPA; do not stream in dead initializers.
9784 * dwarf2out.c (dwarf2out_die_ref_for_decl,
9785 darf2out_register_external_decl): Support incremental link.
9787 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9789 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
9791 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9793 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
9794 it down to simple_object_copy_lto_debug_sections.
9795 (run_gcc): Determine incremental LTO link time and configure
9796 lto1 into non-wpa mode, disable renaming of debug sections.
9798 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
9800 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
9801 descriptions of various incorrectly documented functions.
9803 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
9806 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9807 address check not strict.
9809 2018-05-30 Richard Biener <rguenther@suse.de>
9811 PR tree-optimization/85964
9812 * tracer.c (better_p): Drop initialized count check, we only
9813 call the function with initialized counts now.
9814 (find_best_successor): Do find a best edge if one
9815 has uninitialized count.
9816 (find_best_predecessor): Likewise. Do BB frequency check only
9817 if count is initialized.
9819 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
9821 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
9822 (aarch64_ldrstr_offset_compare): New.
9823 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
9824 load/store orderings.
9825 (aarch64_gen_adjusted_ldpstp): Likewise.
9827 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
9829 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
9830 Check for subset of GENERAL_REGS and FP_REGS.
9831 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
9834 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
9836 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
9837 and wi::to_poly_offset. Add the current offset and then check
9838 whether the sum fits, rather than using an unchecked addition of
9839 a checked term. Check for a shwi rather than a uhwi.
9840 * expr.c (get_bit_range): Use tree_to_poly_uint64.
9841 (store_constructor): Use poly_int_tree_p.
9842 (expand_expr_real_1): Likewise.
9843 * function.c (assign_temp): Likewise.
9844 * fold-const.c (const_binop): Use poly_int_tree_p and
9846 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
9848 * ipa-icf-gimple.c (func_checker::compare_operand): Use
9849 to_poly_offset for MEM offsets.
9850 * ipa-icf.c (sem_variable::equals): Likewise.
9851 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
9852 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
9853 wi::to_poly_offset for BIT_FIELD_REF offsets.
9854 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
9856 * var-tracking.c (emit_note_insn_var_location): Use
9857 tree_to_poly_uint64.
9859 2018-05-29 Jim Wilson <jimw@sifive.com>
9861 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
9863 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
9866 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
9867 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
9869 (sse4_1_round<mode>2): Use nonimmediate_operand
9870 for operand 1 predicate.
9872 2018-05-29 Martin Sebor <msebor@redhat.com>
9873 Richard Biener <rguenther@suse.de>
9876 * calls.c (get_size_range): Call determine_value_range instead
9877 of get_value_range..
9878 * tree-vrp.h (determine_value_range): Declared new function.
9879 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
9881 2018-05-29 Richard Biener <rguenther@suse.de>
9883 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
9884 sure to use non-pattern stmts for get_earlier_stmt arguments.
9885 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
9886 called on pattern stmts.
9887 (get_later_stmt): Likewise.
9889 2018-05-29 Martin Liska <mliska@suse.cz>
9891 PR gcov-profile/85759
9892 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
9895 2018-05-29 Jakub Jelinek <jakub@redhat.com>
9897 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
9899 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
9903 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
9904 VEC_PACK_FLOAT_EXPR): New tree codes.
9905 * tree-pretty-print.c (op_code_prio): Handle
9906 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
9907 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
9908 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
9909 * tree-inline.c (estimate_operator_cost): Likewise.
9910 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
9911 * fold-const.c (const_binop): Likewise.
9912 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
9913 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
9914 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
9915 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
9916 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
9917 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
9918 * expr.c (expand_expr_real_2): Likewise.
9919 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
9920 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
9921 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
9923 * optabs.c (expand_widen_pattern_expr): For
9924 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
9925 sign from result type rather than operand's type.
9926 (expand_binop_directly): For vec_packu_float_optab and
9927 vec_packs_float_optab allow result type to be different from operand's
9929 * optabs-tree.c (optab_for_tree_code): Handle
9930 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
9931 VEC_PACK_FLOAT_EXPR. Formatting fixes.
9932 * tree-vect-generic.c (expand_vector_operations_1): Handle
9933 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
9934 VEC_PACK_FLOAT_EXPR.
9935 * tree-vect-stmts.c (supportable_widening_operation): Handle
9937 (supportable_narrowing_operation): Handle FLOAT_EXPR.
9938 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
9939 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
9940 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
9941 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
9943 (vec_pack<floatprefix>_float_<mode>): New expander.
9944 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
9946 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
9947 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
9948 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
9949 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
9950 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
9952 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
9953 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
9954 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
9955 VEC_PACK_FLOAT_EXPR): Document.
9957 2018-05-29 Richard Biener <rguenther@suse.de>
9959 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
9961 (stmt_vec_info_vec): Make pointer.
9962 (init_stmt_vec_info_vec): Remove.
9963 (free_stmt_vec_info_vec): Likewise.
9964 (set_stmt_vec_info_vec): New function.
9965 (free_stmt_vec_infos): Likewise.
9966 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
9967 (set_vinfo_for_stmt): Likewise.
9968 (get_earlier_stmt): Likewise.
9969 (get_later_stmt): Likewise.
9970 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
9971 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
9972 (vec_info::~vec_info): Free stmt_vec_infos.
9973 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
9974 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
9975 (pass_slp_vectorize::execute): Likewise.
9976 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
9977 (free_stmt_vec_info_vec): Likewise.
9978 (set_stmt_vec_info_vec): New function.
9979 (free_stmt_vec_infos): Likewise.
9980 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
9981 the global stmt_vec_info_vec.
9982 * tree-parloops.c (gather_scalar_reductions): Use
9983 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
9986 2018-05-29 Richard Biener <rguenther@suse.de>
9988 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
9990 2018-05-29 Martin Liska <mliska@suse.cz>
9991 David Malcolm <dmalcolm@redhat.com>
9993 * vec.c (test_reverse): New.
9994 (vec_c_tests): Add new test.
9995 * vec.h (vl_ptr>::reverse): New function.
9997 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
9999 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
10001 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
10004 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
10006 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
10008 2018-05-28 Richard Biener <rguenther@suse.de>
10010 PR tree-optimization/85933
10011 * tree-vect-data-refs.c (vect_record_base_alignments): Only
10012 look at stmts marked as vectorizable.
10014 2018-05-28 Richard Biener <rguenther@suse.de>
10016 PR tree-optimization/85934
10017 * tree-vect-generic.c (expand_vector_operations_1): Hoist
10018 vector boolean check before scalar optimization.
10020 2018-05-28 Jakub Jelinek <jakub@redhat.com>
10022 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
10025 2018-05-28 Mark Wielaard <mark@klomp.org>
10027 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
10028 if it is an expression containing a minus sign.
10030 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
10032 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
10034 2018-05-27 Paul Koning <ni1d@arrl.net>
10036 * config/pdp11/pdp11.md (truncsihi2): Remove.
10038 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
10039 Chung-Ju Wu <jasonwucj@gmail.com>
10041 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
10043 (unaligned_store_dw): Ditto.
10044 * config/nds32/nds32-memory-manipulation.c
10045 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
10046 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
10047 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
10048 (emit_setmem_word_loop): Rename to ...
10049 (emit_setmem_doubleword_loop): ... this.
10050 (nds32_gen_dup_4_byte_to_word_value): New function.
10051 (nds32_gen_dup_8_byte_to_double_word_value): New function.
10052 (nds32_expand_setmem_loop): Refine implementation.
10053 (nds32_expand_setmem_loop_v3m): Ditto.
10054 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
10057 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
10059 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
10061 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
10063 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
10064 (nds32_init_machine_status): Initialize machine->attr_naked_p and
10065 machine->attr_no_prologue_p.
10066 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
10067 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
10068 (nds32_expand_epilogue): Consider attr_naked_p.
10069 (nds32_expand_epilogue_v3pop): Likewise.
10070 (nds32_can_use_return_insn): Likewise.
10071 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
10072 attr_no_prologue_p fields.
10073 * config/nds32/nds32.opt (mret-in-naked-func): New option.
10075 2018-05-27 Jakub Jelinek <jakub@redhat.com>
10078 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
10080 * config/i386/sse.md
10081 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
10083 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
10085 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
10087 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
10089 (*<floatsuffix>floatv2div2sf2): Rename to ...
10090 (*float<floatunssuffix>v2div2sf2): ... this.
10091 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
10092 (float<floatunssuffix>v2div2sf2_mask): ... this.
10093 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
10094 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
10095 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
10097 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
10099 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
10101 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
10103 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
10105 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
10107 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
10108 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
10109 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
10110 gen_ufix_truncv8dfv8si2.
10111 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
10112 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
10113 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
10114 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
10115 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
10116 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
10117 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
10118 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
10120 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
10124 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
10126 2018-05-25 Jim Wilson <jimw@sifive.com>
10128 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
10129 * config/riscv/riscv.c (struct machine_function): Add
10130 interrupt_handler_p and attribute_checked_p fields.
10131 (riscv_attribute_table): Add interrupt.
10132 (riscv_interrupt_type_p): New.
10133 (riscv_save_reg_p): Save extra regs for interrupt handler.
10134 (riscv_use_save_libcall): Return false for interrupt handler.
10135 (riscv_first_stack_step): Add forward declaration.
10136 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
10137 for interrupt handler with large frame. Use it for saved reg list.
10138 (riscv_expand_prologue): Move flag_stack_usage_info support to
10139 eliminate duplication.
10140 (riscv_expand_epilogue): Generate mret for interrupt handler.
10141 (riscv_epilogue_uses): New.
10142 (riscv_can_use_return_insn): Return false for interrupt handler.
10143 (riscv_function_ok_for_sibcall): Likewise.
10144 (riscv_set_current_function): Add interrupt handler support.
10145 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
10146 * config/riscv/riscv.md (UNSPECV_MRET): New.
10148 (riscv_frflags, riscv_fsflags): Use tab after opcode.
10150 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
10152 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
10154 PR tree-optimization/85712
10155 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
10156 this candidate has already been replaced in-situ by a copy.
10158 2018-05-25 Jason Merrill <jason@redhat.com>
10160 PR c++/80485 - inline function non-zero address.
10161 * symtab.c (nonzero_address): Check DECL_COMDAT.
10163 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
10166 * config/alpha/alpha.md (ashlsi3): New insn pattern.
10167 (*ashlsi_se): Rename from *ashldi_se. Define as sign
10168 extension of SImode operation. Use const123_operand predicate.
10169 (*saddsi_1): Remove.
10170 (*saddl_se_1): Ditto.
10171 (*ssubsi_1): Ditto.
10172 (*ssubl_se_1): Ditto.
10173 * config/alpha/predicates.md (const123_operand): New predicate.
10174 * config/alpha/constraints.md (P): Use IN_RANGE.
10176 2018-05-25 Richard Biener <rguenther@suse.de>
10178 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
10180 (ref_maybe_used_by_stmt_p): Likewise.
10181 (stmt_may_clobber_ref_p): Likewise.
10182 (stmt_may_clobber_ref_p_1): Likewise.
10183 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
10185 (ref_maybe_used_by_stmt_p): Likewise.
10186 (stmt_may_clobber_ref_p): Likewise.
10187 (stmt_may_clobber_ref_p_1): Likewise.
10188 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
10189 the alias oracle to disambiguate DRs with stmts DR analysis
10191 (vect_analyze_data_refs): Do not give up on not analyzable
10192 DRs for BB vectorization. Remove code truncating the dataref
10195 2018-05-25 Jakub Jelinek <jakub@redhat.com>
10198 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10199 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
10200 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
10202 2018-05-25 Richard Biener <rguenther@suse.de>
10204 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
10205 function, combining stmt data ref gathering and fatal analysis
10207 (vect_analyze_data_refs): Remove now redudnant code and simplify.
10208 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
10209 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
10210 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
10211 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
10213 2018-05-25 Bin Cheng <bin.cheng@arm.com>
10215 PR tree-optimization/85720
10216 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
10217 SCC if all partitions are builtins.
10218 (version_loop_by_alias_check): New parameter. Generate cancelable
10219 runtime alias check if all partitions are builtins.
10220 (distribute_loop): Update call to above function.
10222 2018-05-25 Bin Cheng <bin.cheng@arm.com>
10224 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
10225 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
10226 (parm_default_def_partition_arg): Ditto.
10227 (set_parm_default_def_partition): Ditto.
10228 (get_parm_default_def_partitions): Ditto and make it static.
10229 (get_undefined_value_partitions): Ditto and make it static.
10230 (remove_ssa_form): Refactor call to init_var_map here.
10231 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
10232 computation for loop region.
10233 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
10234 (register_default_def): Delete.
10235 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
10236 (parm_default_def_partition_arg): Ditto.
10237 (set_parm_default_def_partition): Ditto.
10238 (get_parm_default_def_partitions): Ditto and make it static.
10239 (get_undefined_value_partitions): Ditto and make it static.
10240 (coalesce_with_default, coalesce_with_default): Update comment.
10241 (create_coalesce_list_for_region): New func factored out from
10242 create_outofssa_var_map.
10243 (populate_coalesce_list_for_outofssa): New func factored out from
10244 create_outofssa_var_map and coalesce_ssa_name.
10245 (create_outofssa_var_map): Delete.
10246 (coalesce_ssa_name): Refactor to support live range computation.
10247 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
10248 (get_parm_default_def_partitions): Delete.
10249 (get_undefined_value_partitions): Ditto.
10250 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
10251 computation for loop region.
10252 (new_tree_live_info, loe_visit_block): Ditto.
10253 (live_worklist, set_var_live_on_entry): Ditto.
10254 (calculate_live_on_exit, verify_live_on_entry): Ditto.
10255 * tree-ssa-live.h (struct _var_map): New fields.
10256 (init_var_map): Change decl.
10257 (region_contains_p): New.
10259 2018-05-25 Bin Cheng <bin.cheng@arm.com>
10261 * tree-ssa-live.h (live_merge_and_clear): Delete.
10263 2018-05-25 Richard Biener <rguenther@suse.de>
10266 * tree-dump.c (dequeue_and_dump): Remove access to removed
10267 operand 2 of a SWITCH_EXPR.
10269 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10271 * doc/sourcebuild.texi (vect_double_cond_arith): Include
10272 multiplication and division.
10273 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
10274 (cond_udiv@var{m}, cond_umod@var{m}): Document.
10275 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
10276 (cond_udiv_optab, cond_umod_optab): New optabs.
10277 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
10278 (IFN_COND_RDIV): New internal functions.
10279 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
10280 TRUNC_MOD_EXPR and RDIV_EXPR.
10281 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
10282 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
10284 (SVE_INT_BINARY): Include mult.
10285 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
10286 (optab, sve_int_op): Handle mult.
10287 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
10289 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
10290 for SVE_INT_BINARY_SD.
10292 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10294 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
10295 (optab, sve_int_op): Handle div and udiv.
10296 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
10297 for SVE_INT_BINARY_SD.
10298 (*<optab><mode>3): New insn for the same.
10300 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10302 * tree-vect-patterns.c: Include predict.h.
10303 (vect_recog_divmod_pattern): Restrict check for division support
10304 to when optimizing for size.
10306 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10308 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
10309 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
10310 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
10311 (gimple_match_op::set_op): Likewise.
10312 (gimple_resimplify4): Declare.
10313 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
10314 (expr::gen_transform): Likewise.
10315 (decision_tree::gen): Generate a simplification routine for 4 operands.
10316 * gimple-match-head.c (gimple_simplify): Add an overload for
10317 4 operands. In the top-level function, handle up to 4 call
10318 arguments and call gimple_resimplify4.
10319 (gimple_resimplify4): New function.
10320 (build_call_internal): Pass a fourth operand.
10321 (maybe_push_to_seq): Likewise.
10322 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
10323 Fold VEC_COND_EXPRs of an operation and a default value into
10324 an IFN_COND_* function if possible.
10325 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
10327 (SVE_COND_FP_BINARY): Include them.
10328 (optab, sve_fp_op): Handle them.
10329 (SVE_INT_BINARY_REV): New code iterator.
10330 (SVE_COND_FP_BINARY_REV): New int iterator.
10331 (commutative): New int attribute.
10332 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
10334 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
10336 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
10337 (*cond_<optab><mode>): New patterns for reversed operands.
10339 2018-05-25 Richard Biener <rguenther@suse.de>
10341 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
10342 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
10343 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
10344 (STMT_VINFO_GROUPED_ACCESS): Adjust.
10345 * tree-vect-data-refs.c (everywhere): Adjust users.
10346 * tree-vect-loop.c (everywhere): Likewise.
10347 * tree-vect-slp.c (everywhere): Likewise.
10348 * tree-vect-stmts.c (everywhere): Likewise.
10349 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
10351 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10353 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
10355 (gcc_cv_as_section_exclude): ... this.
10356 Try Solaris as #exclude syntax.
10357 * configure: Regenerate.
10358 * config.in: Regenerate.
10359 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
10361 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
10362 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
10364 * varasm.c (default_elf_asm_named_section): Don't check if
10365 HAVE_GAS_SECTION_EXCLUDE is defined.
10367 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10369 * doc/md.texi: Update the documentation of the cond_* optabs
10370 to mention the new final operand. Fix GET_MODE_NUNITS call.
10371 Describe the scalar case too.
10372 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
10373 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
10375 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
10376 (get_conditional_internal_fn): Update comment.
10377 * tree-vect-loop.c (vectorizable_reduction): Pass the original
10378 accumulator value as a final argument to conditional functions.
10379 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
10380 a define_expand and add an "else" operand. Assert for now that
10381 the else operand is equal to operand 2. Use SVE_INT_BINARY and
10382 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
10383 (*cond_<optab><mode>): New patterns.
10384 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
10385 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
10386 (UNSPEC_COND_EOR): Delete.
10387 (optab): Remove associated mappings.
10388 (SVE_INT_BINARY): New code iterator.
10389 (sve_int_op): Remove int attribute and add "minus" to the code
10391 (SVE_COND_INT_OP): Delete.
10392 (SVE_COND_FP_OP): Rename to...
10393 (SVE_COND_FP_BINARY): ...this.
10395 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10397 * optabs.c (can_reuse_operands_p): New function.
10398 (maybe_legitimize_operands): Try to reuse the results for
10401 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
10403 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
10404 Add {q} suffix to insn mnemonic.
10406 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10408 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
10409 (msp430_warn_func_return): New.
10411 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
10413 * fold-const.c (tree_nonzero_bits): New function.
10414 * fold-const.h (tree_nonzero_bits): Likewise.
10415 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
10416 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
10418 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
10422 * varasm.c (assemble_alias): Check ifunc_resolver only on
10425 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
10428 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
10429 when memory input operand is handled.
10431 2018-05-24 Luis Machado <luis.machado@linaro.org>
10433 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
10435 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
10437 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
10439 * match.pd: Delay FMA folds until after vectorization.
10441 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
10444 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10445 address check not strict.
10447 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
10449 * gimple-match.h (gimple_match_op): New class.
10450 (mprts_hook): Replace parameters with a gimple_match_op *.
10451 (maybe_build_generic_op): Likewise.
10452 (gimple_simplified_result_is_gimple_val): Replace parameters with
10453 a const gimple_match_op *.
10454 (gimple_simplify): Replace code_helper * and tree * parameters with
10455 a gimple_match_op * parameter.
10456 (gimple_resimplify1): Replace code_helper *, tree and tree *
10457 parameters with a gimple_match_op * parameter.
10458 (gimple_resimplify2): Likewise.
10459 (gimple_resimplify3): Likewise.
10460 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
10461 parameters with a gimple_match_op * parameter.
10462 * gimple-match-head.c (gimple_simplify): Change prototypes of
10463 auto-generated functions to take a gimple_match_op * instead of
10464 separate code_helper * and tree * parameters. Make the same
10465 change in the top-level overload and update calls to the
10466 gimple_resimplify routines. Update calls to the auto-generated
10467 functions and to maybe_push_res_to_seq in the publicly-facing
10468 operation-specific gimple_simplify overloads.
10469 (gimple_match_op::MAX_NUM_OPS): Define.
10470 (gimple_resimplify1): Replace rcode and ops with a single res_op
10471 parameter. Update call to gimple_simplify.
10472 (gimple_resimplify2): Likewise.
10473 (gimple_resimplify3): Likewise.
10474 (mprts_hook): Replace parameters with a gimple_match_op *.
10475 (maybe_build_generic_op): Likewise.
10476 (build_call_internal): Replace type, nargs and ops with
10477 a gimple_match_op *.
10478 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
10479 with a single gimple_match_op *. Update calls to mprts_hook,
10480 build_call_internal and gimple_simplified_result_is_gimple_val.
10481 Factor out code that is common to the tree_code and combined_fn cases.
10482 * genmatch.c (expr::gen_transform): Replace tem_code and
10483 tem_ops with a gimple_match_op called tem_op. Update calls
10484 to the gimple_resimplify functions and maybe_push_res_to_seq.
10485 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
10486 res_ops. Update call to the gimple_resimplify functions.
10487 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
10488 (decision_tree::gen): Make the functions take a gimple_match_op *
10489 called res_op instead of separate res_code and res_ops parameters.
10490 Update call accordingly.
10491 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
10492 and ops with a single res_op parameter. Update calls to
10493 maybe_build_generic_op and maybe_push_res_to_seq.
10494 (fold_stmt_1): Update calls to gimple_simplify and
10495 replace_stmt_with_simplification.
10496 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
10497 and gimple_simplified_result_is_gimple_val.
10498 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
10500 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
10501 with a gimple_match_op *.
10502 (vn_nary_build_or_lookup): Likewise. Update call to
10503 vn_nary_build_or_lookup_1.
10504 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
10505 gimple_match_op *. Update calls to the gimple_resimplify routines
10506 and to gimple_simplified_result_is_gimple_val.
10507 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
10508 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
10509 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
10510 (visit_nary_op): Likewise.
10511 (visit_reference_op_load): Likewise.
10513 2018-05-23 Luis Machado <luis.machado@linaro.org>
10515 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
10516 modifier for printing the step amount.
10518 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
10521 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
10524 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
10526 * doc/sourcebuild.texi (Endianness): New subsubsection.
10528 2018-05-23 Luis Machado <luis.machado@linaro.org>
10530 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10531 <prefetch_dynamic_strides>: New const bool field.
10532 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10533 prefetch_dynamic_strides.
10534 (exynosm1_prefetch_tune): Likewise.
10535 (thunderxt88_prefetch_tune): Likewise.
10536 (thunderx_prefetch_tune): Likewise.
10537 (thunderx2t99_prefetch_tune): Likewise.
10538 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
10540 (aarch64_override_options_internal): Update to set
10541 PARAM_PREFETCH_DYNAMIC_STRIDES.
10542 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10543 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10544 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10545 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10546 prefetch-dynamic-strides setting.
10548 2018-05-23 Luis Machado <luis.machado@linaro.org>
10550 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10551 <minimum_stride>: New const int field.
10552 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10553 minimum_stride field defaulting to -1.
10554 (exynosm1_prefetch_tune): Likewise.
10555 (thunderxt88_prefetch_tune): Likewise.
10556 (thunderx_prefetch_tune): Likewise.
10557 (thunderx2t99_prefetch_tune): Likewise.
10558 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
10559 <default_opt_level>: Set to 3.
10560 (aarch64_override_options_internal): Update to set
10561 PARAM_PREFETCH_MINIMUM_STRIDE.
10562 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10563 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10564 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10565 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10566 stride is constant and is below the minimum stride threshold.
10568 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10570 * config/arm/arm-cpus.in (mode26): Delete.
10571 (armv4): Delete mode26 reference.
10572 * config/arm/arm.c (arm_configure_build_target): Delete use of
10575 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
10577 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
10579 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
10580 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
10582 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
10583 (floatunsdidf2): Ditto.
10585 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
10587 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
10588 (fixuns_trunc<mode>si2_avx512f): Ditto.
10589 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
10590 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
10591 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
10593 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
10595 PR rtl-optimization/79985
10596 * df-scan.c (df_insn_refs_collect): Remove special case for
10597 global registers and asm statements.
10599 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
10601 * extend.texi (Global Register Variables): Rewrite the bullet list.
10602 Note that the register is available for allocation. Note that access
10603 via inline asm must use constraints. Add note about async-signal
10604 handlers. Remove paragraph about automagic register selection.
10606 2018-05-23 Richard Biener <rguenther@suse.de>
10608 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
10609 of fixed offset from memset VN.
10611 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
10613 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
10614 first_interp field.
10615 (alloc_cand_and_find_basis): Initialize first_interp field.
10616 (slsr_process_mul): Modify first_interp field.
10617 (slsr_process_add): Likewise.
10618 (slsr_process_cast): Modify first_interp field for each new
10620 (slsr_process_copy): Likewise.
10621 (dump_candidate): Dump first_interp field.
10622 (replace_mult_candidate): Process all interpretations, not just
10624 (replace_rhs_if_not_dup): Likewise.
10625 (replace_one_candidate): Likewise.
10627 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
10629 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
10631 (aarch64_needs_frame_chain): New function.
10632 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
10634 2018-05-23 Sudakshina Das <sudi.das@arm.com>
10637 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
10638 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
10639 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
10640 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
10641 as true for strict-align.
10642 (aarch64_can_inline_p): Perform checks even when callee has no
10643 attributes to check for strict alignment.
10644 * doc/extend.texi (AArch64 Function Attributes): Document
10646 * doc/invoke.texi: (AArch64 Options): Likewise.
10648 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
10650 PR tree-optimization/85853
10651 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
10652 the handling of the root of the node to...
10653 (vect_slp_analyze_node_operations_1): ...this new function,
10654 and run the whole thing with the child nodes' def types
10655 set according to their SLP node's def type.
10657 2018-05-23 Richard Biener <rguenther@suse.de>
10659 PR middle-end/85874
10660 * tree-data-ref.c (create_runtime_alias_checks): Defer
10661 and ignore overflow warnings.
10663 2018-05-23 Yury Gribov <tetra2005@gmail.com>
10665 PR tree-optimization/85822
10666 * tree-vrp.c (is_masked_range_test): Fix handling of negative
10669 2018-05-23 Richard Biener <rguenther@suse.de>
10671 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
10672 memset constants via native_interpret_expr.
10674 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
10677 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
10679 (cgraph_node::create_alias): Likewise.
10680 (cgraph_node::get_availability): Check ifunc_resolver instead
10681 of looking up ifunc attribute.
10682 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
10683 * varasm.c (do_assemble_alias): Likewise.
10684 (assemble_alias): Likewise.
10685 (default_binds_local_p_3): Likewise.
10686 * cgraph.h (cgraph_node): Add ifunc_resolver.
10687 (cgraph_node::only_called_directly_or_aliased_p): Return false
10688 for IFUNC resolver.
10689 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
10691 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
10692 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
10693 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
10694 instead of looking up ifunc attribute.
10696 2018-05-22 Luis Machado <luis.machado@linaro.org>
10698 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
10700 2018-05-22 Martin Sebor <msebor@redhat.com>
10702 PR middle-end/85359
10703 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
10704 only when expasion succeeds.
10705 (expand_builtin_strcmp): Same.
10706 (expand_builtin_strncmp): Same.
10708 2018-05-22 Martin Sebor <msebor@redhat.com>
10710 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
10712 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
10713 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10715 * config/aarch64/aarch64-ldpstp.md: Replace uses of
10716 aarch64_mem_pair_operand with memory_operand and delete operand swapping
10718 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
10719 Add check for legitimate_address.
10720 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
10721 (aarch64_swap_ldrstr_operands): New.
10722 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
10725 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
10726 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10728 * config/aarch64/aarch64.md: New patterns to generate stp
10730 (store_pair_sw, store_pair_dw): New patterns to generate stp for
10731 single words and double words.
10732 (load_pair_sw, load_pair_dw): Likewise.
10733 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
10735 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
10737 * config/aarch64/aarch64-ldpstp.md: Modify peephole
10738 for different mode ldpstp and add peephole for merged zero stores.
10739 Likewise for loads.
10740 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
10742 (aarch64_gen_store_pair): Rename calls to match new patterns.
10743 (aarch64_gen_load_pair): Rename calls to match new patterns.
10744 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
10745 (load_pair<DREG:mode><DREG2:mode>): ... This.
10746 (store_pair<mode>): Rename to...
10747 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
10748 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
10749 New mode iterators.
10750 (V_INT_EQUIV): Handle SImode.
10751 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
10754 2018-05-22 Martin Sebor <msebor@redhat.com>
10757 * calls.c (maybe_warn_nonstring_arg): Use string length to set
10758 or ajust the presumed bound on an operation to avoid unnecessary
10761 2018-05-22 Martin Sebor <msebor@redhat.com>
10763 PR tree-optimization/85826
10764 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
10765 assuming that a DECL necesarily has a constant size.
10767 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
10769 PR middle-end/85862
10770 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
10772 2018-05-22 Richard Biener <rguenther@suse.de>
10774 PR tree-optimization/85834
10775 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
10776 non-constant and non-zero memset arguments.
10778 2018-05-22 Martin Liska <mliska@suse.cz>
10781 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
10783 2018-05-22 Richard Biener <rguenther@suse.de>
10785 PR tree-optimization/85863
10786 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
10787 comparisons when vectype is specified.
10788 (vectorizable_condition): Do not specify vectype for
10789 vect_is_simple_cond when SLP vectorizing.
10791 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
10794 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
10795 define __ibm128 as long double.
10796 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
10797 as a distinct type when IEEE 128-bit support is enabled.
10798 (init_float128_ieee): Fix up conversions between IFmode and IEEE
10799 128-bit types to use the correct functions.
10800 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
10801 convert between 128-bit floating point types that have different
10802 modes but the same representation, instead of using gen_lowpart to
10804 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
10806 (IFKF_reg): New attributes to give the register constraints for
10808 (extend<mode>tf2_internal): New insns to mark an explicit
10809 conversion between 128-bit floating point types that have a
10810 different mode but share the same representation.
10812 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
10814 PR tree-optimization/85814
10815 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
10816 a null return from get_strinfo when unsharing the next
10817 strinfo in the chain.
10819 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
10822 * varasm.c (weak_finish): Clean up weak_decls.
10824 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10826 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
10827 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
10828 UNSPEC_UADALP values.
10829 * config/aarch64/iterators.md (ABAL): New int iterator.
10832 (sur): Add mappings for the above.
10833 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
10835 (aarch64_<sur>abal<mode>_4): Likewise.
10836 (aarch64_<sur>adalp<mode>_3): Likewise.
10837 (<sur>sadv16qi): New define_expand.
10839 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
10841 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
10842 (*movdf_internal): Ditto.
10843 (*rcpsf2_sse): Ditto.
10844 (*rsqrtsf2_sse): Ditto.
10845 (*sqrt<mode>2_sse): Ditto.
10847 2018-05-21 Tamar Christina <tamar.christina@arm.com>
10849 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
10851 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
10852 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
10853 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
10854 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
10856 * config/aarch64/arm_neon.h: Likewise.
10857 * config/aarch64/iterators.md (VQ_I): New.
10859 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
10861 * config.gcc: Add arc/t-multilib-linux to tmake_file for
10863 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
10866 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
10868 * config/nds32/constraints.md (S): New constraint.
10869 * config/nds32/nds32.md (call_internal): Use constraint S.
10870 (call_value_internal): Likewise.
10871 (sibcall_internal): Likewise.
10872 (sibcall_value_internal): Likewise.
10874 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
10875 Chung-Ju Wu <jasonwucj@gmail.com>
10877 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
10878 into consideration.
10880 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
10881 Chung-Ju Wu <jasonwucj@gmail.com>
10883 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
10884 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
10885 (nds32_rtx_costs_impl): Simplify.
10886 (nds32_address_cost_impl): Simplify.
10887 (nds32_init_rtx_costs): New function.
10888 (nds32_rtx_costs_speed_prefer): Likewise.
10889 (nds32_rtx_costs_size_prefer): Likewise.
10890 (nds32_address_cost_speed_prefer): Likewise.
10891 (nds32_address_cost_speed_fwprop): Likewise.
10892 (nds32_address_cost_size_prefer): Likewise.
10893 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
10894 * config/nds32/nds32.c (nds32_option_override): Use
10895 nds32_init_rtx_costs function.
10897 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
10899 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
10900 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
10901 (TARGET_PIPELINE_N8): Likewise.
10902 (TARGET_PIPELINE_N10): Likewise.
10903 (TARGET_PIPELINE_N13): Likewise.
10904 (TARGET_PIPELINE_GRAYWOLF): Likewise.
10906 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
10908 * config/nds32/nds32-fpu.md: Update copyright year.
10910 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10912 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
10914 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10916 * config/nds32/nds32.c
10917 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
10918 * config/nds32/nds32.opt (minline-asm-r15): New option.
10920 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10922 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
10924 * config/nds32/nds32.md (abssi2): New pattern.
10926 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
10928 * config/i386/i386.md (rex64namesuffix): New mode attribute.
10929 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
10930 Merge insn pattern from sse_cvtsi2ss<round_name> and
10931 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
10932 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
10933 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
10934 using SWI48 mode iterator.
10935 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
10936 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
10937 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
10938 pattern from sse_cvttss2si<round_saeonly_name>
10939 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
10940 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
10941 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
10942 using SWI48 mode iterator.
10943 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
10944 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
10945 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
10946 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
10947 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
10948 using SWI48 mode iterator.
10949 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
10950 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
10951 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
10952 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
10953 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
10954 SWI48 mode iterator.
10955 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
10956 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
10957 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
10958 pattern from sse_cvttsd2si<round_saeonly_name>
10959 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
10961 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10963 * config/nds32/nds32-md-auxiliary.c
10964 (nds32_valid_smw_lwm_base_p): Refine.
10965 (nds32_output_smw_single_word): Refine.
10966 (nds32_output_smw_double_word): New.
10967 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
10969 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10971 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
10972 (nds32_output_stack_pop): Refine.
10973 (nds32_expand_unaligned_load): Refine.
10974 (nds32_expand_unaligned_store): Refine.
10976 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
10977 Chung-Ju Wu <jasonwucj@gmail.com>
10979 * config/nds32/constants.md: Add TP_REGNUM constant.
10980 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
10981 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
10983 * config/nds32/nds32-doubleword.md: Consider flag_pic.
10984 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
10985 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
10986 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
10987 and PIC code generation.
10988 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
10990 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
10992 * config/nds32/nds32.md: Support TLS and PIC.
10993 * config/nds32/nds32.c: Support TLS and PIC.
10994 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
10995 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
10998 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11000 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
11001 mode with E_ prefix.
11003 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11004 Chung-Ju Wu <jasonwucj@gmail.com>
11006 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
11007 * config/nds32/nds32-md-auxiliary.c
11008 (symbolic_reference_mentioned_p): New.
11009 (nds32_legitimize_ict_address): New.
11010 (nds32_expand_ict_move): New.
11011 (nds32_indirect_call_referenced_p): New.
11012 (nds32_symbol_binds_local_p): Delete.
11013 (nds32_long_call_p): Modify.
11014 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
11015 * config/nds32/nds32-protos.h
11016 (symbolic_reference_mentioned_p): Declare.
11017 (nds32_legitimize_ict_address): Declare.
11018 (nds32_expand_ict_move): Declare.
11019 (nds32_indirect_call_referenced_p): Declare.
11020 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
11021 (nds32_relax_group): Use nds32_ict_const_p as condition.
11022 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
11023 (nds32_asm_file_start): Output ict_model directive in asm code.
11024 (nds32_legitimate_address_p): Consider indirect call.
11025 (nds32_print_operand): Consider indirect call.
11026 (nds32_print_operand_address): Consider indirect call.
11027 (nds32_insert_attributes): Handle "indirect_call" attribute.
11028 (TARGET_LEGITIMATE_ADDRESS_P): Define.
11029 (TARGET_LEGITIMATE_CONSTANT_P): Define.
11030 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
11031 (TARGET_DELEGITIMIZE_ADDRESS): Define.
11032 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
11033 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
11034 (TARGET_ICT_MODEL_SMALL): Define.
11035 (TARGET_ICT_MODEL_LARGE): Define.
11036 * config/nds32/nds32.md (movsi): Consider ict model.
11037 (call, call_value): Consider ict model.
11038 (sibcall, sibcall_value): Consider ict model.
11039 * config/nds32/nds32.opt (mict-model): New option.
11040 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
11043 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
11044 Monk Chiang <sh.chiang04@gmail.com>
11045 Jim Wilson <jimw@sifive.com>
11047 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
11048 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
11049 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
11050 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
11051 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
11052 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
11053 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
11054 compute save_libcall_adjustment properly.
11055 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
11056 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
11057 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
11058 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
11059 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
11060 (ABI_SPEC): Handle mabi=ilp32e.
11061 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
11062 (RVE): Add RVE mask.
11063 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
11064 <-march>: Add rv32e as an example.
11066 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
11069 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
11070 (intra_create_variable_infos): Handle C++ constructors.
11072 2018-05-18 Martin Liska <mliska@suse.cz>
11074 * passes.def: Remove a redundant pass.
11076 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
11079 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
11081 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11083 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
11085 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
11087 (armv2, armv2a, armv3, armv3m): Delete architectures.
11088 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
11089 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
11090 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
11092 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
11093 (*mulsidi3adddi): Likewise.
11094 (mulsidi3): Likewise.
11095 (*mulsidi3_nov6): Likewise.
11096 (umulsidi3): Likewise.
11097 (umulsidi3_nov6): Likewise.
11098 (umaddsidi4): Likewise.
11099 (*umulsidi3adddi): Likewise.
11100 (smulsi3_highpart): Likewise.
11101 (*smulsi3_highpart_nov6): Likewise.
11102 (umulsi3_highpart): Likewise.
11103 (*umulsi3_highpart_nov6): Likewise.
11104 * config/arm/arm.h (arm_arch3m): Delete.
11105 * config/arm/arm.c (arm_arch3m): Delete.
11106 (arm_option_override_internal): Update armv3-related comment.
11107 (arm_configure_build_target): Delete use of isa_bit_mode32.
11108 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
11109 (arm_rtx_costs_internal): Delete check of arm_arch3m.
11110 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
11111 (mulsa3): Likewise.
11112 (mulusa3): Likewise.
11113 * config/arm/arm-protos.h (arm_arch3m): Delete.
11114 * config/arm/arm-tables.opt: Regenerate.
11115 * config/arm/arm-tune.md: Likewise.
11116 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
11117 deleted architectures.
11119 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11121 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
11122 (armv5t, armv5te): New features.
11123 (ARMv5, ARMv5e): Delete fgroups.
11124 (ARMv5t, ARMv5te): Adjust for above changes.
11125 (ARMv6m): Likewise.
11126 (armv5, armv5e): Delete arches.
11127 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
11129 (*call_reg_arm): Likewise.
11130 (*call_value_reg_armv5): Likewise.
11131 (*call_value_reg_arm): Likewise.
11132 (*call_symbol): Likewise.
11133 (*call_value_symbol): Likewise.
11134 (*sibcall_insn): Likewise.
11135 (*sibcall_value_insn): Likewise.
11136 (clzsi2): Likewise.
11137 (prefetch): Likewise.
11138 (define_split and define_peephole2 dependent on arm_arch5):
11140 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
11142 (TARGET_ARM_QBIT): Likewise.
11143 (TARGET_DSP_MULTIPLY): Likewise.
11144 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
11145 (arm_arch5, arm_arch5e): Delete.
11146 (arm_arch5t, arm_arch5te): Declare.
11147 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
11148 (arm_arch5t): Declare.
11149 (arm_option_reconfigure_globals): Update for the above.
11150 (arm_options_perform_arch_sanity_checks): Update comment, replace
11151 use of arm_arch5 with arm_arch5t.
11152 (use_return_insn): Likewise.
11153 (arm_emit_call_insn): Likewise.
11154 (output_return_instruction): Likewise.
11155 (arm_final_prescan_insn): Likewise.
11156 (arm_coproc_builtin_available): Likewise.
11157 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
11158 arm_arch5e with arm_arch5t and arm_arch5te.
11159 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
11160 (arm_arch5t, arm_arch5te): Declare.
11161 * config/arm/arm-tables.opt: Regenerate.
11162 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
11163 * config/arm/t-multilib: Likewise.
11164 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
11165 instead of arm_arch5.
11166 (*call_reg_thumb1): Likewise.
11167 (*call_value_reg_thumb1_v5): Likewise.
11168 (*call_value_reg_thumb1): Likewise.
11169 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
11171 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
11173 2018-05-18 Martin Liska <mliska@suse.cz>
11175 PR gcov-profile/84846
11176 * doc/gcov.texi: Document -t option of gcov tool.
11178 2018-05-18 Martin Liska <mliska@suse.cz>
11180 PR gcov-profile/84846
11181 * gcov.c (print_usage): Add new -t option.
11182 (process_args): Handle the option.
11183 (generate_results): Use stdout as output when requested by
11186 2018-05-18 Martin Liska <mliska@suse.cz>
11188 PR gcov-profile/84846
11189 * coverage.c (coverage_init): Write PWD to .gcno file.
11190 * doc/gcov.texi: Document how working directory is printed.
11191 * gcov-dump.c (dump_gcov_file): Print PWD.
11192 * gcov.c (output_intermediate_file): Likewise.
11193 (read_graph_file): Read PWD string.
11194 (output_lines): Print PWD.
11196 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11198 PR middle-end/85817
11199 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
11200 for retval and return false if all args to phi are zero.
11202 2018-05-18 Richard Biener <rguenther@suse.de>
11204 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
11206 (evrp_dom_walker::before_dom_children): Call it.
11208 2018-05-18 Richard Biener <rguenther@suse.de>
11210 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
11211 results when processing array refs with variable index.
11213 2018-05-18 Toon Moene <toon@moene.org>
11215 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
11216 directly after that of -floop-interchange. Indicate that both
11217 options are enabled by default when specifying -O3.
11219 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11221 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
11222 iterator. Delete separate integer-mode vec_set<mode> expander.
11223 (aarch64_simd_vec_setv2di): Delete.
11224 (vec_setv2di): Delete.
11225 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
11226 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
11227 the "w, r" alternative.
11229 2018-05-18 Martin Liska <mliska@suse.cz>
11231 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
11232 * tree-pass.h (make_pass_lower_switch_O0): New function.
11233 * tree-switch-conversion.c (node_has_low_bound): Remove.
11234 (node_has_high_bound): Likewise.
11235 (node_is_bounded): Likewise.
11236 (class pass_lower_switch): Make it a template type and create
11238 (pass_lower_switch::execute): Add template argument.
11239 (make_pass_lower_switch): New function.
11240 (make_pass_lower_switch_O0): New function.
11241 (do_jump_if_equal): Remove.
11242 (emit_case_nodes): Simplify to just handle all 3 cases and leave
11243 all the hard work to tree optimization passes.
11245 2018-05-18 Martin Liska <mliska@suse.cz>
11247 * dbgcnt.c (limit_low): Renamed from limit.
11248 (limit_high): New variable.
11249 (dbg_cnt_is_enabled): Check for upper limit.
11250 (dbg_cnt): Adjust dumping.
11251 (dbg_cnt_set_limit_by_index): Add new argument for high
11253 (dbg_cnt_set_limit_by_name): Likewise.
11254 (dbg_cnt_process_single_pair): Parse new format.
11255 (dbg_cnt_process_opt): Use strtok.
11256 (dbg_cnt_list_all_counters): Remove 'value' and add
11258 * doc/invoke.texi: Document changes.
11260 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
11262 * doc/sourcebuild.texi (scalar_all_fma): Document.
11263 * tree.def (FMA_EXPR): Delete.
11264 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
11265 * internal-fn.c (ternary_direct): New macro.
11266 (expand_ternary_optab_fn): Likewise.
11267 (direct_ternary_optab_supported_p): Likewise.
11268 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
11269 * builtins.c (fold_builtin_fma): Delete.
11270 (fold_builtin_3): Don't call it.
11271 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
11272 * expr.c (expand_expr_real_2): Likewise.
11273 * fold-const.c (operand_equal_p): Likewise.
11274 (fold_ternary_loc): Likewise.
11275 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
11276 * gimple.c (DEFTREECODE): Likewise.
11277 * gimplify.c (gimplify_expr): Likewise.
11278 * optabs-tree.c (optab_for_tree_code): Likewise.
11279 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
11280 * tree-eh.c (operation_could_trap_p): Likewise.
11281 (stmt_could_throw_1_p): Likewise.
11282 * tree-inline.c (estimate_operator_cost): Likewise.
11283 * tree-pretty-print.c (dump_generic_node): Likewise.
11284 (op_code_prio): Likewise.
11285 * tree-ssa-loop-im.c (stmt_cost): Likewise.
11286 * tree-ssa-operands.c (get_expr_operands): Likewise.
11287 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
11288 * fold-const-call.h (fold_fma): Delete.
11289 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
11290 CFN_FNMA and CFN_FNMS.
11291 (fold_fma): Delete.
11292 * genmatch.c (combined_fn): New enum.
11293 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
11294 (commutative_op): New function.
11295 (commutate): Use it. Handle more than 2 operands.
11296 (dt_operand::gen_gimple_expr): Use commutative_op.
11297 (parser::parse_expr): Allow :c to be used with non-binary
11298 operators if the commutative operand is known.
11299 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
11300 CFN_FMS, CFN_FNMA and CFN_FNMS.
11301 (backprop::process_assign_use): Remove FMA_EXPR handling.
11302 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
11303 (gen_hsa_fma): New function.
11304 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
11305 IFN_FNMA and IFN_FNMS.
11306 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
11307 * gimple-fold.h (follow_all_ssa_edges): Declare.
11308 * gimple-fold.c (follow_all_ssa_edges): New function.
11309 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
11310 gimple_build interface and use follow_all_ssa_edges to fold the result.
11311 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
11312 instead of checking for optabs directly.
11313 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
11314 rather than FMA_EXPRs.
11315 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
11316 call to IFN_FMA instead of an FMA_EXPR.
11318 2018-05-17 Jim Wilson <jimw@sifive.com>
11320 * expr.c (do_tablejump): When converting index to Pmode, if we have a
11321 sign extended promoted subreg, and the range does not have the sign bit
11322 set, then do a sign extend.
11324 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
11325 test, check for sign extended subreg and/or constant operands, and
11326 do a sign extend in that case.
11328 2018-05-17 Steve Ellcey <sellcey@cavium.com>
11330 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
11331 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
11333 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
11334 Change logics_shift_reg to logics_shift_imm.
11335 (thunderx2t99_fp_loadpair_basic): Delete.
11336 (thunderx2t99_fp_storepair_basic): Delete.
11337 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
11338 (thunderx2t99_asimd_polynomial): Delete.
11339 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
11340 and neon_fp_mul_d_scalar_q.
11341 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
11342 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
11343 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
11344 (thunderx2t99_asimd_lut): Add missing tbl types.
11345 (thunderx2t99_asimd_ext): Delete.
11346 (thunderx2t99_asimd_load1_1_mult): Delete.
11347 (thunderx2t99_asimd_load1_2_mult): Delete.
11348 (thunderx2t99_asimd_load1_ldp): New.
11349 (thunderx2t99_asimd_load1): New.
11350 (thunderx2t99_asimd_load2): Add missing *load2* types.
11351 (thunderx2t99_asimd_load3): New.
11352 (thunderx2t99_asimd_load4): New.
11353 (thunderx2t99_asimd_store1_1_mult): Delete.
11354 (thunderx2t99_asimd_store1_2_mult): Delete.
11355 (thunderx2t99_asimd_store2_mult): Delete.
11356 (thunderx2t99_asimd_store2_onelane): Delete.
11357 (thunderx2t99_asimd_store_stp): New.
11358 (thunderx2t99_asimd_store1): New.
11359 (thunderx2t99_asimd_store2): New.
11360 (thunderx2t99_asimd_store3): New.
11361 (thunderx2t99_asimd_store4): New.
11363 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
11365 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
11366 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
11368 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
11369 Segher Boessenkool <segher@kernel.crashing.org>
11372 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
11375 2018-05-17 Richard Biener <rguenther@suse.de>
11377 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
11378 for pruning loop and prune defs feeding only already visited PHIs.
11380 2018-05-17 Richard Biener <rguenther@suse.de>
11382 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
11384 2018-05-17 Bin Cheng <bin.cheng@arm.com>
11385 Richard Biener <rguenther@suse.de>
11387 PR tree-optimization/85793
11388 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
11389 for VMAT_ELEMENTWISE.
11391 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
11393 * internal-fn.h (lookup_internal_fn): Declare
11394 * internal-fn.c (lookup_internal_fn): New function.
11395 * gimple.c (gimple_build_call_from_tree): Handle calls to
11396 internal functions.
11397 * gimple-pretty-print.c (dump_gimple_call): Print "." before
11398 internal function names.
11399 * tree-pretty-print.c (dump_generic_node): Likewise.
11400 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
11402 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
11404 * gimple-fold.h (gimple_build): Make the function forms take
11405 combined_fn rather than built_in_function.
11406 (gimple_simplify): Likewise.
11407 * gimple-match-head.c (gimple_simplify): Likewise.
11408 * gimple-fold.c (gimple_build): Likewise.
11409 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
11410 rather than gimple_build_call_internal.
11411 (get_initial_defs_for_reduction): Likewise.
11412 (vect_create_epilog_for_reduction): Likewise.
11413 (vectorizable_live_operation): Likewise.
11415 2018-05-17 Martin Liska <mliska@suse.cz>
11417 * gimple-ssa-sprintf.c (format_directive): Do not use
11418 space in between 'G_' and '('.
11420 2018-05-17 Jakub Jelinek <jakub@redhat.com>
11423 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
11424 even if the mask is not all ones.
11427 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
11429 (ix86_gimple_fold_builtin): Likewise.
11432 * config/i386/i386.c: Include tree-vector-builder.h.
11433 (ix86_vector_shift_count): New function.
11434 (ix86_fold_builtin): Fold shift builtins by scalar count.
11435 (ix86_gimple_fold_builtin): Likewise.
11437 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
11438 _mm512_setzero): New intrinsics.
11440 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
11441 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11443 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
11444 code generation for cases where splatting a value is not useful.
11445 * simplify-rtx.c (simplify_ternary_operation): Simplify
11446 vec_merge across a vec_duplicate and a paradoxical subreg forming
11447 a vector mode to a vec_concat.
11449 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
11451 * config.gcc: Support "goldmont-plus".
11452 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
11454 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11455 PROCESSOR_GOLDMONT_PLUS.
11456 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
11457 (processor_target_table): Add "goldmont-plus".
11458 (PTA_GOLDMONT_PLUS): Define.
11459 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
11460 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
11461 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
11462 (fold_builtin_cpu): Add "goldmont-plus".
11463 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
11464 (ix86_option_override_internal): Add "goldmont-plus".
11465 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
11466 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
11467 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
11468 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
11470 2018-05-17 Richard Biener <rguenther@suse.de>
11472 PR tree-optimization/85757
11473 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
11474 remove defs that only feed that PHI from further processing.
11476 2018-05-16 Jim Wilson <jimw@sifive.com>
11478 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
11480 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
11482 2018-05-16 Mark Wielaard <mark@klomp.org>
11484 * dwarf2out.c (count_index_strings): New function.
11485 (output_indirect_strings): Call count_index_strings and generate
11486 header for dwarf_version >= 5.
11488 2018-05-16 Mark Wielaard <mark@klomp.org>
11490 * dwarf2out.c (dwarf_FORM): New function.
11491 (set_indirect_string): Use dwarf_FORM.
11492 (reset_indirect_string): Likewise.
11493 (size_of_die): Likewise.
11494 (value_format): Likewise.
11495 (output_die): Likewise.
11496 (add_skeleton_AT_string): Likewise.
11497 (output_macinfo_op): Likewise.
11498 (index_string): Likewise.
11499 (output_index_string_offset): Likewise.
11500 (output_index_string): Likewise.
11501 (count_index_strings): Likewise.
11503 2018-05-16 Carl Love <cel@us.ibm.com>
11505 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
11506 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
11508 2018-05-16 Martin Jambor <mjambor@suse.cz>
11510 * ipa-prop.c (ipa_free_all_edge_args): Remove.
11511 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
11513 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
11515 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
11516 (fnma<mode>4): Likewise.
11517 (fms<mode>4): Likewise.
11518 (fnms<mode>4): Likewise.
11519 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
11520 (aarch64_fnma<mode>4): Likewise.
11521 (aarch64_fms<mode>4): Likewise.
11522 (aarch64_fnms<mode>4): Likewise.
11523 (aarch64_fnmadd<mode>4): Likewise.
11525 2018-05-16 Jason Merrill <jason@redhat.com>
11527 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
11529 2018-05-16 Richard Biener <rguenther@suse.de>
11531 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
11532 (dump_stmt_cost): Declare.
11533 (add_stmt_cost): Dump cost we add.
11534 (add_stmt_costs): New function.
11535 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
11536 No longer exported.
11537 (vect_analyze_stmt): Adjust prototype.
11538 (vectorizable_condition): Likewise.
11539 (vectorizable_live_operation): Likewise.
11540 (vectorizable_reduction): Likewise.
11541 (vectorizable_induction): Likewise.
11542 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
11543 cost vector to pass to vectorizable_ and record afterwards.
11544 (vect_model_reduction_cost): Take cost vector argument and adjust.
11545 (vect_model_induction_cost): Likewise.
11546 (vectorizable_reduction): Likewise.
11547 (vectorizable_induction): Likewise.
11548 (vectorizable_live_operation): Likewise.
11549 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
11550 SLP_TREE_NUMBER_OF_VEC_STMTS.
11551 (vect_analyze_slp_cost_1): Remove.
11552 (vect_analyze_slp_cost): Likewise.
11553 (vect_slp_analyze_node_operations): Take visited args and
11554 a target cost vector. Avoid processing already visited stmt sets.
11555 (vect_slp_analyze_operations): Use a local cost vector to gather
11556 costs and register those of non-discarded instances.
11557 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
11558 (vect_schedule_slp_instance): Remove copying of
11559 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
11561 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
11562 adding cost. Record cost entry location.
11563 (vect_prologue_cost_for_slp_op): Function to compute cost of
11564 a constant or invariant generated for SLP vect in the prologue,
11565 split out from vect_analyze_slp_cost_1.
11566 (vect_model_simple_cost): Make static. Adjust for SLP costing.
11567 (vect_model_promotion_demotion_cost): Likewise.
11568 (vect_model_store_cost): Likewise, make static.
11569 (vect_model_load_cost): Likewise.
11570 (vectorizable_bswap): Add cost vector arg and adjust.
11571 (vectorizable_call): Likewise.
11572 (vectorizable_simd_clone_call): Likewise.
11573 (vectorizable_conversion): Likewise.
11574 (vectorizable_assignment): Likewise.
11575 (vectorizable_shift): Likewise.
11576 (vectorizable_operation): Likewise.
11577 (vectorizable_store): Likewise.
11578 (vectorizable_load): Likewise.
11579 (vectorizable_condition): Likewise.
11580 (vectorizable_comparison): Likewise.
11581 (can_vectorize_live_stmts): Likewise.
11582 (vect_analyze_stmt): Likewise.
11583 (vect_transform_stmt): Adjust calls to vectorizable_*.
11584 * tree-vectorizer.c: Include gimple-pretty-print.h.
11585 (dump_stmt_cost): New function.
11587 2018-05-16 Richard Biener <rguenther@suse.de>
11589 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
11590 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
11591 * tree-ssa-dse.c: Include tree-ssa-loop.h.
11592 (check_name): New callback.
11593 (dse_classify_store): Track cycles via a visited bitmap of PHI
11594 defs and simplify handling of in-loop and across loop dead stores
11595 and properly fail for loop-variant refs. Handle byte-tracking with
11596 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
11599 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
11601 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
11602 (vect_get_mask_type_for_stmt): Likewise.
11603 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
11605 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
11606 to determine the statement's vector type and the vector type that
11607 should be used for calculating nunits. Deal with cases in which
11608 the type has to be deferred.
11609 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
11610 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
11611 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
11612 (vect_determine_vf_for_stmt): New functions, split out from...
11613 (vect_determine_vectorization_factor): ...here.
11614 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
11615 (vect_get_mask_type_for_stmt): New functions, split out from
11616 vect_determine_vectorization_factor.
11618 2018-05-16 Richard Biener <rguenther@suse.de>
11620 * tree-cfg.c (verify_gimple_assign_ternary): Properly
11621 verify the [VEC_]COND_EXPR embedded comparison.
11623 2018-05-15 Martin Sebor <msebor@redhat.com>
11625 PR tree-optimization/85753
11626 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
11627 RECORD_TYPE in addition to ARRAY_TYPE.
11629 2018-05-15 Martin Sebor <msebor@redhat.com>
11631 PR middle-end/85643
11632 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
11634 2018-05-15 Richard Biener <rguenther@suse.de>
11636 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
11637 add by_clobber_p one. Change algorithm to collect all defs
11638 representing uses we need to walk and try reducing them to
11639 a single one before failing.
11640 (dse_dom_walker::dse_optimize_stmt): Adjust.
11642 2018-05-13 Mark Wielaard <mark@klomp.org>
11644 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
11645 (size_of_loc_descr): Likewise.
11646 (output_loc_operands): Likewise.
11647 (output_loc_operands_raw): Likewise.
11648 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
11649 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
11650 (hash_loc_operands): Likewise.
11651 (compare_loc_operands): Likewise.
11653 2018-05-14 Mark Wielaard <mark@klomp.org>
11655 * dwarf2out.c (count_index_addrs): New function.
11656 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
11658 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11660 PR tree-optimization/83648
11661 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
11662 return value as malloc candidate.
11664 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11667 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
11668 param as true in call to suggest_attribute.
11670 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
11672 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
11673 -mreadonly-in-sdata.
11675 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11677 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
11679 (aarch64_crypto_aesd_fused): Likewise.
11681 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
11683 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
11684 (movsi_aarch64): Likewise.
11685 (load_pairsi): Likewise.
11686 (load_pairdi): Likewise.
11687 (store_pairsi): Likewise.
11688 (store_pairdi): Likewise.
11689 (load_pairsf): Likewise.
11690 (load_pairdf): Likewise.
11691 (store_pairsf): Likewise.
11692 (store_pairdf): Likewise.
11693 (zero_extend): Likewise.
11694 (trunc): Swap alternatives.
11695 (fcvt_target): Add '?' to prefer w over r.
11697 2018-05-14 Jakub Jelinek <jakub@redhat.com>
11700 * config/i386/i386.md: Disallow non-commutative arithmetics in
11701 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
11702 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
11703 in the peephole2 before it.
11705 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
11707 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
11708 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
11709 (ix86_handle_option): Handle -mcldemote.
11710 * config.gcc: New header.
11711 * config/i386/cldemoteintrin.h: New file.
11712 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
11713 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
11715 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11716 OPTION_MASK_ISA_CLDEMOTE.
11717 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
11718 (ix86_valid_target_attribute_inner_p): Ditto.
11719 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
11720 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
11721 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
11722 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
11723 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
11725 * config/i386/i386.opt: Add -mcldemote.
11726 * config/i386/x86intrin.h: New header.
11727 * doc/invoke.texi: Add -mcldemote.
11729 2018-05-14 Richard Biener <rguenther@suse.de>
11731 * doc/match-and-simplify.texi: Adjust :s documentation.
11733 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
11735 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
11736 intended memcpy size.
11737 (REORDER_45): Likewise.
11739 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
11741 * sort.cc: New file.
11742 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
11743 * vec.c (qsort_chk): Use gcc_qsort.
11744 * Makefile.in (OBJS-libcommon): Add sort.o.
11745 (build/sort.o): New target. Use it...
11746 (BUILD_RTL): ... here, and...
11747 (build/gencfn-macros): ... here, and...
11748 (build/genmatch): ... here.
11750 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
11751 Chung-Ju Wu <jasonwucj@gmail.com>
11753 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
11754 * config/nds32/nds32-graywolf.md: New file.
11755 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
11756 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
11758 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
11759 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
11760 * config/nds32/nds32.md (pipeline_model): Add graywolf.
11761 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
11762 * config/nds32/pipelines.md: Include n15 settings.
11764 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
11765 Chung-Ju Wu <jasonwucj@gmail.com>
11767 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
11768 * config/nds32/nds32-n13.md: New file.
11769 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
11770 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
11772 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
11773 * config/nds32/nds32.md (pipeline_model): Add n13.
11774 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
11775 * config/nds32/pipelines.md: Include n13 settings.
11777 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
11778 Chung-Ju Wu <jasonwucj@gmail.com>
11780 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
11781 * config/nds32/nds32-n10.md: New file.
11782 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
11783 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
11785 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
11786 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
11787 * config/nds32/nds32.md (pipeline_model): Add n10.
11788 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
11789 * config/nds32/pipelines.md: Include n10 settings.
11791 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
11792 Kito Cheng <kito.cheng@gmail.com>
11793 Chung-Ju Wu <jasonwucj@gmail.com>
11795 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
11796 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11797 Add enum values for DSP extension instructions.
11798 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
11800 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
11801 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
11802 New code iterators.
11803 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
11804 * config/nds32/nds32-dspext.md: New file for DSP implementation.
11805 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
11806 * config/nds32/nds32-intrinsic.md: Likewise.
11807 * config/nds32/nds32_intrinsic.h: Likewise.
11808 * config/nds32/nds32-md-auxiliary.c: Likewise.
11809 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
11810 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
11811 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
11812 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
11813 * config/nds32/nds32-protos.h: New declarations for DSP extension.
11814 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
11815 TYPE_DMAC in switch statement.
11816 * config/nds32/nds32.c: New checking and implementation for DSP
11817 extension instructions.
11818 * config/nds32/nds32.h: Likewise.
11819 * config/nds32/nds32.md: Likewise.
11820 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
11821 * config/nds32/predicates.md: Implement new predicates for DSP
11824 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
11826 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
11827 Reformat alternatives and attributes so it is easier to identify
11828 which constraints/attributes go with which instruction.
11829 (mov<mode>_hardfloat32, FMOVE64): Likewise.
11830 (mov<mode>_softfloat32, FMOVE64): Likewise.
11831 (mov<mode>_hardfloat64, FMOVE64): Likewise.
11832 (mov<mode>_softfloat64, FMOVE64): Likewise.
11834 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
11836 * doc/extend.texi (PowerPC Built-in Functions): Rename this
11838 (Basic PowerPC Built-in Functions): The new name of the
11839 subsection previously known as "PowerPC Built-in Functions".
11840 (Basic PowerPC Built-in Functions Available on all Configurations):
11842 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
11843 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
11844 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
11845 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
11847 2018-05-11 Martin Jambor <mjambor@suse.cz>
11850 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
11853 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
11856 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
11858 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
11860 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
11861 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
11862 (ix86_handle_option): Handle -mwaitpkg.
11863 * config.gcc: New header.
11864 * config/i386/cpuid.h (bit_WAITPKG): New bit.
11865 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
11866 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
11868 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11869 OPTION_MASK_ISA_WAITPKG.
11870 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
11871 (ix86_option_override_internal): Add PTA_WAITPKG.
11872 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
11873 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
11874 IX86_BUILTIN_TPAUSE.
11875 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
11876 __builtin_ia32_umwait and __builtin_ia32_tpause.
11877 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
11878 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
11879 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
11880 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
11881 UNSPECV_TPAUSE): New.
11882 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
11883 * config/i386/i386.opt: Add -mwaitpkg.
11884 * config/i386/waitpkgintrin.h: New file.
11885 * config/i386/x86intrin.h: New header.
11886 * doc/invoke.texi: Add -mwaitpkg.
11888 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
11891 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
11893 (cortex-m0): Use armv6s-m isa.
11894 (cortex-m0plus): Likewise.
11895 (cortex-m1): Likewise.
11896 (cortex-m0.small-multiply): Likewise.
11897 (cortex-m0plus.small-multiply): Likewise.
11898 (cortex-m1.small-multiply): Likewise.
11900 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
11901 Jakub Jelinek <jakub@redhat.com>
11903 PR tree-optimization/85692
11904 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
11905 source permute as well.
11907 2018-05-11 Martin Liska <mliska@suse.cz>
11910 * doc/extend.texi: Document LLVM style format for no_sanitize
11913 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
11915 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
11916 mode_supports_vsx_dform_quad to mode_supports_dq_form.
11917 (mode_supports_vsx_dform_quad): Likewise.
11918 (mode_supports_vmx_dform): Move these functions to be next to the
11919 other mode_supports functions.
11920 (mode_supports_dq_form): Likewise.
11921 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
11922 mode_supports_dq_form.
11923 (reg_offset_addressing_ok_p): Likewise.
11924 (offsettable_ok_by_alignment): Likewise.
11925 (rs6000_legitimate_offset_address_p): Likewise.
11926 (legitimate_lo_sum_address_p): Likewise.
11927 (rs6000_legitimize_address): Likewise.
11928 (rs6000_legitimize_reload_address): Likewise.
11929 (rs6000_secondary_reload_inner): Likewise.
11930 (rs6000_preferred_reload_class): Likewise.
11931 (rs6000_output_move_128bit): Likewise.
11933 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
11935 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
11936 Generate SImode target register for null target.
11937 <case IX86_BUILTIN_XGETBV>: Ditto.
11938 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
11939 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
11941 2018-05-10 Carl Love <cel@us.ibm.com>
11943 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
11944 dcbtt and dcbtstt if operands[2] is 0.
11946 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
11949 * config/i386/sse.md (usadv64qi): New expander.
11951 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
11953 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
11954 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
11955 -maltivec=be support.
11956 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
11957 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
11958 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
11959 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
11960 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
11961 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
11962 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
11963 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
11964 altivec_vsumsws): Adjust.
11965 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
11966 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
11967 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
11969 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
11970 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
11971 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
11972 (altivec_lve<VI_char>x): Delete expand.
11973 (*altivec_lve<VI_char>x_internal): Rename to...
11974 (altivec_lve<VI_char>x): ... this.
11975 (altivec_lvxl_<mode>): Delete expand.
11976 (*altivec_lvxl_<mode>_internal): Rename to ...
11977 (altivec_lvxl_<mode>): ... this.
11978 (altivec_stvxl_<mode>): Delete expand.
11979 (*altivec_stvxl_<mode>_internal): Rename to ...
11980 (altivec_stvxl_<mode>): ... this.
11981 (altivec_stve<VI_char>x): Delete expand.
11982 (*altivec_stve<VI_char>x_internal): Rename to ...
11983 (altivec_stve<VI_char>x): ... this.
11984 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
11985 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
11986 reduc_plus_scal_<mode>): Adjust.
11987 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
11989 (rs6000_cpu_cpp_builtins): Adjust.
11990 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
11991 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
11992 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
11993 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
11994 -maltivec=be support.
11995 (rs6000_split_vec_extract_var): Adjust.
11996 (rs6000_split_v4si_init): Adjust.
11997 (swap_selector_for_mode): Delete.
11998 (altivec_expand_lvx_be, altivec_expand_stvx_be,
11999 altivec_expand_stvex_be): Delete.
12000 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
12001 -maltivec=be support.
12002 (rs6000_gimple_fold_builtin): Ditto.
12003 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
12005 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
12006 (TARGET_DIRECT_MOVE_64BIT): Adjust.
12007 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
12008 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
12009 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
12010 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
12011 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
12012 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
12013 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
12014 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
12015 anonymous split): Adjust.
12016 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
12017 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
12019 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
12021 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
12022 when --with-gxx-include-dir is also specified.
12023 * configure: Regenerate.
12025 2018-05-09 Jim Wilson <jimw@sifive.com>
12028 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
12029 * config/riscv/t-withmultilib: New.
12030 * config/riscv/withmultilib.h: New.
12031 * doc/install.texi: Document RISC-V --with-multilib-list support.
12033 2018-05-09 Richard Biener <rguenther@suse.de>
12035 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
12037 (vect_bb_vectorization_profitable_p): Adjust. Compute
12038 actual scalar cost using the cost vector and the add_stmt_cost
12041 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12043 PR rtl-optimization/85645
12044 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
12045 in the REG_CFA_REGISTER note for LR, don't leave it empty.
12047 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12049 PR rtl-optimization/85645
12050 * shrink-wrap.c (spread_components): Return a boolean saying if
12051 anything was changed.
12052 (try_shrink_wrapping_separate): Iterate spread_components until
12053 nothing changes anymore.
12055 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12057 PR rtl-optimization/85645
12058 * regrename.c (build_def_use): Also kill the chains that include the
12059 destination of a REG_CFA_REGISTER note.
12061 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12063 PR rtl-optimization/85645
12064 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
12065 insn that has a REG_CFA_REGISTER note.
12067 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
12069 * cfgexpand.c (expand_clobber): New function.
12070 (expand_gimple_stmt_1): Use it.
12071 * tree-vect-stmts.c (vect_clobber_variable): New function,
12073 (vectorizable_simd_clone_call): ...here.
12074 (vectorizable_store): Emit a clobber either side of an
12075 IFN_STORE_LANES sequence.
12076 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
12078 2018-05-09 Tom de Vries <tom@codesourcery.com>
12081 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
12082 (define_insn "trap_if_false"): Add exit after trap.
12084 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
12086 PR rtl-optimization/85638
12087 * bb-reorder.c: Include common/common-target.h.
12088 (create_forwarder_block): New function extracted from...
12089 (fix_up_crossing_landing_pad): ...here. Rename into...
12090 (dw2_fix_up_crossing_landing_pad): ...this.
12091 (sjlj_fix_up_crossing_landing_pad): New function.
12092 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
12093 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
12094 from both partitions and exit the loop after one iteration.
12096 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
12099 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12101 (Basic PowerPC Built-in Functions): The new name of the
12102 subsection previously known as "PowerPC Built-in Functions".
12103 (Basic PowerPC Built-in Functions Available on all Configurations):
12105 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
12107 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
12109 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
12111 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
12114 2018-05-08 Jim Wilson <jimw@sifive.com>
12116 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
12117 (LD_EMUL_SUFFIX): New.
12118 (LINK_SPEC): Use it.
12120 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
12122 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12124 (Basic PowerPC Built-in Functions): The new name of the
12125 subsection previously known as "PowerPC Built-in Functions".
12126 (Basic PowerPC Built-in Functions Available on all Configurations):
12128 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
12130 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
12132 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
12134 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
12137 2018-05-08 Jakub Jelinek <jakub@redhat.com>
12140 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
12141 after cmpelim optimization.
12143 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
12145 * config.gcc: Support "goldmont".
12146 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
12147 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12148 PROCESSOR_GOLDMONT.
12149 * config/i386/i386.c (m_GOLDMONT): Define.
12150 (processor_target_table): Add "goldmont".
12151 (PTA_GOLDMONT): Define.
12152 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
12153 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
12154 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
12155 (fold_builtin_cpu): Add "goldmont".
12156 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
12157 (ix86_option_override_internal): Add "goldmont".
12158 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
12159 (processor_type): Add PROCESSOR_GOLDMONT.
12160 * config/i386/i386.md: Add CPU "glm".
12161 * config/i386/glm.md: New file.
12162 * config/i386/x86-tune.def: Add m_GOLDMONT.
12163 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
12165 2018-05-08 Jakub Jelinek <jakub@redhat.com>
12168 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
12170 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
12171 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
12172 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
12175 * config/i386/i386.c (ix86_fold_builtin): Handle
12176 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
12179 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
12180 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
12182 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
12185 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
12186 (check_arch): Likewise.
12187 (check_fpu): Return the result rather than printing it.
12188 (end arch): Fix operator precedence.
12189 (end cpu): Likewise.
12190 (END): Print the result from check_fpu.
12192 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
12193 Alan Hayward <alan.hayward@arm.com>
12194 David Sherwood <david.sherwood@arm.com>
12196 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
12197 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
12198 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
12199 (*fcmuo<mode>_and): New patterns.
12201 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
12203 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
12204 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
12205 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
12206 (cmp_op, sve_imm_con): New code attributes.
12207 (SVE_COND_INT_CMP, imm_con): Delete.
12208 (cmp_op): Remove above unspecs from int attribute.
12209 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
12211 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
12212 comparison-specific unspecs.
12213 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
12214 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
12215 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
12216 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
12217 (*vec_fcm<cmp_op><mode>): Rename to...
12218 (*fcm<cmp_op><mode>): ...this and adjust likewise.
12219 (*vec_fcmuo<mode>): Rename to...
12220 (*fcmuo<mode>): ...this and adjust likewise.
12221 (*pred_fcm<cmp_op><mode>): New pattern.
12222 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
12223 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
12225 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
12227 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
12228 (aarch64_emit_sve_predicated_cond): New function.
12229 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
12230 (aarch64_emit_unspec_cond_or): Replace with...
12231 (aarch64_emit_sve_or_conds): ...this new function. Use
12232 aarch64_emit_sve_ptrue_op for the individual comparisons and
12233 aarch64_emit_binop to OR them together.
12234 (aarch64_emit_inverted_unspec_cond): Replace with...
12235 (aarch64_emit_sve_inverted_cond): ...this new function. Use
12236 aarch64_emit_sve_ptrue_op for the comparison and
12237 aarch64_emit_unop to invert the result.
12238 (aarch64_expand_sve_vec_cmp_float): Update after the above
12239 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
12241 2018-05-07 Nathan Sidwell <nathan@acm.org>
12243 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
12244 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
12245 (Backwards Compatibility): Likewise.
12247 2018-05-07 Luis Machado <luis.machado@linaro.org>
12251 2018-05-07 Luis Machado <luis.machado@linaro.org>
12253 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12254 <prefetch_dynamic_strides>: New const bool field.
12255 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12256 prefetch_dynamic_strides.
12257 (exynosm1_prefetch_tune): Likewise.
12258 (thunderxt88_prefetch_tune): Likewise.
12259 (thunderx_prefetch_tune): Likewise.
12260 (thunderx2t99_prefetch_tune): Likewise.
12261 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
12263 (aarch64_override_options_internal): Update to set
12264 PARAM_PREFETCH_DYNAMIC_STRIDES.
12265 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12266 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12267 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12268 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12269 prefetch-dynamic-strides setting.
12271 2018-05-07 Luis Machado <luis.machado@linaro.org>
12273 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12274 <minimum_stride>: New const int field.
12275 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12276 minimum_stride field.
12277 (exynosm1_prefetch_tune): Likewise.
12278 (thunderxt88_prefetch_tune): Likewise.
12279 (thunderx_prefetch_tune): Likewise.
12280 (thunderx2t99_prefetch_tune): Likewise.
12281 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
12282 (aarch64_override_options_internal): Update to set
12283 PARAM_PREFETCH_MINIMUM_STRIDE.
12284 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12285 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12286 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12287 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12288 stride is constant and is below the minimum stride threshold.
12290 2018-05-07 Luis Machado <luis.machado@linaro.org>
12292 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
12295 2018-05-07 Luis Machado <luis.machado@linaro.org>
12297 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12298 <prefetch_dynamic_strides>: New const bool field.
12299 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12300 prefetch_dynamic_strides.
12301 (exynosm1_prefetch_tune): Likewise.
12302 (thunderxt88_prefetch_tune): Likewise.
12303 (thunderx_prefetch_tune): Likewise.
12304 (thunderx2t99_prefetch_tune): Likewise.
12305 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
12307 (aarch64_override_options_internal): Update to set
12308 PARAM_PREFETCH_DYNAMIC_STRIDES.
12309 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12310 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12311 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12312 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12313 prefetch-dynamic-strides setting.
12315 2018-05-07 Luis Machado <luis.machado@linaro.org>
12317 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12318 <minimum_stride>: New const int field.
12319 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12320 minimum_stride field.
12321 (exynosm1_prefetch_tune): Likewise.
12322 (thunderxt88_prefetch_tune): Likewise.
12323 (thunderx_prefetch_tune): Likewise.
12324 (thunderx2t99_prefetch_tune): Likewise.
12325 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
12326 (aarch64_override_options_internal): Update to set
12327 PARAM_PREFETCH_MINIMUM_STRIDE.
12328 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12329 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12330 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12331 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12332 stride is constant and is below the minimum stride threshold.
12334 2018-05-06 Jakub Jelinek <jakub@redhat.com>
12337 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
12338 the type is addressable. Don't force op into register if it has
12341 2018-05-05 Roland McGrath <mcgrathr@google.com>
12344 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
12345 any section for which we don't know a specific type it should have,
12346 regardless of name. Previously this was done only for the exact
12347 names ".init_array", ".fini_array", and ".preinit_array".
12348 (default_elf_asm_named_section): Add comment about
12349 relationship with default_section_type_flags and SECTION_NOTYPE.
12350 (get_section): Don't consider it a type conflict if one side has
12351 SECTION_NOTYPE and the other doesn't, as long as neither has the
12352 SECTION_BSS et al used in the default_section_type_flags logic.
12354 2018-05-05 Tom de Vries <tom@codesourcery.com>
12357 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
12358 (workaround_barsyncs): New function.
12359 (nvptx_reorg): Use workaround_barsyncs.
12360 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
12361 (define_expand "nvptx_membar_cta"): New define_expand.
12362 (define_insn "*nvptx_membar_cta"): New insn.
12364 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
12366 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
12367 To improve optimization opportunities.
12368 * builtin-types.def: The new needed builtin types for the above.
12370 2018-05-04 Richard Biener <rguenther@suse.de>
12372 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
12373 * gimple-ssa-store-merging.c
12374 (imm_store_chain_info::output_merged_store): Remove redundant create,
12375 release split_store vector contents on failure.
12376 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
12377 scalar stmt vector on cache hit.
12379 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
12381 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
12383 * config.gcc (powerpc-xilinx-eabi*): Remove.
12384 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
12386 (fusion_addis_mem_combo_load): Ditto.
12387 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
12389 (rs6000_cpu_cpp_builtins): Ditto.
12390 * config/rs6000/rs6000-linux.c
12391 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
12392 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
12393 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
12395 (rs6000_setup_reg_addr_masks): Ditto.
12396 (rs6000_init_hard_regno_mode_ok): Ditto.
12397 (rs6000_option_override_internal): Ditto.
12398 (legitimate_lo_sum_address_p): Ditto.
12399 (rs6000_legitimize_address): Ditto.
12400 (rs6000_legitimize_reload_address): Ditto.
12401 (rs6000_legitimate_address_p): Ditto.
12402 (abi_v4_pass_in_fpr): Ditto.
12403 (setup_incoming_varargs): Ditto.
12404 (rs6000_gimplify_va_arg): Ditto.
12405 (rs6000_split_multireg_move): Ditto.
12406 (rs6000_savres_strategy): Ditto.
12407 (rs6000_emit_prologue_components): Ditto.
12408 (rs6000_emit_epilogue_components): Ditto.
12409 (rs6000_emit_prologue): Ditto.
12410 (rs6000_emit_epilogue): Ditto.
12411 (rs6000_elf_file_end): Ditto.
12412 (rs6000_function_value): Ditto.
12413 (rs6000_libcall_value): Ditto.
12414 * config/rs6000/rs6000.h: Ditto.
12415 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
12416 (TARGET_MINMAX): ... this. New.
12417 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
12418 * config/rs6000/rs6000.md: Remove Xilinx FP support.
12419 (*movsi_internal1_single): Delete.
12420 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
12421 mfpu=, mxilinx-fpu): Delete.
12422 * config/rs6000/singlefp.h: Delete.
12423 * config/rs6000/sysv4.h: Remove Xilinx FP support.
12424 * config/rs6000/t-rs6000: Ditto.
12425 * config/rs6000/t-xilinx: Delete.
12426 * config/rs6000/titan.md: Adjust for fp_type removal.
12427 * config/rs6000/vsx.md: Remove Xilinx FP support.
12428 (VStype_simple): Delete.
12429 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
12430 * config/rs6000/xfpu.h: Delete.
12431 * config/rs6000/xfpu.md: Delete.
12432 * config/rs6000/xilinx.h: Delete.
12433 * config/rs6000/xilinx.opt: Delete.
12434 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
12435 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
12437 2018-05-04 Tom de Vries <tom@codesourcery.com>
12440 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
12443 2018-05-04 Richard Biener <rguenther@suse.de>
12445 PR middle-end/85627
12446 * tree-complex.c (update_complex_assignment): We are always in SSA form.
12447 (expand_complex_div_wide): Likewise.
12448 (expand_complex_operations_1): Likewise.
12449 (expand_complex_libcall): Preserve EH info of the original stmt.
12450 (tree_lower_complex): Handle removed blocks.
12451 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
12452 on complex multiplication and division libcall builtins.
12454 2018-05-04 Richard Biener <rguenther@suse.de>
12456 PR middle-end/85574
12457 * fold-const.c (negate_expr_p): Restrict negation of operand
12458 zero of a division to when we know that can happen without
12460 (fold_negate_expr_1): Likewise.
12462 2018-05-04 Jakub Jelinek <jakub@redhat.com>
12465 * real.h (real_nextafter): Declare.
12466 * real.c (real_nextafter): New function.
12467 * fold-const-call.c (fold_const_nextafter): New function.
12468 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
12469 CASE_CFN_NEXTTOWARD.
12470 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
12471 even when arg1_mode is different from arg0_mode.
12473 2018-05-03 Nathan Sidwell <nathan@acm.org>
12475 * doc/extend.texi (Deprecated Features): Remove
12476 -ffriend-injection.
12477 (Backwards Compatibility): Likewise.
12478 * doc/invoke.texi (C++ Language Options): Likewise.
12479 (C++ Dialect Options): Likewise.
12481 2018-05-03 Jakub Jelinek <jakub@redhat.com>
12484 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
12485 _mm512_mask_mullox_epi64): New intrinsics.
12487 2018-05-03 Tom de Vries <tom@codesourcery.com>
12490 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12491 dump files): Add offload-tree.
12493 2018-05-03 Richard Biener <rguenther@suse.de>
12495 PR tree-optimization/85615
12496 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
12497 to loops not nested in BBs loop father to avoid creating multi-entry
12500 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12502 PR tree-optimization/70291
12503 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
12504 arguments. Change return type to tree. Emit libcall as a new
12505 statement rather than replacing existing one when inplace_p is true.
12506 (expand_complex_multiplication_components): New function.
12507 (expand_complex_multiplication): Expand floating-point complex
12508 multiplication using the above.
12509 (expand_complex_division): Rename inner_type parameter to type.
12510 Update expand_complex_libcall call-site.
12511 (expand_complex_operations_1): Update expand_complex_multiplication
12512 and expand_complex_division call-sites.
12514 2018-05-02 Jakub Jelinek <jakub@redhat.com>
12517 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
12518 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
12519 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
12520 the highest significant bit of the shift count mask is clear. In
12521 check whether and[sq]i3 is needed verify that all significant bits
12522 of the shift count other than the highest are set.
12524 2018-05-02 Tom de Vries <tom@codesourcery.com>
12527 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
12528 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
12529 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
12530 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
12531 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
12532 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
12533 __builtin_goacc_parlevel_size.
12535 2018-05-02 Richard Biener <rguenther@suse.de>
12537 PR tree-optimization/85597
12538 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
12539 do not use split vect_get_vec_defs call but call vect_get_slp_defs
12542 2018-05-02 Tom de Vries <tom@codesourcery.com>
12545 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12546 dump files): Add ltrans-tree.
12548 2018-05-02 Tom de Vries <tom@codesourcery.com>
12551 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12552 dump files): Add wpa-ipa.
12554 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
12556 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
12557 powerpc*-*-linux*paired* target.
12558 * config/rs6000/750cl.h: Delete.
12559 * config/rs6000/paired.h: Delete.
12560 * config/rs6000/paired.md: Delete.
12561 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
12563 * config/rs6000/rs6000-builtin.def: Remove paired float support.
12564 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
12565 comment. Remove paired float support.
12566 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
12567 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
12569 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
12570 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
12572 * config/rs6000/rs6000.c: Remove paired float support.
12573 (paired_expand_vector_init, paired_expand_vector_move,
12574 paired_emit_vector_compare, paired_emit_vector_cond_expr,
12575 (paired_expand_lv_builtin, paired_expand_stv_builtin,
12576 paired_expand_builtin, paired_expand_predicate_builtin,
12577 paired_init_builtins): Delete.
12578 * config/rs6000/rs6000.h: Remove paired float support.
12579 * config/rs6000/rs6000.md: Remove paired float support.
12580 (move_from_CR_ov_bit): Delete.
12581 * config/rs6000/rs6000.opt (mpaired): Delete.
12582 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
12583 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
12585 2018-05-02 Richard Biener <rguenther@suse.de>
12587 PR middle-end/85567
12588 * gimplify.c (gimplify_save_expr): When in SSA form allow
12589 SAVE_EXPRs to compute to SSA vars.
12591 2018-05-02 Jakub Jelinek <jakub@redhat.com>
12594 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
12595 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
12596 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
12597 clobber operands[2], instead use a new pseudo. Formatting fixes.
12599 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
12601 PR tree-optimization/85586
12602 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
12603 exit early for statements in the same group if the accesses are
12606 2018-05-02 Tom de Vries <tom@codesourcery.com>
12609 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
12612 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
12614 PR tree-optimization/85143
12615 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
12617 2018-05-01 Tom de Vries <tom@codesourcery.com>
12620 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
12621 not found" error message.
12623 2018-05-01 Tom de Vries <tom@codesourcery.com>
12626 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
12627 * vec.c (test_ordered_remove_if): New function.
12628 (vec_c_tests): Call test_ordered_remove_if.
12629 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
12630 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
12631 * tree-vect-patterns.c (vect_pattern_recog_1): Use
12632 VEC_ORDERED_REMOVE_IF.
12634 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12636 PR tree-optimization/82665
12637 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
12638 pointer subtraction where arguments come from a memchr call.
12640 2018-05-01 Jakub Jelinek <jakub@redhat.com>
12642 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
12643 --push-state --as-needed and --pop-state instead of --as-needed and
12644 --no-as-needed if ld supports it.
12645 * configure: Regenerated.
12648 * doc/install.texi2html: Replace _002d with - and _002a with * in
12649 generated html files using sed.
12651 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12654 * gcc-rich-location.c (blank_line_before_p): New function.
12655 (use_new_line): New function.
12656 (gcc_rich_location::add_fixit_insert_formatted): New function.
12657 * gcc-rich-location.h
12658 (gcc_rich_location::add_fixit_insert_formatted): New function.
12660 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12662 * selftest.c (assert_streq): Rename "expected" and "actual" to
12663 "val1" and "val2". Extend NULL-handling to cover both inputs
12664 symmetrically, while still requiring both to be non-NULL for a pass.
12665 * selftest.h (assert_streq): Rename "expected" and "actual" to
12667 (ASSERT_EQ): Likewise.
12668 (ASSERT_EQ_AT): Likewise.
12669 (ASSERT_KNOWN_EQ): Likewise.
12670 (ASSERT_KNOWN_EQ_AT): Likewise.
12671 (ASSERT_NE): Likewise.
12672 (ASSERT_MAYBE_NE): Likewise.
12673 (ASSERT_MAYBE_NE_AT): Likewise.
12674 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
12675 the assertion to pass.
12676 (ASSERT_STREQ_AT): Likewise.
12678 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
12680 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
12681 interaction with -pie.
12683 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12685 * selftest.h: Fix alphabetization of per-source-file selftest
12688 2018-04-30 Jason Merrill <jason@redhat.com>
12690 PR c++/61982 - dead stores to destroyed objects.
12691 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
12694 2018-04-30 Jason Merrill <jason@redhat.com>
12696 * tree.c (build_clobber): New.
12697 * tree.h: Declare it.
12698 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
12700 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12702 * diagnostic-show-locus.c (layout::layout): Update for
12703 location_get_source_line returning a char_span.
12704 (struct char_span): Move to input.h.
12705 (struct correction): Update for fields in char_span becoming
12707 (struct source_line): Update for location_get_source_line
12708 returning a char_span.
12709 (layout::print_line): Likewise.
12710 * edit-context.c (edited_file::print_content): Likewise.
12711 (edited_file::print_diff_hunk): Likewise.
12712 (edited_file::print_run_of_changed_lines): Likewise.
12713 (edited_file::get_num_lines): Likewise.
12714 (edited_line::edited_line): Likewise.
12715 * final.c (asm_show_source): Likewise.
12716 * input.c (location_get_source_line): Convert return type
12717 from const char * to char_span, losing the final "line_len"
12719 (dump_location_info): Update for the above.
12720 (get_substring_ranges_for_loc): Likewise. Use a char_span
12721 when handling the literal within the line.
12722 (test_reading_source_line): Update for location_get_source_line
12723 returning a char_span.
12724 * input.h (class char_span): Move here from
12725 diagnostic-show-locus.c, converting from a struct to a class.
12726 Make data members private.
12727 (char_span::operator bool): New.
12728 (char_span::length): New.
12729 (char_span::get_buffer): New.
12730 (char_span::operator[]): New.
12731 (char_span::subspan): Make const.
12732 (char_span::xstrdup): New.
12733 (location_get_source_line): Convert return type from const char *
12734 to char_span, losing the final "line_size" param.
12736 2018-04-30 Jan Hubicka <jh@suse.cz>
12738 * lto-wrapper.c (ltrans_priorities): New static var.
12739 (cmp_priority): New.
12740 (run_gcc): Read priorities and if doing parallel build order
12741 the Makefile by them.
12743 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12745 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
12747 2018-04-30 Richard Biener <rguenther@suse.de>
12749 * tree-cfg.c (verify_address): Remove base argument, add
12750 flag whether to check TREE_ADDRESSABLE and do that.
12751 (verify_expr): Remove.
12752 (verify_types_in_gimple_reference): Add pieces from verify_expr.
12753 (verify_gimple_assign_single): Likewise.
12754 (verify_gimple_switch): Likewise.
12755 (verify_expr_location_1): Dereference tp once. Add (disabled)
12756 piece from verify_expr.
12757 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
12759 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
12761 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
12763 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
12765 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
12766 (small_data_pattern): Likewise.
12767 (arc_rewrite_small_data): Likewise.
12768 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
12769 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
12770 (get_symbol_alignment): New function.
12771 (legitimate_small_data_address_p): Likewise.
12772 (legitimate_scaled_address): Update, call
12773 legitimate_small_data_address_p.
12774 (output_sdata): New static variable.
12775 (arc_print_operand): Update how we handle small data operands.
12776 (arc_print_operand_address): Likewise.
12777 (arc_legitimate_address_p): Update, use
12778 legitimate_small_data_address_p.
12779 (arc_rewrite_small_data_p): Remove.
12780 (arc_rewrite_small_data_1): Likewise.
12781 (arc_rewrite_small_data): Likewise.
12782 (small_data_pattern): Likewise.
12783 (compact_sda_memory_operand): Update to use
12784 legitimate_small_data_address_p and get_symbol_alignment.
12785 (prepare_move_operands): Don't rewite sdata pattern.
12786 (prepare_extend_operands): Remove.
12787 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
12789 (zero_extendqisi2): Likewise.
12790 (zero_extendhisi2): Likewise.
12791 (extendqihi2): Likewise.
12792 (extendqisi2): Likewise.
12793 (extendhisi2): Likewise.
12794 (addsi3): Likewise.
12795 (subsi3): Likewise.
12796 (andsi3): Likewise.
12797 * config/arc/constraints.md (Usd): Change it to memory constraint.
12799 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
12801 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
12802 as source of std instructions.
12803 * config/arc/arc.md (movsi_insn): Update pattern predicate to
12804 allow 6-bit constants as source for store instructions.
12805 (movdi_insn): Update instruction pattern to allow 6-bit constants
12806 as source for store instructions.
12808 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
12810 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
12812 2018-04-30 Nathan Sidwell <nathan@acm.org>
12813 Sandra Loosemore <sandra@codesourcery.com>
12815 * dumpfile.c (dump_open): Allow '-' for stdout.
12816 * doc/invoke.texi (Developer Options): Document dump filename
12817 determination early. Document stdin/stdout selection.
12819 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
12821 Microblaze Target: PIC data text relative
12823 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
12824 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
12826 * config/microblaze/microblaze.h (microblaze_constant_address_p):
12827 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
12828 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
12829 New addressing mode for data-text relative position indepenedent code.
12830 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
12831 'ADDRESS_SYMBOLIC_TXT_REL'.
12832 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
12833 (microblaze_legitimate_pic_operand): Exclude function calls from
12834 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
12835 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
12837 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
12838 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
12839 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
12840 for 'address + offset'.
12841 (microblaze_expand_prologue): Add new function prologue call for
12843 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
12844 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
12845 table in case of TARGET_PIC_DATA_TEXT_REL.
12846 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
12847 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
12848 Add new macros 'UNSPEC_TEXT',
12849 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
12850 + exclude function calls from 'UNSPEC_PLT' in case of data text
12852 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
12853 new target hook for generating address diff vector tables in case of
12855 * doc/tm.texi : Regenerate.
12856 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
12857 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
12858 of addr diff vector generation.
12859 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
12860 target hook definition.
12861 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
12862 Add default function for generate_pic_addr_diff_vec -> flag_pic.
12863 * doc/invoke.texi (Add new pic option): Add new microblaze pic
12864 option for data text relative.
12866 2018-04-30 Richard Biener <rguenther@suse.de>
12868 * tree-chrec.h (evolution_function_is_constant_p): Remove
12870 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
12872 2018-04-30 Richard Biener <rguenther@suse.de>
12875 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
12877 2018-04-30 Richard Biener <rguenther@suse.de>
12879 PR tree-optimization/28364
12880 PR tree-optimization/85275
12881 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
12882 copying first exit test.
12884 2018-04-28 Mark Wielaard <mark@klomp.org>
12886 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
12887 dwarf_version >= 5.
12888 (dwarf_AT): Handle DW_AT_addr_base.
12889 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
12891 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
12894 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
12895 (*ashl<dwi>3_doubleword_mask_1): Ditto.
12896 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
12897 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
12899 2018-04-28 Richard Biener <rguenther@suse.de>
12901 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
12902 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
12903 to reflect use. Only add interesting stmts.
12905 2018-04-27 Martin Jambor <mjambor@suse.cz>
12908 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
12909 the jump function allows for passing through aggregate values.
12911 2018-04-27 David Malcolm <dmalcolm@redhat.com>
12913 * input.h (in_system_header_at): Convert from macro to inline
12915 (from_macro_expansion_at): Likewise.
12916 (from_macro_definition_at): Likewise.
12918 2018-04-27 Jeff Law <law@redhat.com>
12920 * config.gcc: Mark tile* targets as deprecated/obsolete.
12922 2018-04-27 Richard Biener <rguenther@suse.de>
12924 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
12927 2018-04-27 Richard Biener <rguenther@suse.de>
12929 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
12931 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
12933 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
12934 with Yd constraint. Set "preferred_for_speed" attribute from
12935 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
12936 with Yd constraint.
12937 (*movdi_internal): Ditto.
12938 (movti_interunit splitters): Remove
12939 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
12940 (movdi_interunit splitters): Ditto.
12941 * config/i386/constraints.md (Ye): Remove.
12942 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
12944 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12947 * config/aarch64/constraints.md (Usg): Limit to 31.
12948 (Usj): Limit to 63.
12950 2018-04-27 Jakub Jelinek <jakub@redhat.com>
12952 PR tree-optimization/85529
12953 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
12954 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
12955 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
12956 zero extension or masking of the MSB bit.
12957 (optimize_range_tests): Add FIRST_BB argument, pass it through
12958 to optimize_range_tests_var_bound.
12959 (maybe_optimize_range_tests, reassociate_bb): Adjust
12960 optimize_range_tests callers.
12962 2018-04-26 Richard Biener <rguenther@suse.de>
12963 Jakub Jelinek <jakub@redhat.com>
12965 * cgraph.h (symbol_table): Just declare debug method here.
12966 * symtab.c (symbol_table::debug): Define.
12968 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
12970 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
12972 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
12974 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
12975 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
12976 (*movdi_internal): Substitute Yi and Yj constraint with x
12977 and Ym and Yn constraint with y constraint. Update "isa"
12978 attribute and set "preferred_for_speed" attribute from
12979 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
12980 (*movsi_internal): Ditto.
12981 (*movdf_internal): Ditto.
12982 (*movsf_internal): Ditto.
12983 (*zero_extendsidi2): Ditto.
12984 * config/i386/sse.md (vec_set<mode>_0): Ditto.
12985 (sse2_loadld): Ditto.
12986 (*vec_extract<ssevecmodelower>_0): Ditto.
12987 (*vec_extractv4si_0_zext_sse4): Ditto.
12988 (vec_concatv2di): Ditto.
12989 (*vec_dup<mode>): Ditto.
12990 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
12991 * config/i386/constraints.md (Yi): Remove.
12996 2018-04-26 Nathan Sidwell <nathan@acm.org>
12998 * dumpfile.c (dump_open): New.
12999 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
13000 (dump_finish): Detect stdio/stderr by value not name.
13002 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
13004 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
13006 2018-04-26 Tom de Vries <tom@codesourcery.com>
13009 * config/nvptx/nvptx.c (verify_neutering_jumps)
13010 (verify_neutering_labels): New function
13011 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
13013 2018-04-26 Tom de Vries <tom@codesourcery.com>
13016 * config/nvptx/nvptx.c (needs_neutering_p): New function.
13017 (nvptx_single): Use needs_neutering_p to skip over insns that do not
13020 2018-04-26 Richard Biener <rguenther@suse.de>
13021 Tom de Vries <tom@codesourcery.com>
13024 * lto-streamer-out.c (output_function): Fixup loops if required to match
13025 discovery done in the reader.
13027 2018-04-26 Richard Biener <rguenther@suse.de>
13029 PR tree-optimization/85116
13030 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
13031 have a loop exit from the single latch predecessor. Remove
13032 case of header with just condition.
13033 (ch_base::copy_headers): Exclude infinite loops from any
13035 (pass_ch::execute): Record exits.
13037 2018-04-26 Richard Biener <rguenther@suse.de>
13039 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
13040 prologue cost vector and pass it to vect_get_load_cost.
13041 (vect_get_peeling_costs_all_drs): Likewise.
13042 (vect_peeling_hash_get_lowest_cost): Likewise.
13043 (vect_enhance_data_refs_alignment): Likewise.
13045 2018-04-26 Richard Biener <rguenther@suse.de>
13047 PR middle-end/85450
13048 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
13049 checking of integer<->pointer conversions.
13050 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
13051 sign-/zero-extending pointer types.
13052 (expand_omp_for_static_chunk): Likewise.
13054 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
13055 Jean Lee <xiaoyur347@gmail.com>
13057 * config/mips/mips.c (mips_asan_shadow_offset): New function.
13058 (TARGET_ASAN_SHADOW_OFFSET): Define.
13059 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
13060 true for -fsanitize=address.
13062 2018-04-25 Mark Wielaard <mark@klomp.org>
13064 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
13067 2018-04-25 Jakub Jelinek <jakub@redhat.com>
13069 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
13070 than "alu", remove explicit "memory" and "imm_disp" attributes.
13071 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
13073 PR middle-end/85414
13074 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
13075 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
13076 gen_lowpart_no_emit.
13078 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
13081 * config/i386/i386.c (ix86_expand_builtin): Change memory
13082 operand to XI, extend p0 to Pmode.
13083 * config/i386/i386.md: Change unspec volatile and operand
13084 1 mode to XI, change operand 0 mode to P.
13086 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13088 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
13089 GET_MODE_MASK before any checking.
13090 (nds32_can_use_bset_p): Likewise.
13091 (nds32_can_use_btgl_p): Likewise.
13093 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13095 * config/nds32/nds32-doubleword.md: New define_split pattern for
13096 illegal register number.
13098 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13100 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
13102 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13104 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
13106 2018-04-25 Richard Biener <rguenther@suse.de>
13108 * lto-streamer.h (LTO_major_version): Bump to 8.
13110 2018-04-25 Jakub Jelinek <jakub@redhat.com>
13112 * BASE-VER: Set to 9.0.0.
13114 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
13116 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
13117 in __abskf2 and __powikf2.
13119 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13122 * config/aarch64/constraints.md (Usg, Usj): New constraints.
13123 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
13124 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
13125 Use the above on operand 2. Reindent.
13126 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
13128 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
13131 * common/config/i386/i386-common.c (ix86_handle_option): Don't
13133 * config/i386/i386.opt (mcet): Removed.
13134 * doc/install.texi: Remove -mcet documentation.
13135 * doc/invoke.texi: Likewise.
13137 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
13140 * doc/install.texi: Remove -mcet from bootstrap-cet.
13142 2018-04-24 Jakub Jelinek <jakub@redhat.com>
13145 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
13146 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
13150 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
13151 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
13152 containing a CONST_VECTOR.
13154 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
13156 * doc/install.texi: Update newlib dependency for nvptx.
13158 2018-04-24 Jakub Jelinek <jakub@redhat.com>
13161 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
13162 instead of INTVAL when shifting x left.
13164 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
13166 PR tree-optimization/85478
13167 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
13168 vect_grouped_store_supported for single element vectors.
13170 2018-04-24 Richard Biener <rguenther@suse.de>
13173 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
13174 load cost increase to the case of non-constant step.
13176 2018-04-24 Jakub Jelinek <jakub@redhat.com>
13179 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
13180 destination if any_malformed_asm.
13182 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
13184 PR middle-end/85496
13185 * expr.c (store_field): In the bitfield case, if the value comes from
13186 a function call and is returned in registers by means of a PARALLEL,
13187 do not change the mode of the temporary unless BLKmode and VOIDmode.
13189 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
13191 PR rtl-optimization/85423
13192 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
13193 dependencies to debug insns when the previous insn is non-debug.
13195 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
13197 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
13198 enums into a single definition.
13199 (fls): Fix predicates and printing.
13202 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
13204 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
13205 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
13206 and short u6 immediate.
13207 (check_if_valid_sleep_operand): Remove.
13208 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
13210 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13212 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
13213 flag_always_save_lp condition.
13214 * config/nds32/nds32.opt (malways-save-lp): New option.
13216 2018-04-22 Shiva Chen <shiva0217@gmail.com>
13218 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
13219 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
13220 * config/nds32/nds32.h
13221 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
13222 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
13224 2018-04-22 Shiva Chen <shiva0217@gmail.com>
13226 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
13227 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
13229 2018-04-22 Shiva Chen <shiva0217@gmail.com>
13230 Chung-Ju Wu <jasonwucj@gmail.com>
13232 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
13234 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
13235 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
13237 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13239 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
13241 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13243 * config/nds32/nds32-protos.h (nds32_data_alignment,
13244 nds32_local_alignment): Declare.
13245 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
13246 nds32_local_alignment): New functions.
13247 (TARGET_CONSTANT_ALIGNMENT): Define.
13248 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
13250 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13252 * config/nds32/nds32.c
13253 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
13254 (TARGET_MODES_TIEABLE_P): Likewise.
13256 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13258 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
13259 level Ofast and Og.
13261 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
13262 Chung-Ju Wu <jasonwucj@gmail.com>
13264 * config/nds32/constants.md (unspec_volatile_element): Add enum values
13265 for unaligned access.
13266 * config/nds32/nds32-intrinsic.c: Implementation of expanding
13268 * config/nds32/nds32-intrinsic.md: Likewise.
13269 * config/nds32/nds32_intrinsic.h: Likewise.
13270 * config/nds32/nds32.h (nds32_builtins): Likewise.
13271 * config/nds32/nds32.opt (munaligned-access): New option.
13272 * config/nds32/nds32.c (nds32_asm_file_start): Display
13273 flag_unaligned_access status.
13275 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
13277 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
13278 -mno-relax is present.
13279 * config/riscv/linux.h (LINK_SPEC): Ditto.
13281 2018-04-20 Martin Sebor <msebor@redhat.com>
13284 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
13286 (gimple_fold_builtin_stxcpy_chk): Same.
13287 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
13289 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
13292 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
13293 __powikf2 when long double is IEEE 128-bit.
13295 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
13297 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
13298 step to make sure stack always aligned.
13300 2018-04-20 Carl Love <cel@us.ibm.com>
13303 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
13304 size check for arg0.
13306 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
13307 Tom de Vries <tom@codesourcery.com>
13310 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
13311 Emit insns for calls too.
13312 (nvptx_find_par): Always look for worker-level predecessor insn.
13313 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
13315 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
13316 (nvptx_process_pars): Propagate frames for calls.
13318 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
13321 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
13323 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
13324 (ix86_handle_option): Don't handle OPT_mibt.
13325 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
13327 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
13329 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
13330 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
13331 (ix86_target_macros): Define __CET__ with flag_cf_protection
13332 for -fcf-protection.
13333 * config/i386/i386.c (isa2_opts): Remove -mibt.
13334 * config/i386/i386.h (TARGET_IBT): Removed.
13335 (TARGET_IBT_P): Likewise.
13336 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
13337 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
13338 * config/i386/i386.opt (mcet): Update help message.
13339 (mshstk): Likewise.
13341 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
13342 -mcet as an alias for -mshstk.
13344 2018-04-20 Richard Biener <rguenther@suse.de>
13346 PR middle-end/85475
13347 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
13348 complexity by forcing a single use of the multiply operand.
13350 2018-04-20 Martin Jambor <mjambor@suse.cz>
13353 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
13354 recursion dependency to only apply to non-clones.
13356 2018-04-20 Martin Jambor <mjambor@suse.cz>
13359 * ipa-cp.c (create_specialized_node): Check that clones of
13360 self-recursive edges exist during IPA-CP.
13362 2018-04-19 Toon Moene <toon@moene.org>
13364 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
13367 2018-04-19 Jakub Jelinek <jakub@redhat.com>
13369 PR tree-optimization/85467
13370 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
13371 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
13372 VECTOR_CST element to type.
13374 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
13377 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
13378 * config/i386/i386.md (builtin_setjmp_setup): Removed.
13379 (builtin_longjmp): Likewise.
13380 (save_stack_nonlocal): New pattern.
13381 (restore_stack_nonlocal): Likewise.
13383 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
13386 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
13387 Replace ASM_OUTPUT_LABEL with fprintf.
13389 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
13392 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
13393 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
13394 * config/i386/i386-c.c (ix86_target_macros_internal): Also
13395 define __IBT__ and __SHSTK__ for -fcf-protection.
13396 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
13398 (ix86_trampoline_init): Likewise.
13399 (x86_output_mi_thunk): Likewise.
13400 (ix86_notrack_prefixed_insn_p): Likewise.
13401 (ix86_option_override_internal): Don't disallow -fcf-protection.
13402 * config/i386/i386.md (rdssp<mode>): Also enable for
13404 (incssp<mode>): Likewise.
13405 (nop_endbr): Likewise.
13406 * config/i386/i386.opt (mcet): Change help message to built-in
13409 (mshstk): Likewise.
13410 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
13411 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
13412 enable CET built-in functions.
13414 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
13416 * common/config/i386/i386-common.c
13417 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
13418 OPTION_MASK_ISA_MOVDIRI_UNSET,
13419 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
13420 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
13421 * config.gcc (movdirintrin.h): New header.
13422 * config/i386/cpuid.h (bit_MOVDIRI,
13423 bit_MOVDIR64B): New bits.
13424 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
13426 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
13427 (VOID, PVOID, PCVOID)): New function types.
13428 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
13429 __builtin_ia32_directstoreu_u64,
13430 __builtin_ia32_movdir64b): New builtins.
13431 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
13432 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
13434 (ix86_valid_target_attribute_inner_p): Ditto.
13435 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
13436 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
13437 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
13438 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
13439 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
13440 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
13441 (movdiri<mode>, movdir64b_<mode>): New.
13442 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
13443 * config/i386/immintrin.h: Include movdirintrin.h.
13444 * config/i386/movdirintrin.h: New file.
13445 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
13447 2018-04-19 Richard Biener <rguenther@suse.de>
13449 PR middle-end/85455
13450 * cfg.c (clear_bb_flags): When loop state says we have
13451 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
13453 2018-04-19 Richard Biener <rguenther@suse.de>
13455 PR tree-optimization/84737
13456 * tree-vect-data-refs.c (vect_copy_ref_info): New function
13457 copying restrict info.
13458 (vect_setup_realignment): Use it.
13459 * tree-vectorizer.h (vect_copy_ref_info): Declare.
13460 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
13461 the first DR to all generated stores.
13462 (vectorizable_load): Likewise for loads.
13464 2018-04-19 Jakub Jelinek <jakub@redhat.com>
13466 PR tree-optimization/85446
13467 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
13468 the integral and pointer types to have the same precision.
13470 * doc/install.texi: Document --disable-cet being the default and
13473 2018-04-18 Martin Liska <mliska@suse.cz>
13475 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
13478 2018-04-18 Martin Liska <mliska@suse.cz>
13481 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
13484 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
13485 arguments if they are comparable.
13487 2018-04-18 Martin Liska <mliska@suse.cz>
13490 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
13493 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
13496 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
13499 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
13500 ENDBR after calling __morestack.
13502 2018-04-18 David Malcolm <dmalcolm@redhat.com>
13505 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
13506 by using gcc_base_ver to generate a gcc_driver_version, and use
13507 it when generating GCC_DRIVER_NAME.
13508 * configure: Regenerate.
13510 2018-04-18 Jakub Jelinek <jakub@redhat.com>
13513 * config.gcc: Obsolete powerpc*-*-*spe*.
13515 2018-04-17 Jakub Jelinek <jakub@redhat.com>
13518 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
13519 (stabstr_D): Change type of unum from unsigned int to
13520 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
13523 2018-04-17 Jim Wilson <jimw@sifive.com>
13526 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
13527 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
13528 Set arg_pointer_offset after using pretend_args_size.
13530 2018-04-17 Jakub Jelinek <jakub@redhat.com>
13532 PR rtl-optimization/85431
13533 * dse.c (record_store): Ignore zero width stores.
13536 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
13537 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
13538 __builtin_stack_restore rather than after it.
13539 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
13540 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
13541 argument instead of virtual_dynamic_stack_rtx.
13543 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
13545 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
13547 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
13548 Add note to error message to explain internal mapping of overloaded
13549 built-in function name to non-overloaded built-in function name.
13550 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
13553 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
13556 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
13557 where the inputs overlap with the output.
13559 2018-04-17 Jakub Jelinek <jakub@redhat.com>
13561 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
13562 (=v, v) alternative and explicit "memory" attribute.
13563 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
13564 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
13566 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
13567 "sselog1" type instead of "sselog".
13568 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
13569 "sselog". Remove explicit "memory" attribute.
13570 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
13571 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
13573 (vec_extract_hi_v32hi): Merge all alternatives into one, use
13574 "sselog1" type instead of "sselog". Remove explicit "memory"
13576 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
13577 use "sselog1" type instead of "sselog". Remove explicit "memory"
13579 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
13580 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
13582 (vec_extract_hi_v64qi): Merge all alternatives into one, use
13583 "sselog1" type instead of "sselog". Remove explicit "memory"
13585 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
13586 use "sselog1" type instead of "sselog". Remove explicit "memory"
13590 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
13592 PR middle-end/85414
13593 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
13596 2018-04-17 Martin Jambor <mjambor@suse.cz>
13599 * ipa-cp.c (create_specialized_node): Call
13600 expand_all_artificial_thunks if necessary.
13602 2018-04-17 Martin Liska <mliska@suse.cz>
13605 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
13606 in message, remote space in between '_G' and '('.
13608 2018-04-17 Jakub Jelinek <jakub@redhat.com>
13611 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
13612 avx512f_vmcmp<mode>3<round_saeonly_name>,
13613 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
13614 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
13615 avx512f_rndscale<mode><round_saeonly_name>,
13616 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
13617 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
13618 Use %<iptr>2 instead of %2 for -masm=intel.
13619 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
13620 avx512f_vcvttss2usi<round_saeonly_name>,
13621 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
13623 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
13624 avx512f_vcvttsd2usi<round_saeonly_name>,
13625 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
13626 Use %q1 instead of %1 for -masm=intel.
13627 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
13628 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
13629 of %3 for -masm=intel.
13630 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
13632 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
13634 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
13636 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
13637 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
13639 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
13641 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
13642 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
13643 %g1 and one with %0 and %1.
13644 (avx512er_vmrcp28<mode><round_saeonly_name>,
13645 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
13646 %1 for -masm=intel.
13647 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
13648 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
13649 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
13650 of %0 and %{%4%} for -masm=intel.
13651 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
13652 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
13653 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
13654 order of %0 and %{%5%}%{z%} for -masm=intel.
13656 2018-04-17 Jan Hubicka <jh@suse.cz>
13659 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
13661 2018-04-17 Martin Liska <mliska@suse.cz>
13664 * multiple_target.c (create_dispatcher_calls): Set apostrophes
13665 for target_clone error message. Make default implementation
13666 clone to be a local declaration.
13667 (separate_attrs): Add new argument and check for an empty
13669 (expand_target_clones): Handle it.
13670 (ipa_target_clone): Make redirection just for target_clones
13673 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
13674 Tom de Vries <tom@codesourcery.com>
13676 PR middle-end/84955
13677 * omp-expand.c (expand_oacc_for): Add dummy false branch for
13678 tiled basic blocks without omp continue statements.
13680 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
13683 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
13684 vec_extract expression as having side effects to make sure it gets
13687 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
13690 * config/i386/i386.c (get_builtin_code_for_version): Check
13693 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
13696 * config.gcc: Support "skylake".
13697 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13699 * config/i386/i386.c (m_SKYLAKE): Define.
13700 (processor_target_table): Add "skylake".
13701 (ix86_option_override_internal): Add "skylake".
13702 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
13703 PROCESSOR_CANNONLAKE.
13704 (get_builtin_code_for_version): Fix priority for
13705 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
13706 PROCESSOR_SKYLAKE-AVX512.
13707 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
13708 (processor_type): Add PROCESSOR_SKYLAKE.
13710 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
13711 Jason Merrill <jason@redhat.com>
13714 * convert.c (convert_to_integer_1): Use direct recursion for
13715 enumeral types and types with a precision less than the number
13716 of bits in their mode.
13718 2018-04-16 Julia Koval <julia.koval@intel.com>
13721 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
13722 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
13724 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
13727 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
13728 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
13729 and -mno-direct-move.
13731 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
13734 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
13735 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
13736 Ensure negative shifts result in {0}.
13738 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
13740 PR rtl-optimization/79916
13741 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
13742 regs (if any) to define how to gnerate SD moves when LRA is in
13745 2018-04-13 Jakub Jelinek <jakub@redhat.com>
13747 PR rtl-optimization/85393
13748 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
13749 * except.c (expand_dw2_landing_pad_for_region): Make static.
13750 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
13751 a label and unconditional jump to old_bb, rather than
13752 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
13755 PR rtl-optimization/85376
13756 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
13757 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
13758 instead of a specific value.
13760 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
13761 Bin Cheng <bin.cheng@arm.com>
13763 PR tree-optimization/82965
13764 PR tree-optimization/83991
13765 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
13766 by_profile_only parameter.
13767 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
13768 information if the loop was predicted to iterate too many times.
13769 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
13771 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
13774 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
13777 2018-04-13 Martin Liska <mliska@suse.cz>
13778 Jakub Jelinek <jakub@redhat.com>
13780 PR middle-end/81657
13781 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
13782 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
13783 * builtins.c (expand_builtin_memory_copy_args): Use
13784 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
13785 handle dest_addr == pc_rtx.
13787 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
13790 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
13791 asked to not generate direct moves.
13792 (fix_trunc<mode>si2_stfiwx): Similar.
13793 (fix_trunc<mode>si2_internal): Similar.
13795 2018-04-12 Jakub Jelinek <jakub@redhat.com>
13798 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
13799 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
13800 lookup if dest in some wider mode is known to be const0_rtx and
13801 if so, record permanent equivalence for it to be ZERO_EXTEND of
13802 the narrower mode destination.
13804 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
13806 * lto-streamer-out.c (output_function): Revert 259346.
13807 * omp-expand.c (expand_oacc_for): Likewise.
13809 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
13811 PR rtl-optimization/85354
13812 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
13813 * sel-sched.c (sel_global_init): ... here.
13815 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
13818 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
13819 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
13820 mode for PE-COFF targets.
13821 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
13822 (i386_pe_asm_lto_end): Likewise.
13823 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
13824 (TARGET_ASM_LTO_END): Likewise.
13825 * config/i386/winnt.c (saved_debug_info_level): New static variable.
13826 (i386_pe_asm_lto_start): New function.
13827 (i386_pe_asm_lto_end): Likewise.
13829 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
13830 Richard Biener <rguenther@suse.de>
13832 PR middle-end/84955
13833 * lto-streamer-out.c (output_function): Fix CFG loop state before
13835 * omp-expand.c (expand_oacc_for): Handle calls to internal
13836 functions like regular functions.
13838 2018-04-12 Richard Biener <rguenther@suse.de>
13841 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
13842 for the early LTO debug to properly generate references to it
13843 during DIE emission. Do not re-use that for the skeleton for
13845 (dwarf2out_early_finish): Likewise.
13847 2018-04-12 Jakub Jelinek <jakub@redhat.com>
13850 * config/i386/sse.md
13851 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
13852 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
13853 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
13854 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
13855 and output is a reg, avoid creating invalid lowpart subreg, but
13856 instead split into a 512-bit move. Don't split if not AVX512VL,
13857 input is xmm16+ reg and output is a mem.
13858 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
13859 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
13860 xmm16+ reg and output is a mem.
13862 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
13864 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
13865 also for flag_dwarf2_cfi_asm.
13867 2018-04-12 Jakub Jelinek <jakub@redhat.com>
13869 PR rtl-optimization/85342
13870 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
13871 a bool scalar var inside of the loop instead. Don't try to update
13872 recog_data.operand after failed apply_change_group.
13874 2018-04-12 Tom de Vries <tom@codesourcery.com>
13877 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
13878 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
13879 array with flexible array member as array without given dimension.
13880 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
13881 argument for undefined param to true.
13883 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
13886 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
13887 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
13888 from PowerPC section.
13889 * config/rs6000/sysv4.opt (mcall-): Improve help text.
13890 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
13891 help text that is too long.
13892 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
13893 help text that is too long.
13894 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
13895 help text that is too long.
13897 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
13899 * config/alpha/alpha.md (stack_probe_internal): Rename
13900 from "probe_stack". Update all callers.
13902 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
13904 PR rtl-optimization/84566
13905 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
13906 sched_macro_fuse_insns.
13908 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
13911 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
13912 (compute_block_dependences): ... from here.
13914 2018-04-11 Jakub Jelinek <jakub@redhat.com>
13916 PR tree-optimization/85331
13917 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
13918 from int to HOST_WIDE_INT.
13920 2018-04-11 Martin Jambor <mjambor@suse.cz>
13923 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
13924 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
13925 not the same as the source val.
13926 (cgraph_edge_brings_value_p): New parameter.
13927 (gather_edges_for_value): Pass destination value to
13928 cgraph_edge_brings_value_p.
13929 (perhaps_add_new_callers): Likewise.
13930 (get_info_about_necessary_edges): Likewise and exclude values brought
13931 only by self-recursive edges.
13932 (create_specialized_node): Redirect only clones of self-calling edges.
13933 (+self_recursive_pass_through_p): New function.
13934 (find_more_scalar_values_for_callers_subset): Use it.
13935 (find_aggregate_values_for_callers_subset): Likewise.
13936 (known_aggs_to_agg_replacement_list): Removed.
13937 (decide_whether_version_node): Re-calculate known constants for all
13938 remaining context clones.
13940 2018-04-11 Richard Biener <rguenther@suse.de>
13943 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
13944 from early DWARF output.
13945 (dwarf2out_early_finish): Output line info unconditionally into
13946 early DWARF and add reference to it.
13948 2018-04-11 Jakub Jelinek <jakub@redhat.com>
13951 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
13952 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
13953 other than V2DFmode using iptr mode attribute.
13954 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
13956 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
13958 PR rtl-optimization/84659
13959 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
13961 2018-04-11 Jakub Jelinek <jakub@redhat.com>
13964 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
13966 (output_loc_list): Pass address of a dummy size variable even in the
13967 locview handling loop.
13968 (index_location_lists): Add comment on why skip_loc_list_entry can't
13971 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
13974 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
13977 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
13980 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
13981 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
13982 and -mstring-compare-inline-limit.
13984 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
13987 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
13988 for stack clash protection in a register whenever we need it to be in
13991 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
13993 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
13994 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
13996 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
13999 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
14001 (mlong-double-): Ditto.
14002 * config/rs6000/sysv4.opt (msdata=): Ditto.
14003 (mtls-size=): Ditto.
14005 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
14007 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
14008 erroneous entries for
14009 "vector int vec_ldl (int, long int *)", and
14010 "vector unsigned int vec_ldl (int, unsigned long int *)".
14011 Add comments and entries for
14012 "vector bool char vec_ldl (int, bool char *)",
14013 "vector bool short vec_ldl (int, bool short *)",
14014 "vector bool int vec_ldl (int, bool int *)",
14015 "vector bool long long vec_ldl (int, bool long long *)",
14016 "vector pixel vec_ldl (int, pixel *)",
14017 "vector long long vec_ldl (int, long long *)",
14018 "vector unsigned long long vec_ldl (int, unsigned long long *)".
14019 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
14020 type tree bool_long_long_type_node and correct definition of
14021 bool_V2DI_type_node to make reference to this new type tree.
14022 (rs6000_mangle_type): Replace erroneous reference to
14023 bool_long_type_node with bool_long_long_type_node.
14024 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
14025 comments to emphasize sign distinctions for char and int types and
14026 replace RS6000_BTI_bool_long constant with
14027 RS6000_BTI_bool_long_long constant. Also add comment to restrict
14028 use of RS6000_BTI_pixel.
14029 (bool_long_type_node): Remove this macro definition.
14030 (bool_long_long_type_node): New macro definition
14032 2018-04-10 Jakub Jelinek <jakub@redhat.com>
14034 PR rtl-optimization/85300
14035 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
14036 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
14037 simplify_unary_operation fails.
14039 2018-04-10 Martin Liska <mliska@suse.cz>
14041 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
14042 cgraph_edge and ipa_ref.
14044 2018-04-10 Jakub Jelinek <jakub@redhat.com>
14048 * config/i386/sse.md
14049 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
14050 computation of the VEC_MERGE selector from mask.
14051 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
14052 Fix decoding of the VEC_MERGE selector into mask.
14054 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
14056 PR tree-optimization/85286
14057 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
14059 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
14061 * final.c (final_1): Set insn_last_address as well as
14062 insn_current_address.
14064 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14067 * explow.c (emit_stack_probe): Call validize_mem on memory location
14068 before passing it to gen_probe_stack. Create address operand and
14069 legitimize it for the probe_stack_address case.
14071 2018-04-09 Jan Hubicka <jh@suse.cz>
14074 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
14075 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
14076 * tree.c (free_lang_data_in_type): Fix handling of binfos;
14078 (free_lang_data): Rebuild type inheritance graph.
14080 2018-04-09 Martin Sebor <msebor@redhat.com>
14082 * invoke.texi (-finline-small-functions): Mention other optimization
14084 (-findirect-inlining, -fpartial-inlining): Same.
14085 (-finline-functions-called-once): Same.
14086 (-freorder-blocks-and-partition): Same.
14088 2018-04-09 Jan Hubicka <jh@suse.cz>
14091 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
14092 jumps; choose last target that matches the criteria (i.e.
14093 no partition changes for non-crossing jumps).
14094 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
14095 support for redirecting crossing jumps to non-crossing.
14097 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
14099 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
14100 also for naked functions.
14102 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
14104 * config/arc/arc.md (add_shift): New pattern.
14105 (add_shift2): Likewise.
14106 (sub_shift): Likewise.
14107 (sub_shift_cmp0_noout): Likewise.
14108 (compare_si_ashiftsi): Likewise.
14109 (xbfu_cmp0_noout): New combine pattern.
14110 (xbfu_cmp0"): Likewise.
14111 (movsi_set_cc_insn): Place the predicable variant first.
14112 (commutative_binary_cmp0_noout): Remove clobber.
14113 (commutative_binary_cmp0): New pattern.
14114 (noncommutative_binary_cmp0): Likewise.
14115 (noncommutative_binary_cmp0_noout): Likewise.
14116 (noncommutative_binary_comparison_result_used): Removed.
14117 (rsub_cmp0): New pattern.
14118 (rsub_cmp0_noout): Likewise.
14119 (extzvsi): Changed, keep only meaningful variants.
14120 (SQH, SEZ): New iterators.
14121 (SQH_postfix): New mode attribute.
14122 (SEZ_prefix): New code attribute.
14123 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
14124 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
14125 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
14126 of numerical value.
14127 (noncommutative_operator): Check the availability of barrel
14130 2018-04-09 Richard Biener <rguenther@suse.de>
14132 PR tree-optimization/85284
14133 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
14134 Only use the niter constraining form of simple_iv when the exit
14135 is always executed.
14137 2018-04-09 Tom de Vries <tom@codesourcery.com>
14140 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
14141 (define_expand "*memory_barrier"): New define_expand.
14142 (define_insn "memory_barrier"): New insn.
14144 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14146 PR rtl-optimization/80463
14147 PR rtl-optimization/83972
14148 PR rtl-optimization/83480
14150 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
14151 correct producer for the insn.
14152 (tidy_control_flow): Fixup seqnos in case of debug insns.
14154 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14156 PR rtl-optimization/83913
14158 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
14159 different sched-times when merging exprs.
14161 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14163 PR rtl-optimization/83962
14165 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
14166 tidy_fallthru_edge and tidy_control_flow.
14168 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14170 PR rtl-optimization/83530
14172 * sel-sched.c (force_next_insn): New global variable.
14173 (remove_insn_for_debug): When force_next_insn is true, also leave only
14174 next insn in the ready list.
14175 (sel_sched_region): When the region wasn't scheduled, make another pass
14176 over it with force_next_insn set to 1.
14178 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
14180 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
14182 * config/nds32/constants.md (unspec_volatile_element): Add enum values
14183 for interrupt control.
14184 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
14185 functions for interrupt control.
14186 * config/nds32/nds32-intrinsic.md: Likewise.
14187 * config/nds32/nds32_intrinsic.h: Likewise.
14188 * config/nds32/nds32.h (nds32_builtins): Likewise.
14190 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
14192 * config/nds32/nds32.c (nds32_init_machine_status,
14193 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
14194 strict_aligned_p field.
14195 (nds32_expand_to_rtl_hook): New function.
14196 (TARGET_EXPAND_TO_RTL_HOOK): Define.
14197 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
14199 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14200 Chung-Ju Wu <jasonwucj@gmail.com>
14202 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
14203 * config/nds32/nds32-n7.md: New file.
14204 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
14205 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
14207 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
14208 * config/nds32/nds32.md (pipeline_model): Add n7.
14209 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
14210 * config/nds32/pipelines.md: Include n7 settings.
14212 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14213 Chung-Ju Wu <jasonwucj@gmail.com>
14215 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
14216 * config/nds32/nds32-e8.md: New file.
14217 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
14218 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
14220 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
14221 * config/nds32/nds32.md (pipeline_model): Add e8.
14222 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
14223 * config/nds32/pipelines.md: Include e8 settings.
14225 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14226 Chung-Ju Wu <jasonwucj@gmail.com>
14228 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
14229 * config/nds32/nds32-n8.md: New file.
14230 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
14231 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
14233 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
14234 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
14235 * config/nds32/nds32.md (pipeline_model): Add n8.
14236 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
14237 * config/nds32/pipelines.md: Include n8 settings.
14239 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14240 Chung-Ju Wu <jasonwucj@gmail.com>
14242 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
14243 * config/nds32/nds32-n9-2r1w.md: New file.
14244 * config/nds32/nds32-n9-3r2w.md: New file.
14245 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
14246 nds32_register_ports): New or modify for cpu n9.
14247 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
14249 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
14250 * config/nds32/nds32-utils.c: New file.
14251 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
14252 TARGET_MUL_SLOW): Define.
14253 * config/nds32/nds32.md (pipeline_model): New attribute.
14254 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
14255 New options that support cpu n9.
14256 * config/nds32/pipelines.md: Include n9 settings.
14257 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
14259 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
14261 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
14262 information if necessary.
14263 (output_cond_branch_compare_zero): Likewise.
14264 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
14265 (nds32_target_alignment): Refine for alignment.
14266 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
14267 (FUNCTION_BOUNDARY): Modify.
14268 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
14270 * config/nds32/nds32.opt (malways-align, malign-functions): New.
14272 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
14274 * config/nds32/constants.md (unspec_volatile_element): Add values for
14275 TLB operation and data prefetch.
14276 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
14277 functions for TLB operation and data prefetch.
14278 * config/nds32/nds32-intrinsic.md: Likewise.
14279 * config/nds32/nds32_intrinsic.h: Likewise.
14280 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
14281 (nds32_print_operand): Likewise.
14282 * config/nds32/nds32.h (nds32_builtins): Likewise.
14284 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
14285 Andrew Pinski <pinsika@gcc.gnu.org>
14287 PR middle-end/82976
14288 * match.pd: Use constant_boolean_node of correct type instead of
14289 boolean_true_node or boolean_false_node for simplifying
14290 pointer comparisons to zero.
14292 2018-04-07 Jakub Jelinek <jakub@redhat.com>
14294 PR tree-optimization/80021
14295 * tree.c (verify_type_variant): Make error call in verify_variant_match
14296 translatable and remove final full stop.
14298 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14300 * config/nds32/constants.md (unspec_volatile_element): Add
14301 UNSPEC_VOLATILE_EH_RETURN.
14302 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
14303 nds32_output_stack_pop): Support dwarf exception handling process.
14304 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
14305 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
14306 exception handling process.
14307 (nds32_compute_stack_frame): Likewise.
14308 (nds32_return_addr_rtx): Likewise.
14309 (nds32_initial_elimination_offset): Likewise.
14310 (nds32_expand_prologue): Likewise.
14311 (nds32_expand_epilogue): Likewise.
14312 (nds32_dynamic_chain_address): New function.
14313 * config/nds32/nds32.h (machine_function): Add fields for dwarf
14314 exception handling.
14315 (DYNAMIC_CHAIN_ADDRESS): Define.
14316 (EH_RETURN_DATA_REGNO): Define.
14317 (EH_RETURN_STACKADJ_RTX): Define.
14318 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
14319 patterns for dwarf exception handling.
14321 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14323 * config/nds32/nds32.h: Clean up obsolete macros.
14325 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14327 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
14328 Add enum values for particular instructions.
14329 * config/nds32/nds32-intrinsic.c: Implementation of expanding
14330 particular intrinsic functions.
14331 * config/nds32/nds32-intrinsic.md: Likewise.
14332 * config/nds32/nds32_intrinsic.h: Likewise.
14333 * config/nds32/nds32.h (nds32_builtins): Likewise.
14334 * config/nds32/nds32.md (type): Add pbsad and pbsada.
14335 (btst, ave): New patterns for particular instructions.
14337 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14339 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
14340 Add enum values for atomic load/store and memory sync.
14341 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
14343 * config/nds32/nds32-intrinsic.md: Likewise.
14344 * config/nds32/nds32_intrinsic.h: Likewise.
14345 * config/nds32/nds32.h (nds32_builtins): Likewise.
14347 2018-04-07 Jakub Jelinek <jakub@redhat.com>
14349 PR tree-optimization/85257
14350 * fold-const.c (native_encode_vector): If not all elts could fit
14351 and off is -1, return 0 rather than offset.
14352 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
14353 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
14354 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
14355 adjust buffer in native_interpret_expr call.
14357 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14359 * config/nds32/constants.md (unspec_volatile_element): Add cache
14360 control enum values.
14361 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
14362 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
14363 * config/nds32/nds32.c (nds32_cctl_names): New.
14364 (nds32_print_operand): Handle cache control register names.
14365 * config/nds32/nds32.h (nds32_builtins): New enum values.
14366 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
14368 * config/nds32/nds32.md (type): Add mmu.
14369 * config/nds32/pipelines.md (simple_insn): Add mmu.
14371 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14373 * config/nds32/nds32.md (type): Remove call.
14374 * config/nds32/pipelines.md (simple_insn): Likewise.
14376 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14378 * config/nds32/constants.md (unspec_volatile_element): Add
14379 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
14380 UNSPEC_VOLATILE_FMFCFG.
14381 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
14382 description for fmfcfg and fmfcsr.
14383 (bdesc_1arg): Add fmtcsr.
14384 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
14385 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
14386 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
14387 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
14388 unspec_fmfcfg): New patterns.
14389 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
14390 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
14391 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
14392 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
14393 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
14394 __nds32__fmfcfg): Define.
14396 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14398 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
14399 intrinsic register names.
14400 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
14401 intrinsic register enum values and macros.
14403 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14405 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
14406 for load/store addressing form.
14407 (nds32_print_operand_address): Likewise.
14409 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
14412 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
14413 based on LABEL_REF. Remove useless assertion.
14414 (pic_address_needs_scratch): Fix formatting.
14415 (sparc_legitimize_pic_address): Minor tweaks.
14416 (sparc_delegitimize_address): Adjust assertion accordingly.
14417 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
14418 into symbolic_operand.
14419 (movsi_high_pic_label_ref): Likewise.
14420 (movsi_lo_sum_pic_label_ref): Likewise.
14421 (movdi_pic_label_ref): Likewise.
14422 (movdi_high_pic_label_ref): Likewise.
14423 (movdi_lo_sum_pic_label_ref): Likewise.
14425 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
14427 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
14428 custom LIB_SPEC setup.
14430 2018-04-06 Ruslan Bukin <br@bsdpad.com>
14431 Kito Cheng <kito.cheng@gmail.com>
14433 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
14434 * config/riscv/freebsd.h: New.
14436 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
14438 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
14439 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
14442 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
14443 Kito Cheng <kito.cheng@gmail.com>
14445 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
14446 nds32_output_call, nds32_symbol_binds_local_p): New functions.
14447 * config/nds32/nds32-protos.h (nds32_output_call,
14448 nds32_output_return): Declare.
14449 * config/nds32/nds32.md: Refine all the call and return patterns.
14451 2018-04-06 Jakub Jelinek <jakub@redhat.com>
14454 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
14455 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
14457 PR rtl-optimization/84872
14458 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
14459 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
14460 EDGE_CROSSING edge.
14462 2018-04-06 Tamar Christina <tamar.christina@arm.com>
14464 * expr.c (copy_blkmode_to_reg): Revert 254862.
14465 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
14467 2018-04-06 Richard Biener <rguenther@suse.de>
14469 PR middle-end/85244
14470 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
14471 after seeing a component reference with an adjacent field. Treat
14472 refs to arrays at struct end of external decls similar to
14473 refs to unconstrained commons.
14475 2018-04-06 Jakub Jelinek <jakub@redhat.com>
14478 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
14479 look through SAVE_EXPRs with non-side-effects argument. Adjust
14481 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
14484 2018-04-06 Richard Biener <rguenther@suse.de>
14486 PR middle-end/85180
14487 * alias.c (find_base_term): New wrapper around find_base_term
14488 unwinding CSELIB_VAL_PTR changes.
14489 (find_base_term): Do not restore CSELIB_VAL_PTR during the
14492 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14494 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
14496 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
14497 constant definitions.
14498 ("nop"): lr 0,0 -> nopr r0
14499 ("nop_lr0", "nop_lr1"): New insn definitions.
14501 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
14503 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
14504 NDS32_V3PUSH_AVAILABLE_P macro.
14506 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
14507 Chung-Ju Wu <jasonwucj@gmail.com>
14509 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
14510 (nds32*-*-*): Add float and fpu_config into supported_defaults.
14511 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
14512 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
14513 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
14514 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
14515 * config/nds32/constraints.md: New constraints and checking for hard
14516 float configuration.
14517 * config/nds32/iterators.md: New mode iterator and attribute for hard
14518 float configuration.
14519 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
14521 * config/nds32/nds32-fpu.md: New file.
14522 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
14523 deal with hard float code generation.
14524 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
14526 (abi_type, float_reg_number): New enum type.
14527 * config/nds32/nds32-predicates.c: New predicates for hard float.
14528 * config/nds32/nds32-protos.h: Declare functions for hard float.
14529 * config/nds32/nds32.c: Implementation for hard float configuration.
14530 * config/nds32/nds32.h: Definitions for hard float configuration.
14531 * config/nds32/nds32.md: Include hard float machine description and
14532 modify patterns for hard float configuration.
14533 * config/nds32/nds32.opt: New options for hard float configuration.
14534 * config/nds32/predicates.md: New predicates for hard float
14537 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
14539 * common/config/nds32/nds32-common.c
14540 (nds32_option_optimization_table): Enable -mreleax-hint by default.
14542 2018-04-05 Jakub Jelinek <jakub@redhat.com>
14544 PR middle-end/85195
14545 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
14546 CONSTRUCTOR_ELT (ctor, ...)->value.
14548 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
14551 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
14553 2018-04-05 Tom de Vries <tom@codesourcery.com>
14556 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
14559 2018-04-05 Shiva Chen <shiva0217@gmail.com>
14560 Kito Cheng <kito.cheng@gmail.com>
14562 * config/nds32/constraints.md (U33): Fine-tune checking condition.
14563 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
14564 * config/nds32/nds32.h (nds32_16bit_address_type): Add
14565 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
14567 2018-04-05 Shiva Chen <shiva0217@gmail.com>
14568 Kito Cheng <kito.cheng@gmail.com>
14570 * config/nds32/constraints.md (Ufe): New memory constraint.
14571 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
14572 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
14573 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
14575 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
14576 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
14578 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14580 * config/nds32/nds32.md: Use optimize_size in the condition for
14581 alu-shift instructions.
14583 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14585 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
14587 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14589 * config/nds32/nds32.md (negsi2): Refine pattern.
14591 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
14592 Chung-Ju Wu <jasonwucj@gmail.com>
14594 * config/nds32/iterators.md (shift_rotate): New code iterator.
14595 (shift): New code attribute.
14596 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
14597 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
14598 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
14599 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
14600 bit-wise operations.
14601 (andsi3, *andsi3): Ditto.
14602 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
14603 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
14604 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
14605 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
14606 nds32_ior_operand, nds32_xor_operand): New predicates.
14608 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14610 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
14611 (addsi3, subsi3): ... this.
14613 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14615 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
14617 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14619 * config/nds32/nds32.md: Adjust indention.
14621 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
14623 * config/nds32/nds32.md (feature): New attribute.
14625 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14627 * config/nds32/nds32.md (subtype): New attribute.
14629 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
14632 * config/arm/arm-builtins.c (arm_expand_builtin): Change
14633 expansion to perform a bitwise AND of the argument followed by a
14634 boolean negation of the result.
14636 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
14638 PR rtl-optimization/84878
14639 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
14640 the basic block. Assert the use reference is not artificial and that
14641 it has an associated insn.
14643 2018-04-04 Michael Matz <matz@suse.de>
14645 * builtins.c (compute_objsize): Pass correct operand
14646 to array_at_struct_end_p.
14648 2018-04-04 Richard Biener <rguenther@suse.de>
14651 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
14652 from contexts for DINFO_LEVEL_TERSE and below.
14654 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
14656 * config/nds32/nds32-doubleword.md (move_<mode>): Require
14657 resiter_operand condition.
14658 * config/nds32/nds32.md (*move<mode>): Ditto.
14660 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
14661 Monk Chiang <sh.chiang04@gmail.com>
14663 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
14665 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14667 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
14669 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14670 Kito Cheng <kito.cheng@gmail.com>
14672 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
14673 nds32_cond_code_str, output_cond_branch,
14674 output_cond_branch_compare_zero, nds32_expand_cbranch,
14675 nds32_expand_cstore, nds32_expand_movcc,
14676 nds32_output_cbranchsi4_equality_zero,
14677 nds32_output_cbranchsi4_equality_reg,
14678 nds32_output_cbranchsi4_equality_reg_or_const_int,
14679 nds32_output_cbranchsi4_greater_less_zero: New functions.
14680 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
14681 nds32_expand_cstore, nds32_expand_movcc,
14682 nds32_output_cbranchsi4_equality_zero,
14683 nds32_output_cbranchsi4_equality_reg,
14684 nds32_output_cbranchsi4_equality_reg_or_const_int,
14685 nds32_output_cbranchsi4_greater_less_zero): Declare.
14686 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
14687 nds32_rimm11s_operand): New predicates.
14688 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
14689 * config/nds32/nds32.md: Rewrite all the branch and conditional move
14692 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
14694 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
14695 * config/nds32/nds32.md: Ditto.
14696 * config/nds32/pipelines.md: Ditto.
14698 2018-04-04 Richard Biener <rguenther@suse.de>
14700 PR tree-optimization/85168
14701 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
14702 propagating abnormals.
14704 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14706 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
14708 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14709 Kito Cheng <kito.cheng@gmail.com>
14711 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
14712 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
14713 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
14714 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
14715 * config/nds32/nds32.md (sibcall_internal): New.
14716 (sibcall_register): Remove.
14717 (sibcall_immediate): Remove.
14718 (sibcall_value_internal): New.
14719 (sibcall_value_register): Remove.
14720 (sibcall_value_immediate): Remove.
14721 * config/nds32/predicates.md (nds32_general_register_operand): New.
14722 (nds32_call_address_operand): New.
14724 2018-04-03 Jakub Jelinek <jakub@redhat.com>
14726 PR rtl-optimization/85167
14727 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
14728 bb_defs if *split_p, instead preinitialize it to NULL.
14730 PR tree-optimization/85156
14731 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
14732 evaluating the argument multiple times.
14734 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
14736 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
14738 (_mm_cvtpd_ps): Likewise.
14739 (_mm_cvttpd_epi32): Likewise.
14740 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
14741 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
14742 vector, pixel, and bool following altivec.h include.
14744 2018-04-03 Martin Sebor <msebor@redhat.com>
14746 * doc/extend.texi (Common Function Attributes): Clarify.
14747 (const attribute): Likewise.
14748 (pure attribute): Likewise.
14750 2018-04-03 Jakub Jelinek <jakub@redhat.com>
14753 * config/i386/i386.c (ix86_expand_vector_set): Use
14754 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
14756 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
14758 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
14759 instructions when changing rounding bits to preserve precision bits
14760 in the x87 control word.
14762 2018-04-03 Martin Liska <mliska@suse.cz>
14764 PR tree-optimization/82491
14765 * rtl.h (strip_offset_and_add): Replace += suboffset with
14766 poly_uint64 () + suboffset.
14768 2018-03-29 Martin Liska <mliska@suse.cz>
14769 Martin Jambor <mjambor@suse.cz>
14772 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
14773 param_type is not an integral or pointer type.
14775 2018-04-03 Richard Biener <rguenther@suse.de>
14777 * sese.h (recompute_all_dominators): Remove.
14779 2018-04-02 Martin Sebor <msebor@redhat.com>
14781 * doc/invoke.texi (-Wrestrict): Fix typos.
14783 2018-04-02 Jim Wilson <jimw@sifive.com>
14785 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
14786 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
14787 (<optab>di3, <optab>si3_extend): Likewise.
14788 (<optab>si3_mask, <optab>si3_mask_1): New.
14789 (<optab>di3_mask, <optab>di3_mask_1): New.
14790 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
14791 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
14792 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
14794 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
14796 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
14799 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
14801 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
14802 (nds32_canonicalize_comparison): New function.
14804 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
14805 Kito Cheng <kito.cheng@gmail.com>
14806 Kuan-Lin Chen <kuanlinchentw@gmail.com>
14808 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
14809 * config/nds32/constants.md (unspec_volatile_element): Add
14810 UNSPEC_VOLATILE_RELAX_GROUP.
14811 * config/nds32/nds32-relax-opt.c: New file.
14812 * config/nds32/nds32-predicates.c
14813 (nds32_symbol_load_store_p): New function.
14814 * config/nds32/nds32-protos.h
14815 (nds32_symbol_load_store_p): Declare function.
14816 (make_pass_nds32_relax_opt): Declare new rtl pass function.
14817 * config/nds32/nds32.c
14818 (nds32_register_pass): New function to register pass.
14819 (nds32_register_passes): New function to register passes.
14820 * config/nds32/nds32.md (relax_group): New pattern.
14821 * config/nds32/nds32.opt (mrelax-hint): New option.
14822 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
14824 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
14826 * config/nds32/t-nds32: Modify files dependency.
14828 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
14830 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
14831 (PROFILE_HOOK): Define its implementation.
14833 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
14835 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
14836 type and 32-bit size.
14838 2018-04-01 Jakub Jelinek <jakub@redhat.com>
14840 PR middle-end/85090
14841 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
14842 (V_128_256): New mode iterator.
14843 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
14844 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
14845 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
14847 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
14848 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
14850 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
14853 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
14854 NaN inputs correctly.
14856 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
14859 * config/rs6000/vsx.md (??r): New mode attribute.
14860 (*vsx_mov<mode>_64bit): Use it.
14861 (*vsx_mov<mode>_32bit): Likewise.
14863 2018-03-30 Martin Sebor <msebor@redhat.com>
14865 PR tree-optimization/84818
14866 * builtins.c (check_access): Use warning_n.
14868 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
14871 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
14873 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
14876 2018-03-30 Julia Koval <julia.koval@intel.com>
14879 * x86-tune.def (movx, partial_reg_dependency): Enable for
14882 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
14884 PR inline-asm/84985
14885 * lra-constraints.c (process_alt_operands): Move setting
14886 this_alternative_matches below.
14888 2018-03-29 Martin Liska <mliska@suse.cz>
14891 * doc/invoke.texi: Document how LTO works with debug info.
14892 Describe auto-load support of binutils. Mention 'x86-64'
14893 as valid option value of -march option.
14895 2018-03-29 Jakub Jelinek <jakub@redhat.com>
14897 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
14900 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
14901 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
14902 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
14905 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
14908 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
14909 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
14910 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
14911 for RS6000_BTM_POWERPC64.
14912 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
14913 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
14914 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
14917 (DIVDEU): Likewise.
14919 2018-03-28 Carl Love <cel@us.ibm.com>
14922 2017-09-27 Carl Love <cel@us.ibm.com>
14924 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
14925 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
14926 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
14929 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14931 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
14932 instead of __vector bool.
14933 (_mm_max_pu8): Likewise.
14934 (_mm_min_pi16): Likewise.
14936 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
14939 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
14940 (DIVWEUO): Likewise.
14941 (DIVDEO): Likewise.
14942 (DIVDEUO): Likewise.
14943 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
14944 DIVWEUO and DIVDEUO.
14945 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
14946 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
14947 (div_extend): Likewise.
14948 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
14950 (__builtin_divweuo): Likewise.
14951 (__builtin_divdeo): Likewise.
14952 (__builtin_divdeuo): Likewise.
14954 2018-03-28 Jakub Jelinek <jakub@redhat.com>
14957 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
14958 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
14960 PR tree-optimization/82004
14961 * gimple-match-head.c (optimize_pow_to_exp): New function.
14962 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
14963 Don't fold to exp if optimize_pow_to_exp is false.
14965 2018-03-28 Martin Liska <mliska@suse.cz>
14968 * calls.c (initialize_argument_information): Fix trailing space.
14969 * common.opt: Fix typo and provide better explanation for
14970 -fsanitize-coverage option.
14971 * config/i386/i386.opt: Fix typo.
14973 2018-03-28 Jakub Jelinek <jakub@redhat.com>
14974 Martin Liska <mliska@suse.cz>
14977 * gimplify.c (asan_poison_variable): Don't do the check for
14978 gimplify_omp_ctxp here.
14979 (gimplify_decl_expr): Do it here.
14980 (gimplify_target_expr): Likewise.
14982 2018-03-28 Martin Liska <mliska@suse.cz>
14985 * config/i386/i386.c (ix86_function_arg_advance): Do not call
14986 chkp_type_bounds_count if MPX is not enabled.
14988 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
14990 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
14992 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
14995 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
14996 function to create the function decl for complex long double
14997 multiply and divide for -mabi=ieeelongdouble.
14998 (init_float128_ieee): Call it.
15000 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
15003 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
15004 -fcf-protection=branch -mibt.
15005 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
15007 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
15010 * config/arm/arm.c (arm_valid_symbolic_address): Handle
15011 arm_word_relocations.
15013 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
15016 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
15017 extern array declarations.
15019 2018-03-27 Richard Biener <rguenther@suse.de>
15021 PR middle-end/84067
15022 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
15023 explicit single_use checks.
15025 2018-03-27 Richard Biener <rguenther@suse.de>
15027 PR tree-optimization/85082
15028 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
15031 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
15033 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
15034 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
15035 Turn on fasynchronous-unwind-tables and funwind-tables.
15037 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
15040 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
15041 (*bmi_blsr_<mode>_ccz): Ditto.
15043 2018-03-26 Tom de Vries <tom@codesourcery.com>
15045 PR tree-optimization/85063
15046 * omp-general.c (offloading_function_p): New function. Factor out
15048 * omp-offload.c (pass_omp_target_link::gate): ... here.
15049 * omp-general.h (offloading_function_p): Declare.
15050 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
15051 with attribute omp declare target for offloading functions.
15053 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
15055 PR tree-optimization/84005
15056 * tree-data-ref.h (get_base_for_alignment): Declare.
15057 * tree-data-ref.c (get_base_for_alignment_1): New function.
15058 (get_base_for_alignment): Likewise.
15059 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
15060 get_base_for_alignment to find a suitable base object, instead
15061 of always using drb->base_address.
15063 2018-03-23 Jakub Jelinek <jakub@redhat.com>
15065 PR inline-asm/85022
15066 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
15067 known size by default.
15069 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
15071 PR inline-asm/85030
15072 * lra-constraints.c (process_alt_operands): Don't match BLKmode
15073 and non BLKmode operands.
15075 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15078 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
15079 Clean up attributes.
15081 2018-03-23 Richard Biener <rguenther@suse.de>
15084 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
15085 we are going to emit early debug for LTO.
15087 2018-03-23 Jakub Jelinek <jakub@redhat.com>
15089 PR inline-asm/85034
15090 * function.c (match_asm_constraints_1): Don't optimize if input
15091 doesn't satisfy general_operand predicate for output's mode.
15093 PR inline-asm/85022
15094 * alias.c (write_dependence_p): Don't require for x_canonicalized
15095 non-VOIDmode if x has VOIDmode.
15098 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
15099 just don't try to optimize it rather than assert it never happens.
15101 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
15103 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
15104 macro expansions for definition of ST_INTERNAL_<mode> and
15105 LD_INTERNAL_<mode> builtins.
15106 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
15108 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
15110 (altivec_expand_st_builtin): Likewise.
15111 (altivec_expand_builtin): Remove calls to deleted functions.
15112 (rs6000_address_for_altivec): Delete this function.
15113 * config/rs6000/vector.md: Remove expands for
15114 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
15116 2018-03-22 Sudakshina Das <sudi.das@arm.com>
15119 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
15120 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
15121 re-computing once computed.
15122 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
15123 (arm_init_machine_status): Initialize
15124 machine->static_chain_stack_bytes.
15126 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
15129 * doc/extend.texi: Add four new prototypes for vec_ld.
15130 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
15131 definitions for more logical presentation.
15132 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
15133 entries for V1TI variants of __builtin_altivec_ld builtin.
15134 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
15135 handling of V1TI variant of LVX icode pattern.
15136 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
15137 (rs6000_gimple_fold_builtin): Likewise.
15138 (altivec_init_builtins): Add code to define
15139 __builtin_altivec_lvx_v1ti function.
15141 2018-03-22 Jakub Jelinek <jakub@redhat.com>
15143 PR inline-asm/84941
15144 * function.c (match_asm_constraints_1): Don't do the optimization
15145 if input isn't a REG, SUBREG, MEM or constant.
15147 2018-03-22 Tom de Vries <tom@codesourcery.com>
15149 PR tree-optimization/84956
15150 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
15151 bb_has_abnormal_pred.
15153 2018-03-22 Jakub Jelinek <jakub@redhat.com>
15156 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
15157 DECL_INITIAL (decl) to decl at the end.
15158 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
15159 adjust the comment.
15161 2018-03-21 Joseph Myers <joseph@codesourcery.com>
15163 * doc/extend.texi (__builtin_tgmath): Document when complex
15164 integer types are treated as _Complex _Float64.
15166 2018-03-21 Tom de Vries <tom@codesourcery.com>
15168 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
15170 2018-03-21 Jakub Jelinek <jakub@redhat.com>
15172 PR tree-optimization/84960
15173 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
15174 if it is ENTRY block, move them into single succ of ENTRY in that case.
15176 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
15178 PR tree-optimization/84811
15179 * poly-int.h (poly_span_traits): Remove the T3 parameter and
15180 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
15181 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
15182 (known_subrange_p): Update accordingly. Cast each value involved
15183 in the size comparison, rather than casting the result of the
15186 2018-03-21 Jakub Jelinek <jakub@redhat.com>
15188 PR tree-optimization/84982
15189 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
15190 by flipping the least significant bit rather than all bits from
15191 bitpos to bitpos + bitsize - 1.
15193 2018-03-21 Nathan Sidwell <nathan@acm.org>
15195 * doc/extend.texi (Deprecated Features): Remove mention of
15196 long-deleted deprecations.
15198 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15201 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
15202 * configure: Regenerate.
15204 2018-03-21 Tom de Vries <tom@codesourcery.com>
15206 PR tree-optimization/83126
15207 * tree-parloops.c (num_phis): New function.
15208 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
15210 2018-03-21 Nathan Sidwell <nathan@acm.org>
15212 * doc/extend.texi (Deprecated Features): Update deprecated flags,
15213 mention anon-struct/union members and trailing attributes.
15215 2018-03-21 Bin Cheng <bin.cheng@arm.com>
15217 PR tree-optimization/84969
15218 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
15219 builtin memset partitions if they set different rhs values.
15221 2018-03-21 Jakub Jelinek <jakub@redhat.com>
15223 PR rtl-optimization/84989
15224 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
15225 VEC_DUPLICATE with scalar result mode.
15227 2018-03-21 Martin Liska <mliska@suse.cz>
15230 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
15231 not intended return statement.
15233 2018-03-21 Martin Liska <mliska@suse.cz>
15236 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
15237 (chkp_find_bound_slots_1): Limit number of iterations.
15239 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
15242 * Minor grammar fixes for x86 options.
15244 2018-03-20 Jakub Jelinek <jakub@redhat.com>
15247 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
15248 holding REG_CFA_RESTORE notes, instead turn them into a USE.
15250 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
15253 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
15254 (altivec_lvx_<mode>_1op): Likewise.
15255 (altivec_stvx_<mode>_2op): Likewise.
15256 (altivec_stvx_<mode>_1op): Likewise.
15257 (altivec_lvx_<VM2:mode>): New define_expand.
15258 (altivec_stvx_<VM2:mode>): Likewise.
15259 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
15260 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
15261 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
15262 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
15263 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
15264 (rs6000_gen_lvx): Likewise.
15265 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
15266 (altivec_expand_stv_builtin): Likewise.
15267 (altivec_expand_builtin): Likewise.
15268 * config/rs6000/vector.md: Likewise.
15270 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15273 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
15276 2018-03-20 Richard Biener <rguenther@suse.de>
15279 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
15280 sign-conversions as zero, fall back to standard scalar_stmt
15283 2018-03-20 Martin Liska <mliska@suse.cz>
15286 * predict.c (rebuild_frequencies): Handle case when we have
15287 PROFILE_ABSENT, but flag_guess_branch_prob is false.
15289 2018-03-20 Jakub Jelinek <jakub@redhat.com>
15292 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
15293 flag_section_anchors.
15294 * varasm.c (use_blocks_for_decl_p): Remove hack for
15295 dw2_force_const_mem.
15298 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
15300 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
15301 be created, use lowpart_subreg of operands[0] rather than operands[0]
15303 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
15304 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
15305 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
15306 and n constraint instead of aarch64_shift_imm_di and Usd.
15307 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
15308 (*aarch64_<optab>_reg_minus<mode>3): ... this.
15310 2018-03-20 Sudakshina Das <sudi.das@arm.com>
15313 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
15314 to favor GPR over NEON registers.
15315 (<shift>di3_neon): Likewise.
15317 2018-03-20 Tom de Vries <tom@codesourcery.com>
15320 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
15321 (nvptx_process_pars): Emit bar.sync asap and alap.
15323 2018-03-20 Tom de Vries <tom@codesourcery.com>
15326 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
15327 seen_label if seen_label is already set.
15329 2018-03-20 Jakub Jelinek <jakub@redhat.com>
15332 * config/i386/i386.c (fold_builtin_cpu): For features above 31
15333 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
15334 Use 1U instead of 1. Formatting fixes.
15337 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
15338 instead of TREE_TYPE (s1) for the return value.
15340 2018-03-19 Jakub Jelinek <jakub@redhat.com>
15342 PR tree-optimization/84946
15343 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
15344 bitsize + bitsize in poly_uint64 rather than poly_int64.
15347 * dwarf2asm.c: Include fold-const.c.
15348 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
15349 of decl rather than decl itself.
15351 PR rtl-optimization/84643
15352 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
15354 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
15357 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
15358 calling assemble_variable.
15360 2018-03-19 Sudakshina Das <sudi.das@arm.com>
15363 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
15364 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
15366 2018-03-19 Jim Wilson <jimw@sifive.com>
15369 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
15370 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
15371 (riscv_first_stack_step): Likewise.
15372 (riscv_option_override): Use STACK_BOUNDARY instead of
15373 MIN_STACK_BOUNDARY.
15374 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
15375 MIN_STACK_BOUNDARY.
15376 (BIGGEST_ALIGNMENT): Set to 128.
15377 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
15378 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
15381 2018-03-19 Richard Biener <rguenther@suse.de>
15383 PR tree-optimization/84933
15384 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
15385 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
15387 2018-03-19 Richard Biener <rguenther@suse.de>
15389 PR tree-optimization/84859
15390 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
15391 (cond_if_else_store_replacement): Perform sinking operation on
15392 single-store BBs regardless of MAX_STORES_TO_SINK setting.
15393 Generalize what a BB with a single eligible store is.
15395 2018-03-19 Richard Biener <rguenther@suse.de>
15397 PR tree-optimization/84929
15398 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
15399 chrec_is_positive against non-chrec arg.
15401 2018-03-19 Tamar Christina <tamar.christina@arm.com>
15404 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
15406 2018-03-18 Martin Liska <mliska@suse.cz>
15408 PR rtl-optimization/84635
15409 * regrename.c (build_def_use): Use matches_mode only when
15412 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
15414 PR tree-optimization/84913
15415 * tree-vect-loop.c (vectorizable_reduction): Don't try to
15416 vectorize chains of COND_EXPRs.
15418 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
15420 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
15422 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
15424 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
15426 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
15428 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
15430 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
15431 Kito Cheng <kito.cheng@gmail.com>
15433 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
15434 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
15435 (nds32_adjust_reg_alloc_order): New function.
15436 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
15438 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
15440 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
15441 nds32_print_operand, nds32_print_operand_address): Use
15442 HOST_WIDE_INT_PRINT_DEC instead.
15444 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
15446 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
15448 2018-03-17 Jakub Jelinek <jakub@redhat.com>
15451 * config/i386/i386.c (initial_ix86_tune_features,
15452 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
15453 unsigned long long.
15454 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
15455 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
15456 rather than 1u << ix86_tune. Formatting fix.
15457 (ix86_option_override_internal): Change ix86_arch_mask from
15458 unsigned int to unsigned HOST_WIDE_INT, initialize to
15459 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
15460 (ix86_function_specific_restore): Likewise.
15462 2018-03-16 Jakub Jelinek <jakub@redhat.com>
15465 * postreload.c (reload_combine_recognize_pattern): Perform
15466 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
15467 truncate_int_for_mode the result for the destination's mode.
15470 * hsa-gen.c (mem_type_for_type): Fix comment typo.
15471 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
15473 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
15476 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
15479 * lra-assigns.c (lra_split_hard_reg_for): Don't use
15480 regno_allocno_class_array and sorted_pseudos.
15481 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
15482 insns where regno is used.
15484 2018-03-16 Martin Liska <mliska@suse.cz>
15487 * multiple_target.c (create_dispatcher_calls): Redirect
15488 reference in the symbol table.
15490 2018-03-16 Martin Liska <mliska@suse.cz>
15493 * multiple_target.c (create_dispatcher_calls): Redirect also
15496 2018-03-16 Jakub Jelinek <jakub@redhat.com>
15500 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
15501 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
15502 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
15504 2018-03-16 Julia Koval <julia.koval@intel.com>
15506 * doc/invoke.texi (Skylake Server): Add CLWB.
15507 Cannonlake): Remove CLWB.
15509 2018-03-16 Jakub Jelinek <jakub@redhat.com>
15511 PR tree-optimization/84841
15512 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
15514 (FLOAT_ONE_CONST_TYPE): Define.
15515 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
15516 (sort_by_operand_rank): Put entries with higher constant_type last
15517 rather than first to match comments.
15519 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
15521 * config/nios2/nios2.md (movsi_internal): Fix thinko in
15524 2018-03-15 Jakub Jelinek <jakub@redhat.com>
15527 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
15528 check and use address of target always.
15530 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
15533 * config/i386/i386.c (indirect_thunk_needed): Update comments.
15534 (indirect_thunk_bnd_needed): Likewise.
15535 (indirect_thunks_used): Likewise.
15536 (indirect_thunks_bnd_used): Likewise.
15537 (indirect_return_needed): New.
15538 (indirect_return_bnd_needed): Likewise.
15539 (output_indirect_thunk_function): Add a bool argument for
15541 (output_indirect_thunk_function): Don't generate alias for
15542 function return thunk.
15543 (ix86_code_end): Call output_indirect_thunk_function to generate
15544 function return thunks.
15545 (ix86_output_function_return): Set indirect_return_bnd_needed
15546 and indirect_return_needed instead of indirect_thunk_bnd_needed
15547 and indirect_thunk_needed.
15549 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
15551 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
15552 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
15553 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
15555 2018-03-15 David Malcolm <dmalcolm@redhat.com>
15556 Paul Hua <paul.hua.gm@gmail.com>
15559 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
15561 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
15563 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
15564 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
15565 resp. SFmode cases.
15567 2018-03-15 Tamar Christina <tamar.christina@arm.com>
15570 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
15571 instead of GET_MODE_SIZE when comparing Units.
15573 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
15576 * varasm.c (hash_section): Return an unchangeble hash value
15577 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
15578 Return !aarch64_can_use_per_function_literal_pools_p ().
15580 2018-03-15 Jakub Jelinek <jakub@redhat.com>
15583 * optabs.c (emit_conditional_move): Pass address of cmode's copy
15584 rather than address of cmode as last argument to prepare_cmp_insn.
15586 2018-03-15 Julia Koval <julia.koval@intel.com>
15588 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
15589 F_AVX512VNNI, F_AVX512BITALG): New.
15591 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
15594 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
15595 insn for floating-point loads and stores.
15597 2018-03-14 Carl Love <cel@us.ibm.com>
15599 * config/rs6000/rs6000-c.c: Add macro definitions for
15600 ALTIVEC_BUILTIN_VEC_PERMXOR.
15601 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
15602 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
15603 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
15604 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
15606 * config/doc/extend.texi: Add prototypes for vec_permxor.
15608 2018-03-14 David Malcolm <dmalcolm@redhat.com>
15611 * diagnostic-show-locus.c (class layout_point): Convert m_line
15612 from int to linenum_type.
15613 (line_span::comparator): Use linenum "compare" function when
15614 comparing line numbers.
15615 (test_line_span): New function.
15616 (layout_range::contains_point): Convert param "row" from int to
15618 (layout_range::intersects_line_p): Likewise.
15619 (layout::will_show_line_p): Likewise.
15620 (layout::print_source_line): Likewise.
15621 (layout::should_print_annotation_line_p): Likewise.
15622 (layout::print_annotation_line): Likewise.
15623 (layout::print_leading_fixits): Likewise.
15624 (layout::annotation_line_showed_range_p): Likewise.
15625 (struct line_corrections): Likewise for field m_row.
15626 (line_corrections::line_corrections): Likewise for param "row".
15627 (layout::print_trailing_fixits): Likewise.
15628 (layout::get_state_at_point): Likewise.
15629 (layout::get_x_bound_for_row): Likewise.
15630 (layout::print_line): Likewise.
15631 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
15632 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
15633 * input.c (selftest::test_linenum_comparisons): New function.
15634 (selftest::input_c_tests): Call it.
15635 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
15636 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
15637 * selftest.h (ASSERT_GT): New macro.
15638 (ASSERT_GT_AT): New macro.
15639 (ASSERT_LT): New macro.
15640 (ASSERT_LT_AT): New macro.
15642 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
15644 PR rtl-optimization/84780
15645 * combine.c (distribute_links): Don't make a link based on pc_rtx.
15647 2018-03-14 Martin Liska <mliska@suse.cz>
15649 * tree.c (record_node_allocation_statistics): Use
15650 get_stats_node_kind.
15651 (get_stats_node_kind): New function extracted from
15652 record_node_allocation_statistics.
15653 (free_node): Use get_stats_node_kind.
15655 2018-03-14 Richard Biener <rguenther@suse.de>
15657 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
15658 that the value-set of ANTIC_IN doesn't grow.
15661 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
15663 (BB_VISITED_WITH_VISITED_SUCCS): New define.
15664 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
15666 2018-03-14 Julia Koval <julia.koval@intel.com>
15668 * config.gcc (icelake-client, icelake-server): New.
15670 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
15671 (initial_ix86_arch_features): Ditto.
15672 (PTA_SKYLAKE): Add SGX.
15673 (PTA_ICELAKE): Remove.
15674 (PTA_ICELAKE_CLIENT): New.
15675 (PTA_ICELAKE_SERVER): New.
15676 (ix86_option_override_internal): Split up icelake on icelake client and
15678 (get_builtin_code_for_version): Ditto.
15679 (fold_builtin_cpu): Ditto.
15680 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
15681 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
15682 * config/i386/i386.h (processor_type): Ditto.
15683 * doc/invoke.texi: Ditto.
15685 2018-03-14 Jakub Jelinek <jakub@redhat.com>
15688 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
15689 INTEGER_CST offset, add it together with bitpos / 8 and
15690 sign extend based on POINTER_SIZE.
15694 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
15697 * config/i386/constraints.md (Yc): New register constraint.
15698 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
15699 Use Yc constraint for alternative 2 of operand 0. Remove
15700 preferred_for_speed attribute.
15702 2018-03-14 Richard Biener <rguenther@suse.de>
15704 PR tree-optimization/84830
15705 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
15706 with the old one to avoid oscillations.
15708 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
15711 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
15713 (assign_by_spills): Return a flag of reload assignment failure.
15714 Do not process the reload assignment failures. Do not spill other
15715 reload pseudos if they has the same reg class. Update n if
15717 (lra_assign): Add a return arg. Set up from the result of
15718 assign_by_spills call.
15719 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15720 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
15721 usage_insns if it is not NULL.
15722 (spill_hard_reg_in_range): New function.
15723 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15724 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15725 function prototypes.
15726 (lra_assign): Change prototype.
15727 * lra.c (lra): Add code to deal with fails by splitting hard reg
15730 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
15732 * config/riscv/riscv.opt (mrelax): New option.
15733 * config/riscv/riscv.c (riscv_file_start): Emit ".option
15734 "norelax" when riscv_mrelax is disabled.
15735 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
15737 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15740 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
15741 reassociation for int modes.
15743 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
15745 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
15746 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
15748 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
15749 * config/aarch64/aarch64-sve.md
15750 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
15751 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
15752 (*extend<mode><Vwide>2): Rename to...
15753 (aarch64_sve_extend<mode><Vwide>2): ...this.
15754 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
15755 renaming the old pattern to...
15756 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
15758 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
15759 define_expand, renaming the old pattern to...
15760 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
15761 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
15762 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
15763 account when deciding which SVE instruction the optab should use.
15764 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
15766 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
15768 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
15769 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
15770 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
15771 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
15772 (tlsdesc_small_<mode>): Turn a define_expand and use
15773 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
15774 (tlsdesc_small_advsimd_<mode>): ...this.
15775 (tlsdesc_small_sve_<mode>): New pattern.
15777 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
15779 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
15780 (UNSPEC_UMUL_HIGHPART): New constants.
15781 (MUL_HIGHPART): New int iteraor.
15782 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
15783 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
15785 (*<su>mul<mode>3_highpart): New define_insn.
15787 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
15790 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
15793 2018-03-13 Martin Liska <mliska@suse.cz>
15796 * (sem_item_optimizer::sem_item_optimizer): Initialize new
15798 (sem_item_optimizer::~sem_item_optimizer): Release it.
15799 (sem_item_optimizer::merge_classes): Register variable aliases.
15800 (sem_item_optimizer::fixup_pt_set): New function.
15801 (sem_item_optimizer::fixup_points_to_sets): Likewise.
15802 * ipa-icf.h: Declare new variables and functions.
15804 2018-03-13 Jakub Jelinek <jakub@redhat.com>
15806 PR middle-end/84834
15807 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
15808 integer_pow2p@2 and test integer_pow2p in condition.
15809 (A < 0 ? C : 0): Similarly for @1.
15811 PR middle-end/84831
15812 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
15813 characters starting at p contain '\0' character, don't look beyond
15817 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
15818 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
15821 * reg-stack.c (change_stack): Change update_end var from int to
15822 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
15823 also call set_block_for_insn on the newly added insns and rescan.
15826 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
15827 on the last operand.
15830 * tree.c (stabilize_reference_1): Return save_expr (e) for
15831 STATEMENT_LIST even if it doesn't have side-effects.
15833 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
15835 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
15837 2018-03-12 Renlin Li <renlin.li@arm.com>
15839 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
15840 aarch64_output_scalar_simd_mov_immediate.
15842 2018-03-12 Martin Sebor <msebor@redhat.com>
15844 PR tree-optimization/83456
15845 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
15846 for perfectly overlapping calls to memcpy.
15847 (gimple_fold_builtin_memory_chk): Same.
15848 (gimple_fold_builtin_strcpy): Handle no-warning.
15849 (gimple_fold_builtin_stxcpy_chk): Same.
15850 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
15852 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
15854 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
15855 parameter. Use it for SFmode.
15856 (rs6000_function_arg_advance_1): Adjust.
15857 (rs6000_function_arg): Adjust.
15858 (rs6000_gimplify_va_arg): Pass false for that new parameter.
15860 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
15862 PR rtl-optimization/84169
15863 PR rtl-optimization/84780
15864 * combine.c (can_combine_p): Check for a 2-insn combination whether
15865 the destination register is used between the two insns, too.
15867 2018-03-12 Richard Biener <rguenther@suse.de>
15869 PR tree-optimization/84803
15870 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
15871 for refs DR analysis didn't process.
15873 2018-03-12 Richard Biener <rguenther@suse.de>
15875 PR tree-optimization/84777
15876 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
15877 force-vectorize loops ignore whether we are optimizing for size.
15879 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
15881 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
15882 (TARGET_MD_ASM_ADJUST): Define.
15884 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
15885 Kito Cheng <kito.cheng@gmail.com>
15886 Chung-Ju Wu <jasonwucj@gmail.com>
15888 * config/nds32/nds32.c (nds32_compute_stack_frame,
15889 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
15890 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
15891 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
15892 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
15893 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
15894 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
15895 * config/nds32/nds32.md (prologue, epilogue): Use macro
15896 NDS32_V3PUSH_AVAILABLE_P to do checking.
15898 2018-03-11 Jakub Jelinek <jakub@redhat.com>
15901 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
15902 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
15903 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
15904 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
15905 addition of most attributes on !orig_type_die or the attribute not
15906 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
15908 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
15909 Chung-Ju Wu <jasonwucj@gmail.com>
15911 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
15912 __NDS32_VH__ macro.
15913 * config/nds32/nds32.opt (mvh): New option.
15915 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
15916 Chung-Ju Wu <jasonwucj@gmail.com>
15918 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
15920 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
15921 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
15924 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
15925 Chung-Ju Wu <jasonwucj@gmail.com>
15927 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
15929 * config/nds32/nds32-multiple.md (strlensi): New pattern.
15930 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
15932 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
15933 Kito Cheng <kito.cheng@gmail.com>
15934 Chung-Ju Wu <jasonwucj@gmail.com>
15936 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
15937 UNSPEC_FFMISM and UNSPEC_FLMISM.
15938 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
15939 for ffb, ffmism and flmism.
15940 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
15941 (unspec_ffmism): Ditto.
15942 (unspec_flmism): Ditto.
15943 (nds32_expand_builtin_impl): Check if string extension is available.
15944 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
15945 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
15947 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
15950 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
15953 * lra-assigns.c (assign_by_spills): Return a flag of reload
15954 assignment failure. Do not process the reload assignment
15955 failures. Do not spill other reload pseudos if they has the same
15957 (lra_assign): Add a return arg. Set up from the result of
15958 assign_by_spills call.
15959 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15960 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
15961 usage_insns if it is not NULL.
15962 (spill_hard_reg_in_range): New function.
15963 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15964 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15965 function prototypes.
15966 (lra_assign): Change prototype.
15967 * lra.c (lra): Add code to deal with fails by splitting hard reg
15970 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
15973 * config/i386/i386.opt: Replace Enforcment with Enforcement.
15975 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
15978 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
15979 (dw_val_node): Add val_symbolic_view.
15980 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
15981 (symview_upper_bound): New.
15982 (new_line_info_table): Initialize symviews_since_reset.
15983 (dwarf2out_source_line): Count symviews_since_reset and set
15984 symview_upper_bound.
15985 (dw_val_equal_p): Handle symview.
15986 (add_AT_symview): New.
15987 (print_dw_val): Handle symview.
15988 (attr_checksum, attr_checksum_ordered): Likewise.
15989 (same_dw_val_p, size_of_die): Likewise.
15990 (value_format, output_die): Likewise.
15991 (add_high_low_attributes): Use add_AT_symview for entry_view.
15992 (dwarf2out_finish): Reset symview_upper_bound, clear
15995 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
15998 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
15999 Add strict argument and use it.
16000 (rs6000_split_multireg_move): Update for new strict argument.
16001 (mem_operand_gpr): Disallow all non-offsettable addresses.
16002 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
16004 2018-03-09 Jakub Jelinek <jakub@redhat.com>
16007 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
16008 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
16009 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
16012 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
16013 decl, use remap_type if we want to use the type.
16015 2018-03-09 Martin Sebor <msebor@redhat.com>
16017 PR tree-optimization/84526
16018 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16020 (builtin_access::generic_overlap): Be prepared to handle non-array
16023 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
16025 PR rtl-optimization/84682
16026 * lra-constraints.c (process_address_1): Check is_address flag
16027 for address constraints.
16028 (process_alt_operands): Likewise.
16029 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
16030 preprocess_constraints.
16031 * recog.h (preprocess_constraints): Add oploc parameter.
16033 * recog.c (preprocess_constraints): Test address_operand for
16034 CT_ADDRESS constraints.
16036 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
16039 * lra-assigns.c (assign_by_spills): Return a flag of reload
16040 assignment failure. Do not process the reload assignment
16041 failures. Do not spill other reload pseudos if they has the same
16043 (lra_assign): Add a return arg. Set up from the result of
16044 assign_by_spills call.
16045 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16046 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16047 usage_insns if it is not NULL.
16048 (spill_hard_reg_in_range): New function.
16049 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16050 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16051 function prototypes.
16052 (lra_assign): Change prototype.
16053 * lra.c (lra): Add code to deal with fails by splitting hard reg
16056 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16059 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
16060 Accept complain bool parameter. Only emit errors if it is true.
16061 (arm_parse_cpu_option_name): Likewise.
16062 (arm_target_thumb_only): Adjust callers of the above.
16063 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
16064 prototype to take a default true bool parameter.
16065 (arm_parse_arch_option_name): Likewise.
16067 2018-03-09 David Malcolm <dmalcolm@redhat.com>
16068 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
16072 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
16073 * configure: Regenerate.
16074 * configure.ac ("linker --version-script option"): New.
16075 ("linker soname option"): New.
16077 2018-03-09 Richard Biener <rguenther@suse.de>
16079 PR tree-optimization/84775
16080 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
16081 immediate uses of predicate stmts and mark them modified.
16084 PR tree-optimization/84178
16085 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
16087 (version_loop_for_if_conversion): Delay update_ssa call.
16088 (tree_if_conversion): Delay update_ssa until after predicate
16091 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
16094 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
16095 when the function accesses prior frames.
16097 2018-03-08 Jakub Jelinek <jakub@redhat.com>
16100 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
16101 gen_llsym, otherwise call maybe_gen_llsym.
16103 PR inline-asm/84742
16104 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
16105 has ',' character inside of it.
16107 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16110 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
16111 as clobbering CC_REGNUM.
16113 2018-03-08 Richard Biener <rguenther@suse.de>
16115 PR middle-end/84552
16116 * tree-scalar-evolution.c: Include tree-into-ssa.h.
16117 (follow_copies_to_constant): Do not follow SSA names registered
16120 2018-03-08 Richard Biener <rguenther@suse.de>
16122 PR tree-optimization/84178
16123 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
16125 (version_loop_for_if_conversion): Delay update_ssa call.
16126 (tree_if_conversion): Delay update_ssa until after predicate
16129 2018-03-08 David Malcolm <dmalcolm@redhat.com>
16131 PR tree-optimization/84178
16132 * tree-if-conv.c (release_bb_predicate): Remove the
16133 the assertion that the stmts have NULL use_ops.
16134 Discard the statements, asserting that they haven't
16135 yet been added to a BB.
16137 2018-03-08 Richard Biener <rguenther@suse.de>
16139 PR tree-optimization/84746
16140 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
16141 (phi_translate): Pass in destination ANTIC_OUT set.
16142 (phi_translate_1): Likewise. For a simplified result lookup
16143 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
16144 (phi_translate_set): Adjust.
16145 (do_pre_regular_insertion): Likewise.
16146 (do_pre_partial_partial_insertion): Likewise.
16148 2018-03-08 Martin Liska <mliska@suse.cz>
16150 PR gcov-profile/84735
16151 * doc/gcov.texi: Document usage of profile files.
16152 * gcov-io.h: Document changes in the format.
16154 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
16158 * dwarf2out.c (struct dw_line_info_table): Update comments for
16160 (FORCE_RESET_NEXT_VIEW): New.
16161 (FORCE_RESETTING_VIEW_P): New.
16162 (RESETTING_VIEW_P): Check for -1 too.
16163 (ZERO_VIEW_P): Likewise.
16164 (new_line_info_table): Force-reset next view.
16165 (dwarf2out_begin_function): Likewise.
16166 (dwarf2out_source_line): Simplify zero_view_p initialization.
16167 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
16168 view directly. Omit view when omitting .loc at line 0.
16170 2018-03-08 Jakub Jelinek <jakub@redhat.com>
16172 PR tree-optimization/84740
16173 * tree-switch-conversion.c (process_switch): Call build_constructors
16174 only if info.phi_count is non-zero.
16176 PR tree-optimization/84739
16177 * tree-tailcall.c (find_tail_calls): Check call arguments against
16178 DECL_ARGUMENTS (current_function_decl) rather than
16179 DECL_ARGUMENTS (func) when checking for tail recursion.
16181 2018-03-07 Jakub Jelinek <jakub@redhat.com>
16183 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
16184 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
16185 Volker Reichelt's entry and add entries for people that perform
16186 GCC fuzzy testing and report numerous bugs.
16188 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
16191 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
16192 readonly data in sdata, if that is disabled.
16193 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
16194 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
16195 -mreadonly-in-sdata option.
16197 2018-03-07 Martin Sebor <msebor@redhat.com>
16199 PR tree-optimization/84468
16200 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
16201 basic block when looking for nul assignment.
16203 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
16206 * except.h (output_function_exception_table): Adjust prototype.
16207 * except.c (output_function_exception_table): Remove FNNAME parameter
16208 and add SECTION parameter. Ouput one part of the table at a time.
16209 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
16210 the first part of the exception table and emit unwind directives.
16211 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
16212 (i386_pe_seh_cold_init): Likewise.
16213 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
16214 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
16215 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
16216 (ix86_output_call_insn): Emit a nop in one more case for SEH.
16217 * config/i386/winnt.c: Include except.h.
16218 (struct seh_frame_state): Add reg_offset, after_prologue and
16219 in_cold_section fields.
16220 (i386_pe_seh_end_prologue): Set seh->after_prologue.
16221 (i386_pe_seh_cold_init): New function.
16222 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
16223 to seh->in_cold_section.
16224 (seh_emit_push): Record the offset of the push.
16225 (seh_emit_save): Record the offet of the save.
16226 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
16227 Test seh->after_prologue to disregard the epilogue.
16228 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
16229 (i386_pe_end_cold_function): New function.
16231 2018-03-07 Jakub Jelinek <jakub@redhat.com>
16234 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
16235 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
16238 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
16240 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
16241 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
16243 PR middle-end/84723
16244 * multiple_target.c: Include tree-inline.h and intl.h.
16245 (expand_target_clones): Diagnose and fail if node->definition and
16246 !tree_versionable_function_p (node->decl).
16248 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
16250 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
16252 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
16253 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
16254 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
16256 2018-03-06 Jakub Jelinek <jakub@redhat.com>
16259 * combine.c (try_combine): Use reg_or_subregno instead of handling
16260 just paradoxical SUBREGs and REGs.
16262 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
16264 * config/arc/arc.c (arc_finalize_pic): Remove function.
16265 (arc_must_save_register): We use single base PIC register, remove
16266 checks to save/restore the PIC register.
16267 (arc_expand_prologue): Likewise.
16268 * config/arc/arc-protos.h (arc_set_default_type_attributes):
16270 (arc_verify_short): Likewise.
16271 (arc_attr_type): Likewise.
16272 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
16273 (walk_stores): Likewise.
16274 (arc_address_cost): Make it static.
16275 (arc_verify_short): Likewise.
16276 (branch_dest): Likewise.
16277 (arc_attr_type): Likewise.
16278 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
16279 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
16280 (arc_final_prescan_insn): Remove inserting the nops due to
16281 hardware hazards. It is done in reorg step.
16282 (insn_length_variant_t): Remove.
16283 (insn_length_parameters_t): Likewise.
16284 (arc_insn_length_parameters): Likewise.
16285 (arc_get_insn_variants): Likewise.
16286 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
16288 2018-03-06 Jakub Jelinek <jakub@redhat.com>
16290 PR inline-asm/84683
16291 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
16294 PR tree-optimization/84687
16295 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
16297 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
16299 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16301 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
16302 Rename to ppc_speculation_barrier.
16303 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
16304 __builtin_ppc_speculation_barrier.
16306 2018-03-05 Jakub Jelinek <jakub@redhat.com>
16309 * combine.c (combine_simplify_rtx): Don't try to simplify if
16310 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
16313 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
16315 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
16316 to 32 bytes when compiling for POWER9.
16318 2018-03-05 Jakub Jelinek <jakub@redhat.com>
16321 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
16322 regparm >= 3 with no arg reg available also for calls with
16323 flag_force_indirect_call. Pass decl to ix86_function_regparm.
16326 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
16328 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
16330 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
16333 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
16335 2018-03-05 Richard Biener <rguenther@suse.de>
16337 PR tree-optimization/84486
16338 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
16339 When inserting a __builtin_assume_aligned call set the LHS
16340 SSA name alignment info accordingly.
16342 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
16344 PR tree-optimization/84114
16345 * config/aarch64/aarch64.c (aarch64_reassociation_width)
16346 Avoid reassociation of FLOAT_MODE addition.
16348 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
16350 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
16351 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
16352 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
16353 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
16354 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
16355 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
16356 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
16358 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
16359 __builtin_ia32_wbinvd): New builtins.
16360 (SPECIAL_ARGS2): New.
16361 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
16362 (SPECIAL_ARGS2): New.
16363 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
16364 (ix86_valid_target_attribute_inner_p): Ditto.
16365 (ix86_init_mmx_sse_builtins): Add special_args2.
16366 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
16367 TARGET_WBNOINVD_P): New.
16368 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
16369 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
16370 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
16371 * config/i386/immintrin.h (_wbinvd): New intrinsic.
16372 * config/i386/pconfigintrin.h: New file.
16373 * config/i386/wbnoinvdintrin.h: Ditto.
16374 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
16376 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
16378 2018-03-05 Richard Biener <rguenther@suse.de>
16380 PR tree-optimization/84670
16381 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16383 (BB_VISITED_WITH_VISITED_SUCCS): New define.
16384 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16385 (compute_antic_aux): Only assert the number of values in ANTIC_IN
16386 doesn't grow if all successors (recursively) were visited at least
16389 2018-03-05 Richard Biener <rguenther@suse.de>
16391 PR tree-optimization/84650
16392 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
16393 if executed in the loop pipeline.
16395 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
16397 * doc/configfiles.texi (Configuration Files): Move info about
16398 conditionalizing $target-protos.h to...
16399 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
16400 differs from $target-protos.h.
16402 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
16403 Chung-Ju Wu <jasonwucj@gmail.com>
16405 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
16406 * config/nds32/nds32-multiple.md (setmemsi): Define.
16407 * config/nds32/nds32-memory-manipulation.c
16408 (nds32_gen_dup_4_byte_to_word_value): New.
16409 (emit_setmem_word_loop): New.
16410 (emit_setmem_byte_loop): New.
16411 (nds32_expand_setmem_loop): New.
16412 (nds32_expand_setmem_loop_v3m): New.
16413 (nds32_expand_setmem_unroll): New.
16414 (nds32_expand_setmem): New.
16416 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
16417 Chung-Ju Wu <jasonwucj@gmail.com>
16419 * config/nds32/nds32-memory-manipulation.c
16420 (nds32_emit_load_store): New.
16421 (nds32_emit_post_inc_load_store): New.
16422 (nds32_emit_mem_move): New.
16423 (nds32_emit_mem_move_block): New.
16424 (nds32_expand_movmemsi_loop_unknown_size): New.
16425 (nds32_expand_movmemsi_loop_known_size): New.
16426 (nds32_expand_movmemsi_loop): New.
16427 (nds32_expand_movmemsi_unroll): New.
16428 (nds32_expand_movmemqi): Rename ...
16429 (nds32_expand_movmemsi): ... to this.
16430 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
16431 (movmemsi): ... to this.
16432 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
16433 (nds32_expand_movmemsi): ... to this.
16435 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
16436 Monk Chiang <sh.chiang04@gmail.com>
16437 Chung-Ju Wu <jasonwucj@gmail.com>
16439 * config/nds32/nds32-protos.h
16440 (nds32_expand_load_multiple): New arguments.
16441 (nds32_expand_store_multiple): Ditto.
16442 (nds32_valid_multiple_load_store): Rename ...
16443 (nds32_valid_multiple_load_store_p): ... to this.
16444 * config/nds32/nds32-memory-manipulation.c
16445 (nds32_expand_load_multiple): Refine implementation.
16446 (nds32_expand_store_multiple): Ditto.
16447 * config/nds32/nds32-multiple.md
16448 (load_multiple): Update nds32_expand_load_multiple interface.
16449 (store_multiple): Update nds32_expand_store_multiple interface.
16450 * config/nds32/nds32-predicates.c
16451 (nds32_valid_multiple_load_store): Rename ...
16452 (nds32_valid_multiple_load_store_p): ... to this and refine
16454 * config/nds32/predicates.md
16455 (nds32_load_multiple_and_update_address_operation): New predicate.
16456 (nds32_store_multiple_and_update_address_operation): New predicate.
16458 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
16459 Chung-Ju Wu <jasonwucj@gmail.com>
16461 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
16462 (combo): New attribute.
16463 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
16465 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
16467 * config/nds32/nds32.opt: Change -mcmodel= default value.
16469 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
16470 Monk Chiang <sh.chiang04@gmail.com>
16471 Chung-Ju Wu <jasonwucj@gmail.com>
16473 * config/nds32/constants.md (unspec_element): New enum.
16474 * config/nds32/constraints.md (Umw): New constraint.
16475 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
16476 * config/nds32/nds32-intrinsic.md: Likewise.
16477 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
16478 (nds32_valid_smw_lwm_base_p): New.
16479 (nds32_output_smw_single_word): New.
16480 (nds32_output_lmw_single_word): New.
16481 (nds32_expand_unaligned_load): New.
16482 (nds32_expand_unaligned_store): New.
16483 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
16484 (nds32_output_smw_single_word): Declare.
16485 (nds32_output_lmw_single_word): Declare.
16486 (nds32_expand_unaligned_load): Declare.
16487 (nds32_expand_unaligned_store): Declare.
16488 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
16489 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
16490 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
16491 NDS32_BUILTIN_UASTORE_DW.
16492 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
16495 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
16496 Kito Cheng <kito.cheng@gmail.com>
16497 Chung-Ju Wu <jasonwucj@gmail.com>
16499 * config/nds32/nds32-intrinsic.c
16500 (nds32_expand_builtin_null_ftype_reg): Delete.
16501 (nds32_expand_builtin_reg_ftype_imm): Ditto.
16502 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
16503 (nds32_read_argument): New.
16504 (nds32_legitimize_target): Ditto.
16505 (nds32_legitimize_argument): Ditto.
16506 (nds32_check_constant_argument): Ditto.
16507 (nds32_expand_unop_builtin): Ditto.
16508 (nds32_expand_unopimm_builtin): Ditto.
16509 (nds32_expand_binop_builtin): Ditto.
16510 (nds32_builtin_decl_impl): Ditto.
16511 (builtin_description): Ditto.
16512 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
16513 (nds32_init_builtins_impl): Ditto.
16514 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
16515 (nds32_builtin_decl): New.
16516 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
16517 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
16519 2018-03-02 Jeff Law <law@redhat.com>
16521 * reorg.c (stop_search_p): Handle DEBUG_INSN.
16522 (redundant_insn, fill_simple_delay_slots): Likewise.
16523 (fill_slots_from_thread): Likewise.
16524 * resource.c (mark_referenced_resources): Likewise.
16525 (mark_set_resources, find_dead_or_set_registers): Likewise.
16527 2018-03-02 Jakub Jelinek <jakub@redhat.com>
16529 * substring-locations.h (format_warning_va): Formatting fix for
16530 ATTRIBUTE_GCC_DIAG.
16531 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
16533 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
16534 * substring-locations.c: Include intl.h.
16535 (format_warning_va): Turned into small wrapper around
16536 format_warning_n_va, renamed to ...
16537 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
16538 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
16540 (format_warning_at_substring_n): New function.
16541 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
16542 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
16543 format_warning_at_substring with just a shorter name instead of
16544 const function pointer.
16545 (fmtwarn_n): New function.
16546 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
16547 appropriate, get rid of all the fmtstr temporaries, move conditionals
16548 with G_() wrapped string literals directly into fmtwarn arguments,
16549 cast dir.len to (int), formatting fixes.
16551 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
16553 * doc/invoke.texi: Remove "Cilk Plus" references.
16555 2018-03-02 Jakub Jelinek <jakub@redhat.com>
16556 Richard Biener <rguenther@suse.de>
16559 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
16560 for error or warning attributes if CALL_FROM_THUNK_P is set.
16563 2018-03-02 Jakub Jelinek <jakub@redhat.com>
16566 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
16567 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
16570 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
16571 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
16573 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
16574 instead of -1U in last predictors element's probability member.
16576 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
16579 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
16580 arguments if they are comparable.
16582 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
16584 PR tree-optimization/84634
16585 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
16586 masks and masked_loop_p with a single loop_masks, making sure it's
16587 null for bb vectorization.
16589 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
16591 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
16592 (vect_analyze_data_ref_access): Use loop->safe_len rather than
16593 loop->force_vectorize to check whether there is no alias.
16595 2018-03-02 Jakub Jelinek <jakub@redhat.com>
16598 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
16600 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
16602 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
16603 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
16604 instead of a loop around prev_real_insn.
16605 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
16608 PR inline-asm/84625
16609 * config/i386/i386.c (ix86_print_operand): Use conditional
16610 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
16613 2018-03-02 Richard Biener <rguenther@suse.de>
16615 PR tree-optimization/84427
16616 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
16617 (bitmap_set_subtract_values): Rewrite to handle multiple
16620 (prune_clobbered_mems): Likewise.
16621 (phi_translate): Take edge instead of pred/phiblock.
16622 (phi_translate_1): Likewise.
16623 (phi_translate_set): Likewise. Insert all translated
16624 exprs for a value into the set, keeping possibly multiple
16625 expressions per value.
16626 (compute_antic_aux): Adjust for phi_translate changes.
16627 When intersecting union the expressions and prune those
16628 not in the final value set, keeping possibly multiple
16629 expressions per value. Do not use value-insertion
16630 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
16631 all expressions. Add verification that the value-sets
16632 only shrink during iteration.
16633 (compute_partial_antic_aux): Adjust for the phi_translate changes.
16634 (do_pre_regular_insertion): Likewise.
16635 (do_pre_partial_partial_insertion): Likewise.
16637 2018-03-02 Richard Biener <rguenther@suse.de>
16640 * config/darwin.c (saved_debug_info_level): New static global.
16641 (darwin_asm_lto_start): Disable debug info generation for LTO out.
16642 (darwin_asm_lto_end): Restore debug info generation settings.
16644 2018-03-01 Martin Liska <mliska@suse.cz>
16647 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
16648 volatile arguments.
16650 2018-03-01 Richard Biener <rguenther@suse.de>
16653 * dwarf2out.c (gen_variable_die): Properly handle late VLA
16654 type annotation with LTO when debug was disabled at compile-time.
16656 2018-03-01 Matthew Fortune <mfortune@gmail.com>
16658 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
16660 (mips_final_postscan_insn): Likewise.
16662 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
16664 PR rtl-optimization/84528
16665 * alias.c (init_alias_target): Add commentary.
16666 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
16667 a unique base value if the frame pointer is not eliminated
16668 to the stack pointer.
16670 2018-03-01 Tom de Vries <tom@codesourcery.com>
16672 PR rtl-optimization/83327
16673 * lra-int.h (hard_regs_spilled_into): Declare.
16674 * lra.c (hard_regs_spilled_into): Define.
16675 (init_reg_info): Init hard_regs_spilled_into.
16676 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
16677 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
16678 (process_bb_lives): Handle hard_regs_spilled_into.
16679 (lra_create_live_ranges_1): Before doing liveness propagation, clear
16680 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
16682 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
16684 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
16685 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
16686 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
16687 * config/rs6000/aix72.h: New file.
16689 2018-02-28 Jakub Jelinek <jakub@redhat.com>
16691 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
16692 instead of warning_at with conditional singular and plural messages
16696 * stor-layout.c (update_alignment_for_field): For
16697 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
16698 && !DECL_PACKED (field), do the alignment update, just use
16699 only desired_align instead of MAX (type_align, desired_align)
16701 (place_field): Don't do known_align < desired_align handling
16702 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
16703 is non-NULL, instead do it after rli->prev_field handling and
16704 only if not within a bitfield word. For DECL_PACKED (field)
16705 use type_align of BITS_PER_UNIT.
16707 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
16709 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
16710 superfluous parentheses and trailing spaces.
16712 2018-02-28 Richard Biener <rguenther@suse.de>
16714 PR tree-optimization/84584
16715 * graphite-scop-detection.c (scop_detection::add_scop): Discard
16716 SCoPs with fake exit edge.
16718 2018-02-28 Martin Liska <mliska@suse.cz>
16721 * timevar.c (timer::print): Fix format to properly print 100%
16724 2018-02-28 Richard Biener <rguenther@suse.de>
16726 PR middle-end/84607
16727 * genmatch.c (capture_info::walk_match): Do not mark
16728 captured expressions without operands as expr_p given
16729 they act more like predicates and should be subject to
16730 "lost tail" side-effect preserving.
16732 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
16734 PR rtl-optimization/81611
16735 * auto-inc-dec.c (attempt_change): Move dead note from
16736 mem_insn if it's the next use of regno
16737 (find_address): Take address use of reg holding
16738 non-incremented value. Add parm to limit search to the named
16740 (merge_in_block): Attempt to use a mem insn that is the next
16741 use of the original regno.
16743 2018-02-27 Martin Sebor <msebor@redhat.com>
16746 * doc/invoke.texi (-Wmissing-attributes): New option.
16747 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
16749 2018-02-27 Martin Sebor <msebor@redhat.com>
16751 PR translation/84207
16752 * diagnostic-core.h (warning_n, error_n, inform_n): Change
16753 n argument to unsigned HOST_WIDE_INT.
16754 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
16755 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
16756 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
16757 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
16759 2018-02-27 Richard Biener <rguenther@suse.de>
16761 PR tree-optimization/84512
16762 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
16763 Do not use the estimate returned from record_stmt_cost for
16764 the scalar iteration cost but sum properly using add_stmt_cost.
16766 2018-02-27 Richard Biener <rguenther@suse.de>
16768 PR tree-optimization/84466
16769 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
16770 Adjust last change to less strictly validate use operands.
16772 2018-02-27 Martin Liska <mliska@suse.cz>
16774 PR gcov-profile/84548
16775 * gcov.c (process_file): Allow partial overlap and consider it
16776 also as group functions.
16777 (output_lines): Properly calculate range of lines for a group.
16779 2018-02-27 Martin Liska <mliska@suse.cz>
16781 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
16782 'ggc' suffixes. Change first column width.
16783 (timer::print): Fix formatting of the column.
16785 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
16787 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
16788 preserve inline entry blocks for the sake of debug inline
16789 entry point markers alone.
16790 (remove_unused_locals): Suggest in comments a better place to
16791 force the preservation of inline entry blocks that are
16792 otherwise unused, but do not preserve them.
16794 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
16796 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
16798 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
16801 * config/i386/constraints.md (Bs): Replace
16802 ix86_indirect_branch_register with
16803 TARGET_INDIRECT_BRANCH_REGISTER.
16805 * config/i386/i386.md (indirect_jump): Likewise.
16806 (tablejump): Likewise.
16807 (*sibcall_memory): Likewise.
16808 (*sibcall_value_memory): Likewise.
16809 Peepholes of indirect call and jump via memory: Likewise.
16810 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
16811 (*sibcall_value_GOT_32): Likewise.
16812 * config/i386/predicates.md (indirect_branch_operand): Likewise.
16813 (GOT_memory_operand): Likewise.
16814 (call_insn_operand): Likewise.
16815 (sibcall_insn_operand): Likewise.
16816 (GOT32_symbol_operand): Likewise.
16817 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
16819 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
16821 PR rtl-optimization/83496
16822 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
16823 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
16824 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
16825 redundant insn, if any.
16826 (relax_delay_slots): Likewise.
16827 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
16829 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
16831 PR tree-optimization/83965
16832 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
16833 that grouped statements are part of a reduction chain. Return
16834 true if the statement is not marked as a reduction itself but
16835 is part of a group.
16836 (vect_recog_dot_prod_pattern): Don't check whether the statement
16837 is part of a group here.
16838 (vect_recog_sad_pattern): Likewise.
16839 (vect_recog_widen_sum_pattern): Likewise.
16841 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
16844 * final.c (rest_of_clean_state): Also look for calls inside sequences.
16846 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
16849 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
16851 (ix86_output_indirect_function_return): New prototype.
16852 (ix86_split_simple_return_pop_internal): Likewise.
16853 * config/i386/i386.c (indirect_return_via_cx): New.
16854 (indirect_return_via_cx_bnd): Likewise.
16855 (indirect_thunk_name): Handle return va CX_REG.
16856 (output_indirect_thunk_function): Create alias for
16857 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
16858 (ix86_output_indirect_jmp): Remove the bool argument.
16859 (ix86_output_indirect_function_return): New function.
16860 (ix86_split_simple_return_pop_internal): Likewise.
16861 * config/i386/i386.md (*indirect_jump): Don't pass false
16862 to ix86_output_indirect_jmp.
16863 (*tablejump_1): Likewise.
16864 (simple_return_pop_internal): Change it to define_insn_and_split.
16865 Call ix86_split_simple_return_pop_internal to split it for
16866 -mfunction-return=.
16867 (simple_return_indirect_internal): Call
16868 ix86_output_indirect_function_return instead of
16869 ix86_output_indirect_jmp.
16871 2018-02-26 Jakub Jelinek <jakub@redhat.com>
16874 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
16875 memset and value initialization afterwards.
16877 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
16879 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
16881 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16884 * common/config/aarch64/aarch64-common.c
16885 (aarch_option_optimization_table[]): Switch
16886 off fomit-frame-pointer
16888 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
16889 Chung-Ju Wu <jasonwucj@gmail.com>
16891 * config/nds32/nds32-multiple.md (load_multiple): Disallow
16893 (store_multiple): Ditto.
16895 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
16897 * config.gcc: Add --with-cpu support for nds32 target.
16898 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
16899 * config/nds32/nds32.opt: Add -mcpu= option.
16901 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
16903 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
16904 isel=yes): Warn for these deprecated options.
16906 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
16908 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
16909 ISA_2_5_MASKS_EMBEDDED.
16911 2018-02-23 Jakub Jelinek <jakub@redhat.com>
16913 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
16914 p->max as pointers rather than using iterative_hash_expr.
16916 2018-02-23 Carl Love <cel@us.ibm.com>
16918 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
16919 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
16921 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
16922 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
16923 P8V_BUILTIN_VEC_VUNSIGNED2.
16925 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
16928 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
16929 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
16931 * lra-constraints.c (curr_insn_transform): Set up
16932 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
16934 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
16935 * lra-eliminations.c (spill_pseudos): Ditto.
16936 (process_insn_for_elimination): Ditto.
16937 * lra-lives.c (reg_early_clobber_p): Use the new macros.
16938 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
16939 LRA_NON_CLOBBERED_ALT.
16941 2018-02-22 Martin Sebor <msebor@redhat.com>
16943 PR tree-optimization/84480
16944 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
16945 to maybe_diag_stxncpy_trunc. Call it.
16946 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
16947 from gimple_fold_builtin_strcpy. Print inlining stack.
16948 (handle_builtin_stxncpy): Print inlining stack.
16949 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
16951 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
16954 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
16955 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
16956 and -fcheck-pointer-bounds are used together.
16957 (indirect_thunk_prefix): New enum.
16958 (indirect_thunk_need_prefix): New function.
16959 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
16960 "_nt" instead of "_bnd" for NOTRACK prefix.
16961 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
16962 (output_indirect_thunk_function): Likewise.
16964 (ix86_code_end): Update output_indirect_thunk_function calls.
16965 (ix86_output_indirect_branch_via_reg): Replace
16966 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
16967 (ix86_output_indirect_branch_via_push): Likewise.
16968 (ix86_output_function_return): Likewise.
16969 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
16970 incompatible with -fcf-protection=branch and
16971 -fcheck-pointer-bounds.
16973 2018-02-22 Steve Ellcey <sellcey@cavium.com>
16976 * config/aarch64/aarch64.c (aarch64_print_address_internal):
16977 Change gcc_assert call to output_operand_lossage.
16979 2018-02-22 Steve Ellcey <sellcey@cavium.com>
16981 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
16983 2018-02-22 DJ Delorie <dj@redhat.com>
16984 Sebastian Perta <sebastian.perta@renesas.com>
16985 Oleg Endo <olegendo@gcc.gnu.org>
16987 * config/rx/rx.c (rx_rtx_costs): New function.
16988 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
16990 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
16992 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
16994 2018-02-22 Martin Liska <mliska@suse.cz>
16997 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
16998 Add "native" as a possible value.
17000 2018-02-22 Martin Liska <mliska@suse.cz>
17003 * config/i386/i386.c (ix86_option_override_internal):
17004 Add "native" as a possible value for -march and -mtune.
17006 2018-02-22 Jakub Jelinek <jakub@redhat.com>
17009 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
17010 to all type variants.
17012 PR tree-optimization/84503
17013 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
17014 width as info->bitpos + info->bitsize - start.
17015 (merged_store_group::merge_overlapping): Simplify width computation.
17016 (check_no_overlap): New function.
17017 (imm_store_chain_info::try_coalesce_bswap): Compute expected
17018 start + width and last_order of the group, fail if check_no_overlap
17020 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
17021 to group if check_no_overlap fails.
17023 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
17025 * config/rs6000/altivec.md: Delete contraint arguments to
17026 define_expand, define_split, and define_peephole2, and in
17027 define_insn_and_split if always unused.
17028 * config/rs6000/darwin.md: Ditto.
17029 * config/rs6000/dfp.md: Ditto.
17030 * config/rs6000/rs6000.md: Ditto.
17031 * config/rs6000/sync.md: Ditto.
17032 * config/rs6000/vector.md: Ditto.
17033 * config/rs6000/vsx.md: Ditto.
17035 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
17037 * config/rs6000/altivec.md: Write output control strings as braced
17038 blocks instead of double-quoted strings.
17039 * config/rs6000/darwin.md: Ditto.
17040 * config/rs6000/rs6000.md: Ditto.
17041 * config/rs6000/vector.md: Ditto.
17042 * config/rs6000/vsx.md: Ditto.
17044 2018-02-21 Jason Merrill <jason@redhat.com>
17046 PR c++/84314 - ICE with templates and fastcall attribute.
17047 * attribs.c (build_type_attribute_qual_variant): Remove assert.
17049 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
17051 * ipa-cp.c (determine_versionability): Fix comment typos.
17053 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
17056 * ipa-cp.c (determine_versionability): Do not version functions caling
17059 2018-02-21 Martin Liska <mliska@suse.cz>
17062 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
17063 Add "native" as a possible value.
17064 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
17065 the macro when native cpu detection is available.
17067 2018-02-21 Martin Liska <mliska@suse.cz>
17070 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
17071 Add "native" as a possible value.
17072 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
17073 when native cpu detection is available.
17075 2018-02-21 Jakub Jelinek <jakub@redhat.com>
17076 Martin Sebor <msebor@redhat.com>
17078 PR tree-optimization/84478
17079 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
17081 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
17082 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
17083 support which is conservatively correct, for 2 only stay conservative
17084 for maxlen. Formatting and comment capitalization fixes. Add STRICT
17085 argument to the 2 argument get_range_strlen, adjust 6 arg
17086 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
17088 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
17089 (gimple_fold_builtin_strlen): Pass true as last argument to
17092 2018-02-20 Martin Sebor <msebor@redhat.com>
17094 PR middle-end/84095
17095 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
17096 (builtin_memref::set_base_and_offset): Same. Handle inner references.
17097 (builtin_memref::builtin_memref): Factor out parts into
17098 set_base_and_offset and call it.
17100 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
17102 PR middle-end/84406
17103 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
17104 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
17105 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
17106 search at the associated MODE_INT.
17108 2018-02-20 Jeff Law <law@redhat.com>
17110 PR middle-end/82123
17111 PR tree-optimization/81592
17112 PR middle-end/79257
17113 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
17114 for range data rather than using global data.
17115 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
17116 range data rather than using global data.
17117 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
17118 pass it to children as needed.
17119 (struct directive::fmtresult): Similarly.
17120 (struct directive::set_width): Similarly.
17121 (struct directive::set_precision): Similarly.
17122 (format_integer, format_directive, parse_directive): Similarly.
17123 (format_none): Accept unnamed vr_values parameter.
17124 (format_percent, format_floating, format_character): Similarly.
17125 (format_string, format_plain): Similarly.
17126 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
17127 the EVRP range analyzer for range data rather than using global data.
17128 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
17129 gimple-ssa-evrp-analyze.h
17130 (class sprintf_dom_walker): Add after_dom_children member function.
17131 Add evrp_range_analyzer member.
17132 (sprintf_dom_walker::before_dom_children): Call into the EVRP
17133 range analyzer as needed.
17134 (sprintf_dom_walker::after_dom_children): New member function.
17135 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
17137 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
17138 (evrp_range_analyzer::pop_to_marker): Likewise.
17140 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
17142 PR tree-optimization/84419
17143 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
17144 with the required type if its current type is compatible but
17147 2018-02-20 Jakub Jelinek <jakub@redhat.com>
17149 PR middle-end/82004
17150 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
17151 after vectorization.
17153 2018-02-20 Martin Liska <mliska@suse.cz>
17156 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
17157 possible values if we don't have a hint.
17159 2018-02-20 Martin Liska <mliska@suse.cz>
17163 * final.c (shorten_branches): Build align_tab array with one
17165 * opts.c (finish_options): Add alignment option limit check.
17166 (MAX_CODE_ALIGN): Likewise.
17167 (MAX_CODE_ALIGN_VALUE): Likewise.
17168 * doc/invoke.texi: Document maximum allowed option value for
17169 all -falign-* options.
17171 2018-02-19 Jakub Jelinek <jakub@redhat.com>
17174 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
17175 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
17176 * var-tracking.c (emit_note_insn_var_location): Remove all references
17177 to NOTE_INSN_CALL_ARG_LOCATION.
17178 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
17179 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
17180 Use copy_rtx_if_shared.
17181 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
17182 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
17183 (dwarf2out_var_location): Remove handling of
17184 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
17186 * final.c (final_scan_insn): Remove all references to
17187 NOTE_INSN_CALL_ARG_LOCATION.
17188 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
17189 before dumping final insns.
17190 * except.c (emit_note_eh_region_end): Remove all references to
17191 NOTE_INSN_CALL_ARG_LOCATION.
17192 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
17193 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
17194 * config/arc/arc.c (hwloop_optimize): Likewise.
17195 * config/arm/arm.c (create_fix_barrier): Likewise.
17196 * config/s390/s390.c (s390_chunkify_start): Likewise.
17197 * config/sh/sh.c (find_barrier): Likewise.
17198 * config/i386/i386.c (rest_of_insert_endbranch,
17199 ix86_seh_fixup_eh_fallthru): Likewise.
17200 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
17201 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
17202 * config/frv/frv.c (frv_function_prologue): Likewise.
17203 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
17205 (note_outside_basic_block_p): Remove all references to
17206 NOTE_INSN_CALL_ARG_LOCATION.
17207 * gengtype.c (adjust_field_rtx_def): Likewise.
17208 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
17210 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
17211 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
17214 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
17217 PR tree-optimization/84452
17218 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
17219 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
17222 2018-02-19 Martin Liska <mliska@suse.cz>
17225 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
17227 2018-02-19 Martin Liska <mliska@suse.cz>
17228 Richard Sandiford <richard.sandiford@linaro.org>
17230 PR tree-optimization/82491
17231 * gimple-fold.c (get_base_constructor): Make earlier bail out
17234 2018-02-19 Carl Love <cel@us.ibm.com>
17236 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
17237 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
17239 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
17240 P8V_BUILTIN_VEC_NEG.
17242 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
17244 * config/rl78/rl78.md (movdf): New define expand.
17246 2018-02-19 Martin Liska <mliska@suse.cz>
17249 * doc/invoke.texi: Fix typo.
17250 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
17252 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
17254 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
17255 handle rs6000_single_float and rs6000_double_float specially for
17258 2018-02-16 Jeff Law <law@redhat.com>
17260 * config/rx/rx.c (add_pop_cfi_notes): New function.;
17261 (pop_regs): Use it.
17263 2018-02-16 Jakub Jelinek <jakub@redhat.com>
17266 * ipa-inline.c (inline_small_functions): Fix a typo.
17268 2018-02-16 Nathan Sidwell <nathan@acm.org>
17270 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
17272 2018-02-16 Carl Love <cel@us.ibm.com>
17274 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
17275 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
17276 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
17277 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
17278 expansion to P8V_BUILTIN_VEC_FLOAT2.
17280 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
17282 PR rtl-optimization/70023
17283 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
17284 src_regno into account.
17286 2018-02-16 Carl Love <cel@us.ibm.com>
17288 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
17289 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
17290 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
17291 * config/rs6000/rs6000.c: Remove case statements for
17292 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
17293 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
17294 and P9V_BUILTIN_VEC_VINSERT4B.
17295 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
17296 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
17297 * config/rs6000/vsx.md:
17298 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
17301 2018-02-16 Carl Love <cel@us.ibm.com>
17303 * config/rs6000/altivec.h: Add builtin names vec_extract4b
17305 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
17307 * config/rs6000/rs6000-c.c: Add the definitions for
17308 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
17309 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
17310 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
17311 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
17312 definition for insert4b and define insn *insert3b_internal.
17313 * doc/extend.texi: Add documentation for vec_extract4b.
17315 2018-02-16 Nathan Sidwell <nathan@acm.org>
17317 * doc/extend.texi (Backwards Compatibility): Mention friend
17318 injection. Note for-scope is deprecated.
17319 * doc/invoke.texi (-ffriend-injection): Deprecate.
17321 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
17323 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
17324 that moved to I2, also allow destinations that are a paradoxical
17325 subreg (instead of a normal reg).
17327 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
17330 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
17333 2018-02-16 Richard Biener <rguenther@suse.de>
17335 PR tree-optimization/84037
17336 PR tree-optimization/84016
17338 * config/i386/i386.c (ix86_builtin_vectorization_cost):
17339 Adjust vec_construct for the fact we need additional higher latency
17340 128bit inserts for AVX256 and AVX512 vector builds.
17341 (ix86_add_stmt_cost): Scale vector construction cost for
17344 2018-02-16 Richard Biener <rguenther@suse.de>
17346 PR tree-optimization/84417
17347 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
17348 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
17349 (non_rewritable_lvalue_p): Likewise, use poly-ints.
17351 2018-02-16 Martin Liska <mliska@suse.cz>
17354 * internal-fn.def (ASAN_CHECK): Set proper flags.
17355 (ASAN_MARK): Likewise.
17357 2018-02-16 Julia Koval <julia.koval@intel.com>
17359 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
17360 from PTA_CANNONLAKE.
17362 2018-02-16 Jakub Jelinek <jakub@redhat.com>
17365 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
17366 Use ++iter rather than iter++ for std::list iterators.
17367 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
17368 defer deleting them until all nodes in the forest are processed. Do
17369 free even leaf nodes. Change to_process into auto_vec.
17372 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
17373 * vec.h (vec_default_construct): Use memset instead of placement new
17374 if BROKEN_VALUE_INITIALIZATION is defined.
17375 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
17376 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
17379 PR rtl-optimization/83723
17380 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
17381 * lra.c (lra_substitute_pseudo): Likewise. If true, use
17382 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
17384 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
17386 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
17388 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
17390 PR rtl-optimization/81443
17391 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
17392 from inner REGs to paradoxical SUBREGs.
17394 2018-02-16 Richard Biener <rguenther@suse.de>
17396 PR tree-optimization/84399
17397 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17398 For operands we can analyze at their definition make sure we can
17399 analyze them at each use as well.
17401 2018-02-16 Richard Biener <rguenther@suse.de>
17403 PR tree-optimization/84190
17404 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
17405 volatile accesses if the decl isn't volatile.
17407 2018-02-15 Jason Merrill <jason@redhat.com>
17409 PR c++/84314 - ICE with templates and fastcall attribute.
17410 * attribs.c (build_type_attribute_qual_variant): Don't clobber
17411 TYPE_CANONICAL on an existing type.
17413 2018-02-15 Jakub Jelinek <jakub@redhat.com>
17415 PR tree-optimization/84383
17416 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
17417 dstoff nor call operand_equal_p if dstbase is NULL.
17419 PR tree-optimization/84334
17420 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
17421 also a CONSTANT_CLASS_P, punt.
17423 2018-02-14 Jim Wilson <jimw@sifive.com>
17425 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
17426 first SMALL_OPERAND check. New local min_second_step. Move assert
17427 to where locals are set. Add TARGET_RVC support.
17428 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
17430 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
17432 * doc/invoke.texi: Correct -Wformat-overflow code sample.
17434 2018-02-14 Martin Sebor <msebor@redhat.com>
17436 PR tree-optimization/83698
17437 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
17438 arrays constrain the offset range to their bounds.
17439 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
17440 (builtin_access::overlap): Avoid setting the size of overlap if it's
17442 (maybe_diag_overlap): Also consider arrays when deciding what values
17443 of offsets to include in diagnostics.
17445 2018-02-14 Martin Sebor <msebor@redhat.com>
17448 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
17449 that correspond to the kind of a declaration.
17451 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
17454 * config/pa/pa.md: Load address of PIC label using the linkage table
17455 if the label is nonlocal.
17457 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
17459 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
17460 warning message if user requests -maltivec=be.
17461 * doc/invoke.texi: Document deprecation of -maltivec=be.
17463 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
17466 * config/rs6000/rs6000-c.c: Update definitions for
17467 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
17468 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
17470 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
17473 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
17474 add _get_ssp intrinsics. Remove argument from
17475 __builtin_ia32_rdssp[d|q].
17476 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
17477 * config/i386/i386-builtin.def: Remove argument from
17478 __builtin_ia32_rdssp[d|q].
17479 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
17480 ix86_expand_special_args_builtin for _rdssp[d|q].
17481 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
17482 Clear register before usage.
17483 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
17484 Add documentation for new _get_ssp and _inc_ssp intrinsics.
17486 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
17488 PR tree-optimization/84357
17489 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
17490 operand 1 of an ARRAY_REF too.
17492 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
17495 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
17496 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
17498 (set_of_reg): New struct.
17499 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
17500 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
17501 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
17503 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
17504 Split into bitclr, bitset, bitinvert patterns if appropriate.
17505 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
17506 use rx_fuse_in_memory_bitop.
17507 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
17508 to named insn, correct maximum insn length.
17510 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
17513 * machmode.def: Define a complex mode for PARTIAL_INT.
17514 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
17516 * doc/rtl.texi: Document CSPImode.
17517 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
17519 (msp430_hard_regno_nregs_with_padding): Likewise.
17521 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
17524 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
17526 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
17528 PR rtl-optimization/84169
17529 * combine.c (try_combine): New variable split_i2i3. Set it to true if
17530 we generated a parallel as new i3 and we split that to new i2 and i3
17531 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
17532 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
17533 those to i2, not i1. Partially rewrite this scan code.
17535 2018-02-13 Jakub Jelinek <jakub@redhat.com>
17538 * stor-layout.c (place_field): For variable length fields, adjust
17539 offset_align afterwards not just based on the field's alignment,
17540 but also on the size.
17542 PR middle-end/84309
17543 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
17544 of exps and logs in the use_exp2 case.
17546 2018-02-13 Jeff Law <law@redhat.com>
17548 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
17549 entry for "vector".
17551 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
17554 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
17558 * common.opt (gas-loc-support, gas-locview-support): New.
17559 (ginline-points, ginternal-reset-location-views): New.
17560 * doc/invoke.texi: Document them. Use @itemx where intended.
17561 (gvariable-location-views): Adjust.
17562 * target.def (reset_location_view): New.
17563 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
17564 (TARGET_RESET_LOCATION_VIEW): New.
17565 * doc/tm.texi: Rebuilt.
17566 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
17567 (dwarf2out_default_as_locview_support): New.
17568 (output_asm_line_debug_info): Use option variables.
17569 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
17570 (output_loc_list): Likewise.
17571 (add_high_low_attributes): Check option variables.
17572 Don't output entry view attribute in strict mode.
17573 (gen_inlined_subroutine_die): Check option variables.
17574 (dwarf2out_inline_entry): Likewise.
17575 (init_sections_and_labels): Likewise.
17576 (dwarf2out_early_finish): Likewise.
17577 (maybe_reset_location_view): New, from...
17578 (dwarf2out_var_location): ... here. Call it.
17579 * debug.h (dwarf2out_default_as_loc_support): Declare.
17580 (dwarf2out_default_as_locview_support): Declare.
17581 * hooks.c (hook_int_rtx_insn_0): New.
17582 * hooks.h (hook_int_rtx_insn_0): Declare.
17583 * toplev.c (process_options): Take -gas-loc-support and
17584 -gas-locview-support from dwarf2out. Enable
17585 -gvariable-location-views by default only with locview
17586 assembler support. Enable -ginternal-reset-location-views by
17587 default only if the target defines the corresponding hook.
17588 Enable -ginline-points by default if location views are
17589 enabled; force it disabled if statement frontiers are
17591 * tree-inline.c (expand_call_inline): Check option variables.
17592 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
17594 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
17596 PR tree-optimization/84321
17597 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
17598 handling. Also check whether the anti-range contains any values
17599 that satisfy the mask; switch to a VR_RANGE if not.
17601 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
17604 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
17606 2018-02-13 Martin Jambor <mjambor@suse.cz>
17609 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
17610 of call statements, also set location of a load to a temporary.
17612 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
17614 * config/rl78/rl78.c (add_vector_labels): New function.
17615 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
17616 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
17617 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
17618 which checks that no arguments are passed.
17619 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
17620 * doc/extend.texi: Documentation for the new attribute.
17622 2018-02-13 Andreas Schwab <schwab@suse.de>
17624 * config/riscv/linux.h (CPP_SPEC): Define.
17626 2018-02-13 Jakub Jelinek <jakub@redhat.com>
17629 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
17630 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
17631 OPTION_MASK_ISA_AES as first argument to def_builtin_const
17632 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
17633 instead of OPTION_MASK_ISA_PCLMUL as first argument to
17634 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
17635 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
17636 temporarily for AES and PCLMUL builtins.
17638 PR tree-optimization/84339
17639 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
17640 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
17643 PR middle-end/84309
17644 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
17645 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
17646 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
17648 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
17650 * omp-simd-clone.h: New file.
17651 * omp-simd-clone.c: Include omp-simd-clone.h.
17652 (expand_simd_clones): No longer static.
17653 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
17654 cgraph.h and omp-simd-clone.h.
17655 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
17656 (vect_recog_widen_shift_pattern): Formatting fix.
17657 (vect_pattern_recog_1): Don't check optab for calls.
17660 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
17661 operands[2] into a REG before using gen_lowpart on it.
17663 2018-02-12 Jeff Law <law@redhat.com>
17666 * config/sh/sh.c (find_barrier): Consider a sibling call
17669 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
17670 successfully back substituting a reg.
17672 2018-02-12 Richard Biener <rguenther@suse.de>
17674 PR tree-optimization/84037
17675 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
17676 parameter, move visited init to caller.
17677 (vect_slp_analyze_operations): Separate cost from validity
17678 check, initialize visited once for all instances.
17679 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
17681 * tree-vect-stmts.c (vect_model_simple_cost): Make early
17683 (vect_model_promotion_demotion_cost): Likewise.
17684 (vectorizable_bswap): Guard cost modeling with !slp_node
17685 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
17687 (vectorizable_call): Likewise.
17688 (vectorizable_conversion): Likewise.
17689 (vectorizable_assignment): Likewise.
17690 (vectorizable_shift): Likewise.
17691 (vectorizable_operation): Likewise.
17692 (vectorizable_store): Likewise.
17693 (vectorizable_load): Likewise.
17694 (vectorizable_condition): Likewise.
17695 (vectorizable_comparison): Likewise.
17697 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
17700 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
17701 (ASAN_MARK): Fix fnspec to account for return value, change pointer
17702 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
17704 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
17706 PR middle-end/83665
17707 * params.def (inline-min-speedup): Increase from 8 to 15.
17708 (max-inline-insns-auto): Decrease from 40 to 30.
17709 * ipa-split.c (consider_split): Add some buffer for function to
17710 be considered inlining candidate.
17711 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
17714 2018-02-12 Richard Biener <rguenther@suse.de>
17716 PR tree-optimization/84037
17717 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
17718 matched stmts if we cannot swap the non-matched ones.
17720 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
17722 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
17723 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
17724 _mm_maskz_scalef_round_ss): New intrinsics.
17725 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
17726 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
17727 __builtin_ia32_scalefss_round): Remove.
17728 (__builtin_ia32_scalefsd_mask_round,
17729 __builtin_ia32_scalefss_mask_round): New intrinsics.
17730 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
17731 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
17732 ((match_operand:VF_128 2 "<round_nimm_predicate>"
17733 "<round_constraint>")): Changed to ...
17734 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
17735 "<round_scalar_constraint>")): ... this.
17736 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
17737 %0, %1, %2<round_op3>}"): Changed to ...
17738 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
17739 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
17740 %2<round_scalar_mask_op3>}"): ... this.
17741 * config/i386/subst.md (round_scalar_nimm_predicate): New.
17743 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
17745 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
17746 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
17747 (_mm_maskz_sqrt_round_ss): New intrinsics.
17748 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
17749 (__builtin_ia32_sqrtsd_mask_round)
17750 (__builtin_ia32_sqrtss_mask_round): New builtins.
17751 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
17752 (__builtin_ia32_sqrtss_round): Remove.
17753 (__builtin_ia32_sqrtsd_mask_round)
17754 (__builtin_ia32_sqrtss_mask_round): New builtins.
17755 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
17756 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
17757 ((match_operand:VF_128 1 "vector_operand"
17758 "xBm,<round_constraint>")): Changed to ...
17759 ((match_operand:VF_128 1 "vector_operand"
17760 "xBm,<round_scalar_constraint>")): ... this.
17761 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
17762 %0, %2, %<iptr>1<round_op3>}): Changed to ...
17763 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
17764 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
17765 %<iptr>1<round_scalar_mask_op3>}): ... this.
17766 ((set_attr "prefix" "<round_prefix>")): Changed to ...
17767 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
17769 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
17772 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
17773 Cast vec_cmpeq result to correct type.
17774 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
17775 Cast vec_cmpgt result to correct type.
17777 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
17779 * final.c (final_scan_insn_1): Renamed from...
17780 (final_scan_insn): ... this. New wrapper, to recover
17781 seen from the outermost call in recursive ones.
17782 * config/sparc/sparc.c (output_return): Drop seen from call.
17783 (output_sibcall): Likewise.
17784 * config/visium/visium.c (output_branch): Likewise.
17786 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
17788 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
17791 2018-02-10 Alan Modra <amodra@gmail.com>
17794 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
17795 Specify LR as an input.
17797 2018-02-10 Jakub Jelinek <jakub@redhat.com>
17800 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
17801 remove_member_access_dummy_vars): New functions.
17802 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
17803 lower_omp_1, execute_lower_omp): Use them.
17805 PR rtl-optimization/84308
17806 * shrink-wrap.c (spread_components): Release todo vector.
17808 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
17810 PR rtl-optimization/57193
17811 * ira-color.c (struct allocno_color_data): Add member
17812 conflict_allocno_hard_prefs.
17813 (update_conflict_allocno_hard_prefs): New.
17814 (bucket_allocno_compare_func): Add a preference based on
17815 conflict_allocno_hard_prefs.
17816 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
17817 (color_allocnos): Remove a dead code. Initiate
17818 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
17820 2018-02-09 Jakub Jelinek <jakub@redhat.com>
17823 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
17824 constraint from =wa to wa. Avoid a subreg on the output operand,
17825 instead use a pseudo and subreg it in a move.
17826 (p9_xxbrd_<mode>): Changed to ...
17827 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
17828 (p9_xxbrd_v2df): New expander.
17829 (p9_xxbrw_<mode>): Changed to ...
17830 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
17831 (p9_xxbrw_v4sf): New expander.
17833 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
17835 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
17837 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
17840 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
17841 multiply in 32-bit mode.
17842 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
17843 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
17846 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
17848 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
17849 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
17850 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
17851 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
17853 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
17856 * dwarf2out.c (is_trivial_indirect_ref): New function.
17857 (dwarf2out_late_global_decl): Do not generate a location
17858 attribute for variables that have a non-trivial DECL_VALUE_EXPR
17859 and that are not defined in the current unit.
17861 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
17863 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
17864 instead of a libcall for UNORDERED.
17866 2018-02-09 Tamar Christina <tamar.christina@arm.com>
17869 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
17870 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
17872 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17875 * config/s390/s390.c (s390_set_current_function): Invoke
17876 s390_indirect_branch_settings also if fndecl didn't change.
17878 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
17880 * config/rs6000/rs6000.md (blockage): Set length to zero.
17882 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
17884 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
17886 2018-02-09 Jakub Jelinek <jakub@redhat.com>
17889 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
17890 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
17894 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
17895 PARALLEL incoming that failed vt_get_decl_and_offset check.
17897 PR middle-end/84237
17898 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
17899 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
17901 (get_variable_section): For decls in named .bss* sections pass true as
17902 second argument to bss_initializer_p.
17904 2018-02-09 Marek Polacek <polacek@redhat.com>
17905 Jakub Jelinek <jakub@redhat.com>
17908 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
17909 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
17910 Sync some changes from cxx_fold_indirect_ref.
17912 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
17914 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
17916 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
17917 (BLOCK_INLINE_ENTRY_LABEL): New.
17918 (dwarf2out_var_location): Disregard inline entry markers.
17919 (inline_entry_data): New struct.
17920 (inline_entry_data_hasher): New hashtable type.
17921 (inline_entry_data_hasher::hash): New.
17922 (inline_entry_data_hasher::equal): New.
17923 (inline_entry_data_table): New variable.
17924 (add_high_low_attributes): Add DW_AT_entry_pc and
17925 DW_AT_GNU_entry_view attributes if a pending entry is found
17926 in inline_entry_data_table. Add old entry_pc attribute only
17927 if debug nonbinding markers are disabled.
17928 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
17929 markers are enabled.
17930 (block_within_block_p, dwarf2out_inline_entry): New.
17931 (dwarf2out_finish): Check that no entries remained in
17932 inline_entry_data_table.
17933 * final.c (reemit_insn_block_notes): Handle inline entry notes.
17934 (final_scan_insn, notice_source_line): Likewise.
17935 (rest_of_clean_state): Skip inline entry markers.
17936 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
17938 * gimple.c (gimple_build_debug_inline_entry): New.
17939 * gimple.h (enum gimple_debug_subcode): Add
17940 GIMPLE_DEBUG_INLINE_ENTRY.
17941 (gimple_build_debug_inline_entry): Declare.
17942 (gimple_debug_inline_entry_p): New.
17943 (gimple_debug_nonbind_marker_p): Adjust.
17944 * insn-notes.def (INLINE_ENTRY): New.
17945 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
17946 inline entry marker notes.
17947 (print_insn): Likewise.
17948 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
17949 (INSN_DEBUG_MARKER_KIND): Likewise.
17950 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
17951 * tree-inline.c (expand_call_inline): Build and insert
17952 debug_inline_entry stmt.
17953 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
17954 inline entry blocks early, if nonbind markers are enabled.
17955 (dump_scope_block): Dump fragment info.
17956 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
17957 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
17958 (gimple_build_debug_inline_entry): New.
17959 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
17960 Enable/disable inline entry points too.
17961 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
17962 (DEBUG_INSN): Describe inline entry markers.
17964 * common.opt (gvariable-location-views): New.
17965 (gvariable-location-views=incompat5): New.
17966 * config.in: Rebuilt.
17967 * configure: Rebuilt.
17968 * configure.ac: Test assembler for view support.
17969 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
17970 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
17971 * dwarf2out.c (var_loc_view): New typedef.
17972 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
17973 (dwarf2out_locviews_in_attribute): New.
17974 (dwarf2out_locviews_in_loclist): New.
17975 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
17976 (enum dw_line_info_opcode): Add LI_adv_address.
17977 (struct dw_line_info_table): Add view.
17978 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
17979 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
17980 (zero_view_p): New variable.
17981 (ZERO_VIEW_P): New macro.
17982 (output_asm_line_debug_info): New.
17983 (struct var_loc_node): Add view.
17984 (add_AT_view_list, AT_loc_list): New.
17985 (add_var_loc_to_decl): Add view param. Test it against last.
17986 (new_loc_list): Add view params. Record them.
17987 (AT_loc_list_ptr): Handle loc and view lists.
17988 (view_list_to_loc_list_val_node): New.
17989 (print_dw_val): Handle dw_val_class_view_list.
17990 (size_of_die): Likewise.
17991 (value_format): Likewise.
17992 (loc_list_has_views): New.
17993 (gen_llsym): Set vl_symbol too.
17994 (maybe_gen_llsym, skip_loc_list_entry): New.
17995 (dwarf2out_maybe_output_loclist_view_pair): New.
17996 (output_loc_list): Output view list or entries too.
17997 (output_view_list_offset): New.
17998 (output_die): Handle dw_val_class_view_list.
17999 (output_dwarf_version): New.
18000 (output_compilation_unit_header): Use it.
18001 (output_skeleton_debug_sections): Likewise.
18002 (output_rnglists, output_line_info): Likewise.
18003 (output_pubnames, output_aranges): Update version comments.
18004 (output_one_line_info_table): Output view numbers in asm comments.
18005 (dw_loc_list): Determine current endview, pass it to new_loc_list.
18006 Call maybe_gen_llsym.
18007 (loc_list_from_tree_1): Adjust.
18008 (add_AT_location_description): Create view list attribute if
18009 needed, check it's absent otherwise.
18010 (convert_cfa_to_fb_loc_list): Adjust.
18011 (maybe_emit_file): Call output_asm_line_debug_info for test.
18012 (dwarf2out_var_location): Reset views as needed. Precompute
18013 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
18014 attribute. Set view.
18015 (new_line_info_table): Reset next view.
18016 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
18017 (dwarf2out_source_line): Likewise. Output view resets and labels to
18018 the assembler, or select appropriate line info opcodes.
18019 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
18020 (optimize_string_length): Catch it. Adjust.
18021 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
18022 dw_val_class_view_list, and remove it if no longer needed.
18023 (hash_loc_list): Hash view numbers.
18024 (loc_list_hasher::equal): Compare them.
18025 (optimize_location_lists): Check whether a view list symbol is
18026 needed, and whether the locview attribute is present, and
18027 whether they match. Remove the locview attribute if no longer
18029 (index_location_lists): Call skip_loc_list_entry for test.
18030 (dwarf2out_finish): Call output_asm_line_debug_info for test.
18031 Use output_dwarf_version.
18032 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
18033 (struct dw_val_node): Add val_view_list.
18034 * final.c (SEEN_NEXT_VIEW): New.
18035 (set_next_view_needed): New.
18036 (clear_next_view_needed): New.
18037 (maybe_output_next_view): New.
18038 (final_start_function): Rename to...
18039 (final_start_function_1): ... this. Take pointer to FIRST,
18040 add SEEN parameter. Emit param bindings in the initial view.
18041 (final_start_function): Reintroduce SEEN-less interface.
18042 (final): Rename to...
18043 (final_1): ... this. Take SEEN parameter. Output final pending
18044 next view at the end.
18045 (final): Reintroduce seen-less interface.
18046 (final_scan_insn): Output pending next view before switching
18047 sections or ending a block. Mark the next view as needed when
18048 outputting variable locations. Notify debug backend of section
18049 changes, and of location view changes.
18050 (rest_of_handle_final): Adjust.
18051 * toplev.c (process_options): Autodetect value for debug variable
18052 location views option. Warn on incompat5 without -gdwarf-5.
18053 * doc/invoke.texi (gvariable-location-views): New.
18054 (gvariable-location-views=incompat5): New.
18055 (gno-variable-location-views): New.
18057 2018-02-08 David Malcolm <dmalcolm@redhat.com>
18059 PR tree-optimization/84136
18060 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
18061 that the result of find_edge is non-NULL.
18063 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
18066 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
18067 storing integer register in SImode. Fix cost of 256 and 512
18068 byte aligned SSE register store.
18070 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
18072 * config/i386/i386.c (ix86_multiplication_cost): Fix
18073 multiplication cost for TARGET_AVX512DQ.
18075 2018-02-08 Marek Polacek <polacek@redhat.com>
18077 PR tree-optimization/84238
18078 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
18081 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18083 PR tree-optimization/84265
18084 * tree-vect-stmts.c (vectorizable_store): Don't treat
18085 VMAT_CONTIGUOUS accesses as grouped.
18086 (vectorizable_load): Likewise.
18088 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18090 PR tree-optimization/81635
18091 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
18092 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
18093 (test_round_for_mask): New functions.
18094 (wide_int_cc_tests): Call test_round_for_mask.
18095 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
18096 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
18097 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
18098 range returned by get_range_info.
18100 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
18103 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
18104 * symtab.c: Include builtins.h
18105 (symtab_node::output_to_lto_symbol_table_p): Move here
18106 from lto-streamer-out.c:output_symbol_p.
18107 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
18108 (output_symbol_p): Move all logic to symtab.c
18109 (produce_symtab): Update.
18111 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18113 * config/s390/s390-opts.h (enum indirect_branch): Define.
18114 * config/s390/s390-protos.h (s390_return_addr_from_memory)
18115 (s390_indirect_branch_via_thunk)
18116 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
18117 (enum s390_indirect_branch_type): Define.
18118 * config/s390/s390.c (struct s390_frame_layout, struct
18119 machine_function): Remove.
18120 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
18121 (indirect_branch_table_label_no, indirect_branch_table_name):
18123 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
18124 (enum s390_indirect_branch_option): Define.
18125 (s390_return_addr_from_memory): New function.
18126 (s390_handle_string_attribute): New function.
18127 (s390_attribute_table): Add new attribute handler.
18128 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
18129 (s390_indirect_branch_via_thunk): New function.
18130 (s390_indirect_branch_via_inline_thunk): New function.
18131 (s390_function_ok_for_sibcall): When jumping via thunk disallow
18132 sibling call optimization for non z10 compiles.
18133 (s390_emit_call): Force indirect branch target to be a single
18134 register. Add r1 clobber for non-z10 compiles.
18135 (s390_emit_epilogue): Emit return jump via return_use expander.
18136 (s390_reorg): Handle JUMP_INSNs as execute targets.
18137 (s390_option_override_internal): Perform validity checks for the
18138 new command line options.
18139 (s390_indirect_branch_attrvalue): New function.
18140 (s390_indirect_branch_settings): New function.
18141 (s390_set_current_function): Invoke s390_indirect_branch_settings.
18142 (s390_output_indirect_thunk_function): New function.
18143 (s390_code_end): Implement target hook.
18144 (s390_case_values_threshold): Implement target hook.
18145 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
18147 * config/s390/s390.h (struct s390_frame_layout)
18148 (struct machine_function): Move here from s390.c.
18149 (TARGET_INDIRECT_BRANCH_NOBP_RET)
18150 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
18151 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
18152 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
18153 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
18154 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
18155 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
18156 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
18157 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
18158 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
18159 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
18160 (mnemonic attribute): Add values which aren't recognized
18162 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
18163 pattern for branch conversion. Fix mnemonic attribute.
18164 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
18165 indirect branch via thunk if requested.
18166 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
18167 ("*indirect_jump"): Disable for branch conversion using out of
18169 ("indirect_jump_via_thunk<mode>_z10")
18170 ("indirect_jump_via_thunk<mode>")
18171 ("indirect_jump_via_inlinethunk<mode>_z10")
18172 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
18173 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
18174 ("casesi_jump_via_inlinethunk<mode>_z10")
18175 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
18176 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
18177 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
18178 ("*indirect2_jump"): Disable for branch conversion.
18179 ("casesi_jump"): Turn into expander and expand patterns for branch
18181 ("return_use"): New expander.
18182 ("*return"): Emit return via thunk and rename it to ...
18183 ("*return<mode>"): ... this one.
18184 * config/s390/s390.opt: Add new options and and enum for the
18187 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18189 * lra-constraints.c (match_reload): Unconditionally use
18190 gen_lowpart_SUBREG, rather than selecting between that
18191 and equivalent gen_rtx_SUBREG code.
18193 2018-02-08 Richard Biener <rguenther@suse.de>
18195 PR tree-optimization/84233
18196 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
18197 changed flag instead of boguously re-using phi_inserted.
18199 2018-02-08 Martin Jambor <mjambor@suse.cz>
18201 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
18202 static local variables.
18204 2018-02-08 Richard Biener <rguenther@suse.de>
18206 PR tree-optimization/84278
18207 * tree-vect-stmts.c (vectorizable_store): When looking for
18208 smaller vector types to perform grouped strided loads/stores
18209 make sure the mode is supported by the target.
18210 (vectorizable_load): Likewise.
18212 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
18214 * config/aarch64/aarch64.c (aarch64_components_for_bb):
18215 Increase LDP/STP opportunities by adding adjacent callee-saves.
18217 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
18219 PR rtl-optimization/84068
18220 PR rtl-optimization/83459
18221 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
18223 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
18225 PR tree-optimization/84224
18226 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
18227 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
18228 non-zero arguments.
18230 2018-02-07 Iain Sandoe <iain@codesourcery.com>
18233 * config/rs6000/altivec.md (*restore_world): Remove LR use.
18234 * config/rs6000/predicates.md (restore_world_operation): Adjust op
18235 count, remove one USE.
18237 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
18239 * doc/install.texi (Configuration): Document the
18240 --with-long-double-format={ibm,ieee} PowerPC configuration
18244 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
18245 Convert from define_expand to be define_insn_and_split. Rework
18246 float/double/_Float128 conversions to QI/HI/SImode to work with
18247 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
18248 conversions to QI/HImode types did a store and then a load to
18249 truncate the value. For conversions to VSX registers, don't split
18250 the insn, instead emit the code directly. Use the code iterator
18251 any_fix to combine signed and unsigned conversions.
18252 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
18253 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
18254 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
18255 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
18256 (fix_<mode>di2_hw): Likewise.
18257 (fixuns_<mode>di2_hw): Likewise.
18258 (fix_<mode>si2_hw): Likewise.
18259 (fixuns_<mode>si2_hw): Likewise.
18260 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
18261 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
18262 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
18263 fix<uns>_trunc<SFDF:mode>si2_p8.
18264 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
18265 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
18266 (fix<uns>_<mode>_mem): Likewise.
18267 (fctiw<u>z_<mode>_mem): Likewise.
18268 (fix<uns>_<mode>_mem): Likewise.
18269 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
18270 the register allocator from doing a direct move to the GPRs to do
18271 a store, and instead use the ISA 3.0 store byte/half-word from
18272 vector register instruction. For IEEE 128-bit floating point,
18273 also optimize stores of 32-bit ints.
18274 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
18276 2018-02-07 Alan Hayward <alan.hayward@arm.com>
18278 * genextract.c (push_pathstr_operand): New function to support
18280 (walk_rtx): Call push_pathstr_operand.
18281 (print_path): Support [a-zA-Z].
18283 2018-02-07 Richard Biener <rguenther@suse.de>
18285 PR tree-optimization/84037
18286 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
18287 (cse_and_gimplify_to_preheader): Declare.
18288 (vect_get_place_in_interleaving_chain): Likewise.
18289 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18291 (_loop_vec_info::~_loop_vec_info): Delete it.
18292 (cse_and_gimplify_to_preheader): New function.
18293 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
18294 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
18295 (vectorizable_load): Likewise. For grouped stores always base
18296 the IV on the first element.
18297 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
18298 condition before gimplifying.
18300 2018-02-07 Jakub Jelinek <jakub@redhat.com>
18302 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
18303 *DIV_EXPR and *MOD_EXPR.
18305 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
18308 * config/i386/i386.c (ix86_option_override_internal): Mask out
18309 the CF_SET bit when checking -fcf-protection.
18311 2018-02-07 Tom de Vries <tom@codesourcery.com>
18314 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
18317 2018-02-07 Richard Biener <rguenther@suse.de>
18319 PR tree-optimization/84204
18320 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
18323 PR tree-optimization/84205
18324 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
18325 special-case isl_ast_op_zdiv_r.
18327 PR tree-optimization/84223
18328 * graphite-scop-detection.c (gather_bbs::before_dom_children):
18329 Only add conditions from within the region.
18330 (gather_bbs::after_dom_children): Adjust.
18332 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
18335 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
18336 * config/avr/avr.md: Only post-reload split REG-REG moves if
18337 either register is GENERAL_REG_P.
18339 2018-02-07 Jakub Jelinek <jakub@redhat.com>
18341 PR tree-optimization/84235
18342 * tree-ssa-scopedtables.c
18343 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
18344 if the subtraction is performed in floating point type where NaNs are
18345 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
18346 build 1. Formatting fix.
18348 2018-02-06 Jakub Jelinek <jakub@redhat.com>
18351 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
18352 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
18353 and skip it regardless of bb boundaries. Use CALL_P macro,
18354 don't test INSN_P (insn) together with CALL_P or JUMP_P check
18355 unnecessarily, formatting fix.
18357 2018-02-06 Michael Collison <michael.collison@arm.com>
18359 * config/arm/thumb2.md:
18360 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
18361 (*thumb_mov_notscc): Ditto.
18363 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
18366 * config/rs6000/rs6000.md (su code attribute): Use "u" for
18367 unsigned_fix, not "s".
18369 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18371 * configure.ac (gcc_fn_eh_frame_ro): New function.
18372 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
18373 correct .eh_frame permissions.
18374 * configure: Regenerate.
18376 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
18378 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
18379 irrelevant options.
18381 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18383 * config/rs6000/rs6000.c (rs6000_option_override_internal):
18384 Display warning message for -mno-speculate-indirect-jumps.
18386 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
18388 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
18390 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
18392 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
18394 PR tree-optimization/84225
18395 * tree-eh.c (find_trapping_overflow): Only call
18396 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
18398 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18401 * config/i386/i386.c: Reimplement the check of possible options
18402 -mibt/-mshstk conbination. Change error messages.
18403 * doc/invoke.texi: Fix a typo: remove extra '='.
18405 2018-02-06 Marek Polacek <polacek@redhat.com>
18407 PR tree-optimization/84228
18408 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
18410 2018-02-06 Tamar Christina <tamar.christina@arm.com>
18413 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
18414 emitted arch directives.
18415 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
18416 __ARM_FEATURE_COPROC before changing architectures.
18418 2018-02-06 Richard Biener <rguenther@suse.de>
18420 * config/i386/i386.c (print_reg): Fix typo.
18421 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
18423 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
18425 * configure: Regenerate.
18427 2018-02-05 Martin Sebor <msebor@redhat.com>
18429 PR tree-optimization/83369
18430 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
18433 2018-02-05 Martin Liska <mliska@suse.cz>
18435 * doc/invoke.texi: Cherry-pick upstream r323995.
18437 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
18439 * ira.c (ira_init_register_move_cost): Adjust comment.
18441 2018-02-05 Martin Liska <mliska@suse.cz>
18443 PR gcov-profile/84137
18444 * doc/gcov.texi: Fix typo in documentation.
18446 2018-02-05 Martin Liska <mliska@suse.cz>
18448 PR gcov-profile/83879
18449 * doc/gcov.texi: Document necessity of --dynamic-list-data when
18450 using dlopen functionality.
18452 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
18454 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
18455 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
18456 _mm_maskz_range_ss, _mm_mask_range_round_ss,
18457 _mm_maskz_range_round_ss): New intrinsics.
18458 (__builtin_ia32_rangesd128_round)
18459 (__builtin_ia32_rangess128_round): Remove.
18460 (__builtin_ia32_rangesd128_mask_round,
18461 __builtin_ia32_rangess128_mask_round): New builtins.
18462 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
18463 __builtin_ia32_rangess128_round): Remove.
18464 (__builtin_ia32_rangesd128_mask_round,
18465 __builtin_ia32_rangess128_mask_round): New builtins.
18466 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
18467 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
18468 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
18469 "<round_saeonly_constraint>")): Changed to ...
18470 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
18471 "<round_saeonly_scalar_constraint>")): ... this.
18472 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
18473 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
18474 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
18475 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
18476 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
18478 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
18480 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
18482 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
18483 Remove all values except native, 8540 and 8548.
18485 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
18487 * config/i386/i386.c (ix86_output_function_return): Pass
18488 INVALID_REGNUM, instead of -1, as invalid register number to
18489 indirect_thunk_name and output_indirect_thunk.
18491 2018-02-02 Julia Koval <julia.koval@intel.com>
18493 * config.gcc: Add -march=icelake.
18494 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
18495 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
18496 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
18497 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
18498 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
18499 (processor_target_table): Add icelake.
18500 (ix86_option_override_internal): Handle new PTAs.
18501 (get_builtin_code_for_version): Handle icelake.
18502 (M_INTEL_COREI7_ICELAKE): New.
18503 (fold_builtin_cpu): Handle icelake.
18504 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
18505 * doc/invoke.texi: Add -march=icelake.
18507 2018-02-02 Julia Koval <julia.koval@intel.com>
18509 * config/i386/i386.c (ix86_option_override_internal): Change flags type
18510 to wide_int_bitmask.
18511 * wide-int-bitmask.h: New.
18513 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18516 * config/i386/i386.md: Replace Pmode with word_mode in
18517 builtin_setjmp_setup and builtin_longjmp to support x32.
18519 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
18523 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
18525 (rs6000_supported_cpu_names): New static variable.
18526 (linux_cpu_translation_table): Likewise.
18527 (elf_platform) <cpu>: Define new static variable and use it.
18528 Translate kernel AT_PLATFORM name to canonical name if needed.
18529 Error if platform name is unknown.
18531 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
18534 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
18536 2018-02-01 Jeff Law <law@redhat.com>
18539 * config/i386/i386.c (release_scratch_register_on_entry): Add new
18540 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
18541 the scratch if RELEASE_VIA_POP is false.
18542 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
18543 If we have to save a temporary register, decrement SIZE appropriately.
18544 Pass new arguments to release_scratch_register_on_entry.
18545 (ix86_adjust_stack_and_probe): Likewise.
18546 (ix86_emit_probe_stack_range): Pass new arguments to
18547 release_scratch_register_on_entry.
18549 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
18551 PR rtl-optimization/84157
18552 * combine.c (change_zero_ext): Use REG_P predicate in
18553 front of HARD_REGISTER_P predicate.
18555 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
18557 * config/avr/avr.c (avr_option_override): Move disabling of
18558 -fdelete-null-pointer-checks to...
18559 * common/config/avr/avr-common.c (avr_option_optimization_table):
18562 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18564 PR tree-optimization/81635
18565 * tree-data-ref.c (split_constant_offset_1): For types that
18566 wrap on overflow, try to use range info to prove that wrapping
18569 2018-02-01 Renlin Li <renlin.li@arm.com>
18572 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
18573 TAILCALL_ADDR_REGS.
18574 (aarch64_register_move_cost): Likewise.
18575 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
18576 TAILCALL_ADDR_REGS.
18577 (REG_CLASS_NAMES): Likewise.
18578 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
18579 TAILCALL_ADDR_REGS. Remove IP registers.
18580 * config/aarch64/aarch64.md (Ucs): Update register constraint.
18582 2018-02-01 Richard Biener <rguenther@suse.de>
18584 * domwalk.h (dom_walker::dom_walker): Add additional constructor
18585 for specifying RPO order and allow NULL for that.
18586 * domwalk.c (dom_walker::dom_walker): Likewise.
18587 (dom_walker::walk): Handle NULL RPO order.
18588 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
18590 (rewrite_update_dom_walker): Likewise.
18591 (mark_def_dom_walker): Likewise.
18593 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18595 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
18596 (aarch64_maybe_expand_sve_subreg_move): Declare.
18597 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
18598 * config/aarch64/predicates.md (aarch64_any_register_operand): New
18600 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
18601 that are semantically a reverse operation.
18602 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
18603 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
18604 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
18606 (aarch64_can_change_mode_class): For big-endian, forbid changes
18607 between two SVE modes if they have different element sizes.
18609 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18611 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
18612 the TImode handling for big-endian targets.
18614 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18616 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
18617 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
18619 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
18620 Remove BSWAP handing for big-endian targets and use the form of
18621 LD1RQ appropariate for the mode.
18623 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18625 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
18626 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
18627 duplicated element.
18629 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18632 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
18633 check for operands that need to go through aarch64_sve_reload_be.
18635 2018-02-01 Jakub Jelinek <jakub@redhat.com>
18637 PR tree-optimization/81661
18638 PR tree-optimization/84117
18639 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
18640 * tree-eh.c: Include gimplify.h.
18641 (find_trapping_overflow, replace_trapping_overflow,
18642 rewrite_to_non_trapping_overflow): New functions.
18643 * tree-vect-loop.c: Include tree-eh.h.
18644 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
18645 * tree-data-ref.c: Include tree-eh.h.
18646 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
18648 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
18650 PR rtl-optimization/84123
18651 * combine.c (change_zero_ext): Check if hard register satisfies
18652 can_change_dest_mode before calling gen_lowpart_SUBREG.
18654 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
18657 * ira.c (ira_init_register_move_cost): Remove assert.
18659 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
18661 PR rtl-optimization/84071
18662 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
18663 * doc/tm.texi: Regenerate.
18665 2018-01-31 Richard Biener <rguenther@suse.de>
18667 PR tree-optimization/84132
18668 * tree-data-ref.c (analyze_miv_subscript): Properly
18669 check whether evolution_function_is_affine_multivariate_p
18670 before calling gcd_of_steps_may_divide_p.
18672 2018-01-31 Julia Koval <julia.koval@intel.com>
18675 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
18676 * config/i386/i386.md (rdpid_rex64) New.
18677 (rdpid): Make 32bit only.
18679 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
18682 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
18683 an IDENTIFIER_NODE for FUNCTION_TYPE's.
18685 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
18688 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
18690 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
18692 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
18694 PR rtl-optimization/84071
18695 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
18696 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
18698 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
18700 * config/arc/arc.c (arc_handle_aux_attribute): New function.
18701 (arc_attribute_table): Add 'aux' attribute.
18702 (arc_in_small_data_p): Consider aux like variables.
18703 (arc_is_aux_reg_p): New function.
18704 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
18705 (arc_get_aux_arg): New function.
18706 (prepare_move_operands): Handle aux-register access.
18707 (arc_handle_aux_attribute): New function.
18708 * doc/extend.texi (ARC Variable attributes): Add subsection.
18710 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
18712 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
18713 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
18714 (arc_attribute_table): Add 'uncached' attribute.
18715 (arc_print_operand): Print '.di' flag for uncached memory
18717 (arc_in_small_data_p): Do not consider for small data the uncached
18719 (arc_is_uncached_mem_p): New function.
18720 * config/arc/predicates.md (compact_store_memory_operand): Check
18721 for uncached memory accesses.
18722 (nonvol_nonimm_operand): Likewise.
18723 * doc/extend.texi (ARC Type Attribute): New subsection.
18725 2018-01-31 Jakub Jelinek <jakub@redhat.com>
18728 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
18729 falign-loops=): Add Optimization flag.
18731 2018-01-30 Jeff Law <law@redhat.com>
18734 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
18735 INT_REGISTERS_SAVED. Check it prior to calling
18736 get_scratch_register_on_entry.
18737 (ix86_adjust_stack_and_probe): Similarly.
18738 (ix86_emit_probe_stack_range): Similarly.
18739 (ix86_expand_prologue): Corresponding changes.
18741 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18744 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
18745 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
18747 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
18750 * lra-constraints.c (curr_insn_transform): Process AND in the
18753 2018-01-30 Jakub Jelinek <jakub@redhat.com>
18755 PR rtl-optimization/83986
18756 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
18757 dependence against last_pending_memory_flush in addition to
18758 pending_jump_insns.
18760 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
18762 PR tree-optimization/81611
18763 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
18766 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18769 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
18772 2018-01-30 Richard Biener <rguenther@suse.de>
18773 Jakub Jelinek <jakub@redhat.com>
18775 PR tree-optimization/84111
18776 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
18777 inner loops added during recursion, as they don't have up-to-date
18780 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
18783 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
18784 (can_inline_edge_by_limits_p): ... here.
18785 (can_early_inline_edge_p, check_callers,
18786 update_caller_keys, update_callee_keys, recursive_inlining,
18787 add_new_edges_to_heap, speculation_useful_p,
18788 inline_small_functions,
18789 inline_small_functions, flatten_function,
18790 inline_to_all_callers_1): Update.
18792 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
18794 * profile-count.c (profile_count::combine_with_ipa_count): Handle
18797 2018-01-30 Richard Biener <rguenther@suse.de>
18799 PR tree-optimization/83008
18800 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
18801 invariant and constant vector uses in stmts when they need
18802 more than one stmt.
18804 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18807 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
18808 * configure: Regenerate.
18810 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
18812 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
18814 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
18815 Use gen_rtx_REG rather than gen_lowpart.
18817 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
18819 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
18820 rather than 0 when creating partial subregs.
18822 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
18824 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
18827 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
18830 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
18831 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
18832 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
18833 flags. This restores the settings used before the 2017-07-24.
18834 Turning off pre increment/decrement/modify allows IVOPTS to
18835 optimize DF/SF loops where the index is an int.
18837 2018-01-29 Richard Biener <rguenther@suse.de>
18838 Kelvin Nilsen <kelvin@gcc.gnu.org>
18841 * tree-vect-stmts.c (vectorizable_call): Don't call
18842 targetm.vectorize_builtin_md_vectorized_function if callee is
18845 2018-01-22 Carl Love <cel@us.ibm.com>
18847 * doc/extend.tex: Fix typo in second arg in
18848 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
18850 2018-01-29 Richard Biener <rguenther@suse.de>
18852 PR tree-optimization/84086
18853 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
18854 (flush_ssaname_freelist): When SSA names were released reset
18855 the SCEV hash table.
18857 2018-01-29 Richard Biener <rguenther@suse.de>
18859 PR tree-optimization/84057
18860 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
18861 removed paths when removing edges.
18863 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
18865 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
18866 -mfunction-return=@var{choice}.
18868 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
18870 PR diagnostic/84034
18871 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
18872 Handle CR like TAB.
18873 (layout::print_source_line): Likewise.
18874 (test_get_line_width_without_trailing_whitespace): Add test cases.
18876 2018-01-27 Jakub Jelinek <jakub@redhat.com>
18878 PR middle-end/84040
18879 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
18882 2018-01-26 Jim Wilson <jimw@sifive.com>
18884 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
18886 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
18889 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18891 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
18892 and CMP + SUB-immediate -> SUBS.
18894 2018-01-26 Martin Sebor <msebor@redhat.com>
18896 PR tree-optimization/83896
18897 * tree-ssa-strlen.c (get_string_len): Rename...
18898 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
18899 Avoid assuming length is constant.
18900 (handle_char_store): Use HOST_WIDE_INT for string length.
18902 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
18905 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
18906 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
18908 2018-01-26 Richard Biener <rguenther@suse.de>
18910 PR rtl-optimization/84003
18911 * dse.c (record_store): Only record redundant stores when
18912 the earlier store aliases at least all accesses the later one does.
18914 2018-01-26 Jakub Jelinek <jakub@redhat.com>
18916 PR rtl-optimization/83985
18917 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
18918 REG_CFA_RESTORE insns.
18919 (delete_unmarked_insns): Don't ignore separate shrink wrapping
18920 REG_CFA_RESTORE insns here.
18923 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
18924 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
18926 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18928 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
18929 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
18930 (arc_init): Likewise.
18931 (arc_override_options): Likewise.
18932 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
18934 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
18936 * config/arc/arc.h (TARGET_DBNZ): Define.
18937 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
18938 properly set the tune attribute.
18939 (dbnz): Use TARGET_DBNZ guard.
18940 * config/arc/arc.opt (mtune): Add core3 option.
18942 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18944 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
18945 recognize new pic like addresses.
18946 (arc_delegitimize_address): Clean up.
18948 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18950 * config/arc/arc-arches.def: Option mrf16 valid for all
18952 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
18953 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
18954 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
18955 * config/arc/arc-tables.opt: Regenerate.
18956 * config/arc/arc.c (arc_conditional_register_usage): Handle
18957 reduced register file case.
18958 (arc_file_start): Set must have build attributes.
18959 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
18960 mrf16 option value.
18961 * config/arc/arc.opt (mrf16): Add new option.
18962 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
18963 * config/arc/genmultilib.awk: Handle new mrf16 option.
18964 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
18965 * config/arc/t-multilib: Regenerate.
18966 * doc/invoke.texi (ARC Options): Document mrf16 option.
18968 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18970 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
18971 * config/arc/arc.c (arc_handle_secure_attribute): New function.
18972 (arc_attribute_table): Add 'secure_call' attribute.
18973 (arc_print_operand): Print secure call operand.
18974 (arc_function_ok_for_sibcall): Don't optimize tail calls when
18976 (arc_is_secure_call_p): New function. * config/arc/arc.md
18977 (call_i): Add support for sjli instruction.
18978 (call_value_i): Likewise.
18979 * config/arc/constraints.md (Csc): New constraint.
18981 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18982 John Eric Martin <John.Martin@emmicro-us.com>
18984 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
18985 * config/arc/arc.c (_arc_jli_section): New struct.
18986 (arc_jli_section): New type.
18987 (rc_jli_sections): New static variable.
18988 (arc_handle_jli_attribute): New function.
18989 (arc_attribute_table): Add jli_always and jli_fixed attribute.
18990 (arc_file_end): New function.
18991 (TARGET_ASM_FILE_END): Define.
18992 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
18993 (arc_add_jli_section): New function.
18994 (jli_call_scan): Likewise.
18995 (arc_reorg): Call jli_call_scan.
18996 (arc_output_addsi): Remove 'S' from printing asm operand.
18997 (arc_is_jli_call_p): New function.
18998 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
19000 (movhi_insn): Likewise.
19001 (movsi_insn): Likewise.
19002 (movsi_set_cc_insn): Likewise.
19003 (loadqi_update): Likewise.
19004 (load_zeroextendqisi_update): Likewise.
19005 (load_signextendqisi_update): Likewise.
19006 (loadhi_update): Likewise.
19007 (load_zeroextendhisi_update): Likewise.
19008 (load_signextendhisi_update): Likewise.
19009 (loadsi_update): Likewise.
19010 (loadsf_update): Likewise.
19011 (movsicc_insn): Likewise.
19012 (bset_insn): Likewise.
19013 (bxor_insn): Likewise.
19014 (bclr_insn): Likewise.
19015 (bmsk_insn): Likewise.
19016 (bicsi3_insn): Likewise.
19017 (cmpsi_cc_c_insn): Likewise.
19018 (movsi_ne): Likewise.
19019 (movsi_cond_exec): Likewise.
19020 (clrsbsi2): Likewise.
19021 (norm_f): Likewise.
19031 (call_i): Remove 'S' asm letter, add jli instruction.
19032 (call_value_i): Likewise.
19033 * config/arc/arc.op (mjli-always): New option.
19034 * config/arc/constraints.md (Cji): New constraint.
19035 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
19037 (subsf3_fpx): Likewise.
19038 (mulsf3_fpx): Likewise.
19039 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
19041 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
19042 function attrbutes.
19043 * doc/invoke.texi (ARC): Document mjli-always option.
19045 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
19047 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
19048 avoid addition with 0 and use incw and decw where possible.
19050 2018-01-26 Richard Biener <rguenther@suse.de>
19052 PR tree-optimization/81082
19053 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
19054 association if it requires casting to unsigned.
19055 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
19056 from fold_plusminus_mult_expr to catch important cases late when
19057 range info is available.
19059 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19061 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
19062 * configure.ac (hidden_linkonce): New test.
19063 * configure: Regenerate.
19064 * config.in: Regenerate.
19066 2018-01-26 Julia Koval <julia.koval@intel.com>
19068 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
19069 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
19070 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
19071 _mm_mask_bitshuffle_epi64_mask): Fix type.
19072 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
19073 USI_FTYPE_V4DI_V4DI_USI): Remove.
19074 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
19075 __builtin_ia32_vpshufbitqmb256_mask,
19076 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
19077 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
19078 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
19080 2018-01-26 Alan Modra <amodra@gmail.com>
19083 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
19084 UNSPEC_VBPERMQ. Sort other unspecs.
19086 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
19088 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
19090 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
19092 PR middle-end/83055
19093 * predict.c (drop_profile): Do not push/pop cfun; update also
19095 (handle_missing_profiles): Fix logic looking for zero profiles.
19097 2018-01-25 Jakub Jelinek <jakub@redhat.com>
19099 PR middle-end/83977
19100 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
19101 on functions with #pragma omp declare simd or functions with simd
19103 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
19104 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
19105 Remove trailing \n from warning_at calls.
19107 2018-01-25 Tom de Vries <tom@codesourcery.com>
19110 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
19111 for neutered workers.
19113 2018-01-24 Joseph Myers <joseph@codesourcery.com>
19116 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
19117 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
19119 2018-01-24 Jeff Law <law@redhat.com>
19122 * i386.c (get_probe_interval): Move to earlier point.
19123 (ix86_compute_frame_layout): If -fstack-clash-protection and
19124 the frame is larger than the probe interval, then use pushes
19125 to save registers rather than reg->mem moves.
19126 (ix86_expand_prologue): Remove conditional for int_registers_saved
19129 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
19132 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
19133 min/max for never referenced object.
19135 2018-01-24 Jakub Jelinek <jakub@redhat.com>
19137 PR middle-end/83977
19138 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
19140 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
19141 attributes from DECL_ATTRIBUTES (decl) without affecting
19142 DECL_ATTRIBUTES (current_function_decl).
19143 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
19144 functions with non-NULL DECL_ABSTRACT_ORIGIN.
19146 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
19148 PR tree-optimization/83979
19149 * fold-const.c (fold_comparison): Use constant_boolean_node
19150 instead of boolean_{true,false}_node.
19152 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
19154 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
19157 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19159 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19160 Simplify the clause that sets the length attribute.
19161 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19162 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
19163 clause that sets the length attribute.
19164 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19166 2018-01-24 Tom de Vries <tom@codesourcery.com>
19169 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
19170 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
19171 Add strict parameter.
19172 (prevent_branch_around_nothing): Insert dummy insn between branch to
19173 label and label with no ptx insn inbetween.
19174 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
19176 2018-01-24 Tom de Vries <tom@codesourcery.com>
19179 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
19180 for neutered threads in warp.
19181 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
19183 2018-01-24 Richard Biener <rguenther@suse.de>
19185 PR tree-optimization/83176
19186 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
19189 2018-01-24 Richard Biener <rguenther@suse.de>
19191 PR tree-optimization/82819
19192 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
19193 code generating pluses that are no-ops in the target precision.
19195 2018-01-24 Richard Biener <rguenther@suse.de>
19197 PR middle-end/84000
19198 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
19200 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
19202 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
19203 to merge probabilities.
19204 * predict.c (probably_never_executed): Also mark as cold functions
19205 with global 0 profile and guessed local profile.
19206 * profile-count.c (profile_probability::combine_with_count): New
19208 * profile-count.h (profile_probability::operator*,
19209 profile_probability::operator*=, profile_probability::operator/,
19210 profile_probability::operator/=): Reduce precision to adjusted
19211 and set value to guessed on contradictory divisions.
19212 (profile_probability::combine_with_freq): Remove.
19213 (profile_probability::combine_wiht_count): Declare.
19214 (profile_count::force_nonzero):: Set to adjusted.
19215 (profile_count::probability_in):: Set quality to adjusted.
19216 * tree-ssa-tail-merge.c (replace_block_by): Use
19217 combine_with_count.
19219 2018-01-23 Andrew Waterman <andrew@sifive.com>
19220 Jim Wilson <jimw@sifive.com>
19222 * config/riscv/riscv.c (riscv_stack_boundary): New.
19223 (riscv_option_override): Set riscv_stack_boundary. Handle
19224 riscv_preferred_stack_boundary_arg.
19225 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
19226 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
19227 (STACK_BOUNDARY): Set to riscv_stack_boundary.
19228 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
19229 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
19230 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
19232 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
19235 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
19236 of struct ix86_frame.
19237 (ix86_expand_epilogue): Likewise. Add a local variable for
19238 the reg_save_offset field in struct ix86_frame.
19240 2018-01-23 Bin Cheng <bin.cheng@arm.com>
19242 PR tree-optimization/82604
19243 * tree-loop-distribution.c (enum partition_kind): New enum item
19244 PKIND_PARTIAL_MEMSET.
19245 (partition_builtin_p): Support above new enum item.
19246 (generate_code_for_partition): Ditto.
19247 (compute_access_range): Differentiate cases that equality can be
19248 proven at all loops, the innermost loops or no loops.
19249 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
19250 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
19251 (finalize_partitions, distribute_loop): Don't fuse partition of
19252 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
19253 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
19254 parloop is enabled.
19256 2018-01-23 Martin Liska <mliska@suse.cz>
19258 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
19259 order to ignore the predictor.
19260 (PRED_POLYMORPHIC_CALL): Likewise.
19261 (PRED_RECURSIVE_CALL): Likewise.
19263 2018-01-23 Martin Liska <mliska@suse.cz>
19265 * tree-profile.c (tree_profiling): Print function header to
19266 aware reader which function we are working on.
19267 * value-prof.c (gimple_find_values_to_profile): Do not print
19268 not interesting value histograms.
19270 2018-01-23 Martin Liska <mliska@suse.cz>
19272 * profile-count.h (enum profile_quality): Add
19273 profile_uninitialized as the first value. Do not number values
19274 as they are zero based.
19275 (profile_count::verify): Update sanity check.
19276 (profile_probability::verify): Likewise.
19278 2018-01-23 Nathan Sidwell <nathan@acm.org>
19280 * doc/invoke.texi (ffor-scope): Deprecate.
19282 2018-01-23 David Malcolm <dmalcolm@redhat.com>
19284 PR tree-optimization/83510
19285 * domwalk.c (set_all_edges_as_executable): New function.
19286 (dom_walker::dom_walker): Convert bool param
19287 "skip_unreachable_blocks" to enum reachability. Move setup of
19288 edge flags to set_all_edges_as_executable and only do it when
19289 reachability is REACHABLE_BLOCKS.
19290 * domwalk.h (enum dom_walker::reachability): New enum.
19291 (dom_walker::dom_walker): Convert bool param
19292 "skip_unreachable_blocks" to enum reachability.
19293 (set_all_edges_as_executable): New decl.
19294 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
19295 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
19297 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
19298 but converting true to REACHABLE_BLOCKS.
19299 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
19301 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
19302 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
19303 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
19305 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
19306 if check_all_array_refs will be called.
19308 2018-01-23 David Malcolm <dmalcolm@redhat.com>
19310 * tree.c (selftest::test_location_wrappers): Add more test
19313 2018-01-23 David Malcolm <dmalcolm@redhat.com>
19315 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
19316 (selftest::test_bit_in_range): Likewise.
19318 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
19321 * doc/sourcebuild.texi (vect_float): Say that the selector
19322 only describes the situation when -funsafe-math-optimizations is on.
19323 (vect_float_strict): Document.
19325 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
19327 PR tree-optimization/83965
19328 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
19329 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
19330 instead of checking only for a reduction.
19331 (vect_recog_widen_sum_pattern): Likewise.
19333 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
19335 * predict.c (probably_never_executed): Only use precise profile info.
19336 (compute_function_frequency): Skip after inlining hack since we now
19337 have quality checking.
19339 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
19341 * profile-count.h (profile_probability::very_unlikely,
19342 profile_probability::unlikely, profile_probability::even): Set
19343 precision to guessed.
19345 2018-01-23 Richard Biener <rguenther@suse.de>
19347 PR tree-optimization/83963
19348 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
19349 Properly terminate dominator walk when crossing the exit edge not
19350 when visiting its source block.
19352 2018-01-23 Jakub Jelinek <jakub@redhat.com>
19355 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
19356 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
19358 2018-01-22 Jakub Jelinek <jakub@redhat.com>
19360 PR tree-optimization/83957
19361 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
19362 semicolon after for body surrounded by braces.
19364 PR tree-optimization/83081
19365 * profile-count.h (profile_probability::split): New method.
19366 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
19367 Use profile_probability::split.
19368 (do_compare_rtx_and_jump): Fix adjustment of probabilities
19369 when splitting a single conditional jump into 2.
19371 2018-01-22 David Malcolm <dmalcolm@redhat.com>
19373 PR tree-optimization/69452
19374 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
19377 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19379 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
19380 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
19381 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
19383 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19385 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
19387 * config/rl78/rl78.md (movdi): New define_expand.
19388 * config/rl78/rl78.c (rl78_split_movdi): New function.
19390 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
19393 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
19395 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
19396 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
19397 128-bit to produce an UNSPEC move to get the double word with the
19398 signbit and then a shift directly to do signbit.
19399 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
19400 implementation with a new version that just does either a direct
19401 move or a regular move. Move memory interface to separate insns.
19402 Move insns so they are next to the expander.
19403 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
19404 with signbit move. Split big and little endian case.
19405 (signbit<mode>2_dm_mem_le): Likewise.
19406 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
19407 (signbit<mode>2_dm2): Likewise.
19409 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19411 * config/rl78/rl78.md (anddi3): New define_expand.
19413 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19415 * config/rl78/rl78.md (umindi3): New define_expand.
19417 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19419 * config/rl78/rl78.md (smindi3): New define_expand.
19421 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19423 * config/rl78/rl78.md (smaxdi3): New define_expand.
19425 2018-01-22 Carl Love <cel@us.ibm.com>
19427 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
19428 LVX_V1TI): Add macro expansion.
19429 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
19430 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
19431 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
19432 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
19433 Change check to determine if the instruction is a byte reversing
19434 entry. Fix typo in comment.
19435 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
19436 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
19437 Add def_builtin calls for new builtins.
19438 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
19439 Add define_insn expansion.
19441 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19443 * config/rl78/rl78.md (umaxdi3): New define_expand.
19445 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19447 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
19448 for non-QImode registers.
19450 2018-01-22 Richard Biener <rguenther@suse.de>
19452 PR tree-optimization/83963
19453 * graphite-scop-detection.c (scop_detection::get_sese): Delay
19454 including the loop exit block.
19455 (scop_detection::merge_sese): Likewise.
19456 (scop_detection::add_scop): Do it here instead.
19458 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19460 * doc/sourcebuild.texi (arm_softfloat): Document.
19462 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
19465 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
19466 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
19467 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
19469 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19470 David Edelsohn <dje.gcc@gmail.com>
19473 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19474 Change "crset eq" to "crset 2".
19475 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19476 (*call_indirect_aix<mode>_nospec): Likewise.
19477 (*call_value_indirect_aix<mode>_nospec): Likewise.
19478 (*call_indirect_elfv2<mode>_nospec): Likewise.
19479 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
19480 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
19481 change assembly output from . to $.
19482 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19483 (indirect_jump<mode>_nospec): Change assembly output from . to $.
19484 (*tablejump<mode>_internal1_nospec): Likewise.
19486 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
19489 * config/sh/sh_optimize_sett_clrt.cc:
19490 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
19492 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
19494 PR tree-optimization/83940
19495 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
19496 offset_dt to vect_constant_def rather than vect_unknown_def_type.
19497 (vect_check_load_store_mask): Add a mask_dt_out parameter and
19498 use it to pass back the definition type.
19499 (vect_check_store_rhs): Likewise rhs_dt_out.
19500 (vect_build_gather_load_calls): Add a mask_dt argument and use
19501 it instead of a call to vect_is_simple_use.
19502 (vectorizable_store): Update calls to vect_check_load_store_mask
19503 and vect_check_store_rhs. Use the dt returned by the latter instead
19504 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
19505 instead of calls to vect_is_simple_use. Pass the scalar rather
19506 than the vector operand to vect_is_simple_use when handling
19507 second and subsequent copies of an rhs value.
19508 (vectorizable_load): Update calls to vect_check_load_store_mask
19509 and vect_build_gather_load_calls. Use the cached mask_dt and
19510 gs_info.offset_dt instead of calls to vect_is_simple_use.
19512 2018-01-20 Jakub Jelinek <jakub@redhat.com>
19514 PR middle-end/83945
19515 * tree-emutls.c: Include gimplify.h.
19516 (lower_emutls_2): New function.
19517 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
19518 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
19519 it before further processing.
19522 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
19523 UINTVAL (trueop1) instead of INTVAL (op1).
19525 2018-01-19 Jakub Jelinek <jakub@redhat.com>
19529 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
19530 INCOMING_FRAME_SP_OFFSET if not defined.
19531 (scan_trace): Add ENTRY argument. If true and
19532 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
19533 emit a note to adjust the CFA offset.
19534 (create_cfi_notes): Adjust scan_trace callers.
19535 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
19536 INCOMING_FRAME_SP_OFFSET in the CIE.
19537 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
19538 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
19540 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
19541 * doc/tm.texi: Regenerated.
19543 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19545 PR rtl-optimization/83147
19546 * lra-constraints.c (remove_inheritance_pseudos): Use
19547 lra_substitute_pseudo_within_insn.
19549 2018-01-19 Tom de Vries <tom@codesourcery.com>
19550 Cesar Philippidis <cesar@codesourcery.com>
19553 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
19555 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
19558 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
19559 spaces for function labels.
19561 2018-01-19 Martin Liska <mliska@suse.cz>
19563 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
19564 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
19565 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
19566 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
19567 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
19568 (PRED_CONST_RETURN): Change from 69 to 65.
19569 (PRED_NULL_RETURN): Change from 91 to 71.
19570 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
19571 (PRED_LOOP_GUARD): Change from 66 to 73.
19573 2018-01-19 Martin Liska <mliska@suse.cz>
19575 * predict.c (predict_insn_def): Add new assert.
19576 (struct branch_predictor): Change type to signed integer.
19577 (test_prediction_value_range): Amend test to cover
19578 PROB_UNINITIALIZED.
19579 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
19580 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
19581 (PRED_LOOP_ITERATIONS_MAX): Likewise.
19582 (PRED_LOOP_IV_COMPARE): Likewise.
19583 * predict.h (PROB_UNINITIALIZED): Define new constant.
19585 2018-01-19 Martin Liska <mliska@suse.cz>
19587 * predict.c (dump_prediction): Add new format for
19588 analyze_brprob.py script which is enabled with -details
19590 * profile-count.h (precise_p): New function.
19592 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
19594 PR tree-optimization/83922
19595 * tree-vect-loop.c (vect_verify_full_masking): Return false if
19596 there are no statements that need masking.
19597 (vect_active_double_reduction_p): New function.
19598 (vect_analyze_loop_operations): Use it when handling phis that
19599 are not in the loop header.
19601 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
19603 PR tree-optimization/83914
19604 * tree-vect-loop.c (vectorizable_induction): Don't convert
19605 init_expr or apply the peeling adjustment for inductions
19606 that are nested within the vectorized loop.
19608 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19610 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
19613 2018-01-18 Jakub Jelinek <jakub@redhat.com>
19617 * function.h (gimplify_parameters): Add gimple_seq * argument.
19618 * function.c: Include gimple.h and options.h.
19619 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
19620 for the added local temporaries if needed.
19621 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
19622 if there are any parameter cleanups, wrap whole body into a
19623 try/finally with the cleanups.
19625 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
19628 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
19629 Use GET_MODE_CLASS for scalar floating point.
19631 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
19635 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
19636 Fix call of call_cgraph_insertion_hooks.
19638 2018-01-18 Martin Sebor <msebor@redhat.com>
19640 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
19642 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
19645 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
19648 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
19651 * common.opt: (-ffile-prefix-map): New option.
19652 * opts.c (common_handle_option): Defer it.
19653 * opts-global.c (handle_common_deferred_options): Handle it.
19654 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
19655 * file-prefix-map.h: New file.
19656 (remap_debug_filename, add_debug_prefix_map): ...here.
19657 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
19658 * final.c (debug_prefix_map, add_debug_prefix_map
19659 remap_debug_filename): Move to...
19660 * file-prefix-map.c: New file.
19661 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
19662 generalize, get rid of alloca(), use strrchr() instead of strchr().
19663 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
19664 Implement in terms of add_prefix_map().
19665 (remap_macro_filename, remap_debug_filename): Implement in term of
19667 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
19668 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
19669 * dbxout.c: Include file-prefix-map.h.
19670 * varasm.c: Likewise.
19671 * vmsdbgout.c: Likewise.
19672 * xcoffout.c: Likewise.
19673 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
19674 * doc/cppopts.texi (-fmacro-prefix-map): Document.
19675 * doc/invoke.texi (-ffile-prefix-map): Document.
19676 (-fdebug-prefix-map): Update description.
19678 2018-01-18 Martin Liska <mliska@suse.cz>
19680 * config/i386/i386.c (indirect_thunk_name): Document that also
19682 (output_indirect_thunk): Document why both instructions
19683 (pause and lfence) are generated.
19685 2018-01-18 Richard Biener <rguenther@suse.de>
19687 PR tree-optimization/83887
19688 * graphite-scop-detection.c
19689 (scop_detection::get_nearest_dom_with_single_entry): Remove.
19690 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
19691 (scop_detection::merge_sese): Re-implement with a flood-fill
19692 algorithm that properly finds a SESE region if it exists.
19694 2018-01-18 Jakub Jelinek <jakub@redhat.com>
19697 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
19698 pointer_diff optimizations use view_convert instead of convert.
19700 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19702 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19703 Generate different code for -mno-speculate-indirect-jumps.
19704 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19705 (*call_indirect_aix<mode>): Disable for
19706 -mno-speculate-indirect-jumps.
19707 (*call_indirect_aix<mode>_nospec): New define_insn.
19708 (*call_value_indirect_aix<mode>): Disable for
19709 -mno-speculate-indirect-jumps.
19710 (*call_value_indirect_aix<mode>_nospec): New define_insn.
19711 (*sibcall_nonlocal_sysv<mode>): Generate different code for
19712 -mno-speculate-indirect-jumps.
19713 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19715 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
19717 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
19718 long double type, set the flags for noting the default long double
19719 type, even if we don't pass or return a long double type.
19721 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
19724 * ipa-inline.c (flatten_function): Do not overwrite final inlining
19727 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
19729 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
19730 support for merge[hl].
19731 (fold_mergehl_helper): New helper function.
19732 (tree-vector-builder.h): New #include for tree_vector_builder usage.
19733 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
19734 (altivec_vmrglw_direct): Add xxmrglw insn.
19736 2018-01-17 Andrew Waterman <andrew@sifive.com>
19738 * config/riscv/riscv.c (riscv_conditional_register_usage): If
19739 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
19741 2018-01-17 David Malcolm <dmalcolm@redhat.com>
19744 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
19745 call the lto_location_cache before reading the
19746 DECL_SOURCE_LOCATION of the types.
19748 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
19749 Richard Sandiford <richard.sandiford@linaro.org>
19751 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
19752 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
19753 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
19754 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
19755 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
19757 * config/aarch64/constraints.md (aarch64_movti_operand):
19759 * config/aarch64/predicates.md (Uti): Add new constraint.
19761 2018-01-17 Carl Love <cel@us.ibm.com>
19763 * config/rs6000/vsx.md (define_expand xl_len_r,
19764 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
19765 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
19767 (define_expand, define_insn): Move the shift left from the
19768 define_insn to the define_expand for lxvl and stxvl instructions.
19769 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
19770 and XL_LEN_R definitions to PURE.
19772 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
19774 * config/i386/i386.c (indirect_thunk_name): Declare regno
19775 as unsigned int. Compare regno with INVALID_REGNUM.
19776 (output_indirect_thunk): Ditto.
19777 (output_indirect_thunk_function): Ditto.
19778 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
19779 in the call to output_indirect_thunk_function.
19781 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
19783 PR middle-end/83884
19784 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
19785 rather than the size of inner_type to determine the stack slot size
19786 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
19788 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
19791 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
19794 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
19796 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
19797 endian Linux systems to optionally enable multilibs for selecting
19798 the long double type if the user configured an explicit type.
19799 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
19800 have no long double multilibs if not defined.
19801 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
19802 warn if the user used -mabi={ieee,ibm}longdouble and we built
19803 multilibs for long double.
19804 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
19805 appropriate multilib option.
19806 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
19808 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
19809 for building long double multilibs.
19810 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
19812 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
19814 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
19817 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
19819 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
19822 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
19825 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
19828 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
19830 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
19831 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
19833 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
19835 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
19836 different rtl trees depending on TARGET_64BIT.
19837 (rs6000_gen_lvx): Likewise.
19839 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
19841 * config/visium/visium.md (nop): Tweak comment.
19842 (hazard_nop): Likewise.
19844 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19846 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
19847 -mspeculate-indirect-jumps.
19848 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
19849 for -mno-speculate-indirect-jumps.
19850 (*call_indirect_elfv2<mode>_nospec): New define_insn.
19851 (*call_value_indirect_elfv2<mode>): Disable for
19852 -mno-speculate-indirect-jumps.
19853 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
19854 (indirect_jump): Emit different RTL for
19855 -mno-speculate-indirect-jumps.
19856 (*indirect_jump<mode>): Disable for
19857 -mno-speculate-indirect-jumps.
19858 (*indirect_jump<mode>_nospec): New define_insn.
19859 (tablejump): Emit different RTL for
19860 -mno-speculate-indirect-jumps.
19861 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
19862 (tablejumpsi_nospec): New define_expand.
19863 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
19864 (tablejumpdi_nospec): New define_expand.
19865 (*tablejump<mode>_internal1): Disable for
19866 -mno-speculate-indirect-jumps.
19867 (*tablejump<mode>_internal1_nospec): New define_insn.
19868 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
19871 2018-01-16 Artyom Skrobov tyomitch@gmail.com
19873 * caller-save.c (insert_save): Drop unnecessary parameter. All
19876 2018-01-16 Jakub Jelinek <jakub@redhat.com>
19877 Richard Biener <rguenth@suse.de>
19880 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
19881 return early, inline manually is_gimple_sizepos. Make sure if we
19882 call gimplify_expr we don't end up with a gimple constant.
19883 * tree.c (variably_modified_type_p): Don't return true for
19884 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
19885 * gimplify.h (is_gimple_sizepos): Remove.
19887 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19889 PR tree-optimization/83857
19890 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
19891 vectorizable_live_operation for pure SLP statements.
19892 (vectorizable_live_operation): Handle PHIs.
19894 2018-01-16 Richard Biener <rguenther@suse.de>
19896 PR tree-optimization/83867
19897 * tree-vect-stmts.c (vect_transform_stmt): Precompute
19898 nested_in_vect_loop_p since the scalar stmt may get invalidated.
19900 2018-01-16 Jakub Jelinek <jakub@redhat.com>
19903 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
19904 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
19905 If off is not INTEGER_CST, issue a may not be aligned warning
19906 rather than isn't aligned. Use isn%'t rather than isn't.
19907 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
19909 <case MULT_EXPR>: Improve the case when bottom and one of the
19910 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
19911 operand, in that case check if the other operand is multiple of
19912 bottom divided by the INTEGER_CST operand.
19914 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19917 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
19918 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
19919 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
19920 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
19921 * config/pa/pa.c (pa_function_arg_advance): Likewise.
19922 (pa_function_arg, pa_arg_partial_bytes): Likewise.
19923 (pa_function_arg_size): New function.
19925 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19927 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
19928 in a separate statement.
19930 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19932 PR tree-optimization/83847
19933 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
19934 group gathers and scatters.
19936 2018-01-16 Jakub Jelinek <jakub@redhat.com>
19938 PR rtl-optimization/86620
19939 * params.def (max-sched-ready-insns): Bump minimum value to 1.
19941 PR rtl-optimization/83213
19942 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
19943 to last if both are JUMP_INSNs.
19945 PR tree-optimization/83843
19946 * gimple-ssa-store-merging.c
19947 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
19948 store_immediate_info for bswap/nop orig_stores.
19950 2018-01-15 Andrew Waterman <andrew@sifive.com>
19952 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
19954 <UDIV>: Increase cost if !TARGET_DIV.
19956 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
19958 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
19959 (define_attr "cr_logical_3op"): New.
19960 (cceq_ior_compare): Adjust.
19961 (cceq_ior_compare_complement): Adjust.
19962 (*cceq_rev_compare): Adjust.
19963 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
19964 (is_cracked_insn): Adjust.
19965 (insn_must_be_first_in_group): Adjust.
19966 * config/rs6000/40x.md: Adjust.
19967 * config/rs6000/440.md: Adjust.
19968 * config/rs6000/476.md: Adjust.
19969 * config/rs6000/601.md: Adjust.
19970 * config/rs6000/603.md: Adjust.
19971 * config/rs6000/6xx.md: Adjust.
19972 * config/rs6000/7450.md: Adjust.
19973 * config/rs6000/7xx.md: Adjust.
19974 * config/rs6000/8540.md: Adjust.
19975 * config/rs6000/cell.md: Adjust.
19976 * config/rs6000/e300c2c3.md: Adjust.
19977 * config/rs6000/e500mc.md: Adjust.
19978 * config/rs6000/e500mc64.md: Adjust.
19979 * config/rs6000/e5500.md: Adjust.
19980 * config/rs6000/e6500.md: Adjust.
19981 * config/rs6000/mpc.md: Adjust.
19982 * config/rs6000/power4.md: Adjust.
19983 * config/rs6000/power5.md: Adjust.
19984 * config/rs6000/power6.md: Adjust.
19985 * config/rs6000/power7.md: Adjust.
19986 * config/rs6000/power8.md: Adjust.
19987 * config/rs6000/power9.md: Adjust.
19988 * config/rs6000/rs64.md: Adjust.
19989 * config/rs6000/titan.md: Adjust.
19991 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19993 * config/i386/predicates.md (indirect_branch_operand): Rewrite
19994 ix86_indirect_branch_register logic.
19996 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19998 * config/i386/constraints.md (Bs): Update
19999 ix86_indirect_branch_register check. Don't check
20000 ix86_indirect_branch_register with GOT_memory_operand.
20002 * config/i386/predicates.md (GOT_memory_operand): Don't check
20003 ix86_indirect_branch_register here.
20004 (GOT32_symbol_operand): Likewise.
20006 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20008 * config/i386/predicates.md (constant_call_address_operand):
20009 Rewrite ix86_indirect_branch_register logic.
20010 (sibcall_insn_operand): Likewise.
20012 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20014 * config/i386/constraints.md (Bs): Replace
20015 ix86_indirect_branch_thunk_register with
20016 ix86_indirect_branch_register.
20018 * config/i386/i386.md (indirect_jump): Likewise.
20019 (tablejump): Likewise.
20020 (*sibcall_memory): Likewise.
20021 (*sibcall_value_memory): Likewise.
20022 Peepholes of indirect call and jump via memory: Likewise.
20023 * config/i386/i386.opt: Likewise.
20024 * config/i386/predicates.md (indirect_branch_operand): Likewise.
20025 (GOT_memory_operand): Likewise.
20026 (call_insn_operand): Likewise.
20027 (sibcall_insn_operand): Likewise.
20028 (GOT32_symbol_operand): Likewise.
20030 2018-01-15 Jakub Jelinek <jakub@redhat.com>
20032 PR middle-end/83837
20033 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
20034 type rather than type addr's type points to.
20035 (expand_omp_atomic_mutex): Likewise.
20036 (expand_omp_atomic): Likewise.
20038 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20041 * config/i386/i386.c (output_indirect_thunk_function): Use
20042 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
20043 for __x86_return_thunk.
20045 2018-01-15 Richard Biener <rguenther@suse.de>
20047 PR middle-end/83850
20048 * expmed.c (extract_bit_field_1): Fix typo.
20050 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20053 * config/arm/iterators.md (VF): New mode iterator.
20054 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
20055 Remove integer-related logic from pattern.
20056 (neon_vabd<mode>_3): Likewise.
20058 2018-01-15 Jakub Jelinek <jakub@redhat.com>
20060 PR middle-end/82694
20061 * common.opt (fstrict-overflow): No longer an alias.
20062 (fwrapv-pointer): New option.
20063 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
20064 also for pointer types based on flag_wrapv_pointer.
20065 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
20066 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
20067 opts->x_flag_wrapv got set.
20068 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
20069 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
20070 POINTER_TYPE_OVERFLOW_UNDEFINED.
20071 * match.pd: Likewise in address comparison pattern.
20072 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
20074 2018-01-15 Richard Biener <rguenther@suse.de>
20077 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
20078 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
20079 Reset type names to their identifier if their TYPE_DECL doesn't
20080 have linkage (and thus is used for ODR and devirt).
20081 (save_debug_info_for_decl): Remove.
20082 (save_debug_info_for_type): Likewise.
20083 (add_tree_to_fld_list): Adjust.
20084 * tree-pretty-print.c (dump_generic_node): Make dumping of
20085 type names more robust.
20087 2018-01-15 Richard Biener <rguenther@suse.de>
20089 * BASE-VER: Bump to 8.0.1.
20091 2018-01-14 Martin Sebor <msebor@redhat.com>
20094 * builtins.c (check_access): Avoid warning when the no-warning bit
20097 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
20099 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
20100 * ira-color (allocno_hard_regs_compare): Likewise.
20102 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
20105 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
20106 Use .pushsection/.popsection.
20108 2018-01-14 Martin Sebor <msebor@redhat.com>
20111 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
20113 2018-01-14 Jakub Jelinek <jakub@redhat.com>
20115 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
20116 entry from extra_headers.
20117 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
20118 extra_headers, make the list bitwise identical to the i?86-*-* one.
20120 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20122 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
20123 -mcmodel=large with -mindirect-branch=thunk,
20124 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
20125 -mfunction-return=thunk-extern.
20126 * doc/invoke.texi: Document -mcmodel=large is incompatible with
20127 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
20128 -mfunction-return=thunk and -mfunction-return=thunk-extern.
20130 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20132 * config/i386/i386.c (print_reg): Print the name of the full
20133 integer register without '%'.
20134 (ix86_print_operand): Handle 'V'.
20135 * doc/extend.texi: Document 'V' modifier.
20137 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20139 * config/i386/constraints.md (Bs): Disallow memory operand for
20140 -mindirect-branch-register.
20142 * config/i386/predicates.md (indirect_branch_operand): Likewise.
20143 (GOT_memory_operand): Likewise.
20144 (call_insn_operand): Likewise.
20145 (sibcall_insn_operand): Likewise.
20146 (GOT32_symbol_operand): Likewise.
20147 * config/i386/i386.md (indirect_jump): Call convert_memory_address
20148 for -mindirect-branch-register.
20149 (tablejump): Likewise.
20150 (*sibcall_memory): Likewise.
20151 (*sibcall_value_memory): Likewise.
20152 Disallow peepholes of indirect call and jump via memory for
20153 -mindirect-branch-register.
20154 (*call_pop): Replace m with Bw.
20155 (*call_value_pop): Likewise.
20156 (*sibcall_pop_memory): Replace m with Bs.
20157 * config/i386/i386.opt (mindirect-branch-register): New option.
20158 * doc/invoke.texi: Document -mindirect-branch-register option.
20160 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20162 * config/i386/i386-protos.h (ix86_output_function_return): New.
20163 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
20164 set function_return_type.
20165 (indirect_thunk_name): Add ret_p to indicate thunk for function
20167 (output_indirect_thunk_function): Pass false to
20168 indirect_thunk_name.
20169 (ix86_output_indirect_branch_via_reg): Likewise.
20170 (ix86_output_indirect_branch_via_push): Likewise.
20171 (output_indirect_thunk_function): Create alias for function
20172 return thunk if regno < 0.
20173 (ix86_output_function_return): New function.
20174 (ix86_handle_fndecl_attribute): Handle function_return.
20175 (ix86_attribute_table): Add function_return.
20176 * config/i386/i386.h (machine_function): Add
20177 function_return_type.
20178 * config/i386/i386.md (simple_return_internal): Use
20179 ix86_output_function_return.
20180 (simple_return_internal_long): Likewise.
20181 * config/i386/i386.opt (mfunction-return=): New option.
20182 (indirect_branch): Mention -mfunction-return=.
20183 * doc/extend.texi: Document function_return function attribute.
20184 * doc/invoke.texi: Document -mfunction-return= option.
20186 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20188 * config/i386/i386-opts.h (indirect_branch): New.
20189 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
20190 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
20191 with local indirect jump when converting indirect call and jump.
20192 (ix86_set_indirect_branch_type): New.
20193 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
20194 (indirectlabelno): New.
20195 (indirect_thunk_needed): Likewise.
20196 (indirect_thunk_bnd_needed): Likewise.
20197 (indirect_thunks_used): Likewise.
20198 (indirect_thunks_bnd_used): Likewise.
20199 (INDIRECT_LABEL): Likewise.
20200 (indirect_thunk_name): Likewise.
20201 (output_indirect_thunk): Likewise.
20202 (output_indirect_thunk_function): Likewise.
20203 (ix86_output_indirect_branch_via_reg): Likewise.
20204 (ix86_output_indirect_branch_via_push): Likewise.
20205 (ix86_output_indirect_branch): Likewise.
20206 (ix86_output_indirect_jmp): Likewise.
20207 (ix86_code_end): Call output_indirect_thunk_function if needed.
20208 (ix86_output_call_insn): Call ix86_output_indirect_branch if
20210 (ix86_handle_fndecl_attribute): Handle indirect_branch.
20211 (ix86_attribute_table): Add indirect_branch.
20212 * config/i386/i386.h (machine_function): Add indirect_branch_type
20213 and has_local_indirect_jump.
20214 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
20216 (tablejump): Likewise.
20217 (*indirect_jump): Use ix86_output_indirect_jmp.
20218 (*tablejump_1): Likewise.
20219 (simple_return_indirect_internal): Likewise.
20220 * config/i386/i386.opt (mindirect-branch=): New option.
20221 (indirect_branch): New.
20224 (thunk-inline): Likewise.
20225 (thunk-extern): Likewise.
20226 * doc/extend.texi: Document indirect_branch function attribute.
20227 * doc/invoke.texi: Document -mindirect-branch= option.
20229 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
20232 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
20234 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
20236 * ipa-inline.c (want_inline_small_function_p): Return false if
20237 inlining has already failed with CIF_FINAL_ERROR.
20238 (update_caller_keys): Call want_inline_small_function_p before
20240 (update_callee_keys): Likewise.
20242 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
20244 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
20246 (rs6000_quadword_masked_address_p): Likewise.
20247 (quad_aligned_load_p): Likewise.
20248 (quad_aligned_store_p): Likewise.
20249 (const_load_sequence_p): Add comment to describe the outer-most loop.
20250 (mimic_memory_attributes_and_flags): New function.
20251 (rs6000_gen_stvx): Likewise.
20252 (replace_swapped_aligned_store): Likewise.
20253 (rs6000_gen_lvx): Likewise.
20254 (replace_swapped_aligned_load): Likewise.
20255 (replace_swapped_load_constant): Capitalize argument name in
20256 comment describing this function.
20257 (rs6000_analyze_swaps): Add a third pass to search for vector loads
20258 and stores that access quad-word aligned addresses and replace
20259 with stvx or lvx instructions when appropriate.
20260 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
20261 New function prototype.
20262 (rs6000_quadword_masked_address_p): Likewise.
20263 (rs6000_gen_lvx): Likewise.
20264 (rs6000_gen_stvx): Likewise.
20265 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
20266 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
20267 when memory address is aligned.
20268 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
20269 this split to select lvx instruction when memory address is aligned.
20270 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
20271 instruction when memory address is aligned.
20272 (*vsx_le_perm_load_v16qi): Likewise.
20273 (four unnamed splitters): Modify to select the stvx instruction
20274 when memory is aligned.
20276 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
20278 * predict.c (determine_unlikely_bbs): Handle correctly BBs
20279 which appears in the queue multiple times.
20281 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20282 Alan Hayward <alan.hayward@arm.com>
20283 David Sherwood <david.sherwood@arm.com>
20285 * tree-vectorizer.h (vec_lower_bound): New structure.
20286 (_loop_vec_info): Add check_nonzero and lower_bounds.
20287 (LOOP_VINFO_CHECK_NONZERO): New macro.
20288 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
20289 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
20290 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
20291 fields. Make seg_len the distance travelled, not including the
20293 (dr_direction_indicator): Declare.
20294 (dr_zero_step_indicator): Likewise.
20295 (dr_known_forward_stride_p): Likewise.
20296 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
20298 (runtime_alias_check_p): Allow runtime alias checks with
20300 (operator ==): Compare access_size and align.
20301 (prune_runtime_alias_test_list): Rework for new distinction between
20302 the access_size and seg_len.
20303 (create_intersect_range_checks_index): Likewise. Cope with polynomial
20305 (get_segment_min_max): New function.
20306 (create_intersect_range_checks): Use it.
20307 (dr_step_indicator): New function.
20308 (dr_direction_indicator): Likewise.
20309 (dr_zero_step_indicator): Likewise.
20310 (dr_known_forward_stride_p): Likewise.
20311 * tree-loop-distribution.c (data_ref_segment_size): Return
20312 DR_STEP * (niters - 1).
20313 (compute_alias_check_pairs): Update call to the dr_with_seg_len
20315 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
20316 (vect_preserves_scalar_order_p): New function, split out from...
20317 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
20318 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
20319 (vect_vfa_access_size): New function.
20320 (vect_vfa_align): Likewise.
20321 (vect_compile_time_alias): Take access_size_a and access_b arguments.
20322 (dump_lower_bound): New function.
20323 (vect_check_lower_bound): Likewise.
20324 (vect_small_gap_p): Likewise.
20325 (vectorizable_with_step_bound_p): Likewise.
20326 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
20327 depencies if the vectorization factor is 1. Convert the checks
20328 for nonzero steps into checks on the bounds of DR_STEP. Try using
20329 a bunds check for variable steps if the minimum required step is
20330 relatively small. Update calls to the dr_with_seg_len
20331 constructor and to vect_compile_time_alias.
20332 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
20334 (vect_loop_versioning): Call it.
20335 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
20337 (vect_estimate_min_profitable_iters): Account for any bounds checks.
20339 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20340 Alan Hayward <alan.hayward@arm.com>
20341 David Sherwood <david.sherwood@arm.com>
20343 * doc/sourcebuild.texi (vect_scatter_store): Document.
20344 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
20346 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
20348 * genopinit.c (main): Add supports_vec_scatter_store and
20349 supports_vec_scatter_store_cached to target_optabs.
20350 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
20351 IFN_MASK_SCATTER_STORE.
20352 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
20354 * internal-fn.h (internal_store_fn_p): Declare.
20355 (internal_fn_stored_value_index): Likewise.
20356 * internal-fn.c (scatter_store_direct): New macro.
20357 (expand_scatter_store_optab_fn): New function.
20358 (direct_scatter_store_optab_supported_p): New macro.
20359 (internal_store_fn_p): New function.
20360 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
20361 IFN_MASK_SCATTER_STORE.
20362 (internal_fn_mask_index): Likewise.
20363 (internal_fn_stored_value_index): New function.
20364 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
20365 for scatter stores.
20366 * optabs-query.h (supports_vec_scatter_store_p): Declare.
20367 * optabs-query.c (supports_vec_scatter_store_p): New function.
20368 * tree-vectorizer.h (vect_get_store_rhs): Declare.
20369 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
20370 true for scatter stores.
20371 (vect_gather_scatter_fn_p): Handle scatter stores too.
20372 (vect_check_gather_scatter): Consider using scatter stores if
20373 supports_vec_scatter_store_p.
20374 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
20375 scatter stores too.
20376 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
20377 internal_fn_stored_value_index.
20378 (check_load_store_masking): Handle scatter stores too.
20379 (vect_get_store_rhs): Make public.
20380 (vectorizable_call): Use internal_store_fn_p.
20381 (vectorizable_store): Handle scatter store internal functions.
20382 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
20383 when deciding whether the end of the group has been reached.
20384 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
20385 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
20386 (mask_scatter_store<mode>): New insns.
20388 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20389 Alan Hayward <alan.hayward@arm.com>
20390 David Sherwood <david.sherwood@arm.com>
20392 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
20393 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
20394 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
20396 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
20397 Use vect_truncate_gather_scatter_offset if we can't treat the
20398 operation as a normal gather load or scatter store.
20399 (get_group_load_store_type): Take the gather_scatter_info
20400 as argument. Try using a gather load or scatter store for
20401 single-element groups.
20402 (get_load_store_type): Update calls to get_group_load_store_type
20403 and vect_use_strided_gather_scatters_p.
20405 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20406 Alan Hayward <alan.hayward@arm.com>
20407 David Sherwood <david.sherwood@arm.com>
20409 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
20410 optional tree argument.
20411 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
20413 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
20414 but continue to use the current value as a fallback.
20415 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
20416 to compare the updates.
20417 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
20418 (get_load_store_type): Use it when handling a strided access.
20419 (vect_get_strided_load_store_ops): New function.
20420 (vect_get_data_ptr_increment): Likewise.
20421 (vectorizable_load): Handle strided gather loads. Always pass
20422 a step to vect_create_data_ref_ptr and bump_vector_ptr.
20424 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20425 Alan Hayward <alan.hayward@arm.com>
20426 David Sherwood <david.sherwood@arm.com>
20428 * doc/md.texi (gather_load@var{m}): Document.
20429 (mask_gather_load@var{m}): Likewise.
20430 * genopinit.c (main): Add supports_vec_gather_load and
20431 supports_vec_gather_load_cached to target_optabs.
20432 * optabs-tree.c (init_tree_optimization_optabs): Use
20433 ggc_cleared_alloc to allocate target_optabs.
20434 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
20435 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
20437 * internal-fn.h (internal_load_fn_p): Declare.
20438 (internal_gather_scatter_fn_p): Likewise.
20439 (internal_fn_mask_index): Likewise.
20440 (internal_gather_scatter_fn_supported_p): Likewise.
20441 * internal-fn.c (gather_load_direct): New macro.
20442 (expand_gather_load_optab_fn): New function.
20443 (direct_gather_load_optab_supported_p): New macro.
20444 (direct_internal_fn_optab): New function.
20445 (internal_load_fn_p): Likewise.
20446 (internal_gather_scatter_fn_p): Likewise.
20447 (internal_fn_mask_index): Likewise.
20448 (internal_gather_scatter_fn_supported_p): Likewise.
20449 * optabs-query.c (supports_at_least_one_mode_p): New function.
20450 (supports_vec_gather_load_p): Likewise.
20451 * optabs-query.h (supports_vec_gather_load_p): Declare.
20452 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
20453 and memory_type field.
20454 (NUM_PATTERNS): Bump to 15.
20455 * tree-vect-data-refs.c: Include internal-fn.h.
20456 (vect_gather_scatter_fn_p): New function.
20457 (vect_describe_gather_scatter_call): Likewise.
20458 (vect_check_gather_scatter): Try using internal functions for
20459 gather loads. Recognize existing calls to a gather load function.
20460 (vect_analyze_data_refs): Consider using gather loads if
20461 supports_vec_gather_load_p.
20462 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
20463 (vect_get_gather_scatter_offset_type): Likewise.
20464 (vect_convert_mask_for_vectype): Likewise.
20465 (vect_add_conversion_to_patterm): Likewise.
20466 (vect_try_gather_scatter_pattern): Likewise.
20467 (vect_recog_gather_scatter_pattern): New pattern recognizer.
20468 (vect_vect_recog_func_ptrs): Add it.
20469 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
20470 internal_fn_mask_index and internal_gather_scatter_fn_p.
20471 (check_load_store_masking): Take the gather_scatter_info as an
20472 argument and handle gather loads.
20473 (vect_get_gather_scatter_ops): New function.
20474 (vectorizable_call): Check internal_load_fn_p.
20475 (vectorizable_load): Likewise. Handle gather load internal
20477 (vectorizable_store): Update call to check_load_store_masking.
20478 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
20479 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
20480 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
20481 (aarch64_gather_scale_operand_d): New predicates.
20482 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
20483 (mask_gather_load<mode>): New insns.
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 * optabs.def (fold_left_plus_optab): New optab.
20490 * doc/md.texi (fold_left_plus_@var{m}): Document.
20491 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
20492 * internal-fn.c (fold_left_direct): Define.
20493 (expand_fold_left_optab_fn): Likewise.
20494 (direct_fold_left_optab_supported_p): Likewise.
20495 * fold-const-call.c (fold_const_fold_left): New function.
20496 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
20497 * tree-parloops.c (valid_reduction_p): New function.
20498 (gather_scalar_reductions): Use it.
20499 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
20500 (vect_finish_replace_stmt): Declare.
20501 * tree-vect-loop.c (fold_left_reduction_fn): New function.
20502 (needs_fold_left_reduction_p): New function, split out from...
20503 (vect_is_simple_reduction): ...here. Accept reductions that
20504 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
20505 (vect_force_simple_reduction): Also store the reduction type in
20506 the assignment's STMT_VINFO_REDUC_TYPE.
20507 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
20508 (merge_with_identity): New function.
20509 (vect_expand_fold_left): Likewise.
20510 (vectorize_fold_left_reduction): Likewise.
20511 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
20512 scalar phi in place for it. Check for target support and reject
20513 cases that would reassociate the operation. Defer the transform
20514 phase to vectorize_fold_left_reduction.
20515 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
20516 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
20517 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
20519 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20521 * tree-if-conv.c (predicate_mem_writes): Remove redundant
20522 call to ifc_temp_var.
20524 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20525 Alan Hayward <alan.hayward@arm.com>
20526 David Sherwood <david.sherwood@arm.com>
20528 * target.def (legitimize_address_displacement): Take the original
20529 offset as a poly_int.
20530 * targhooks.h (default_legitimize_address_displacement): Update
20532 * targhooks.c (default_legitimize_address_displacement): Likewise.
20533 * doc/tm.texi: Regenerate.
20534 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
20535 as an argument, moving assert of ad->disp == ad->disp_term to...
20536 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
20537 Try calling targetm.legitimize_address_displacement before expanding
20538 the address rather than afterwards, and adjust for the new interface.
20539 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
20540 Match the new hook interface. Handle SVE addresses.
20541 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
20542 new hook interface.
20544 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20546 * Makefile.in (OBJS): Add early-remat.o.
20547 * target.def (select_early_remat_modes): New hook.
20548 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
20549 * doc/tm.texi: Regenerate.
20550 * targhooks.h (default_select_early_remat_modes): Declare.
20551 * targhooks.c (default_select_early_remat_modes): New function.
20552 * timevar.def (TV_EARLY_REMAT): New timevar.
20553 * passes.def (pass_early_remat): New pass.
20554 * tree-pass.h (make_pass_early_remat): Declare.
20555 * early-remat.c: New file.
20556 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
20558 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
20560 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20561 Alan Hayward <alan.hayward@arm.com>
20562 David Sherwood <david.sherwood@arm.com>
20564 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
20565 vfm1 with a bound_epilog parameter.
20566 (vect_do_peeling): Update calls accordingly, and move the prologue
20567 call earlier in the function. Treat the base bound_epilog as 0 for
20568 fully-masked loops and retain vf - 1 for other loops. Add 1 to
20569 this base when peeling for gaps.
20570 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
20571 with fully-masked loops.
20572 (vect_estimate_min_profitable_iters): Handle the single peeled
20573 iteration in that case.
20575 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20576 Alan Hayward <alan.hayward@arm.com>
20577 David Sherwood <david.sherwood@arm.com>
20579 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
20580 single-element interleaving even if the size is not a power of 2.
20581 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
20582 accesses for single-element interleaving if the group size is
20585 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20586 Alan Hayward <alan.hayward@arm.com>
20587 David Sherwood <david.sherwood@arm.com>
20589 * doc/md.texi (fold_extract_last_@var{m}): Document.
20590 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
20591 * optabs.def (fold_extract_last_optab): New optab.
20592 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
20593 * internal-fn.c (fold_extract_direct): New macro.
20594 (expand_fold_extract_optab_fn): Likewise.
20595 (direct_fold_extract_optab_supported_p): Likewise.
20596 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
20597 * tree-vect-loop.c (vect_model_reduction_cost): Handle
20598 EXTRACT_LAST_REDUCTION.
20599 (get_initial_def_for_reduction): Do not create an initial vector
20600 for EXTRACT_LAST_REDUCTION reductions.
20601 (vectorizable_reduction): Leave the scalar phi in place for
20602 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
20603 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
20604 epilogue code for EXTRACT_LAST_REDUCTION and defer the
20605 transform phase to vectorizable_condition.
20606 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
20608 (vect_finish_stmt_generation): ...here.
20609 (vect_finish_replace_stmt): New function.
20610 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
20611 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
20613 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
20615 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20616 Alan Hayward <alan.hayward@arm.com>
20617 David Sherwood <david.sherwood@arm.com>
20619 * doc/md.texi (extract_last_@var{m}): Document.
20620 * optabs.def (extract_last_optab): New optab.
20621 * internal-fn.def (EXTRACT_LAST): New internal function.
20622 * internal-fn.c (cond_unary_direct): New macro.
20623 (expand_cond_unary_optab_fn): Likewise.
20624 (direct_cond_unary_optab_supported_p): Likewise.
20625 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
20626 loops using EXTRACT_LAST.
20627 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
20628 (extract_last_<mode>): ...this optab.
20629 (vec_extract<mode><Vel>): Update accordingly.
20631 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20632 Alan Hayward <alan.hayward@arm.com>
20633 David Sherwood <david.sherwood@arm.com>
20635 * target.def (empty_mask_is_expensive): New hook.
20636 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
20637 * doc/tm.texi: Regenerate.
20638 * targhooks.h (default_empty_mask_is_expensive): Declare.
20639 * targhooks.c (default_empty_mask_is_expensive): New function.
20640 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
20641 if the target says that empty masks are expensive.
20642 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
20644 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
20646 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20647 Alan Hayward <alan.hayward@arm.com>
20648 David Sherwood <david.sherwood@arm.com>
20650 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
20651 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
20652 (vect_use_loop_mask_for_alignment_p): New function.
20653 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
20654 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
20655 niters_skip argument. Make sure that the first niters_skip elements
20656 of the first iteration are inactive.
20657 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
20658 Update call to vect_set_loop_masks_directly.
20659 (get_misalign_in_elems): New function, split out from...
20660 (vect_gen_prolog_loop_niters): ...here.
20661 (vect_update_init_of_dr): Take a code argument that specifies whether
20662 the adjustment should be added or subtracted.
20663 (vect_update_init_of_drs): Likewise.
20664 (vect_prepare_for_masked_peels): New function.
20665 (vect_do_peeling): Skip prologue peeling if we're using a mask
20666 instead. Update call to vect_update_inits_of_drs.
20667 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
20669 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
20670 alignment. Do not include the number of peeled iterations in
20671 the minimum threshold in that case.
20672 (vectorizable_induction): Adjust the start value down by
20673 LOOP_VINFO_MASK_SKIP_NITERS iterations.
20674 (vect_transform_loop): Call vect_prepare_for_masked_peels.
20675 Take the number of skipped iterations into account when calculating
20677 * tree-vect-stmts.c (vect_gen_while_not): New function.
20679 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20680 Alan Hayward <alan.hayward@arm.com>
20681 David Sherwood <david.sherwood@arm.com>
20683 * doc/sourcebuild.texi (vect_fully_masked): Document.
20684 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
20685 default value to 0.
20686 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
20688 (vect_analyze_loop_2): ...here. Don't check the vectorization
20689 factor against the number of loop iterations if the loop is
20692 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20693 Alan Hayward <alan.hayward@arm.com>
20694 David Sherwood <david.sherwood@arm.com>
20696 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
20697 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
20698 (dump_groups): Update accordingly.
20699 (iv_use::mem_type): New member variable.
20700 (address_p): New function.
20701 (record_use): Add a mem_type argument and initialize the new
20703 (record_group_use): Add a mem_type argument. Use address_p.
20704 Remove obsolete null checks of base_object. Update call to record_use.
20705 (find_interesting_uses_op): Update call to record_group_use.
20706 (find_interesting_uses_cond): Likewise.
20707 (find_interesting_uses_address): Likewise.
20708 (get_mem_type_for_internal_fn): New function.
20709 (find_address_like_use): Likewise.
20710 (find_interesting_uses_stmt): Try find_address_like_use before
20711 calling find_interesting_uses_op.
20712 (addr_offset_valid_p): Use the iv mem_type field as the type
20713 of the addressed memory.
20714 (add_autoinc_candidates): Likewise.
20715 (get_address_cost): Likewise.
20716 (split_small_address_groups_p): Use address_p.
20717 (split_address_groups): Likewise.
20718 (add_iv_candidate_for_use): Likewise.
20719 (autoinc_possible_for_pair): Likewise.
20720 (rewrite_groups): Likewise.
20721 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
20722 (determine_group_iv_cost): Update after split of USE_ADDRESS.
20723 (get_alias_ptr_type_for_ptr_address): New function.
20724 (rewrite_use_address): Rewrite address uses in calls that were
20725 identified by find_address_like_use.
20727 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20728 Alan Hayward <alan.hayward@arm.com>
20729 David Sherwood <david.sherwood@arm.com>
20731 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
20733 * gimple-expr.h (is_gimple_addressable: Likewise.
20734 * gimple-expr.c (is_gimple_address): Likewise.
20735 * internal-fn.c (expand_call_mem_ref): New function.
20736 (expand_mask_load_optab_fn): Use it.
20737 (expand_mask_store_optab_fn): Likewise.
20739 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20740 Alan Hayward <alan.hayward@arm.com>
20741 David Sherwood <david.sherwood@arm.com>
20743 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
20744 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
20745 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
20746 (cond_umax@var{mode}): Document.
20747 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
20748 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
20749 (cond_umin_optab, cond_umax_optab): New optabs.
20750 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
20751 (COND_IOR, COND_XOR): New internal functions.
20752 * internal-fn.h (get_conditional_internal_fn): Declare.
20753 * internal-fn.c (cond_binary_direct): New macro.
20754 (expand_cond_binary_optab_fn): Likewise.
20755 (direct_cond_binary_optab_supported_p): Likewise.
20756 (get_conditional_internal_fn): New function.
20757 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
20758 Cope with reduction statements that are vectorized as calls rather
20760 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
20761 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
20762 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
20763 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
20764 (UNSPEC_COND_EOR): New unspecs.
20765 (optab): Add mappings for them.
20766 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
20767 (sve_int_op, sve_fp_op): New int attributes.
20769 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20770 Alan Hayward <alan.hayward@arm.com>
20771 David Sherwood <david.sherwood@arm.com>
20773 * optabs.def (while_ult_optab): New optab.
20774 * doc/md.texi (while_ult@var{m}@var{n}): Document.
20775 * internal-fn.def (WHILE_ULT): New internal function.
20776 * internal-fn.h (direct_internal_fn_supported_p): New override
20777 that takes two types as argument.
20778 * internal-fn.c (while_direct): New macro.
20779 (expand_while_optab_fn): New function.
20780 (convert_optab_supported_p): Likewise.
20781 (direct_while_optab_supported_p): New macro.
20782 * wide-int.h (wi::udiv_ceil): New function.
20783 * tree-vectorizer.h (rgroup_masks): New structure.
20784 (vec_loop_masks): New typedef.
20785 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
20786 and fully_masked_p.
20787 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
20788 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
20789 (vect_max_vf): New function.
20790 (slpeel_make_loop_iterate_ntimes): Delete.
20791 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
20792 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
20793 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
20794 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
20795 internal-fn.h, stor-layout.h and optabs-query.h.
20796 (vect_set_loop_mask): New function.
20797 (add_preheader_seq): Likewise.
20798 (add_header_seq): Likewise.
20799 (interleave_supported_p): Likewise.
20800 (vect_maybe_permute_loop_masks): Likewise.
20801 (vect_set_loop_masks_directly): Likewise.
20802 (vect_set_loop_condition_masked): Likewise.
20803 (vect_set_loop_condition_unmasked): New function, split out from
20804 slpeel_make_loop_iterate_ntimes.
20805 (slpeel_make_loop_iterate_ntimes): Rename to..
20806 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
20807 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
20808 (vect_do_peeling): Update call accordingly.
20809 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
20811 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
20812 mask_compare_type, can_fully_mask_p and fully_masked_p.
20813 (release_vec_loop_masks): New function.
20814 (_loop_vec_info): Use it to free the loop masks.
20815 (can_produce_all_loop_masks_p): New function.
20816 (vect_get_max_nscalars_per_iter): Likewise.
20817 (vect_verify_full_masking): Likewise.
20818 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
20819 retries, and free the mask rgroups before retrying. Check loop-wide
20820 reasons for disallowing fully-masked loops. Make the final decision
20821 about whether use a fully-masked loop or not.
20822 (vect_estimate_min_profitable_iters): Do not assume that peeling
20823 for the number of iterations will be needed for fully-masked loops.
20824 (vectorizable_reduction): Disable fully-masked loops.
20825 (vectorizable_live_operation): Likewise.
20826 (vect_halve_mask_nunits): New function.
20827 (vect_double_mask_nunits): Likewise.
20828 (vect_record_loop_mask): Likewise.
20829 (vect_get_loop_mask): Likewise.
20830 (vect_transform_loop): Handle the case in which the final loop
20831 iteration might handle a partial vector. Call vect_set_loop_condition
20832 instead of slpeel_make_loop_iterate_ntimes.
20833 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
20834 (check_load_store_masking): New function.
20835 (prepare_load_store_mask): Likewise.
20836 (vectorizable_store): Handle fully-masked loops.
20837 (vectorizable_load): Likewise.
20838 (supportable_widening_operation): Use vect_halve_mask_nunits for
20840 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
20841 (vect_gen_while): New function.
20842 * config/aarch64/aarch64.md (umax<mode>3): New expander.
20843 (aarch64_uqdec<mode>): New insn.
20845 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20846 Alan Hayward <alan.hayward@arm.com>
20847 David Sherwood <david.sherwood@arm.com>
20849 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
20850 (reduc_xor_scal_optab): New optabs.
20851 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
20852 (reduc_xor_scal_@var{m}): Document.
20853 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
20854 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
20855 internal functions.
20856 * fold-const-call.c (fold_const_call): Handle them.
20857 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
20858 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
20859 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
20860 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
20861 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
20862 (UNSPEC_XORV): New unspecs.
20863 (optab): Add entries for them.
20864 (BITWISEV): New int iterator.
20865 (bit_reduc_op): New int attributes.
20867 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20868 Alan Hayward <alan.hayward@arm.com>
20869 David Sherwood <david.sherwood@arm.com>
20871 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
20872 * internal-fn.def (VEC_SHL_INSERT): New internal function.
20873 * optabs.def (vec_shl_insert_optab): New optab.
20874 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
20875 (duplicate_and_interleave): Likewise.
20876 * tree-vect-loop.c: Include internal-fn.h.
20877 (neutral_op_for_slp_reduction): New function, split out from
20878 get_initial_defs_for_reduction.
20879 (get_initial_def_for_reduction): Handle option 2 for variable-length
20880 vectors by loading the neutral value into a vector and then shifting
20881 the initial value into element 0.
20882 (get_initial_defs_for_reduction): Replace the code argument with
20883 the neutral value calculated by neutral_op_for_slp_reduction.
20884 Use gimple_build_vector for constant-length vectors.
20885 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
20886 but the first group_size elements have a neutral value.
20887 Use duplicate_and_interleave otherwise.
20888 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
20889 Update call to get_initial_defs_for_reduction. Handle SLP
20890 reductions for variable-length vectors by creating one vector
20891 result for each scalar result, with the elements associated
20892 with other scalar results stubbed out with the neutral value.
20893 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
20894 Require IFN_VEC_SHL_INSERT for double reductions on
20895 variable-length vectors, or SLP reductions that have
20896 a neutral value. Require can_duplicate_and_interleave_p
20897 support for variable-length unchained SLP reductions if there
20898 is no neutral value, such as for MIN/MAX reductions. Also require
20899 the number of vector elements to be a multiple of the number of
20900 SLP statements when doing variable-length unchained SLP reductions.
20901 Update call to vect_create_epilog_for_reduction.
20902 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
20903 and remove initial values.
20904 (duplicate_and_interleave): Make public.
20905 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
20906 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
20908 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20909 Alan Hayward <alan.hayward@arm.com>
20910 David Sherwood <david.sherwood@arm.com>
20912 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
20913 (can_duplicate_and_interleave_p): New function.
20914 (vect_get_and_check_slp_defs): Take the vector of statements
20915 rather than just the current one. Remove excess parentheses.
20916 Restriction rejectinon of vect_constant_def and vect_external_def
20917 for variable-length vectors to boolean types, or types for which
20918 can_duplicate_and_interleave_p is false.
20919 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
20920 (duplicate_and_interleave): New function.
20921 (vect_get_constant_vectors): Use gimple_build_vector for
20922 constant-length vectors and suitable variable-length constant
20923 vectors. Use duplicate_and_interleave for other variable-length
20924 vectors. Don't defer the update when inserting new statements.
20926 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20927 Alan Hayward <alan.hayward@arm.com>
20928 David Sherwood <david.sherwood@arm.com>
20930 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
20931 min_profitable_iters doesn't go negative.
20933 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20934 Alan Hayward <alan.hayward@arm.com>
20935 David Sherwood <david.sherwood@arm.com>
20937 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
20938 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
20939 * optabs.def (vec_mask_load_lanes_optab): New optab.
20940 (vec_mask_store_lanes_optab): Likewise.
20941 * internal-fn.def (MASK_LOAD_LANES): New internal function.
20942 (MASK_STORE_LANES): Likewise.
20943 * internal-fn.c (mask_load_lanes_direct): New macro.
20944 (mask_store_lanes_direct): Likewise.
20945 (expand_mask_load_optab_fn): Handle masked operations.
20946 (expand_mask_load_lanes_optab_fn): New macro.
20947 (expand_mask_store_optab_fn): Handle masked operations.
20948 (expand_mask_store_lanes_optab_fn): New macro.
20949 (direct_mask_load_lanes_optab_supported_p): Likewise.
20950 (direct_mask_store_lanes_optab_supported_p): Likewise.
20951 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
20953 (vect_load_lanes_supported): Likewise.
20954 * tree-vect-data-refs.c (strip_conversion): New function.
20955 (can_group_stmts_p): Likewise.
20956 (vect_analyze_data_ref_accesses): Use it instead of checking
20957 for a pair of assignments.
20958 (vect_store_lanes_supported): Take a masked_p parameter.
20959 (vect_load_lanes_supported): Likewise.
20960 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
20961 vect_store_lanes_supported and vect_load_lanes_supported.
20962 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
20963 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
20964 parameter. Don't allow gaps for masked accesses.
20965 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
20966 and vect_load_lanes_supported.
20967 (get_load_store_type): Take a masked_p parameter and update
20968 call to get_group_load_store_type.
20969 (vectorizable_store): Update call to get_load_store_type.
20970 Handle IFN_MASK_STORE_LANES.
20971 (vectorizable_load): Update call to get_load_store_type.
20972 Handle IFN_MASK_LOAD_LANES.
20974 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20975 Alan Hayward <alan.hayward@arm.com>
20976 David Sherwood <david.sherwood@arm.com>
20978 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
20980 * config/aarch64/aarch64-protos.h
20981 (aarch64_sve_struct_memory_operand_p): Declare.
20982 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
20983 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
20984 (VPRED, vpred): Handle SVE structure modes.
20985 * config/aarch64/constraints.md (Utx): New constraint.
20986 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
20987 (aarch64_sve_struct_nonimmediate_operand): New predicates.
20988 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
20989 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
20990 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
20991 structure modes. Split into pieces after RA.
20992 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
20993 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
20995 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
20996 SVE structure modes.
20997 (aarch64_classify_address): Likewise.
20998 (sizetochar): Move earlier in file.
20999 (aarch64_print_operand): Handle SVE register lists.
21000 (aarch64_array_mode): New function.
21001 (aarch64_sve_struct_memory_operand_p): Likewise.
21002 (TARGET_ARRAY_MODE): Redefine.
21004 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21005 Alan Hayward <alan.hayward@arm.com>
21006 David Sherwood <david.sherwood@arm.com>
21008 * target.def (array_mode): New target hook.
21009 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
21010 * doc/tm.texi: Regenerate.
21011 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
21012 * hooks.c (hook_optmode_mode_uhwi_none): New function.
21013 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
21014 targetm.array_mode.
21015 * stor-layout.c (mode_for_array): Likewise. Support polynomial
21018 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21019 Alan Hayward <alan.hayward@arm.com>
21020 David Sherwood <david.sherwood@arm.com>
21022 * fold-const.c (fold_binary_loc): Check the argument types
21023 rather than the result type when testing for a vector operation.
21025 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21027 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
21028 * doc/tm.texi: Regenerate.
21030 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21031 Alan Hayward <alan.hayward@arm.com>
21032 David Sherwood <david.sherwood@arm.com>
21034 * doc/invoke.texi (-msve-vector-bits=): Document new option.
21035 (sve): Document new AArch64 extension.
21036 * doc/md.texi (w): Extend the description of the AArch64
21037 constraint to include SVE vectors.
21038 (Upl, Upa): Document new AArch64 predicate constraints.
21039 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
21041 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
21042 (msve-vector-bits=): New option.
21043 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
21044 SVE when these are disabled.
21045 (sve): New extension.
21046 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
21047 modes. Adjust their number of units based on aarch64_sve_vg.
21048 (MAX_BITSIZE_MODE_ANY_MODE): Define.
21049 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
21050 aarch64_addr_query_type.
21051 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
21052 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
21053 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
21054 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
21055 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
21056 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
21057 (aarch64_simd_imm_zero_p): Delete.
21058 (aarch64_check_zero_based_sve_index_immediate): Declare.
21059 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
21060 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
21061 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
21062 (aarch64_sve_float_mul_immediate_p): Likewise.
21063 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
21064 rather than an rtx.
21065 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
21066 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
21067 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
21068 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
21069 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
21070 (aarch64_regmode_natural_size): Likewise.
21071 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
21072 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
21074 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
21075 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
21076 for VG and the SVE predicate registers.
21077 (V_ALIASES): Add a "z"-prefixed alias.
21078 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
21079 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
21080 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
21081 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
21082 (REG_CLASS_NAMES): Add entries for them.
21083 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
21084 and the predicate registers.
21085 (aarch64_sve_vg): Declare.
21086 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
21087 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
21088 (REGMODE_NATURAL_SIZE): Define.
21089 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
21091 * config/aarch64/aarch64.c: Include cfgrtl.h.
21092 (simd_immediate_info): Add a constructor for series vectors,
21093 and an associated step field.
21094 (aarch64_sve_vg): New variable.
21095 (aarch64_dbx_register_number): Handle VG and the predicate registers.
21096 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
21097 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
21098 (VEC_ANY_DATA, VEC_STRUCT): New constants.
21099 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
21100 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
21101 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
21102 (aarch64_get_mask_mode): New functions.
21103 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
21104 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
21105 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
21106 predicate modes and predicate registers. Explicitly restrict
21107 GPRs to modes of 16 bytes or smaller. Only allow FP registers
21108 to store a vector mode if it is recognized by
21109 aarch64_classify_vector_mode.
21110 (aarch64_regmode_natural_size): New function.
21111 (aarch64_hard_regno_caller_save_mode): Return the original mode
21113 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
21114 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
21115 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
21116 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
21118 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
21119 does not overlap dest if the function is frame-related. Handle
21121 (aarch64_split_add_offset): New function.
21122 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
21123 them aarch64_add_offset.
21124 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
21125 and update call to aarch64_sub_sp.
21126 (aarch64_add_cfa_expression): New function.
21127 (aarch64_expand_prologue): Pass extra temporary registers to the
21128 functions above. Handle the case in which we need to emit new
21129 DW_CFA_expressions for registers that were originally saved
21130 relative to the stack pointer, but now have to be expressed
21131 relative to the frame pointer.
21132 (aarch64_output_mi_thunk): Pass extra temporary registers to the
21134 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
21135 IP0 and IP1 values for SVE frames.
21136 (aarch64_expand_vec_series): New function.
21137 (aarch64_expand_sve_widened_duplicate): Likewise.
21138 (aarch64_expand_sve_const_vector): Likewise.
21139 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
21140 Handle SVE constants. Use emit_move_insn to move a force_const_mem
21141 into the register, rather than emitting a SET directly.
21142 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
21143 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
21144 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
21145 (offset_9bit_signed_scaled_p): New functions.
21146 (aarch64_replicate_bitmask_imm): New function.
21147 (aarch64_bitmask_imm): Use it.
21148 (aarch64_cannot_force_const_mem): Reject expressions involving
21149 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
21150 (aarch64_classify_index): Handle SVE indices, by requiring
21151 a plain register index with a scale that matches the element size.
21152 (aarch64_classify_address): Handle SVE addresses. Assert that
21153 the mode of the address is VOIDmode or an integer mode.
21154 Update call to aarch64_classify_symbol.
21155 (aarch64_classify_symbolic_expression): Update call to
21156 aarch64_classify_symbol.
21157 (aarch64_const_vec_all_in_range_p): New function.
21158 (aarch64_print_vector_float_operand): Likewise.
21159 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
21160 "vN" for FP registers with SVE modes. Handle (const ...) vectors
21161 and the FP immediates 1.0 and 0.5.
21162 (aarch64_print_address_internal): Handle SVE addresses.
21163 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
21164 (aarch64_regno_regclass): Handle predicate registers.
21165 (aarch64_secondary_reload): Handle big-endian reloads of SVE
21167 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
21168 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
21169 (aarch64_convert_sve_vector_bits): New function.
21170 (aarch64_override_options): Use it to handle -msve-vector-bits=.
21171 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
21172 rather than an rtx.
21173 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
21174 Handle SVE vector and predicate modes. Accept VL-based constants
21175 that need only one temporary register, and VL offsets that require
21176 no temporary registers.
21177 (aarch64_conditional_register_usage): Mark the predicate registers
21178 as fixed if SVE isn't available.
21179 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
21180 Return true for SVE vector and predicate modes.
21181 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
21182 rather than an unsigned int. Handle SVE modes.
21183 (aarch64_preferred_simd_mode): Update call accordingly. Handle
21185 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
21187 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
21188 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
21189 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
21190 (aarch64_sve_float_mul_immediate_p): New functions.
21191 (aarch64_sve_valid_immediate): New function.
21192 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
21193 Explicitly reject structure modes. Check for INDEX constants.
21194 Handle PTRUE and PFALSE constants.
21195 (aarch64_check_zero_based_sve_index_immediate): New function.
21196 (aarch64_simd_imm_zero_p): Delete.
21197 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
21198 vector modes. Accept constants in the range of CNT[BHWD].
21199 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
21200 ask for an Advanced SIMD mode.
21201 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
21202 (aarch64_simd_vector_alignment): Handle SVE predicates.
21203 (aarch64_vectorize_preferred_vector_alignment): New function.
21204 (aarch64_simd_vector_alignment_reachable): Use it instead of
21206 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
21207 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
21209 (MAX_VECT_LEN): Delete.
21210 (expand_vec_perm_d): Add a vec_flags field.
21211 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
21212 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
21213 (aarch64_evpc_ext): Don't apply a big-endian lane correction
21215 (aarch64_evpc_rev): Rename to...
21216 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
21217 (aarch64_evpc_rev_global): New function.
21218 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
21219 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
21221 (aarch64_evpc_sve_tbl): New function.
21222 (aarch64_expand_vec_perm_const_1): Update after rename of
21223 aarch64_evpc_rev. Handle SVE permutes too, trying
21224 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
21225 than aarch64_evpc_tbl.
21226 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
21227 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
21228 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
21229 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
21230 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
21231 (aarch64_expand_sve_vcond): New functions.
21232 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
21233 of aarch64_vector_mode_p.
21234 (aarch64_dwarf_poly_indeterminate_value): New function.
21235 (aarch64_compute_pressure_classes): Likewise.
21236 (aarch64_can_change_mode_class): Likewise.
21237 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
21238 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
21239 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
21240 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
21241 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
21242 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
21243 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
21244 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
21246 (Dn, Dl, Dr): Accept const as well as const_vector.
21247 (Dz): Likewise. Compare against CONST0_RTX.
21248 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
21249 of "vector" where appropriate.
21250 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
21251 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
21252 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
21253 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
21254 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
21255 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
21256 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
21257 (v_int_equiv): Extend to SVE modes.
21258 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
21260 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
21261 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
21262 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
21263 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
21264 (SVE_COND_FP_CMP): New int iterators.
21265 (perm_hilo): Handle the new unpack unspecs.
21266 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
21268 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
21269 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
21270 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
21271 (aarch64_equality_operator, aarch64_constant_vector_operand)
21272 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
21273 (aarch64_sve_nonimmediate_operand): Likewise.
21274 (aarch64_sve_general_operand): Likewise.
21275 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
21276 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
21277 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
21278 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
21279 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
21280 (aarch64_sve_float_arith_immediate): Likewise.
21281 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
21282 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
21283 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
21284 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
21285 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
21286 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
21287 (aarch64_sve_float_arith_operand): Likewise.
21288 (aarch64_sve_float_arith_with_sub_operand): Likewise.
21289 (aarch64_sve_float_mul_operand): Likewise.
21290 (aarch64_sve_vec_perm_operand): Likewise.
21291 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
21292 (aarch64_mov_operand): Accept const_poly_int and const_vector.
21293 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
21294 as well as const_vector.
21295 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
21296 in file. Use CONST0_RTX and CONSTM1_RTX.
21297 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
21298 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
21299 Use aarch64_simd_imm_zero.
21300 * config/aarch64/aarch64-sve.md: New file.
21301 * config/aarch64/aarch64.md: Include it.
21302 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
21303 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
21304 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
21305 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
21306 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
21307 (sve): New attribute.
21308 (enabled): Disable instructions with the sve attribute unless
21310 (movqi, movhi): Pass CONST_POLY_INT operaneds through
21311 aarch64_expand_mov_immediate.
21312 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
21313 CNT[BHSD] immediates.
21314 (movti): Split CONST_POLY_INT moves into two halves.
21315 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
21316 Split additions that need a temporary here if the destination
21317 is the stack pointer.
21318 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
21319 (*add<mode>3_poly_1): New instruction.
21320 (set_clobber_cc): New expander.
21322 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21324 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
21325 parameter and use it instead of GET_MODE_SIZE (innermode). Use
21326 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
21327 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
21328 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
21329 Change innermode from fixed_mode_size to machine_mode.
21330 (simplify_subreg): Update call accordingly. Handle a constant-sized
21331 subreg of a variable-length CONST_VECTOR.
21333 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21334 Alan Hayward <alan.hayward@arm.com>
21335 David Sherwood <david.sherwood@arm.com>
21337 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
21338 (add_offset_to_base): New function, split out from...
21339 (create_mem_ref): ...here. When handling a scale other than 1,
21340 check first whether the address is valid without the offset.
21341 Add it into the base if so, leaving the index and scale as-is.
21343 2018-01-12 Jakub Jelinek <jakub@redhat.com>
21346 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
21347 fold_for_warn before checking if arg2 is INTEGER_CST.
21349 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
21351 * config/rs6000/predicates.md (load_multiple_operation): Delete.
21352 (store_multiple_operation): Delete.
21353 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
21354 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
21355 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
21356 guarded by TARGET_STRING.
21357 (rs6000_output_load_multiple): Delete.
21358 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
21359 OPTION_MASK_STRING / TARGET_STRING handling.
21360 (print_operand) <'N', 'O'>: Add comment that these are unused now.
21361 (const rs6000_opt_masks) <"string">: Change mask to 0.
21362 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
21363 (MASK_STRING): Delete.
21364 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
21366 (load_multiple): Delete.
21373 (store_multiple): Delete.
21380 (movmemsi_8reg): Delete.
21381 (corresponding unnamed define_insn): Delete.
21382 (movmemsi_6reg): Delete.
21383 (corresponding unnamed define_insn): Delete.
21384 (movmemsi_4reg): Delete.
21385 (corresponding unnamed define_insn): Delete.
21386 (movmemsi_2reg): Delete.
21387 (corresponding unnamed define_insn): Delete.
21388 (movmemsi_1reg): Delete.
21389 (corresponding unnamed define_insn): Delete.
21390 * config/rs6000/rs6000.opt (mno-string): New.
21391 (mstring): Replace by deprecation warning stub.
21392 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
21394 2018-01-12 Jakub Jelinek <jakub@redhat.com>
21396 * regrename.c (regrename_do_replace): If replacing the same
21397 reg multiple times, try to reuse last created gen_raw_REG.
21400 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
21401 main to workaround a bug in GDB.
21403 2018-01-12 Tom de Vries <tom@codesourcery.com>
21406 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
21408 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
21410 PR rtl-optimization/80481
21411 * ira-color.c (get_cap_member): New function.
21412 (allocnos_conflict_by_live_ranges_p): Use it.
21413 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
21414 (setup_slot_coalesced_allocno_live_ranges): Ditto.
21416 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
21419 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
21420 (*saddl_se_1): Ditto.
21421 (*ssubsi_1): Ditto.
21422 (*ssubl_se_1): Ditto.
21424 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
21426 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
21427 rather than wi::to_widest for DR_INITs.
21428 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
21429 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
21430 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
21432 (vect_analyze_group_access_1): Note that here.
21434 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
21436 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
21437 polynomial type sizes.
21439 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
21441 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
21442 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
21443 (gimple_add_tmp_var): Likewise.
21445 2018-01-12 Martin Liska <mliska@suse.cz>
21447 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
21448 (gimple_alloc_sizes): Likewise.
21449 (dump_gimple_statistics): Use PRIu64 in printf format.
21450 * gimple.h: Change uint64_t to int.
21452 2018-01-12 Martin Liska <mliska@suse.cz>
21454 * tree-core.h: Use uint64_t instead of int.
21455 * tree.c (tree_node_counts): Likewise.
21456 (tree_node_sizes): Likewise.
21457 (dump_tree_statistics): Use PRIu64 in printf format.
21459 2018-01-12 Martin Liska <mliska@suse.cz>
21461 * Makefile.in: As qsort_chk is implemented in vec.c, add
21462 vec.o to linkage of gencfn-macros.
21463 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
21464 passing the info to record_node_allocation_statistics.
21465 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
21467 * ggc-common.c (struct ggc_usage): Add operator== and use
21468 it in operator< and compare function.
21469 * mem-stats.h (struct mem_usage): Likewise.
21470 * vec.c (struct vec_usage): Remove operator< and compare
21471 function. Can be simply inherited.
21473 2018-01-12 Martin Jambor <mjambor@suse.cz>
21476 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
21477 * tree-ssa-math-opts.c: Include domwalk.h.
21478 (convert_mult_to_fma_1): New function.
21479 (fma_transformation_info): New type.
21480 (fma_deferring_state): Likewise.
21481 (cancel_fma_deferring): New function.
21482 (result_of_phi): Likewise.
21483 (last_fma_candidate_feeds_initial_phi): Likewise.
21484 (convert_mult_to_fma): Added deferring logic, split actual
21485 transformation to convert_mult_to_fma_1.
21486 (math_opts_dom_walker): New type.
21487 (math_opts_dom_walker::after_dom_children): New method, body moved
21488 here from pass_optimize_widening_mul::execute, added deferring logic
21490 (pass_optimize_widening_mul::execute): Moved most of code to
21491 math_opts_dom_walker::after_dom_children.
21492 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
21493 * config/i386/i386.c (ix86_option_override_internal): Added
21494 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
21496 2018-01-12 Richard Biener <rguenther@suse.de>
21499 * dwarf2out.c (gen_variable_die): Do not reset old_die for
21500 inline instance vars.
21502 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
21505 * config/rx/rx.c (rx_is_restricted_memory_address):
21506 Handle SUBREG case.
21508 2018-01-12 Richard Biener <rguenther@suse.de>
21510 PR tree-optimization/80846
21511 * target.def (split_reduction): New target hook.
21512 * targhooks.c (default_split_reduction): New function.
21513 * targhooks.h (default_split_reduction): Declare.
21514 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
21515 target requests first reduce vectors by combining low and high
21517 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
21518 (get_vectype_for_scalar_type_and_size): Export.
21519 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
21520 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
21521 * doc/tm.texi: Regenerate.
21522 * config/i386/i386.c (ix86_split_reduction): Implement
21523 TARGET_VECTORIZE_SPLIT_REDUCTION.
21525 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
21528 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
21529 in PIC mode except for TARGET_VXWORKS_RTP.
21530 * config/sparc/sparc.c: Include cfgrtl.h.
21531 (TARGET_INIT_PIC_REG): Define.
21532 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
21533 (sparc_pic_register_p): New predicate.
21534 (sparc_legitimate_address_p): Use it.
21535 (sparc_legitimize_pic_address): Likewise.
21536 (sparc_delegitimize_address): Likewise.
21537 (sparc_mode_dependent_address_p): Likewise.
21538 (gen_load_pcrel_sym): Remove 4th parameter.
21539 (load_got_register): Adjust call to above. Remove obsolete stuff.
21540 (sparc_expand_prologue): Do not call load_got_register here.
21541 (sparc_flat_expand_prologue): Likewise.
21542 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
21543 (sparc_use_pseudo_pic_reg): New function.
21544 (sparc_init_pic_reg): Likewise.
21545 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
21546 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
21548 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
21550 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
21551 Add item for branch_cost.
21553 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
21555 PR rtl-optimization/83565
21556 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
21557 not extend the result to a larger mode for rotate operations.
21558 (num_sign_bit_copies1): Likewise.
21560 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
21563 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
21565 Use values-Xc.o for -pedantic.
21566 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
21568 2018-01-12 Martin Liska <mliska@suse.cz>
21571 * ipa-devirt.c (final_warning_record::grow_type_warnings):
21573 (possible_polymorphic_call_targets): Use it.
21574 (ipa_devirt): Likewise.
21576 2018-01-12 Martin Liska <mliska@suse.cz>
21578 * profile-count.h (enum profile_quality): Use 0 as invalid
21579 enum value of profile_quality.
21581 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
21583 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
21584 -mext-string options.
21586 2018-01-12 Richard Biener <rguenther@suse.de>
21588 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
21589 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
21590 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
21592 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
21594 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
21596 * configure.ac (--with-long-double-format): Add support for the
21597 configuration option to change the default long double format on
21599 * config.gcc (powerpc*-linux*-*): Likewise.
21600 * configure: Regenerate.
21601 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
21602 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
21603 used without modification.
21605 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21607 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
21608 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
21609 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
21610 MISC_BUILTIN_SPEC_BARRIER.
21611 (rs6000_init_builtins): Likewise.
21612 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
21614 (speculation_barrier): New define_insn.
21615 * doc/extend.texi: Document __builtin_speculation_barrier.
21617 2018-01-11 Jakub Jelinek <jakub@redhat.com>
21620 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
21621 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
21622 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
21624 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
21625 integral modes instead of "ss" and "sd".
21626 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
21627 vectors with 32-bit and 64-bit elements.
21628 (vecdupssescalarmodesuffix): New mode attribute.
21629 (vec_dup<mode>): Use it.
21631 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
21634 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
21635 frame if argument is passed on stack.
21637 2018-01-11 Jakub Jelinek <jakub@redhat.com>
21640 * ree.c (combine_reaching_defs): Optimize also
21641 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
21642 reg2=any_extend(exp); reg1=reg2;, formatting fix.
21644 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
21646 PR middle-end/83189
21647 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
21649 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
21651 PR middle-end/83718
21652 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
21653 after they are computed.
21655 2018-01-11 Bin Cheng <bin.cheng@arm.com>
21657 PR tree-optimization/83695
21658 * gimple-loop-linterchange.cc
21659 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
21660 reset cached scev information after interchange.
21661 (pass_linterchange::execute): Remove call to scev_reset_htab.
21663 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21665 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
21666 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
21667 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
21668 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
21669 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
21670 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
21671 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
21672 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
21673 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
21674 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
21675 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
21676 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
21677 (V_lane_reg): Likewise.
21678 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
21680 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
21681 (vfmal_lane_low<mode>_intrinsic,
21682 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
21683 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
21684 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
21685 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
21686 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
21687 vfmsl_lane_high<mode>_intrinsic): New define_insns.
21689 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21691 * config/arm/arm-cpus.in (fp16fml): New feature.
21692 (ALL_SIMD): Add fp16fml.
21693 (armv8.2-a): Add fp16fml as an option.
21694 (armv8.3-a): Likewise.
21695 (armv8.4-a): Add fp16fml as part of fp16.
21696 * config/arm/arm.h (TARGET_FP16FML): Define.
21697 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
21699 * config/arm/arm-modes.def (V2HF): Define.
21700 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
21701 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
21702 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
21703 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
21704 vfmsl_low, vfmsl_high): New set of builtins.
21705 * config/arm/iterators.md (PLUSMINUS): New code iterator.
21706 (vfml_op): New code attribute.
21707 (VFMLHALVES): New int iterator.
21708 (VFML, VFMLSEL): New mode attributes.
21709 (V_reg): Define mapping for V2HF.
21710 (V_hi, V_lo): New mode attributes.
21711 (VF_constraint): Likewise.
21712 (vfml_half, vfml_half_selector): New int attributes.
21713 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
21715 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
21716 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
21718 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
21719 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
21720 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
21721 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
21723 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
21724 Document new effective target and option set.
21726 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21728 * config/arm/arm-cpus.in (armv8_4): New feature.
21729 (ARMv8_4a): New fgroup.
21730 (armv8.4-a): New arch.
21731 * config/arm/arm-tables.opt: Regenerate.
21732 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
21733 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
21734 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
21735 Add matching rules for -march=armv8.4-a and extensions.
21736 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
21738 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
21741 * config/rx/rx.md (BW): New mode attribute.
21742 (sync_lock_test_and_setsi): Add mode suffix to insn output.
21744 2018-01-11 Richard Biener <rguenther@suse.de>
21746 PR tree-optimization/83435
21747 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
21748 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
21749 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
21751 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21752 Alan Hayward <alan.hayward@arm.com>
21753 David Sherwood <david.sherwood@arm.com>
21755 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
21757 (aarch64_classify_address): Initialize it. Track polynomial offsets.
21758 (aarch64_print_address_internal): Use it to check for a zero offset.
21760 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21761 Alan Hayward <alan.hayward@arm.com>
21762 David Sherwood <david.sherwood@arm.com>
21764 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
21765 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
21766 Return a poly_int64 rather than a HOST_WIDE_INT.
21767 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
21768 rather than a HOST_WIDE_INT.
21769 * config/aarch64/aarch64.h (aarch64_frame): Protect with
21770 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
21771 hard_fp_offset, frame_size, initial_adjust, callee_offset and
21772 final_offset from HOST_WIDE_INT to poly_int64.
21773 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
21774 to_constant when getting the number of units in an Advanced SIMD
21776 (aarch64_builtin_vectorized_function): Check for a constant number
21778 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
21780 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
21781 attribute instead of GET_MODE_NUNITS.
21782 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
21783 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
21784 GET_MODE_SIZE for fixed-size registers.
21785 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
21786 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
21787 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
21788 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
21789 (aarch64_print_operand, aarch64_print_address_internal)
21790 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
21791 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
21792 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
21793 Handle polynomial GET_MODE_SIZE.
21794 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
21795 wider than SImode without modification.
21796 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
21797 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
21798 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
21799 passing and returning SVE modes.
21800 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
21801 rather than GEN_INT.
21802 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
21803 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
21804 (aarch64_allocate_and_probe_stack_space): Likewise.
21805 (aarch64_layout_frame): Cope with polynomial offsets.
21806 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
21807 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
21808 polynomial offsets.
21809 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
21810 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
21811 poly_int64 rather than a HOST_WIDE_INT.
21812 (aarch64_get_separate_components, aarch64_process_components)
21813 (aarch64_expand_prologue, aarch64_expand_epilogue)
21814 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
21815 (aarch64_anchor_offset): New function, split out from...
21816 (aarch64_legitimize_address): ...here.
21817 (aarch64_builtin_vectorization_cost): Handle polynomial
21818 TYPE_VECTOR_SUBPARTS.
21819 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
21821 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
21822 number of elements from the PARALLEL rather than the mode.
21823 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
21824 rather than GET_MODE_BITSIZE.
21825 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
21826 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
21827 (aarch64_expand_vec_perm_const_1): Handle polynomial
21828 d->perm.length () and d->perm elements.
21829 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
21830 Apply to_constant to d->perm elements.
21831 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
21832 polynomial CONST_VECTOR_NUNITS.
21833 (aarch64_move_pointer): Take amount as a poly_int64 rather
21835 (aarch64_progress_pointer): Avoid temporary variable.
21836 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
21837 the mode attribute instead of GET_MODE.
21839 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21840 Alan Hayward <alan.hayward@arm.com>
21841 David Sherwood <david.sherwood@arm.com>
21843 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
21844 x exists before using it.
21845 (aarch64_add_constant_internal): Rename to...
21846 (aarch64_add_offset_1): ...this. Replace regnum with separate
21847 src and dest rtxes. Handle the case in which they're different,
21848 including when the offset is zero. Replace scratchreg with an rtx.
21849 Use 2 additions if there is no spare register into which we can
21850 move a 16-bit constant.
21851 (aarch64_add_constant): Delete.
21852 (aarch64_add_offset): Replace reg with separate src and dest
21853 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
21854 Use aarch64_add_offset_1.
21855 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
21856 an rtx rather than an int. Take the delta as a poly_int64
21857 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
21858 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
21859 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
21860 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
21861 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
21862 and aarch64_add_sp.
21863 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
21864 aarch64_add_constant.
21866 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21868 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
21869 Use scalar_float_mode.
21871 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21873 * config/aarch64/aarch64-simd.md
21874 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
21875 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
21876 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
21877 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
21878 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
21879 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
21880 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
21881 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
21882 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
21883 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
21885 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21888 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
21889 targ_options->x_arm_arch_string is non NULL.
21891 2018-01-11 Tamar Christina <tamar.christina@arm.com>
21893 * config/aarch64/aarch64.h
21894 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
21896 2018-01-11 Sudakshina Das <sudi.das@arm.com>
21899 * expmed.c (emit_store_flag_force): Swap if const op0
21900 and change VOIDmode to mode of op0.
21902 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21904 PR rtl-optimization/83761
21905 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
21906 than bytes to mode_for_size.
21908 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
21910 PR middle-end/83189
21911 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
21912 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
21915 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
21917 PR middle-end/83575
21918 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
21919 when in layout mode.
21920 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
21921 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
21924 2018-01-10 Michael Collison <michael.collison@arm.com>
21926 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
21927 * config/aarch64/aarch64-option-extension.def: Add
21928 AARCH64_OPT_EXTENSION of 'fp16fml'.
21929 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21930 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
21931 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
21932 * config/aarch64/constraints.md (Ui7): New constraint.
21933 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
21934 (VFMLA_SEL_W): Ditto.
21937 (VFMLA16_LOW): New int iterator.
21938 (VFMLA16_HIGH): Ditto.
21939 (UNSPEC_FMLAL): New unspec.
21940 (UNSPEC_FMLSL): Ditto.
21941 (UNSPEC_FMLAL2): Ditto.
21942 (UNSPEC_FMLSL2): Ditto.
21943 (f16mac): New code attribute.
21944 * config/aarch64/aarch64-simd-builtins.def
21945 (aarch64_fmlal_lowv2sf): Ditto.
21946 (aarch64_fmlsl_lowv2sf): Ditto.
21947 (aarch64_fmlalq_lowv4sf): Ditto.
21948 (aarch64_fmlslq_lowv4sf): Ditto.
21949 (aarch64_fmlal_highv2sf): Ditto.
21950 (aarch64_fmlsl_highv2sf): Ditto.
21951 (aarch64_fmlalq_highv4sf): Ditto.
21952 (aarch64_fmlslq_highv4sf): Ditto.
21953 (aarch64_fmlal_lane_lowv2sf): Ditto.
21954 (aarch64_fmlsl_lane_lowv2sf): Ditto.
21955 (aarch64_fmlal_laneq_lowv2sf): Ditto.
21956 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
21957 (aarch64_fmlalq_lane_lowv4sf): Ditto.
21958 (aarch64_fmlsl_lane_lowv4sf): Ditto.
21959 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
21960 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
21961 (aarch64_fmlal_lane_highv2sf): Ditto.
21962 (aarch64_fmlsl_lane_highv2sf): Ditto.
21963 (aarch64_fmlal_laneq_highv2sf): Ditto.
21964 (aarch64_fmlsl_laneq_highv2sf): Ditto.
21965 (aarch64_fmlalq_lane_highv4sf): Ditto.
21966 (aarch64_fmlsl_lane_highv4sf): Ditto.
21967 (aarch64_fmlalq_laneq_highv4sf): Ditto.
21968 (aarch64_fmlsl_laneq_highv4sf): Ditto.
21969 * config/aarch64/aarch64-simd.md:
21970 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
21971 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
21972 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
21973 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
21974 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
21975 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
21976 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
21977 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
21978 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
21979 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
21980 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
21981 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
21982 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
21983 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
21984 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
21985 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
21986 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
21987 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
21988 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
21989 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
21990 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
21991 (vfmlsl_low_u32): Ditto.
21992 (vfmlalq_low_u32): Ditto.
21993 (vfmlslq_low_u32): Ditto.
21994 (vfmlal_high_u32): Ditto.
21995 (vfmlsl_high_u32): Ditto.
21996 (vfmlalq_high_u32): Ditto.
21997 (vfmlslq_high_u32): Ditto.
21998 (vfmlal_lane_low_u32): Ditto.
21999 (vfmlsl_lane_low_u32): Ditto.
22000 (vfmlal_laneq_low_u32): Ditto.
22001 (vfmlsl_laneq_low_u32): Ditto.
22002 (vfmlalq_lane_low_u32): Ditto.
22003 (vfmlslq_lane_low_u32): Ditto.
22004 (vfmlalq_laneq_low_u32): Ditto.
22005 (vfmlslq_laneq_low_u32): Ditto.
22006 (vfmlal_lane_high_u32): Ditto.
22007 (vfmlsl_lane_high_u32): Ditto.
22008 (vfmlal_laneq_high_u32): Ditto.
22009 (vfmlsl_laneq_high_u32): Ditto.
22010 (vfmlalq_lane_high_u32): Ditto.
22011 (vfmlslq_lane_high_u32): Ditto.
22012 (vfmlalq_laneq_high_u32): Ditto.
22013 (vfmlslq_laneq_high_u32): Ditto.
22014 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
22015 (AARCH64_FL_FOR_ARCH8_4): New.
22016 (AARCH64_ISA_F16FML): New ISA flag.
22017 (TARGET_F16FML): New feature flag for fp16fml.
22018 (doc/invoke.texi): Document new fp16fml option.
22020 2018-01-10 Michael Collison <michael.collison@arm.com>
22022 * config/aarch64/aarch64-builtins.c:
22023 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
22024 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22025 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
22026 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
22027 (AARCH64_ISA_SHA3): New ISA flag.
22028 (TARGET_SHA3): New feature flag for sha3.
22029 * config/aarch64/iterators.md (sha512_op): New int attribute.
22030 (CRYPTO_SHA512): New int iterator.
22031 (UNSPEC_SHA512H): New unspec.
22032 (UNSPEC_SHA512H2): Ditto.
22033 (UNSPEC_SHA512SU0): Ditto.
22034 (UNSPEC_SHA512SU1): Ditto.
22035 * config/aarch64/aarch64-simd-builtins.def
22036 (aarch64_crypto_sha512hqv2di): New builtin.
22037 (aarch64_crypto_sha512h2qv2di): Ditto.
22038 (aarch64_crypto_sha512su0qv2di): Ditto.
22039 (aarch64_crypto_sha512su1qv2di): Ditto.
22040 (aarch64_eor3qv8hi): Ditto.
22041 (aarch64_rax1qv2di): Ditto.
22042 (aarch64_xarqv2di): Ditto.
22043 (aarch64_bcaxqv8hi): Ditto.
22044 * config/aarch64/aarch64-simd.md:
22045 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
22046 (aarch64_crypto_sha512su0qv2di): Ditto.
22047 (aarch64_crypto_sha512su1qv2di): Ditto.
22048 (aarch64_eor3qv8hi): Ditto.
22049 (aarch64_rax1qv2di): Ditto.
22050 (aarch64_xarqv2di): Ditto.
22051 (aarch64_bcaxqv8hi): Ditto.
22052 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
22053 (vsha512h2q_u64): Ditto.
22054 (vsha512su0q_u64): Ditto.
22055 (vsha512su1q_u64): Ditto.
22056 (veor3q_u16): Ditto.
22057 (vrax1q_u64): Ditto.
22058 (vxarq_u64): Ditto.
22059 (vbcaxq_u16): Ditto.
22060 * config/arm/types.md (crypto_sha512): New type attribute.
22061 (crypto_sha3): Ditto.
22062 (doc/invoke.texi): Document new sha3 option.
22064 2018-01-10 Michael Collison <michael.collison@arm.com>
22066 * config/aarch64/aarch64-builtins.c:
22067 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
22068 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22069 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
22070 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
22071 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
22072 (AARCH64_ISA_SM4): New ISA flag.
22073 (TARGET_SM4): New feature flag for sm4.
22074 * config/aarch64/aarch64-simd-builtins.def
22075 (aarch64_sm3ss1qv4si): Ditto.
22076 (aarch64_sm3tt1aq4si): Ditto.
22077 (aarch64_sm3tt1bq4si): Ditto.
22078 (aarch64_sm3tt2aq4si): Ditto.
22079 (aarch64_sm3tt2bq4si): Ditto.
22080 (aarch64_sm3partw1qv4si): Ditto.
22081 (aarch64_sm3partw2qv4si): Ditto.
22082 (aarch64_sm4eqv4si): Ditto.
22083 (aarch64_sm4ekeyqv4si): Ditto.
22084 * config/aarch64/aarch64-simd.md:
22085 (aarch64_sm3ss1qv4si): Ditto.
22086 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
22087 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
22088 (aarch64_sm4eqv4si): Ditto.
22089 (aarch64_sm4ekeyqv4si): Ditto.
22090 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
22091 (sm3part_op): Ditto.
22092 (CRYPTO_SM3TT): Ditto.
22093 (CRYPTO_SM3PART): Ditto.
22094 (UNSPEC_SM3SS1): New unspec.
22095 (UNSPEC_SM3TT1A): Ditto.
22096 (UNSPEC_SM3TT1B): Ditto.
22097 (UNSPEC_SM3TT2A): Ditto.
22098 (UNSPEC_SM3TT2B): Ditto.
22099 (UNSPEC_SM3PARTW1): Ditto.
22100 (UNSPEC_SM3PARTW2): Ditto.
22101 (UNSPEC_SM4E): Ditto.
22102 (UNSPEC_SM4EKEY): Ditto.
22103 * config/aarch64/constraints.md (Ui2): New constraint.
22104 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
22105 * config/arm/types.md (crypto_sm3): New type attribute.
22106 (crypto_sm4): Ditto.
22107 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
22108 (vsm3tt1aq_u32): Ditto.
22109 (vsm3tt1bq_u32): Ditto.
22110 (vsm3tt2aq_u32): Ditto.
22111 (vsm3tt2bq_u32): Ditto.
22112 (vsm3partw1q_u32): Ditto.
22113 (vsm3partw2q_u32): Ditto.
22114 (vsm4eq_u32): Ditto.
22115 (vsm4ekeyq_u32): Ditto.
22116 (doc/invoke.texi): Document new sm4 option.
22118 2018-01-10 Michael Collison <michael.collison@arm.com>
22120 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
22121 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
22122 (AARCH64_FL_FOR_ARCH8_4): New.
22123 (AARCH64_FL_V8_4): New flag.
22124 (doc/invoke.texi): Document new armv8.4-a option.
22126 2018-01-10 Michael Collison <michael.collison@arm.com>
22128 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22129 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
22130 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
22131 * config/aarch64/aarch64-option-extension.def: Add
22132 AARCH64_OPT_EXTENSION of 'sha2'.
22133 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
22134 (crypto): Disable sha2 and aes if crypto disabled.
22135 (crypto): Enable aes and sha2 if enabled.
22136 (simd): Disable sha2 and aes if simd disabled.
22137 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
22139 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
22140 (TARGET_SHA2): New feature flag for sha2.
22141 (TARGET_AES): New feature flag for aes.
22142 * config/aarch64/aarch64-simd.md:
22143 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
22144 conditional on TARGET_AES.
22145 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
22146 (aarch64_crypto_sha1hsi): Make pattern conditional
22148 (aarch64_crypto_sha1hv4si): Ditto.
22149 (aarch64_be_crypto_sha1hv4si): Ditto.
22150 (aarch64_crypto_sha1su1v4si): Ditto.
22151 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
22152 (aarch64_crypto_sha1su0v4si): Ditto.
22153 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
22154 (aarch64_crypto_sha256su0v4si): Ditto.
22155 (aarch64_crypto_sha256su1v4si): Ditto.
22156 (doc/invoke.texi): Document new aes and sha2 options.
22158 2018-01-10 Martin Sebor <msebor@redhat.com>
22160 PR tree-optimization/83781
22161 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
22164 2018-01-11 Martin Sebor <msebor@gmail.com>
22165 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22167 PR tree-optimization/83501
22168 PR tree-optimization/81703
22170 * tree-ssa-strlen.c (get_string_cst): Rename...
22171 (get_string_len): ...to this. Handle global constants.
22172 (handle_char_store): Adjust.
22174 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
22175 Jim Wilson <jimw@sifive.com>
22177 * config/riscv/riscv-protos.h (riscv_output_return): New.
22178 * config/riscv/riscv.c (struct machine_function): New naked_p field.
22179 (riscv_attribute_table, riscv_output_return),
22180 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
22181 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
22182 (riscv_compute_frame_info): Only compute frame->mask if not a naked
22184 (riscv_expand_prologue): Add early return for naked function.
22185 (riscv_expand_epilogue): Likewise.
22186 (riscv_function_ok_for_sibcall): Return false for naked function.
22187 (riscv_set_current_function): New.
22188 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
22189 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
22190 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
22191 * doc/extend.texi (RISC-V Function Attributes): New.
22193 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
22195 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
22196 check for 128-bit long double before checking TCmode.
22197 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
22198 128-bit long doubles before checking TFmode or TCmode.
22199 (FLOAT128_IBM_P): Likewise.
22201 2018-01-10 Martin Sebor <msebor@redhat.com>
22203 PR tree-optimization/83671
22204 * builtins.c (c_strlen): Unconditionally return zero for the empty
22206 Use -Warray-bounds for warnings.
22207 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
22208 for non-constant array indices with COMPONENT_REF, arrays of
22209 arrays, and pointers to arrays.
22210 (gimple_fold_builtin_strlen): Determine and set length range for
22211 non-constant character arrays.
22213 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
22215 PR middle-end/81897
22216 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
22219 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
22221 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
22223 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
22226 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
22227 VECTOR_MEM_ALTIVEC_OR_VSX_P.
22228 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
22229 indexed_or_indirect_operand predicate.
22230 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
22231 (*vsx_le_perm_load_v8hi): Likewise.
22232 (*vsx_le_perm_load_v16qi): Likewise.
22233 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
22234 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
22235 (*vsx_le_perm_store_v8hi): Likewise.
22236 (*vsx_le_perm_store_v16qi): Likewise.
22237 (eight unnamed splitters): Likewise.
22239 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
22241 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
22242 * config/rs6000/emmintrin.h: Likewise.
22243 * config/rs6000/mmintrin.h: Likewise.
22244 * config/rs6000/xmmintrin.h: Likewise.
22246 2018-01-10 David Malcolm <dmalcolm@redhat.com>
22249 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
22251 * tree.c (tree_nop_conversion): Return true for location wrapper
22253 (maybe_wrap_with_location): New function.
22254 (selftest::check_strip_nops): New function.
22255 (selftest::test_location_wrappers): New function.
22256 (selftest::tree_c_tests): Call it.
22257 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
22258 (maybe_wrap_with_location): New decl.
22259 (EXPR_LOCATION_WRAPPER_P): New macro.
22260 (location_wrapper_p): New inline function.
22261 (tree_strip_any_location_wrapper): New inline function.
22263 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
22266 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
22267 stack_realign_offset for the largest alignment of stack slot
22269 (ix86_find_max_used_stack_alignment): New function.
22270 (ix86_finalize_stack_frame_flags): Use it. Set
22271 max_used_stack_alignment if we don't realign stack.
22272 * config/i386/i386.h (machine_function): Add
22273 max_used_stack_alignment.
22275 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
22277 * config/arm/arm.opt (-mbranch-cost): New option.
22278 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
22281 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
22284 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
22285 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
22287 2018-01-10 Richard Biener <rguenther@suse.de>
22290 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
22291 early out so it also covers the case where we have a non-NULL
22294 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
22296 PR tree-optimization/83753
22297 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
22298 for non-strided grouped accesses if the number of elements is 1.
22300 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22303 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
22304 * i386.h (TARGET_USE_GATHER): Define.
22305 * x86-tune.def (X86_TUNE_USE_GATHER): New.
22307 2018-01-10 Martin Liska <mliska@suse.cz>
22310 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
22311 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
22313 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
22314 CLEANUP_NO_PARTITIONING is not set.
22316 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
22318 * doc/rtl.texi: Remove documentation of (const ...) wrappers
22319 for vectors, as a partial revert of r254296.
22320 * rtl.h (const_vec_p): Delete.
22321 (const_vec_duplicate_p): Don't test for vector CONSTs.
22322 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
22323 * expmed.c (make_tree): Likewise.
22326 * common.md (E, F): Use CONSTANT_P instead of checking for
22328 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
22329 checking for CONST_VECTOR.
22331 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
22333 PR middle-end/83575
22334 * predict.c (force_edge_cold): Handle in more sane way edges
22335 with no prediction.
22337 2018-01-09 Carl Love <cel@us.ibm.com>
22339 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
22341 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
22342 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
22343 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
22344 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
22345 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
22346 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
22347 * config/rs6000/rs6000-protos.h: Add extern defition for
22348 rs6000_generate_float2_double_code.
22349 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
22351 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
22352 (float2_v2df): Add define_expand.
22354 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
22357 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
22358 op_mode in the force_to_mode call.
22360 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
22362 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
22363 instead of checking each element individually.
22364 (aarch64_evpc_uzp): Likewise.
22365 (aarch64_evpc_zip): Likewise.
22366 (aarch64_evpc_ext): Likewise.
22367 (aarch64_evpc_rev): Likewise.
22368 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
22369 instead of checking each element individually. Return true without
22371 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
22372 whether all selected elements come from the same input, instead of
22373 checking each element individually. Remove calls to gen_rtx_REG,
22374 start_sequence and end_sequence and instead assert that no rtl is
22377 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
22379 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
22380 order of HIGH and CONST checks.
22382 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
22384 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
22385 if the destination isn't an SSA_NAME.
22387 2018-01-09 Richard Biener <rguenther@suse.de>
22389 PR tree-optimization/83668
22390 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
22392 (canonicalize_loop_form): ... here, renamed from ...
22393 (canonicalize_loop_closed_ssa_form): ... this and amended to
22394 swap successor edges for loop exit blocks to make us use
22395 the RPO order we need for initial schedule generation.
22397 2018-01-09 Joseph Myers <joseph@codesourcery.com>
22399 PR tree-optimization/64811
22400 * match.pd: When optimizing comparisons with Inf, avoid
22401 introducing or losing exceptions from comparisons with NaN.
22403 2018-01-09 Martin Liska <mliska@suse.cz>
22406 * asan.c (shadow_mem_size): Add gcc_assert.
22408 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
22410 Don't save registers in main().
22413 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
22414 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
22415 * config/avr/avr.c (avr_set_current_function): Don't error if
22416 naked, OS_task or OS_main are specified at the same time.
22417 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
22419 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
22421 * common/config/avr/avr-common.c (avr_option_optimization_table):
22422 Switch on -mmain-is-OS_task for optimizing compilations.
22424 2018-01-09 Richard Biener <rguenther@suse.de>
22426 PR tree-optimization/83572
22427 * graphite.c: Include cfganal.h.
22428 (graphite_transform_loops): Connect infinite loops to exit
22429 and remove fake edges at the end.
22431 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
22433 * ipa-inline.c (edge_badness): Revert accidental checkin.
22435 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
22438 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
22439 symbols; not inline clones.
22441 2018-01-09 Jakub Jelinek <jakub@redhat.com>
22444 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
22445 hard registers. Formatting fixes.
22447 PR preprocessor/83722
22448 * gcc.c (try_generate_repro): Pass
22449 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
22450 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
22453 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
22454 Kito Cheng <kito.cheng@gmail.com>
22456 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
22457 (riscv_leaf_function_p): Delete.
22458 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
22460 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22462 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
22464 (do_ifelse): New function.
22465 (do_isel): New function.
22466 (do_sub3): New function.
22467 (do_add3): New function.
22468 (do_load_mask_compare): New function.
22469 (do_overlap_load_compare): New function.
22470 (expand_compare_loop): New function.
22471 (expand_block_compare): Call expand_compare_loop() when appropriate.
22472 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
22473 option description.
22474 (-mblock-compare-inline-loop-limit): New option.
22476 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22479 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
22480 Reverse order of second and third operands in first alternative.
22481 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
22482 of first and second elements in UNSPEC_VPERMR vector.
22483 (altivec_expand_vec_perm_le): Likewise.
22485 2018-01-08 Jeff Law <law@redhat.com>
22487 PR rtl-optimizatin/81308
22488 * tree-switch-conversion.c (cfg_altered): New file scoped static.
22489 (process_switch): If group_case_labels makes a change, then set
22491 (pass_convert_switch::execute): If a switch is converted, then
22492 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
22494 PR rtl-optimization/81308
22495 * recog.c (split_all_insns): Conditionally cleanup the CFG after
22498 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
22500 PR target/83663 - Revert r255946
22501 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
22502 generation for cases where splatting a value is not useful.
22503 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
22504 across a vec_duplicate and a paradoxical subreg forming a vector
22505 mode to a vec_concat.
22507 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22509 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
22510 -march=armv8.3-a variants.
22511 * config/arm/t-multilib: Likewise.
22512 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
22514 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22516 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
22518 (cceq_ior_compare_complement): Give it a name so I can use it, and
22519 change boolean_or_operator predicate to boolean_operator so it can
22520 be used to generate a crand.
22521 (eqne): New code iterator.
22522 (bd/bd_neg): New code_attrs.
22523 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
22524 a single define_insn.
22525 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
22526 decrement (bdnzt/bdnzf/bdzt/bdzf).
22527 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
22528 with the new names of the branch decrement patterns, and added the
22529 names of the branch decrement conditional patterns.
22531 2018-01-08 Richard Biener <rguenther@suse.de>
22533 PR tree-optimization/83563
22534 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
22537 2018-01-08 Richard Biener <rguenther@suse.de>
22539 PR middle-end/83713
22540 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
22542 2018-01-08 Richard Biener <rguenther@suse.de>
22544 PR tree-optimization/83685
22545 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
22546 references to abnormals.
22548 2018-01-08 Richard Biener <rguenther@suse.de>
22551 * dwarf2out.c (output_indirect_strings): Handle empty
22552 skeleton_debug_str_hash.
22553 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
22555 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
22557 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
22558 (emit_store_direct): Likewise.
22559 (arc_trampoline_adjust_address): Likewise.
22560 (arc_asm_trampoline_template): New function.
22561 (arc_initialize_trampoline): Use asm_trampoline_template.
22562 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
22563 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
22564 * config/arc/arc.md (flush_icache): Delete pattern.
22566 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
22568 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
22569 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
22572 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
22575 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
22576 by not USED_FOR_TARGET.
22577 (make_pass_resolve_sw_modes): Likewise.
22579 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
22581 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
22584 2018-01-08 Richard Biener <rguenther@suse.de>
22586 PR middle-end/83580
22587 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
22589 2018-01-08 Richard Biener <rguenther@suse.de>
22591 PR middle-end/83517
22592 * match.pd ((t * 2) / 2) -> t): Add missing :c.
22594 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
22596 PR middle-end/81897
22597 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
22598 basic blocks with a small number of successors.
22599 (convert_control_dep_chain_into_preds): Improve handling of
22601 (dump_predicates): Split apart into...
22602 (dump_pred_chain): ...here...
22603 (dump_pred_info): ...and here.
22604 (can_one_predicate_be_invalidated_p): Add debugging printfs.
22605 (can_chain_union_be_invalidated_p): Improve check for invalidation
22607 (uninit_uses_cannot_happen): Avoid unnecessary if
22608 convert_control_dep_chain_into_preds yielded nothing.
22610 2018-01-06 Martin Sebor <msebor@redhat.com>
22612 PR tree-optimization/83640
22613 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
22614 subtracting negative offset from size.
22615 (builtin_access::overlap): Adjust offset bounds of the access to fall
22616 within the size of the object if possible.
22618 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
22620 PR rtl-optimization/83699
22621 * expmed.c (extract_bit_field_1): Restrict the vector usage of
22622 extract_bit_field_as_subreg to cases in which the extracted
22623 value is also a vector.
22625 * lra-constraints.c (process_alt_operands): Test for the equivalence
22626 substitutions when detecting a possible reload cycle.
22628 2018-01-06 Jakub Jelinek <jakub@redhat.com>
22631 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
22632 by default if flag_selective_schedling{,2}. Formatting fixes.
22634 PR rtl-optimization/83682
22635 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
22636 if it has non-VECTOR_MODE element mode.
22637 (vec_duplicate_p): Likewise.
22639 PR middle-end/83694
22640 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
22641 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
22643 2018-01-05 Jakub Jelinek <jakub@redhat.com>
22646 * config/i386/i386-builtin.def
22647 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
22648 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
22649 Require also OPTION_MASK_ISA_AVX512F in addition to
22650 OPTION_MASK_ISA_GFNI.
22651 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
22652 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
22653 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
22654 to OPTION_MASK_ISA_GFNI.
22655 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
22656 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
22657 OPTION_MASK_ISA_AVX512BW.
22658 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
22659 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
22660 addition to OPTION_MASK_ISA_GFNI.
22661 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
22662 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
22663 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
22664 to OPTION_MASK_ISA_GFNI.
22665 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
22666 a requirement for all ISAs rather than any of them with a few
22668 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
22670 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
22671 bitmasks to be enabled with 3 exceptions, instead of requiring any
22672 enabled ISA with lots of exceptions.
22673 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
22674 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
22675 Change avx512bw in isa attribute to avx512f.
22676 * config/i386/sgxintrin.h: Add license boilerplate.
22677 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
22678 to __AVX512F__ and __AVX512VL to __AVX512VL__.
22679 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
22680 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
22682 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
22683 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
22684 temporarily sse2 rather than sse if not enabled already.
22687 * config/i386/sse.md (VI248_VLBW): Rename to ...
22688 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
22689 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
22690 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
22691 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
22692 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
22693 mode iterator instead of VI248_VLBW.
22695 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
22697 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
22698 (record_modified): Skip clobbers; add debug output.
22699 (param_change_prob): Use sreal frequencies.
22701 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
22703 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
22704 punt for user-aligned variables.
22706 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
22708 * tree-chrec.c (chrec_contains_symbols): Return true for
22711 2018-01-05 Sudakshina Das <sudi.das@arm.com>
22714 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
22715 of (x|y) == x for BICS pattern.
22717 2018-01-05 Jakub Jelinek <jakub@redhat.com>
22719 PR tree-optimization/83605
22720 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
22721 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
22724 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
22726 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
22727 * config/epiphany/rtems.h: New file.
22729 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22730 Uros Bizjak <ubizjak@gmail.com>
22733 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
22734 QIreg_operand instead of register_operand predicate.
22735 * config/i386/i386.c (ix86_rop_should_change_byte_p,
22736 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
22737 comments instead of -fmitigate[-_]rop.
22739 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22742 * cgraphunit.c (symbol_table::compile): Switch to text_section
22743 before calling assembly_start debug hook.
22744 * run-rtl-passes.c (run_rtl_passes): Likewise.
22747 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22749 * tree-vrp.c (extract_range_from_binary_expr_1): Check
22750 range_int_cst_p rather than !symbolic_range_p before calling
22751 extract_range_from_multiplicative_op_1.
22753 2018-01-04 Jeff Law <law@redhat.com>
22755 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
22756 redundant test in assertion.
22758 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22760 * doc/rtl.texi: Document machine_mode wrapper classes.
22762 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22764 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
22765 using tree_to_uhwi.
22767 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22769 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
22770 the VEC_PERM_EXPR fold to fail.
22772 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22775 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
22776 to switched_sections.
22778 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22781 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
22782 test for d.testing.
22784 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
22787 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
22788 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
22790 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22793 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
22794 is BLKmode and bitpos not zero or mode change is needed.
22796 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22799 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
22802 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
22805 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
22806 instead of MULT rtx. Update all corresponding splitters.
22807 (*saddl_se): Ditto.
22808 (*ssub<modesuffix>): Ditto.
22809 (*ssubl_se): Ditto.
22810 (*cmp_sadd_di): Update split patterns.
22811 (*cmp_sadd_si): Ditto.
22812 (*cmp_sadd_sidi): Ditto.
22813 (*cmp_ssub_di): Ditto.
22814 (*cmp_ssub_si): Ditto.
22815 (*cmp_ssub_sidi): Ditto.
22816 * config/alpha/predicates.md (const23_operand): New predicate.
22817 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
22818 Look for ASHIFT, not MULT inner operand.
22819 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
22821 2018-01-04 Martin Liska <mliska@suse.cz>
22823 PR gcov-profile/83669
22824 * gcov.c (output_intermediate_file): Add version to intermediate
22826 * doc/gcov.texi: Document new field 'version' in intermediate
22827 file format. Fix location of '-k' option of gcov command.
22829 2018-01-04 Martin Liska <mliska@suse.cz>
22832 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
22834 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22836 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
22838 2018-01-03 Martin Sebor <msebor@redhat.com>
22840 PR tree-optimization/83655
22841 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
22842 checking calls with invalid arguments.
22844 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22846 * tree-vect-stmts.c (vect_get_store_rhs): New function.
22847 (vectorizable_mask_load_store): Delete.
22848 (vectorizable_call): Return false for masked loads and stores.
22849 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
22850 instead of gimple_assign_rhs1.
22851 (vectorizable_load): Handle IFN_MASK_LOAD.
22852 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
22854 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22856 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
22858 (vectorizable_mask_load_store): ...here.
22859 (vectorizable_load): ...and here.
22861 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22863 * tree-vect-stmts.c (vect_build_all_ones_mask)
22864 (vect_build_zero_merge_argument): New functions, split out from...
22865 (vectorizable_load): ...here.
22867 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22869 * tree-vect-stmts.c (vect_check_store_rhs): New function,
22871 (vectorizable_mask_load_store): ...here.
22872 (vectorizable_store): ...and here.
22874 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22876 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
22878 (vectorizable_mask_load_store): ...here.
22880 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22882 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
22883 (vect_model_store_cost): Take a vec_load_store_type instead of a
22885 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
22886 (vect_model_store_cost): Take a vec_load_store_type instead of a
22888 (vectorizable_mask_load_store): Update accordingly.
22889 (vectorizable_store): Likewise.
22890 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
22892 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22894 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
22895 IFN_MASK_LOAD calls here rather than...
22896 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
22898 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22899 Alan Hayward <alan.hayward@arm.com>
22900 David Sherwood <david.sherwood@arm.com>
22902 * expmed.c (extract_bit_field_1): For vector extracts,
22903 fall back to extract_bit_field_as_subreg if vec_extract
22906 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22907 Alan Hayward <alan.hayward@arm.com>
22908 David Sherwood <david.sherwood@arm.com>
22910 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
22911 they are variable or constant sized.
22912 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
22913 slots for constant-sized data.
22915 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22916 Alan Hayward <alan.hayward@arm.com>
22917 David Sherwood <david.sherwood@arm.com>
22919 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
22920 handling COND_EXPRs with boolean comparisons, try to find a better
22921 basis for the mask type than the boolean itself.
22923 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22925 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
22926 is calculated and how it can be overridden.
22927 * genmodes.c (max_bitsize_mode_any_mode): New variable.
22928 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
22930 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
22933 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22934 Alan Hayward <alan.hayward@arm.com>
22935 David Sherwood <david.sherwood@arm.com>
22937 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
22938 Remove the mode argument.
22939 (aarch64_simd_valid_immediate): Remove the mode and inverse
22941 * config/aarch64/iterators.md (bitsize): New iterator.
22942 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
22943 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
22944 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
22945 aarch64_simd_valid_immediate.
22946 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
22947 (aarch64_reg_or_bic_imm): Likewise.
22948 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
22949 with an insn_type enum and msl with a modifier_type enum.
22950 Replace element_width with a scalar_mode. Change the shift
22951 to unsigned int. Add constructors for scalar_float_mode and
22952 scalar_int_mode elements.
22953 (aarch64_vect_float_const_representable_p): Delete.
22954 (aarch64_can_const_movi_rtx_p)
22955 (aarch64_simd_scalar_immediate_valid_for_move)
22956 (aarch64_simd_make_constant): Update call to
22957 aarch64_simd_valid_immediate.
22958 (aarch64_advsimd_valid_immediate_hs): New function.
22959 (aarch64_advsimd_valid_immediate): Likewise.
22960 (aarch64_simd_valid_immediate): Remove mode and inverse
22961 arguments. Rewrite to use the above. Use const_vec_duplicate_p
22962 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
22963 and aarch64_float_const_representable_p on the result.
22964 (aarch64_output_simd_mov_immediate): Remove mode argument.
22965 Update call to aarch64_simd_valid_immediate and use of
22966 simd_immediate_info.
22967 (aarch64_output_scalar_simd_mov_immediate): Update call
22970 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22971 Alan Hayward <alan.hayward@arm.com>
22972 David Sherwood <david.sherwood@arm.com>
22974 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
22975 (mode_nunits): Likewise CONST_MODE_NUNITS.
22976 * machmode.def (ADJUST_NUNITS): Document.
22977 * genmodes.c (mode_data::need_nunits_adj): New field.
22978 (blank_mode): Update accordingly.
22979 (adj_nunits): New variable.
22980 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
22982 (emit_mode_size_inline): Set need_bytesize_adj for all modes
22983 listed in adj_nunits.
22984 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
22985 listed in adj_nunits. Don't emit case statements for such modes.
22986 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
22987 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
22988 nothing if adj_nunits is nonnull.
22989 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
22990 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
22991 (emit_mode_fbit): Update use of print_maybe_const_decl.
22992 (emit_move_size): Likewise. Treat the array as non-const
22994 (emit_mode_adjustments): Handle adj_nunits.
22996 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22998 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
22999 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
23000 (VECTOR_MODES): Use it.
23001 (make_vector_modes): Take the prefix as an argument.
23003 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23004 Alan Hayward <alan.hayward@arm.com>
23005 David Sherwood <david.sherwood@arm.com>
23007 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
23008 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
23009 for MODE_VECTOR_BOOL.
23010 * machmode.def (VECTOR_BOOL_MODE): Document.
23011 * genmodes.c (VECTOR_BOOL_MODE): New macro.
23012 (make_vector_bool_mode): New function.
23013 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
23015 * lto-streamer-in.c (lto_input_mode_table): Likewise.
23016 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
23018 * stor-layout.c (int_mode_for_mode): Likewise.
23019 * tree.c (build_vector_type_for_mode): Likewise.
23020 * varasm.c (output_constant_pool_2): Likewise.
23021 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
23022 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
23023 for MODE_VECTOR_BOOL.
23024 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
23025 of mode class checks.
23026 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
23027 instead of a list of mode class checks.
23028 (expand_vector_scalar_condition): Likewise.
23029 (type_for_widest_vector_mode): Handle BImode as an inner mode.
23031 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23032 Alan Hayward <alan.hayward@arm.com>
23033 David Sherwood <david.sherwood@arm.com>
23035 * machmode.h (mode_size): Change from unsigned short to
23037 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
23038 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
23039 or if measurement_type is not polynomial.
23040 (fixed_size_mode::includes_p): Check for constant-sized modes.
23041 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
23042 return a poly_uint16 rather than an unsigned short.
23043 (emit_mode_size): Change the type of mode_size from unsigned short
23044 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
23045 (emit_mode_adjustments): Cope with polynomial vector sizes.
23046 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23048 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23050 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
23051 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
23052 * caller-save.c (setup_save_areas): Likewise.
23053 (replace_reg_with_saved_mem): Likewise.
23054 * calls.c (emit_library_call_value_1): Likewise.
23055 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
23056 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
23057 (gen_lowpart_for_combine): Likewise.
23058 * convert.c (convert_to_integer_1): Likewise.
23059 * cse.c (equiv_constant, cse_insn): Likewise.
23060 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
23061 (cselib_subst_to_values): Likewise.
23062 * dce.c (word_dce_process_block): Likewise.
23063 * df-problems.c (df_word_lr_mark_ref): Likewise.
23064 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
23065 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
23066 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
23067 (rtl_for_decl_location): Likewise.
23068 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
23069 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
23070 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
23071 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
23072 (expand_expr_real_1): Likewise.
23073 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
23074 (pad_below): Likewise.
23075 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
23076 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
23077 * ira.c (get_subreg_tracking_sizes): Likewise.
23078 * ira-build.c (ira_create_allocno_objects): Likewise.
23079 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
23080 (ira_sort_regnos_for_alter_reg): Likewise.
23081 * ira-costs.c (record_operand_costs): Likewise.
23082 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
23083 (resolve_simple_move): Likewise.
23084 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
23085 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
23086 (lra_constraints): Likewise.
23087 (CONST_POOL_OK_P): Reject variable-sized modes.
23088 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
23089 (add_pseudo_to_slot, lra_spill): Likewise.
23090 * omp-low.c (omp_clause_aligned_alignment): Likewise.
23091 * optabs-query.c (get_best_extraction_insn): Likewise.
23092 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
23093 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
23094 (expand_mult_highpart, valid_multiword_target_p): Likewise.
23095 * recog.c (offsettable_address_addr_space_p): Likewise.
23096 * regcprop.c (maybe_mode_change): Likewise.
23097 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
23098 * regrename.c (build_def_use): Likewise.
23099 * regstat.c (dump_reg_info): Likewise.
23100 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
23101 (find_reloads, find_reloads_subreg_address): Likewise.
23102 * reload1.c (eliminate_regs_1): Likewise.
23103 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
23104 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
23105 (simplify_binary_operation_1, simplify_subreg): Likewise.
23106 * targhooks.c (default_function_arg_padding): Likewise.
23107 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
23108 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
23109 (verify_gimple_assign_ternary): Likewise.
23110 * tree-inline.c (estimate_move_cost): Likewise.
23111 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23112 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
23113 (get_address_cost_ainc): Likewise.
23114 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
23115 (vect_supportable_dr_alignment): Likewise.
23116 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
23117 (vectorizable_reduction): Likewise.
23118 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
23119 (vectorizable_operation, vectorizable_load): Likewise.
23120 * tree.c (build_same_sized_truth_vector_type): Likewise.
23121 * valtrack.c (cleanup_auto_inc_dec): Likewise.
23122 * var-tracking.c (emit_note_insn_var_location): Likewise.
23123 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
23124 (ADDR_VEC_ALIGN): Likewise.
23126 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23127 Alan Hayward <alan.hayward@arm.com>
23128 David Sherwood <david.sherwood@arm.com>
23130 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
23132 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
23133 or if measurement_type is polynomial.
23134 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
23135 * combine.c (make_extraction): Likewise.
23136 * dse.c (find_shift_sequence): Likewise.
23137 * dwarf2out.c (mem_loc_descriptor): Likewise.
23138 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
23139 (extract_bit_field, extract_low_bits): Likewise.
23140 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
23141 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
23142 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
23143 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
23144 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
23145 * reload.c (find_reloads): Likewise.
23146 * reload1.c (alter_reg): Likewise.
23147 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
23148 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
23149 * tree-if-conv.c (predicate_mem_writes): Likewise.
23150 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
23151 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
23152 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
23153 * valtrack.c (dead_debug_insert_temp): Likewise.
23154 * varasm.c (mergeable_constant_section): Likewise.
23155 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
23157 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23158 Alan Hayward <alan.hayward@arm.com>
23159 David Sherwood <david.sherwood@arm.com>
23161 * expr.c (expand_assignment): Cope with polynomial mode sizes
23162 when assigning to a CONCAT.
23164 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23165 Alan Hayward <alan.hayward@arm.com>
23166 David Sherwood <david.sherwood@arm.com>
23168 * machmode.h (mode_precision): Change from unsigned short to
23170 (mode_to_precision): Return a poly_uint16 rather than an unsigned
23172 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
23173 or if measurement_type is not polynomial.
23174 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
23175 in which the mode is already known to be a scalar_int_mode.
23176 * genmodes.c (emit_mode_precision): Change the type of mode_precision
23177 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
23179 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23180 for GET_MODE_PRECISION.
23181 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23182 for GET_MODE_PRECISION.
23183 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
23185 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
23186 (expand_field_assignment, make_extraction): Likewise.
23187 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
23188 (get_last_value): Likewise.
23189 * convert.c (convert_to_integer_1): Likewise.
23190 * cse.c (cse_insn): Likewise.
23191 * expr.c (expand_expr_real_1): Likewise.
23192 * lra-constraints.c (simplify_operand_subreg): Likewise.
23193 * optabs-query.c (can_atomic_load_p): Likewise.
23194 * optabs.c (expand_atomic_load): Likewise.
23195 (expand_atomic_store): Likewise.
23196 * ree.c (combine_reaching_defs): Likewise.
23197 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
23198 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
23199 * tree.h (type_has_mode_precision_p): Likewise.
23200 * ubsan.c (instrument_si_overflow): Likewise.
23202 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23203 Alan Hayward <alan.hayward@arm.com>
23204 David Sherwood <david.sherwood@arm.com>
23206 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
23207 polynomial numbers of units.
23208 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
23209 (valid_vector_subparts_p): New function.
23210 (build_vector_type): Remove temporary shim and take the number
23211 of units as a poly_uint64 rather than an int.
23212 (build_opaque_vector_type): Take the number of units as a
23213 poly_uint64 rather than an int.
23214 * tree.c (build_vector_from_ctor): Handle polynomial
23215 TYPE_VECTOR_SUBPARTS.
23216 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
23217 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
23218 (build_vector_from_val): If the number of units is variable,
23219 use build_vec_duplicate_cst for constant operands and
23220 VEC_DUPLICATE_EXPR otherwise.
23221 (make_vector_type): Remove temporary is_constant ().
23222 (build_vector_type, build_opaque_vector_type): Take the number of
23223 units as a poly_uint64 rather than an int.
23224 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
23226 * cfgexpand.c (expand_debug_expr): Likewise.
23227 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
23228 (store_constructor, expand_expr_real_1): Likewise.
23229 (const_scalar_mask_from_tree): Likewise.
23230 * fold-const-call.c (fold_const_reduction): Likewise.
23231 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
23232 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
23233 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
23234 (fold_relational_const): Likewise.
23235 (native_interpret_vector): Likewise. Change the size from an
23236 int to an unsigned int.
23237 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
23238 TYPE_VECTOR_SUBPARTS.
23239 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
23240 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
23241 duplicating a non-constant operand into a variable-length vector.
23242 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
23243 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
23244 * ipa-icf.c (sem_variable::equals): Likewise.
23245 * match.pd: Likewise.
23246 * omp-simd-clone.c (simd_clone_subparts): Likewise.
23247 * print-tree.c (print_node): Likewise.
23248 * stor-layout.c (layout_type): Likewise.
23249 * targhooks.c (default_builtin_vectorization_cost): Likewise.
23250 * tree-cfg.c (verify_gimple_comparison): Likewise.
23251 (verify_gimple_assign_binary): Likewise.
23252 (verify_gimple_assign_ternary): Likewise.
23253 (verify_gimple_assign_single): Likewise.
23254 * tree-pretty-print.c (dump_generic_node): Likewise.
23255 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23256 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
23257 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
23258 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
23259 (vect_shift_permute_load_chain): Likewise.
23260 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
23261 (expand_vector_condition, optimize_vector_constructor): Likewise.
23262 (lower_vec_perm, get_compute_type): Likewise.
23263 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
23264 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
23265 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
23266 (vect_recog_mask_conversion_pattern): Likewise.
23267 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
23268 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
23269 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23270 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
23271 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
23272 (vectorizable_shift, vectorizable_operation, vectorizable_store)
23273 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
23274 (supportable_widening_operation): Likewise.
23275 (supportable_narrowing_operation): Likewise.
23276 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
23278 * varasm.c (output_constant): Likewise.
23280 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23281 Alan Hayward <alan.hayward@arm.com>
23282 David Sherwood <david.sherwood@arm.com>
23284 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
23285 so that both the length == 3 and length != 3 cases set up their
23286 own permute vectors. Add comments explaining why we know the
23287 number of elements is constant.
23288 (vect_permute_load_chain): Likewise.
23290 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23291 Alan Hayward <alan.hayward@arm.com>
23292 David Sherwood <david.sherwood@arm.com>
23294 * machmode.h (mode_nunits): Change from unsigned char to
23296 (ONLY_FIXED_SIZE_MODES): New macro.
23297 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
23298 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
23299 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
23301 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
23302 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
23303 or if measurement_type is not polynomial.
23304 * genmodes.c (ZERO_COEFFS): New macro.
23305 (emit_mode_nunits_inline): Make mode_nunits_inline return a
23307 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
23308 Use ZERO_COEFFS when emitting initializers.
23309 * data-streamer.h (bp_pack_poly_value): New function.
23310 (bp_unpack_poly_value): Likewise.
23311 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23312 for GET_MODE_NUNITS.
23313 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23314 for GET_MODE_NUNITS.
23315 * tree.c (make_vector_type): Remove temporary shim and make
23316 the real function take the number of units as a poly_uint64
23317 rather than an int.
23318 (build_vector_type_for_mode): Handle polynomial nunits.
23319 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
23320 * emit-rtl.c (const_vec_series_p_1): Likewise.
23321 (gen_rtx_CONST_VECTOR): Likewise.
23322 * fold-const.c (test_vec_duplicate_folding): Likewise.
23323 * genrecog.c (validate_pattern): Likewise.
23324 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
23325 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
23326 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
23327 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
23328 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
23329 * rtlanal.c (subreg_get_info): Likewise.
23330 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23331 (vect_grouped_load_supported): Likewise.
23332 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
23333 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
23334 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
23335 (simplify_const_unary_operation, simplify_binary_operation_1)
23336 (simplify_const_binary_operation, simplify_ternary_operation)
23337 (test_vector_ops_duplicate, test_vector_ops): Likewise.
23338 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
23339 instead of CONST_VECTOR_NUNITS.
23340 * varasm.c (output_constant_pool_2): Likewise.
23341 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
23342 explicit-encoded elements in the XVEC for variable-length vectors.
23344 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23346 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
23348 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23349 Alan Hayward <alan.hayward@arm.com>
23350 David Sherwood <david.sherwood@arm.com>
23352 * coretypes.h (fixed_size_mode): Declare.
23353 (fixed_size_mode_pod): New typedef.
23354 * builtins.h (target_builtins::x_apply_args_mode)
23355 (target_builtins::x_apply_result_mode): Change type to
23356 fixed_size_mode_pod.
23357 * builtins.c (apply_args_size, apply_result_size, result_vector)
23358 (expand_builtin_apply_args_1, expand_builtin_apply)
23359 (expand_builtin_return): Update accordingly.
23361 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23363 * cse.c (hash_rtx_cb): Hash only the encoded elements.
23364 * cselib.c (cselib_hash_rtx): Likewise.
23365 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
23366 CONST_VECTOR encoding.
23368 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23369 Jeff Law <law@redhat.com>
23372 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
23373 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
23374 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
23375 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
23378 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
23379 explicitly probe *sp in a noreturn function if there were any callee
23380 register saves or frame pointer is needed.
23382 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23385 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
23386 BLKmode for ternary, binary or unary expressions.
23389 * var-tracking.c (delete_vta_debug_insn): New inline function.
23390 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
23391 insns from get_insns () to NULL instead of each bb separately.
23392 Use delete_vta_debug_insn. No longer static.
23393 (vt_debug_insns_local, variable_tracking_main_1): Adjust
23394 delete_vta_debug_insns callers.
23395 * rtl.h (delete_vta_debug_insns): Declare.
23396 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
23397 instead of variable_tracking_main.
23399 2018-01-03 Martin Sebor <msebor@redhat.com>
23401 PR tree-optimization/83603
23402 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
23403 arguments past the endof the argument list in functions declared
23404 without a prototype.
23405 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
23406 Avoid checking when arguments are null.
23408 2018-01-03 Martin Sebor <msebor@redhat.com>
23411 * doc/extend.texi (attribute const): Fix a typo.
23412 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
23413 issuing -Wsuggest-attribute for void functions.
23415 2018-01-03 Martin Sebor <msebor@redhat.com>
23417 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
23418 offset_int::from instead of wide_int::to_shwi.
23419 (maybe_diag_overlap): Remove assertion.
23420 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
23421 * gimple-ssa-sprintf.c (format_directive): Same.
23422 (parse_directive): Same.
23423 (sprintf_dom_walker::compute_format_length): Same.
23424 (try_substitute_return_value): Same.
23426 2018-01-03 Jeff Law <law@redhat.com>
23428 PR middle-end/83654
23429 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
23430 non-constant residual for zero at runtime and avoid probing in
23431 that case. Reorganize code for trailing problem to mirror handling
23434 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23436 PR tree-optimization/83501
23437 * tree-ssa-strlen.c (get_string_cst): New.
23438 (handle_char_store): Call get_string_cst.
23440 2018-01-03 Martin Liska <mliska@suse.cz>
23442 PR tree-optimization/83593
23443 * tree-ssa-strlen.c: Include tree-cfg.h.
23444 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
23445 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
23446 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
23448 (strlen_dom_walker::before_dom_children): Call
23449 gimple_purge_dead_eh_edges. Dump tranformation with details
23451 (strlen_dom_walker::before_dom_children): Update call by adding
23452 new argument cleanup_eh.
23453 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
23455 2018-01-03 Martin Liska <mliska@suse.cz>
23458 * cif-code.def (VARIADIC_THUNK): New enum value.
23459 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
23462 2018-01-03 Jan Beulich <jbeulich@suse.com>
23464 * sse.md (mov<mode>_internal): Tighten condition for when to use
23465 vmovdqu<ssescalarsize> for TI and OI modes.
23467 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23469 Update copyright years.
23471 2018-01-03 Martin Liska <mliska@suse.cz>
23474 * ipa-visibility.c (function_and_variable_visibility): Skip
23475 functions with noipa attribure.
23477 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23479 * gcc.c (process_command): Update copyright notice dates.
23480 * gcov-dump.c (print_version): Ditto.
23481 * gcov.c (print_version): Ditto.
23482 * gcov-tool.c (print_version): Ditto.
23483 * gengtype.c (create_file): Ditto.
23484 * doc/cpp.texi: Bump @copying's copyright year.
23485 * doc/cppinternals.texi: Ditto.
23486 * doc/gcc.texi: Ditto.
23487 * doc/gccint.texi: Ditto.
23488 * doc/gcov.texi: Ditto.
23489 * doc/install.texi: Ditto.
23490 * doc/invoke.texi: Ditto.
23492 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23494 * vector-builder.h (vector_builder::m_full_nelts): Change from
23495 unsigned int to poly_uint64.
23496 (vector_builder::full_nelts): Update prototype accordingly.
23497 (vector_builder::new_vector): Likewise.
23498 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
23499 (vector_builder::operator ==): Likewise.
23500 (vector_builder::finalize): Likewise.
23501 * int-vector-builder.h (int_vector_builder::int_vector_builder):
23502 Take the number of elements as a poly_uint64 rather than an
23504 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
23505 from unsigned int to poly_uint64.
23506 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
23507 (vec_perm_indices::new_vector): Likewise.
23508 (vec_perm_indices::length): Likewise.
23509 (vec_perm_indices::nelts_per_input): Likewise.
23510 (vec_perm_indices::input_nelts): Likewise.
23511 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
23512 number of elements per input as a poly_uint64 rather than an
23513 unsigned int. Use the original encoding for variable-length
23514 vectors, rather than clamping each individual element.
23515 For the second and subsequent elements in each pattern,
23516 clamp the step and base before clamping their sum.
23517 (vec_perm_indices::series_p): Handle polynomial element counts.
23518 (vec_perm_indices::all_in_range_p): Likewise.
23519 (vec_perm_indices_to_tree): Likewise.
23520 (vec_perm_indices_to_rtx): Likewise.
23521 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
23522 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
23523 (tree_vector_builder::new_binary_operation): Handle polynomial
23524 element counts. Return false if we need to know the number
23525 of elements at compile time.
23526 * fold-const.c (fold_vec_perm): Punt if the number of elements
23527 isn't known at compile time.
23529 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23531 * vec-perm-indices.h (vec_perm_builder): Change element type
23532 from HOST_WIDE_INT to poly_int64.
23533 (vec_perm_indices::element_type): Update accordingly.
23534 (vec_perm_indices::clamp): Handle polynomial element_types.
23535 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
23536 (vec_perm_indices::all_in_range_p): Likewise.
23537 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
23539 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
23540 polynomial vec_perm_indices element types.
23541 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
23542 * fold-const.c (fold_vec_perm): Likewise.
23543 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
23544 * tree-vect-generic.c (lower_vec_perm): Likewise.
23545 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
23546 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
23547 element type to HOST_WIDE_INT.
23549 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23550 Alan Hayward <alan.hayward@arm.com>
23551 David Sherwood <david.sherwood@arm.com>
23553 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
23554 rather than an int. Use plus_constant.
23555 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
23556 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
23558 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23559 Alan Hayward <alan.hayward@arm.com>
23560 David Sherwood <david.sherwood@arm.com>
23562 * calls.c (emit_call_1, expand_call): Change struct_value_size from
23563 a HOST_WIDE_INT to a poly_int64.
23565 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23566 Alan Hayward <alan.hayward@arm.com>
23567 David Sherwood <david.sherwood@arm.com>
23569 * calls.c (load_register_parameters): Cope with polynomial
23570 mode sizes. Require a constant size for BLKmode parameters
23571 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
23572 forces a parameter to be padded at the lsb end in order to
23573 fill a complete number of words, require the parameter size
23574 to be ordered wrt UNITS_PER_WORD.
23576 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23577 Alan Hayward <alan.hayward@arm.com>
23578 David Sherwood <david.sherwood@arm.com>
23580 * reload1.c (spill_stack_slot_width): Change element type
23581 from unsigned int to poly_uint64_pod.
23582 (alter_reg): Treat mode sizes as polynomial.
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 * reload.c (complex_word_subreg_p): New function.
23589 (reload_inner_reg_of_subreg, push_reload): Use it.
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 * lra-constraints.c (process_alt_operands): Reject matched
23596 operands whose sizes aren't ordered.
23597 (match_reload): Refer to this check here.
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 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
23604 that the mode size is in the set {1, 2, 4, 8, 16}.
23606 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23607 Alan Hayward <alan.hayward@arm.com>
23608 David Sherwood <david.sherwood@arm.com>
23610 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
23611 Use plus_constant instead of gen_rtx_PLUS.
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 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
23618 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
23619 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
23620 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
23621 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
23622 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
23623 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
23624 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
23625 * config/i386/i386.c (ix86_push_rounding): ...this new function.
23626 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
23628 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
23629 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
23630 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
23631 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
23632 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
23633 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
23634 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
23635 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
23636 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
23637 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
23639 * expr.c (emit_move_resolve_push): Treat the input and result
23640 of PUSH_ROUNDING as a poly_int64.
23641 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
23642 (emit_push_insn): Likewise.
23643 * lra-eliminations.c (mark_not_eliminable): Likewise.
23644 * recog.c (push_operand): Likewise.
23645 * reload1.c (elimination_effects): Likewise.
23646 * rtlanal.c (nonzero_bits1): Likewise.
23647 * calls.c (store_one_arg): Likewise. Require the padding to be
23648 known at compile time.
23650 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23651 Alan Hayward <alan.hayward@arm.com>
23652 David Sherwood <david.sherwood@arm.com>
23654 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
23655 Use plus_constant instead of gen_rtx_PLUS.
23657 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23658 Alan Hayward <alan.hayward@arm.com>
23659 David Sherwood <david.sherwood@arm.com>
23661 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
23662 rather than an int.
23664 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23665 Alan Hayward <alan.hayward@arm.com>
23666 David Sherwood <david.sherwood@arm.com>
23668 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
23669 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
23670 via stack temporaries. Treat the mode size as polynomial too.
23672 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23673 Alan Hayward <alan.hayward@arm.com>
23674 David Sherwood <david.sherwood@arm.com>
23676 * expr.c (expand_expr_real_2): When handling conversions involving
23677 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
23678 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
23679 as a poly_uint64 too.
23681 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23682 Alan Hayward <alan.hayward@arm.com>
23683 David Sherwood <david.sherwood@arm.com>
23685 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
23687 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23688 Alan Hayward <alan.hayward@arm.com>
23689 David Sherwood <david.sherwood@arm.com>
23691 * combine.c (can_change_dest_mode): Handle polynomial
23692 REGMODE_NATURAL_SIZE.
23693 * expmed.c (store_bit_field_1): Likewise.
23694 * expr.c (store_constructor): Likewise.
23695 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
23696 and polynomial REGMODE_NATURAL_SIZE.
23697 (gen_lowpart_common): Likewise.
23698 * reginfo.c (record_subregs_of_mode): Likewise.
23699 * rtlanal.c (read_modify_subreg_p): Likewise.
23701 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23702 Alan Hayward <alan.hayward@arm.com>
23703 David Sherwood <david.sherwood@arm.com>
23705 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
23706 numbers of elements.
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 * match.pd: Cope with polynomial numbers of vector elements.
23714 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23715 Alan Hayward <alan.hayward@arm.com>
23716 David Sherwood <david.sherwood@arm.com>
23718 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
23719 in a POINTER_PLUS_EXPR.
23721 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23722 Alan Hayward <alan.hayward@arm.com>
23723 David Sherwood <david.sherwood@arm.com>
23725 * omp-simd-clone.c (simd_clone_subparts): New function.
23726 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
23727 (ipa_simd_modify_function_body): Likewise.
23729 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23730 Alan Hayward <alan.hayward@arm.com>
23731 David Sherwood <david.sherwood@arm.com>
23733 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
23734 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
23735 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
23736 (expand_vector_condition, vector_element): Likewise.
23737 (subparts_gt): New function.
23738 (get_compute_type): Use subparts_gt.
23739 (count_type_subparts): Delete.
23740 (expand_vector_operations_1): Use subparts_gt instead of
23741 count_type_subparts.
23743 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23744 Alan Hayward <alan.hayward@arm.com>
23745 David Sherwood <david.sherwood@arm.com>
23747 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
23748 (vect_compile_time_alias): ...this new function. Do the calculation
23749 on poly_ints rather than trees.
23750 (vect_prune_runtime_alias_test_list): Update call accordingly.
23752 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23753 Alan Hayward <alan.hayward@arm.com>
23754 David Sherwood <david.sherwood@arm.com>
23756 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
23758 (vect_schedule_slp_instance): Likewise.
23760 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23761 Alan Hayward <alan.hayward@arm.com>
23762 David Sherwood <david.sherwood@arm.com>
23764 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
23765 constant and extern definitions for variable-length vectors.
23766 (vect_get_constant_vectors): Note that the number of units
23767 is known to be constant.
23769 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23770 Alan Hayward <alan.hayward@arm.com>
23771 David Sherwood <david.sherwood@arm.com>
23773 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
23774 of units as polynomial. Choose between WIDE and NARROW based
23777 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23778 Alan Hayward <alan.hayward@arm.com>
23779 David Sherwood <david.sherwood@arm.com>
23781 * tree-vect-stmts.c (simd_clone_subparts): New function.
23782 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
23784 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23785 Alan Hayward <alan.hayward@arm.com>
23786 David Sherwood <david.sherwood@arm.com>
23788 * tree-vect-stmts.c (vectorizable_call): Treat the number of
23789 vectors as polynomial. Use build_index_vector for
23790 IFN_GOMP_SIMD_LANE.
23792 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23793 Alan Hayward <alan.hayward@arm.com>
23794 David Sherwood <david.sherwood@arm.com>
23796 * tree-vect-stmts.c (get_load_store_type): Treat the number of
23797 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
23798 for variable-length vectors.
23799 (vectorizable_mask_load_store): Treat the number of units as
23800 polynomial, asserting that it is constant if the condition has
23801 already been enforced.
23802 (vectorizable_store, vectorizable_load): Likewise.
23804 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23805 Alan Hayward <alan.hayward@arm.com>
23806 David Sherwood <david.sherwood@arm.com>
23808 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
23809 of units as polynomial. Punt if we can't tell at compile time
23810 which vector contains the final result.
23812 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23813 Alan Hayward <alan.hayward@arm.com>
23814 David Sherwood <david.sherwood@arm.com>
23816 * tree-vect-loop.c (vectorizable_induction): Treat the number
23817 of units as polynomial. Punt on SLP inductions. Use an integer
23818 VEC_SERIES_EXPR for variable-length integer reductions. Use a
23819 cast of such a series for variable-length floating-point
23822 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23823 Alan Hayward <alan.hayward@arm.com>
23824 David Sherwood <david.sherwood@arm.com>
23826 * tree.h (build_index_vector): Declare.
23827 * tree.c (build_index_vector): New function.
23828 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
23829 of units as polynomial, forcibly converting it to a constant if
23830 vectorizable_reduction has already enforced the condition.
23831 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
23832 to create a {1,2,3,...} vector.
23833 (vectorizable_reduction): Treat the number of units as polynomial.
23834 Choose vectype_in based on the largest scalar element size rather
23835 than the smallest number of units. Enforce the restrictions
23838 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23839 Alan Hayward <alan.hayward@arm.com>
23840 David Sherwood <david.sherwood@arm.com>
23842 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
23843 number of units as polynomial.
23845 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23846 Alan Hayward <alan.hayward@arm.com>
23847 David Sherwood <david.sherwood@arm.com>
23849 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
23850 * target.def (autovectorize_vector_sizes): Return the vector sizes
23851 by pointer, using vector_sizes rather than a bitmask.
23852 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
23853 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
23854 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
23856 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
23857 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
23858 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
23859 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
23860 * omp-general.c (omp_max_vf): Likewise.
23861 * omp-low.c (omp_clause_aligned_alignment): Likewise.
23862 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
23863 * tree-vect-loop.c (vect_analyze_loop): Likewise.
23864 * tree-vect-slp.c (vect_slp_bb): Likewise.
23865 * doc/tm.texi: Regenerate.
23866 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
23868 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
23869 the vector size as a poly_uint64 rather than an unsigned int.
23870 (current_vector_size): Change from an unsigned int to a poly_uint64.
23871 (get_vectype_for_scalar_type): Update accordingly.
23872 * tree.h (build_truth_vector_type): Take the size and number of
23873 units as a poly_uint64 rather than an unsigned int.
23874 (build_vector_type): Add a temporary overload that takes
23875 the number of units as a poly_uint64 rather than an unsigned int.
23876 * tree.c (make_vector_type): Likewise.
23877 (build_truth_vector_type): Take the number of units as a poly_uint64
23878 rather than an unsigned int.
23880 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23881 Alan Hayward <alan.hayward@arm.com>
23882 David Sherwood <david.sherwood@arm.com>
23884 * target.def (get_mask_mode): Take the number of units and length
23885 as poly_uint64s rather than unsigned ints.
23886 * targhooks.h (default_get_mask_mode): Update accordingly.
23887 * targhooks.c (default_get_mask_mode): Likewise.
23888 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
23889 * doc/tm.texi: Regenerate.
23891 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23892 Alan Hayward <alan.hayward@arm.com>
23893 David Sherwood <david.sherwood@arm.com>
23895 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
23896 * omp-general.c (omp_max_vf): Likewise.
23897 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
23898 (expand_omp_simd): Handle polynomial safelen.
23899 * omp-low.c (omplow_simd_context): Add a default constructor.
23900 (omplow_simd_context::max_vf): Change from int to poly_uint64.
23901 (lower_rec_simd_input_clauses): Update accordingly.
23902 (lower_rec_input_clauses): Likewise.
23904 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23905 Alan Hayward <alan.hayward@arm.com>
23906 David Sherwood <david.sherwood@arm.com>
23908 * tree-vectorizer.h (vect_nunits_for_cost): New function.
23909 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
23910 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
23911 (vect_analyze_slp_cost): Likewise.
23912 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
23913 (vect_model_load_cost): Likewise.
23915 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23916 Alan Hayward <alan.hayward@arm.com>
23917 David Sherwood <david.sherwood@arm.com>
23919 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
23920 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
23921 from an unsigned int * to a poly_uint64_pod *.
23922 (calculate_unrolling_factor): New function.
23923 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
23925 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23926 Alan Hayward <alan.hayward@arm.com>
23927 David Sherwood <david.sherwood@arm.com>
23929 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
23930 from an unsigned int to a poly_uint64.
23931 (_loop_vec_info::slp_unrolling_factor): Likewise.
23932 (_loop_vec_info::vectorization_factor): Change from an int
23934 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
23935 (vect_get_num_vectors): New function.
23936 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
23937 (vect_get_num_copies): Use vect_get_num_vectors.
23938 (vect_analyze_data_ref_dependences): Change max_vf from an int *
23939 to an unsigned int *.
23940 (vect_analyze_data_refs): Change min_vf from an int * to a
23942 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
23943 than an unsigned HOST_WIDE_INT.
23944 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
23945 (vect_analyze_data_ref_dependence): Change max_vf from an int *
23946 to an unsigned int *.
23947 (vect_analyze_data_ref_dependences): Likewise.
23948 (vect_compute_data_ref_alignment): Handle polynomial vf.
23949 (vect_enhance_data_refs_alignment): Likewise.
23950 (vect_prune_runtime_alias_test_list): Likewise.
23951 (vect_shift_permute_load_chain): Likewise.
23952 (vect_supportable_dr_alignment): Likewise.
23953 (dependence_distance_ge_vf): Take the vectorization factor as a
23954 poly_uint64 rather than an unsigned HOST_WIDE_INT.
23955 (vect_analyze_data_refs): Change min_vf from an int * to a
23957 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
23958 vfm1 as a poly_uint64 rather than an int. Make the same change
23959 for the returned bound_scalar.
23960 (vect_gen_vector_loop_niters): Handle polynomial vf.
23961 (vect_do_peeling): Likewise. Update call to
23962 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
23963 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
23965 * tree-vect-loop.c (vect_determine_vectorization_factor)
23966 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
23967 (vect_get_known_peeling_cost): Likewise.
23968 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
23969 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
23970 (vect_transform_loop): Likewise. Use the lowest possible VF when
23971 updating the upper bounds of the loop.
23972 (vect_min_worthwhile_factor): Make static. Return an unsigned int
23973 rather than an int.
23974 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
23975 polynomial unroll factors.
23976 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
23977 (vect_make_slp_decision): Likewise.
23978 (vect_supported_load_permutation_p): Likewise, and polynomial
23980 (vect_analyze_slp_cost): Handle polynomial vf.
23981 (vect_slp_analyze_node_operations): Likewise.
23982 (vect_slp_analyze_bb_1): Likewise.
23983 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
23984 than an unsigned HOST_WIDE_INT.
23985 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
23986 (vectorizable_load): Handle polynomial vf.
23987 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
23989 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
23991 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23992 Alan Hayward <alan.hayward@arm.com>
23993 David Sherwood <david.sherwood@arm.com>
23995 * match.pd: Handle bit operations involving three constants
23996 and try to fold one pair.
23998 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24000 * tree-vect-loop-manip.c: Include gimple-fold.h.
24001 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
24002 niters_maybe_zero parameters. Handle other cases besides a step of 1.
24003 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
24004 Add a path that uses a step of VF instead of 1, but disable it
24006 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
24007 and niters_no_overflow parameters. Update calls to
24008 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
24009 Create a new SSA name if the latter choses to use a ste other
24010 than zero, and return it via niters_vector_mult_vf_var.
24011 * tree-vect-loop.c (vect_transform_loop): Update calls to
24012 vect_do_peeling, vect_gen_vector_loop_niters and
24013 slpeel_make_loop_iterate_ntimes.
24014 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
24015 (vect_gen_vector_loop_niters): Update declarations after above changes.
24017 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
24019 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
24020 128-bit round to integer instructions.
24021 (ceil<mode>2): Likewise.
24022 (btrunc<mode>2): Likewise.
24023 (round<mode>2): Likewise.
24025 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24027 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
24028 unaligned VSX load/store on P8/P9.
24029 (expand_block_clear): Allow the use of unaligned VSX
24030 load/store on P8/P9.
24032 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24034 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
24036 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
24037 swap associated with both a load and a store.
24039 2018-01-02 Andrew Waterman <andrew@sifive.com>
24041 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
24042 * config/riscv/riscv.md (clear_cache): Use it.
24044 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
24046 * web.c: Remove out-of-date comment.
24048 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24050 * expr.c (fixup_args_size_notes): Check that any existing
24051 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
24052 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
24053 (emit_single_push_insn): ...here.
24055 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24057 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
24058 (const_vector_encoded_nelts): New function.
24059 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
24060 (const_vector_int_elt, const_vector_elt): Declare.
24061 * emit-rtl.c (const_vector_int_elt_1): New function.
24062 (const_vector_elt): Likewise.
24063 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
24064 of CONST_VECTOR_ELT.
24066 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24068 * expr.c: Include rtx-vector-builder.h.
24069 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
24070 directly on the tree encoding.
24071 (const_vector_from_tree): Likewise.
24072 * optabs.c: Include rtx-vector-builder.h.
24073 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
24074 sequence of "u" values.
24075 * vec-perm-indices.c: Include rtx-vector-builder.h.
24076 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
24077 directly on the vec_perm_indices encoding.
24079 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24081 * doc/rtl.texi (const_vector): Describe new encoding scheme.
24082 * Makefile.in (OBJS): Add rtx-vector-builder.o.
24083 * rtx-vector-builder.h: New file.
24084 * rtx-vector-builder.c: Likewise.
24085 * rtl.h (rtx_def::u2): Add a const_vector field.
24086 (CONST_VECTOR_NPATTERNS): New macro.
24087 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
24088 (CONST_VECTOR_DUPLICATE_P): Likewise.
24089 (CONST_VECTOR_STEPPED_P): Likewise.
24090 (CONST_VECTOR_ENCODED_ELT): Likewise.
24091 (const_vec_duplicate_p): Check for a duplicated vector encoding.
24092 (unwrap_const_vec_duplicate): Likewise.
24093 (const_vec_series_p): Check for a non-duplicated vector encoding.
24094 Say that the function only returns true for integer vectors.
24095 * emit-rtl.c: Include rtx-vector-builder.h.
24096 (gen_const_vec_duplicate_1): Delete.
24097 (gen_const_vector): Call gen_const_vec_duplicate instead of
24098 gen_const_vec_duplicate_1.
24099 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
24100 (gen_const_vec_duplicate): Use rtx_vector_builder.
24101 (gen_const_vec_series): Likewise.
24102 (gen_rtx_CONST_VECTOR): Likewise.
24103 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
24104 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
24105 Build a new vector rather than modifying a CONST_VECTOR in-place.
24106 (handle_special_swappables): Update call accordingly.
24107 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
24108 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
24109 Build a new vector rather than modifying a CONST_VECTOR in-place.
24110 (handle_special_swappables): Update call accordingly.
24112 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24114 * simplify-rtx.c (simplify_const_binary_operation): Use
24115 CONST_VECTOR_ELT instead of XVECEXP.
24117 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24119 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
24120 the selector elements to be different from the data elements
24121 if the selector is a VECTOR_CST.
24122 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
24123 ssizetype for the selector.
24125 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24127 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
24128 before testing each element individually.
24129 * tree-vect-generic.c (lower_vec_perm): Likewise.
24131 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24133 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
24134 * selftest-run-tests.c (selftest::run_tests): Call it.
24135 * vector-builder.h (vector_builder::operator ==): New function.
24136 (vector_builder::operator !=): Likewise.
24137 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
24138 (vec_perm_indices::all_from_input_p): New function.
24139 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24140 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
24141 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
24142 instead of reading the VECTOR_CST directly. Detect whether both
24143 vector inputs are the same before constructing the vec_perm_indices,
24144 and update the number of inputs argument accordingly. Use the
24145 utility functions added above. Only construct sel2 if we need to.
24147 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24149 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
24150 the broadcast of the low byte.
24151 (expand_mult_highpart): Use an explicit encoding for the permutes.
24152 * optabs-query.c (can_mult_highpart_p): Likewise.
24153 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
24154 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24155 (vectorizable_bswap): Likewise.
24156 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
24157 explicit encoding for the power-of-2 permutes.
24158 (vect_permute_store_chain): Likewise.
24159 (vect_grouped_load_supported): Likewise.
24160 (vect_permute_load_chain): Likewise.
24162 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24164 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
24165 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
24166 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
24167 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24168 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
24169 (vect_gen_perm_mask_any): Likewise.
24171 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24173 * int-vector-builder.h: New file.
24174 * vec-perm-indices.h: Include int-vector-builder.h.
24175 (vec_perm_indices): Redefine as an int_vector_builder.
24176 (auto_vec_perm_indices): Delete.
24177 (vec_perm_builder): Redefine as a stand-alone class.
24178 (vec_perm_indices::vec_perm_indices): New function.
24179 (vec_perm_indices::clamp): Likewise.
24180 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
24181 (vec_perm_indices::new_vector): New function.
24182 (vec_perm_indices::new_expanded_vector): Update for new
24183 vec_perm_indices class.
24184 (vec_perm_indices::rotate_inputs): New function.
24185 (vec_perm_indices::all_in_range_p): Operate directly on the
24186 encoded form, without computing elided elements.
24187 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
24188 encoding. Update for new vec_perm_indices class.
24189 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
24190 the given vec_perm_builder.
24191 (expand_vec_perm_var): Update vec_perm_builder constructor.
24192 (expand_mult_highpart): Use vec_perm_builder instead of
24193 auto_vec_perm_indices.
24194 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
24195 vec_perm_indices instead of auto_vec_perm_indices. Use a single
24196 or double series encoding as appropriate.
24197 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
24198 vec_perm_indices instead of auto_vec_perm_indices.
24199 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24200 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24201 (vect_permute_store_chain): Likewise.
24202 (vect_grouped_load_supported): Likewise.
24203 (vect_permute_load_chain): Likewise.
24204 (vect_shift_permute_load_chain): Likewise.
24205 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
24206 (vect_transform_slp_perm_load): Likewise.
24207 (vect_schedule_slp_instance): Likewise.
24208 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24209 (vectorizable_mask_load_store): Likewise.
24210 (vectorizable_bswap): Likewise.
24211 (vectorizable_store): Likewise.
24212 (vectorizable_load): Likewise.
24213 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
24214 vec_perm_indices instead of auto_vec_perm_indices. Use
24215 tree_to_vec_perm_builder to read the vector from a tree.
24216 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
24217 vec_perm_builder instead of a vec_perm_indices.
24218 (have_whole_vector_shift): Use vec_perm_builder and
24219 vec_perm_indices instead of auto_vec_perm_indices. Leave the
24220 truncation to calc_vec_perm_mask_for_shift.
24221 (vect_create_epilog_for_reduction): Likewise.
24222 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
24223 from auto_vec_perm_indices to vec_perm_indices.
24224 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
24225 instead of changing individual elements.
24226 (aarch64_vectorize_vec_perm_const): Use new_vector to install
24227 the vector in d.perm.
24228 * config/arm/arm.c (expand_vec_perm_d::perm): Change
24229 from auto_vec_perm_indices to vec_perm_indices.
24230 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
24231 instead of changing individual elements.
24232 (arm_vectorize_vec_perm_const): Use new_vector to install
24233 the vector in d.perm.
24234 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
24235 Update vec_perm_builder constructor.
24236 (rs6000_expand_interleave): Likewise.
24237 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
24238 (rs6000_expand_interleave): Likewise.
24240 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24242 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
24243 to qimode could truncate the indices.
24244 * optabs.c (expand_vec_perm_var): Likewise.
24246 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24248 * Makefile.in (OBJS): Add vec-perm-indices.o.
24249 * vec-perm-indices.h: New file.
24250 * vec-perm-indices.c: Likewise.
24251 * target.h (vec_perm_indices): Replace with a forward class
24253 (auto_vec_perm_indices): Move to vec-perm-indices.h.
24254 * optabs.h: Include vec-perm-indices.h.
24255 (expand_vec_perm): Delete.
24256 (selector_fits_mode_p, expand_vec_perm_var): Declare.
24257 (expand_vec_perm_const): Declare.
24258 * target.def (vec_perm_const_ok): Replace with...
24259 (vec_perm_const): ...this new hook.
24260 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
24261 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
24262 * doc/tm.texi: Regenerate.
24263 * optabs.def (vec_perm_const): Delete.
24264 * doc/md.texi (vec_perm_const): Likewise.
24265 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
24266 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
24267 expand_vec_perm for constant permutation vectors. Assert that
24268 the mode of variable permutation vectors is the integer equivalent
24269 of the mode that is being permuted.
24270 * optabs-query.h (selector_fits_mode_p): Declare.
24271 * optabs-query.c: Include vec-perm-indices.h.
24272 (selector_fits_mode_p): New function.
24273 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
24274 is defined, instead of checking whether the vec_perm_const_optab
24275 exists. Use targetm.vectorize.vec_perm_const instead of
24276 targetm.vectorize.vec_perm_const_ok. Check whether the indices
24277 fit in the vector mode before using a variable permute.
24278 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
24279 vec_perm_indices instead of an rtx.
24280 (expand_vec_perm): Replace with...
24281 (expand_vec_perm_const): ...this new function. Take the selector
24282 as a vec_perm_indices rather than an rtx. Also take the mode of
24283 the selector. Update call to shift_amt_for_vec_perm_mask.
24284 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
24285 Use vec_perm_indices::new_expanded_vector to expand the original
24286 selector into bytes. Check whether the indices fit in the vector
24287 mode before using a variable permute.
24288 (expand_vec_perm_var): Make global.
24289 (expand_mult_highpart): Use expand_vec_perm_const.
24290 * fold-const.c: Includes vec-perm-indices.h.
24291 * tree-ssa-forwprop.c: Likewise.
24292 * tree-vect-data-refs.c: Likewise.
24293 * tree-vect-generic.c: Likewise.
24294 * tree-vect-loop.c: Likewise.
24295 * tree-vect-slp.c: Likewise.
24296 * tree-vect-stmts.c: Likewise.
24297 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
24299 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
24300 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
24301 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
24302 (aarch64_vectorize_vec_perm_const): ...this new function.
24303 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24304 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24305 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
24306 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
24307 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24308 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24309 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
24311 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
24312 check for NEON modes.
24313 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
24314 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
24315 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
24316 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
24318 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
24319 the old VEC_PERM_CONST conditions.
24320 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
24321 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
24322 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
24323 (ia64_vectorize_vec_perm_const_ok): Merge into...
24324 (ia64_vectorize_vec_perm_const): ...this new function.
24325 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
24326 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
24327 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
24328 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
24329 * config/mips/mips.c (mips_expand_vec_perm_const)
24330 (mips_vectorize_vec_perm_const_ok): Merge into...
24331 (mips_vectorize_vec_perm_const): ...this new function.
24332 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
24333 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
24334 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
24335 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
24336 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
24337 (rs6000_expand_vec_perm_const): Delete.
24338 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
24340 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24341 (altivec_expand_vec_perm_const_le): Take each operand individually.
24342 Operate on constant selectors rather than rtxes.
24343 (altivec_expand_vec_perm_const): Likewise. Update call to
24344 altivec_expand_vec_perm_const_le.
24345 (rs6000_expand_vec_perm_const): Delete.
24346 (rs6000_vectorize_vec_perm_const_ok): Delete.
24347 (rs6000_vectorize_vec_perm_const): New function.
24348 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
24349 an element count and rtx array.
24350 (rs6000_expand_extract_even): Update call accordingly.
24351 (rs6000_expand_interleave): Likewise.
24352 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
24353 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
24354 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
24355 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
24356 (rs6000_expand_vec_perm_const): Delete.
24357 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24358 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24359 (altivec_expand_vec_perm_const_le): Take each operand individually.
24360 Operate on constant selectors rather than rtxes.
24361 (altivec_expand_vec_perm_const): Likewise. Update call to
24362 altivec_expand_vec_perm_const_le.
24363 (rs6000_expand_vec_perm_const): Delete.
24364 (rs6000_vectorize_vec_perm_const_ok): Delete.
24365 (rs6000_vectorize_vec_perm_const): New function. Remove stray
24366 reference to the SPE evmerge intructions.
24367 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
24368 an element count and rtx array.
24369 (rs6000_expand_extract_even): Update call accordingly.
24370 (rs6000_expand_interleave): Likewise.
24371 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
24372 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
24374 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24376 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24378 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
24379 vector mode and that that mode matches the mode of the data
24381 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
24382 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
24383 directly using expand_vec_perm_1 when forcing selectors into
24385 (expand_vec_perm_var): New function, split out from expand_vec_perm.
24387 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24389 * optabs-query.h (can_vec_perm_p): Delete.
24390 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
24391 * optabs-query.c (can_vec_perm_p): Split into...
24392 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
24393 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
24394 particular selector is valid.
24395 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24396 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24397 (vect_grouped_load_supported): Likewise.
24398 (vect_shift_permute_load_chain): Likewise.
24399 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
24400 (vect_transform_slp_perm_load): Likewise.
24401 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24402 (vectorizable_bswap): Likewise.
24403 (vect_gen_perm_mask_checked): Likewise.
24404 * fold-const.c (fold_ternary_loc): Likewise. Don't take
24405 implementations of variable permutation vectors into account
24406 when deciding which selector to use.
24407 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
24408 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
24409 with a false third argument.
24410 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
24411 to test whether the constant selector is valid and can_vec_perm_var_p
24412 to test whether a variable selector is valid.
24414 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24416 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
24417 * optabs-query.c (can_vec_perm_p): Likewise.
24418 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
24419 instead of vec_perm_indices.
24420 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
24421 (vect_gen_perm_mask_checked): Likewise,
24422 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
24423 (vect_gen_perm_mask_checked): Likewise,
24425 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24427 * optabs-query.h (qimode_for_vec_perm): Declare.
24428 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
24429 (qimode_for_vec_perm): ...this new function.
24430 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
24432 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24434 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
24435 does not have a conditional at the top.
24437 2018-01-02 Richard Biener <rguenther@suse.de>
24439 * ipa-inline.c (big_speedup_p): Fix expression.
24441 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
24444 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
24447 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
24451 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
24452 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
24453 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
24454 cond_taken_branch_cost 3->4.
24456 2018-01-01 Jakub Jelinek <jakub@redhat.com>
24458 PR tree-optimization/83581
24459 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
24460 TODO_cleanup_cfg if any changes have been made.
24462 PR middle-end/83608
24463 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
24464 convert_modes if target mode has the right side, but different mode
24467 PR middle-end/83609
24468 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
24469 last argument when extracting from CONCAT. If either from_real or
24470 from_imag is NULL, use expansion through memory. If result is not
24471 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
24472 the parts directly to inner mode, if even that fails, use expansion
24475 PR middle-end/83623
24476 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
24477 check for bswap in mode rather than HImode and use that in expand_unop
24480 Copyright (C) 2018 Free Software Foundation, Inc.
24482 Copying and distribution of this file, with or without modification,
24483 are permitted in any medium without royalty provided the copyright
24484 notice and this notice are preserved.