1 2018-08-28 Jeff Law <law@redhat.com>
3 * fold-const.c (fold_binary_loc): Remove recently added assert.
5 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
7 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
8 to OP parmeter of generated function.
10 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
12 PR tree-optimization/87009
13 * match.pd: Add boolean optimizations.
15 2018-08-28 Martin Sebor <msebor@redhat.com>
18 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
19 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
20 (pass_walloca::gate): Use it.
21 (alloca_call_type): Same.
22 (pass_walloca::execute): Same.
23 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
25 2018-08-28 David Malcolm <dmalcolm@redhat.com>
27 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
28 GCC_VERSION for usage of "__gcc_dump_printf__" format from
31 2018-08-28 Richard Biener <rguenther@suse.de>
33 PR tree-optimization/87124
34 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
35 constants before looking up avail.
37 2018-08-28 Jakub Jelinek <jakub@redhat.com>
40 * calls.c (maybe_warn_nonstring_arg): Punt early if
41 warn_stringop_overflow is zero. Don't call get_range_strlen
42 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
43 Swap comparison operands to have constants on rhs. Only use
44 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
47 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
49 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
50 use of tree_to_shwi. Remove duplicated test for the size being
51 a whole number of bytes.
53 2018-08-28 Richard Biener <rguenther@suse.de>
55 PR tree-optimization/87117
56 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
57 Handle removed stmt without LHS (GIMPLE_NOP).
59 2018-08-28 Richard Biener <rguenther@suse.de>
61 PR tree-optimization/87117
62 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
63 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
65 2018-08-28 Richard Biener <rguenther@suse.de>
67 PR tree-optimization/87117
68 * tree-ssa-pre.c (compute_avail): Do not make expressions
69 with predicated values available.
70 (get_expr_value_id): Assert we do not run into predicated value
73 2018-08-28 Richard Biener <rguenther@suse.de>
75 PR tree-optimization/87117
76 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
78 (get_expr_operands): Handle STRING_CST like other decls.
80 2018-08-28 Martin Liska <mliska@suse.cz>
82 * tree.h: Update documentation of fndecl_built_in_p
86 2018-08-27 Jeff Law <law@redhat.com>
87 PR tree-optimization/87110
88 * tree-ssa-dse.c (compute_trims): Handle non-constant
91 2018-08-27 Martin Sebor <msebor@redhat.com>
93 PR tree-optimization/86914
94 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
96 2018-08-27 Martin Sebor <msebor@redhat.com>
98 PR tree-optimization/87112
99 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
100 the type of the bound argument.
102 2018-08-27 Jeff Law <law@redhat.com>
104 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
105 type does not have a TYPE_SIZE_UNIT.
107 2018-08-27 Steve Ellcey <sellcey@cavium.com>
109 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
110 with include of backend.h.
112 2018-08-27 Richard Biener <rguenther@suse.de>
114 PR tree-optimization/86927
115 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
116 use const cond reduction code.
118 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
120 PR tree-optimization/85758
121 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
123 2018-08-27 David Malcolm <dmalcolm@redhat.com>
126 * diagnostic-show-locus.c (class layout_range): Update for
127 conversion of show_caret_p to a tri-state.
128 (layout_range::layout_range): Likewise.
129 (make_range): Likewise.
130 (layout::maybe_add_location_range): Likewise.
131 (layout::should_print_annotation_line_p): Don't show annotation
132 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
133 (layout::get_state_at_point): Update for conversion of
134 show_caret_p to a tri-state. Bail out early for
135 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
136 underlining or source colorization.
137 (gcc_rich_location::add_location_if_nearby): Update for conversion
138 of show_caret_p to a tri-state.
139 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
140 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
142 (selftest::test_one_liner_labels): Likewise.
143 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
144 conversion of show_caret_p to a tri-state.
145 * pretty-print.c (text_info::set_location): Likewise.
146 * pretty-print.h (text_info::set_location): Likewise.
147 * substring-locations.c (format_warning_n_va): Likewise.
148 * tree-diagnostic.c (default_tree_printer): Likewise.
149 * tree-pretty-print.c (newline_and_indent): Likewise.
151 2018-08-27 David Malcolm <dmalcolm@redhat.com>
154 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
155 line above for line-insertion fix-it hints.
156 (selftest::test_fixit_insert_containing_newline): Update the
157 expected results, and add a test with line-numbering enabled.
159 2018-08-27 Martin Liska <mliska@suse.cz>
162 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
163 params with DECL_HAS_VALUE_EXPR_P.
165 2018-08-27 Martin Liska <mliska@suse.cz>
167 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
168 selected expansion strategy.
170 2018-08-27 Martin Liska <mliska@suse.cz>
172 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
173 * builtins.c (is_builtin_fn): Likewise.
174 * attribs.c (diag_attr_exclusions): Use new function
175 fndecl_built_in_p and remove check for FUNCTION_DECL if
177 (builtin_mathfn_code): Likewise.
178 (fold_builtin_expect): Likewise.
179 (fold_call_expr): Likewise.
180 (fold_builtin_call_array): Likewise.
181 (fold_call_stmt): Likewise.
182 (set_builtin_user_assembler_name): Likewise.
183 (is_simple_builtin): Likewise.
184 * calls.c (gimple_alloca_call_p): Likewise.
185 (maybe_warn_nonstring_arg): Likewise.
186 * cfgexpand.c (expand_call_stmt): Likewise.
187 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
188 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
189 (cgraph_node::verify_node): Likewise.
190 * cgraphclones.c (build_function_decl_skip_args): Likewise.
191 (cgraph_node::create_clone): Likewise.
192 * config/arm/arm.c (arm_insert_attributes): Likewise.
193 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
194 * dse.c (scan_insn): Likewise.
195 * expr.c (expand_expr_real_1): Likewise.
196 * fold-const.c (operand_equal_p): Likewise.
197 (fold_binary_loc): Likewise.
198 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
199 * gimple-low.c (lower_stmt): Likewise.
200 * gimple-pretty-print.c (dump_gimple_call): Likewise.
201 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
202 * gimple.c (gimple_build_call_from_tree): Likewise.
203 (gimple_call_builtin_p): Likewise.
204 (gimple_call_combined_fn): Likewise.
205 * gimplify.c (gimplify_call_expr): Likewise.
206 (gimple_boolify): Likewise.
207 (gimplify_modify_expr): Likewise.
208 (gimplify_addr_expr): Likewise.
209 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
210 * ipa-cp.c (determine_versionability): Likewise.
211 * ipa-fnsummary.c (compute_fn_summary): Likewise.
212 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
213 * ipa-split.c (visit_bb): Likewise.
214 (split_function): Likewise.
215 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
216 * lto-cgraph.c (input_node): Likewise.
217 * lto-streamer-out.c (write_symbol): Likewise.
218 * omp-low.c (setjmp_or_longjmp_p): Likewise.
219 (lower_omp_1): Likewise.
220 * predict.c (strip_predict_hints): Likewise.
221 * print-tree.c (print_node): Likewise.
222 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
223 * trans-mem.c (is_tm_irrevocable): Likewise.
224 (is_tm_load): Likewise.
225 (is_tm_simple_load): Likewise.
226 (is_tm_store): Likewise.
227 (is_tm_simple_store): Likewise.
228 (is_tm_abort): Likewise.
229 (tm_region_init_1): Likewise.
230 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
231 * tree-cfg.c (verify_gimple_call): Likewise.
232 (move_stmt_r): Likewise.
233 (stmt_can_terminate_bb_p): Likewise.
234 * tree-eh.c (lower_eh_constructs_2): Likewise.
235 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
236 * tree-inline.c (remap_gimple_stmt): Likewise.
238 (estimate_num_insns): Likewise.
239 (fold_marked_statements): Likewise.
240 * tree-sra.c (scan_function): Likewise.
241 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
242 (optimize_stack_restore): Likewise.
243 (pass_fold_builtins::execute): Likewise.
244 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
245 (mark_all_reaching_defs_necessary_1): Likewise.
246 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
247 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
248 (pass_forwprop::execute): Likewise.
249 * tree-ssa-loop-im.c (stmt_cost): Likewise.
250 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
251 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
252 * tree-ssa-strlen.c (get_string_length): Likewise.
253 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
254 (find_func_aliases_for_call): Likewise.
255 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
256 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
257 * tree-tailcall.c (find_tail_calls): Likewise.
258 * tree.c (need_assembler_name_p): Likewise.
259 (free_lang_data_in_decl): Likewise.
260 (get_call_combined_fn): Likewise.
261 * ubsan.c (is_ubsan_builtin_p): Likewise.
262 * varasm.c (incorporeal_function_p): Likewise.
263 * tree.h (DECL_BUILT_IN): Remove and replace with
265 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
266 (fndecl_built_in_p): New.
268 2018-08-27 Martin Liska <mliska@suse.cz>
270 PR tree-optimization/86847
271 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
272 Dump also subtree probability.
273 (switch_decision_tree::do_jump_if_equal): New function.
274 (switch_decision_tree::emit_case_nodes): Handle special
275 situations in balanced tree that can be emitted much simpler.
276 Fix calculation of probabilities that happen in tree expansion.
277 * tree-switch-conversion.h (struct cluster): Add
279 (struct simple_cluster): Likewise.
280 (struct case_tree_node): Add new function has_child.
281 (do_jump_if_equal): New.
283 2018-08-27 Martin Liska <mliska@suse.cz>
285 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
286 Add new argument to bit_test_cluster constructor.
287 (bit_test_cluster::emit): Set bits really number of values
289 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
290 probability argument.
291 * tree-switch-conversion.h (struct bit_test_cluster):
292 Add m_handles_entire_switch.
294 2018-08-27 Martin Liska <mliska@suse.cz>
296 PR tree-optimization/86702
297 * tree-switch-conversion.c (jump_table_cluster::emit):
298 Make probabilities even for values in jump table
299 according to number of cases handled.
300 (switch_decision_tree::compute_cases_per_edge): Pass
301 argument to reset_out_edges_aux function.
302 (switch_decision_tree::analyze_switch_statement): Likewise.
303 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
306 2018-08-27 Martin Liska <mliska@suse.cz>
308 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
309 cfun argument explicitly.
310 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
311 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
312 function gimple_switch_default_bb.
313 (convert_switch_statements):
315 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
316 * stmt.c (label_to_block_fn): Use label_to_block and pass
317 cfun argument explicitly and use gimple_switch_label_bb.
318 (expand_case): Likewise.
319 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
320 cfun argument explicitly. Likewise.
321 (make_edges_bb): Likewise.
322 (make_cond_expr_edges): Likewise.
323 (get_cases_for_edge): Likewise.
324 (make_gimple_switch_edges): Likewise.
325 (label_to_block_fn): Likewise.
326 (label_to_block): Likewise.
327 (make_goto_expr_edges): Likewise.
328 (make_gimple_asm_edges): Likewise.
329 (main_block_label): Likewise.
330 (group_case_labels_stmt): Likewise.
331 (find_taken_edge_computed_goto): Likewise.
332 (find_taken_edge_switch_expr): Likewise.
333 (gimple_verify_flow_info): Likewise.
334 (gimple_redirect_edge_and_branch): Likewise.
335 (gimple_switch_label_bb): New function.
336 (gimple_switch_default_bb): Likewise.
337 (gimple_switch_edge): Likewise.
338 (gimple_switch_default_edge): Likewise.
339 * tree-cfg.h (label_to_block_fn): Remove and replace ...
340 (label_to_block): ... with this.
341 (gimple_switch_label_bb): New.
342 (gimple_switch_default_bb): Likewise.
343 (gimple_switch_edge): Likewise.
344 (gimple_switch_default_edge): Likewise.
345 * tree-cfgcleanup.c (convert_single_case_switch): Use
346 new gimple functions and pass new argument to label_to_block.
347 (cleanup_control_flow_bb):
348 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
349 cfun argument explicitly.
350 (make_eh_edges): Likewise.
351 (redirect_eh_dispatch_edge): Likewise.
352 (lower_resx): Likewise.
353 (lower_eh_dispatch): Likewise.
354 (maybe_remove_unreachable_handlers): Likewise.
355 (unsplit_eh): Likewise.
356 (cleanup_empty_eh): Likewise.
357 (verify_eh_edges): Likewise.
358 (verify_eh_dispatch_edge): Likewise.
359 * tree-ssa-dom.c (record_edge_info): Likewise.
360 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
361 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
362 (thread_through_normal_block): Likewise.
363 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
364 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
365 * tree-switch-conversion.c (switch_conversion::collect): Use new
367 (switch_conversion::check_final_bb): Likewise.
368 (switch_conversion::gather_default_values): Pass new argument
370 (switch_conversion::build_constructors): Likewise.
371 (switch_decision_tree::compute_cases_per_edge): Use new
372 gimple_switch_edge function.
373 (switch_decision_tree::analyze_switch_statement): Pass new argument
375 (switch_decision_tree::try_switch_expansion): Use
376 gimple_switch_default_edge.
377 * tree-vrp.c (find_switch_asserts): Pass new argument
379 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
380 (vr_values::simplify_switch_using_ranges): Likewise.
382 2018-08-27 Richard Biener <rguenther@suse.de>
384 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
385 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
387 * tree-ssa-sccvn.h (struct vn_pval): New structure.
388 (struct vn_nary_op_s): Add unwind_to member. Add
389 predicated_values flag and put result into a union together
390 with a linked list of vn_pval.
391 (struct vn_ssa_aux): Add name member to make maintaining
392 a map of SSA name to vn_ssa_aux possible. Remove no longer
393 needed info, dfsnum, low, visited, on_sccstack, use_processed
394 and range_info_anti_range_p members.
395 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
396 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
398 (vn_valueize): New global.
399 (vn_context_bb): Likewise.
400 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
401 VN_INFO_PTR_INFO): Remove.
402 * tree-ssa-sccvn.c: ... (rewrite)
403 (pass_fre::execute): For -O2+ initialize loops and run
404 RPO VN in optimistic mode (iterating). For -O1 and -Og
405 run RPO VN in non-optimistic mode.
406 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
407 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
408 * doc/invoke.texi (sccvn-max-scc-size): Remove.
409 (rpo-vn-max-loop-depth): Document.
410 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
411 when valuezing the VUSE signals we walked out of the region.
412 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
413 (phi_translate): Set VN context block to use for availability
415 (compute_avail): Likewise.
416 (pre_valueize): New function.
417 (pass_pre::execute): Adjust to the RPO VN API.
419 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
420 (propagate_constants_for_unrolling): Remove.
421 (tree_unroll_loops_completely): Perform value-numbering
422 on the unrolled bodies loop parent.
424 2018-08-27 Richard Biener <rguenther@suse.de>
426 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
427 for partial antic compute.
429 2018-08-27 Jakub Jelinek <jakub@redhat.com>
431 PR rtl-optimization/87065
432 * combine.c (simplify_if_then_else): Formatting fix.
433 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
435 (known_cond): Don't return const_true_rtx for vector modes. Use
436 CONST0_RTX instead of const0_rtx. Formatting fixes.
438 2018-08-27 Martin Liska <mliska@suse.cz>
440 PR gcov-profile/87069
441 * gcov.c (process_file): Record files already processed
442 and warn about a file being processed multiple times.
444 2018-08-27 Martin Liska <mliska@suse.cz>
447 * config/aarch64/aarch64.c (aarch64_override_options_internal):
448 Set default values for x_aarch64_*_string strings.
449 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
450 prefix. For -mabi do not print '=ABI' in help and use
451 <option_value> format for -msve-vector-bits and -moverride
454 2018-08-26 Jeff Law <law@redhat.com>
456 * config/mips/frame-header-opt.c: Include "backend.h" rather than
459 2018-08-26 Marek Polacek <polacek@redhat.com>
461 PR c++/87029, Implement -Wredundant-move.
462 * doc/invoke.texi: Document -Wredundant-move.
464 2018-08-25 Martin Sebor <msebor@redhat.com>
466 PR tree-optimization/87059
467 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
468 to the same type as the other.
469 * fold-const.c (fold_binary_loc): Assert expectation.
471 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
473 * config/darwin.c (machopic_legitimize_pic_address): Clean up
474 extraneous parentheses, dead code section and formatting.
476 2018-08-24 David Malcolm <dmalcolm@redhat.com>
479 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
480 wide enough for jumps in the line-numbering to be visible.
481 (layout::print_gap_in_line_numbering): New member function.
482 (layout::calculate_line_spans): When using line numbering, merge
483 line spans that are only 1 line apart.
484 (diagnostic_show_locus): When printing line numbers, show gaps in
485 line numbering directly, rather than printing headers.
486 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
487 line-numbering with multiple line spans.
488 (selftest::test_fixit_insert_containing_newline_2): Add test of
489 line-numbering, in which the spans are close enough to be merged.
491 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
493 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
494 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
495 * tree-vrp.c (range_is_nonnull): Remove.
496 (range_includes_zero_p): Accept value_range instead of min/max.
497 (extract_range_from_binary_expr_1): Do not early bail on
499 Use range_includes_zero_p instead of range_is_nonnull.
500 (extract_range_from_unary_expr): Use range_includes_zero_p instead
502 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
503 special case VR_ANTI_RANGE.
504 (vrp_finalize): Same.
505 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
507 (range_is_nonnull): Remove.
508 * vr-values.c (vrp_stmt_computes_nonzero): Use
509 range_includes_zero_p instead of range_is_nonnull.
510 (extract_range_basic): Pass value_range to range_includes_zero_p
511 instead of range_is_nonnull.
513 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
515 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
516 * emit-rtl.h (rtl_data): Remove return_bnd.
517 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
518 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
519 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
520 (POINTER_BOUNDS_MODE): Remove definition.
521 (make_pointer_bounds_mode): Remove.
522 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
523 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
524 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
525 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
526 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
527 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
528 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
530 * config/i386/i386-modes.def (BND32, BND64): Remove.
531 * config/i386/i386.c (dbx_register_map): Remove bound registers.
532 (dbx64_register_map): Ditto.
533 (svr4_dbx_register_map): Ditto.
534 (indirect_thunk_bnd_needed): Remove.
535 (indirect_thunks_bnd_used): Ditto.
536 (indirect_return_bnd_needed): Ditto.
537 (indirect_return_via_cx_bnd): Ditto.
538 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
539 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
540 (output_indirect_thunk): Ditto. Remove need_prefix argument.
541 (output_indirect_thunk_function): Remove handling of
542 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
543 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
544 (ix86_save_reg): Remove handling of crtl->return_bnd.
545 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
546 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
547 and UNSPEC_BNDLX_ADDR.
548 (ix86_output_indirect_branch_via_reg): Remove handling of
549 indirect_thunk_prefix_bnd.
550 (ix86_output_indirect_branch_via_push): Ditto.
551 (ix86_output_function_return): Ditto.
552 (ix86_output_indirect_function_return): Ditto.
553 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
554 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
555 (CALL_USED_REGISTERS): Ditto.
556 (REG_ALLOC_ORDER): Update for removal of bound registers.
557 (HI_REGISTER_NAMES): Ditto.
558 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
559 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
560 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
561 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
562 (FIRST_PSEUDO_REG): Update.
563 (BND): Remove mode iterator.
564 * config/i386/predicates.md (bnd_mem_operator): Remove.
566 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
568 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
571 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
573 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
574 the case in which the permute needs only a single element and
575 repeats for every vector of the result. Extend that case to
576 handle variable-length vectors.
577 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
579 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
582 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
583 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
585 2018-08-24 Richard Biener <rguenther@suse.de>
587 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
588 bb_flags_allocated members.
589 (auto_flag): New RAII class for allocating flags.
590 (auto_edge_flag): New RAII class for allocating edge flags.
591 (auto_bb_flag): New RAII class for allocating bb flags.
592 * cfgloop.c (verify_loop_structure): Allocate temporary edge
594 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
595 in favor of temporarily allocated BB flag.
596 * hsa-brig.c: Re-order includes.
597 * hsa-dump.c: Likewise.
598 * hsa-regalloc.c: Likewise.
599 * print-rtl.c: Likewise.
600 * profile-count.c: Likewise.
602 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
605 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
608 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
611 * wide-int-range.cc (wide_int_range_div): Do not ignore result
612 from wide_int_range_multiplicative_op.
614 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
616 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
619 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
621 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
624 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
626 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
627 full GENERIC expression used for replacement.
629 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
631 * tree-vrp.c (abs_extent_range): Remove.
632 (extract_range_into_wide_ints): Pass wide ints by reference.
633 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
634 Pass wide ints by reference in all calls to
635 extract_range_into_wide_ints.
636 * wide-int-range.cc (wide_int_range_div): New.
637 * wide-int-range.h (wide_int_range_div): New.
638 (wide_int_range_includes_zero_p): New.
639 (wide_int_range_zero_p): New.
641 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
643 * config/aarch64/aarch64.md (arches): New enum.
644 (arch): New enum attr.
645 (arch_enabled): New attr.
646 (enabled): Now uses arch_enabled only.
647 (simd, sve, fp16): Removed attribute.
648 (fp): Attr now defined in terms of 'arch'.
649 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
650 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
651 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
652 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
653 attributes into 'arch'.
654 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
655 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
656 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
657 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
658 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
659 'simd' attribute into 'arch'.
660 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
661 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
662 Convert use of 'fp' attribute to 'arch'.
663 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
664 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
666 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
667 (different modes) Merge 'fp' and 'simd' into 'arch'.
668 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
671 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
673 PR rtl-optimization/87026
674 * expmed.c (canonicalize_comparison): If we can no longer create
675 pseudoregisters, don't.
677 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
680 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
682 * config/arm/arm.c (speculation_barrier_libfunc): New static
684 (arm_init_libfuncs): Initialize it.
685 (arm_emit_speculation_barrier): New function.
686 * config/arm/arm.md (speculation_barrier): Call
687 arm_emit_speculation_barrier for architectures that do not have
689 (speculation_barrier_insn): Only match on Armv7 or later.
691 2018-08-23 Richard Biener <rguenther@suse.de>
694 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
697 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
699 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
700 of single-vector TBLs.
701 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
704 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
707 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
708 aarch64_evpc_tbl guard.
710 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
712 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
715 2018-08-22 Martin Sebor <msebor@redhat.com>
718 * tree-pretty-print.c (pretty_print_string): Add argument.
719 (dump_generic_node): Call to pretty_print_string with string size.
721 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
723 PR rtl-optimization/86771
724 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
725 of two SETs into those two SETs, one to be placed at i2, if that SETs
726 destination is modified between i2 and i3.
728 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
730 PR tree-optimization/86725
731 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
733 (vect_analyze_scalar_cycles_1): Check it.
735 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
737 PR tree-optimization/86725
738 * tree-vect-loop.c (vect_is_simple_reduction): When treating
739 an outer loop phi as a double reduction, make sure that the
740 single user of the phi result is an inner loop phi.
742 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
744 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
745 grouped stores with gaps to a strided group.
747 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
749 * tree-vect-stmts.c (get_group_load_store_type)
750 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
751 first statement in a group.
753 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
755 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
756 the sequence used in gcc/gcc.c.
758 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
761 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
764 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
766 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
767 Darwin10-specific unwinder-shim.
768 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
769 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
770 New to cater for Darwin10 Rosetta.
772 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
774 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
775 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
777 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
782 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
783 (dwarf2out_switch_text_section): Generate a local label for the
784 second function sub-section and apply it as the second FDE start
786 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
787 second sub-section start.
789 2018-08-22 Richard Biener <rguenther@suse.de>
791 PR tree-optimization/86988
792 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
794 2018-08-22 Richard Biener <rguenther@suse.de>
796 PR tree-optimization/86945
797 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
799 2018-08-22 Alexandre Oliva <oliva@adacore.com>
801 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
802 a comment about how uses of r2 for .sdata2 come about.
804 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
806 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
808 2018-08-21 Marek Polacek <polacek@redhat.com>
810 PR c++/86981, Implement -Wpessimizing-move.
811 * doc/invoke.texi: Document -Wpessimizing-move.
813 2018-08-21 Jan Hubicka <jh@suse.cz>
815 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
816 * tree.h (is_redundant_typedef): Remove.
817 * dwarf2out.c (is_redundant_typedef): Turn into static function.
819 2018-08-21 Jan Hubicka <jh@suse.cz>
821 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
824 2018-08-21 Tamar Christina <tamar.christina@arm.com>
826 * expmed.c (extract_low_bits): Reject invalid subregs early.
828 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
831 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
834 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
836 * config/vxworks.h: Guard vxworks_asm_out_constructor and
837 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
838 * config/vxworks.c: Likewise.
840 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
842 * config/vxworks.c: Set targetm.have_ctors_dtors
843 if HAVE_INITFINI_ARRAY_SUPPORT.
844 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
845 if HAVE_INITFINI_ARRAY_SUPPORT.
847 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
849 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
850 default search path for VxWorks < 7.
852 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
854 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
855 (get_format_string): Refer to c_getstr.
857 2018-08-21 Tom de Vries <tdevries@suse.de>
859 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
860 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
861 (debuginfo_early_stop): Declare.
862 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
863 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
864 (debuginfo_early_stop): New function.
865 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
866 and debuginfo_early_stop.
867 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
868 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
869 (general_init): Call debuginfo_early_init.
870 (finalize): Call debuginfo_fini.
871 (do_compile): Call debuginfo_init.
872 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
874 (@item -fdump-debug, @item -fdump-earlydebug): Add.
876 2018-08-21 Tom de Vries <tdevries@suse.de>
878 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
879 flag_dump_noaddr and flag_dump_unnumbered.
881 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
883 * wide-int-range.cc (wide_int_range_abs): New.
884 (wide_int_range_order_set): Rename from wide_int_range_min_max.
885 * wide-int-range.h (wide_int_range_abs): New.
886 (wide_int_range_min_max): New.
887 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
888 case to call wide_int_range_abs.
889 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
890 (extract_range_from_abs_expr): Delete.
892 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
895 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
896 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
899 2018-08-20 Nathan Sidwell <nathan@acm.org>
900 Jeff Law <law@redhat.com>
902 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
903 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
905 2018-08-20 David Malcolm <dmalcolm@redhat.com>
908 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
909 (decl_attributes): Likewise.
910 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
912 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
913 * diagnostic-core.h (class auto_diagnostic_group): New class.
914 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
915 (diagnostic_report_diagnostic): Handle the first diagnostics within
917 (emit_diagnostic): Add auto_diagnostic_group instance.
919 (inform_n): Likewise.
921 (warning_at): Likewise.
922 (warning_n): Likewise.
924 (permerror): Likewise.
927 (error_at): Likewise.
929 (fatal_error): Likewise.
930 (internal_error): Likewise.
931 (internal_error_no_backtrace): Likewise.
932 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
933 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
934 * diagnostic.h (struct diagnostic_context): Add fields
935 "diagnostic_group_nesting_depth",
936 "diagnostic_group_emission_count", "begin_group_cb",
938 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
939 Add auto_diagnostic_group instance(s).
940 (find_explicit_erroneous_behavior): Likewise.
941 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
942 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
943 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
944 (gimplify_va_arg_expr): Likewise.
945 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
946 (HSA_SORRY_AT): Likewise.
947 * ipa-devirt.c (compare_virtual_tables): Likewise.
948 (warn_odr): Likewise.
949 * multiple_target.c (expand_target_clones): Likewise.
950 * opts-common.c (cmdline_handle_error): Likewise.
951 * reginfo.c (globalize_reg): Likewise.
952 * substring-locations.c (format_warning_n_va): Likewise.
953 * tree-inline.c (expand_call_inline): Likewise.
954 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
955 * tree-ssa-loop-niter.c
956 (do_warn_aggressive_loop_optimizations): Likewise.
957 * tree-ssa-uninit.c (warn_uninit): Likewise.
958 * tree.c (warn_deprecated_use): Likewise.
960 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
963 * config/i386/i386.md (eh_return): Always update EH return
964 address in word_mode.
966 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
968 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
969 TARGET_SPLIT_COMPLEX_ARG is defined.
971 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
973 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
975 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
978 * expr.c (expand_assignment): Assert that bitpos is positive.
979 (store_field): Likewise
980 (expand_expr_real_1): Make sure that bitpos is positive.
981 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
984 2018-08-20 Nathan Sidwell <nathan@acm.org>
986 * Makefile.in (CPP_ID_DATA_H): Delete.
987 (CPP_INTERNAL_H): Don't add it.
988 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
989 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
991 2018-08-20 Richard Biener <rguenther@suse.de>
993 PR tree-optimization/78655
994 * tree-vrp.c (extract_range_from_binary_expr_1): Make
995 pointer + offset nonnull if either operand is nonnull work.
997 2018-08-20 Tom de Vries <tdevries@suse.de>
999 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
1000 unless the referenced die describes the added property using
1001 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
1002 Otherwise, add a DW_AT_location to the referenced die.
1004 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
1007 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
1008 register_operand when calling ix86_set_reg_reg_cost.
1009 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
1010 Set *total to 0 for operands that satisfy x86_64_immediate_operand
1011 predicate and to 1 otherwise.
1013 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
1015 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
1016 emit a diagnostic that it is not supported and reset the option.
1017 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
1018 supported and consume the option. (ASM_FINAL_SPEC): New.
1020 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
1022 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
1025 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
1027 C-SKY port: Documentation
1029 * doc/extend.texi (C-SKY Function Attributes): New section.
1030 * doc/invoke.texi (Option Summary): Add C-SKY options.
1031 (C-SKY Options): New section.
1032 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
1034 2018-08-17 Jojo <jijie_rong@c-sky.com>
1035 Huibin Wang <huibin_wang@c-sky.com>
1036 Sandra Loosemore <sandra@codesourcery.com>
1037 Chung-Lin Tang <cltang@codesourcery.com>
1039 C-SKY port: Backend implementation
1041 * config/csky/*: New.
1042 * common/config/csky/*: New.
1044 2018-08-17 Jojo <jijie_rong@c-sky.com>
1045 Huibin Wang <huibin_wang@c-sky.com>
1046 Sandra Loosemore <sandra@codesourcery.com>
1047 Chung-Lin Tang <cltang@codesourcery.com>
1048 Andrew Jenner <andrew@codesourcery.com>
1050 C-SKY port: Configury
1052 * config.gcc (csky-*-*): New.
1053 * configure.ac: Add csky to targets for dwarf2 debug_line support.
1054 * configure: Regenerated.
1056 2018-08-17 David Malcolm <dmalcolm@redhat.com>
1058 * dump-context.h: Include "dumpfile.h".
1059 (dump_context::dump_printf_va): Convert final param from va_list
1060 to va_list *. Convert from ATTRIBUTE_PRINTF to
1061 ATTRIBUTE_GCC_DUMP_PRINTF.
1062 (dump_context::dump_printf_loc_va): Likewise.
1063 * dumpfile.c: Include "stringpool.h".
1064 (make_item_for_dump_printf_va): Delete.
1065 (make_item_for_dump_printf): Delete.
1066 (class dump_pretty_printer): New class.
1067 (dump_pretty_printer::dump_pretty_printer): New ctor.
1068 (dump_pretty_printer::emit_items): New member function.
1069 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
1071 (dump_pretty_printer::emit_item): New member function.
1072 (dump_pretty_printer::stash_item): New member function.
1073 (dump_pretty_printer::format_decoder_cb): New member function.
1074 (dump_pretty_printer::decode_format): New member function.
1075 (dump_context::dump_printf_va): Reimplement in terms of
1076 dump_pretty_printer.
1077 (dump_context::dump_printf_loc_va): Convert final param from va_list
1079 (dump_context::begin_scope): Reimplement call to
1080 make_item_for_dump_printf.
1081 (dump_printf): Update for change to dump_printf_va.
1082 (dump_printf_loc): Likewise.
1083 (selftest::test_capture_of_dump_calls): Convert "stmt" from
1084 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
1085 with %T, %E, and %G.
1086 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
1087 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
1088 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
1089 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
1090 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
1091 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
1092 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
1093 within a dump_printf_loc call to "%wu".
1094 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
1095 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
1096 missing space after "=".
1097 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
1098 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
1099 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
1100 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
1101 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
1102 duplicate "vectorized" from message.
1104 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1106 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
1107 polyNxK_t element's TYPE_STRING_FLAG.
1109 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
1111 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
1112 (they were unnamed before). Fix comments.
1114 2018-08-17 Nathan Sidwell <nathan@acm.org>
1116 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
1118 2018-08-17 Richard Biener <rguenther@suse.de>
1120 PR tree-optimization/86841
1121 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
1123 2018-08-17 Martin Liska <mliska@suse.cz>
1125 * common.opt: Remove Warn, Init and Report for options with
1126 Ignore/Deprecated flag. Warning is done automatically for
1128 * config/i386/i386.opt: Likewise.
1129 * config/ia64/ia64.opt: Likewise.
1130 * config/rs6000/rs6000.opt: Likewise.
1131 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
1132 Remove usage of flag_check_pointer_bounds.
1133 * lto-wrapper.c (merge_and_complain): Do not handle
1134 OPT_fcheck_pointer_bounds.
1135 (append_compiler_options): Likewise.
1136 * opt-functions.awk: Do not handle Deprecated.
1137 * optc-gen.awk: Check that Var, Report and Init are not
1138 used for an option with Ignore/Deprecated flag.
1139 * opts-common.c (decode_cmdline_option): Do not report
1141 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
1143 * opts.h (struct cl_option): Remove cl_deprecated flag.
1144 (CL_ERR_DEPRECATED): Remove error enum value.
1146 2018-08-17 Richard Biener <rguenther@suse.de>
1149 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
1150 across a va-arg-pack using call adjust its return value accordingly.
1152 2018-08-16 Martin Sebor <msebor@redhat.com>
1154 PR tree-optimization/86853
1155 * gimple-ssa-sprintf.c (struct format_result): Rename member.
1156 (struct fmtresult): Add member and initialize it in ctors.
1157 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
1158 (format_string): Handle %S the same as %ls. Set MAYFAIL.
1159 (format_directive): Set POSUNDER4K when MAYFAIL is set.
1160 (parse_directive): Handle %C same as %c.
1161 (sprintf_dom_walker::compute_format_length): Adjust.
1162 (is_call_safe): Adjust.
1164 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1166 * builtins.c (c_strlen): Add new parameter eltsize. Use it
1167 for determining how to count the elements.
1168 * builtins.h (c_strlen): Adjust prototype.
1169 * expr.c (string_constant): Add new parameter mem_size.
1170 Set *mem_size appropriately.
1171 * expr.h (string_constant): Adjust protoype.
1172 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
1173 * gimple-fold.h (get_range_strlen): Adjust prototype.
1174 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
1175 (format_string): Call get_string_length with eltsize.
1177 2018-08-16 David Malcolm <dmalcolm@redhat.com>
1179 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
1180 to emit the span, rather than setting it as the prefix.
1182 2018-08-16 David Malcolm <dmalcolm@redhat.com>
1184 * diagnostic-show-locus.c (layout::start_annotation_line): Add
1185 "margin_char" parameter, defaulting to space. Use it in place
1186 of pp_space for the initial part of the margin.
1187 (layout::print_leading_fixits): Use '+' when filling the margin
1188 of line-insertion fix-it hints.
1190 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1192 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
1195 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1197 * config/rs6000/altivec.md: Don't set length attribute to the default
1199 * config/rs6000/darwin.md: Ditto.
1200 * config/rs6000/dfp.md: Ditto.
1201 * config/rs6000/htm.md: Ditto.
1202 * config/rs6000/rs6000.md: Ditto.
1203 * config/rs6000/sync.md: Ditto.
1204 * config/rs6000/vsx.md: Ditto.
1206 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1208 * config/rs6000/altivec.md: Don't set length attribute to the default
1209 value, for branch instructions.
1210 * config/rs6000/darwin.md: Ditto.
1211 * config/rs6000/rs6000.md: Ditto.
1213 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1215 * config/rs6000/rs6000.md (length): Always define as const_int 4.
1216 (unnamed conditional branch define_insn): Set length to 4 or 8
1217 depending on offset.
1218 (<bd>_<mode>): Similar, for alternative 0.
1219 (<bd>tf_<mode>): Ditto.
1221 2018-08-16 Tamar Christina <tamar.christina@arm.com>
1223 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
1225 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
1227 * doc/rtl.texi: Replace old RTX class names with new names.
1230 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
1232 * expmed.h (canonicalize_comparison): New declaration.
1233 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
1234 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
1235 * optabs.c (prepare_cmp_insn): Likewise.
1236 * rtl.h (unsigned_condition_p): New function which checks if a
1237 comparison operator is unsigned.
1239 2018-08-16 Nathan Sidwell <nathan@acm.org>
1241 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
1242 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
1244 2018-08-16 Tamar Christina <tamar.christina@arm.com>
1247 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
1248 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
1249 (mov<mov>): ..this and enable unconditionally.
1251 2018-08-16 Tamar Christina <tamar.christina@arm.com>
1253 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
1255 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
1257 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
1258 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
1259 "Common" with "Target".
1261 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
1263 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
1264 * doc/invoke.texi (mmitigate-rop): Remove.
1265 * config/i386/i386.c: Do not include "regrename.h".
1266 (ix86_rop_should_change_byte_p, reg_encoded_number)
1267 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
1269 (ix86_reorg): Remove call to ix86_mitigate_rop.
1270 * config/i386/i386.md (attr "modrm_class"): Remove.
1271 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
1272 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
1273 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
1275 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
1277 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
1278 allow folding of mergeh() and mergel() for the float and double types.
1279 (fold_mergehl_helper): Rework to handle building a permute tree
1282 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
1284 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
1287 2018-08-15 David Malcolm <dmalcolm@redhat.com>
1289 * common.opt (fdiagnostics-show-labels): New option.
1290 * diagnostic-show-locus.c (class layout_range): Add field
1292 (class layout): Add field "m_show_labels_p".
1293 (layout_range::layout_range): Add param "label" and use it to
1295 (make_range): Pass in NULL for new "label" param of layout_range's
1297 (layout::layout): Initialize m_show_labels_p.
1298 (layout::maybe_add_location_range): Pass in loc_range->m_label
1299 when constructing layout_range instances.
1300 (struct line_label): New struct.
1301 (layout::print_any_labels): New member function.
1302 (layout::print_line): Call it if label-printing is enabled.
1303 (selftest::test_one_liner_labels): New test.
1304 (selftest::test_diagnostic_show_locus_one_liner): Call it.
1305 * diagnostic.c (diagnostic_initialize): Initialize
1306 context->show_labels_p.
1307 * diagnostic.h (struct diagnostic_context): Add field
1309 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
1310 -fno-diagnostics-show-labels.
1311 * dwarf2out.c (gen_producer_string): Add
1312 OPT_fdiagnostics_show_labels to the ignored options.
1313 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
1315 (gcc_rich_location::maybe_add_expr): Likewise.
1316 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
1317 label" param, defaulting to NULL.
1318 (gcc_rich_location::add_expr): Add "label" param.
1319 (gcc_rich_location::maybe_add_expr): Likewise.
1320 (class text_range_label): New class.
1321 (class range_label_for_type_mismatch): New class.
1322 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
1323 of format_warning_va.
1324 (fmtwarn_n): Likewise for new params of format_warning_n_va.
1325 * lto-wrapper.c (merge_and_complain): Add
1326 OPT_fdiagnostics_show_labels to the "pick one setting" options.
1327 (append_compiler_options): Likewise to the dropped options.
1328 (append_diag_options): Likewise to the passed-on options.
1329 * opts.c (common_handle_option): Handle the new option.
1330 * selftest-diagnostic.c
1331 (test_diagnostic_context::test_diagnostic_context): Enable
1333 * substring-locations.c: Include "gcc-rich-location.h".
1334 (format_warning_n_va): Add "fmt_label" and "param_label" params
1335 and use them as appropriate.
1336 (format_warning_va): Add "fmt_label" and "param_label" params,
1337 passing them on to format_warning_n_va.
1338 (format_warning_at_substring): Likewise.
1339 (format_warning_at_substring_n): Likewise.
1340 * substring-locations.h (format_warning_va): Add "fmt_label" and
1341 "param_label" params.
1342 (format_warning_n_va): Likewise.
1343 (format_warning_at_substring): Likewise.
1344 (format_warning_at_substring_n): Likewise.
1345 * toplev.c (general_init): Initialize global_dc->show_labels_p.
1347 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
1350 * builtins.c (expand_builtin_memcmp): Do not expand the call
1351 when overflow is detected.
1353 2018-08-15 Martin Sebor <msebor@redhat.com>
1355 PR tree-optimization/71625
1356 * config/aarch64/aarch64-builtins.c
1357 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
1359 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
1361 * config/s390/s390.c (s390_reorg): Remove loop.
1363 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1366 (darwin_function_switched_text_sections): Delete.
1367 * gcc/config/darwin.h
1368 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
1370 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1373 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
1374 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
1375 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
1377 2018-08-15 Martin Liska <mliska@suse.cz>
1379 PR tree-optimization/86925
1380 * predict.c (expr_expected_value_1): When taking
1381 later predictor, assign also probability.
1382 Use fold_build2_initializer_loc in order to fold
1383 the expression in -frounding-math.
1385 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
1387 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
1389 (expand_vec_perm_1): Try the new method.
1391 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
1394 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
1395 Check whether lra_live_max_point is 0 before dividing.
1397 2018-08-14 Martin Sebor <msebor@redhat.com>
1399 PR tree-optimization/86650
1400 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
1401 (vrp_prop::check_mem_ref): Same.
1403 2018-08-13 Liu Hao <lh_mouse@126.com>
1405 * pretty-print.c (eat_esc_sequence): Swap the foreground and
1406 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
1407 and clear it thereafter, as it only works for DBCS.
1409 2018-08-13 Liu Hao <lh_mouse@126.com>
1411 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
1412 handle returned by _get_osf_handle().
1414 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
1416 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
1417 for folding vec_perm.
1419 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
1421 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
1422 Add support for gimple-folding of vec_pack() and vec_unpack()
1425 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
1427 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
1428 vec_xst variants to the list.
1429 (rs6000_gimple_fold_builtin): Add support for folding unaligned
1430 vector loads and stores.
1432 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
1434 * config.gcc (rs6000-ibm-aix4.x): Delete.
1435 (rs6000-ibm-aix5.1): Delete.
1436 (rs6000-ibm-aix5.2): Delete.
1437 (rs6000-ibm-aix5.3): Delete.
1438 * config/rs6000/aix43.h: Delete.
1439 * config/rs6000/aix51.h: Delete.
1440 * config/rs6000/aix52.h: Delete.
1441 * config/rs6000/t-aix43: Delete.
1443 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
1445 * config/s390/s390.c (s390_decompose_constant_pool_ref):
1447 (s390_decompose_address): Factor out constant pool ref
1450 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1452 * config/nds32/nds32-predicates.c
1453 (nds32_can_use_bclr_p): Change return type as bool.
1454 (nds32_can_use_bset_p): Ditto.
1455 (nds32_can_use_btgl_p): Ditto.
1456 (nds32_can_use_bitci_p): Ditto.
1457 * config/nds32/nds32-protos.h
1458 (nds32_can_use_bclr_p): Change declaration.
1459 (nds32_can_use_bset_p): Ditto.
1460 (nds32_can_use_btgl_p): Ditto.
1461 (nds32_can_use_bitci_p): Ditto.
1463 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1465 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
1466 Support -msched-prolog-epilog option.
1467 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
1469 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1471 * common/config/nds32/nds32-common.c
1472 (nds32_option_optimization_table): Enalbe -malways-align.
1474 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1476 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
1478 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
1479 OPT_misr_secure_ case.
1480 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
1481 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
1482 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
1484 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
1485 (nds32_isr_info): New field security_level.
1486 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
1487 * config/nds32/nds32.md (return_internal): Consider critical attribute.
1488 * config/nds32/nds32.opt (misr-secure): New option.
1489 * config/nds32/nds32_init.inc: New file.
1490 * config/nds32/nds32_isr.h: New file.
1492 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
1494 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
1495 Update comment for atomic instructions.
1496 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
1497 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
1499 (atomic_loaddi): Revise fence expansion to only emit fence prior to
1500 load for __ATOMIC_SEQ_CST model.
1501 (atomic_loaddi_1): Remove float register target.
1502 (atomic_storedi): Handle CONST_INT values.
1503 (atomic_storedi_1): Remove float register source. Add special case
1505 (memory_barrier): New expander and insn.
1507 2018-08-11 Jakub Jelinek <jakub@redhat.com>
1509 PR tree-optimization/86835
1510 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
1511 new_stmt after def_gsi, make sure to insert new_square_stmt after
1512 that stmt, not 2 stmts before it.
1514 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
1517 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
1520 2018-08-10 Martin Liska <mliska@suse.cz>
1523 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
1525 * builtins.c (expand_builtin_expect_with_probability):
1527 (expand_builtin_expect_with_probability): New function.
1528 (build_builtin_expect_predicate): Add new argumnet probability
1529 for BUILT_IN_EXPECT_WITH_PROBABILITY.
1530 (fold_builtin_expect):
1533 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
1534 * builtins.h (fold_builtin_expect): Set new argument.
1535 * doc/extend.texi: Document __builtin_expect_with_probability.
1536 * doc/invoke.texi: Likewise.
1537 * gimple-fold.c (gimple_fold_call): Pass new argument.
1538 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
1539 also BUILT_IN_EXPECT_WITH_PROBABILITY.
1540 * predict.c (get_predictor_value): New function.
1541 (expr_expected_value): Add new argument probability. Assume
1542 that predictor and probability are always non-null.
1543 (expr_expected_value_1): Likewise. For __builtin_expect and
1544 __builtin_expect_with_probability set probability. Handle
1545 combination in binary expressions.
1546 (tree_predict_by_opcode): Simplify code by simply calling
1547 get_predictor_value.
1548 (pass_strip_predict_hints::execute): Add handling of
1549 BUILT_IN_EXPECT_WITH_PROBABILITY.
1550 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
1552 * tree.h (DECL_BUILT_IN_P): New function.
1554 2018-08-10 Martin Liska <mliska@suse.cz>
1556 PR tree-optimization/85799
1557 * passes.def: Add argument for pass_strip_predict_hints.
1558 * predict.c (class pass_strip_predict_hints): Add new argument
1560 (strip_predictor_early): New function.
1561 (pass_strip_predict_hints::execute): Call the function to
1563 (strip_predict_hints): New function.
1564 * predict.def: Fix comment.
1566 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
1568 * Makefile.in: Clarify which tm.texi to copy over to assert the
1569 right to grant a GFDL license for all.
1571 2018-08-09 Jeff Law <law@redhat.com>
1573 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
1576 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
1578 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
1581 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
1583 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
1584 reductions for variable-length vectors.
1586 2018-08-09 David Malcolm <dmalcolm@redhat.com>
1589 * common.opt (fdiagnostics-show-line-numbers): New option.
1590 * diagnostic-show-locus.c (class layout): Add fields
1591 "m_show_line_numbers_p" and "m_linenum_width";
1592 (num_digits): New function.
1593 (test_num_digits): New function.
1594 (layout::layout): Initialize new fields. Update m_x_offset
1595 logic to handle any left margin.
1596 (layout::print_source_line): Print line number when requested.
1597 (layout::start_annotation_line): New member function.
1598 (layout::print_annotation_line): Call it.
1599 (layout::print_leading_fixits): Likewise.
1600 (layout::print_trailing_fixits): Likewise. Update calls to
1601 move_to_column for new parameter.
1602 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
1603 it to potentially call start_annotation_line.
1604 (layout::show_ruler): Call start_annotation_line.
1605 (selftest::test_line_numbers_multiline_range): New selftest.
1606 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
1607 and selftest::test_line_numbers_multiline_range.
1608 * diagnostic.c (diagnostic_initialize): Initialize
1609 show_line_numbers_p.
1610 * diagnostic.h (struct diagnostic_context): Add field
1611 "show_line_numbers_p".
1612 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
1613 -fno-diagnostics-show-line-numbers.
1614 * dwarf2out.c (gen_producer_string): Add
1615 OPT_fdiagnostics_show_line_numbers to the ignored options.
1616 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
1617 one setting" options.
1618 (append_compiler_options): Likewise to the dropped options.
1619 (append_diag_options): Likewise to the passed-on options.
1620 * opts.c (common_handle_option): Handle the new option.
1621 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
1623 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
1625 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
1626 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
1627 third argument of type "const signed char" to descriptions of
1628 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
1629 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
1630 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
1631 __builtin_bcdsub_ov functions.
1633 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
1635 PR tree-optimization/86858
1636 * tree-vect-loop.c (vect_is_simple_reduction): Restore
1637 flow_bb_inside_loop_p calls.
1639 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
1641 PR tree-optimization/86871
1642 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
1643 instead of gimple_assign_lhs.
1645 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
1648 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
1649 register constraint to operand 0.
1650 (add<mode>3_carryinC): Likewise.
1651 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
1653 2018-08-09 Martin Liska <mliska@suse.cz>
1656 * common.opt: Remove extra line.
1658 2018-08-09 Martin Liska <mliska@suse.cz>
1660 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
1661 at the end of a line, make first letter capital and end up
1662 a sentence with a dot.
1663 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
1664 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
1665 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
1666 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
1667 (PARAM_MAX_ISL_OPERATIONS): Likewise.
1668 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
1669 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
1670 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
1671 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
1672 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
1673 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
1674 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
1675 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
1676 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
1677 (PARAM_TREE_REASSOC_WIDTH): Likewise.
1678 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
1679 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
1680 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
1682 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
1685 * config/s390/s390.c (s390_option_override_internal): Reduce the
1686 stack-clash-protection-probe-interval param if it would be too big
1689 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
1692 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
1693 * config/m68k/m68k.c (handle_move_double): Don't call
1694 m68k_final_prescan_insn.
1695 (m68k_adjust_decorated_operand): Renamed from
1696 m68k_final_prescan_insn, remove first and third operand and
1698 (print_operand): Call it.
1699 (print_operand_address): Call it.
1701 2018-08-08 Nathan Sidwell <nathan@acm.org>
1703 * diagnostic.c (diagnostic_report_current_module): Use
1704 linemap_included_from & linemap_included_from_linemap.
1706 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
1708 * config/aarch64/aarch64-cores.def: Add phecda core.
1709 * config/aarch64/aarch64-tune.md: Regenerate.
1710 * doc/invoke.texi: Add phecda core.
1712 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
1715 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
1717 * config/s390/s390.md ("movti"): Add more alternatives for
1718 constant to GPR copies.
1720 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
1722 * config/s390/s390.c: Fix whitespace damage throughout the file.
1723 * config/s390/s390.h: Likewise.
1724 * config/s390/tpf.h: Likewise.
1726 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
1728 * config/s390/s390.c (s390_loadrelative_operand_p):
1729 Remove TARGET_CPU_ZARCH usages.
1730 (s390_rtx_costs): Likewise.
1731 (s390_legitimate_constant_p): Likewise.
1732 (s390_cannot_force_const_mem): Likewise.
1733 (legitimate_reload_constant_p): Likewise.
1734 (s390_preferred_reload_class): Likewise.
1735 (legitimize_pic_address): Likewise.
1736 (legitimize_tls_address): Likewise.
1737 (s390_split_branches): Removed.
1738 (s390_add_execute): Removed.
1739 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
1740 (s390_mainpool_start): Likewise.
1741 (s390_mainpool_finish): Likewise.
1742 (s390_mainpool_cancel): Removed.
1743 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
1744 (s390_chunkify_cancel): Likewise.
1745 (s390_return_addr_rtx): Likewise.
1746 (s390_register_info): Remove split_branches_pending_p uages.
1747 (s390_optimize_register_info): Likewise.
1748 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
1749 split_branches_pending_p usages.
1750 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
1751 (s390_load_got): Likewise.
1752 (s390_expand_split_stack_prologue): Likewise.
1753 (output_asm_nops): Likewise.
1754 (s390_function_profiler): Likewise.
1755 (s390_emit_call): Likewise.
1756 (s390_conditional_register_usage): Likewise.
1757 (s390_optimize_prologue): Likewise.
1758 (s390_reorg): Remove TARGET_CPU_ZARCH and
1759 split_branches_pending_p usages.
1760 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
1762 (s390_output_indirect_thunk_function): Likewise.
1763 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
1764 (TARGET_CPU_ZARCH_P): Removed.
1765 (struct machine_function): Remove split_branches_pending_p.
1766 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
1768 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
1770 * common/config/s390/s390-common.c (processor_flags_table):
1772 * config.gcc: Remove with_arch/with_tune support.
1773 * config/s390/2064.md: Remove cpu attribute comparisons.
1774 * config/s390/driver-native.c (s390_host_detect_local_cpu):
1776 * config/s390/linux.h (ASM_SPEC):
1777 Remove -march support.
1778 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
1779 Use a table to get an arch level.
1780 * config/s390/s390-opts.h (enum processor_type):
1782 * config/s390/s390.c
1783 (processor_table): Remove entries, add arch_level values.
1784 (s390_issue_rate): Remove cases.
1785 (s390_option_override): Adjust
1786 s390_option_override_internal() call.
1787 (s390_option_override_internal): Remove deprecation warning.
1788 (s390_valid_target_attribute_tree): Adjust
1789 s390_option_override_internal() call.
1790 * config/s390/s390.h (struct s390_processor):
1791 Share with s390-c.c, add arch_level field.
1792 * config/s390/s390.md:
1793 Remove occurrences in cpu attribute.
1794 * config/s390/s390.opt: Remove -march/-mtune support.
1795 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
1796 * doc/invoke.texi: Remove deprecation warning.
1798 2018-08-08 Luis Machado <luis.machado@linaro.org>
1800 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
1802 (qdf24xx_tunings): Set vector cost structure to
1803 qdf24xx_vector_cost.
1805 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
1806 <register_sextend>: Set to 3.
1808 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
1811 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
1812 * config/aarch64/aarch64-simd.md
1813 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
1814 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
1815 (aarch64_frecpx<mode>): ...this new pattern.
1816 * config/aarch64/aarch64-simd-builtins.def: Remove comment
1817 about aarch64_frecp<FRECP:frecp_suffix><mode>.
1819 2018-08-07 Martin Liska <mliska@suse.cz>
1822 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
1823 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
1824 * predict.def (PRED_MALLOC_NONNULL): New predictor.
1825 * doc/extend.texi: Document that malloc attribute adds
1828 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
1831 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1832 Define to speculation_safe_value_not_needed.
1834 2018-08-06 Jeff Law <law@redhat.com>
1836 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
1837 the vr_values instance to cprop_into_stmt.
1838 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
1839 (cprop_operand): Also query EVRP to determine if OP is a constant.
1841 2018-08-06 Nathan Sidwell <nathan@acm.org>
1843 * diagnostic.c (diagnostic_report_current_module): Reroll
1844 included-at loop. Translate text.
1846 2018-08-06 David Malcolm <dmalcolm@redhat.com>
1848 * function-tests.c (selftest::test_expansion_to_rtl): Call
1849 free_after_compilation.
1851 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1853 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
1855 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
1857 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
1858 loops with memory block operations from getting unrolled.
1860 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
1863 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1864 Define to speculation_safe_value_not_needed.
1866 2018-08-06 Jeff Law <law@redhat.com>
1868 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
1871 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1874 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
1875 with all enabled __intN types.
1877 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
1879 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1881 * alias.c (record_set): Check for clobber high.
1882 * cfgexpand.c (expand_gimple_stmt): Likewise.
1883 * combine-stack-adj.c (single_set_for_csa): Likewise.
1884 * combine.c (find_single_use_1): Likewise.
1885 (set_nonzero_bits_and_sign_copies): Likewise.
1886 (get_combine_src_dest): Likewise.
1887 (is_parallel_of_n_reg_sets): Likewise.
1888 (try_combine): Likewise.
1889 (record_dead_and_set_regs_1): Likewise.
1890 (reg_dead_at_p_1): Likewise.
1891 (reg_dead_at_p): Likewise.
1892 * dce.c (deletable_insn_p): Likewise.
1893 (mark_nonreg_stores_1): Likewise.
1894 (mark_nonreg_stores_2): Likewise.
1895 * df-scan.c (df_find_hard_reg_defs): Likewise.
1896 (df_uses_record): Likewise.
1897 (df_get_call_refs): Likewise.
1898 * dwarf2out.c (mem_loc_descriptor): Likewise.
1899 * haifa-sched.c (haifa_classify_rtx): Likewise.
1900 * ira-build.c (create_insn_allocnos): Likewise.
1901 * ira-costs.c (scan_one_insn): Likewise.
1902 * ira.c (equiv_init_movable_p): Likewise.
1903 (rtx_moveable_p): Likewise.
1904 (interesting_dest_for_shprep): Likewise.
1905 * jump.c (mark_jump_label_1): Likewise.
1906 * postreload-gcse.c (record_opr_changes): Likewise.
1907 * postreload.c (reload_cse_simplify): Likewise.
1908 (struct reg_use): Add source expr.
1909 (reload_combine): Check for clobber high.
1910 (reload_combine_note_use): Likewise.
1911 (reload_cse_move2add): Likewise.
1912 (move2add_note_store): Likewise.
1913 * print-rtl.c (print_pattern): Likewise.
1914 * recog.c (decode_asm_operands): Likewise.
1915 (store_data_bypass_p): Likewise.
1916 (if_test_bypass_p): Likewise.
1917 * regcprop.c (kill_clobbered_value): Likewise.
1918 (kill_set_value): Likewise.
1919 * reginfo.c (reg_scan_mark_refs): Likewise.
1920 * reload1.c (maybe_fix_stack_asms): Likewise.
1921 (eliminate_regs_1): Likewise.
1922 (elimination_effects): Likewise.
1923 (mark_not_eliminable): Likewise.
1924 (scan_paradoxical_subregs): Likewise.
1925 (forget_old_reloads_1): Likewise.
1926 * reorg.c (find_end_label): Likewise.
1927 (try_merge_delay_insns): Likewise.
1928 (redundant_insn): Likewise.
1929 (own_thread_p): Likewise.
1930 (fill_simple_delay_slots): Likewise.
1931 (fill_slots_from_thread): Likewise.
1932 (dbr_schedule): Likewise.
1933 * resource.c (update_live_status): Likewise.
1934 (mark_referenced_resources): Likewise.
1935 (mark_set_resources): Likewise.
1936 * rtl.c (copy_rtx): Likewise.
1937 * rtlanal.c (reg_referenced_p): Likewise.
1938 (single_set_2): Likewise.
1939 (noop_move_p): Likewise.
1940 (note_stores): Likewise.
1941 * sched-deps.c (sched_analyze_reg): Likewise.
1942 (sched_analyze_insn): Likewise.
1944 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1946 * cse.c (invalidate_reg): New function extracted from...
1947 (invalidate): ...here.
1948 (canonicalize_insn): Check for clobber high.
1949 (invalidate_from_clobbers): invalidate clobber highs.
1950 (invalidate_from_sets_and_clobbers): Likewise.
1951 (count_reg_usage): Check for clobber high.
1952 (insn_live_p): Likewise.
1953 * cselib.c (cselib_expand_value_rtx_1):Likewise.
1954 (cselib_invalidate_regno): Check for clobber in setter.
1955 (cselib_invalidate_rtx): Pass through setter.
1956 (cselib_invalidate_rtx_note_stores):
1957 (cselib_process_insn): Check for clobber high.
1958 * cselib.h (cselib_invalidate_rtx): Add operand.
1960 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1962 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
1963 (mark_not_eliminable): Likewise.
1964 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
1965 * lra-lives.c (process_bb_lives): Check for clobber high.
1966 * lra.c (new_insn_reg): Remember clobber highs.
1967 (collect_non_operand_hard_regs): Check for clobber high.
1968 (lra_set_insn_recog_data): Likewise.
1969 (add_regs_to_insn_regno_info): Likewise.
1970 (lra_update_insn_regno_info): Likewise.
1972 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1974 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
1975 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
1977 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1979 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
1980 (copy_insn_1): Likewise.
1981 (gen_hard_reg_clobber_high): New gen function.
1982 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
1983 * genemit.c (gen_exp): Likewise.
1984 (gen_emit_seq): Pass through info.
1985 (gen_insn): Check for CLOBBER_HIGH.
1986 (gen_expand): Pass through info.
1987 (gen_split): Likewise.
1988 (output_add_clobbers): Likewise.
1989 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
1990 (remove_clobbers): Likewise.
1991 * rtl.h (gen_hard_reg_clobber_high): New declaration.
1993 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1995 * doc/rtl.texi (clobber_high): Add.
1996 (parallel): Add in clobber high
1997 * rtl.c (rtl_check_failed_code3): Add function.
1998 * rtl.def (CLOBBER_HIGH): Add expression.
1999 * rtl.h (RTL_CHECKC3): Add macro.
2000 (rtl_check_failed_code3): Add declaration.
2001 (XC3EXP): Add macro.
2003 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
2006 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
2007 cfun->machine->max_used_stack_alignment if needed.
2009 2018-08-04 Martin Sebor <msebor@redhat.com>
2011 PR tree-optimization/86571
2012 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
2015 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
2018 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2021 2018-08-03 Jeff Law <law@redhat.com>
2024 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2025 Define to speculation_safe_value_not_needed.
2027 2018-08-03 David Malcolm <dmalcolm@redhat.com>
2029 * doc/gcov.texi (-x): Remove duplicate "to".
2030 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
2031 (-Wif-not-aligned): Remove duplicate "is".
2032 (-flto): Remove duplicate "the".
2033 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
2034 duplicate "v5.00.b".
2035 (MSP430 Options): Remove duplicate "and" from the description
2036 of "-mgprel-sec=regexp".
2037 (x86 Options): Remove duplicate copies of "vmldLog102" and
2038 vmlsLog104 from description of "-mveclibabi=type".
2040 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
2042 * internal-fn.h (first_commutative_argument): Declare.
2043 * internal-fn.c (first_commutative_argument): New function.
2044 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
2045 restrictions for pattern statements. Use first_commutative_argument
2046 to look for commutative operands in calls to internal functions.
2048 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
2050 * Makefile.in (wide-int-range.o): New.
2051 * tree-vrp.c: Move all the wide_int_* functions to...
2052 * wide-int-range.cc: ...here.
2053 * tree-vrp.h: Move all the wide_int_* prototypes to...
2054 * wide-int-range.h: ...here.
2056 2018-08-03 Tom de Vries <tdevries@suse.de>
2058 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
2060 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
2061 * except.c (output_function_exception_table): Do early exit if
2062 targetm_common.except_unwind_info (&global_options) == UI_NONE.
2064 2018-08-03 Martin Liska <mliska@suse.cz>
2066 * predict.c (dump_prediction): Change to 2 digits
2069 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
2071 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
2073 (falkor_am_1_gtov_gtov): ... a new insn reservation.
2075 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
2077 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
2078 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
2079 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
2080 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
2081 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
2083 2018-08-02 David Malcolm <dmalcolm@redhat.com>
2085 * diagnostic-show-locus.c (diagnostic_show_locus): Use
2086 pp_take_prefix when saving the existing prefix.
2087 * diagnostic.c (diagnostic_append_note): Likewise.
2088 * langhooks.c (lhd_print_error_function): Likewise.
2089 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
2090 param's type. Free the existing prefix.
2091 (pp_take_prefix): New function.
2092 (pretty_printer::pretty_printer): Drop the prefix parameter.
2093 Rename the length parameter to match the comment.
2094 (pretty_printer::~pretty_printer): Free the prefix.
2095 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
2097 (struct pretty_printer): Drop the "const" from "prefix" field's
2098 type and clarify memory management.
2099 (pp_set_prefix): Drop the "const" from the 2nd param.
2100 (pp_take_prefix): New decl.
2102 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
2104 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
2105 for word_mode_ok here instead of passing as argument.
2106 (expand_block_compare): Change select_block_compare_mode() call.
2107 (expand_strncmp_gpr_sequence): New function.
2108 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
2110 2018-08-02 Jeff Law <law@redhat.com>
2113 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2114 Define to speculation_safe_value_not_needed.
2117 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2118 Define to speculation_safe_value_not_needed.
2120 2018-08-02 Tom de Vries <tdevries@suse.de>
2123 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
2124 function. Return UI_TARGET unconditionally.
2125 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
2126 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
2128 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
2130 * genemit.c (print_overload_test): Fix typo.
2132 2018-08-02 Richard Biener <rguenther@suse.de>
2134 PR tree-optimization/86816
2135 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
2136 which checks for value availability before querying it.
2137 (gvn_uses_equal): Use it.
2138 (same_succ_hash): Likewise.
2139 (gimple_equal_p): Likewise.
2141 2018-08-02 Nick Clifton <nickc@redhat.com>
2144 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2145 Define to speculation_safe_value_not_needed.
2148 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2149 Define to speculation_safe_value_not_needed.
2152 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2153 Define to speculation_safe_value_not_needed.
2156 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2157 Define to speculation_safe_value_not_needed.
2160 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2161 Define to speculation_safe_value_not_needed.
2164 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2165 Define to speculation_safe_value_not_needed.
2168 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2169 Define to speculation_safe_value_not_needed.
2172 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2173 Define to speculation_safe_value_not_needed.
2176 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
2177 speculation_safe_value_not_needed.
2180 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
2181 to speculation_safe_value_not_needed.
2183 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
2185 * doc/md.texi: Expand the documentation of instruction names
2186 to mention port-local uses. Document '@' in pattern names.
2187 * read-md.h (overloaded_instance, overloaded_name): New structs.
2189 (md_reader::handle_overloaded_name): New member function.
2190 (md_reader::get_overloads): Likewise.
2191 (md_reader::m_first_overload): New member variable.
2192 (md_reader::m_next_overload_ptr): Likewise.
2193 (md_reader::m_overloads_htab): Likewise.
2194 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
2195 m_next_overload_ptr and m_overloads_htab.
2196 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
2197 (get_mode_token, get_code_token, get_int_token): New functions.
2198 (map_attr_string): Add an optional argument that passes back
2199 the associated iterator.
2200 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
2201 (md_reader::handle_overloaded_name, add_overload_instance): New
2203 (apply_iterators): Handle '@' names. Report an error if '@'
2204 is used without iterators.
2205 (initialize_iterators): Initialize the new iterator_group fields.
2206 * genopinit.c (handle_overloaded_code_for)
2207 (handle_overloaded_gen): New functions.
2208 (main): Use them to print declarations of maybe_code_for_* and
2209 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
2210 * genemit.c (print_overload_arguments, print_overload_test)
2211 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
2212 (main): Use it to print definitions of maybe_code_for_* and
2213 maybe_gen_* functions.
2214 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
2215 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
2216 instead of explicit mode checks.
2217 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
2218 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
2219 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
2220 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
2221 (aarch64_expand_compare_and_swap): Likewise
2222 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
2223 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
2224 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
2225 (aarch64_constant_pool_reload_icode): Delete.
2226 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
2227 instead of aarch64_constant_pool_reload_icode. Use
2228 code_for_aarch64_reload_mov instead of explicit mode checks.
2229 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
2230 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
2231 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
2232 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
2233 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
2234 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
2235 (aarch64_atomic_load_op_code): Delete.
2236 (aarch64_emit_atomic_load_op): Likewise.
2237 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
2238 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
2239 instead of aarch64_emit_atomic_load_op.
2240 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
2241 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
2242 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
2243 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
2244 character before the pattern name.
2245 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
2246 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
2247 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
2248 (aarch64_frecps<mode>): Likewise.
2249 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
2250 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
2251 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
2252 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
2253 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
2255 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
2257 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
2258 Allow HFmode constants if TARGET_FP_F16INST.
2260 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
2263 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
2264 No longer check last store for clobber of address register.
2266 2018-08-02 Martin Liska <mliska@suse.cz>
2268 PR gcov-profile/86817
2269 * gcov.c (process_all_functions): New function.
2271 (process_file): Move functions processing to
2272 process_all_functions.
2274 2018-08-02 David Malcolm <dmalcolm@redhat.com>
2276 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
2277 "const" to the "gimple *" and "rtx_insn *" parameters.
2278 * dumpfile.h (dump_user_location_t::dump_user_location_t):
2280 (dump_location_t::dump_location_t): Likewise.
2282 2018-08-01 Martin Sebor <msebor@redhat.com>
2284 PR tree-optimization/86650
2285 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
2286 rather than a "gcall *". Directly pass the data of interest
2287 to percent_K_format, rather than building a temporary CALL_EXPR
2289 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
2290 (gimple_fold_builtin_strncat): Adjust.
2291 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
2292 gcall* argument with gimple*.
2293 * gimple-ssa-warn-restrict.c (check_call): Same.
2294 (wrestrict_dom_walker::before_dom_children): Same.
2295 (builtin_access::builtin_access): Same.
2296 (check_bounds_or_overlap): Same
2297 (maybe_diag_overlap): Same.
2298 (maybe_diag_offset_bounds): Same.
2299 * tree-diagnostic.c (default_tree_printer): Move usage of
2300 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
2302 * tree-pretty-print.c (percent_K_format): Add argument.
2303 * tree-pretty-print.h: Add argument.
2304 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
2305 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
2306 (maybe_diag_stxncpy_trunc): Same.
2307 (handle_builtin_stxncpy): Same.
2308 (handle_builtin_strcat): Same.
2310 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2312 * match.pd: Optimise pointer range checks.
2314 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2316 PR tree-optimization/86758
2317 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
2318 to remove pattern statements.
2320 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2322 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
2323 result of dfs_enumerate_from when constructing stmt_vec_infos,
2324 instead of additionally calling get_loop_body.
2326 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2328 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
2330 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
2331 When creating an iv, assert that the step is not known to be zero.
2332 (vect_setup_realignment): Update call accordingly.
2333 * tree-vect-stmts.c (vectorizable_store): Likewise.
2334 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
2336 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2338 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
2339 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
2340 (vectorizable_reduction): Likewise.
2341 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2342 (vect_detect_hybrid_slp_stmts): Likewise.
2343 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2345 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
2347 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
2348 (wide_int_set_zero_nonzero_bits): ...this.
2349 (zero_nonzero_bits_from_vr): Rename to...
2350 (vrp_set_zero_nonzero_bits): ...this.
2351 (extract_range_from_multiplicative_op_1): Abstract wide int
2353 (wide_int_range_multiplicative_op): ...here.
2354 (extract_range_from_binary_expr_1): Extract wide int binary
2355 operations into their own functions.
2356 (wide_int_range_lshift): New.
2357 (wide_int_range_can_optimize_bit_op): New.
2358 (wide_int_range_shift_undefined_p): New.
2359 (wide_int_range_bit_xor): New.
2360 (wide_int_range_bit_ior): New.
2361 (wide_int_range_bit_and): New.
2362 (wide_int_range_trunc_mod): New.
2363 (extract_range_into_wide_ints): New.
2364 (vrp_shift_undefined_p): New.
2365 (extract_range_from_multiplicative_op): New.
2366 (vrp_can_optimize_bit_op): New.
2367 * tree-vrp.h (value_range::dump): New.
2368 (wide_int_range_multiplicative_op): New.
2369 (wide_int_range_lshift):New.
2370 (wide_int_range_shift_undefined_p): New.
2371 (wide_int_range_bit_xor): New.
2372 (wide_int_range_bit_ior): New.
2373 (wide_int_range_bit_and): New.
2374 (wide_int_range_trunc_mod): New.
2375 (zero_nonzero_bits_from_bounds): Rename to...
2376 (wide_int_set_zero_nonzero_bits): ...this.
2377 (zero_nonzero_bits_from_vr): Rename to...
2378 (vrp_set_zero_nonzero_bits): ...this.
2379 (range_easy_mask_min_max): Rename to...
2380 (wide_int_range_can_optimize_bit_op): this.
2381 * vr-values.c (simplify_bit_ops_using_ranges): Rename
2382 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
2384 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2386 * tree-vectorizer.h (vect_orig_stmt): New function.
2387 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
2388 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
2389 (vect_create_epilog_for_reduction): Likewise.
2390 (vectorizable_live_operation): Likewise.
2391 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
2392 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
2393 * tree-vect-stmts.c (vectorizable_call): Likewise.
2394 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
2396 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2398 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
2400 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
2401 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
2402 (vect_transform_loop): Likewise.
2403 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
2405 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2407 * tree-vectorizer.h (vect_schedule_slp): Return void.
2408 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
2409 (vect_schedule_slp): Likewise.
2411 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2413 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
2415 (vect_transform_loop): Update calls accordingly. Schedule SLP
2416 instances before the main loop, if any exist.
2418 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2420 PR tree-optimization/86749
2421 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
2422 If the lhs is used in a COND_EXPR, check that it is being used
2423 as the "then" or "else" value.
2425 2018-08-01 Tom de Vries <tdevries@suse.de>
2428 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
2429 speculation_safe_value_not_needed.
2431 2018-08-01 Richard Biener <rguenther@suse.de>
2433 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
2436 2018-08-01 Martin Liska <mliska@suse.cz>
2438 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
2439 format how successful transformation is dumped.
2440 (gimple_mod_pow2_value_transform): Likewise.
2441 (gimple_mod_subtract_transform): Likewise.
2442 (gimple_stringops_transform): Likewise.
2444 2018-08-01 Martin Liska <mliska@suse.cz>
2447 * value-prof.c (interesting_stringop_to_profile_p):
2448 Simplify the code and add BUILT_IN_MEMMOVE.
2449 (gimple_stringops_transform): Likewise.
2451 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
2453 * config/aarch64/aarch64-simd.md
2454 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
2455 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
2456 use GPI iterator instead of SI mode.
2458 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
2460 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
2461 rs6000_speculation_barrier.
2462 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
2463 new barrier pattern name.
2465 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
2467 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
2468 (speculation_barrier): New insn.
2470 2018-08-01 Richard Biener <rguenther@suse.de>
2473 * graphite.h: Include isl/id.h and isl/space.h to allow build
2476 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
2479 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
2480 mode for COFF targets.
2481 * defaults.h (TARGET_COFF): Define.
2482 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
2483 TARGET_COFF): Define.
2484 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
2485 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
2486 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
2488 2018-07-31 Alexandre Oliva <oliva@adacore.com>
2490 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
2491 * gimple-streamer-out.c (output_bb): Save it.
2492 * lto-streamer-in.c (input_struct_function_base): Restore
2493 instance discriminator if available. Create map on demand.
2494 * lto-streamer-out.c (output_struct_function_base): Save it if
2496 * final.c (decl_to_instance_map): Document LTO strategy.
2498 2018-07-31 Alexandre Oliva <oliva@adacore.com>
2499 Olivier Hainque <hainque@adacore.com>
2501 * debug.h (decl_to_instance_map_t): New type.
2502 (decl_to_instance_map): Declare.
2503 (maybe_create_decl_to_instance_map): New inline function.
2504 * final.c (bb_discriminator, last_bb_discriminator): New statics,
2505 to track basic block discriminators.
2506 (final_start_function_1): Initialize them.
2507 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
2509 (decl_to_instance_map): New variable.
2510 (map_decl_to_instance, maybe_set_discriminator): New functions.
2511 (notice_source_line): Set discriminator.
2513 2018-07-31 Ian Lance Taylor <iant@golang.org>
2515 * targhooks.c (default_have_speculation_safe_value): Add
2518 2018-07-31 David Malcolm <dmalcolm@redhat.com>
2520 * dump-context.h: Include "pretty-print.h".
2521 (dump_context::refresh_dumps_are_enabled): New decl.
2522 (dump_context::emit_item): New decl.
2523 (class dump_context): Add fields "m_test_pp" and
2525 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
2526 (temp_dump_context::get_dumped_text): New decl.
2527 (class temp_dump_context): Add field "m_pp".
2528 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
2529 (dump_context::refresh_dumps_are_enabled): ...and add a test for
2531 (set_dump_file): Update for above change.
2532 (set_alt_dump_file): Likewise.
2533 (dump_loc): New overload, taking a pretty_printer *.
2534 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
2535 to any test pretty-printer.
2536 (make_item_for_dump_gimple_stmt): New function, adapted from
2537 optinfo::add_gimple_stmt.
2538 (dump_context::dump_gimple_stmt): Call it, and use the result,
2539 eliminating the direct usage of dump_file and alt_dump_file in
2540 favor of indirectly using them via emit_item.
2541 (make_item_for_dump_gimple_expr): New function, adapted from
2542 optinfo::add_gimple_expr.
2543 (dump_context::dump_gimple_expr): Call it, and use the result,
2544 eliminating the direct usage of dump_file and alt_dump_file in
2545 favor of indirectly using them via emit_item.
2546 (make_item_for_dump_generic_expr): New function, adapted from
2548 (dump_context::dump_generic_expr): Call it, and use the result,
2549 eliminating the direct usage of dump_file and alt_dump_file in
2550 favor of indirectly using them via emit_item.
2551 (make_item_for_dump_printf_va): New function, adapted from
2552 optinfo::add_printf_va.
2553 (make_item_for_dump_printf): New function.
2554 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
2555 and use the result, eliminating the direct usage of dump_file and
2556 alt_dump_file in favor of indirectly using them via emit_item.
2557 (make_item_for_dump_dec): New function.
2558 (dump_context::dump_dec): Call it, and use the result,
2559 eliminating the direct usage of dump_file and alt_dump_file in
2560 favor of indirectly using them via emit_item.
2561 (make_item_for_dump_symtab_node): New function, adapted from
2562 optinfo::add_symtab_node.
2563 (dump_context::dump_symtab_node): Call it, and use the result,
2564 eliminating the direct usage of dump_file and alt_dump_file in
2565 favor of indirectly using them via emit_item.
2566 (dump_context::begin_scope): Reimplement, avoiding direct usage
2567 of dump_file and alt_dump_file in favor of indirectly using them
2569 (dump_context::emit_item): New member function.
2570 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
2571 Set up test pretty-printer on the underlying context. Call
2572 refresh_dumps_are_enabled.
2573 (temp_dump_context::~temp_dump_context): Call
2574 refresh_dumps_are_enabled.
2575 (temp_dump_context::get_dumped_text): New member function.
2576 (selftest::verify_dumped_text): New function.
2577 (ASSERT_DUMPED_TEXT_EQ): New macro.
2578 (selftest::test_capture_of_dump_calls): Run all tests twice, with
2579 and then without optinfo enabled. Add uses of
2580 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
2581 * dumpfile.h: Update comment for the dump_* API.
2582 * optinfo-emit-json.cc
2583 (selftest::test_building_json_from_dump_calls): Update for new
2584 param for temp_dump_context ctor.
2585 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
2586 and "m_owned" field.
2587 (optinfo_item::~optinfo_item): Likewise.
2588 (optinfo::add_item): New member function.
2589 (optinfo::emit): Update comment.
2590 (optinfo::add_string): Delete.
2591 (optinfo::add_printf): Delete.
2592 (optinfo::add_printf_va): Delete.
2593 (optinfo::add_gimple_stmt): Delete.
2594 (optinfo::add_gimple_expr): Delete.
2595 (optinfo::add_tree): Delete.
2596 (optinfo::add_symtab_node): Delete.
2597 (optinfo::add_dec): Delete.
2598 * optinfo.h (class dump_context): New forward decl.
2599 (optinfo::add_item): New decl.
2600 (optinfo::add_string): Delete.
2601 (optinfo::add_printf): Delete.
2602 (optinfo::add_printf_va): Delete.
2603 (optinfo::add_gimple_stmt): Delete.
2604 (optinfo::add_gimple_expr): Delete.
2605 (optinfo::add_tree): Delete.
2606 (optinfo::add_symtab_node): Delete.
2607 (optinfo::add_dec): Delete.
2608 (optinfo::add_poly_int): Delete.
2609 (optinfo_item::optinfo_item): Remove "owned" param.
2610 (class optinfo_item): Remove field "m_owned".
2612 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2615 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
2616 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
2617 requested variable alignment.
2618 (expand_one_ssa_partition): Likewise.
2619 (expand_one_var): Likewise.
2621 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2623 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
2624 to speculation_safe_value_not_needed.
2626 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2628 * targhooks.h (speculation_safe_value_not_needed): New prototype.
2629 * targhooks.c (speculation_safe_value_not_needed): New function.
2630 * target.def (have_speculation_safe_value): Update documentation.
2631 * doc/tm.texi: Regenerated.
2633 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2635 * config/aarch64/iterators.md (ALLI_TI): New iterator.
2636 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
2638 (despeculate_copy<ALLI:mode>_insn): New insn.
2639 (despeculate_copyti_insn): New insn.
2640 (despeculate_simple<ALLI:mode>): New insn
2641 (despeculate_simpleti): New insn.
2642 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
2644 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
2645 aarch64_speculation_safe_value.
2646 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
2648 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2650 * config/aarch64/aarch64-speculation.cc: New file.
2651 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
2652 before pass_reorder_blocks.
2653 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
2655 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
2656 X14 and X15 when tracking speculation.
2657 * config/aarch64/aarch64.md (register name constants): Add
2658 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
2659 (unspec): Add UNSPEC_SPECULATION_TRACKER.
2660 (speculation_barrier): New insn attribute.
2661 (cmp<mode>): Allow SP in comparisons.
2662 (speculation_tracker): New insn.
2663 (speculation_barrier): Add speculation_barrier attribute.
2664 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
2665 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
2666 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
2668 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2670 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
2671 aarch64_track_speculation is true.
2672 (tb<optab><mode>1): Likewise.
2673 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
2674 generate CB[N]Z when tracking speculation.
2675 (aarch64_split_compare_and_swap): Likewise.
2676 (aarch64_split_atomic_op): Likewise.
2678 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2680 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
2682 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2684 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
2685 (speculation_barrier): New insn.
2687 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2689 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
2690 * config/arm/arm.md (speculation_barrier): New expand.
2691 (speculation_barrier_insn): New pattern.
2693 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2695 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
2696 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
2697 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
2698 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
2700 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
2701 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
2702 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
2703 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
2704 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
2705 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
2706 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
2707 * builtins.c (expand_speculation_safe_value): New function.
2708 (expand_builtin): Call it.
2709 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
2710 * doc/extend.texi: Document __builtin_speculation_safe_value.
2711 * doc/md.texi: Document "speculation_barrier" pattern.
2712 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
2713 TARGET_HAVE_SPECULATION_SAFE_VALUE.
2714 * doc/tm.texi: Regenerated.
2715 * target.def (have_speculation_safe_value, speculation_safe_value): New
2717 * targhooks.c (default_have_speculation_safe_value): New function.
2718 (default_speculation_safe_value): New function.
2719 * targhooks.h (default_have_speculation_safe_value): Add prototype.
2720 (default_speculation_safe_value): Add prototype.
2722 2018-07-31 David Malcolm <dmalcolm@redhat.com>
2724 * dump-context.h (dump_context::dump_loc): New decl.
2725 * dumpfile.c (dump_context::dump_loc): New member function.
2726 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
2727 and dump_gimple_stmt.
2728 (dump_context::dump_gimple_expr_loc): Likewise, using
2730 (dump_context::dump_generic_expr_loc): Likewise, using
2732 (dump_context::dump_printf_loc_va): Likewise, using
2734 (dump_context::begin_scope): Explicitly using the global function
2735 "dump_loc", rather than the member function.
2737 2018-07-31 Martin Sebor <msebor@redhat.com>
2739 PR tree-optimization/86741
2740 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
2742 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
2744 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
2745 depend on whether prefetch instructions will be emitted or not.
2746 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
2747 will be emitted or not.
2748 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
2749 (TARGET_SETMEM_PFD): New macros.
2751 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2753 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
2754 (NULL_STMT_VEC_INFO): Delete.
2755 (stmt_vec_info::operator*): Likewise.
2756 (stmt_vec_info::operator gimple *): Likewise.
2757 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
2758 of NULL_STMT_VEC_INFO.
2759 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2760 (vect_reassociating_reduction_p): Likewise.
2761 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
2762 (vectorizable_store): Likewise.
2763 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
2764 (vec_info::free_stmt_vec_infos): Likewise.
2766 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2768 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
2769 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
2771 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2773 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
2774 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
2775 (vec_info::free_stmt_vec_info): New private member functions.
2776 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
2777 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
2778 * tree-parloops.c (gather_scalar_reductions): Remove calls to
2779 set_stmt_vec_info_vec and free_stmt_vec_infos.
2780 * tree-vect-loop.c (_loop_vec_info): Remove call to
2781 set_stmt_vec_info_vec.
2782 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
2783 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
2784 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
2785 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
2786 (vec_info::free_stmt_vec_info): ...these new functions. Remove
2787 assignments in {vec_info::,}new_stmt_vec_info that are redundant
2788 with the clearing in the xcalloc.
2789 (stmt_vec_info_vec): Delete.
2790 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
2791 (vectorize_loops): Likewise.
2792 (vec_info::~vec_info): Remove argument from call to
2793 free_stmt_vec_infos.
2794 (vec_info::add_stmt): Remove vinfo argument from call to
2797 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2799 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
2800 rather than a gimple stmt.
2801 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
2802 information for pattern statements when passed the original
2803 statement; instead wait to be passed the pattern statement itself.
2804 Don't call set_vinfo_for_stmt here.
2805 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
2806 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
2807 stmt_vec_infos here.
2808 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
2809 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
2810 stmt_vec_infos entry.
2812 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2814 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
2815 * tree-vectorizer.c (vec_info::replace_stmt): New function.
2816 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
2817 * tree-vect-stmts.c (vectorizable_call): Likewise.
2818 (vectorizable_simd_clone_call): Likewise.
2820 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2822 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
2823 * tree-vectorizer.c (vec_info::remove_stmt): New function.
2824 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
2825 * tree-vect-loop.c (vect_transform_loop): Likewise.
2826 * tree-vect-slp.c (vect_schedule_slp): Likewise.
2827 * tree-vect-stmts.c (vect_remove_stores): Likewise.
2829 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2831 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
2832 (vect_dr_stmt): Delete.
2833 * tree-vectorizer.c (vec_info::lookup_dr): New function.
2834 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
2836 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
2837 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
2838 (vect_verify_datarefs_alignment, vect_peeling_supportable)
2839 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
2840 (vect_analyze_data_refs): Likewise.
2841 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
2843 (vect_find_same_alignment_drs): Likewise.
2844 (vect_slp_analyze_node_dependences): Update calls accordingly.
2845 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
2846 instead of DR_VECT_AUX.
2847 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
2848 of a vector data references. Use vec_info::lookup_dr instead of
2850 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
2851 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
2852 instead of DR_VECT_AUX.
2854 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2856 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
2858 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
2860 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2861 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2862 (vect_gen_prolog_loop_niters): Likewise.
2864 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2866 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
2867 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
2868 (vect_known_alignment_in_bytes, vect_dr_behavior)
2869 (vect_get_scalar_dr_size): Take references as dr_vec_infos
2870 instead of data_references. Update calls to other routines for
2871 which the same change has been made.
2872 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
2873 dr_vec_infos instead of stmt_vec_infos.
2874 (vect_analyze_data_ref_dependence): Update call accordingly.
2875 (vect_slp_analyze_data_ref_dependence)
2876 (vect_record_base_alignments): Use DR_VECT_AUX.
2877 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
2878 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
2879 (vector_alignment_reachable_p, vect_get_data_access_cost)
2880 (vect_peeling_supportable, vect_analyze_group_access_1)
2881 (vect_analyze_group_access, vect_analyze_data_ref_access)
2882 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
2883 (vect_compile_time_alias, vect_small_gap_p)
2884 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
2885 (vect_supportable_dr_alignment): Take references as dr_vec_infos
2886 instead of data_references. Update calls to other routines for
2887 which the same change has been made.
2888 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
2889 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
2890 (vect_slp_analyze_and_verify_node_alignment)
2891 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
2892 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
2893 (vect_setup_realignment): Use dr_vec_infos. Update calls after
2895 (_vect_peel_info::dr): Replace with...
2896 (_vect_peel_info::dr_info): ...this new field.
2897 (vect_peeling_hash_get_most_frequent)
2898 (vect_peeling_hash_choose_best_peeling): Update accordingly.
2899 (vect_peeling_hash_get_lowest_cost):
2900 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
2901 routines for which the same change has been made.
2902 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
2904 * tree-vect-loop-manip.c (get_misalign_in_elems)
2905 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
2907 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2908 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
2909 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
2910 (get_group_load_store_type, get_negative_load_store_type)
2911 (vect_get_data_ptr_increment, vectorizable_store)
2912 (vectorizable_load): Likewise.
2913 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
2914 Update calls to other routines for which the same change has been made.
2916 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2918 * tree-vectorizer.h (vec_info::move_dr): New member function.
2919 (dataref_aux): Rename to...
2920 (dr_vec_info): ...this and add "dr" and "stmt" fields.
2921 (_stmt_vec_info::dr_aux): Update accordingly.
2922 (_stmt_vec_info::data_ref_info): Delete.
2923 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
2924 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
2925 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
2926 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
2928 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
2929 (STMT_VINFO_DR_INFO): New macro.
2930 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
2931 (set_dr_misalignment): Update after rename of dataref_aux.
2932 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
2933 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
2934 initialization of STMT_VINFO_DATA_REF.
2935 * tree-vectorizer.c (vec_info::move_dr): New function.
2936 * tree-vect-patterns.c (vect_recog_bool_pattern)
2937 (vect_recog_mask_conversion_pattern)
2938 (vect_recog_gather_scatter_pattern): Use it.
2939 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
2940 the "dr" and "stmt" fields of dr_vec_info instead of
2941 STMT_VINFO_DATA_REF.
2943 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2945 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
2946 (is_pattern_stmt_p): Use it.
2947 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
2948 on pattern statements.
2950 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2952 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
2953 original stmt as a stmt_vec_info rather than a gimple stmt.
2954 (vect_pattern_recog_1): Take the statement directly as a
2955 stmt_vec_info, rather than via a gimple_stmt_iterator.
2956 Update call to vect_mark_pattern_stmts.
2957 (vect_pattern_recog): Update calls accordingly.
2959 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2961 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
2962 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
2963 a vect_def_type for the first argument.
2964 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
2965 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
2966 operand if it isn't defined by a vectorized statement.
2967 (vect_build_gather_load_calls): Remove the mask_dt argument and
2968 update calls to vect_get_vec_def_for_stmt_copy.
2969 (vectorizable_bswap): Likewise the dt argument.
2970 (vectorizable_call): Update calls to vectorizable_bswap and
2971 vect_get_vec_def_for_stmt_copy.
2972 (vectorizable_simd_clone_call, vectorizable_assignment)
2973 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
2974 (vectorizable_comparison): Update calls to
2975 vect_get_vec_def_for_stmt_copy.
2976 (vectorizable_store): Likewise. Remove now-unnecessary calls to
2978 (vect_get_loop_based_defs): Remove dt argument and update call
2979 to vect_get_vec_def_for_stmt_copy.
2980 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
2981 and vect_get_vec_def_for_stmt_copy.
2982 (vectorizable_load): Update calls to vect_build_gather_load_calls
2983 and vect_get_vec_def_for_stmt_copy.
2984 * tree-vect-loop.c (vect_create_epilog_for_reduction)
2985 (vectorizable_reduction, vectorizable_live_operation): Update calls
2986 to vect_get_vec_def_for_stmt_copy.
2988 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2990 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
2991 and gimple stmt arguments with a stmt_vec_info.
2992 (vect_record_base_alignments): Update calls accordingly.
2993 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
2994 and gimple stmt arguments with a stmt_vec_info.
2995 (vect_build_slp_tree_1): Remove vinfo argument and update call
2996 to vect_record_max_nunits.
2997 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
2998 and vect_record_max_nunits.
3000 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3002 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
3003 file and take a stmt_vec_info instead of a gimple stmt.
3004 (supportable_widening_operation, vect_finish_replace_stmt)
3005 (vect_finish_stmt_generation, vect_get_store_rhs)
3006 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
3007 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
3008 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
3009 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
3010 (vect_create_data_ref_ptr, bump_vector_ptr)
3011 (vect_permute_store_chain, vect_setup_realignment)
3012 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
3013 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
3014 (vectorizable_reduction, vectorizable_induction)
3015 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
3016 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
3017 than gimple stmts as arguments.
3018 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
3019 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
3020 (can_group_stmts_p, vect_check_gather_scatter)
3021 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3022 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
3023 (vect_permute_load_chain, vect_shift_permute_load_chain)
3024 (vect_transform_grouped_load)
3025 (vect_record_grouped_load_vectors): Likewise.
3026 * tree-vect-loop.c (vect_fixup_reduc_chain)
3027 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
3028 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
3029 (vectorizable_reduction, vectorizable_induction)
3030 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
3031 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
3032 (vect_get_load_store_mask): Likewise.
3033 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
3034 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
3035 * tree-vect-stmts.c (vect_mark_relevant)
3036 (is_simple_and_all_uses_invariant)
3037 (exist_non_indexing_operands_for_use_p, process_use)
3038 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
3039 (vect_get_vec_def_for_operand, vect_get_vec_defs)
3040 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
3041 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
3042 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
3043 (get_negative_load_store_type, get_load_store_type)
3044 (vect_check_load_store_mask, vect_check_store_rhs)
3045 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
3046 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3047 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3048 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3049 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
3050 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
3051 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
3052 (supportable_widening_operation): Likewise.
3054 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3056 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
3057 a stmt_vec_info instead of a gcall.
3058 (vect_check_gather_scatter): Update call accordingly.
3059 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
3061 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
3062 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
3063 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
3064 instead of a gimple stmt.
3065 (vect_transform_loop): Update calls accordingly.
3066 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
3067 stmt_vec_infos instead of gimple stmts.
3068 (vect_analyze_slp_instance): Update use accordingly.
3069 * tree-vect-stmts.c (read_vector_array, write_vector_array)
3070 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
3071 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
3072 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
3073 (vect_gen_widened_results_half, vect_get_loop_based_defs)
3074 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
3075 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
3076 down to subroutines.
3078 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3080 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
3081 of the worklist from a vector of gimple stmts to a vector of
3083 * tree-vect-stmts.c (vect_mark_relevant, process_use)
3084 (vect_mark_stmts_to_be_vectorized): Likewise
3086 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3088 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
3089 statement before passing it to vect_analyze_stmt.
3090 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
3091 the chain of phi vector definitions. Track the exit phi via its
3093 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
3094 STMT_VINFO_REDUC_DEF.
3095 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
3096 stmt_vec_infos to handle the statement chains.
3097 (vect_get_slp_defs): Record the first statement in the node
3098 using a stmt_vec_info.
3099 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
3100 statements here and pass their stmt_vec_info down to subroutines.
3101 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
3102 down to vect_finish_stmt_generation.
3103 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
3104 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
3105 stmt_vec_infos to subroutines.
3106 (vect_remove_stores): Use stmt_vec_infos to handle the statement
3109 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3111 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
3112 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
3113 (vect_permute_store_chain, vect_setup_realignment)
3114 (vect_permute_load_chain, vect_shift_permute_load_chain)
3115 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
3116 stmts internally, and when passing values to other vectorizer routines.
3117 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
3118 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
3119 (vect_analyze_loop_operations, get_initial_def_for_reduction)
3120 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
3121 (vectorizable_reduction, vectorizable_induction)
3122 (vectorizable_live_operation, vect_transform_loop_stmt)
3123 (vect_transform_loop): Likewise.
3124 * tree-vect-patterns.c (vect_reassociating_reduction_p)
3125 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
3126 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
3127 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3128 (vect_slp_analyze_node_operations_1): Likewise.
3129 * tree-vect-stmts.c (vect_mark_relevant, process_use)
3130 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
3131 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
3132 (vect_finish_stmt_generation_1, get_group_load_store_type)
3133 (get_load_store_type, vect_build_gather_load_calls)
3134 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3135 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3136 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3137 (vectorizable_store, vectorizable_load, vectorizable_condition)
3138 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
3139 (supportable_widening_operation): Likewise.
3140 (vect_get_vector_types_for_stmt): Likewise.
3141 * tree-vectorizer.h (vect_dr_behavior): Likewise.
3143 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3145 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
3146 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
3147 (vect_permute_store_chain, vect_permute_load_chain)
3148 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
3149 repeated stmt_vec_info lookups.
3150 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
3151 (vect_update_ivs_after_vectorizer): Likewise.
3152 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
3153 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
3154 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
3155 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3156 (vect_bb_slp_scalar_cost): Likewise.
3157 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
3159 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3161 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
3162 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
3163 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
3164 to get gassigns and gcalls, rather than operating on generc gimple
3166 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
3167 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
3168 (vectorizable_load, vect_analyze_stmt): Likewise.
3169 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
3171 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3173 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
3174 return stmt_vec_infos rather than gimple stmts. Do not accept
3176 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
3178 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3179 Update use of get_later_stmt.
3180 (vect_get_constant_vectors): Update call accordingly.
3181 (vect_schedule_slp_instance): Likewise
3182 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
3183 (vect_slp_analyze_instance_dependence): Likewise.
3184 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
3186 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3188 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
3189 (stmt_info_for_cost::stmt_info): ...this new field.
3190 (add_stmt_costs): Update accordingly.
3191 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
3192 (vect_get_known_peeling_cost): Likewise.
3193 (vect_estimate_min_profitable_iters): Likewise.
3194 * tree-vect-stmts.c (record_stmt_cost): Likewise.
3196 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3198 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
3199 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3200 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3202 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
3204 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3206 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
3207 a gimple stmt to a stmt_vec_info.
3208 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
3210 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3212 * tree-vectorizer.h (vec_info::grouped_stores): Change from
3213 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3214 (_loop_vec_info::reduction_chains): Likewise.
3215 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
3217 * tree-vect-slp.c (vect_analyze_slp): Likewise.
3219 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3221 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
3222 a gimple stmt to a stmt_vec_info.
3223 (_stmt_vec_info::next_element): Likewise.
3224 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
3225 (vect_slp_analyze_and_verify_node_alignment)
3226 (vect_analyze_group_access_1, vect_analyze_group_access)
3227 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
3228 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
3229 (vect_supportable_dr_alignment): Update accordingly.
3230 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
3231 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
3232 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
3233 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
3234 * tree-vect-slp.c (vect_build_slp_tree_1)
3235 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
3236 (vect_split_slp_store_group, vect_analyze_slp_instance)
3237 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
3238 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
3239 (get_group_load_store_type, get_load_store_type)
3240 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
3241 (vect_transform_stmt, vect_remove_stores): Likewise.
3243 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3245 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
3247 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
3248 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
3249 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
3250 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
3251 (vector_alignment_reachable_p, vect_get_data_access_cost)
3252 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
3253 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
3254 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3255 (vect_analyze_group_access_1, vect_analyze_group_access)
3256 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
3257 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
3258 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
3259 result of vect_dr_stmt and use the stmt_vec_info instead of
3260 the associated gimple stmt.
3261 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3262 (vect_gen_prolog_loop_niters): Likewise.
3263 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3265 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3267 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
3268 to a vec<stmt_vec_info>.
3269 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
3270 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
3272 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
3273 to a vec<stmt_vec_info>.
3274 (bst_traits::value_type, bst_traits::value_type): Likewise.
3275 (bst_traits::hash): Update accordingly.
3276 (vect_get_and_check_slp_defs): Change the stmts parameter from
3277 a vec<gimple *> to a vec<stmt_vec_info>.
3278 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
3279 (vect_build_slp_tree): Likewise.
3280 (vect_build_slp_tree_2): Likewise. Update uses of
3281 SLP_TREE_SCALAR_STMTS.
3282 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
3283 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
3284 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
3285 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
3286 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
3287 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
3288 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
3289 (vect_get_constant_vectors, vect_get_slp_defs)
3290 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
3291 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
3292 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
3293 instead of gimple stmts.
3294 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
3295 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
3296 (vect_slp_analyze_instance_dependence): Update uses of
3297 SLP_TREE_SCALAR_STMTS.
3298 (vect_slp_analyze_and_verify_node_alignment): Likewise.
3299 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
3300 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
3301 (get_initial_defs_for_reduction): Likewise.
3302 (vect_create_epilog_for_reduction): Likewise.
3303 (vectorize_fold_left_reduction): Likewise.
3304 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
3305 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
3306 (can_vectorize_live_stmts): Likewise.
3308 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3310 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
3311 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3312 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
3314 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
3316 (gather_scalar_reductions): Update after above interface changes.
3317 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
3318 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
3320 (vect_force_simple_reduction): Likewise.
3321 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
3322 LOOP_VINFO_REDUCTIONS.
3323 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3325 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3327 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
3328 a gimple stmt to a stmt_vec_info.
3329 * tree-vect-loop.c (vect_active_double_reduction_p)
3330 (vect_force_simple_reduction, vectorizable_reduction): Update
3333 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3335 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
3336 vec<gimple *> to a vec<stmt_vec_info>.
3337 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
3338 the reduction_phis argument from a vec<gimple *> to a
3340 (vectorizable_reduction): Likewise the phis local variable that
3341 is passed to vect_create_epilog_for_reduction. Update for new type
3342 of SLP_TREE_VEC_STMTS.
3343 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
3344 (vectorizable_live_operation): Likewise.
3345 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
3346 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
3348 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3350 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
3351 a gimple stmt to a stmt_vec_info.
3352 (vectorizable_condition, vectorizable_live_operation)
3353 (vectorizable_reduction, vectorizable_induction): Pass back the
3354 vectorized statement as a stmt_vec_info.
3355 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
3356 use of STMT_VINFO_VEC_STMT.
3357 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
3358 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
3359 as stmt_vec_infos rather than gimple stmts.
3360 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
3362 (vectorizable_live_operation): Likewise.
3363 (vectorizable_reduction, vectorizable_induction): Likewise,
3364 updating use of STMT_VINFO_VEC_STMT.
3365 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
3366 of STMT_VINFO_VEC_STMT.
3367 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
3368 (vectorizable_simd_clone_call, vectorizable_conversion)
3369 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3370 (vectorizable_store, vectorizable_load, vectorizable_condition)
3371 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
3372 from a gimple stmt to a stmt_vec_info.
3373 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
3374 pointer to a stmt_vec_info to the vectorizable_* routines.
3376 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3378 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
3379 a gimple stmt to a stmt_vec_info.
3380 (is_pattern_stmt_p): Update accordingly.
3381 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
3382 (vect_record_grouped_load_vectors): Likewise.
3383 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
3384 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
3385 (vect_model_reduction_cost): Likewise.
3386 (vect_create_epilog_for_reduction): Likewise.
3387 (vectorizable_reduction, vectorizable_induction): Likewise.
3388 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3389 Return the stmt_vec_info for the pattern statement.
3390 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
3391 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
3392 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
3393 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
3394 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
3395 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
3396 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
3397 (free_stmt_vec_info, vect_is_simple_use): Likewise.
3399 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3401 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
3402 (vect_finish_stmt_generation): Likewise.
3403 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3404 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
3405 (vect_build_gather_load_calls): Use the return value of the above
3406 functions instead of a separate call to vinfo_for_stmt. Use narrow
3407 scopes for the input gimple stmt and wider scopes for the associated
3408 stmt_vec_info. Use vec_info::lookup_def when setting these
3409 stmt_vec_infos from an SSA_NAME definition.
3410 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3411 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3412 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3413 (vectorizable_store, vectorizable_load, vectorizable_condition)
3414 (vectorizable_comparison): Likewise.
3415 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
3416 (vectorizable_reduction): Likewise.
3418 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3420 * tree-vectorizer.h (vect_is_simple_use): Add an optional
3421 stmt_vec_info * parameter before the optional gimple **.
3422 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3423 (process_use, vect_get_vec_def_for_operand_1): Update callers.
3424 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
3425 * tree-vect-loop.c (vectorizable_reduction): Likewise.
3426 (vectorizable_live_operation): Likewise.
3427 * tree-vect-patterns.c (type_conversion_p): Likewise.
3428 (vect_look_through_possible_promotion): Likewise.
3429 (vect_recog_rotate_pattern): Likewise.
3430 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3432 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3434 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
3435 a typedef to a wrapper class.
3436 (NULL_STMT_VEC_INFO): New macro.
3437 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
3438 (stmt_vec_info::operator*): New function.
3439 (stmt_vec_info::operator gimple *): Likewise.
3440 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
3441 (add_stmt_costs): Likewise.
3442 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
3443 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
3444 (vect_get_known_peeling_cost): Likewise.
3445 (vect_estimate_min_profitable_iters): Likewise.
3446 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3447 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
3448 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3449 (vectorizable_store, free_stmt_vec_infos): Likewise.
3450 (new_stmt_vec_info): Change return type of xcalloc to
3453 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3455 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
3456 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
3457 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
3458 a single_imm_use-based sequence.
3459 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
3461 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3463 * tree-vectorizer.h (vec_info::lookup_def): Declare.
3464 * tree-vectorizer.c (vec_info::lookup_def): New function.
3465 * tree-vect-patterns.c (vect_get_internal_def): Use it.
3466 (vect_widened_op_tree): Likewise.
3467 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3468 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
3469 (vectorizable_reduction): Likewise.
3470 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
3472 (vect_is_slp_reduction): Update calls accordingly. Use
3473 vec_info::lookup_def.
3474 (vect_is_simple_reduction): Likewise
3475 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
3477 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3479 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
3480 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
3481 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
3483 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
3484 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
3485 (vect_update_vf_for_slp, vect_analyze_loop_operations)
3486 (vect_is_slp_reduction, vectorizable_induction)
3487 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
3488 * tree-vect-patterns.c (vect_init_pattern_stmt):
3489 (vect_determine_min_output_precision_1, vect_determine_precisions)
3490 (vect_pattern_recog): Likewise.
3491 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
3492 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
3493 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
3494 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
3495 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
3496 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
3497 info field from a loop to a loop_vec_info.
3499 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3501 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
3502 (vec_info::add_stmt): Declare.
3503 * tree-vectorizer.c (vec_info::add_stmt): New function.
3504 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
3505 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
3506 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
3507 (vectorizable_induction): Likewise.
3508 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
3509 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3510 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
3511 (vectorizable_load): Likewise.
3512 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3513 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
3514 (vect_recog_gather_scatter_pattern): Likewise.
3515 (append_pattern_def_seq): Likewise. Remove a check that is
3516 performed by add_stmt itself.
3518 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3520 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
3521 which make_ssa_name was called with new_stmt before new_stmt
3524 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3526 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
3528 (vect_is_slp_reduction): ...here...
3529 (vect_is_simple_reduction): ...and here. Remove repetition of tests
3530 that are already known to be false.
3532 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3534 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
3535 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
3536 STMT_VINFO_NUM_SLP_USES when it's true.
3537 (vect_free_slp_instance): Add a final_p parameter and pass it to
3539 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
3540 (vect_analyze_slp_instance): Likewise.
3541 (vect_slp_analyze_operations): Likewise.
3542 (vect_slp_analyze_bb_1): Likewise.
3543 * tree-vectorizer.c (vec_info): Likewise.
3544 * tree-vect-loop.c (vect_transform_loop): Likewise.
3546 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3548 * tree-vect-loop.c (vectorizable_reduction): Assert that the
3549 function is not called for second and subsequent members of
3552 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3554 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
3555 cases for nested loops from here to ...
3556 (vect_create_epilog_for_reduction): ...here. Only call
3557 vect_is_simple_use for inner-loop reductions.
3559 2018-07-31 Martin Liska <mliska@suse.cz>
3561 PR gcov-profile/85338
3562 PR gcov-profile/85350
3563 PR gcov-profile/85372
3564 * profile.c (struct location_triplet): New.
3565 (struct location_triplet_hash): Likewise.
3566 (output_location): Do not output a BB that
3567 is already recorded for a line.
3568 (branch_prob): Use streamed_locations.
3570 2018-07-31 Martin Liska <mliska@suse.cz>
3572 PR gcov-profile/85370
3573 * coverage.c (coverage_begin_function): Do not mark target
3574 clones as artificial functions.
3576 2018-07-31 Martin Liska <mliska@suse.cz>
3578 PR gcov-profile/83813
3579 PR gcov-profile/84758
3580 PR gcov-profile/85217
3581 PR gcov-profile/85332
3582 * profile.c (branch_prob): Do not record GOTO expressions
3583 for GIMPLE statements which locations are already streamed.
3585 2018-07-31 Olivier Hainque <hainque@adacore.com>
3587 * gcc.c (handle_spec_function): Accept a soft_matched_part
3588 argument, as do_spec_1. Pass it down to ...
3589 (eval_spec_function): Accept a soft_matched_part argument,
3590 and pass it down to ...
3591 (do_spec_2): Accept a soft_matched_part argument, and pass
3592 it down to do_spec_1.
3593 (do_spec_1): Pass soft_matched_part to handle_spec_function.
3594 (handle_braces): Update call to handle_spec_function.
3595 (driver::set_up_specs): Update calls to do_spec_2.
3596 (compare_debug_dump_opt_spec_function): Likewise.
3597 (compare_debug_self_opt_spec_function): Likewise.
3599 2018-07-31 Olivier Hainque <hainque@adacore.com>
3601 * common.opt (nolibc): New option.
3602 * doc/invoke.texi (Link Options): Document it.
3603 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
3604 * config/alpha/linux.h: Likewise.
3605 * config/arc/elf.h: Likewise.
3606 * config/arm/uclinux-elf.h: Likewise.
3607 * config/arm/unknown-elf.h: Likewise.
3608 * config/avr/avrlibc.h: Likewise.
3609 * config/bfin/bfin.h: Likewise.
3610 * config/bfin/linux.h: Likewise.
3611 * config/bfin/uclinux.h: Likewise.
3612 * config/darwin.h: Likewise.
3613 * config/darwin10.h: Likewise.
3614 * config/darwin12.h: Likewise.
3615 * config/gnu-user.h: Likewise.
3616 * config/lm32/uclinux-elf.h: Likewise.
3617 * config/pa/pa-hpux11.h: Likewise.
3618 * config/pa/pa64-hpux.h: Likewise.
3619 * config/sparc/sparc.h: Likewise.
3621 2018-07-31 Olivier Hainque <hainque@adacore.com>
3623 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
3624 undefined variables.
3626 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
3629 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
3632 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
3634 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
3635 terminated string literal.
3637 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
3639 PR rtl-optimization/85160
3640 * combine.c (is_just_move): New function.
3641 (try_combine): Allow combining two instructions into two if neither of
3642 the original instructions was a move.
3644 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
3647 * doc/extend.texi (Global Register Variables): Discourage use of type
3649 (Local Register Variables): Likewise.
3651 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
3653 PR tree-optimization/86506
3654 * hwint.h (ceil_log2): Resync with hwint.c implementation.
3656 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
3659 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
3660 hard_regno, make sure no insn between `from` and `to` clobbers it.
3662 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
3663 Tom de Vries <tdevries@suse.de>
3665 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
3666 (PTX_DEFAULT_RUNTIME_DIM): ... this.
3667 (nvptx_goacc_validate_dims): Set default worker and gang dims to
3668 PTX_DEFAULT_RUNTIME_DIM.
3669 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
3671 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
3673 * config/pa/pa.c (pa_output_addr_vec): Align address table.
3674 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
3675 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
3677 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
3679 * config/rs6000/constraints.md (wG constraint): Delete, no longer
3681 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
3682 predicate to reflect toc fusion has been deleted.
3683 (toc_fusion_mem_raw): Delete, no longer used.
3684 (toc_fusion_mem_wrapped): Likewise.
3685 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
3687 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
3688 Delete, no longer used.
3689 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
3690 meant to be used for toc fusion.
3691 (rs6000_debug_print_mode): Delete toc fusion debugging.
3692 (rs6000_debug_reg_global): Likewise.
3693 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
3694 fusion and secondary reload support that were never used.
3695 (rs6000_option_override_internal): Delete TOC fusion, that was only
3696 partially defined, and it did not work unless you also used the
3698 (rs6000_legitimate_address_p): Delete TOC fusion support.
3699 (rs6000_opt_masks): Likewise.
3700 (fusion_wrap_memory_address): Delete function, no longer used.
3701 (fusion_split_address); Delete TOC fusion support.
3702 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
3703 longer used with toc fusion being deleted.
3704 (TARGET_TOC_FUSION_FP): Likewise.
3705 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
3707 (toc fusion spliter): Delete TOC fusion support.
3708 (toc_fusionload_<mode>): Likewise.
3709 (toc_fusionload_di): Likewise.
3710 (fusion_gpr_load_<mode>): Delete generator function, this insn no
3711 longer needs to be named. Rename predicate to delete TOC fusion.
3712 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
3713 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
3714 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
3715 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
3716 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
3718 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
3720 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
3721 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
3722 __int128 in built-in function prototypes.
3723 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
3724 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
3726 2018-07-27 Martin Sebor <msebor@redhat.com>
3728 PR tree-optimization/86696
3729 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
3730 types, including enums.
3731 (handle_char_store): Be prepared for the above function to fail.
3733 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
3735 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
3736 when optimization level is lower than 2 or optimize for size.
3738 2018-07-26 Martin Sebor <msebor@redhat.com>
3740 PR tree-optimization/86043
3741 PR tree-optimization/86042
3742 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
3743 (get_string_cst_length): Rename...
3744 (get_min_string_length): ...to this. Add argument.
3745 (handle_char_store): Extend to handle multi-character stores by
3747 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
3748 * tree.h (initializer_zerop): Add argument.
3750 2018-07-26 Jakub Jelinek <jakub@redhat.com>
3753 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
3754 declare target to variables if they have always,{to,from,tofrom} map
3757 2018-07-26 Martin Liska <mliska@suse.cz>
3760 * lto-wrapper.c: Add linker_output as prefix
3761 for ltrans_output_file.
3763 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
3765 PR rtl-optimization/85805
3766 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
3767 value for hard registers if that was written in the same mode.
3769 2018-07-26 Martin Liska <mliska@suse.cz>
3771 PR gcov-profile/86536
3772 * gcov.c (format_gcov): Use printf format %.*f directly
3773 and do not handle special values.
3775 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3777 * common/config/arc/arc-common.c (arc_option_optimization_table):
3778 Update default optimizations for size.
3780 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3782 * config/arc/arc.md (movsf_insn): Add short instruction selection.
3783 * config/arc/constraints.md (CfZ): New constraint.
3784 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
3785 (subsf3_fpu): Likewise.
3786 (cmpsf_fpu): Likewise.
3787 (cmpsf_fpu_uneq): Likewise.
3789 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3791 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
3793 (arc_is_uncached_mem_p): uncached applies to both the variable and
3796 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3798 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
3801 2018-07-25 David Malcolm <dmalcolm@redhat.com>
3803 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
3804 field "m_scopes" from vec to auto_vec.
3806 2018-07-25 Martin Liska <mliska@suse.cz>
3808 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
3811 2018-07-25 Richard Biener <rguenther@suse.de>
3814 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
3815 special wrt context_die late.
3816 (gen_subprogram_die): Re-use DIEs in local scope.
3818 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
3820 PR tree-optimization/86644
3821 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
3823 2018-07-25 Martin Liska <mliska@suse.cz>
3826 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
3827 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
3829 2018-07-25 Martin Liska <mliska@suse.cz>
3832 * params.def: Explain ASan abbreviation and provide
3833 a documentation link.
3835 2018-07-24 Martin Sebor <msebor@redhat.com>
3837 PR tree-optimization/86622
3838 PR tree-optimization/86532
3839 * builtins.h (string_length): Declare.
3840 * builtins.c (c_strlen): Correct handling of non-constant offsets.
3841 (check_access): Be prepared for non-constant length ranges.
3842 (string_length): Make extern.
3843 * expr.c (string_constant): Only handle the minor non-constant
3844 array index. Use string_constant to compute the length of
3845 a generic string constant.
3847 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
3849 PR tree-optimization/86618
3850 * tree-vect-stmts.c (vectorizable_call): Don't take the address
3851 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
3853 2018-07-24 David Malcolm <dmalcolm@redhat.com>
3855 PR tree-optimization/86636
3856 * json.cc (json::object::set): Fix comment. Add assertions.
3857 (json::array::append): Move here from json.h. Add comment and an
3859 (json::string::string): Likewise.
3860 * json.h (json::array::append): Move to json.cc.
3861 (json::string::string): Likewise.
3862 * optinfo-emit-json.cc
3863 (optrecord_json_writer::impl_location_to_json): Assert that we
3864 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
3865 wrapper around it. Expand the location once, rather than three
3867 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
3868 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
3870 (optrecord_json_writer::optinfo_to_json): Likewise, in four
3871 places. Fix some overlong lines.
3873 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
3875 * config/aarch64/aarch64-simd.md
3876 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
3877 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
3878 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
3879 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
3880 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
3881 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
3882 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
3883 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
3884 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
3886 2018-07-24 Jakub Jelinek <jakub@redhat.com>
3889 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
3890 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
3891 and abs_d == d, do the power of two handling if profitable.
3893 2018-07-24 Richard Biener <rguenther@suse.de>
3895 * match.pd: Add BIT_FIELD_REF canonicalizations.
3897 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
3900 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
3902 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
3904 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
3905 terminated STRING_CST object.
3907 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
3909 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
3911 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
3913 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
3914 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
3915 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
3916 the elements into a register.
3917 (rs6000_split_v4si_init_di_reg): Delete.
3918 (rs6000_split_v4si_init): Delete.
3919 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
3920 (vsx_init_v4si): Rewrite as a define_expand.
3922 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
3924 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
3925 zero_extend argument from memory): New.
3927 2018-07-22 Martin Sebor <msebor@redhat.com>
3930 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
3931 diagnosing calls with unknown arguments unless -Walloca-larger-than
3932 is restricted to less than PTRDIFF_MAX bytes.
3934 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
3936 * doc/gcov.texi (Invoking Gcov): Editorial changes.
3938 2018-07-20 David Malcolm <dmalcolm@redhat.com>
3940 * pretty-print.c (text_info::set_location): Remove redundant
3941 "line_table" parameter from call to rich_location::set_range.
3943 2018-07-20 Martin Sebor <msebor@redhat.com>
3946 * builtins.c (expand_builtin_alloca): Adjust.
3947 * calls.c (alloc_max_size): Simplify.
3948 * cgraphunit.c (cgraph_node::expand): Adjust.
3949 * common.opt (larger_than_size, warn_frame_larger_than): Remove
3951 (frame_larger_than_size): Same.
3952 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
3953 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
3955 * doc/invoke.texi (GCC Command Options): Document option arguments.
3956 Explain byte-size arguments and suffixes.
3957 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
3958 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
3959 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
3960 * doc/options.texi (UInteger): Expand.
3961 (Host_Wide_Int, ByteSize): Document new properties.
3962 * final.c (final_start_function_1): Include sizes in an error message.
3963 * function.c (frame_offset_overflow): Same.
3964 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
3965 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
3966 Diagnose unbounded alloca calls only for limits of less than
3968 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
3969 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
3971 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
3972 only for limits of less than PTRDIFF_MAX.
3973 * langhooks-def.h (lhd_handle_option): Change function argument
3975 * langhooks.c (lhd_handle_option): Same.
3976 * langhooks.h (handle_option): Same.
3977 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
3979 (var_type, var_type_struct): Same.
3980 (var_set): Handle ByteSize flag.
3981 * optc-gen.awk: Add comments to output to ease debugging. Make
3982 use of HOST_WIDE_INT where appropriate.
3983 * opts-gen-save.awk: Use %lx to format unsigned long.
3984 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
3985 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
3986 arguments. Parse bytes-size suffixes.
3987 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
3988 (enum_value_to_arg): Same.
3989 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
3990 (handle_option): Adjust.
3991 (generate_option): Change function argument to HOST_WIDE_INT.
3992 (cmdline_handle_error): Adjust.
3993 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
3994 (set_option): Change function argument to HOST_WIDE_INT.
3995 (option_enabled): Handle cl_host_wide_int.
3996 (get_option_state): Handle CLVC_SIZE.
3997 (control_warning_option): Same.
3998 * opts.c (common_handle_option): Change function argument to
3999 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
4000 OPT_Wvla_larger_than_.
4001 * opts.h (enum cl_var_type): Add an enumerator.
4002 * stor-layout.c (layout_decl): Print a more meaningful warning.
4003 * toplev.c (output_stack_usage): Adjust.
4005 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
4007 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
4008 call to inline_expand_builtin_string_cmp.
4009 (expand_builtin_strcmp): Likewise.
4010 (expand_builtin_strncmp): Likewise.
4011 (inline_string_cmp): Delete the last parameter, change char_type_node
4012 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
4014 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
4015 the inlining expansion on target where the type of the call has same or
4016 narrower precision than unsigned char.
4018 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4020 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
4021 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
4022 * common.opt (fsave-optimization-record): New option.
4023 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
4024 * doc/invoke.texi (-fsave-optimization-record): New option.
4025 * dumpfile.c: Include "optinfo-emit-json.h".
4026 (struct kv_pair): Move to coretypes.h.
4027 (optgroup_options): Make non-static.
4028 (dump_context::end_scope): Call
4029 optimization_records_maybe_pop_dump_scope.
4030 * dumpfile.h (optgroup_options): New decl.
4031 * json.cc: New file.
4033 * optinfo-emit-json.cc: New file.
4034 * optinfo-emit-json.h: New file.
4035 * optinfo.cc: Include "optinfo-emit-json.h".
4036 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
4037 (optinfo_enabled_p): Check optimization_records_enabled_p.
4038 (optinfo_wants_inlining_info_p): Likewise.
4039 * optinfo.h: Update comment.
4040 * profile-count.c (profile_quality_as_string): New function.
4041 * profile-count.h (profile_quality_as_string): New decl.
4042 (profile_count::quality): New accessor.
4043 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
4044 and optinfo_emit_json_cc_tests.
4045 * selftest.h (selftest::json_cc_tests): New decl.
4046 (selftest::optinfo_emit_json_cc_tests): New decl.
4047 * toplev.c: Include "optinfo-emit-json.h".
4048 (compile_file): Call optimization_records_finish.
4049 (do_compile): Call optimization_records_start.
4050 * tree-ssa-live.c: Include optinfo.h.
4051 (remove_unused_scope_block_p): Retain inlining information if
4052 optinfo_wants_inlining_info_p returns true.
4054 2018-07-20 Richard Biener <rguenther@suse.de>
4057 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
4058 to cover -flto-partition=none.
4060 2018-07-20 Martin Liska <mliska@suse.cz>
4062 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
4063 (get_decl_source_range): Remove unused function.
4065 2018-07-20 Richard Biener <rguenther@suse.de>
4067 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
4068 (struct vn_phi_s): Likewise.
4069 (struct vn_reference_s): Likewise.
4070 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
4071 for searching the slot of an entry known to be in the hash itself.
4072 (vn_phi_hasher::equal): Likewise.
4073 (vn_reference_hasher::equal): Likewise.
4074 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
4076 (optimistic_info, current_info): Remove, keeping only valid_info.
4077 (vn_reference_lookup_1): Remove fallback lookup.
4078 (vn_reference_lookup_2): Likewise.
4079 (vn_nary_op_lookup_1): Likewise.
4080 (vn_phi_lookup): Likewise.
4081 (vn_nary_build_or_lookup_1): Make sure to not chain the built
4083 (vn_reference_insert): Adjust, chain the inserted hash element
4084 at last_inserted_ref.
4085 (vn_reference_insert_pieces): Likewise.
4086 (visit_reference_op_call): Likewise.
4087 (vn_nary_op_insert_into): Chain the inserted hash element at
4089 (vn_nary_op_insert_pieces): Adjust.
4090 (vn_nary_op_insert): Likewise.
4091 (vn_nary_op_insert_stmt): Likewise.
4092 (vn_phi_insert): Adjust, chain the inserted hash element at
4094 (process_scc): Remove clearing and copying the optimistic
4095 table. Instead remove elements inserted during an optimistic
4096 iteration from the single table we maintain.
4097 (init_scc_vn): Adjust.
4098 (free_scc_vn): Likewise.
4099 (sccvn_dom_walker::record_cond): Likewise.
4100 (sccvn_dom_walker::after_dom_children): Likewise.
4102 2018-07-19 Martin Sebor <msebor@redhat.com>
4104 PR tree-optimization/84047
4105 PR tree-optimization/83776
4106 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
4107 (check_array_bounds): Call it.
4109 2018-07-19 Martin Sebor <msebor@redhat.com>
4111 * align.h (align_flags): Use member initialization.
4113 2018-07-19 David Malcolm <dmalcolm@redhat.com>
4115 * Makefile.in (OBJS): Add optinfo.o.
4116 * coretypes.h (class symtab_node): New forward decl.
4117 (struct cgraph_node): New forward decl.
4118 (class varpool_node): New forward decl.
4119 * dump-context.h: New file.
4120 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
4122 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
4123 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
4124 (set_alt_dump_file): Likewise.
4125 (dump_context::~dump_context): New dtor.
4126 (dump_gimple_stmt): Move implementation to...
4127 (dump_context::dump_gimple_stmt): ...this new member function.
4128 Add the stmt to any pending optinfo, creating one if need be.
4129 (dump_gimple_stmt_loc): Move implementation to...
4130 (dump_context::dump_gimple_stmt_loc): ...this new member function.
4131 Start a new optinfo and add the stmt to it.
4132 (dump_gimple_expr): Move implementation to...
4133 (dump_context::dump_gimple_expr): ...this new member function.
4134 Add the stmt to any pending optinfo, creating one if need be.
4135 (dump_gimple_expr_loc): Move implementation to...
4136 (dump_context::dump_gimple_expr_loc): ...this new member function.
4137 Start a new optinfo and add the stmt to it.
4138 (dump_generic_expr): Move implementation to...
4139 (dump_context::dump_generic_expr): ...this new member function.
4140 Add the tree to any pending optinfo, creating one if need be.
4141 (dump_generic_expr_loc): Move implementation to...
4142 (dump_context::dump_generic_expr_loc): ...this new member
4143 function. Add the tree to any pending optinfo, creating one if
4145 (dump_printf): Move implementation to...
4146 (dump_context::dump_printf_va): ...this new member function. Add
4147 the text to any pending optinfo, creating one if need be.
4148 (dump_printf_loc): Move implementation to...
4149 (dump_context::dump_printf_loc_va): ...this new member function.
4150 Start a new optinfo and add the stmt to it.
4151 (dump_dec): Move implementation to...
4152 (dump_context::dump_dec): ...this new member function. Add the
4153 value to any pending optinfo, creating one if need be.
4154 (dump_context::dump_symtab_node): New member function.
4155 (dump_context::get_scope_depth): New member function.
4156 (dump_context::begin_scope): New member function.
4157 (dump_context::end_scope): New member function.
4158 (dump_context::ensure_pending_optinfo): New member function.
4159 (dump_context::begin_next_optinfo): New member function.
4160 (dump_context::end_any_optinfo): New member function.
4161 (dump_context::s_current): New global.
4162 (dump_context::s_default): New global.
4163 (dump_scope_depth): Delete global.
4164 (dumpfile_ensure_any_optinfo_are_flushed): New function.
4165 (dump_symtab_node): New function.
4166 (get_dump_scope_depth): Reimplement in terms of dump_context.
4167 (dump_begin_scope): Likewise.
4168 (dump_end_scope): Likewise.
4169 (selftest::temp_dump_context::temp_dump_context): New ctor.
4170 (selftest::temp_dump_context::~temp_dump_context): New dtor.
4171 (selftest::verify_item): New function.
4172 (ASSERT_IS_TEXT): New macro.
4173 (ASSERT_IS_TREE): New macro.
4174 (ASSERT_IS_GIMPLE): New macro.
4175 (selftest::test_capture_of_dump_calls): New test.
4176 (selftest::dumpfile_c_tests): Call it.
4177 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
4178 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
4179 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
4180 descriptive comment.
4181 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
4182 (dump_node, dump_bb): Move these unrelated decls.
4183 (class dump_manager): Add leading comment.
4184 * optinfo.cc: New file.
4185 * optinfo.h: New file.
4187 2018-07-19 Michael Collison <michael.collison@arm.com>
4188 Richard Henderson <rth@redhat.com>
4190 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
4191 (subti): Handle op1 zero.
4192 (subvti4, usub4ti4): New.
4193 (*sub<GPI>3_compare1_imm): New.
4194 (sub<GPI>3_carryinCV): New.
4195 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
4196 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
4198 2018-07-19 Michael Collison <michael.collison@arm.com>
4199 Richard Henderson <rth@redhat.com>
4201 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
4202 (addti3): Create simpler code if low part is already known to be 0.
4203 (addvti4, uaddvti4): New.
4204 (*add<GPI>3_compareC_cconly_imm): New.
4205 (*add<GPI>3_compareC_cconly): New.
4206 (*add<GPI>3_compareC_imm): New.
4207 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
4208 handle constants within this pattern..
4209 (*add<GPI>3_compareV_cconly_imm): New.
4210 (*add<GPI>3_compareV_cconly): New.
4211 (*add<GPI>3_compareV_imm): New.
4212 (add<GPI>3_compareV): New.
4213 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
4214 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
4215 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
4216 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
4217 with 'comparison' operator.
4218 (*add<GPI>3_compareV_cconly_imm): Ditto.
4219 (*add<GPI>3_compareV_cconly): Ditto.
4220 (*add<GPI>3_compareV_imm): Ditto.
4221 (add<GPI>3_compareV): Ditto.
4222 (add<mode>3_carryinC): Ditto.
4223 (*add<mode>3_carryinC_zero): Ditto.
4224 (*add<mode>3_carryinC): Ditto.
4225 (add<mode>3_carryinV): Ditto.
4226 (*add<mode>3_carryinV_zero): Ditto.
4227 (*add<mode>3_carryinV): Ditto.
4229 2018-07-19 Michael Collison <michael.collison@arm.com>
4230 Richard Henderson <rth@redhat.com>
4232 * config/aarch64/aarch64-modes.def (CC_V): New.
4233 * config/aarch64/aarch64-protos.h
4234 (aarch64_addti_scratch_regs): Declare
4235 (aarch64_subvti_scratch_regs): Declare.
4236 (aarch64_expand_subvti): Declare.
4237 (aarch64_gen_unlikely_cbranch): Declare
4238 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
4239 for signed overflow using CC_Vmode.
4240 (aarch64_get_condition_code_1): Handle CC_Vmode.
4241 (aarch64_gen_unlikely_cbranch): New function.
4242 (aarch64_addti_scratch_regs): New function.
4243 (aarch64_subvti_scratch_regs): New function.
4244 (aarch64_expand_subvti): New function.
4246 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
4248 * config/aarch64/aarch64-option-extensions.def: New entry for profile
4250 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
4251 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
4254 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
4257 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
4258 address check not strict.
4260 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
4262 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
4264 (store_pair_lanes<mode>): Likewise.
4265 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
4266 enum value 'ADDR_QUERY_LDP_STP_N'.
4267 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
4268 (aarch64_print_address_internal): Add declaration.
4269 (aarch64_print_ldpstp_address): Remove.
4270 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
4271 (aarch64_print_operand): Change printing of 'y'.
4272 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
4273 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
4274 'true' rather than '1'.
4275 * config/aarch64/constraints.md (Uml): Likewise.
4276 (Uml): Rename to Umn.
4279 2018-07-19 Richard Biener <rguenther@suse.de>
4281 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
4283 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
4284 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
4285 (vn_reference_hasher): Likewise.
4286 (struct vn_tables_s): Remove obstack and alloc-pool members.
4287 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
4288 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
4289 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
4290 (vn_reference_insert_pieces): Likewise.
4291 (alloc_vn_nary_op_noinit): Adjust.
4292 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
4293 (vn_phi_eq): Adjust.
4294 (shared_lookup_phiargs): Remove.
4295 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
4296 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
4297 (visit_reference_op_call): Likewise.
4298 (copy_nary, copy_phi, copy_reference): Remove.
4299 (process_scc): Rewind the obstack when iterating. Do not
4300 copy the elements to valid_info but just move them from one
4301 hashtable to the other.
4302 (allocate_vn_table): Adjust.
4303 (free_vn_table): Likewise.
4304 (init_scc_vn): Likewise.
4305 (free_scc_vn): Likewise.
4307 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
4310 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
4311 indirect_return as function type attribute.
4312 (ix86_attribute_table): Change indirect_return to function
4314 * doc/extend.texi: Update indirect_return attribute.
4316 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
4318 * wide-int.h (widest2_int): New.
4319 * gimple-fold.c (arith_overflowed_p): Use it.
4320 * tree.h (widest2_int_cst): New.
4321 * tree-vrp.c (wide_int_binop_overflow): Rename from
4322 vrp_int_const_binop.
4323 Rewrite to work on trees.
4324 (extract_range_from_multiplicative_op_1): Abstract code to...
4325 (wide_int_range_min_max): ...here.
4326 (wide_int_range_cross_product): ...and here.
4327 (extract_range_from_binary_expr_1): Abstract overflow code to...
4328 (wide_int_range_mult_wrapping): ...here.
4329 * tree-vrp.h (wide_int_range_cross_product): New.
4330 (wide_int_range_mult_wrapping): New.
4332 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
4333 Julia Koval <julia.koval@intel.com>
4335 * config/i386/x86-tune-costs.h (skylake_memcpy,
4336 skylake_memset): Replace rep_prefix with unrolling for size 512.
4338 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
4341 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
4342 comparision with EQ_EXPR in last stmt.
4344 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
4346 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
4347 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
4348 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
4349 previously known as "PowerPC AltiVec Built-in Functions". Move
4350 some material to new subsubsections "PowerPC AltiVec Built-in
4351 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
4353 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
4354 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
4355 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
4356 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
4358 2018-07-18 Richard Biener <rguenther@suse.de>
4360 PR tree-optimization/86557
4361 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
4364 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
4366 * config/s390/s390.c (s390_function_profiler): Generate CFI.
4368 2018-07-17 Jeff Law <law@redhat.com>
4370 * config/arm/arm.c (get_label_padding): Update for recent
4371 changes to label_to_alignment.
4373 PR tree-optimization/86010
4374 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
4376 * config/mips/mips.c (vr4130_align_insns): Update for recent
4377 changes to label_to_alignment.
4379 * config/frv/frv.c (frv_label_align): Update for recent changes
4380 to label_to_alignment.
4382 * config/nios2/nios2.c (nios2_label_align): Update for recent
4383 changes which dropped ALIGN_LABELS_LOG.
4385 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
4387 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
4388 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
4390 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
4392 * config/arc/arc.c (arc_label_align): Use align_labels instead of
4393 deprecated align_labels_log.
4395 2018-07-17 Richard Biener <rguenther@suse.de>
4398 * dwarf2out.c (init_sections_and_labels): Always generate
4399 a debug_line_str_section for early LTO debug.
4400 (dwarf2out_finish): Reset debug_line_str_hash output early.
4401 Bump counter for extra dwarf5 .debug_loc labels to not conflict
4403 (dwarf2out_early_finish): Output debug_line_str.
4405 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
4407 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
4408 index register on z196 or later.
4410 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
4412 * config/s390/s390.c (s390_default_align): Set default function
4414 (s390_override_options_after_change): Call s390_default align.
4415 (s390_option_override_internal): Call s390_default_align.
4416 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
4418 2018-07-17 Jakub Jelinek <jakub@redhat.com>
4421 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
4422 to _looptemp_ clauses, other than the first two.
4424 2018-07-17 Martin Liska <mliska@suse.cz>
4426 * opts.c: Do not enable OPT_falign_* for -Os.
4428 2018-07-17 Martin Liska <mliska@suse.cz>
4430 * align.h (MAX_CODE_ALIGN): New.
4431 (MAX_CODE_ALIGN_VALUE): New.
4432 * common/config/i386/i386-common.c (ix86_handle_option):
4433 (MAX_CODE_ALIGN): Moved to align.h.
4434 * final.c (MAX_CODE_ALIGN): Likewise.
4435 * opts.c (parse_and_check_align_values):
4436 (MAX_CODE_ALIGN): Likewise.
4437 (MAX_CODE_ALIGN_VALUE): Likewise.
4439 2018-07-17 Martin Liska <mliska@suse.cz>
4441 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
4442 in order to fulfil coding style.
4443 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
4444 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4445 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4446 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
4447 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
4448 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
4449 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
4450 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
4451 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4453 2018-07-17 Martin Liska <mliska@suse.cz>
4455 * align.h: New file.
4456 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
4458 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
4459 align_flags of label_to_alignment.
4460 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
4462 * config/m68k/m68k.c: Do not use removed align_labels_value and
4464 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
4465 (LOOP_ALIGN): Likewise.
4466 (LABEL_ALIGN): Likewise.
4467 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
4468 Remove not used macro.
4469 (rs6000_loop_align): Change return type to align_flags.
4470 (rs6000_loop_align_max_skip): Remove.
4471 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
4472 Change return type to align_flags.
4473 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
4474 Remove not used macro.
4475 (rs6000_loop_align): Change return type to align_flags.
4476 (rs6000_loop_align_max_skip): Remove.
4477 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
4478 * config/rx/rx-protos.h (rx_align_for_label): Make it
4480 * config/rx/rx.c (rx_align_for_label): Change return type
4482 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
4484 into align_flags class.
4485 (LABEL_ALIGN): Likewise.
4486 (LOOP_ALIGN): Likewise.
4487 * config/s390/s390.c (s390_label_align): Use align_flags
4489 (s390_asm_output_function_label): Likewise.
4490 * config/sh/sh.c (sh_override_options_after_change):
4491 Use align_flags class directly without macros.
4492 (find_barrier): Likewise.
4493 (barrier_align): Likewise.
4494 (sh_loop_align): Likewise.
4495 * config/spu/spu.c (spu_option_override):
4496 Use align_flags_tuple::get_value instead of removed macros.
4497 (spu_sched_init): Likewise.
4498 * config/spu/spu.h (GTY): Likewise.
4499 * config/visium/visium.c (visium_option_override):
4500 Set "8" as default secondary alignment.
4501 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
4502 in order to guarantee secondary alignment of 8.
4503 * coretypes.h: Include align.h header file.
4504 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
4505 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
4506 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
4507 * doc/tm.texi.in: Likewise.
4508 * final.c (struct label_alignment): Remove not used structure.
4509 (LABEL_ALIGN): Change type to align_flags.
4510 (LOOP_ALIGN): Likewise.
4511 (JUMP_ALIGN): Likewise.
4512 (default_loop_align_max_skip): Remove.
4513 (default_label_align_max_skip): Likewise.
4514 (default_jump_align_max_skip): Likewise.
4515 (default_label_align_after_barrier_max_skip):
4516 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
4517 (LABEL_TO_MAX_SKIP): Remove.
4518 (label_to_alignment): Return align_flags type instead of integer.
4519 (label_to_max_skip): Remove.
4520 (align_fuzz): Use align_flags type.
4521 (compute_alignments): Use align_flags type and use align_flags::max
4522 to combine multiple alignments.
4523 (grow_label_align): Grow vec instead of C array.
4524 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
4525 (shorten_branches): Use align_flags type and use align_flags::max
4526 to combine multiple alignments.
4527 (final_scan_insn_1): Remove usage of secondary alignment that comes
4528 from label alignment, but instead use proper secondary alignment
4529 which is computed in grow_label_align.
4530 * flags.h (struct align_flags_tuple): Move to align.h.
4531 (struct align_flags): Likewise.
4532 (state_align_loops): Rename to align_loops.
4533 (state_align_jumps): Rename to align_jumps.
4534 (state_align_labels): Rename to align_labels.
4535 (state_align_functions): Rename to align_functions.
4536 (align_loops_log): Remove.
4537 (align_jumps_log): Remove.
4538 (align_labels_log): Remove.
4539 (align_functions_log): Remove.
4540 (align_loops_max_skip): Remove.
4541 (align_jumps_max_skip): Remove.
4542 (align_labels_max_skip): Remove.
4543 (align_functions_max_skip): Remove.
4544 (align_loops_value): Remove.
4545 (align_jumps_value): Remove.
4546 (align_labels_value): Remove.
4547 (align_functions_value): Remove.
4548 * output.h (label_to_alignment): Change return type to align_flags.
4549 (label_to_max_skip): Remove.
4550 * target.def: Remove loop_align_max_skip, label_align_max_skip,
4551 jump_align_max_skip macros.
4552 * targhooks.h (default_loop_align_max_skip): Remove.
4553 (default_label_align_max_skip): Likewise.
4554 (default_jump_align_max_skip): Likewise.
4555 (default_label_align_after_barrier_max_skip): Remove.
4556 * toplev.c (read_log_maxskip): Use ::normalize function.
4557 (parse_N_M): Remove not used argument and also call ::normalize.
4558 (parse_alignment_opts): Do not pass unused arguments.
4559 * varasm.c (assemble_start_function): Use directly align_functions
4560 instead of removed macros.
4561 * system.h: Do not poison removed macros.
4563 2018-07-17 Jakub Jelinek <jakub@redhat.com>
4566 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
4567 and cond temporaries don't have reference type if iterator has
4568 pointer type. For init use &for_pre_body instead of pre_p if
4569 for_pre_body is non-empty.
4571 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
4573 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
4574 double-double modes to SFmode directly directly.
4575 (trunc<mode>sf2_fprs): Delete.
4577 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
4579 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
4580 for conversions between IFmode and the decimal floating point modes.
4581 (init_float128_ieee): Use the correct names for conversions between
4582 KFmode and the decimal floating point modes.
4584 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
4586 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
4587 for the conversions between TDmode and IFmode.
4588 (init_float128_ieee): Use more correct names for the conversions
4589 between TDmode and KFmode.
4591 2018-07-16 Jakub Jelinek <jakub@redhat.com>
4593 PR tree-optimization/86526
4594 * builtins.c (expand_builtin_memcmp): Formatting fixes.
4595 (inline_expand_builtin_string_cmp): Likewise.
4596 (inline_string_cmp): Likewise. Use c_readstr instead of
4597 builtin_memcpy_read_str. Add unit_mode temporary.
4599 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4602 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
4603 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
4605 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
4607 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
4608 Alphabetize prototypes of built-in functions, separating out
4609 built-in functions that are listed in this section but should be
4610 described elsewhere.
4612 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
4615 * expmed.c (emit_store_flag): Do not emit setcc followed by a
4616 conditional move when trapping comparison was split to a
4617 non-trapping one (and vice versa).
4619 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
4621 * config/s390/s390.c (s390_function_profiler): Generate nops
4622 instead of profiler call sequences.
4623 * config/s390/s390.opt: Add the new option.
4625 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
4627 * config/s390/s390.c (s390_function_profiler): Generate
4628 __mcount_loc section.
4629 * config/s390/s390.opt: Add the new option.
4631 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
4633 * common.opt: Add the new warning.
4634 * config/s390/s390.c (s390_function_profiler): Emit "brasl
4635 %r0,__fentry__" when -mfentry is specified.
4636 (s390_option_override_internal): Disallow -mfentry for 31-bit
4638 * config/s390/s390.opt: Add the new option.
4640 2018-07-16 Richard Biener <rguenther@suse.de>
4643 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
4644 for function-local FUNCTION_DECL and RESULT_DECL immediately.
4646 2018-07-16 Martin Liska <mliska@suse.cz>
4649 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
4652 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
4654 * config/arc/arcHS.md: Update ARCHS scheduling rules.
4656 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
4658 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
4660 * config/arc/arc-cpus.def (hs4x): New cpu.
4662 * config/arc/arc-tables.opt: Regenerate.
4663 * config/arc/arc.c (arc_sched_issue_rate): New function.
4664 (TARGET_SCHED_ISSUE_RATE): Define.
4665 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
4666 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
4668 (attr tune): Add ARCHS4x tune values.
4669 (attr tune_dspmpy): Define.
4670 (*tst): Correct instruction type.
4671 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
4672 * config/arc/arcHS4x.md: New file.
4673 * config/arc/fpu.md: Update instruction type attributes.
4674 * config/arc/t-multilib: Regenerate.
4676 2018-07-16 Tom de Vries <tdevries@suse.de>
4679 * var-tracking.c (vt_initialize): Fix pre_dec handling.
4681 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4683 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
4686 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
4688 PR tree-optimization/86514
4689 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
4690 conversion to a boolean type from a type with greater precision.
4692 2018-07-16 Tom de Vries <tdevries@suse.de>
4694 * var-tracking.c (vt_initialize): Print adjusted insn slim if
4695 dump_flags request TDF_SLIM.
4697 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
4699 * fold-const.c (int_const_binop_1): Abstract...
4700 (wide_int_binop): ...wide int code here.
4701 (poly_int_binop): ...poly int code here.
4702 Abstract the rest of int_const_binop_1 into int_const_binop.
4703 * fold-const.h (wide_int_binop): New.
4704 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
4705 Remove useless PLUS/MINUS_EXPR case.
4706 (zero_nonzero_bits_from_vr): Move wide int code...
4707 (zero_nonzero_bits_from_bounds): ...here.
4708 (extract_range_from_binary_expr_1): Move mask optimization code...
4709 (range_easy_mask_min_max): ...here.
4710 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
4711 (range_easy_mask_min_max): New.
4713 2018-07-15 Jeff Law <law@redhat.com>
4716 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
4719 2018-07-14 Jim Wilson <jimw@sifive.com>
4721 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
4723 2018-07-14 Paul Koning <ni1d@arrl.net>
4725 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
4727 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
4729 * lto-streamer-out.c (copy_function_or_variable): Dump info about
4732 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
4733 Steve Munroe <munroesj52@gmail.com>
4735 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
4736 (_mm_andnot_si128): Likewise.
4737 (_mm_or_si128): Likewise.
4738 (_mm_xor_si128): Likewise.
4740 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
4743 * builtins.c (expand_builtin_memcmp): Inline the calls first
4744 when result_eq is false.
4745 (expand_builtin_strcmp): Inline the calls first.
4746 (expand_builtin_strncmp): Likewise.
4747 (inline_string_cmp): New routine. Expand a string compare
4748 call by using a sequence of char comparison.
4749 (inline_expand_builtin_string_cmp): New routine. Inline expansion
4750 a call to str(n)cmp/memcmp.
4751 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
4753 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
4755 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
4757 * config/arm/driver-arm.c: Include arm-native.h.
4758 (host_detect_local_cpu): Use auto-generated data tables.
4759 (vendors, arm_cpu_table): Delete. Move part information to ...
4760 * config/arm/arm-cpus.in: ... here.
4761 * config/arm/parsecpu.awk (gen_native): New function.
4762 (vendor, part): New CPU fields.
4763 (END): Add support for building the native CPU detection tables.
4764 * config/arm/t-arm (arm-native.h): Add build rule.
4765 (driver-arm.o): Add dependency on arm-native.h.
4767 2018-07-13 Richard Biener <rguenther@suse.de>
4770 * match.pd (addr1 - addr2): Allow either of the operand to
4773 2018-07-13 Tom de Vries <tdevries@suse.de>
4775 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
4778 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
4780 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
4781 arrays instead of numbered variables.
4783 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
4785 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
4786 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
4788 2018-07-13 Richard Biener <rguenther@suse.de>
4791 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
4792 instead of get_context_die.
4794 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
4795 Richard Biener <rguenther@suse.de>
4798 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
4799 that the loop latch destination where phi is defined.
4801 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
4803 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
4804 (riscv_expand_epilogue): Add assertion to check interrupt mode.
4805 (riscv_set_current_function): Extract getting interrupt type to new
4807 (riscv_get_interrupt_type): New function.
4808 (riscv_merge_decl_attributes): New function, checking interrupt type is
4810 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
4812 2018-07-12 Paul Koning <ni1d@arrl.net>
4814 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
4817 2018-07-12 Paul Koning <ni1d@arrl.net>
4819 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
4820 zero reference, add doloop_end instead.
4821 * doc/md.texi (decrement_and_branch_until_zero): Remove.
4822 (Looping patterns): Remove decrement_and_branch_until_zero. Add
4823 detail for doloop_end.
4825 2018-07-12 Martin Sebor <msebor@redhat.com>
4828 * attribs.c (decl_attributes): Reject conflicting attributes before
4829 calling attribute handlers.
4831 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
4833 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
4835 (gcc::dump_manager::get_dump_file_name): likewise.
4836 (dump_begin): Likewise.
4837 * dumpfile.h (dump_begin): Update prototype.
4838 (gcc::dump_manager::get_dump_file_name,
4839 gcc::dump_manager::get_dump_file_name): Update prototype.
4841 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4843 * internal-fn.h (vectorizable_internal_fn_p): New function.
4844 * tree-vect-slp.c (compatible_calls_p): Likewise.
4845 (vect_build_slp_tree_1): Remove nops argument. Handle calls
4846 to internal functions.
4847 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
4849 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4851 * fold-const.h (inverse_conditions_p): Declare.
4852 * fold-const.c (inverse_conditions_p): New function.
4853 * match.pd: Use inverse_conditions_p. Add folds of view_converts
4854 that test the inverse condition of a conditional internal function.
4855 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
4856 * internal-fn.c (internal_fn_mask_index): Handle conditional
4858 (vectorized_internal_fn_supported_p): New function.
4859 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
4860 (any_pred_load_store): Replace with...
4861 (need_to_predicate): ...this new variable.
4862 (redundant_ssa_names): New variable.
4863 (ifcvt_can_use_mask_load_store): Move initial checks to...
4864 (ifcvt_can_predicate): ...this new function. Handle tree codes
4865 for which a conditional internal function exists.
4866 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
4867 instead of ifcvt_can_use_mask_load_store. Update after variable
4869 (predicate_load_or_store): New function, split out from
4870 predicate_mem_writes.
4871 (check_redundant_cond_expr): New function.
4872 (value_available_p): Likewise.
4873 (predicate_rhs_code): Likewise.
4874 (predicate_mem_writes): Rename to...
4875 (predicate_statements): ...this. Use predicate_load_or_store
4876 and predicate_rhs_code.
4877 (combine_blocks, tree_if_conversion): Update after above name changes.
4878 (ifcvt_local_dce): Handle redundant_ssa_names.
4879 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
4880 general conditional functions.
4881 * tree-vect-stmts.c (vectorizable_call): Likewise.
4883 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4884 Alan Hayward <alan.hayward@arm.com>
4885 David Sherwood <david.sherwood@arm.com>
4887 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
4888 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
4889 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
4890 plus and minus and convert them into IFN_COND_FMA-based sequences.
4891 (convert_mult_to_fma): Handle conditional plus and minus.
4893 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4895 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
4896 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
4897 (cond_fnms_optab): New optabs.
4898 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
4900 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
4901 * internal-fn.h (get_conditional_internal_fn): Declare.
4902 (get_unconditional_internal_fn): Likewise.
4903 * internal-fn.c (cond_ternary_direct): New macro.
4904 (expand_cond_ternary_optab_fn): Likewise.
4905 (direct_cond_ternary_optab_supported_p): Likewise.
4906 (FOR_EACH_COND_FN_PAIR): Likewise.
4907 (get_conditional_internal_fn): New function.
4908 (get_unconditional_internal_fn): Likewise.
4909 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
4910 (gimple_match_op::gimple_match_op): Add a new overload for 5
4912 (gimple_match_op::set_op): Likewise.
4913 (gimple_resimplify5): Declare.
4914 * genmatch.c (decision_tree::gen): Generate simplifications for
4916 * gimple-match-head.c (gimple_simplify): Define an overload for
4917 5 operands. Handle calls with 5 arguments in the top-level overload.
4918 (convert_conditional_op): Handle conversions from unconditional
4919 internal functions to conditional ones.
4920 (gimple_resimplify5): New function.
4921 (build_call_internal): Pass a fifth operand.
4922 (maybe_push_res_to_seq): Likewise.
4923 (try_conditional_simplification): Try converting conditional
4924 internal functions to unconditional internal functions.
4925 Handle 3-operand unconditional forms.
4926 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
4927 Define ternary equivalents of the current rules for binary conditional
4929 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
4931 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
4932 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
4933 (optab): Handle them.
4934 (SVE_COND_FP_TERNARY): New int iterator.
4935 (sve_fmla_op, sve_fmad_op): New int attributes.
4936 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
4937 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
4938 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
4940 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4942 * target.def (preferred_else_value): New target hook.
4943 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
4944 * doc/tm.texi: Regenerate.
4945 * targhooks.h (default_preferred_else_value): Declare.
4946 * targhooks.c (default_preferred_else_value): New function.
4947 * internal-fn.h (conditional_internal_fn_code): Declare.
4948 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
4949 (get_conditional_internal_fn): Use it.
4950 (conditional_internal_fn_code): New function.
4951 * gimple-match.h (gimple_match_cond): New struct.
4952 (gimple_match_op): Add a cond member function.
4953 (gimple_match_op::gimple_match_op): Update all forms to take a
4955 * genmatch.c (expr::gen_transform): Use the same condition as res_op
4956 for the suboperation, but don't specify a particular else_value.
4957 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
4958 (visit_nary_op, visit_reference_op_load): Pass
4959 gimple_match_cond::UNCOND to the gimple_match_op constructor.
4960 * gimple-match-head.c: Include tree-eh.h
4961 (convert_conditional_op): New function.
4962 (maybe_resimplify_conditional_op): Likewise.
4963 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
4964 (gimple_resimplify2): Likewise.
4965 (gimple_resimplify3): Likewise.
4966 (gimple_resimplify4): Likewise.
4967 (maybe_push_res_to_seq): Return null for conditional operations.
4968 (try_conditional_simplification): New function.
4969 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
4971 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
4973 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
4975 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
4977 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
4979 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
4981 (hash_tree): Do not hash DECL_FCONTEXT
4982 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
4983 Do not stream DECL_FCONTEXT.
4984 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
4985 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
4987 2018-07-12 Richard Biener <rguenther@suse.de>
4990 * dwarf2out.c (gen_block_die): Only output blocks when they have
4991 at least one !DECL_IGNORED_P variable.
4993 2018-07-12 Richard Biener <rguenther@suse.de>
4996 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
4997 Remove -mieee-fp handling.
4999 2018-07-12 Richard Biener <rguenther@suse.de>
5001 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
5002 left-over from last patch.
5004 2018-07-12 Jakub Jelinek <jakub@redhat.com>
5006 PR tree-optimization/86492
5007 * gimple-ssa-store-merging.c
5008 (imm_store_chain_info::coalesce_immediate_stores): Call
5009 check_no_overlap even for the merge_overlapping case. Formatting fix.
5011 2018-07-12 Richard Biener <rguenther@suse.de>
5014 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
5015 move possibly trapping operations into the conditional.
5017 2018-07-12 Richard Biener <rguenther@suse.de>
5019 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
5020 (vn_lookup_simplify_result): Remove recursion limit applied
5022 (vn_nary_build_or_lookup_1): Adjust.
5023 (try_to_simplify): Likewise.
5024 * gimple-match-head.c (gimple_resimplify1): Instead apply one
5026 (gimple_resimplify2): Likewise.
5027 (gimple_resimplify3): Likewise.
5028 (gimple_resimplify4): Likewise.
5030 2018-07-11 Jakub Jelinek <jakub@redhat.com>
5032 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
5033 Use __mmask64 type instead of __mmask8 for __M argument.
5034 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
5035 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
5037 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
5038 __mmask16 for __M argument.
5039 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
5040 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
5041 to __mmask16 instead of __mmask8.
5042 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
5043 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
5044 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
5045 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
5046 instead of __mmask16 for __U argument.
5047 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
5048 __mmask16 instead of __mmask8 for __U argument.
5049 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
5051 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
5053 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
5055 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
5057 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
5059 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
5061 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
5063 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
5065 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
5067 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
5069 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
5070 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
5071 return type as well as __M argument type and all casts from __mmask8
5073 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
5074 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
5075 return type as well as __M argument type and all casts from __mmask8
5077 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
5078 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
5079 return type as well as __M argument type and all casts from __mmask8
5081 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
5082 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
5083 return type as well as __M argument type and all casts from __mmask8
5085 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
5086 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
5089 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
5091 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
5092 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
5095 2018-07-11 Paul Koning <ni1d@arrl.net>
5097 * doc/md.texi (define_subst): Document how multiple occurrences of
5098 the same argument in the replacement pattern are handled.
5100 2018-07-11 Paul Koning <ni1d@arrl.net>
5102 * doc/extend.texi (Common Variable Attributes): Move "mode" into
5104 (Common Type Attributes): Add "mode" attribute.
5106 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
5108 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
5109 stream DECL_ORIGINAL_TYPE.
5110 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
5111 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
5112 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
5113 Do not walk original type.
5114 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
5116 (write_ts_decl_non_common_tree_pointers): Do not stream
5118 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
5119 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
5121 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
5123 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
5124 thread twice from the same starting edge.
5126 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
5128 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
5129 * gimple.c (gimple_call_nonnull_result_p): ...here...
5130 (gimple_call_nonnull_arg): ...and here.
5131 * gimple.h (gimple_call_nonnull_result_p): New.
5132 (gimple_call_nonnull_arg): New.
5134 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
5136 * config/arm/arm-cpus.in: Move information from fpu field of each
5137 cpu definition to the isa field.
5138 * config/arm/parsecpu.awk (fpu): Delete match rule.
5139 (gen_comm_data): Don't add bits from the CPU's FPU entry.
5141 2018-07-11 Richard Biener <rguenther@suse.de>
5144 * dwarf2out.c (init_sections_and_labels): Use
5145 output_asm_line_debug_info consistently.
5146 (dwarf2out_early_finish): Likewise.
5147 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
5150 2018-07-11 Richard Biener <rguenther@suse.de>
5152 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
5153 Rework father_bb setting in a way to avoid propagating constants
5154 multiple times on a loop body.
5156 2018-07-10 Mark Wielaard <mark@klomp.org>
5159 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
5161 2018-07-10 Richard Biener <rguenther@suse.de>
5163 * hash-map.h (hash_map::iterator::operator*): Return
5164 references to key and value.
5166 2018-07-10 Jakub Jelinek <jakub@redhat.com>
5169 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
5170 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
5171 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
5172 (gimplify_omp_for): For composite loops, move outer
5173 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
5174 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
5175 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
5176 TREE_LIST for both the original class iterator and the "last" helper
5177 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
5178 loop, remember has_decl_expr from outer composite loops for the
5179 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
5181 2018-07-09 Martin Sebor <msebor@redhat.com>
5185 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
5186 accessing implicitly initialized array elements.
5187 * expr.c (string_constant): Handle string initializers of
5188 character arrays within aggregates.
5189 * gimple-fold.c (fold_array_ctor_reference): Add argument.
5190 Store element offset. As a special case, handle zero size.
5191 (fold_nonarray_ctor_reference): Same.
5192 (fold_ctor_reference): Add argument. Store subobject offset.
5193 * gimple-fold.h (fold_ctor_reference): Add argument.
5195 2018-07-09 Paul Koning <ni1d@arrl.net>
5197 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
5198 (pdp11_insn_cost): New function.
5199 (pdp11_md_asm_adjust): New function.
5200 (TARGET_INVALID_WITHIN_DOLOOP): Define.
5201 (pdp11_rtx_costs): Update to match machine better.
5202 (output_addr_const_pdp11): Correct format mismatch warnings.
5203 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
5204 * config/pdp11/pdp11.md: General change to add base_cost and/or
5205 length attributes for use by new pdp11_insn_cost function.
5206 (MIN_BRANCH): Correct definition.
5208 (doloop_end): Use standard pattern name for looping pattern.
5209 (doloop_end_nocc): New.
5210 (movsf): Add another constraint alternative.
5211 (zero_extendqihi2): Add constraint alternatives for not in place
5213 (zero_extendhisi2): Remove.
5214 (shift patterns): Add CC handling variants.
5218 (define_peephole2): New peephole to recognize mov that sets CC for
5221 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5223 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
5224 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
5227 2018-07-09 Jakub Jelinek <jakub@redhat.com>
5230 * real.c (real_nextafter): Return true if result is denormal.
5232 2018-07-09 Martin Liska <mliska@suse.cz>
5234 * common.opt: Add back wrongly removed attribute.
5236 2018-07-09 Richard Biener <rguenther@suse.de>
5239 * dwarf2out.c (gen_block_die): For an early generated DIE
5240 always output high/low PC attributes.
5242 2018-07-09 Tom de Vries <tdevries@suse.de>
5244 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
5245 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
5246 onto VAR_DECL with abstract origin.
5248 2018-07-07 Jim Wilson <jimw@sifive.com>
5250 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
5252 2018-07-07 Tom de Vries <tdevries@suse.de>
5254 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
5256 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
5258 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
5260 (combine_bound): Use wide-int overflow calculation instead of
5262 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
5264 * fold-const.c (int_const_binop_2): Same.
5265 (extract_muldiv_1): Same.
5266 (fold_div_compare): Same.
5267 (fold_abs_const): Same.
5269 * poly-int.h (add): Same.
5273 * predict.c (predict_iv_comparison): Same.
5274 * profile-count.c (slow_safe_scale_64bit): Same.
5275 * simplify-rtx.c (simplify_const_binary_operation): Same.
5276 * tree-chrec.c (tree_fold_binomial): Same.
5277 * tree-data-ref.c (split_constant_offset_1): Same.
5278 * tree-if-conv.c (idx_within_array_bound): Same.
5279 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
5280 * tree-ssa-phiopt.c (minmax_replacement): Same.
5281 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
5282 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
5283 * vr-values.c (vr_values::adjust_range_with_scev): Same.
5284 * wide-int.cc (wi::add_large): Same.
5285 (wi::mul_internal): Same.
5286 (wi::sub_large): Same.
5287 (wi::divmod_internal): Same.
5288 * wide-int.h: Change overflow type to overflow_type for neg, add,
5289 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
5290 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
5291 mul_internal, divmod_internal.
5292 (overflow_type): New enum.
5293 (accumulate_overflow): New.
5295 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
5297 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
5298 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
5300 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
5302 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
5303 argument is checked for zero before entering loop, avoid checking again.
5305 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
5307 * gimplify.h (generic_expr_could_trap_p): Set as global function.
5308 * gimplify.h (generic_expr_could_trap_p): Likwise.
5309 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
5311 2018-07-06 Jakub Jelinek <jakub@redhat.com>
5313 PR tree-optimization/86401
5314 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
5315 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
5316 (fold_bit_and_mask): ... here. New helper function for match.pd.
5317 * fold-const.h (fold_bit_and_mask): Declare.
5318 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
5320 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
5323 * target.def (translate_mode_attribute): New hook.
5324 * targhooks.h (default_translate_mode_attribute): Declare.
5325 * targhooks.c (default_translate_mode_attribute): New function.
5326 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
5327 * doc/tm.texi: Regenerate.
5328 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
5329 (rs6000_translate_mode_attribute): New function.
5331 2018-07-06 Paul Koning <ni1d@arrl.net>
5333 * doc/md.texi (define_split): Document DONE and FAIL.
5334 (define_peephole2): Ditto.
5336 2018-07-05 Jeff Law <law@redhat.com>
5338 PR tree-optimization/86010
5339 * tree-ssa-dse.c (compute_trims): More aggressively trim at
5340 both the head and tail of mem* and str* calls.
5342 2018-07-05 Jim Wilson <jimw@sifive.com>
5344 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
5346 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
5348 * config/aarch64/aarch64-simd.md: correct flags text for
5349 MIN_EXPR replacement.
5351 2018-07-05 James Clarke <jrtc27@jrtc27.com>
5353 * configure: Regenerated.
5355 2018-07-05 Carl Love <cel@us.ibm.com>
5357 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
5358 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
5359 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
5360 VSX_BUILTIN_DOUBLEL_V4SF.
5362 2018-07-05 Martin Sebor <msebor@redhat.com>
5365 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
5366 than its domain to compute its the upper bound of a char array.
5368 2018-07-05 Nathan Sidwell <nathan@acm.org>
5370 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
5371 * doc/cpp.texi: Update comment.
5372 * doc/tm.texi: Rebuilt.
5373 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
5374 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
5375 * doc/extend.texi (Backwards Compatibility): Clarify it is system
5376 headers affected by extern "C".
5377 * system.h: Poison NO_IMPLICIT_EXTERN_C.
5378 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
5379 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
5380 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
5381 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
5382 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
5383 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
5384 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
5385 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
5386 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
5387 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
5388 config/sparc/sp64-elf.h, config/spu/spu.h,
5389 config/stormy16/stormy16.h, config/v850/v850.h,
5390 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
5391 define NO_IMPLICIT_EXTERN_C.
5392 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
5394 2018-07-05 Tamar Christina <tamar.christina@arm.com>
5397 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
5398 instead of GET_MODE_SIZE when comparing Units.
5400 2018-07-05 Tamar Christina <tamar.christina@arm.com>
5403 * rtlanal.c (set_noop_p): Constrain on mode change,
5404 include hard-reg-set.h
5406 2018-07-05 Tamar Christina <tamar.christina@arm.com>
5408 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
5410 2018-07-05 Jakub Jelinek <jakub@redhat.com>
5413 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
5416 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
5418 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
5420 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
5423 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
5425 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
5427 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
5430 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
5432 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
5434 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
5435 neg_*_op* variables.
5437 2018-07-04 Martin Liska <mliska@suse.cz>
5439 * tree-switch-conversion.c: Define
5440 max_ratio_for_speed and max_ratio_for_size constants.
5442 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
5443 Martin Liska <mliska@suse.cz>
5448 * common.opt: Rename align options with 'str_' prefix.
5449 * common/config/i386/i386-common.c (set_malign_value): New
5451 (ix86_handle_option): Use it to set -falign-* options/
5452 * config/aarch64/aarch64-protos.h (struct tune_params): Change
5453 type from int to string.
5454 * config/aarch64/aarch64.c: Update default values from int
5456 * config/alpha/alpha.c (alpha_override_options_after_change):
5458 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
5459 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5460 max skip conditionally.
5461 * config/i386/freebsd.h (SUBALIGN_LOG): New.
5462 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5463 max skip conditionally.
5464 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5465 max skip conditionally.
5466 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
5467 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5468 max skip conditionally.
5469 * config/i386/i386.c (struct ptt): Change type from int to
5471 (ix86_default_align): Set default values.
5472 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
5473 max skip conditionally.
5474 * config/i386/iamcu.h (SUBALIGN_LOG): New.
5475 (ASM_OUTPUT_MAX_SKIP_ALIGN):
5476 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
5477 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5478 max skip conditionally.
5479 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
5480 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
5481 * config/i386/x86-64.h (SUBALIGN_LOG): New.
5482 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5483 max skip conditionally.
5484 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5485 * config/ia64/ia64.c (ia64_option_override): Set default values
5486 for alignment options.
5487 * config/m68k/m68k.c: Handle new str_align_* options.
5488 * config/mips/mips.c (mips_set_compression_mode): Change
5490 (mips_option_override): Set default values for options.
5491 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
5493 * config/rs6000/rs6000.c (rs6000_option_override_internal):
5495 * config/rx/rx.c (rx_option_override): Likewise.
5496 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
5497 (LABEL_ALIGN): Use align_labels_log.
5498 (LOOP_ALIGN): Use align_loops_align.
5499 * config/s390/s390.c (s390_asm_output_function_label): Use new
5501 * config/sh/sh.c (sh_override_options_after_change):
5502 Change type of constants.
5503 * config/spu/spu.c (spu_sched_init): Likewise.
5504 * config/sparc/sparc.c (sparc_option_override): Set default
5506 * config/visium/visium.c (visium_option_override): Likewise.
5507 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
5508 emit p2align format with last argument if it's not needed.
5509 * doc/invoke.texi: Document extended format of -falign-*.
5510 * final.c: Use align_labels alignment.
5511 * flags.h (struct target_flag_state): Change type to use
5513 (struct align_flags_tuple): New.
5514 (struct align_flags): Likewise.
5515 (align_loops_log): Redefine macro to use new types.
5516 (align_loops_max_skip): Redefine macro to use new types.
5517 (align_jumps_log): Redefine macro to use new types.
5518 (align_jumps_max_skip): Redefine macro to use new types.
5519 (align_labels_log): Redefine macro to use new types.
5520 (align_labels_max_skip): Redefine macro to use new types.
5521 (align_functions_log): Redefine macro to use new types.
5522 (align_loops): Redefine macro to use new types.
5523 (align_jumps): Redefine macro to use new types.
5524 (align_labels): Redefine macro to use new types.
5525 (align_functions): Redefine macro to use new types.
5526 (align_functions_max_skip): Redefine macro to use new types.
5527 (align_loops_value): New macro.
5528 (align_jumps_value): New macro.
5529 (align_labels_value): New macro.
5530 (align_functions_value): New macro.
5531 * function.c (invoke_set_current_function_hook): Propagate
5532 alignment values from flags to global variables default in
5534 * ipa-icf.c (sem_function::equals_wpa): Use
5535 cl_optimization_option_eq instead of memcmp.
5536 * lto-streamer.h (cl_optimization_stream_out): Support streaming
5538 (cl_optimization_stream_in): Likewise.
5539 * optc-save-gen.awk: Support strings in cl_optimization.
5540 * opth-gen.awk: Likewise.
5541 * opts.c (finish_options): Remove error checking of invalid
5543 (MAX_CODE_ALIGN): Remove.
5544 (MAX_CODE_ALIGN_VALUE): Likewise.
5545 (parse_and_check_align_values): New function.
5546 (check_alignment_argument): Likewise.
5547 (common_handle_option): Use check_alignment_argument.
5548 * opts.h (parse_and_check_align_values): Declare.
5549 * toplev.c (init_alignments): Remove.
5550 (read_log_maxskip): New.
5551 (parse_N_M): Likewise.
5552 (parse_alignment_opts): Likewise.
5553 (backend_init_target): Remove usage of init_alignments.
5554 * toplev.h (parse_alignment_opts): Declare.
5555 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
5557 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
5558 * tree.c (cl_option_hasher::equal): New.
5559 * varasm.c: Use new global macros.
5561 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
5563 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
5564 Use a simpler align directive also if MAXSKIP = ALIGN-1.
5565 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5566 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5567 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5568 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5569 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
5570 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
5571 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
5572 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5573 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5574 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5575 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5577 2018-07-04 Martin Liska <mliska@suse.cz>
5578 Jonathan Wakely <jwakely@redhat.com>
5580 * coverage.c: Use correct type.
5581 * doc/invoke.texi: Language correction.
5583 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
5586 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
5587 ENDBRANCH for non-tail call which may return via indirect branch.
5588 * doc/extend.texi: Document indirect_return attribute.
5590 2018-07-03 Martin Sebor <msebor@redhat.com>
5592 PR tree-optimization/86274
5593 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
5595 (format_floating): Correct handling of infinities and NaNs.
5597 2018-07-03 Martin Sebor <msebor@redhat.com>
5599 * print-tree.c (print_real_cst): New function.
5600 (print_node_brief): Call it.
5601 (print_node): Ditto.
5603 2018-07-03 Jeff Law <law@redhat.com>
5605 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
5606 into a single pattern.
5608 * config/h8300/h8300.md (ors code_iterator): New.
5609 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
5610 a single pattern and single splitter.
5611 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
5612 (iorqi3_1, xorqi3_1): Likewise.
5613 (iorqi3, xorqi3 expanders): Similarly.
5615 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
5616 (movmd_internal) into a single pattern using the P mode iterator.
5617 (movmd splitters): Similarly.
5618 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
5619 (movsd splitters): Similarly.
5621 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
5622 ADDB, ADDW and ADDL into a single ADD attribute which selects the
5623 right table based on the size of the operand.
5624 * config/h8300/h8300.md (length_table): Corresponding changes. All
5625 references to "addb", "addw" and "addl" changed to "add".
5626 (btst patterns): Merge two variants into a single pattern.
5627 (tstqi, tsthi): Likewise.
5628 (addhi3_incdec, addsi3_incdec): Likewise.
5629 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
5630 (mulhi3, mulsi3): Likewise.
5631 (udivhi3, udivsi3): Likewise.
5632 (divhi3, divsi3): Likewise.
5633 (andorqi3, andorhi3, andorsi3): Likewise.
5635 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
5638 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
5639 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
5641 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5643 PR tree-optimization/85694
5644 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
5645 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
5647 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
5648 (<u>avg<mode>3_ceil): New patterns.
5650 2018-07-03 David Malcolm <dmalcolm@redhat.com>
5652 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
5653 scan-tree-dump directive.
5654 * gcc.dg/vect/slp-perm-2.c: Likewise.
5655 * gcc.dg/vect/slp-perm-3.c: Likewise.
5656 * gcc.dg/vect/slp-perm-5.c: Likewise.
5657 * gcc.dg/vect/slp-perm-6.c: Likewise.
5658 * gcc.dg/vect/slp-perm-7.c: Likewise.
5659 * gcc.dg/vect/slp-perm-8.c: Likewise.
5661 2018-07-03 Marek Polacek <polacek@redhat.com>
5664 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
5666 2018-07-03 Richard Biener <rguenther@suse.de>
5669 * tree-ssa-structalias.c (find_func_clobbers): Properly
5670 handle indirect calls.
5672 2018-07-03 Jeff Law <law@redhat.com>
5674 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
5675 (shifts): New code iterator.
5676 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
5677 expander. Fix HImode handling on H8/SX.
5678 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
5679 (subqi3, subhi3, subsi3 expanders): Likewise.
5680 (andqi3, andhi3, andsi3 expanders): Likewise.
5681 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
5682 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
5683 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
5684 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
5685 (zero_extendqihi2, zero_extendqisi2): Likewise.
5686 (extendqihi2, extendqisi2): Likewise.
5687 (rotlqi3, rotlhi3, rotlsi3): Likewise.
5688 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
5689 (rotlqi3_1, rotlhi3_1): Likewise.
5690 (logicalhi3_sn, logicalsi3_sn): Likewise.
5691 (logicalhi3, logicalsi3): Likewise.
5693 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5695 * tree-vect-patterns.c (vect_recog_rotate_pattern)
5696 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
5697 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
5698 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
5699 type to append_pattern_def_seq instead of creating a stmt_vec_info
5701 (build_mask_conversion): Likewise. Remove vinfo argument.
5702 (vect_add_conversion_to_patterm): Likewise, renaming to...
5703 (vect_add_conversion_to_pattern): ...this.
5704 (vect_recog_mask_conversion_pattern): Update call to
5705 build_mask_conversion. Pass the vector type to
5706 append_pattern_def_seq here too.
5707 (vect_recog_gather_scatter_pattern): Update call to
5708 vect_add_conversion_to_pattern.
5710 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5712 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
5713 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5714 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
5715 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
5716 STMT_VINFO_PATTERN_DEF_SEQ to null here.
5717 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
5718 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
5719 append_pattern_def_seq instead of new_pattern_def_seq.
5720 (vect_recog_divmod_pattern): Do both of the above.
5721 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
5724 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5726 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
5727 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
5728 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
5729 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
5730 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
5731 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
5732 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
5733 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
5734 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
5735 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
5736 parameter with a single stmt_vec_info.
5737 (vect_recog_func_ptr): Likewise.
5738 (vect_recog_gather_scatter_pattern): Likewise, folding in...
5739 (vect_try_gather_scatter_pattern): ...this.
5740 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
5741 the stmt_vec_info of the statement to be matched. Don't clear
5742 STMT_VINFO_RELATED_STMT.
5743 (vect_pattern_recog): Update call accordingly.
5745 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5747 PR tree-optimization/85694
5748 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
5749 (uavgM3_ceil): Document new optabs.
5750 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
5751 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
5753 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
5754 (savg_ceil_optab): New optabs.
5755 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
5756 (vect_vect_recog_func_ptrs): Add it.
5757 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
5758 constant directly from the associated lhs.
5760 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5762 * tree-vect-patterns.c (vect_split_statement): New function.
5763 (vect_convert_input): Use it to try to split an existing cast.
5765 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5767 * poly-int.h (print_hex): New function.
5768 * dumpfile.h (dump_dec, dump_hex): Declare.
5769 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
5770 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
5771 min_input_precision, operation_precision and operation_sign.
5772 * tree-vect-patterns.c (vect_get_range_info): New function.
5773 (vect_same_loop_or_bb_p, vect_single_imm_use)
5774 (vect_operation_fits_smaller_type): Delete.
5775 (vect_look_through_possible_promotion): Add an optional
5776 single_use_p parameter.
5777 (vect_recog_over_widening_pattern): Rewrite to use new
5778 stmt_vec_info infomration. Handle one operation at a time.
5779 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
5780 (vect_truncatable_operation_p, vect_set_operation_type)
5781 (vect_set_min_input_precision): New functions.
5782 (vect_determine_min_output_precision_1): Likewise.
5783 (vect_determine_min_output_precision): Likewise.
5784 (vect_determine_precisions_from_range): Likewise.
5785 (vect_determine_precisions_from_users): Likewise.
5786 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
5787 (vect_vect_recog_func_ptrs): Put over_widening first.
5789 (vect_pattern_recog): Call vect_determine_precisions.
5791 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5793 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
5794 statements that have been replaced by further pattern statements.
5795 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
5797 2018-07-03 Richard Biener <rguenther@suse.de>
5799 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
5800 always set *dt. Dump vectype in vectype overload.
5801 * dumpfile.h (dump_gimple_expr): New function.
5802 (dump_gimple_expr_loc): Likewise.
5803 * dumpfile.c (dump_gimple_expr): New function.
5804 (dump_gimple_expr_loc): Likewise.
5806 2018-07-02 Jeff Law <law@redhat.com>
5808 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
5809 the H8/300, H8/300H and H8/S variants into a single pattern.
5810 (movhi_h8300, movqi_h8300hs): Similarly.
5811 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
5812 (QHI mode iterator): New.
5814 * config/h8300/h8300.md: Remove trailing whitespace.
5816 2018-07-02 Jim Wilson <jimw@sifive.com>
5818 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
5819 instead of emit_insn for interrupt returns.
5820 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
5821 (riscv_sret, riscv_uret): Likewise.
5823 2018-07-02 David Malcolm <dmalcolm@redhat.com>
5825 * pretty-print.c (selftest::test_pp_format): Move save and restore
5826 of quotes to class auto_fix_quotes, and add an instance.
5827 * selftest.c: Include "intl.h".
5828 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
5829 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
5830 * selftest.h (selftest::auto_fix_quotes): New class.
5832 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
5834 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
5835 (aarch64_sve_prepare_conditional_op): Remove.
5836 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
5837 Allow aarch64_simd_reg_or_zero as select operand; remove
5838 the aarch64_sve_prepare_conditional_op call.
5839 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
5840 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
5841 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
5842 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
5843 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
5844 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
5845 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
5846 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
5847 and a splitters to match all of the *_any patterns.
5848 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
5850 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
5851 (SVE_COND_FP_BINARY_REV): Remove.
5852 (sve_int_op_rev, sve_fp_op_rev): New.
5853 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
5854 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
5855 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
5856 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
5857 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
5858 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
5859 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
5860 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
5861 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
5863 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
5864 Remove match_dup 1 from the inner unspec.
5865 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
5867 * config/aarch64/aarch64.md (movprfx): New attr.
5868 (length): Default movprfx to 8.
5869 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
5870 (*madd<SVE_I>, *msub<SVE_I): Likewise.
5871 (*<su>mul<SVE_I>3_highpart): Likewise.
5872 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
5873 (*v<ASHIFT><SVE_I>3): Likewise.
5874 (*<su><MAXMIN><SVE_I>3): Likewise.
5875 (*<su><MAXMIN><SVE_F>3): Likewise.
5876 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
5877 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
5878 (*div<SVE_F>4): Likewise.
5880 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
5882 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
5885 2018-07-02 Richard Biener <rguenther@suse.de>
5887 PR tree-optimization/86363
5888 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
5889 memset argument refers to a non-variable address.
5891 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
5893 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
5894 {PLUS,MINUS}_EXPR code to...
5895 (adjust_symbolic_bound): ...here,
5896 (combine_bound): ...here,
5897 (set_value_range_with_overflow): ...and here.
5899 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
5901 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
5903 (extract_range_from_abs_expr): ...here.
5905 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
5907 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
5908 -fno-omit-frame-pointer when not optimizing.
5910 2018-07-02 Martin Liska <mliska@suse.cz>
5913 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
5914 (propagate_nothrow): Likewise.
5916 2018-07-02 Martin Liska <mliska@suse.cz>
5919 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
5921 2018-07-02 David Malcolm <dmalcolm@redhat.com>
5923 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
5924 function in r262149, changing "loc" param from source_location to
5925 const dump_location_t &.
5926 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
5927 declaration, as above.
5929 2018-07-01 Paul Koning <ni1d@arrl.net>
5931 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
5932 -munit-asm, -mgnu-asm, -mdec-asm.
5933 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
5934 (pdp11_output_labelref): New.
5935 (pdp11_output_def): New.
5936 (pdp11_output_addr_vec_elt): New.
5937 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
5938 %# and %@ format codes.
5939 (pdp11_option_override): New.
5940 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
5941 (pdp11_output_ident): New.
5942 (pdp11_asm_named_section): New.
5943 (pdp11_asm_init_sections): New.
5944 (pdp11_file_start): New.
5945 (pdp11_file_end): New.
5946 (output_ascii): Use .ascii/.asciz for -mdec-asm.
5947 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
5948 %o, like %c but octal.
5949 (pdp11_option_override): New.
5950 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
5952 (DATA_SECTION_ASM_OP): Ditto.
5953 (READONLY_DATA_SECTION_ASM_OP): New.
5954 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
5955 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
5956 (ASM_OUTPUT_LABELREF): Ditto.
5957 (ASM_OUTPUT_DEF): Ditto.
5958 (ASM_OUTPUT_EXTERNAL): New.
5959 (ASM_OUTPUT_SOURCE_FILENAME): New.
5960 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
5961 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
5962 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
5963 %# and %@ format codes.
5964 * config/pdp11/pdp11.opt (mgnu-asm): New.
5965 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
5966 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
5967 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
5969 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
5971 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
5972 dereferencing path[] beyond its length.
5974 (debug_all_paths): New.
5975 (rewire_first_differing_edge): New.
5976 (adjust_paths_after_duplication): New.
5977 (duplicate_thread_path): Call adjust_paths_after_duplication.
5979 (thread_through_all_blocks): Add new argument to
5980 duplicate_thread_path.
5982 2018-06-30 Jim Wilson <jimw@sifive.com>
5984 * config/riscv/predicates.md (p2m1_shift_operand): New.
5985 (high_mask_shift_operand): New.
5986 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
5987 pattern using p2m1_shift_operand.
5988 (lshsi3_zero_extend_3+2): New combiner pattern using
5989 high_mask_shift_operand.
5991 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5993 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
5995 (vect_recog_rotate_pattern): ...here.
5996 (vect_convert_input): Try to insert casts of invariants in the
5998 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
5999 preheader to be empty.
6001 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6003 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
6004 vector type. If given, install it in the new statement's
6006 (vect_element_precision): New function.
6007 (vect_unpromoted_value): New struct.
6008 (vect_unpromoted_value::vect_unpromoted_value): New function.
6009 (vect_unpromoted_value::set_op): Likewise.
6010 (vect_look_through_possible_promotion): Likewise.
6011 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
6012 (vect_widened_op_tree, vect_convert_input): Likewise.
6013 (vect_convert_inputs, vect_convert_output): Likewise.
6014 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
6015 to handle the optional cast of the multiplication result and
6016 vect_widened_op_tree to detect the widened multiplication itself.
6017 Do not require the input and output of promotion casts to have
6018 the same sign, but base the signedness of the operation on the
6019 input rather than the result. If the pattern includes two
6020 promotions, check that those promotions have the same sign.
6021 Do not restrict the MULT_EXPR handling to a double-width result;
6022 handle quadruple-width results and wider. Use vect_convert_inputs
6023 to convert the inputs to the common type.
6024 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
6025 to handle the optional cast of the ABS result. Also allow a sign
6026 change or a sign extension between the ABS and MINUS.
6027 Use vect_widened_op_tree to detect the widened subtraction and use
6028 vect_convert_inputs to convert the inputs to the common type.
6029 (vect_handle_widen_op_by_const): Delete.
6030 (vect_recog_widen_op_pattern): New function.
6031 (vect_recog_widen_mult_pattern): Use it.
6032 (vect_recog_widen_shift_pattern): Likewise.
6033 (vect_recog_widen_sum_pattern): Use
6034 vect_look_through_possible_promotion to handle the promoted
6037 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6039 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
6040 the containing gimple_seq *.
6041 * gimple-iterator.h (gsi_for_stmt): Declare it.
6042 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
6043 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
6044 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6045 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6046 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
6048 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
6050 (vect_mark_pattern_stmts): ...here. Handle cases in which the
6051 statement being replaced is part of an existing pattern
6052 definition sequence, inserting the new pattern statements before
6054 (vect_pattern_recog_1): Don't return a bool. If the statement
6055 is already part of a pattern, instead apply pattern matching
6056 to the pattern definition statements. Don't clear the
6057 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
6058 (vect_pattern_recog): Don't break after the first match;
6059 continue processing the pattern definition statements instead.
6060 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
6062 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6064 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
6065 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6066 (vect_recog_widen_sum_pattern): Use it.
6068 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6070 * tree-vect-loop.c (vectorizable_reduction): Assert that the
6071 phi is not a pattern statement and has not been replaced by
6072 a pattern statement.
6073 * tree-vect-patterns.c (type_conversion_p): Don't check
6074 STMT_VINFO_IN_PATTERN_P.
6075 (vect_recog_vector_vector_shift_pattern): Likewise.
6076 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
6077 the pattern statement rather than the original statement; check
6078 directly for a WIDEN_MULT_EXPR here.
6079 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
6080 vect_is_simple_use to return the pattern statement rather
6081 than the original statement; use is_pattern_stmt_p to check
6082 for such a pattern statement.
6083 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
6084 to return the pattern statement rather than the original statement;
6085 don't do the same transformation here.
6086 (vect_is_simple_use): If the defining statement has been replaced
6087 by a pattern statement, return the pattern statement instead.
6088 Remove the corresponding (local) transformation from the vectype
6091 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6093 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
6094 end and default to null.
6095 * tree-vect-loop.c (vect_create_epilog_for_reduction)
6096 (vectorizable_reduction): Update calls accordingly, dropping the
6097 gimple ** argument if the passed-back statement isn't needed.
6098 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
6099 (vect_recog_rotate_pattern): Likewise.
6100 (vect_recog_mask_conversion_pattern): Likewise.
6101 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6102 (vect_mask_constant_operand_p): Likewise.
6103 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
6104 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
6105 (get_group_load_store_type, get_load_store_type): Likewise.
6106 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
6107 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
6108 (vectorizable_conversion, vectorizable_assignment): Likewise.
6109 (vectorizable_shift, vectorizable_operation): Likewise.
6110 (vectorizable_store, vect_is_simple_cond): Likewise.
6111 (vectorizable_condition, vectorizable_comparison): Likewise.
6112 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
6113 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
6114 and move it to the end. Cope with null def_stmt_outs.
6116 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
6118 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
6120 2018-06-29 Jeff Law <law@redhat.com>
6122 * config/v850/v850.c (v850_legitimate_address_p): Handle large
6123 displacements for TARGET_V850E2V3 and newer.
6124 (TARGET_LRA_P): Remove. Defaults to LRA now.
6125 * config/v850/v850.md (sign23byte_load): Remove.
6126 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
6127 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
6129 2018-06-29 Martin Liska <mliska@suse.cz>
6132 * coverage.c (coverage_init): Mangle full path name.
6133 * doc/invoke.texi: Document the change.
6134 * gcov-io.c (mangle_path): New.
6135 * gcov-io.h (mangle_path): Likewise.
6136 * gcov.c (mangle_name): Use mangle_path for path mangling.
6138 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6140 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
6141 if starting source register is not even.
6143 2018-06-29 Martin Liska <mliska@suse.cz>
6145 PR tree-optimization/86263
6146 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
6147 Make edge redirection.
6149 2018-06-29 David Malcolm <dmalcolm@redhat.com>
6151 * dumpfile.c (dump_loc): Add indentation based on scope depth.
6152 (dump_scope_depth): New variable.
6153 (get_dump_scope_depth): New function.
6154 (dump_begin_scope): New function.
6155 (dump_end_scope): New function.
6156 * dumpfile.h (get_dump_scope_depth): New declaration.
6157 (dump_begin_scope): New declaration.
6158 (dump_end_scope): New declaration.
6159 (class auto_dump_scope): New class.
6160 (AUTO_DUMP_SCOPE): New macro.
6161 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
6164 2018-06-29 Richard Biener <rguenther@suse.de>
6166 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
6167 compute_all_dependences succeeds.
6168 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
6169 exceed --param loop-max-datarefs-for-datadeps.
6171 2018-06-29 Jakub Jelinek <jakub@redhat.com>
6173 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
6175 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
6178 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
6179 alternative 0 in preferred_for_speed attribute.
6181 2018-06-28 Paul Koning <ni1d@arrl.net>
6183 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
6184 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
6185 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
6186 * config/pdp11/pdp11.md: Correct "length" attribute calculation
6187 for shift insn patterns.
6189 2018-06-28 David Malcolm <dmalcolm@redhat.com>
6191 * cgraph.c (cgraph_node::get_body): Replace assignments to
6192 "dump_file" with calls to set_dump_file.
6193 * dumpfile.c (alt_dump_file): Make static, and group with...
6194 (alt_flags): ...this definition.
6195 (dumps_are_enabled): New variable.
6196 (refresh_dumps_are_enabled): New function.
6197 (set_dump_file): New function.
6198 (set_alt_dump_file): New function.
6199 (gcc::dump_manager::dump_start): Replace assignments to
6200 "dump_file" and "alt_dump_file" with calls to set_dump_file and
6202 (gcc::dump_manager::dump_finish): Likewise.
6203 * dumpfile.h (alt_dump_file): Delete decl.
6204 (dumps_are_enabled): New variable decl.
6205 (set_dump_file): New function decl.
6206 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
6208 * tree-nested.c (lower_nested_functions): Replace assignments to
6209 "dump_file" with calls to set_dump_file.
6211 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
6213 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
6214 goto_locus of each outgoing edge of each basic block.
6216 2018-06-28 Richard Biener <rguenther@suse.de>
6218 * dwarf2out.c (decl_scope_table): Remove.
6219 (push_decl_scope): Likewise.
6220 (pop_decl_scope): Likewise.
6221 (gen_type_die_for_member): Do not call push/pop_decl_scope.
6222 (gen_struct_or_union_type_die): Likewise.
6223 (gen_tagged_type_die): Likewise.
6224 (dwarf2out_init): Do not initialize decl_scope_table.
6225 (dwarf2out_c_finalize): Do not free it.
6227 2018-06-28 Richard Biener <rguenther@suse.de>
6229 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
6230 deciding whether to not re-use a DIE.
6232 2018-06-28 Richard Biener <rguenther@suse.de>
6234 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
6235 DW_AT_abstract_origin attribute.
6237 2018-06-28 Martin Liska <mliska@suse.cz>
6239 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
6240 Use newly introduced constants.
6241 * tree-switch-conversion.h (struct jump_table_cluster):
6242 Define max_ratio_for_size and max_ratio_for_speed.
6244 2018-06-28 Martin Liska <mliska@suse.cz>
6246 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6247 Add new checking assert to catch invalid state.
6248 (jump_table_cluster::can_be_handled): Handle single case
6250 (jump_table_cluster::is_beneficial): Bail out for such case.
6251 (bit_test_cluster::find_bit_tests):
6252 Add new checking assert to catch invalid state.
6253 (bit_test_cluster::can_be_handled): Handle single case
6255 (bit_test_cluster::is_beneficial): Bail out for such case.
6256 (switch_decision_tree::analyze_switch_statement):
6259 2018-06-28 Martin Liska <mliska@suse.cz>
6261 * common.opt: Introduce -completion option.
6262 * gcc.c (driver_handle_option): Handle it.
6263 (driver::main): Print completions if completion
6265 * opt-suggestions.c (option_proposer::get_completions):
6267 (option_proposer::suggest_completion): Likewise.
6268 (option_proposer::find_param_completions): Likewise.
6269 (verify_autocompletions): Likewise.
6270 (test_completion_valid_options): Likewise.
6271 (test_completion_valid_params): Likewise.
6272 (in_completion_p): Likewise.
6273 (empty_completion_p): Likewise.
6274 (test_completion_partial_match): Likewise.
6275 (test_completion_garbage): Likewise.
6276 (opt_proposer_c_tests): Likewise.
6277 * opt-suggestions.h: Declare new functions.
6278 * opts.c (common_handle_option): Handle OPT__completion_.
6279 * selftest-run-tests.c (selftest::run_tests): Add
6280 opt_proposer_c_tests.
6281 * selftest.c (assert_str_startswith): New.
6282 * selftest.h (assert_str_startswith): Likewise.
6283 (opt_proposer_c_tests): New.
6284 (ASSERT_STR_STARTSWITH): Likewise.
6286 2018-06-28 Martin Liska <mliska@suse.cz>
6288 * Makefile.in: Add opt-suggestions.o.
6289 * gcc-main.c: Include opt-suggestions.h.
6290 * gcc.c (driver::driver): Likewise.
6291 (driver::~driver): Remove m_option_suggestions.
6292 (driver::build_option_suggestions): Moved to option_proposer.
6293 (driver::suggest_option): Likewise.
6294 (driver::handle_unrecognized_options): Use option_proposer.
6295 * gcc.h (class driver): Add new memver m_option_proposer.
6296 * opt-suggestions.c: New file.
6297 * opt-suggestions.h: New file.
6299 2018-06-28 Martin Liska <mliska@suse.cz>
6301 * vec.h (class auto_string_vec): New (moved from auto_argvec).
6302 (auto_string_vec::~auto_string_vec): Likewise.
6304 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
6306 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
6307 prevent_decl_creation_for_types fields up and add reset_location field.
6308 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
6309 statement if id->reset_location is true.
6310 (copy_edges_for_bb): Do not set goto_locus on the new edges if
6311 id->reset_location is true.
6312 (copy_phis_for_bb): Force input_location on the arguments if
6313 id->reset_location is true.
6314 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
6315 is set on the function to be inlined.
6317 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
6319 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
6321 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
6323 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
6324 registers for Pmode.
6325 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
6326 hard registers for the clobbered pseudo.
6328 2018-06-27 Paul Koning <ni1d@arrl.net>
6330 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6331 mutually exclusive options.
6332 * config/pdp11/constraints.md (h): New constraint.
6333 (O): Update definition to match shift code generation.
6334 (D): New constraint.
6335 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
6337 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
6339 (output_jump): Change arguments.
6340 (pdp11_fixed_cc_regs): New function.
6341 (pdp11_cc_mode): Ditto.
6342 (pdp11_expand_shift): Ditto.
6343 (pdp11_assemble_shift): Ditto.
6344 (pdp11_small_shift): Ditto.
6345 (pdp11_branch_cost): Remove.
6346 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
6348 (pdp11_register_move_cost): Update for CC registers.
6349 (pdp11_rtx_costs): Add case for LSHIFTRT.
6350 (pdp11_output_jump): Add CCNZ mode conditional branches.
6351 (notice_update_cc_on_set): Remove.
6352 (pdp11_cc_mode): New function.
6353 (simple_memory_operand): Correct pre/post decrement case.
6354 (no_side_effect_operand): New function.
6355 (pdp11_regno_reg_class): Add CC_REGS class.
6356 (pdp11_fixed_cc_regs): New function.
6357 (pdp11_small_shift): New function.
6358 (pdp11_expand_shift): New function to expand shift insns.
6359 (pdp11_assemble_shift): New function to output shifts.
6360 (pdp11_branch_cost): Remove.
6361 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
6362 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
6363 (WCHAR_TYPE): Ditto.
6364 (PTRDIFF_TYPE): Ditto.
6365 (ADJUST_INSN_LENGTH): New macro.
6366 (FIXED_REGISTERS): Add CC registers.
6367 (CALL_USED_REGISTERS): Ditto.
6369 (REG_CLASS_NAMES): Ditto.
6370 (REG_CLASS_CONTENTS): Ditto.
6371 (SELECT_CC_MODE): Use new function.
6372 (TARGET_FLAGS_REGNUM): New macro.
6373 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
6374 (cc0_reg_rtx): Remove.
6375 (CC_STATUS_MDEP): Remove.
6376 (CC_STATUS_MDEFP_INIT): Remove.
6377 (CC_IN_FPU): Remove.
6378 (NOTICE_UPDATE_CC): Remove.
6379 (REGISTER_NAMES): Add CC registers.
6380 (BRANCH_COST): Change to constant 1.
6381 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
6383 * config/pdp11/pdp11.opt (mbcopy): Remove.
6384 (mbcopy-builtin): Remove.
6385 (mbranch-cheap): Remove.
6386 (mbranch-expensive): Remove.
6387 * config/pdp11/predicates.md (expand_shift_operand): Update to
6388 match shift code generation.
6389 (ccnz_operator): New predicate.
6390 * doc/invoke.texi (PDP-11 Options): Remove deleted options
6391 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
6392 Remove non-existent option -mabshi, -mno-abshi. Document mutually
6394 * doc/md.texi (PDP-11): Document new D and h constraints. Update
6395 description of O constraint.
6397 2018-06-27 Jeff Law <law@redhat.com>
6398 Austin Law <austinklaw@gmail.com>
6400 * config/v850/v850.md (addsi3_set_flags): New pattern.
6401 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
6402 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
6403 (zero_extendhisi2_v850_set_flags): Likewise.
6404 (zero_extendqisi2_v850_set_flags): Likewise.
6405 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
6406 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
6407 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
6409 * config/v850/v850-protos.h (notice_update_cc): Remove.
6410 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
6411 (v850_print_operand): Handle 'D' and "d".
6412 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
6413 Add handling of arithmetic/logical operations compared against zero.
6414 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
6415 Do not look at v850_compare_op, instead get mode from last argument.
6416 (v850_gen_compare): Remove
6417 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
6418 after reload for prologue insns.
6419 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
6421 (construct_save_jarl): Likewise.
6422 (TARGET_FLAGS_REGNUM): Define.
6423 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
6424 (NOTICE_UPDATE_CC): Remove.
6425 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
6426 than cc0. Conditionalize on reload_completed.
6427 (cmpsi_insn, setfcc_insn): Likewise.
6428 (tst1 splitter): Turn into define_and_split which sets the flags
6430 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
6431 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
6432 (cstoresf4, cstoredf4): Clobber the flags.
6433 (cmpsi, cmpsf, cmpdf): Remove expanders.
6434 (setf_insn): Remove pattern.
6435 (addsi3): Turn into define_and_split which clobbers the flags after
6436 reload and a suitable pattern (addsi3_clobber_flags) for use after
6438 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
6439 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
6440 (ashrsi3, ashrsi3_v850e2): Likewise.
6441 (bins): Clobber the flags.
6442 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
6443 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
6444 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
6445 (call_value_internal_short, call_value_internal_long): Likewise.
6446 (callt_save_interrupt, callt_return_interrupt): Likewise.
6447 (save_interrupt, return_interrupt): Likewise.
6448 (callt_save_all_interrupt, save_all_interrupt): Likewise.
6449 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
6450 (restore_all_interrupt, _restore_all_interrupt): Likewise.
6451 (All FP comparisons): Only allow after reload has completed.
6453 (divh, divhu): Tweak output template.
6454 (branch_z_normal, branch_z_invert): Remove
6455 (branch_nz_normal, branch_nz_invert): Likewise.
6456 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
6458 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
6459 * config/v850/v850.c (notice_update_cc): Remove.
6460 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
6461 (CC_NO_CARRY): Likewise.
6462 (NOTICE_UPDATE_CC): Define to nothing.
6463 * config/v850/v850.md: Remove block comment on cc0 handling
6464 Remove "cc" attribute from all patterns. Remove cc_status handling
6465 from all patterns. Minor formatting fixes.
6467 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6469 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
6470 (cortex-a76.cortex-a55): Likewise.
6471 * config/aarch64/aarch64-tune.md: Regenerate.
6472 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
6473 cortex-a76.cortex-a55.
6475 2018-06-27 Jeff Law <law@redhat.com>
6477 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
6478 (MULTILIB_DIRNAMES): Similarly.
6480 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
6482 * gimple.h (gimple_return_retbnd): Delete.
6483 (gimple_return_set_retbnd): Likewise.
6484 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
6485 gimple_return_set_retbnd.
6486 * gimple-pretty-print.c (dump_gimple_return): Remove call to
6487 gimple_return_retbnd and adjust.
6488 * tree-inline.h (struct copy_body_data): Remove retbnd field.
6489 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
6490 Explicitly return NULL in a couple more cases. Move assertion
6491 on debug statements and remove unreachable code.
6492 (reset_debug_binding): Do not test id->retbnd.
6493 (expand_call_inline): Do not set it.
6495 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6497 * configure.ac: Add --disable-gcov option.
6498 * configure: Regenerate.
6499 * Makefile.in: Honour @enable_gcov@.
6500 * doc/install.texi: Document --disable-gcov.
6502 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6504 * config/arm/arm-cpus.in (cortex-a76): New entry.
6505 (cortex-a76.cortex-a55): Likewise.
6506 * config/arm/arm-tables.opt: Regenerate.
6507 * config/arm/arm-tune.md: Likewise.
6508 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
6509 * doc/invoke.texi (ARM Options): Document cortex-a76 and
6510 cortex-a76.cortex-a55.
6512 2018-06-27 Tamar Christina <tamar.christina@arm.com>
6515 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
6517 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
6519 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
6521 (EPILOGUE_USES): Likewise.
6523 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
6525 * tree-inline.c (remap_location): New function extracted from...
6526 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
6527 (copy_phis_for_bb): ...here. Call remap_location.
6528 (copy_cfg_body): Adjust call to copy_edges_for_bb.
6530 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
6532 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
6533 unaligned vsx for 16B memset.
6535 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
6538 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
6539 ieee128_float_type_node to long_double_type_node unless
6540 TARGET_LONG_DOUBLE_128 is set.
6542 2018-06-26 David Malcolm <dmalcolm@redhat.com>
6544 * cfgloop.c (get_loop_location): Convert return type from
6545 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
6546 by implicit construction from rtx_insn *, and using
6547 dump_user_location_t::from_function_decl for the fallback case.
6548 * cfgloop.h (get_loop_location): Convert return type from
6549 location_t to dump_user_location_t.
6550 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
6551 dump_printf_loc to pass in a dump_location_t rather than a
6552 location_t, via the gimple stmt.
6553 * coverage.c (get_coverage_counts): Update calls to
6554 dump_printf_loc to pass in dump_location_t rather than a
6556 * doc/optinfo.texi (Dump types): Convert example of
6557 dump_printf_loc from taking "locus" to taking "insn". Update
6558 description of the "_loc" calls to cover dump_location_t.
6559 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
6561 (dump_user_location_t::dump_user_location_t): New constructors,
6562 from gimple *stmt and rtx_insn *.
6563 (dump_user_location_t::from_function_decl): New function.
6564 (dump_loc): Make static.
6565 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
6566 const dump_location_t &.
6567 (dump_generic_expr_loc): Delete.
6568 (dump_printf_loc): Convert param "loc" from location_t to
6569 const dump_location_t &.
6570 (selftest::test_impl_location): New function.
6571 (selftest::dumpfile_c_tests): New function.
6572 * dumpfile.h: Include "profile-count.h".
6573 (class dump_user_location_t): New class.
6574 (struct dump_impl_location_t): New struct.
6575 (class dump_location_t): New class.
6576 (dump_printf_loc): Convert 2nd param from source_location to
6577 const dump_location_t &.
6578 (dump_generic_expr_loc): Delete.
6579 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
6580 const dump_location_t &.
6581 * gimple-fold.c (fold_gimple_assign): Update call to
6582 dump_printf_loc to pass in a dump_location_t rather than a
6583 location_t, via the gimple stmt.
6584 (gimple_fold_call): Likewise.
6585 * gimple-loop-interchange.cc
6586 (loop_cand::analyze_iloop_reduction_var): Update for change to
6587 check_reduction_path.
6588 (tree_loop_interchange::interchange): Update for change to
6590 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
6591 change in return-type of find_loop_location.
6592 (graphite_regenerate_ast_isl): Likewise.
6593 * graphite-optimize-isl.c (optimize_isl): Likewise.
6594 * graphite.c (graphite_transform_loops): Likewise.
6595 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
6596 pass in a dump_location_t rather than a location_t, via the
6598 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6599 * ipa.c (walk_polymorphic_call_targets): Likewise.
6600 * loop-unroll.c (report_unroll): Convert "locus" param from
6601 location_t to dump_location_t.
6602 (decide_unrolling): Update for change to get_loop_location's
6604 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
6605 location_t to dump_user_location_t.
6606 (grid_find_single_omp_among_assignments_1): Updates calls to
6607 dump_printf_loc to pass in a dump_location_t rather than a
6608 location_t, via the gimple stmt.
6609 (grid_parallel_clauses_gridifiable): Convert "tloc" from
6610 location_t to dump_location_t. Updates calls to dump_printf_loc
6611 to pass in a dump_location_t rather than a location_t, via the
6613 (grid_inner_loop_gridifiable_p): Likewise.
6614 (grid_dist_follows_simple_pattern): Likewise.
6615 (grid_gfor_follows_tiling_pattern): Likewise.
6616 (grid_target_follows_gridifiable_pattern): Likewise.
6617 (grid_attempt_target_gridification): Convert initialization
6618 of local "grid" from memset to zero-initialization; FIXME: does
6619 this require C++11? Update call to dump_printf_loc to pass in a
6620 optinfo_location rather than a location_t, via the gimple stmt.
6621 * profile.c (read_profile_edge_counts): Updates call to
6622 dump_printf_loc to pass in a dump_location_t rather than a
6624 (compute_branch_probabilities): Likewise.
6625 * selftest-run-tests.c (selftest::run_tests): Call
6627 * selftest.h (dumpfile_c_tests): New decl.
6628 * tree-loop-distribution.c (pass_loop_distribution::execute):
6629 Update for change in return type of find_loop_location.
6630 * tree-parloops.c (parallelize_loops): Likewise.
6631 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
6632 "locus" from location_t to dump_user_location_t.
6633 (canonicalize_loop_induction_variables): Likewise.
6634 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
6635 for change in return type of find_loop_location.
6636 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
6637 to dump_printf_loc to pass in a dump_location_t rather than a
6638 location_t, via the stmt.
6639 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
6641 * tree-vect-loop-manip.c (find_loop_location): Convert return
6642 type from source_location to dump_user_location_t.
6643 (vect_do_peeling): Update for above change.
6644 (vect_loop_versioning): Update for change in type of
6646 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
6647 from location_t to dump_user_location_t.
6648 (vect_estimate_min_profitable_iters): Update for change in type
6650 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
6651 location_t to dump_location_t.
6652 (vect_slp_bb): Update for change in type of vect_location.
6653 * tree-vectorizer.c (vect_location): Convert from source_location
6654 to dump_user_location_t.
6655 (try_vectorize_loop_1): Update for change in vect_location's type.
6656 (vectorize_loops): Likewise.
6657 (increase_alignment): Likewise.
6658 * tree-vectorizer.h (vect_location): Convert from source_location
6659 to dump_user_location_t.
6660 (find_loop_location): Convert return type from source_location to
6661 dump_user_location_t.
6662 (check_reduction_path): Convert 1st param from location_t to
6663 dump_user_location_t.
6664 * value-prof.c (check_counter): Update call to dump_printf_loc to
6665 pass in a dump_user_location_t rather than a location_t; update
6666 call to error_at for change in type of "locus".
6667 (check_ic_target): Update call to dump_printf_loc to
6668 pass in a dump_user_location_t rather than a location_t, via the
6671 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
6673 * config/s390/s390.h (enum processor_flags): Do not use
6674 default tune parameter when -march was specified.
6676 2018-06-26 Jakub Jelinek <jakub@redhat.com>
6679 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
6680 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
6683 2018-06-26 Richard Biener <rguenther@suse.de>
6685 PR tree-optimization/86287
6687 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
6688 (vect_analyze_loop): Initialize n_stmts.
6690 2018-06-26 Richard Biener <rguenther@suse.de>
6693 * fold-const.c (fold_convertible_p): Pointer extension
6696 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
6699 * dwarf2out.c (loc_list_has_views): Adjust comments.
6700 (dw_loc_list): Split single cross-partition range with
6703 2018-06-25 Jeff Law <law@redhat.com>
6705 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
6706 on -mbig-switch by default.
6708 * config/v850/predicates.md (const_float_1_operand): Fix match_code
6710 (const_float_0_operand): Remove unused predicate.
6711 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
6712 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
6713 (recipsf2): New expander. Original pattern now called
6715 (recipdf2, recipdf2_insn): Similarly.
6716 (rsqrtsf2, rsqrtsf2_insn): Similarly
6717 (rsqrtdf2, rsqrtdf2_insn): Similarly
6719 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
6721 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
6722 Simplify logic for FreeBSD (twice).
6724 2018-06-25 Martin Sebor <msebor@redhat.com>
6726 PR tree-optimization/86204
6727 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
6728 a strnlen result if it's less than the length of the string.
6730 2018-06-25 Martin Sebor <msebor@redhat.com>
6732 PR tree-optimization/85700
6733 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
6734 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
6735 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
6737 2018-06-25 Martin Sebor <msebor@redhat.com>
6739 * doc/extend.texi (Zero-length arrays): Update and clarify.
6741 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
6743 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
6744 added IEEE/IBM long double multilib support on PowerPC little
6745 endian Linux systems.
6746 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
6747 (MULTILIB_DEFAULTS): Likewise.
6748 * config/rs6000/rs6000.c (rs6000_option_override_internal):
6750 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
6751 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
6752 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
6754 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
6757 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
6758 (REORDER_45): Likewise.
6760 2018-06-25 Jeff Law <law@redhat.com>
6762 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
6763 dividend to 32 bits. Adjust length.
6764 (udivmodhi4): Cleanup output template. Fix length.
6766 2018-06-25 Carl Love <cel@us.ibm.com>
6768 * config/rs6000/vsx.md: Change word selector to prefered location.
6770 2018-06-25 Richard Biener <rguenther@suse.de>
6772 PR tree-optimization/86304
6773 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
6774 epilogue-if-converted loops as well.
6776 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
6778 * lto-section-out.c (lto_begin_section): Do not print section
6779 name for noaddr and unnumbered dumps.
6781 2018-06-25 Richard Biener <rguenther@suse.de>
6783 * tree-vectorizer.h (struct vec_info_shared): New structure
6784 with parts split out from struct vec_info and loop_nest from
6785 struct _loop_vec_info.
6786 (struct vec_info): Adjust accordingly.
6787 (struct _loop_vec_info): Likewise.
6788 (LOOP_VINFO_LOOP_NEST): Adjust.
6789 (LOOP_VINFO_DATAREFS): Likewise.
6790 (LOOP_VINFO_DDRS): Likewise.
6791 (struct _bb_vec_info): Likewise.
6792 (BB_VINFO_DATAREFS): Likewise.
6793 (BB_VINFO_DDRS): Likewise.
6794 (struct _stmt_vec_info): Add dr_aux member.
6795 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
6796 (DR_MISALIGNMENT_UNINITIALIZED): New.
6797 (set_dr_misalignment): Adjust.
6798 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
6799 (vect_analyze_loop): Adjust prototype.
6800 (vect_analyze_loop_form): Likewise.
6801 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
6802 Compute dependences lazily.
6803 (vect_record_base_alignments): Use shared datarefs/ddrs.
6804 (vect_verify_datarefs_alignment): Likewise.
6805 (vect_analyze_data_refs_alignment): Likewise.
6806 (vect_analyze_data_ref_accesses): Likewise.
6807 (vect_analyze_data_refs): Likewise.
6808 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
6809 constructor parameter for shared part.
6810 (vect_analyze_loop_form): Pass in shared part and adjust.
6811 (vect_analyze_loop_2): Pass in storage for the number of
6812 stmts. Move loop nest finding to the caller. Compute
6814 (vect_analyze_loop): Pass in shared part.
6815 (vect_transform_loop): Verify shared datarefs are unchanged.
6816 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
6817 constructor parameter for shared part.
6818 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
6819 (vect_slp_bb): Verify shared datarefs are unchanged before
6821 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
6823 (new_stmt_vec_info): Initialize DR_AUX misalignment to
6824 DR_MISALIGNMENT_UNINITIALIZED.
6825 * tree-vectorizer.c (vec_info::vec_info): Add constructor
6826 parameter for shared part.
6827 (vec_info::~vec_info): Adjust.
6828 (vec_info_shared::vec_info_shared): New.
6829 (vec_info_shared::~vec_info_shared): Likewise.
6830 (vec_info_shared::save_datarefs): Likewise.
6831 (vec_info_shared::check_datarefs): Likewise.
6832 (try_vectorize_loop_1): Construct shared part live for analyses
6833 of a single loop for multiple vector sizes.
6834 * tree-parloops.c (gather_scalar_reductions): Adjust.
6836 2018-06-25 Richard Biener <rguenther@suse.de>
6838 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
6839 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
6840 (vect_analyze_data_refs): Remove similar code from here and
6841 simplify accordingly.
6843 2018-06-25 Richard Biener <rguenther@suse.de>
6845 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
6846 for reverse storage order accesses rather than asserting
6847 they cannot happen here.
6849 2018-06-25 Tom de Vries <tdevries@suse.de>
6852 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
6853 Use data16 instead of .byte for insn prefix.
6855 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
6858 * parser.c (make_char_string_pack): Pass this literal chars
6859 through cpp_interpret_string.
6860 (cp_parser_userdef_numeric_literal): Check the result of
6861 make_char_string_pack.
6863 2018-06-24 Maya Rashish <coypu@sdf.org>
6865 * ginclude/stddef.h: Simplify conditions around avoiding
6866 re-definition of __size_t.
6868 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
6870 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
6871 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
6873 2018-06-22 Maya Rashish <coypu@sdf.org>
6875 * doc/invoke.texi (mno-fancy-math-387): Update for changes
6876 made to OpenBSD and NetBSD through the years.
6878 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
6880 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
6881 behavior of vec_pack (vector double, vector double) to match
6882 behavior of vec_float2 (vector double, vector double).
6884 2018-06-22 Olivier Hainque <hainque@adacore.com>
6886 * gimplify.c (gimplify_function_tree): Prevent creation
6887 of a trampoline for the address of the current function
6888 passed to entry/exit instrumentation hooks.
6890 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
6893 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
6896 2018-06-22 Martin Liska <mliska@suse.cz>
6898 PR tree-optimization/86263
6899 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6900 Bail out if is_enabled is false.
6901 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
6903 (jump_table_cluster::is_enabled): New function.
6905 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
6907 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
6908 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
6909 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
6910 (lto_input_ts_binfo_tree_pointers): Likewise.
6911 * tree-streamer-out.c (streamer_write_tree_bitfields,
6912 write_ts_binfo_tree_pointers): Likewise.
6913 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
6915 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
6917 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
6919 2018-06-22 Martin Liska <mliska@suse.cz>
6921 * symbol-summary.h (get): Make it pure and inline move
6922 functionality from ::get function.
6923 (get): Remove and inline into ::get and ::get_create.
6924 (get_create): Move code from ::get function.
6926 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6929 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
6930 -x assembler-with-cpp.
6932 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6934 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
6935 _FILE_OFFSET_BITS=64 for C++.
6937 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
6939 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
6940 conversion insn that shows up when pr85657-3.c is compiled using
6941 IEEE 128-bit long double.
6942 (neg<mode>2_internal): Use the correct mode to check whether the
6943 mode is IBM extended.
6944 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
6945 multiply and divide external functions from being created more
6948 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6950 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
6952 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
6953 the edge can be forwarded.
6954 (cfg_layout_merge_blocks): Likewise.
6956 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6958 * except.c (finish_eh_generation): Commit edge insertions only after
6959 the EH edges have been redirected from post-landing to landing pads.
6961 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6963 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
6964 create_tmp_var_for to create the FRAME decl.
6965 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
6967 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6969 * tree-inline.c (copy_edges_for_bb): Minor tweak.
6970 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
6971 debug statement when resetting its value.
6972 (expand_call_inline): Copy the locus of the call onto the assignment
6973 of the return value, if any. Use local variable in more cases.
6975 2018-06-21 Martin Liska <mliska@suse.cz>
6977 * ipa-pure-const.c (propagate_nothrow): Use
6978 funct_state_summaries->get.
6979 (dump_malloc_lattice): Likewise.
6980 (propagate_malloc): Likewise.
6982 2018-06-21 Richard Biener <rguenther@suse.de>
6984 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
6985 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
6986 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
6988 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
6989 BLOCK_ABSTRACT_ORIGIN unconditionally.
6991 2018-06-21 David Malcolm <dmalcolm@redhat.com>
6993 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
6995 * ipa-reference.c (ipa_reference_c_finalize): Delete
6996 ipa_ref_opt_sum_summaries and set it to NULL.
6998 2018-06-21 Tom de Vries <tdevries@suse.de>
7000 PR tree-optimization/85859
7001 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
7002 test with comment from bb_no_side_effects_p.
7004 2018-06-21 Richard Biener <rguenther@suse.de>
7006 PR tree-optimization/86232
7007 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
7008 max for constant niter.
7010 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
7012 * config/aarch64/aarch64-simd.md
7013 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
7015 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
7017 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
7018 Make opernads of the unspec commutative.
7020 2018-06-21 Richard Biener <rguenther@suse.de>
7022 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
7023 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
7024 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
7025 (vect_analyze_data_ref_dependence): Re-order checks to deal with
7027 (vect_record_base_alignments): Do not record base alignment
7028 for gathers or scatters.
7029 (vect_compute_data_ref_alignment): Drop return value that is always
7030 true. Bail out early for gathers or scatters.
7031 (vect_enhance_data_refs_alignment): Bail out early for gathers
7033 (vect_find_same_alignment_drs): Likewise.
7034 (vect_analyze_data_refs_alignment): Remove dead code.
7035 (vect_slp_analyze_and_verify_node_alignment): Likewise.
7036 (vect_analyze_data_refs): For possible gathers or scatters do
7037 not create an alternate DR, just check their possible validity
7038 and mark them. Adjust DECL_NONALIASED handling to not rely
7040 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
7041 update inits of gathers or scatters.
7042 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
7043 Also copy gather/scatter flag to pattern vinfo.
7045 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
7047 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7048 behavior of vec_packsu (vector unsigned long long, vector unsigned
7049 long long) to match behavior of vec_packs with same signature.
7051 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
7052 Thomas Schwinge <thomas@codesourcery.com>
7053 Cesar Philippidis <cesar@codesourcery.com>
7055 * gimplify.c (gimplify_scan_omp_clauses): Add support for
7056 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7057 (gimplify_adjust_omp_clauses): Likewise.
7058 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
7059 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
7060 (gimplify_omp_target_update): Update handling of acc update and
7062 * omp-low.c (install_var_field): Remove unused parameter
7063 base_pointers_restrict.
7064 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
7065 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
7067 (omp_target_base_pointers_restrict_p): Delete.
7068 (scan_omp_target): Update call to scan_sharing_clauses.
7069 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
7071 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
7072 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7073 (convert_local_omp_clauses): Likewise.
7074 * tree-pretty-print.c (dump_omp_clause): Likewise.
7075 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
7077 (omp_clause_code_name): Likewise.
7079 2018-06-20 Jakub Jelinek <jakub@redhat.com>
7082 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
7085 PR tree-optimization/86231
7086 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
7087 anti-range don't overwrite *vr0min before using it to compute *vr0max.
7089 2018-06-20 Tom de Vries <tdevries@suse.de>
7091 PR tree-optimization/86097
7092 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
7093 iv type if signedness of iv type is not the same as that of *nit.
7095 2018-06-20 Jakub Jelinek <jakub@redhat.com>
7097 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
7098 EDGE_EH edges, verify they are all EDGE_EH.
7100 2018-06-20 Maya Rashish <coypu@sdf.org>
7102 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
7104 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7106 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
7107 * config/aarch64/aarch64.c (xgene1_tunings): Add
7108 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
7109 (aarch64_mode_valid_for_sched_fusion_p):
7110 Allow 16-byte modes.
7111 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
7112 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
7114 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
7116 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
7117 * config/aarch64/iterators.md (VQ2): New mode iterator.
7119 2018-06-20 Martin Liska <mliska@suse.cz>
7121 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7122 Change default ratio from 10 to 8.
7124 2018-06-20 Martin Liska <mliska@suse.cz>
7126 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7128 (bit_test_cluster::find_bit_tests): Likewise.
7129 (switch_decision_tree::analyze_switch_statement): Find clusters.
7130 * tree-switch-conversion.h (struct jump_table_cluster): Document
7133 2018-06-20 Martin Liska <mliska@suse.cz>
7135 * tree-switch-conversion.c (switch_conversion::collect):
7136 Record m_uniq property.
7137 (switch_conversion::expand): Bail out for special conditions.
7138 (group_cluster::~group_cluster): New.
7139 (group_cluster::group_cluster): Likewise.
7140 (group_cluster::dump): Likewise.
7141 (jump_table_cluster::emit): New.
7142 (switch_decision_tree::fix_phi_operands_for_edges): New.
7143 (struct case_node): Remove struct.
7144 (jump_table_cluster::can_be_handled): New.
7145 (case_values_threshold): Moved to header.
7146 (reset_out_edges_aux): Likewise.
7147 (jump_table_cluster::is_beneficial): New.
7148 (bit_test_cluster::can_be_handled): Likewise.
7149 (add_case_node): Remove.
7150 (bit_test_cluster::is_beneficial): New.
7151 (case_bit_test::cmp): New.
7152 (bit_test_cluster::emit): New.
7153 (expand_switch_as_decision_tree_p): Remove.
7154 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
7155 (fix_phi_operands_for_edge): Likewise.
7156 (switch_decision_tree::analyze_switch_statement): New.
7157 (compute_cases_per_edge): Move ...
7158 (switch_decision_tree::compute_cases_per_edge): ... here.
7159 (try_switch_expansion): Likewise.
7160 (switch_decision_tree::try_switch_expansion): Likewise.
7161 (record_phi_operand_mapping): Likewise.
7162 (switch_decision_tree::record_phi_operand_mapping): Likewise.
7163 (emit_case_decision_tree): Likewise.
7164 (switch_decision_tree::emit): Likewise.
7165 (balance_case_nodes): Likewise.
7166 (switch_decision_tree::balance_case_nodes): Likewise.
7167 (dump_case_nodes): Likewise.
7168 (switch_decision_tree::dump_case_nodes): Likewise.
7169 (emit_jump): Likewise.
7170 (switch_decision_tree::emit_jump): Likewise.
7171 (emit_cmp_and_jump_insns): Likewise.
7172 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
7173 (emit_case_nodes): Likewise.
7174 (switch_decision_tree::emit_case_nodes): Likewise.
7175 (conditional_probability): Remove.
7176 * tree-switch-conversion.h (enum cluster_type): New.
7178 (struct cluster): Likewise.
7179 (cluster::cluster): Likewise.
7180 (struct simple_cluster): Likewise.
7181 (simple_cluster::simple_cluster): Likewise.
7182 (struct group_cluster): Likewise.
7183 (struct jump_table_cluster): Likewise.
7184 (struct bit_test_cluster): Likewise.
7185 (struct min_cluster_item): Likewise.
7186 (struct case_tree_node): Likewise.
7187 (case_tree_node::case_tree_node): Likewise.
7188 (jump_table_cluster::case_values_threshold): Likewise.
7189 (struct case_bit_test): Likewise.
7190 (struct switch_decision_tree): Likewise.
7191 (struct switch_conversion): Likewise.
7192 (switch_decision_tree::reset_out_edges_aux): Likewise.
7194 2018-06-20 Martin Liska <mliska@suse.cz>
7196 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
7197 (hoist_edge_and_branch_if_true): Likewise.
7198 (expand_switch_using_bit_tests_p): Likewise.
7199 (struct case_bit_test): Likewise.
7200 (case_bit_test_cmp): Likewise.
7201 (emit_case_bit_tests): Likewise.
7202 (switch_conversion::switch_conversion): New class.
7203 (struct switch_conv_info): Remove old struct.
7204 (collect_switch_conv_info): More to ...
7205 (switch_conversion::collect): ... this.
7206 (check_range): Likewise.
7207 (switch_conversion::check_range): Likewise.
7208 (check_all_empty_except_final): Likewise.
7209 (switch_conversion::check_all_empty_except_final): Likewise.
7210 (check_final_bb): Likewise.
7211 (switch_conversion::check_final_bb): Likewise.
7212 (create_temp_arrays): Likewise.
7213 (switch_conversion::create_temp_arrays): Likewise.
7214 (free_temp_arrays): Likewise.
7215 (gather_default_values): Likewise.
7216 (switch_conversion::gather_default_values): Likewise.
7217 (build_constructors): Likewise.
7218 (switch_conversion::build_constructors): Likewise.
7219 (constructor_contains_same_values_p): Likewise.
7220 (switch_conversion::contains_same_values_p): Likewise.
7221 (array_value_type): Likewise.
7222 (switch_conversion::array_value_type): Likewise.
7223 (build_one_array): Likewise.
7224 (switch_conversion::build_one_array): Likewise.
7225 (build_arrays): Likewise.
7226 (switch_conversion::build_arrays): Likewise.
7227 (gen_def_assigns): Likewise.
7228 (switch_conversion::gen_def_assigns): Likewise.
7229 (prune_bbs): Likewise.
7230 (switch_conversion::prune_bbs): Likewise.
7231 (fix_phi_nodes): Likewise.
7232 (switch_conversion::fix_phi_nodes): Likewise.
7233 (gen_inbound_check): Likewise.
7234 (switch_conversion::gen_inbound_check): Likewise.
7235 (process_switch): Use the newly created class.
7236 (switch_conversion::expand): New.
7237 (switch_conversion::~switch_conversion): New.
7238 * tree-switch-conversion.h: New file.
7240 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7242 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
7243 tree-vect-patterns.c.
7244 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
7245 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
7246 (vect_recog_sad_pattern): Likewise.
7247 (vect_recog_widen_sum_pattern): Likewise.
7248 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
7249 (vect_recog_widen_shift_pattern): Remove the type_in argument.
7250 (vect_recog_rotate_pattern): Likewise.
7251 (vect_recog_mult_pattern): Likewise.
7252 (vect_recog_vector_vector_shift_pattern): Likewise.
7253 (vect_recog_divmod_pattern): Likewise.
7254 (vect_recog_mixed_size_cond_pattern): Likewise.
7255 (vect_recog_bool_pattern): Likewise.
7256 (vect_recog_mask_conversion_pattern): Likewise.
7257 (vect_try_gather_scatter_pattern): Likewise.
7258 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
7259 (vect_recog_over_widening_pattern): Likewise.
7260 (vect_recog_gather_scatter_pattern): Likewise.
7261 (vect_recog_func_ptr): Move from tree-vectorizer.h
7262 (vect_vect_recog_func_ptrs): Move further down the file.
7263 (vect_recog_func): Likewise. Remove the third argument.
7264 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
7265 (vect_pattern_recog_1): Expect the pattern function to do any
7266 necessary target tests. Also expect it to provide a vector type.
7267 Remove the type_in handling.
7269 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7271 * tree-vect-patterns.c (vect_pattern_detected): New function.
7272 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
7273 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
7274 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
7275 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
7276 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
7277 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
7278 (vect_recog_mask_conversion_pattern)
7279 (vect_try_gather_scatter_pattern): Likewise.
7281 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7283 * tree-vect-patterns.c (vect_get_internal_def): New function.
7284 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7285 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
7286 (search_type_for_mask_1): Use it.
7288 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7290 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
7291 redundant WIDEN_SUM_EXPR handling.
7292 (vect_recog_sad_pattern): Likewise.
7294 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7296 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
7297 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
7298 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
7299 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
7300 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
7302 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7304 * tree-vect-stmts.c (vectorizable_call): Make sure that we
7305 use the stmt_vec_info of the original bb statement for the
7306 new zero assignment, even if the call is part of a pattern.
7308 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7310 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
7311 that the sequence is attached to the original statement rather
7312 than the pattern statement.
7313 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
7314 PATTERN_DEF_SEQ from the original statement rather than
7315 the main pattern statement.
7316 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
7317 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
7318 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
7320 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7322 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
7323 definition statements before the early exit for statements that aren't
7325 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
7327 (vect_transform_loop): ...here. Process pattern definition
7328 statements without first checking whether the main pattern
7329 statement is live or relevant.
7331 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
7333 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
7334 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
7336 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
7338 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
7339 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
7340 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
7341 (expand_block_compare): Change select_block_compare_mode call.
7342 (expand_strncmp_align_check): Use new functions, fix comment.
7343 (emit_final_str_compare_gpr): New function.
7344 (expand_strn_compare): Refactor and clean up code.
7345 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
7347 2018-06-19 Tony Reix <tony.reix@atos.com>
7348 Damien Bergamini <damien.bergamini@atos.com>
7349 David Edelsohn <dje.gcc@gmail.com>
7351 * collect2.c (static_obj): New variable.
7352 (static_libs): New variable.
7353 (is_in_list): Uncomment declaration.
7354 (main): Track AIX libraries linked statically.
7355 (is_in_list): Uncomment definition.
7356 (scan_prog_file): Don't add AIX shared libraries initializer
7357 to constructor list if linking statically.
7359 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
7361 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
7363 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
7365 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
7367 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
7370 2018-06-19 Martin Liska <mliska@suse.cz>
7372 * config/i386/i386.c (ix86_can_inline_p): Do not use
7373 ipa_fn_summaries::get_create.
7374 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
7376 (devirtualization_time_bonus): Likewise.
7377 (ipcp_propagate_stage): Likewise.
7378 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
7379 (edge_set_predicate): Likewise.
7380 (evaluate_conditions_for_known_args): Likewise.
7381 (evaluate_properties_for_edge): Likewise.
7382 (ipa_call_summary::reset): Tranform to ...
7383 (ipa_call_summary::~ipa_call_summary): ... this.
7384 (ipa_fn_summary::reset): Transform to ...
7385 (ipa_fn_summary::~ipa_fn_summary): ... this.
7386 (ipa_fn_summary_t::remove): Rename to ...
7387 (ipa_fn_summary_t::remove_callees): ... this.
7388 (ipa_fn_summary_t::duplicate): Use placement new
7389 instead of memory copy.
7390 (ipa_call_summary_t::duplicate): Likewise.
7391 (ipa_call_summary_t::remove): Remove.
7392 (dump_ipa_call_summary): Change get_create to get.
7393 (ipa_dump_fn_summary): Dump only when summary exists.
7394 (analyze_function_body): Use symbol_summary::get instead
7396 (compute_fn_summary): Likewise.
7397 (estimate_edge_devirt_benefit): Likewise.
7398 (estimate_edge_size_and_time): Likewise.
7399 (inline_update_callee_summaries): Likewise.
7400 (remap_edge_change_prob): Likewise.
7401 (remap_edge_summaries): Likewise.
7402 (ipa_merge_fn_summary_after_inlining): Likewise.
7403 (write_ipa_call_summary): Likewise.
7404 (ipa_fn_summary_write): Likewise.
7405 (ipa_free_fn_summary): Likewise.
7406 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
7407 (struct ipa_call_summary): Likewise.
7408 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
7410 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
7411 (estimate_size_after_inlining): Likewise.
7412 (estimate_growth): Likewise.
7413 (growth_likely_positive): Likewise.
7414 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
7415 (inline_call): Likewise.
7416 * ipa-inline.c (caller_growth_limits): Likewise.
7417 (can_inline_edge_p): Likewise.
7418 (can_inline_edge_by_limits_p): Likewise.
7419 (compute_uninlined_call_time): Likewise.
7420 (compute_inlined_call_time): Likewise.
7421 (want_inline_small_function_p): Likewise.
7422 (edge_badness): Likewise.
7423 (update_caller_keys): Likewise.
7424 (update_callee_keys): Likewise.
7425 (inline_small_functions): Likewise.
7426 (inline_to_all_callers_1): Likewise.
7427 (dump_overall_stats): Likewise.
7428 (early_inline_small_functions): Likewise.
7429 (early_inliner): Likewise.
7430 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
7431 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7432 * ipa-pure-const.c (malloc_candidate_p): Likewise.
7433 * ipa-split.c (execute_split_functions): Likewise.
7434 * symbol-summary.h: Likewise.
7435 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
7437 2018-06-19 Richard Biener <rguenther@suse.de>
7439 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
7440 (vectorize_loops): ... here. Fix dbgcnt handling.
7441 (try_vectorize_loop): Wrap try_vectorize_loop_1.
7443 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
7446 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
7447 ieee128 argument takes up only one (vector) register, not two (floating
7450 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
7452 * gimplify.c (gimplify_init_constructor): Really never clear for an
7453 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
7455 2018-06-19 Richard Biener <rguenther@suse.de>
7457 PR tree-optimization/86179
7458 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
7459 after failed recognition.
7461 2018-06-18 Martin Sebor <msebor@redhat.com>
7464 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
7465 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
7466 Handle integer subtraction.
7467 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
7468 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
7470 2018-06-18 David Malcolm <dmalcolm@redhat.com>
7472 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
7473 param from rtx to rtx_insn *.
7474 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
7476 (frv_ifcvt_modify_insn): Likwise.
7477 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
7478 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
7479 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
7480 as_a <rtx_insn *> cast to local "unprotected_region" once
7481 it's been established that it's not NULL or pc_rtx.
7482 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
7483 param "sethi" from rtx to rtx_insn *.
7484 (nds32_group_float_insns): Likewise for param "insn".
7485 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
7487 (vax_output_int_subtract): Likewise.
7488 * config/vax/vax.c (vax_output_int_add): Likewise for param
7490 (vax_output_int_subtract): Likewise.
7491 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
7492 (emit_pattern_after): Likewise for param "after".
7493 (emit_insn_after): Likewise.
7494 (emit_jump_insn_after): Likewise.
7495 (emit_call_insn_after): Likewise.
7496 (emit_debug_insn_after): Likewise.
7497 (emit_pattern_before): Likewise for param "before".
7498 (emit_insn_before): Likewise.
7499 (emit_jump_insn_before): Likewise.
7500 * final.c (get_insn_template): Likewise for param "insn", removing
7502 * output.h (get_insn_template): Likewise for 2nd param.
7503 * rtl.h (emit_insn_before): Likewise.
7504 (emit_jump_insn_before): Likewise.
7505 (emit_debug_insn_before_noloc): Likewise.
7506 (emit_insn_after): Likewise.
7507 (emit_jump_insn_after): Likewise.
7508 (emit_call_insn_after): Likewise.
7509 (emit_debug_insn_after): Likewise.
7510 (set_insn_deleted): Likewise for param.
7512 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
7515 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
7516 floating point modes, so that IFmode is numerically greater than
7517 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
7518 to declare the ordering. This prevents IFmode from being
7519 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
7520 machine. Include rs6000-modes.h to share the fractional values
7521 between genmodes* and the rest of the compiler.
7525 * config/rs6000/rs6000-modes.h: New file.
7526 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
7527 meaning of rs6000_long_double_size so that 126..128 selects an
7528 appropriate 128-bit floating point type.
7529 (rs6000_option_override_internal): Likewise.
7530 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
7531 (TARGET_LONG_DOUBLE_128): Change the meaning of
7532 rs6000_long_double_size so that 126..128 selects an appropriate
7533 128-bit floating point type.
7534 (LONG_DOUBLE_TYPE_SIZE): Update comment.
7535 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
7536 source and destination to match the standard usage.
7537 (truncifkf2): Likewise.
7538 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
7539 ISA 2.07 to use an explicit clobber, instead of passing in a
7541 (copysign<mode>3_soft): Likewise.
7543 2018-06-18 David Malcolm <dmalcolm@redhat.com>
7545 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
7546 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
7547 (vect_slp_analyze_instance_dependence): Likewise.
7548 (vect_enhance_data_refs_alignment): Likewise.
7549 (vect_analyze_data_refs_alignment): Likewise.
7550 (vect_slp_analyze_and_verify_instance_alignment
7551 (vect_analyze_data_ref_accesses): Likewise.
7552 (vect_prune_runtime_alias_test_list): Likewise.
7553 (vect_analyze_data_refs): Likewise.
7554 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
7555 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
7556 (vect_analyze_scalar_cycles_1): Likewise.
7557 (vect_get_loop_niters): Likewise.
7558 (vect_analyze_loop_form_1): Likewise.
7559 (vect_update_vf_for_slp): Likewise.
7560 (vect_analyze_loop_operations): Likewise.
7561 (vect_analyze_loop): Likewise.
7562 (vectorizable_induction): Likewise.
7563 (vect_transform_loop): Likewise.
7564 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
7565 * tree-vect-slp.c (vect_analyze_slp): Likewise.
7566 (vect_make_slp_decision): Likewise.
7567 (vect_detect_hybrid_slp): Likewise.
7568 (vect_slp_analyze_operations): Likewise.
7569 (vect_slp_bb): Likewise.
7570 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
7571 (vectorizable_bswap): Likewise.
7572 (vectorizable_call): Likewise.
7573 (vectorizable_simd_clone_call): Likewise.
7574 (vectorizable_conversion): Likewise.
7575 (vectorizable_assignment): Likewise.
7576 (vectorizable_shift): Likewise.
7577 (vectorizable_operation): Likewise.
7578 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
7580 2018-06-18 Martin Sebor <msebor@redhat.com>
7582 PR tree-optimization/81384
7583 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
7584 * builtins.c (expand_builtin_strnlen): New function.
7585 (expand_builtin): Call it.
7586 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
7587 * builtins.def (BUILT_IN_STRNLEN): New.
7588 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
7589 Warn for bounds in excess of maximum object size.
7590 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
7591 single-value ranges. Handle strnlen.
7592 (handle_builtin_strlen): Handle strnlen.
7593 (strlen_check_and_optimize_stmt): Same.
7594 * doc/extend.texi (Other Builtins): Document strnlen.
7596 2018-06-18 Maya Rashish <coypu@sdf.org>
7598 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
7599 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
7600 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
7602 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
7604 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
7606 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7608 * tree.c (escaped_string::escape): Replace cast to char * by
7609 const_cast<char *> (unescaped).
7611 2018-06-18 Nick Clifton <nickc@redhat.com>
7614 * tree.c (escaped_string): New class. Converts an unescaped
7615 string into its escaped equivalent.
7616 (warn_deprecated_use): Use the new class to convert the
7617 deprecation message, if present.
7618 (test_escaped_strings): New self test.
7619 (test_c_tests): Add test_escaped_strings.
7620 * doc/extend.texi (deprecated): Add a note that the
7621 deprecation message is affected by the -fmessage-length
7622 option, and that control characters will be escaped.
7623 (#pragma GCC error): Document this pragma.
7624 (#pragma GCC warning): Likewise.
7625 * doc/invoke.texi (-fmessage-length): Document this option's
7626 effect on the #warning and #error preprocessor directives and
7627 the deprecated attribute.
7629 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
7631 * tree.c (decl_value_expr_lookup): Revert latest change.
7632 (decl_value_expr_insert): Likewise.
7634 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
7636 * gimplify.c (nonlocal_vlas): Delete.
7637 (nonlocal_vla_vars): Likewise.
7638 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
7640 (gimplify_body): Do not create and destroy nonlocal_vlas.
7641 * tree-nested.c: Include diagnostic.h.
7642 (use_pointer_in_frame): Tweak.
7643 (lookup_field_for_decl): Add assertion and declare the transformation.
7644 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
7645 internal error when the reference is in a wrong context. Do not
7646 create a debug decl by default.
7647 (note_nonlocal_block_vlas): Delete.
7648 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
7649 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
7650 create a debug decl by default.
7651 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
7652 call is in a wrong context.
7653 (fixup_vla_decls): New function.
7654 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
7655 debug variables were created.
7656 * tree.c (decl_value_expr_lookup): Add checking assertion.
7657 (decl_value_expr_insert): Likewise.
7659 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
7662 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
7663 * tree-scalar-evolution.c (interpret_expr): Likewise.
7664 (expression_expensive_p): Likewise.
7665 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
7666 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
7667 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
7668 (ssa_defined_by_minus_one_stmt_p): New.
7670 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
7673 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
7674 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
7675 * dojump.c (do_jump): Likewise.
7676 * expr.c (expand_expr_real_2): Check operand type's sign.
7677 * fold-const.c (const_unop): Handle ABSU_EXPR.
7678 (fold_abs_const): Likewise.
7679 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
7680 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
7681 (strip_sign_op_1): Likesise.
7682 * match.pd: Add new pattern to generate ABSU_EXPR.
7683 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
7684 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
7685 * tree-eh.c (operation_could_trap_helper_p): Likewise.
7686 * tree-inline.c (estimate_operator_cost): Likewise.
7687 * tree-pretty-print.c (dump_generic_node): Likewise.
7688 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
7689 * tree.def (ABSU_EXPR): New.
7691 2018-06-16 Jakub Jelinek <jakub@redhat.com>
7694 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
7695 documented as preserved for backward compatibility only.
7696 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
7698 PR rtl-optimization/86108
7699 * bb-reorder.c (create_forwarder_block): Renamed to ...
7700 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
7701 jump from new landing pad to the second part.
7702 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
7705 2018-06-15 Jakub Jelinek <jakub@redhat.com>
7708 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
7709 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
7710 Only call store_expr for halves if the mode is the same.
7713 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
7714 Fix up comment formatting.
7716 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
7718 * typed-splay-tree.h (typed_splay_tree::remove): New function.
7719 (typed_splay_tree::closure,
7720 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
7721 (typed_splay_tree::typed_splay_tree,
7722 typed_splay_tree::operator =): Declared private.
7723 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
7724 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
7725 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
7726 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
7727 typed_splay_tree::splay_tree_splay,
7728 typed_splay_tree::splay_tree_foreach_helper,
7729 typed_splay_tree::splay_tree_insert,
7730 typed_splay_tree::splay_tree_remove,
7731 typed_splay_tree::splay_tree_lookup,
7732 typed_splay_tree::splay_tree_predecessor,
7733 typed_splay_tree::splay_tree_successor,
7734 typed_splay_tree::splay_tree_min,
7735 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
7736 (typed_splay_tree::root, typed_splay_tree::comp,
7737 typed_splay_tree::delete_key,
7738 typed_splay_tree::delete_value): New data members.
7739 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
7740 typed_splay_tree::remove.
7742 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
7744 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
7745 -mginv and -mno-ginv to the assembler.
7746 * config/mips/mips.opt (-mcrc): New option.
7748 * doc/invoke.text (-mcrc): Document.
7751 2018-06-15 Nick Clifton <nickc@redhat.com>
7754 * tree.c (escaped_string): New class. Converts an unescaped
7755 string into its escaped equivalent.
7756 (warn_deprecated_use): Use the new class to convert the
7757 deprecation message, if present.
7758 (test_escaped_strings): New self test.
7759 (test_c_tests): Add test_escaped_strings.
7760 * doc/extend.texi (deprecated): Add a note that the
7761 deprecation message is affected by the -fmessage-length
7762 option, and that control characters will be escaped.
7763 (#pragma GCC error): Document this pragma.
7764 (#pragma GCC warning): Likewise.
7765 * doc/invoke.texi (-fmessage-length): Document this option's
7766 effect on the #warning and #error preprocessor directives and
7767 the deprecated attribute.
7769 2018-06-15 Richard Biener <rguenther@suse.de>
7771 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
7772 here, also noting vector size used.
7773 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
7774 size used in MSG_OPTIMIZED_LOCATIONS dump.
7775 (pass_slp_vectorize::execute): Adjust.
7777 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
7780 * config/arc/arc.c (arc_return_address_register): Fix
7783 2018-06-15 Richard Biener <rguenther@suse.de>
7786 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
7787 leave useless conversion stripping to force_gimple_operand_gsi.
7788 (gimplify_build2): Likewise.
7789 (gimplify_build1): Likewise.
7791 2018-06-15 Richard Biener <rguenther@suse.de>
7794 * tree-cfg.c (move_stmt_op): unshare invariant addresses
7795 before adjusting their block.
7797 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
7799 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
7800 multilibs for *-*-rtems*.
7801 * config/riscv/t-rtems: New file.
7803 2018-06-14 Jakub Jelinek <jakub@redhat.com>
7806 * match.pd ((A +- CST1) +- CST2): Punt if last resort
7807 unsigned_type_for returns NULL.
7810 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
7811 subregs of multi-word pseudos unless the float mode has word size.
7813 2018-06-14 Richard Biener <rguenther@suse.de>
7816 * tree-vect-generic.c (build_word_mode_vector_type): Remove
7817 duplicate and harmful type_hash_canon.
7818 * tree.c (type_hash_canon): Assert we didn't find ourselves.
7820 2018-06-14 Richard Biener <rguenther@suse.de>
7823 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
7826 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
7828 * config/rtems.h (STDINT_LONG32): Define.
7830 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
7831 Prachi Godbole <prachi.godbole@imgtec.com>
7833 * config/mips/mips-cpus.def: Define P6600.
7834 * config/mips/mips-tables.opt: Regenerate.
7835 * config/mips/mips.c (mips_ucbranch_type): New enum.
7836 (mips_rtx_cost_data): Add support for P6600.
7837 (mips_issue_rate): Likewise.
7838 (mips_multipass_dfa_lookahead): Likewise.
7839 (mips_avoid_hazard): Likewise.
7840 (mips_reorg_process_insns): Likewise.
7841 (mips_classify_branch_p6600): New function.
7842 * config/mips/mips.h (TUNE_P6600): New define.
7843 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
7844 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
7845 * config/mips/mips.md: Include p6600.md.
7846 (processor): Add p6600.
7847 * config/mips/p6600.md: New file.
7848 * doc/invoke.texi: Add p6600 to supported architectures.
7850 2018-06-13 Martin Sebor <msebor@redhat.com>
7852 PR tree-optimization/86114
7853 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
7855 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
7857 2018-06-13 Richard Biener <rguenther@suse.de>
7859 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
7860 Properly set vector type of the intermediate stmt.
7861 * tree-vect-stmts.c (vectorizable_operation): The destination
7862 var always has vectype_out type.
7864 2018-06-13 Jeff Law <law@redhat.com>
7866 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
7867 integer 0 for argument to print_rtl_with_bb.
7868 (rl78_reorg): Likewise.
7870 2018-06-13 David Malcolm <dmalcolm@redhat.com>
7872 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
7873 from rtx to rtx_insn *.
7874 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
7876 (add_sched_insns_for_speculation): Likewise for local "target",
7877 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
7878 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
7879 from rtx_insn ** to rtx_code_label **.
7880 (reorg_emit_nops): Likewise.
7881 (c6x_reorg): Likewise for local "call_labels".
7882 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
7884 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
7885 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
7886 the loops over LABEL_REFS.
7887 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
7889 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
7890 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
7891 (split_branches): Strengthen local "olabel" from rtx to
7892 rtx_insn *, adding a safe_as_a cast.
7893 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
7895 (add_insn_after): Likewise for first two params.
7896 (add_insn_before): Likewise.
7897 (remove_insn): Likewise for param.
7898 (emit_pattern_before_noloc): Likewise for second and third params.
7899 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
7900 (emit_call_insn_before_noloc): Likewise.
7901 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
7903 (emit_barrier_before): Likewise.
7904 (emit_label_before): Strengthen "label" param from "rtx" to
7905 "rtx_code_label *". Strengthen "before" param from "rtx" to
7907 (emit_insn_after_1): Strengthen "after" param from "rtx" to
7909 (emit_pattern_after_noloc): Likewise.
7910 (emit_insn_after_noloc): Likewise.
7911 (emit_jump_insn_after_noloc): Likewise.
7912 (emit_call_insn_after_noloc): Likewise.
7913 (emit_debug_insn_after_noloc): Likewise.
7914 (emit_barrier_after): Likewise.
7915 (emit_label_after): Likewise for both params.
7916 (emit_pattern_after_setloc): Likewise for "after" param. Convert
7917 "loc" param from "int" to "location_t".
7918 (emit_insn_after_setloc): Likewise.
7919 (emit_jump_insn_after_setloc): Likewise.
7920 (emit_call_insn_after_setloc): Likewise.
7921 (emit_debug_insn_after_setloc): Likewise.
7922 (emit_pattern_before_setloc): Likewise for "before" param. Convert
7923 "loc" param from "int" to "location_t".
7924 (emit_pattern_before): Convert NULL_RTX to NULL.
7925 (emit_insn_before_setloc): Convert "loc" param from "int" to
7927 (emit_jump_insn_before_setloc): Likewise.
7928 (emit_call_insn_before_setloc): Likewise.
7929 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
7930 rtx_insn *. Convert "loc" param from "int" to "location_t".
7931 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
7932 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
7933 Convert 3rd param from "int" to "location_t".
7934 (emit_barrier_before, emit_barrier_after, next_real_insn):
7935 Strengthen param from rtx to rtx_insn *.
7936 (emit_label_before): Strengthen 1st param from "rtx" to
7937 "rtx_code_label *". Strengthen 2nd param from "rtx" to
7939 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
7940 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
7941 Strengthen 2nd param from "rtx" to "rtx_insn *".
7942 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
7943 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
7944 Likewise. Convert 3rd param from "int" to "location_t".
7945 (emit_label_after): Strengthen 1st param from "rtx" to
7947 (next_real_insn, remove_insn): Strengthen param from "rtx" to
7949 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
7950 from "rtx" to "rtx_insn *".
7952 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
7954 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
7955 bodies streamed in with -Q.
7956 * dumpfile.c (dump_files): Add lto-stream-out dump file.
7957 * dumpfile.h (tree_dump_index): Add lto_stream_out.
7958 * gimple-streamer-out.c: Include gimple-pretty-print.h
7959 (output_bb): Dump stmts streamed.
7960 * lto-section-out.c: Include print-tree.h
7961 (lto_begin_section): Dump sections created.
7962 (lto_output_decl_index): Dump decl encoded.
7963 * lto-streamer-out.c: Include print-tree.h
7964 (create_output_block): Dump output block created.
7965 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
7966 (output_function): Dump function output.
7967 (output_constructor): Dump constructor streamed.
7968 (write_global_stream): Output indexes encoded.
7969 (produce_asm_for_decls): Dump streams encoded.
7970 * lto-streamer.c (streamer_dump_file): New global var.
7971 * lto-streamer.h (streamer_dump_file): Declare.
7972 * passes.c (ipa_write_summaries): Initialize streamer dump.
7973 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
7976 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
7979 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
7980 offsets for register save directives. Emit a second batch of save
7981 directives, if need be, when the function accesses prior frames.
7983 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7985 * config/arc/fpu.md (fmasf4): Force operand to register.
7986 (fnmasf4): Likewise.
7988 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7990 * config/arc/arc-protos.h (arc_pad_return): Remove.
7991 * config/arc/arc.c (machine_function): Remove force_short_suffix
7993 (arc_print_operand): Adjust printing of '&'.
7994 (arc_verify_short): Remove conditional printing of short suffix.
7995 (arc_final_prescan_insn): Remove reference to size_reason.
7996 (pad_return): New function.
7997 (arc_reorg): Call pad_return.
7998 (arc_pad_return): Remove.
7999 (arc_init_machine_status): Remove reference to force_short_suffix.
8000 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
8001 (attr length): When attribute iscompact is true force to 2
8002 regardless; in the case of maybe check if we want to force the
8003 instruction to have 4 bytes length.
8004 (nopv): Change it to generate 4 byte long nop as well.
8005 (blockage): New pattern.
8006 (simple_return): Remove call to arc_pad_return.
8007 (p_return_i): Likewise.
8009 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8011 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
8013 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8015 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
8018 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8020 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
8021 for ARC700 and ARCv2.
8023 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
8026 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
8027 operands[2] instead of operands[1].
8030 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
8032 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
8033 case, check whether the outer register overlaps an unallocatable
8034 register, not just whether it fits the required class.
8036 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
8038 * poly-int.h (can_div_trunc_p): Add new overload in which all values
8040 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
8041 (memrefs_conflict_p): Likewise.
8042 (init_alias_analysis): Likewise.
8043 * cfgexpand.c (expand_debug_expr): Likewise.
8044 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
8045 * cse.c (fold_rtx): Likewise.
8046 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
8047 * expr.c (emit_block_move_hints): Likewise.
8048 (clear_storage_hints, push_block, emit_push_insn): Likewise.
8049 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
8050 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
8051 (emit_group_store): Likewise.
8052 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
8053 to read the PRE/POST_MODIFY increment.
8054 * calls.c (store_one_arg): Use strip_offset.
8055 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
8057 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
8059 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
8060 (simplify_binary_operation_1): Extend CONST_INT handling to
8062 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
8063 than a HOST_WIDE_INT.
8064 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
8066 (adjust_mems, add_stores): Update accodingly.
8067 (vt_canonicalize_addr): Track polynomial offsets.
8068 (emit_note_insn_var_location): Likewise.
8069 (vt_add_function_parameter): Likewise.
8070 (vt_initialize): Likewise.
8072 2018-06-12 Jeff Law <law@redhat.com>
8074 * config.gcc (alpha*-*-freebsd*): Remove.
8075 * config/alpha/freebsd.h: Remove.
8077 2018-06-12 David Malcolm <dmalcolm@redhat.com>
8080 * spellcheck-tree.c (levenshtein_distance): Rename to...
8081 (get_edit_distance): ...this, and update for underlying renaming.
8082 * spellcheck-tree.h (levenshtein_distance): Rename to...
8083 (get_edit_distance): ...this.
8084 * spellcheck.c (levenshtein_distance): Rename to...
8085 (get_edit_distance): ...this. Convert from Levenshtein distance
8086 to Damerau-Levenshtein distance by supporting transpositions of
8087 adjacent characters. Rename "v1" to "v_next" and "v0" to
8089 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
8090 (selftest::test_edit_distance_unit_test_oneway): ...this, and
8091 update for underlying renaming.
8092 (selftest::levenshtein_distance_unit_test): Rename to...
8093 (selftest::test_get_edit_distance_unit): ...this, and update for
8094 underlying renaming.
8095 (selftest::test_find_closest_string): Add example from PR 69968
8096 where transposition helps
8097 (selftest::test_metric_conditions): Update for renaming.
8098 (selftest::test_metric_conditions): Likewise.
8099 (selftest::spellcheck_c_tests): Likewise.
8100 * spellcheck.h (levenshtein_distance): Rename both overloads to...
8101 (get_edit_distance): ...this.
8102 (best_match::consider): Update for renaming.
8104 2018-06-12 Martin Sebor <msebor@redhat.com>
8106 PR tree-optimization/85259
8107 * builtins.c (compute_objsize): Handle constant offsets.
8108 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
8109 true iff a warning has been issued.
8110 * gimple.h (gimple_nonartificial_location): New function.
8111 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
8112 gimple_nonartificial_location and handle -Wno-system-headers.
8113 (handle_builtin_stxncpy): Same.
8115 2018-06-12 Martin Sebor <msebor@redhat.com>
8118 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
8120 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
8122 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
8123 BUILTIN_VEC_XST entries for pointer to double and long long.
8125 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
8128 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
8130 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
8133 2018-06-12 Martin Liska <mliska@suse.cz>
8135 * doc/options.texi: Document IntegerRange.
8137 2018-06-12 Martin Liska <mliska@suse.cz>
8139 * config/i386/i386.opt: Make MPX-related options as Deprecated.
8140 * opt-functions.awk: Handle Deprecated flag.
8141 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
8143 (read_cmdline_option): Report warning for a deprecated option.
8144 * opts.h (struct cl_option): Add new field cl_deprecated.
8145 (CL_ERR_DEPRECATED): New.
8147 2018-06-12 Martin Liska <mliska@suse.cz>
8149 * doc/options.texi: Document Deprecated option flag.
8151 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8153 * config/arc/arc-arch.h (arc_extras): New enum.
8154 (arc_cpu_t):Add field extra.
8155 (arc_cpu_types): Consider the extras.
8156 * config/arc/arc-cpus.def: Add extras info.
8157 * config/arc/arc-opts.h (processor_type): Consider extra field.
8158 * config/arc/arc.c (arc_override_options): Handle extra field.
8160 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8162 * config/arc/arc-arch.h: Update ARC_OPTX macro.
8163 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
8165 * config/arc/arc.c (arc_init): Update pic warning.
8166 (irq_range): Update irq range parsing warnings.
8167 (arc_override_options): Update various warning messages.
8168 (arc_handle_aux_attribute): Likewise.
8170 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
8172 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
8174 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8176 * doc/sourcebuild.texi: Document usage of line number 0 in verify
8177 compiler messages directives.
8179 2018-06-12 Matthew Fortune <mfortune@gmail.com>
8181 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
8182 * config/mips/mips-tables.opt: Regenerate.
8183 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
8185 * doc/invoke.texi: Document -march=i6500.
8187 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
8189 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
8190 (i6400_gpmul): Add cpu_unit.
8191 (i6400_gpdiv): Likewise.
8192 (i6400_msa_add_d): Update reservations.
8193 (i6400_msa_int_add) Likewise.
8194 (i6400_msa_short_logic3) Likewise.
8195 (i6400_msa_short_logic2) Likewise.
8196 (i6400_msa_short_logic) Likewise.
8197 (i6400_msa_move) Likewise.
8198 (i6400_msa_cmp) Likewise.
8199 (i6400_msa_short_float2) Likewise.
8200 (i6400_msa_div_d) Likewise.
8201 (i6400_msa_long_logic1) Likewise.
8202 (i6400_msa_long_logic2) Likewise.
8203 (i6400_msa_mult) Likewise.
8204 (i6400_msa_long_float2) Likewise.
8205 (i6400_msa_long_float4) Likewise.
8206 (i6400_msa_long_float5) Likewise.
8207 (i6400_msa_long_float8) Likewise.
8208 (i6400_fpu_fadd): Include frint type.
8209 (i6400_fpu_store): New define_insn_reservation.
8210 (i6400_fpu_load): Likewise.
8211 (i6400_fpu_move): Likewise.
8212 (i6400_fpu_fcmp): Likewise.
8213 (i6400_fpu_fmadd): Likewise.
8214 (i6400_int_mult): Include imul3nc type and update reservation.
8215 (i6400_int_div): Include idiv3 type and update reservation.
8216 (i6400_int_load): Update to check type not move_type.
8217 (i6400_int_store): Likewise.
8218 (i6400_int_prefetch): Set zero latency.
8220 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
8222 * gcc.c: Document new %@{...} sequence.
8223 (LINK_COMMAND_SPEC): Use it for the -L switches.
8224 (cpp_unique_options): Use it for the -I switches.
8225 (at_file_argbuf): New global variable.
8226 (in_at_file): Likewise.
8227 (alloc_args): Create at_file_argbuf.
8228 (clear_args): Truncate at_file_argbuf.
8229 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
8230 (open_at_file): New function.
8231 (close_at_file): Likewise.
8232 (create_at_file): Delete.
8233 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
8236 (validate_switches_from_spec): Deal with %@{...} sequence.
8237 (validate_switches): Likewise.
8238 (driver::finalize): Call clear_args.
8240 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
8242 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
8244 2018-06-11 Martin Sebor <msebor@redhat.com>
8246 * doc/invoke.texi (-Wall): List -Wc++17-compat.
8247 (Wno-class-memaccess): Add @opindex.
8248 (Wno-templates, Wno-multiple-inheritance): Same.
8249 (Wno-virtual-inheritance, Wno-namespaces): Same.
8250 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
8251 (Wno-format-overflow, Wno-format-truncation): Same.
8252 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
8253 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
8254 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
8255 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
8256 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
8257 (Wno-misspelled-isr): Same.
8259 2018-06-11 Martin Sebor <msebor@redhat.com>
8261 * PR tree-optimization/86083
8262 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
8264 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
8266 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
8268 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
8271 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
8272 on the correct operand.
8273 (*movdi_internal64): Ditto.
8275 2018-06-11 Martin Liska <mliska@suse.cz>
8277 PR tree-optimization/86089
8278 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
8280 2018-06-11 Julia Koval <julia.koval@intel.com>
8282 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
8283 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
8284 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
8286 2018-06-11 Olivier Hainque <hainque@adacore.com>
8288 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
8289 for Ada with strict dwarf2.
8291 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
8294 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
8297 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
8299 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
8301 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
8303 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
8306 2018-06-08 Martin Liska <mliska@suse.cz>
8308 * tree-cfg.h (debug_function): Fix argument type to match
8311 2018-06-08 Martin Liska <mliska@suse.cz>
8313 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
8314 Remove usage of MPX-related (and removed) fields.
8315 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
8317 2018-06-08 David Malcolm <dmalcolm@redhat.com>
8319 * cfg.c (debug): Use TDF_NONE rather than 0.
8320 * cfghooks.c (debug): Likewise.
8321 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
8322 (struct dump_option_value_info): Convert to...
8323 (struct kv_pair): ...this template type.
8324 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
8326 (optinfo_verbosity_options): Likewise.
8327 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
8329 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
8330 than int for "optgroup_flags" param.
8331 (dump_generic_expr_loc): Use dump_flags_t rather than int for
8333 (dump_dec): Likewise.
8334 (dump_finish): Use TDF_NONE rather than 0.
8335 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
8336 rather than int for "optgroup_flags" param. Use TDF_NONE rather
8337 than 0. Update for change to option_ptr.
8338 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
8339 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
8340 0. Update for changes to optinfo_verbosity_options and
8342 (opt_info_switch_p): Convert optgroup_flags from int to
8344 (dump_basic_block): Use dump_flags_t rather than int
8345 for "dump_kind" param.
8346 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
8347 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
8348 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
8349 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
8350 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
8351 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
8352 TDF_NONE): Convert from macros to...
8353 (enum dump_flag): ...this new enum.
8354 (dump_flags_t): Update to use enum.
8355 (operator|, operator&, operator~, operator|=, operator&=):
8356 Implement for dump_flags_t.
8357 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
8358 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
8359 Convert from macros to...
8360 (enum optgroup_flag): ...this new enum.
8361 (optgroup_flags_t): New typedef.
8362 (operator|, operator|=): Implement for optgroup_flags_t.
8363 (struct dump_file_info): Convert field "alt_flags" to
8364 dump_flags_t. Convert field "optgroup_flags" to
8366 (dump_basic_block): Use dump_flags_t rather than int for param.
8367 (dump_generic_expr_loc): Likewise.
8368 (dump_dec): Likewise.
8369 (dump_register): Convert param "optgroup_flags" to
8371 (opt_info_enable_passes): Likewise.
8372 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
8374 * gimple-pretty-print.c (debug): Likewise.
8375 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
8376 (merged_store_group::apply_stores): Likewise.
8377 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
8378 * gimple.c (verify_gimple_pp): Likewise.
8379 * graphite-poly.c (print_pbb_body): Likewise.
8380 * passes.c (pass_manager::register_one_dump_file): Convert
8381 local "optgroup_flags" to optgroup_flags_t.
8382 * print-tree.c (print_node): Use TDF_NONE rather than 0.
8384 (debug_body): Likewise.
8385 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
8386 to optgroup_flags_t.
8387 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
8389 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
8390 (convert_mult_to_fma): Likewise.
8391 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
8392 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
8393 * tree-vect-data-refs.c (dump_lower_bound): Convert param
8394 "dump_kind" to dump_flags_t.
8396 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
8398 * config/rs6000/rs6000.c (min, max): Delete.
8400 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
8402 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
8403 -mabi=spe and -mabi=no-spe.
8405 2018-06-08 Martin Liska <mliska@suse.cz>
8407 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
8408 where we expect an existing summary.
8410 2018-06-08 Martin Liska <mliska@suse.cz>
8412 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
8413 * ipa-inline.h (estimate_edge_growth): Likewise.
8415 2018-06-08 Martin Liska <mliska@suse.cz>
8417 * cgraph.c (function_version_hasher::hash): Use
8418 cgraph_node::get_uid ().
8419 (function_version_hasher::equal):
8420 * cgraph.h (cgraph_node::get_uid): New method.
8421 * ipa-inline.c (update_caller_keys): Use
8422 cgraph_node::get_uid ().
8423 (update_callee_keys): Likewise.
8424 * ipa-utils.c (searchc): Likewise.
8425 (ipa_reduced_postorder): Likewise.
8426 * lto-cgraph.c (input_node): Likewise.
8427 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
8428 * symbol-summary.h (symtab_insertion): Likewise.
8429 (symtab_removal): Likewise.
8430 (symtab_duplication): Likewise.
8431 * tree-pretty-print.c (dump_function_header): Likewise.
8432 * tree-sra.c (convert_callers_for_node): Likewise.
8434 2018-06-08 Martin Liska <mliska@suse.cz>
8436 * cgraph.c (symbol_table::create_edge): Always assign a new
8438 (symbol_table::free_edge): Do not recycle numbers.
8439 * cgraph.h (cgraph_edge::get): New method.
8440 * symbol-summary.h (symtab_removal): Use it.
8441 (symtab_duplication): Likewise.
8442 (call_summary::hashable_uid): Remove.
8444 2018-06-08 Martin Liska <mliska@suse.cz>
8446 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
8447 (initialize_growth_caches): Remove.
8448 (free_growth_caches): Likewise.
8449 (do_estimate_edge_time): Use edge_growth_cache.
8450 (do_estimate_edge_size): Likewise.
8451 (do_estimate_edge_hints): Likewise.
8452 * ipa-inline.c (reset_edge_caches): Likewise.
8453 (recursive_inlining): Likewise.
8454 (inline_small_functions): Likewise.
8455 * ipa-inline.h (initialize_growth_caches): Remove.
8456 (estimate_edge_size): Likewise.
8457 (estimate_edge_time): Likewise.
8458 (estimate_edge_hints): Likewise.
8459 (reset_edge_growth_cache): Likewise.
8460 * symbol-summary.h (call_summary::remove): New method.
8462 2018-06-08 Martin Liska <mliska@suse.cz>
8464 * ipa-cp.c (class edge_clone_summary): New summary.
8465 (grow_edge_clone_vectors): Remove.
8466 (ipcp_edge_duplication_hook): Remove.
8467 (class edge_clone_summary_t): New call_summary class.
8468 (ipcp_edge_removal_hook): Remove.
8469 (edge_clone_summary_t::duplicate): New function.
8470 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
8471 (create_specialized_node): Likewise.
8472 (ipcp_driver): Initialize edge_clone_summaries and do not
8475 2018-06-08 Martin Liska <mliska@suse.cz>
8477 * symbol-summary.h (get): New function.
8478 (call_summary::m_initialize_when_cloning): New class member.
8480 2018-06-08 Martin Liska <mliska@suse.cz>
8482 * cgraph.c (cgraph_node::remove): Do not recycle uid.
8483 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
8484 (symbol_table::allocate_cgraph_symbol): Do not set uid.
8485 * passes.c (uid_hash_t): Record removed_nodes by their uids.
8486 (remove_cgraph_node_from_order): Use the removed_nodes set.
8487 (do_per_function_toporder): Likwise.
8488 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
8489 instead of summary_uid.
8490 (symtab_removal): Likewise.
8491 (symtab_duplication): Likewise.
8493 2018-06-08 Martin Liska <mliska@suse.cz>
8495 * ipa-cp.c (ipcp_store_bits_results): Use
8496 ipcp_transformation_sum.
8497 (ipcp_store_vr_results): Likewise.
8498 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
8500 (ipcp_transformation_initialize): ... this.
8501 (ipa_set_node_agg_value_chain):
8502 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
8503 (write_ipcp_transformation_info): Likewise.
8504 (read_ipcp_transformation_info): Likewise.
8505 (ipcp_update_bits): Likewise.
8506 (ipcp_update_vr): Likewise.
8507 (ipcp_transform_function): Likewise.
8508 * ipa-prop.h: Rename ipcp_transformation_summary to
8509 ipcp_transformation.
8510 (class ipcp_transformation_t): New function summary.
8511 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
8512 (ipa_get_agg_replacements_for_node): Likewise.
8514 2018-06-08 Martin Liska <mliska@suse.cz>
8516 * ipa-pure-const.c (struct funct_state_d): Do it class instead
8518 (class funct_state_summary_t): New function_summary class.
8519 (has_function_state): Remove.
8520 (get_function_state): Likewise.
8521 (set_function_state): Likewise.
8522 (add_new_function): Likewise.
8523 (funct_state_summary_t::insert): New function.
8524 (duplicate_node_data): Remove.
8525 (remove_node_data): Remove.
8526 (funct_state_summary_t::duplicate): New function.
8527 (register_hooks): Create new funct_state_summaries.
8528 (pure_const_generate_summary): Use it.
8529 (pure_const_write_summary): Likewise.
8530 (pure_const_read_summary): Likewise.
8531 (propagate_pure_const): Likewise.
8532 (propagate_nothrow): Likewise.
8533 (dump_malloc_lattice): Likewise.
8534 (propagate_malloc): Likewise.
8535 (execute): Do not register hooks, just remove summary
8537 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
8540 2018-06-08 Martin Liska <mliska@suse.cz>
8542 * ipa-reference.c (remove_node_data): Remove.
8543 (duplicate_node_data): Likewise.
8544 (class ipa_ref_var_info_summary_t): New class.
8545 (class ipa_ref_opt_summary_t): Likewise.
8546 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
8547 (get_reference_optimization_summary): Use
8548 ipa_ref_opt_sum_summaries.
8549 (set_reference_vars_info): Remove.
8550 (set_reference_optimization_summary): Likewise.
8551 (ipa_init): Create summaries.
8552 (init_function_info): Use function summary.
8553 (ipa_ref_opt_summary_t::duplicate): New function.
8554 (ipa_ref_opt_summary_t::remove): New function.
8555 (get_read_write_all_from_node): Fix GNU coding style.
8556 (propagate): Use function summary.
8557 (write_node_summary_p): Fix GNU coding style.
8558 (stream_out_bitmap): Likewise.
8559 (ipa_reference_read_optimization_summary): Use function summary.
8560 (ipa_reference_c_finalize): Do not release hooks.
8562 2018-06-08 Martin Liska <mliska@suse.cz>
8564 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
8565 (analyze_function_body): Extract multiple calls of get_create.
8566 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
8567 * ipa-inline.c (recursive_inlining): Use ::get method.
8568 * ipa-inline.h (estimate_edge_growth): Likewise.
8570 2018-06-08 Martin Liska <mliska@suse.cz>
8572 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
8574 (hsa_function_summary::hsa_function_summary): Use the new enum
8576 (hsa_gpu_implementation_p): Use hsa_summaries::get.
8577 * hsa-gen.c (hsa_get_host_function): Likewise.
8578 (get_brig_function_name): Likewise.
8579 * ipa-hsa.c (process_hsa_functions): Likewise.
8580 (ipa_hsa_write_summary): Likewise.
8581 * symbol-summary.h (symtab_duplication): Use ::get function/
8582 (get): New function.
8584 2018-06-08 Martin Liska <mliska@suse.cz>
8586 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
8588 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
8589 (hsa_register_kernel): Likewise.
8590 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
8591 * hsa-gen.c (hsa_get_host_function): Likewise.
8592 (get_brig_function_name): Likewise.
8593 (generate_hsa): Likewise.
8594 (pass_gen_hsail::execute): Likewise.
8595 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
8596 (devirtualization_time_bonus): Likewise.
8597 (ipcp_propagate_stage): Likewise.
8598 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
8599 (edge_set_predicate): Likewise.
8600 (evaluate_conditions_for_known_args): Likewise.
8601 (evaluate_properties_for_edge): Likewise.
8602 (ipa_fn_summary::reset): Likewise.
8603 (ipa_fn_summary_t::duplicate): Likewise.
8604 (dump_ipa_call_summary): Likewise.
8605 (ipa_dump_fn_summary): Likewise.
8606 (analyze_function_body): Likewise.
8607 (compute_fn_summary): Likewise.
8608 (estimate_edge_devirt_benefit): Likewise.
8609 (estimate_edge_size_and_time): Likewise.
8610 (estimate_calls_size_and_time): Likewise.
8611 (estimate_node_size_and_time): Likewise.
8612 (inline_update_callee_summaries): Likewise.
8613 (remap_edge_change_prob): Likewise.
8614 (remap_edge_summaries): Likewise.
8615 (ipa_merge_fn_summary_after_inlining): Likewise.
8616 (ipa_update_overall_fn_summary): Likewise.
8617 (read_ipa_call_summary): Likewise.
8618 (inline_read_section): Likewise.
8619 (write_ipa_call_summary): Likewise.
8620 (ipa_fn_summary_write): Likewise.
8621 (ipa_free_fn_summary): Likewise.
8622 * ipa-hsa.c (process_hsa_functions): Likewise.
8623 (ipa_hsa_write_summary): Likewise.
8624 (ipa_hsa_read_section): Likewise.
8625 * ipa-icf.c (sem_function::merge): Likewise.
8626 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
8627 (do_estimate_edge_time): Likewise.
8628 (estimate_size_after_inlining): Likewise.
8629 (estimate_growth): Likewise.
8630 (growth_likely_positive): Likewise.
8631 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
8632 (inline_call): Likewise.
8633 * ipa-inline.c (caller_growth_limits): Likewise.
8634 (can_inline_edge_p): Likewise.
8635 (can_inline_edge_by_limits_p): Likewise.
8636 (compute_uninlined_call_time): Likewise.
8637 (compute_inlined_call_time): Likewise.
8638 (want_inline_small_function_p): Likewise.
8639 (edge_badness): Likewise.
8640 (update_caller_keys): Likewise.
8641 (update_callee_keys): Likewise.
8642 (recursive_inlining): Likewise.
8643 (inline_small_functions): Likewise.
8644 (inline_to_all_callers_1): Likewise.
8645 (dump_overall_stats): Likewise.
8646 (early_inline_small_functions): Likewise.
8647 (early_inliner): Likewise.
8648 * ipa-inline.h (estimate_edge_growth): Likewise.
8649 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
8650 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8651 * ipa-prop.h (IPA_NODE_REF): Likewise.
8652 (IPA_EDGE_REF): Likewise.
8653 * ipa-pure-const.c (malloc_candidate_p): Likewise.
8654 (propagate_malloc): Likewise.
8655 * ipa-split.c (execute_split_functions): Likewise.
8656 * symbol-summary.h: Rename get to get_create.
8658 (get_create): Likewise.
8659 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
8661 2018-06-08 Martin Liska <mliska@suse.cz>
8663 * symbol-summary.h (release): Move definition out of class
8665 (symtab_removal): Likewise.
8666 (symtab_duplication): Likewise.
8668 2018-06-08 Martin Liska <mliska@suse.cz>
8670 * symbol-summary.h (function_summary): Move constructor
8671 implementation out of class declaration.
8672 (release): Likewise.
8673 (symtab_insertion): Likewise.
8674 (symtab_removal): Likewise.
8675 (symtab_duplication): Likewise.
8678 2018-06-08 Martin Liska <mliska@suse.cz>
8680 * Makefile.in: Remove support for MPX (macros, related functions,
8681 fields in cgraph_node, ...).
8682 * builtin-types.def (BT_BND): Likewise.
8683 (BT_FN_BND_CONST_PTR): Likewise.
8684 (BT_FN_CONST_PTR_BND): Likewise.
8685 (BT_FN_VOID_PTR_BND): Likewise.
8686 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
8687 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
8688 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
8689 (expand_builtin_mempcpy_with_bounds): Likewise.
8690 (expand_builtin_memset_with_bounds): Likewise.
8691 (expand_builtin_memset_args): Likewise.
8692 (std_expand_builtin_va_start): Likewise.
8693 (expand_builtin): Likewise.
8694 (expand_builtin_with_bounds): Likewise.
8695 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
8696 (DEF_LIB_BUILTIN_CHKP): Likewise.
8697 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
8698 (DEF_CHKP_BUILTIN): Likewise.
8699 (BUILT_IN_MEMCPY): Likewise.
8700 (BUILT_IN_MEMMOVE): Likewise.
8701 (BUILT_IN_MEMPCPY): Likewise.
8702 (BUILT_IN_MEMSET): Likewise.
8703 (BUILT_IN_STPCPY): Likewise.
8704 (BUILT_IN_STRCAT): Likewise.
8705 (BUILT_IN_STRCHR): Likewise.
8706 (BUILT_IN_STRCPY): Likewise.
8707 (BUILT_IN_STRLEN): Likewise.
8708 (BUILT_IN_MEMCPY_CHK): Likewise.
8709 (BUILT_IN_MEMMOVE_CHK): Likewise.
8710 (BUILT_IN_MEMPCPY_CHK): Likewise.
8711 (BUILT_IN_MEMSET_CHK): Likewise.
8712 (BUILT_IN_STPCPY_CHK): Likewise.
8713 (BUILT_IN_STRCAT_CHK): Likewise.
8714 (BUILT_IN_STRCPY_CHK): Likewise.
8715 * calls.c (store_bounds): Likewise.
8716 (emit_call_1): Likewise.
8717 (special_function_p): Likewise.
8718 (maybe_warn_nonstring_arg): Likewise.
8719 (initialize_argument_information): Likewise.
8720 (finalize_must_preallocate): Likewise.
8721 (compute_argument_addresses): Likewise.
8722 (expand_call): Likewise.
8723 * cfgexpand.c (expand_call_stmt): Likewise.
8724 (expand_return): Likewise.
8725 (expand_gimple_stmt_1): Likewise.
8726 (pass_expand::execute): Likewise.
8727 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
8728 (cgraph_node::remove): Likewise.
8729 (cgraph_node::dump): Likewise.
8730 (cgraph_node::verify_node): Likewise.
8731 * cgraph.h (chkp_function_instrumented_p): Likewise.
8732 (symtab_node::get_alias_target): Likewise.
8733 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
8734 (cgraph_local_p): Likewise.
8735 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
8736 (cgraph_edge::rebuild_references): Likewise.
8737 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
8738 (walk_polymorphic_call_targets): Likewise.
8739 (cgraph_node::expand_thunk): Likewise.
8740 (symbol_table::output_weakrefs): Likewise.
8741 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
8742 (ix86_handle_option): Likewise.
8743 * config/i386/constraints.md: Likewise.
8744 * config/i386/i386-builtin-types.def (BND): Likewise.
8748 * config/i386/i386-builtin.def (BDESC_END): Likewise.
8749 (BDESC_FIRST): Likewise.
8751 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
8752 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
8753 * config/i386/i386.c (enum reg_class): Likewise.
8754 (ix86_target_string): Likewise.
8755 (ix86_option_override_internal): Likewise.
8756 (ix86_conditional_register_usage): Likewise.
8757 (ix86_valid_target_attribute_inner_p): Likewise.
8758 (ix86_set_indirect_branch_type): Likewise.
8759 (ix86_set_current_function): Likewise.
8760 (ix86_function_arg_regno_p): Likewise.
8761 (init_cumulative_args): Likewise.
8762 (ix86_function_arg_advance): Likewise.
8763 (ix86_function_arg): Likewise.
8764 (ix86_pass_by_reference): Likewise.
8765 (ix86_function_value_regno_p): Likewise.
8766 (ix86_function_value_1): Likewise.
8767 (ix86_function_value_bounds): Likewise.
8768 (ix86_return_in_memory): Likewise.
8769 (ix86_setup_incoming_vararg_bounds): Likewise.
8770 (ix86_va_start): Likewise.
8771 (indirect_thunk_need_prefix): Likewise.
8772 (print_reg): Likewise.
8773 (ix86_print_operand): Likewise.
8774 (ix86_expand_call): Likewise.
8775 (ix86_output_function_return): Likewise.
8776 (reg_encoded_number): Likewise.
8777 (BDESC_VERIFYS): Likewise.
8778 (ix86_init_mpx_builtins): Likewise.
8779 (ix86_init_builtins): Likewise.
8780 (ix86_emit_cmove): Likewise.
8781 (ix86_emit_move_max): Likewise.
8782 (ix86_expand_builtin): Likewise.
8783 (ix86_builtin_mpx_function): Likewise.
8784 (ix86_get_arg_address_for_bt): Likewise.
8785 (ix86_load_bounds): Likewise.
8786 (ix86_store_bounds): Likewise.
8787 (ix86_load_returned_bounds): Likewise.
8788 (ix86_store_returned_bounds): Likewise.
8789 (ix86_class_likely_spilled_p): Likewise.
8790 (ix86_hard_regno_mode_ok): Likewise.
8791 (x86_order_regs_for_local_alloc): Likewise.
8792 (ix86_mitigate_rop): Likewise.
8793 (ix86_bnd_prefixed_insn_p): Likewise.
8794 (ix86_mpx_bound_mode): Likewise.
8795 (ix86_make_bounds_constant): Likewise.
8796 (ix86_initialize_bounds): Likewise.
8797 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
8798 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
8799 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
8800 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
8801 (TARGET_CHKP_BOUND_MODE): Likewise.
8802 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
8803 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
8804 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
8805 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
8806 * config/i386/i386.h (TARGET_MPX): Likewise.
8807 (TARGET_MPX_P): Likewise.
8808 (VALID_BND_REG_MODE): Likewise.
8809 (FIRST_BND_REG): Likewise.
8810 (LAST_BND_REG): Likewise.
8811 (enum reg_class): Likewise.
8812 (BND_REG_P): Likewise.
8813 (BND_REGNO_P): Likewise.
8814 (BNDmode): Likewise.
8815 (ADJUST_INSN_LENGTH): Likewise.
8816 * config/i386/i386.md: Likewise.
8817 * config/i386/i386.opt: Likewise.
8818 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
8819 (defined): Likewise.
8820 (LINK_MPX): Likewise.
8821 (MPX_SPEC): Likewise.
8822 (LIBMPX_SPEC): Likewise.
8823 (LIBMPXWRAPPERS_SPEC): Likewise.
8824 (CHKP_SPEC): Likewise.
8825 * config/i386/predicates.md: Likewise.
8826 * dbxout.c (dbxout_type): Likewise.
8827 * doc/extend.texi: Likewise.
8828 * doc/invoke.texi: Likewise.
8829 * doc/md.texi: Likewise.
8830 * doc/tm.texi: Likewise.
8831 * doc/tm.texi.in: Likewise.
8832 * dwarf2out.c (is_base_type): Likewise.
8833 (gen_formal_types_die): Likewise.
8834 (gen_subprogram_die): Likewise.
8835 (gen_type_die_with_usage): Likewise.
8836 (gen_decl_die): Likewise.
8837 (dwarf2out_late_global_decl): Likewise.
8838 * expr.c (expand_assignment): Likewise.
8839 (emit_storent_insn): Likewise.
8840 (store_expr_with_bounds): Likewise.
8841 (store_expr): Likewise.
8842 (expand_expr_real_1): Likewise.
8843 * expr.h (store_expr_with_bounds): Likewise.
8844 * function.c (use_register_for_decl): Likewise.
8845 (struct bounds_parm_data): Likewise.
8846 (assign_parms_augmented_arg_list): Likewise.
8847 (assign_parm_find_entry_rtl): Likewise.
8848 (assign_parm_is_stack_parm): Likewise.
8849 (assign_parm_load_bounds): Likewise.
8850 (assign_bounds): Likewise.
8851 (assign_parms): Likewise.
8852 (expand_function_start): Likewise.
8853 * gcc.c (CHKP_SPEC): Likewise.
8854 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
8855 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
8856 (wrestrict_dom_walker::check_call): Likewise.
8857 * gimple.c (gimple_build_call_from_tree): Likewise.
8858 * gimple.h (enum gf_mask): Likewise.
8859 (gimple_call_with_bounds_p): Likewise.
8860 (gimple_call_set_with_bounds): Likewise.
8861 * gimplify.c (gimplify_init_constructor): Likewise.
8862 * ipa-cp.c (initialize_node_lattices): Likewise.
8863 (propagate_constants_across_call): Likewise.
8864 (find_more_scalar_values_for_callers_subset): Likewise.
8865 * ipa-hsa.c (process_hsa_functions): Likewise.
8866 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
8867 * ipa-icf.c (sem_function::merge): Likewise.
8868 * ipa-inline.c (early_inliner): Likewise.
8869 * ipa-pure-const.c (warn_function_noreturn): Likewise.
8870 (warn_function_cold): Likewise.
8871 (propagate_pure_const): Likewise.
8872 * ipa-ref.h (enum GTY): Likewise.
8873 * ipa-split.c (find_retbnd): Likewise.
8874 (consider_split): Likewise.
8875 (split_function): Likewise.
8876 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
8877 * ipa.c (walk_polymorphic_call_targets): Likewise.
8878 (symbol_table::remove_unreachable_nodes): Likewise.
8879 (process_references): Likewise.
8880 (cgraph_build_static_cdtor_1): Likewise.
8881 * lto-cgraph.c (lto_output_node): Likewise.
8882 (output_refs): Likewise.
8883 (compute_ltrans_boundary): Likewise.
8884 (input_overwrite_node): Likewise.
8885 (input_node): Likewise.
8886 (input_cgraph_1): Likewise.
8887 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
8888 * passes.c (pass_manager::execute_early_local_passes): Likewise.
8889 (class pass_chkp_instrumentation_passes): Likewise.
8890 (make_pass_chkp_instrumentation_passes): Likewise.
8891 * passes.def: Likewise.
8892 * rtl.h (struct GTY): Likewise.
8893 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
8894 * stor-layout.c (layout_type): Likewise.
8895 * symtab.c: Likewise.
8896 * target.def: Likewise.
8897 * targhooks.c (default_chkp_bound_type): Likewise.
8898 (default_chkp_bound_mode): Likewise.
8899 (default_builtin_chkp_function): Likewise.
8900 (default_chkp_function_value_bounds): Likewise.
8901 (default_chkp_make_bounds_constant): Likewise.
8902 (default_chkp_initialize_bounds): Likewise.
8903 * targhooks.h (default_chkp_bound_type): Likewise.
8904 (default_chkp_bound_mode): Likewise.
8905 (default_builtin_chkp_function): Likewise.
8906 (default_chkp_function_value_bounds): Likewise.
8907 (default_chkp_make_bounds_constant): Likewise.
8908 (default_chkp_initialize_bounds): Likewise.
8909 * toplev.c (compile_file): Likewise.
8910 (process_options): Likewise.
8911 * tree-core.h (DEF_BUILTIN): Likewise.
8912 (DEF_BUILTIN_CHKP): Likewise.
8913 * tree-inline.c (declare_return_variable): Likewise.
8914 (remap_gimple_stmt): Likewise.
8915 (copy_bb): Likewise.
8916 (initialize_inlined_parameters): Likewise.
8917 (expand_call_inline): Likewise.
8918 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
8919 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
8920 (make_pass_ipa_chkp_produce_thunks): Likewise.
8921 (make_pass_chkp): Likewise.
8922 (make_pass_chkp_opt): Likewise.
8923 (make_pass_chkp_instrumentation_passes): Likewise.
8924 * tree-pretty-print.c (dump_generic_node): Likewise.
8925 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
8926 * tree-ssa-dce.c (propagate_necessity): Likewise.
8927 (eliminate_unnecessary_stmts): Likewise.
8928 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
8929 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
8930 * tree-ssa-sccvn.h: Likewise.
8931 * tree-ssa-strlen.c (get_string_length): Likewise.
8932 (valid_builtin_call): Likewise.
8933 (adjust_last_stmt): Likewise.
8934 (handle_builtin_strchr): Likewise.
8935 (handle_builtin_strcpy): Likewise.
8936 (handle_builtin_stxncpy): Likewise.
8937 (handle_builtin_memcpy): Likewise.
8938 (handle_builtin_strcat): Likewise.
8939 (strlen_check_and_optimize_stmt): Likewise.
8940 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
8941 * tree-streamer-in.c: Likewise.
8942 * tree-streamer.c (record_common_node): Likewise.
8943 * tree.c (tree_code_size): Likewise.
8944 (wide_int_to_tree_1): Likewise.
8945 (type_contains_placeholder_1): Likewise.
8946 (build_common_tree_nodes): Likewise.
8947 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
8948 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
8949 (POINTER_BOUNDS_P): Likewise.
8950 (BOUNDED_TYPE_P): Likewise.
8951 (BOUNDED_P): Likewise.
8952 (CALL_WITH_BOUNDS_P): Likewise.
8953 (pointer_bounds_type_node): Likewise.
8954 * value-prof.c (gimple_ic): Likewise.
8955 * var-tracking.c (vt_add_function_parameters): Likewise.
8956 * varasm.c (make_decl_rtl): Likewise.
8957 (assemble_start_function): Likewise.
8958 (output_constant): Likewise.
8959 (maybe_assemble_visibility): Likewise.
8960 * varpool.c (ctor_for_folding): Likewise.
8961 * chkp-builtins.def: Remove.
8962 * ipa-chkp.c: Remove.
8963 * ipa-chkp.h: Remove.
8964 * rtl-chkp.c: Remove.
8965 * rtl-chkp.h: Remove.
8966 * tree-chkp-opt.c: Remove.
8967 * tree-chkp.c: Remove.
8968 * tree-chkp.h: Remove.
8970 2018-06-07 Carl Love <cel@us.ibm.com>
8972 * config/rs6000/vsx.md (vextract_fp_from_shorth,
8973 vextract_fp_from_shortl): Add BE support.
8975 2018-06-07 Paul Koning <ni1d@arrl.net>
8977 * compare-elim.c (try_merge_compare): Don't merge compare if
8978 address contains a side effect.
8979 (try_eliminate_compare): Likewise.
8981 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
8983 * config.gcc: Support "tremont".
8984 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
8985 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8987 * config/i386/i386.c (m_TREMONT): Define.
8988 (processor_target_table): Add "tremont".
8989 (PTA_TREMONT): Define.
8990 (ix86_lea_outperforms): Add TARGET_TREMONT.
8991 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
8992 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
8993 and M_INTEL_GOLDMONT_PLUS.
8994 (fold_builtin_cpu): Add "tremont".
8995 (ix86_add_stmt_cost): Add TARGET_TREMONT.
8996 (ix86_option_override_internal): Add "tremont".
8997 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
8998 (processor_type): Add PROCESSOR_TREMONT.
8999 * config/i386/x86-tune.def: Add m_TREMONT.
9000 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
9002 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9004 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
9005 symbol defined for msp430i* devices to be lower case.
9007 2018-06-07 Richard Biener <rguenther@suse.de>
9009 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
9010 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
9011 Properly wrap signed arithmetic if overflow wraps.
9013 2018-06-07 Jakub Jelinek <jakub@redhat.com>
9015 PR tree-optimization/69615
9016 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
9017 of a cast from a same precision integral SSA_NAME in a bb dominated
9018 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
9019 cast to utype if rhs2 has already a compatible type.
9021 2018-06-07 Richard Biener <rguenther@suse.de>
9023 PR tree-optimization/85935
9024 * graphite-scop-detection.c (find_params_in_bb): Analyze
9025 condition operands with respect to the correct loop. Assert
9026 the analysis doesn't fail.
9028 2018-06-04 Carl Love <cel@us.ibm.com>
9030 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
9031 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
9032 as it is slightly cheaper.
9033 (first_match_or_eos_index_<mode>):
9034 Calculate index using natural element order.
9035 (first_match_index_<mode>):
9036 Calculate index using natural element order.
9037 (first_match_or_eos_index_<mode>):
9038 Calculate index using natural order.
9039 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
9040 for BE and LE modes.
9041 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
9042 P9V_BUILTIN_VCLZLSBB_V16QI.
9043 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
9046 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
9048 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
9049 indentation and line wrap for many prototypes. Add missing
9050 @smallexample directives around block of prototypes for vec_xl and
9053 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
9055 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
9056 track if we pass or return IEEE 128-bit floating point.
9057 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
9058 C++ mangling that is compatible with GCC 8.1.
9059 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
9060 (init_cumulative_args): Note if we pass or return IEEE 128-bit
9061 floating point types.
9062 (rs6000_function_arg_advance_1): Likewise.
9063 (rs6000_mangle_type): Optionally generate mangled names that match
9064 what GCC 8.1 generated for IEEE 128-bit floating point types.
9065 (rs6000_globalize_decl_name): If we have an external function that
9066 passes or returns IEEE 128-bit types, generate a weak reference
9067 from the mangled name used in GCC 8.1 to the current mangled
9069 (rs6000_init_builtins): Make __ibm128 use the long double type if
9070 long double is IBM extended double. Make __float128 use the long
9071 double type if long double is IEEE 128-bit.
9074 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
9075 macro for __ibm128 built-in functions.
9076 (PACK_IF): Add __ibm128 pack/unpack functions.
9077 (UNPACK_IF): Likewise.
9078 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
9079 enable long double built-in functions if long double is IEEE
9080 128-bit floating point.
9081 (rs6000_invalid_builtin): Update long double built-in function
9083 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
9084 functions, adjust the built-in function to use the long double
9085 built-in function if __ibm128 and long double are the same type.
9086 * doc/extend.texi (PowerPC builtins): Update documention for
9087 __builtin_{,un}pack_longdouble. Add documentation for
9088 __builtin_{,un}pack_ibm128.
9090 2018-06-06 Jim Wilson <jimw@sifive.com>
9092 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
9093 (struct machine_function): New field interrupt_mode.
9094 (riscv_handle_type_attribute): New function. Add forward declaration.
9095 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
9096 (riscv_expand_epilogue): Check interrupt_mode field.
9097 (riscv_set_current_function): Check interrupt attribute args and
9098 set interrupt_mode field.
9099 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
9100 (riscv_sret, riscv_uret): New.
9101 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
9102 new arguments to interrupt attribute.
9104 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
9107 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
9108 Don't handle -mcpu=power8 if -mpower9-vector is also used.
9110 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
9112 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
9113 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
9114 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
9115 several redundant entries.
9117 2018-06-06 David Malcolm <dmalcolm@redhat.com>
9119 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
9120 type from "rtx" to "rtx_insn *".
9121 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
9122 for local "call_insn", removing cast.
9123 (ix86_expand_call): Likewise, introducing a "call_insn" local.
9125 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
9127 PR tree-optimization/86066
9128 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
9129 for BIT_INSERT_EXPR stores.
9131 2018-06-06 Richard Biener <rguenther@suse.de>
9133 PR tree-optimization/86062
9134 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
9135 component refs ontop
9136 of to be offsetted base.
9138 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9140 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
9141 to be static and remove check on interrupt attribute name.
9143 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
9145 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
9146 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
9148 2018-06-05 Steve Ellcey <sellcey@cavium.com>
9151 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
9153 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
9154 Remove second argument, change how error is called.
9155 (aarch64_layout_arg): Remove second argument from
9156 aarch64_err_no_fpadvsimd call.
9157 (aarch64_init_cumulative_args): Ditto.
9158 (aarch64_gimplify_va_arg_expr): Ditto.
9159 * config/aarch64/aarch64.md (mov<mode>): Ditto.
9161 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
9163 * config/i386/i386.md (simple_return_indirect_internal): New expander.
9164 (*simple_return_indirect_internal<mode>): Rename from
9165 simple_return_indirect_internal. Use W mode iterator.
9166 (rstorssp): New expander.
9167 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
9168 (clrssbsy): New expander.
9169 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
9171 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
9173 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
9175 (cmse_check_pointed_object): Likewise.
9177 2018-06-05 Martin Liska <mliska@suse.cz>
9179 PR gcov-profile/47618
9180 * doc/invoke.texi: Document how -fprofile-dir format
9183 2018-06-05 Richard Biener <rguenther@suse.de>
9185 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
9186 removal pretend DOM info isn't available so we do not update
9187 it and only remove edges, not dominated blocks. Actually free
9188 DOM info in case we removed something. Remove unreachable blocks.
9189 (mfb_keep_latches): Work with either DOM info or marked backedges.
9190 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
9191 first. Mark backedges if DOM info isn't available.
9192 (Re-)compute DOM info after cleanup_control_flow_pre.
9194 2018-06-05 Richard Biener <rguenther@suse.de>
9196 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
9197 (locus_discrim_hasher::hash): Adjust.
9198 (locus_discrim_hasher::equal): Likewise.
9199 (next_discriminator_for_locus): Work on line directly.
9200 (same_line_p): Pass in expanded locus1 as well.
9201 (assign_discriminators): Avoid redundant location expansions.
9203 2018-06-05 Richard Biener <rguenther@suse.de>
9205 PR tree-optimization/86046
9206 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
9207 if required after clearing TREE_ADDRESSABLE.
9209 2018-06-05 Richard Biener <rguenther@suse.de>
9211 PR tree-optimization/86047
9212 * tree-ssa-loop.c (for_each_index): Glob handling of all
9213 decls and constants and really handle all of them.
9215 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9218 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
9219 qualifier_void_pointer and qualifier_const_void_pointer.
9220 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
9221 (arm_init_builtins): Handle the above.
9222 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
9223 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
9224 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
9227 2018-06-05 Martin Liska <mliska@suse.cz>
9229 * auto-profile.c (read_autofdo_file): Do not use
9230 gcov_ctr_summary struct.
9231 (afdo_callsite_hot_enough_for_early_inline): Likewise.
9232 * coverage.c (struct counts_entry): Likewise.
9233 (read_counts_file): Read just single summary entry.
9234 (get_coverage_counts): Use gcov_summary struct.
9235 * coverage.h (get_coverage_counts): Likewise.
9236 * gcov-dump.c (dump_working_sets): Likewise.
9237 (tag_summary): Dump just single summary.
9238 * gcov-io.c (gcov_write_summary): Write just histogram
9240 (gcov_read_summary): Read just single summary.
9241 (compute_working_sets): Use gcov_summary struct.
9242 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
9243 of GCOV_COUNTERS_SUMMABLE.
9244 (GCOV_COUNTERS_SUMMABLE): Remove.
9245 (GCOV_FIRST_VALUE_COUNTER): Replace with
9246 GCOV_COUNTER_V_INTERVAL.
9247 (struct gcov_ctr_summary): Remove.
9248 (struct gcov_summary): Directly use fields of former
9250 (compute_working_sets): Use gcov_summary struct.
9251 * gcov.c (read_count_file): Do not use ctrs fields.
9252 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
9254 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
9256 * profile.c: Likewise.
9257 * profile.h: Likewise.
9259 2018-06-05 Martin Liska <mliska@suse.cz>
9261 PR gcov-profile/84846
9262 * gcov.c (output_lines): Print working directory only
9263 in intermediate format.
9265 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
9267 * config/s390/s390-builtin-types.def: Add void function type.
9268 * config/s390/s390-builtins.def: Use the function type for the
9271 2018-06-04 Jim Wilson <jimw@sifive.com>
9273 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
9275 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
9276 and maybe_eh_return. Change regno to unsigned int. Use new args to
9277 handle EH_RETURN_DATA_REGNO registers properly.
9278 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
9279 (riscv_expand_epilogue): Update comment. Change argument name and
9280 type. Update code to use new name and type. Pass new args to
9281 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
9283 * config/riscv/riscv.md (NORMAL_RETURN): New.
9284 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
9285 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
9286 (eh_return): Call gen_eh_return_internal and emit barrier.
9287 (eh_return_internal): Call riscv_expand_epilogue.
9289 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
9291 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
9292 bit_insertion field and declare can_be_merged_into method.
9293 (merged_store_group::can_be_merged_into): New method.
9294 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
9295 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
9296 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
9298 2018-06-04 Richard Biener <rguenther@suse.de>
9300 PR tree-optimization/85955
9301 * builtins.c (fold_builtin_sincos): Convert pointers to
9302 destination to appropriate type before dereferencing.
9304 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
9306 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
9308 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
9310 * expr.c (expand_expr_real_1): Force the operand into memory if
9311 its TYPE_MODE is BLKmode and if there is no integer mode for
9312 the number of bits being extracted.
9314 2018-06-04 Jakub Jelinek <jakub@redhat.com>
9318 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
9319 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
9321 2018-06-04 Richard Biener <rguenther@suse.de>
9323 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
9324 (cleanup_tree_cfg_noloop): ... single caller. Do
9325 start_recording_case_labels later.
9327 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
9329 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
9330 to _IMMINTRIN_H_INCLUDED.
9331 * config/i386/pconfigintrin.h: Ditto.
9332 * config/i386/waitpkgintrin.h: Ditto.
9333 * config/i386/immintrin.h: Add includes for sgxintrin.h,
9334 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
9335 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
9336 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
9337 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
9338 waitpkgintrin.h and cldemoteintrin.h.
9340 2018-06-04 Richard Biener <rguenther@suse.de>
9342 PR tree-optimization/86038
9343 * tracer.c (find_best_successor): Check probability for
9344 being initialized, bail out if not.
9346 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
9349 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
9350 of bits to ignore when comparing architectures.
9352 2018-06-04 Jakub Jelinek <jakub@redhat.com>
9354 PR tree-optimization/69615
9355 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
9356 maximum or minimum of the type, try to merge it also as if
9357 range1 is + [-, x - 1] or + [x + 1, -].
9360 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
9362 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
9364 PR tree-optimization/86034
9365 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
9366 the unsigned bitfield type in a bit insertion sequence if it does not
9367 have a larger precision than the bitfield size.
9368 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
9370 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
9372 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
9374 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
9376 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
9377 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
9378 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
9379 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
9381 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
9383 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
9384 Disable -fdelete-null-pointer-checks for ELF toolchain.
9386 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
9387 Kito Cheng <kito.cheng@gmail.com>
9389 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
9390 (nds32le-*-*, nds32be-*-*): Integrate checking process.
9391 (nds32*-*-*): Add glibc and uclibc conditions.
9392 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
9393 (TARGET_EXCEPT_UNWIND_INFO): Define.
9394 * config/nds32/elf.h: New file.
9395 * config/nds32/linux.h: New file.
9396 * config/nds32/nds32-elf.opt: New file.
9397 * config/nds32/nds32-linux.opt: New file.
9398 * config/nds32/nds32-fp-as-gp.c
9399 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
9400 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
9402 (nds32_asm_file_end): Ditto.
9403 (nds32_print_operand): Ditto.
9404 (nds32_insert_attributes): Ditto.
9405 (nds32_init_libfuncs): New function.
9406 (TARGET_HAVE_TLS): Define.
9407 (TARGET_INIT_LIBFUNCS): Define.
9408 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
9410 (TARGET_ELF): Apply different mcmodel setting.
9411 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
9412 been migrated into elf.h and linux.h files.
9413 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
9414 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
9415 (mcmodel): The content has been migrated into nds32-elf.opt and
9416 nds32-linux.opt files.
9417 * config/nds32/t-elf: New file.
9418 * config/nds32/t-linux: New file.
9420 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
9421 Shiva Chen <shiva0217@gmail.com>
9423 * config/nds32/constants.md (unspec_volatile_element): Add
9424 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
9425 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
9427 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
9428 (make_pass_nds32_fp_as_gp): Declare.
9429 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
9431 (nds32_asm_function_end_prologue): Remove unused asm output.
9432 (nds32_asm_function_begin_epilogue): Remove unused asm output.
9433 (nds32_asm_file_start): Output necessary fp_as_gp information.
9434 (nds32_option_override): Adjust register usage.
9435 (nds32_expand_prologue): Consider fp_as_gp situation.
9436 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
9437 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
9440 (simple_return): Ditto.
9441 (omit_fp_begin): Output special directive for fp_as_gp.
9442 (omit_fp_end): Output special directive for fp_as_gp.
9443 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
9444 mforbid-fp-as-gp): New options.
9446 2018-06-01 Mark Wielaard <mark@klomp.org>
9448 * dwarf2out.c (dwarf2out_finish): Remove generation of
9449 DW_AT_loclists_base.
9451 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
9453 * gimple-ssa-store-merging.c: Include gimple-fold.h.
9454 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
9455 (struct merged_store_group): Add bit_insertion field.
9456 (dump_char_array): Use standard hexadecimal format.
9457 (merged_store_group::merged_store_group): Set bit_insertion to false.
9458 (merged_store_group::apply_stores): Use optimal buffer size. Deal
9459 with BIT_INSERT_EXPR stores. Move up code updating the mask and
9460 also print the mask in the dump file.
9461 (pass_store_merging::gate): Minor tweak.
9462 (imm_store_chain_info::coalesce_immediate): Fix wrong association
9463 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
9464 stores with INTEGER_CST stores.
9465 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
9466 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
9467 and use it throughout. Generate bit insertion sequences if need be.
9468 (pass_store_merging::process_store): Remove redundant condition.
9469 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
9471 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
9473 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
9474 the 128-bit floating point types. Fix function comment.
9476 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9478 * config/aarch64/aarch64-simd.md
9479 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
9481 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
9484 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
9486 PR tree-optimization/85989
9487 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
9489 (backprop::intersect_uses): Check it when deciding whether this
9490 is a backedge reference.
9491 (backprop::process_block): Add each phi to m_visited_phis
9492 after visiting it, then clear it at the end.
9494 2018-06-01 Richard Biener <rguenther@suse.de>
9496 * tree-vectorizer.h (vect_dr_stmt): New function.
9497 (vect_get_load_cost): Adjust.
9498 (vect_get_store_cost): Likewise.
9499 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
9500 Use vect_dr_stmt instead of DR_SMTT.
9501 (vect_record_base_alignments): Likewise.
9502 (vect_calculate_target_alignment): Likewise.
9503 (vect_compute_data_ref_alignment): Likewise and make static.
9504 (vect_update_misalignment_for_peel): Likewise.
9505 (vect_verify_datarefs_alignment): Likewise.
9506 (vector_alignment_reachable_p): Likewise.
9507 (vect_get_data_access_cost): Likewise. Pass down
9508 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
9509 (vect_get_peeling_costs_all_drs): Likewise.
9510 (vect_peeling_hash_get_lowest_cost): Likewise.
9511 (vect_enhance_data_refs_alignment): Likewise.
9512 (vect_find_same_alignment_drs): Likewise.
9513 (vect_analyze_data_refs_alignment): Likewise.
9514 (vect_analyze_group_access_1): Likewise.
9515 (vect_analyze_group_access): Likewise.
9516 (vect_analyze_data_ref_access): Likewise.
9517 (vect_analyze_data_ref_accesses): Likewise.
9518 (vect_vfa_segment_size): Likewise.
9519 (vect_small_gap_p): Likewise.
9520 (vectorizable_with_step_bound_p): Likewise.
9521 (vect_prune_runtime_alias_test_list): Likewise.
9522 (vect_analyze_data_refs): Likewise.
9523 (vect_supportable_dr_alignment): Likewise.
9524 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
9525 (vect_gen_prolog_loop_niters): Likewise.
9526 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
9527 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
9529 (vect_recog_mask_conversion_pattern): Likewise.
9530 (vect_try_gather_scatter_pattern): Likewise.
9531 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
9532 to vect_get_store_cost.
9533 (vect_get_store_cost): Get stmt_info instead of DR.
9534 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
9535 (vect_get_load_cost): Get stmt_info instead of DR.
9537 2018-06-01 Richard Biener <rguenther@suse.de>
9540 * gimple-fold.c (var_decl_component_p): Also allow offsetted
9541 vars wrapped in MEM_REFs.
9543 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
9545 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
9546 Fix subreg tests so that we only return a choice between
9547 GENERAL_REGS and FP_REGS if the original classes included both.
9549 2018-06-01 Richard Biener <rguenther@suse.de>
9552 * tree-ssa-structalias.c (get_function_part_constraint):
9553 Handle NULL fi->decl.
9554 (find_func_aliases_for_call): Properly handle indirect
9555 fi from direct call.
9556 (find_func_clobbers): Likewise.
9557 (ipa_pta_execute): Likewise.
9558 (create_variable_info_for): For functions that are ifunc_resolver
9559 resolve to a varinfo that contains the result of the resolver call.
9560 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
9563 2018-05-31 Michael Collison <michael.collison@arm.com>
9565 * config/aarch64/aarch64.md:
9566 (*fix_to_zero_extenddfdi2): New pattern.
9567 * gcc.target/aarch64/fix_extend1.c: New testcase.
9569 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
9573 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
9574 and BUILT_IN_STRNCMP_EQ.
9575 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
9576 BUILT_IN_STRNCMP_EQ.
9577 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
9578 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
9579 (gimple_fold_builtin): Likewise.
9580 * tree-ssa-strlen.c (compute_string_length): New function.
9581 (determine_min_obsize): New function.
9582 (handle_builtin_string_cmp): New function to handle calls to
9583 string compare functions.
9584 (strlen_optimize_stmt): Add handling to builtin string compare
9586 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
9587 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
9588 * tree.c (build_common_builtin_nodes): Add new defines of
9589 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
9591 2018-05-31 Jakub Jelinek <jakub@redhat.com>
9594 * bb-reorder.c (pass_partition_blocks::gate): Return false for
9595 functions with naked attribute.
9597 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
9599 * config/i386/sse.md (avx_vec_concat<mode>):
9600 Substitute concat_tg_mode mode attribute with xtg_mode.
9601 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
9602 (concat_tg_mode): Remove mode attribute.
9604 2018-05-31 Martin Sebor <msebor@redhat.com>
9607 * calls.c (alloc_max_size): Correct a logic error/typo.
9608 Treat excessive arguments as infinite. Warn for invalid arguments.
9609 * doc/invoke.texi (-Walloc-size-larger-than): Update.
9611 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
9614 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
9615 and movx for Haswell.
9617 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
9618 Cesar Philippidis <cesar@codesourcery.com>
9621 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
9622 when emitting error on private/firstprivate reductions.
9623 * omp-low.c (lower_omp_target): Avoid reference-type processing
9624 on pointers for firstprivate clause.
9626 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
9628 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
9631 * config/aarch64/aarch64-simd.md
9632 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
9633 (aarch64_ld1_x3_<mode>): Likewise
9634 (aarch64_st1x2<VALLDIF:mode>): Likewise
9635 (aarch64_st1_x2_<mode>): Likewise
9636 (aarch64_st1x3<VALLDIF:mode>): Likewise
9637 (aarch64_st1_x3_<mode>): Likewise
9638 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
9639 (vld1_s8_x3): Likewise.
9640 (vld1_u16_x3): Likewise.
9641 (vld1_s16_x3): Likewise.
9642 (vld1_u32_x3): Likewise.
9643 (vld1_s32_x3): Likewise.
9644 (vld1_u64_x3): Likewise.
9645 (vld1_s64_x3): Likewise.
9646 (vld1_f16_x3): Likewise.
9647 (vld1_f32_x3): Likewise.
9648 (vld1_f64_x3): Likewise.
9649 (vld1_p8_x3): Likewise.
9650 (vld1_p16_x3): Likewise.
9651 (vld1_p64_x3): Likewise.
9652 (vld1q_u8_x3): Likewise.
9653 (vld1q_s8_x3): Likewise.
9654 (vld1q_u16_x3): Likewise.
9655 (vld1q_s16_x3): Likewise.
9656 (vld1q_u32_x3): Likewise.
9657 (vld1q_s32_x3): Likewise.
9658 (vld1q_u64_x3): Likewise.
9659 (vld1q_s64_x3): Likewise.
9660 (vld1q_f16_x3): Likewise.
9661 (vld1q_f32_x3): Likewise.
9662 (vld1q_f64_x3): Likewise.
9663 (vld1q_p8_x3): Likewise.
9664 (vld1q_p16_x3): Likewise.
9665 (vld1q_p64_x3): Likewise.
9666 (vst1_s64_x2): Likewise.
9667 (vst1_u64_x2): Likewise.
9668 (vst1_f64_x2): Likewise.
9669 (vst1_s8_x2): Likewise.
9670 (vst1_p8_x2): Likewise.
9671 (vst1_s16_x2): Likewise.
9672 (vst1_p16_x2): Likewise.
9673 (vst1_s32_x2): Likewise.
9674 (vst1_u8_x2): Likewise.
9675 (vst1_u16_x2): Likewise.
9676 (vst1_u32_x2): Likewise.
9677 (vst1_f16_x2): Likewise.
9678 (vst1_f32_x2): Likewise.
9679 (vst1_p64_x2): Likewise.
9680 (vst1q_s8_x2): Likewise.
9681 (vst1q_p8_x2): Likewise.
9682 (vst1q_s16_x2): Likewise.
9683 (vst1q_p16_x2): Likewise.
9684 (vst1q_s32_x2): Likewise.
9685 (vst1q_s64_x2): Likewise.
9686 (vst1q_u8_x2): Likewise.
9687 (vst1q_u16_x2): Likewise.
9688 (vst1q_u32_x2): Likewise.
9689 (vst1q_u64_x2): Likewise.
9690 (vst1q_f16_x2): Likewise.
9691 (vst1q_f32_x2): Likewise.
9692 (vst1q_f64_x2): Likewise.
9693 (vst1q_p64_x2): Likewise.
9694 (vst1_s64_x3): Likewise.
9695 (vst1_u64_x3): Likewise.
9696 (vst1_f64_x3): Likewise.
9697 (vst1_s8_x3): Likewise.
9698 (vst1_p8_x3): Likewise.
9699 (vst1_s16_x3): Likewise.
9700 (vst1_p16_x3): Likewise.
9701 (vst1_s32_x3): Likewise.
9702 (vst1_u8_x3): Likewise.
9703 (vst1_u16_x3): Likewise.
9704 (vst1_u32_x3): Likewise.
9705 (vst1_f16_x3): Likewise.
9706 (vst1_f32_x3): Likewise.
9707 (vst1_p64_x3): Likewise.
9708 (vst1q_s8_x3): Likewise.
9709 (vst1q_p8_x3): Likewise.
9710 (vst1q_s16_x3): Likewise.
9711 (vst1q_p16_x3): Likewise.
9712 (vst1q_s32_x3): Likewise.
9713 (vst1q_s64_x3): Likewise.
9714 (vst1q_u8_x3): Likewise.
9715 (vst1q_u16_x3): Likewise.
9716 (vst1q_u32_x3): Likewise.
9717 (vst1q_u64_x3): Likewise.
9718 (vst1q_f16_x3): Likewise.
9719 (vst1q_f32_x3): Likewise.
9720 (vst1q_f64_x3): Likewise.
9721 (vst1q_p64_x3): Likewise.
9723 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9725 * config/msp430/msp430.c (msp430_output_labelref): Prepend
9726 user_label_prefix to name.
9728 * tree-core.h: Update comment about the format of NAME string
9729 passed to handler in attribute_spec.
9731 * config/msp430/msp430.md: Remove erroneous subreg expression from
9732 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
9733 zero_extend{q,h}isi2.
9735 2018-05-30 Borislav Petkov <bp@suse.de>
9737 * doc/extend.texi: Document some architecture specific
9738 constraints and sort entries.
9740 2018-05-30 Martin Sebor <msebor@redhat.com>
9743 * builtins.c (expand_builtin_stpcpy_1): New function.
9744 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
9745 only if the former succeeds.
9747 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
9749 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
9752 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9754 * doc/invoke.texi (-flinker-output): Document
9756 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9758 * passes.c (ipa_write_summaries): Only modify statements if body
9760 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
9761 incrementally linking.
9762 (ipa_passes): Likewise.
9763 * lto-cgraph.c (lto_output_node): When incrementally linking do not
9764 pass down resolution info.
9765 * common.opt (flag_incremental_link): Update info.
9766 * gcc.c (plugin specs): Turn flinker-output=* to
9767 -plugin-opt=-linker-output-known
9768 * toplev.c (compile_file): Also cut compilation when doing incremental
9770 * flag-types. (enum lto_partition_model): Add
9771 LTO_LINKER_OUTPUT_NOLTOREL.
9772 (invoke.texi): Add -flinker-output docs.
9773 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
9774 link same way as WPA; do not stream in dead initializers.
9776 * dwarf2out.c (dwarf2out_die_ref_for_decl,
9777 darf2out_register_external_decl): Support incremental link.
9779 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9781 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
9783 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9785 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
9786 it down to simple_object_copy_lto_debug_sections.
9787 (run_gcc): Determine incremental LTO link time and configure
9788 lto1 into non-wpa mode, disable renaming of debug sections.
9790 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
9792 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
9793 descriptions of various incorrectly documented functions.
9795 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
9798 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9799 address check not strict.
9801 2018-05-30 Richard Biener <rguenther@suse.de>
9803 PR tree-optimization/85964
9804 * tracer.c (better_p): Drop initialized count check, we only
9805 call the function with initialized counts now.
9806 (find_best_successor): Do find a best edge if one
9807 has uninitialized count.
9808 (find_best_predecessor): Likewise. Do BB frequency check only
9809 if count is initialized.
9811 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
9813 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
9814 (aarch64_ldrstr_offset_compare): New.
9815 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
9816 load/store orderings.
9817 (aarch64_gen_adjusted_ldpstp): Likewise.
9819 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
9821 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
9822 Check for subset of GENERAL_REGS and FP_REGS.
9823 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
9826 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
9828 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
9829 and wi::to_poly_offset. Add the current offset and then check
9830 whether the sum fits, rather than using an unchecked addition of
9831 a checked term. Check for a shwi rather than a uhwi.
9832 * expr.c (get_bit_range): Use tree_to_poly_uint64.
9833 (store_constructor): Use poly_int_tree_p.
9834 (expand_expr_real_1): Likewise.
9835 * function.c (assign_temp): Likewise.
9836 * fold-const.c (const_binop): Use poly_int_tree_p and
9838 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
9840 * ipa-icf-gimple.c (func_checker::compare_operand): Use
9841 to_poly_offset for MEM offsets.
9842 * ipa-icf.c (sem_variable::equals): Likewise.
9843 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
9844 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
9845 wi::to_poly_offset for BIT_FIELD_REF offsets.
9846 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
9848 * var-tracking.c (emit_note_insn_var_location): Use
9849 tree_to_poly_uint64.
9851 2018-05-29 Jim Wilson <jimw@sifive.com>
9853 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
9855 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
9858 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
9859 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
9861 (sse4_1_round<mode>2): Use nonimmediate_operand
9862 for operand 1 predicate.
9864 2018-05-29 Martin Sebor <msebor@redhat.com>
9865 Richard Biener <rguenther@suse.de>
9868 * calls.c (get_size_range): Call determine_value_range instead
9869 of get_value_range..
9870 * tree-vrp.h (determine_value_range): Declared new function.
9871 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
9873 2018-05-29 Richard Biener <rguenther@suse.de>
9875 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
9876 sure to use non-pattern stmts for get_earlier_stmt arguments.
9877 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
9878 called on pattern stmts.
9879 (get_later_stmt): Likewise.
9881 2018-05-29 Martin Liska <mliska@suse.cz>
9883 PR gcov-profile/85759
9884 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
9887 2018-05-29 Jakub Jelinek <jakub@redhat.com>
9889 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
9891 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
9895 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
9896 VEC_PACK_FLOAT_EXPR): New tree codes.
9897 * tree-pretty-print.c (op_code_prio): Handle
9898 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
9899 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
9900 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
9901 * tree-inline.c (estimate_operator_cost): Likewise.
9902 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
9903 * fold-const.c (const_binop): Likewise.
9904 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
9905 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
9906 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
9907 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
9908 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
9909 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
9910 * expr.c (expand_expr_real_2): Likewise.
9911 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
9912 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
9913 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
9915 * optabs.c (expand_widen_pattern_expr): For
9916 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
9917 sign from result type rather than operand's type.
9918 (expand_binop_directly): For vec_packu_float_optab and
9919 vec_packs_float_optab allow result type to be different from operand's
9921 * optabs-tree.c (optab_for_tree_code): Handle
9922 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
9923 VEC_PACK_FLOAT_EXPR. Formatting fixes.
9924 * tree-vect-generic.c (expand_vector_operations_1): Handle
9925 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
9926 VEC_PACK_FLOAT_EXPR.
9927 * tree-vect-stmts.c (supportable_widening_operation): Handle
9929 (supportable_narrowing_operation): Handle FLOAT_EXPR.
9930 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
9931 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
9932 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
9933 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
9935 (vec_pack<floatprefix>_float_<mode>): New expander.
9936 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
9938 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
9939 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
9940 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
9941 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
9942 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
9944 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
9945 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
9946 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
9947 VEC_PACK_FLOAT_EXPR): Document.
9949 2018-05-29 Richard Biener <rguenther@suse.de>
9951 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
9953 (stmt_vec_info_vec): Make pointer.
9954 (init_stmt_vec_info_vec): Remove.
9955 (free_stmt_vec_info_vec): Likewise.
9956 (set_stmt_vec_info_vec): New function.
9957 (free_stmt_vec_infos): Likewise.
9958 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
9959 (set_vinfo_for_stmt): Likewise.
9960 (get_earlier_stmt): Likewise.
9961 (get_later_stmt): Likewise.
9962 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
9963 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
9964 (vec_info::~vec_info): Free stmt_vec_infos.
9965 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
9966 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
9967 (pass_slp_vectorize::execute): Likewise.
9968 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
9969 (free_stmt_vec_info_vec): Likewise.
9970 (set_stmt_vec_info_vec): New function.
9971 (free_stmt_vec_infos): Likewise.
9972 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
9973 the global stmt_vec_info_vec.
9974 * tree-parloops.c (gather_scalar_reductions): Use
9975 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
9978 2018-05-29 Richard Biener <rguenther@suse.de>
9980 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
9982 2018-05-29 Martin Liska <mliska@suse.cz>
9983 David Malcolm <dmalcolm@redhat.com>
9985 * vec.c (test_reverse): New.
9986 (vec_c_tests): Add new test.
9987 * vec.h (vl_ptr>::reverse): New function.
9989 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
9991 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
9993 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
9996 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
9998 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
10000 2018-05-28 Richard Biener <rguenther@suse.de>
10002 PR tree-optimization/85933
10003 * tree-vect-data-refs.c (vect_record_base_alignments): Only
10004 look at stmts marked as vectorizable.
10006 2018-05-28 Richard Biener <rguenther@suse.de>
10008 PR tree-optimization/85934
10009 * tree-vect-generic.c (expand_vector_operations_1): Hoist
10010 vector boolean check before scalar optimization.
10012 2018-05-28 Jakub Jelinek <jakub@redhat.com>
10014 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
10017 2018-05-28 Mark Wielaard <mark@klomp.org>
10019 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
10020 if it is an expression containing a minus sign.
10022 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
10024 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
10026 2018-05-27 Paul Koning <ni1d@arrl.net>
10028 * config/pdp11/pdp11.md (truncsihi2): Remove.
10030 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
10031 Chung-Ju Wu <jasonwucj@gmail.com>
10033 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
10035 (unaligned_store_dw): Ditto.
10036 * config/nds32/nds32-memory-manipulation.c
10037 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
10038 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
10039 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
10040 (emit_setmem_word_loop): Rename to ...
10041 (emit_setmem_doubleword_loop): ... this.
10042 (nds32_gen_dup_4_byte_to_word_value): New function.
10043 (nds32_gen_dup_8_byte_to_double_word_value): New function.
10044 (nds32_expand_setmem_loop): Refine implementation.
10045 (nds32_expand_setmem_loop_v3m): Ditto.
10046 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
10049 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
10051 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
10053 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
10055 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
10056 (nds32_init_machine_status): Initialize machine->attr_naked_p and
10057 machine->attr_no_prologue_p.
10058 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
10059 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
10060 (nds32_expand_epilogue): Consider attr_naked_p.
10061 (nds32_expand_epilogue_v3pop): Likewise.
10062 (nds32_can_use_return_insn): Likewise.
10063 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
10064 attr_no_prologue_p fields.
10065 * config/nds32/nds32.opt (mret-in-naked-func): New option.
10067 2018-05-27 Jakub Jelinek <jakub@redhat.com>
10070 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
10072 * config/i386/sse.md
10073 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
10075 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
10077 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
10079 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
10081 (*<floatsuffix>floatv2div2sf2): Rename to ...
10082 (*float<floatunssuffix>v2div2sf2): ... this.
10083 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
10084 (float<floatunssuffix>v2div2sf2_mask): ... this.
10085 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
10086 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
10087 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
10089 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
10091 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
10093 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
10095 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
10097 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
10099 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
10100 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
10101 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
10102 gen_ufix_truncv8dfv8si2.
10103 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
10104 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
10105 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
10106 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
10107 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
10108 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
10109 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
10110 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
10112 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
10116 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
10118 2018-05-25 Jim Wilson <jimw@sifive.com>
10120 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
10121 * config/riscv/riscv.c (struct machine_function): Add
10122 interrupt_handler_p and attribute_checked_p fields.
10123 (riscv_attribute_table): Add interrupt.
10124 (riscv_interrupt_type_p): New.
10125 (riscv_save_reg_p): Save extra regs for interrupt handler.
10126 (riscv_use_save_libcall): Return false for interrupt handler.
10127 (riscv_first_stack_step): Add forward declaration.
10128 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
10129 for interrupt handler with large frame. Use it for saved reg list.
10130 (riscv_expand_prologue): Move flag_stack_usage_info support to
10131 eliminate duplication.
10132 (riscv_expand_epilogue): Generate mret for interrupt handler.
10133 (riscv_epilogue_uses): New.
10134 (riscv_can_use_return_insn): Return false for interrupt handler.
10135 (riscv_function_ok_for_sibcall): Likewise.
10136 (riscv_set_current_function): Add interrupt handler support.
10137 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
10138 * config/riscv/riscv.md (UNSPECV_MRET): New.
10140 (riscv_frflags, riscv_fsflags): Use tab after opcode.
10142 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
10144 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
10146 PR tree-optimization/85712
10147 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
10148 this candidate has already been replaced in-situ by a copy.
10150 2018-05-25 Jason Merrill <jason@redhat.com>
10152 PR c++/80485 - inline function non-zero address.
10153 * symtab.c (nonzero_address): Check DECL_COMDAT.
10155 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
10158 * config/alpha/alpha.md (ashlsi3): New insn pattern.
10159 (*ashlsi_se): Rename from *ashldi_se. Define as sign
10160 extension of SImode operation. Use const123_operand predicate.
10161 (*saddsi_1): Remove.
10162 (*saddl_se_1): Ditto.
10163 (*ssubsi_1): Ditto.
10164 (*ssubl_se_1): Ditto.
10165 * config/alpha/predicates.md (const123_operand): New predicate.
10166 * config/alpha/constraints.md (P): Use IN_RANGE.
10168 2018-05-25 Richard Biener <rguenther@suse.de>
10170 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
10172 (ref_maybe_used_by_stmt_p): Likewise.
10173 (stmt_may_clobber_ref_p): Likewise.
10174 (stmt_may_clobber_ref_p_1): Likewise.
10175 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
10177 (ref_maybe_used_by_stmt_p): Likewise.
10178 (stmt_may_clobber_ref_p): Likewise.
10179 (stmt_may_clobber_ref_p_1): Likewise.
10180 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
10181 the alias oracle to disambiguate DRs with stmts DR analysis
10183 (vect_analyze_data_refs): Do not give up on not analyzable
10184 DRs for BB vectorization. Remove code truncating the dataref
10187 2018-05-25 Jakub Jelinek <jakub@redhat.com>
10190 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10191 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
10192 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
10194 2018-05-25 Richard Biener <rguenther@suse.de>
10196 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
10197 function, combining stmt data ref gathering and fatal analysis
10199 (vect_analyze_data_refs): Remove now redudnant code and simplify.
10200 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
10201 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
10202 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
10203 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
10205 2018-05-25 Bin Cheng <bin.cheng@arm.com>
10207 PR tree-optimization/85720
10208 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
10209 SCC if all partitions are builtins.
10210 (version_loop_by_alias_check): New parameter. Generate cancelable
10211 runtime alias check if all partitions are builtins.
10212 (distribute_loop): Update call to above function.
10214 2018-05-25 Bin Cheng <bin.cheng@arm.com>
10216 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
10217 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
10218 (parm_default_def_partition_arg): Ditto.
10219 (set_parm_default_def_partition): Ditto.
10220 (get_parm_default_def_partitions): Ditto and make it static.
10221 (get_undefined_value_partitions): Ditto and make it static.
10222 (remove_ssa_form): Refactor call to init_var_map here.
10223 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
10224 computation for loop region.
10225 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
10226 (register_default_def): Delete.
10227 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
10228 (parm_default_def_partition_arg): Ditto.
10229 (set_parm_default_def_partition): Ditto.
10230 (get_parm_default_def_partitions): Ditto and make it static.
10231 (get_undefined_value_partitions): Ditto and make it static.
10232 (coalesce_with_default, coalesce_with_default): Update comment.
10233 (create_coalesce_list_for_region): New func factored out from
10234 create_outofssa_var_map.
10235 (populate_coalesce_list_for_outofssa): New func factored out from
10236 create_outofssa_var_map and coalesce_ssa_name.
10237 (create_outofssa_var_map): Delete.
10238 (coalesce_ssa_name): Refactor to support live range computation.
10239 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
10240 (get_parm_default_def_partitions): Delete.
10241 (get_undefined_value_partitions): Ditto.
10242 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
10243 computation for loop region.
10244 (new_tree_live_info, loe_visit_block): Ditto.
10245 (live_worklist, set_var_live_on_entry): Ditto.
10246 (calculate_live_on_exit, verify_live_on_entry): Ditto.
10247 * tree-ssa-live.h (struct _var_map): New fields.
10248 (init_var_map): Change decl.
10249 (region_contains_p): New.
10251 2018-05-25 Bin Cheng <bin.cheng@arm.com>
10253 * tree-ssa-live.h (live_merge_and_clear): Delete.
10255 2018-05-25 Richard Biener <rguenther@suse.de>
10258 * tree-dump.c (dequeue_and_dump): Remove access to removed
10259 operand 2 of a SWITCH_EXPR.
10261 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10263 * doc/sourcebuild.texi (vect_double_cond_arith): Include
10264 multiplication and division.
10265 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
10266 (cond_udiv@var{m}, cond_umod@var{m}): Document.
10267 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
10268 (cond_udiv_optab, cond_umod_optab): New optabs.
10269 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
10270 (IFN_COND_RDIV): New internal functions.
10271 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
10272 TRUNC_MOD_EXPR and RDIV_EXPR.
10273 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
10274 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
10276 (SVE_INT_BINARY): Include mult.
10277 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
10278 (optab, sve_int_op): Handle mult.
10279 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
10281 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
10282 for SVE_INT_BINARY_SD.
10284 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10286 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
10287 (optab, sve_int_op): Handle div and udiv.
10288 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
10289 for SVE_INT_BINARY_SD.
10290 (*<optab><mode>3): New insn for the same.
10292 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10294 * tree-vect-patterns.c: Include predict.h.
10295 (vect_recog_divmod_pattern): Restrict check for division support
10296 to when optimizing for size.
10298 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10300 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
10301 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
10302 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
10303 (gimple_match_op::set_op): Likewise.
10304 (gimple_resimplify4): Declare.
10305 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
10306 (expr::gen_transform): Likewise.
10307 (decision_tree::gen): Generate a simplification routine for 4 operands.
10308 * gimple-match-head.c (gimple_simplify): Add an overload for
10309 4 operands. In the top-level function, handle up to 4 call
10310 arguments and call gimple_resimplify4.
10311 (gimple_resimplify4): New function.
10312 (build_call_internal): Pass a fourth operand.
10313 (maybe_push_to_seq): Likewise.
10314 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
10315 Fold VEC_COND_EXPRs of an operation and a default value into
10316 an IFN_COND_* function if possible.
10317 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
10319 (SVE_COND_FP_BINARY): Include them.
10320 (optab, sve_fp_op): Handle them.
10321 (SVE_INT_BINARY_REV): New code iterator.
10322 (SVE_COND_FP_BINARY_REV): New int iterator.
10323 (commutative): New int attribute.
10324 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
10326 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
10328 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
10329 (*cond_<optab><mode>): New patterns for reversed operands.
10331 2018-05-25 Richard Biener <rguenther@suse.de>
10333 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
10334 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
10335 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
10336 (STMT_VINFO_GROUPED_ACCESS): Adjust.
10337 * tree-vect-data-refs.c (everywhere): Adjust users.
10338 * tree-vect-loop.c (everywhere): Likewise.
10339 * tree-vect-slp.c (everywhere): Likewise.
10340 * tree-vect-stmts.c (everywhere): Likewise.
10341 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
10343 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10345 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
10347 (gcc_cv_as_section_exclude): ... this.
10348 Try Solaris as #exclude syntax.
10349 * configure: Regenerate.
10350 * config.in: Regenerate.
10351 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
10353 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
10354 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
10356 * varasm.c (default_elf_asm_named_section): Don't check if
10357 HAVE_GAS_SECTION_EXCLUDE is defined.
10359 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10361 * doc/md.texi: Update the documentation of the cond_* optabs
10362 to mention the new final operand. Fix GET_MODE_NUNITS call.
10363 Describe the scalar case too.
10364 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
10365 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
10367 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
10368 (get_conditional_internal_fn): Update comment.
10369 * tree-vect-loop.c (vectorizable_reduction): Pass the original
10370 accumulator value as a final argument to conditional functions.
10371 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
10372 a define_expand and add an "else" operand. Assert for now that
10373 the else operand is equal to operand 2. Use SVE_INT_BINARY and
10374 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
10375 (*cond_<optab><mode>): New patterns.
10376 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
10377 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
10378 (UNSPEC_COND_EOR): Delete.
10379 (optab): Remove associated mappings.
10380 (SVE_INT_BINARY): New code iterator.
10381 (sve_int_op): Remove int attribute and add "minus" to the code
10383 (SVE_COND_INT_OP): Delete.
10384 (SVE_COND_FP_OP): Rename to...
10385 (SVE_COND_FP_BINARY): ...this.
10387 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10389 * optabs.c (can_reuse_operands_p): New function.
10390 (maybe_legitimize_operands): Try to reuse the results for
10393 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
10395 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
10396 Add {q} suffix to insn mnemonic.
10398 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10400 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
10401 (msp430_warn_func_return): New.
10403 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
10405 * fold-const.c (tree_nonzero_bits): New function.
10406 * fold-const.h (tree_nonzero_bits): Likewise.
10407 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
10408 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
10410 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
10414 * varasm.c (assemble_alias): Check ifunc_resolver only on
10417 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
10420 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
10421 when memory input operand is handled.
10423 2018-05-24 Luis Machado <luis.machado@linaro.org>
10425 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
10427 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
10429 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
10431 * match.pd: Delay FMA folds until after vectorization.
10433 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
10436 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10437 address check not strict.
10439 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
10441 * gimple-match.h (gimple_match_op): New class.
10442 (mprts_hook): Replace parameters with a gimple_match_op *.
10443 (maybe_build_generic_op): Likewise.
10444 (gimple_simplified_result_is_gimple_val): Replace parameters with
10445 a const gimple_match_op *.
10446 (gimple_simplify): Replace code_helper * and tree * parameters with
10447 a gimple_match_op * parameter.
10448 (gimple_resimplify1): Replace code_helper *, tree and tree *
10449 parameters with a gimple_match_op * parameter.
10450 (gimple_resimplify2): Likewise.
10451 (gimple_resimplify3): Likewise.
10452 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
10453 parameters with a gimple_match_op * parameter.
10454 * gimple-match-head.c (gimple_simplify): Change prototypes of
10455 auto-generated functions to take a gimple_match_op * instead of
10456 separate code_helper * and tree * parameters. Make the same
10457 change in the top-level overload and update calls to the
10458 gimple_resimplify routines. Update calls to the auto-generated
10459 functions and to maybe_push_res_to_seq in the publicly-facing
10460 operation-specific gimple_simplify overloads.
10461 (gimple_match_op::MAX_NUM_OPS): Define.
10462 (gimple_resimplify1): Replace rcode and ops with a single res_op
10463 parameter. Update call to gimple_simplify.
10464 (gimple_resimplify2): Likewise.
10465 (gimple_resimplify3): Likewise.
10466 (mprts_hook): Replace parameters with a gimple_match_op *.
10467 (maybe_build_generic_op): Likewise.
10468 (build_call_internal): Replace type, nargs and ops with
10469 a gimple_match_op *.
10470 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
10471 with a single gimple_match_op *. Update calls to mprts_hook,
10472 build_call_internal and gimple_simplified_result_is_gimple_val.
10473 Factor out code that is common to the tree_code and combined_fn cases.
10474 * genmatch.c (expr::gen_transform): Replace tem_code and
10475 tem_ops with a gimple_match_op called tem_op. Update calls
10476 to the gimple_resimplify functions and maybe_push_res_to_seq.
10477 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
10478 res_ops. Update call to the gimple_resimplify functions.
10479 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
10480 (decision_tree::gen): Make the functions take a gimple_match_op *
10481 called res_op instead of separate res_code and res_ops parameters.
10482 Update call accordingly.
10483 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
10484 and ops with a single res_op parameter. Update calls to
10485 maybe_build_generic_op and maybe_push_res_to_seq.
10486 (fold_stmt_1): Update calls to gimple_simplify and
10487 replace_stmt_with_simplification.
10488 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
10489 and gimple_simplified_result_is_gimple_val.
10490 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
10492 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
10493 with a gimple_match_op *.
10494 (vn_nary_build_or_lookup): Likewise. Update call to
10495 vn_nary_build_or_lookup_1.
10496 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
10497 gimple_match_op *. Update calls to the gimple_resimplify routines
10498 and to gimple_simplified_result_is_gimple_val.
10499 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
10500 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
10501 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
10502 (visit_nary_op): Likewise.
10503 (visit_reference_op_load): Likewise.
10505 2018-05-23 Luis Machado <luis.machado@linaro.org>
10507 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
10508 modifier for printing the step amount.
10510 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
10513 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
10516 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
10518 * doc/sourcebuild.texi (Endianness): New subsubsection.
10520 2018-05-23 Luis Machado <luis.machado@linaro.org>
10522 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10523 <prefetch_dynamic_strides>: New const bool field.
10524 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10525 prefetch_dynamic_strides.
10526 (exynosm1_prefetch_tune): Likewise.
10527 (thunderxt88_prefetch_tune): Likewise.
10528 (thunderx_prefetch_tune): Likewise.
10529 (thunderx2t99_prefetch_tune): Likewise.
10530 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
10532 (aarch64_override_options_internal): Update to set
10533 PARAM_PREFETCH_DYNAMIC_STRIDES.
10534 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10535 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10536 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10537 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10538 prefetch-dynamic-strides setting.
10540 2018-05-23 Luis Machado <luis.machado@linaro.org>
10542 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10543 <minimum_stride>: New const int field.
10544 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10545 minimum_stride field defaulting to -1.
10546 (exynosm1_prefetch_tune): Likewise.
10547 (thunderxt88_prefetch_tune): Likewise.
10548 (thunderx_prefetch_tune): Likewise.
10549 (thunderx2t99_prefetch_tune): Likewise.
10550 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
10551 <default_opt_level>: Set to 3.
10552 (aarch64_override_options_internal): Update to set
10553 PARAM_PREFETCH_MINIMUM_STRIDE.
10554 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10555 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10556 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10557 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10558 stride is constant and is below the minimum stride threshold.
10560 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10562 * config/arm/arm-cpus.in (mode26): Delete.
10563 (armv4): Delete mode26 reference.
10564 * config/arm/arm.c (arm_configure_build_target): Delete use of
10567 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
10569 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
10571 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
10572 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
10574 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
10575 (floatunsdidf2): Ditto.
10577 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
10579 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
10580 (fixuns_trunc<mode>si2_avx512f): Ditto.
10581 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
10582 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
10583 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
10585 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
10587 PR rtl-optimization/79985
10588 * df-scan.c (df_insn_refs_collect): Remove special case for
10589 global registers and asm statements.
10591 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
10593 * extend.texi (Global Register Variables): Rewrite the bullet list.
10594 Note that the register is available for allocation. Note that access
10595 via inline asm must use constraints. Add note about async-signal
10596 handlers. Remove paragraph about automagic register selection.
10598 2018-05-23 Richard Biener <rguenther@suse.de>
10600 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
10601 of fixed offset from memset VN.
10603 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
10605 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
10606 first_interp field.
10607 (alloc_cand_and_find_basis): Initialize first_interp field.
10608 (slsr_process_mul): Modify first_interp field.
10609 (slsr_process_add): Likewise.
10610 (slsr_process_cast): Modify first_interp field for each new
10612 (slsr_process_copy): Likewise.
10613 (dump_candidate): Dump first_interp field.
10614 (replace_mult_candidate): Process all interpretations, not just
10616 (replace_rhs_if_not_dup): Likewise.
10617 (replace_one_candidate): Likewise.
10619 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
10621 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
10623 (aarch64_needs_frame_chain): New function.
10624 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
10626 2018-05-23 Sudakshina Das <sudi.das@arm.com>
10629 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
10630 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
10631 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
10632 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
10633 as true for strict-align.
10634 (aarch64_can_inline_p): Perform checks even when callee has no
10635 attributes to check for strict alignment.
10636 * doc/extend.texi (AArch64 Function Attributes): Document
10638 * doc/invoke.texi: (AArch64 Options): Likewise.
10640 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
10642 PR tree-optimization/85853
10643 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
10644 the handling of the root of the node to...
10645 (vect_slp_analyze_node_operations_1): ...this new function,
10646 and run the whole thing with the child nodes' def types
10647 set according to their SLP node's def type.
10649 2018-05-23 Richard Biener <rguenther@suse.de>
10651 PR middle-end/85874
10652 * tree-data-ref.c (create_runtime_alias_checks): Defer
10653 and ignore overflow warnings.
10655 2018-05-23 Yury Gribov <tetra2005@gmail.com>
10657 PR tree-optimization/85822
10658 * tree-vrp.c (is_masked_range_test): Fix handling of negative
10661 2018-05-23 Richard Biener <rguenther@suse.de>
10663 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
10664 memset constants via native_interpret_expr.
10666 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
10669 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
10671 (cgraph_node::create_alias): Likewise.
10672 (cgraph_node::get_availability): Check ifunc_resolver instead
10673 of looking up ifunc attribute.
10674 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
10675 * varasm.c (do_assemble_alias): Likewise.
10676 (assemble_alias): Likewise.
10677 (default_binds_local_p_3): Likewise.
10678 * cgraph.h (cgraph_node): Add ifunc_resolver.
10679 (cgraph_node::only_called_directly_or_aliased_p): Return false
10680 for IFUNC resolver.
10681 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
10683 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
10684 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
10685 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
10686 instead of looking up ifunc attribute.
10688 2018-05-22 Luis Machado <luis.machado@linaro.org>
10690 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
10692 2018-05-22 Martin Sebor <msebor@redhat.com>
10694 PR middle-end/85359
10695 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
10696 only when expasion succeeds.
10697 (expand_builtin_strcmp): Same.
10698 (expand_builtin_strncmp): Same.
10700 2018-05-22 Martin Sebor <msebor@redhat.com>
10702 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
10704 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
10705 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10707 * config/aarch64/aarch64-ldpstp.md: Replace uses of
10708 aarch64_mem_pair_operand with memory_operand and delete operand swapping
10710 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
10711 Add check for legitimate_address.
10712 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
10713 (aarch64_swap_ldrstr_operands): New.
10714 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
10717 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
10718 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10720 * config/aarch64/aarch64.md: New patterns to generate stp
10722 (store_pair_sw, store_pair_dw): New patterns to generate stp for
10723 single words and double words.
10724 (load_pair_sw, load_pair_dw): Likewise.
10725 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
10727 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
10729 * config/aarch64/aarch64-ldpstp.md: Modify peephole
10730 for different mode ldpstp and add peephole for merged zero stores.
10731 Likewise for loads.
10732 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
10734 (aarch64_gen_store_pair): Rename calls to match new patterns.
10735 (aarch64_gen_load_pair): Rename calls to match new patterns.
10736 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
10737 (load_pair<DREG:mode><DREG2:mode>): ... This.
10738 (store_pair<mode>): Rename to...
10739 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
10740 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
10741 New mode iterators.
10742 (V_INT_EQUIV): Handle SImode.
10743 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
10746 2018-05-22 Martin Sebor <msebor@redhat.com>
10749 * calls.c (maybe_warn_nonstring_arg): Use string length to set
10750 or ajust the presumed bound on an operation to avoid unnecessary
10753 2018-05-22 Martin Sebor <msebor@redhat.com>
10755 PR tree-optimization/85826
10756 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
10757 assuming that a DECL necesarily has a constant size.
10759 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
10761 PR middle-end/85862
10762 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
10764 2018-05-22 Richard Biener <rguenther@suse.de>
10766 PR tree-optimization/85834
10767 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
10768 non-constant and non-zero memset arguments.
10770 2018-05-22 Martin Liska <mliska@suse.cz>
10773 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
10775 2018-05-22 Richard Biener <rguenther@suse.de>
10777 PR tree-optimization/85863
10778 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
10779 comparisons when vectype is specified.
10780 (vectorizable_condition): Do not specify vectype for
10781 vect_is_simple_cond when SLP vectorizing.
10783 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
10786 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
10787 define __ibm128 as long double.
10788 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
10789 as a distinct type when IEEE 128-bit support is enabled.
10790 (init_float128_ieee): Fix up conversions between IFmode and IEEE
10791 128-bit types to use the correct functions.
10792 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
10793 convert between 128-bit floating point types that have different
10794 modes but the same representation, instead of using gen_lowpart to
10796 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
10798 (IFKF_reg): New attributes to give the register constraints for
10800 (extend<mode>tf2_internal): New insns to mark an explicit
10801 conversion between 128-bit floating point types that have a
10802 different mode but share the same representation.
10804 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
10806 PR tree-optimization/85814
10807 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
10808 a null return from get_strinfo when unsharing the next
10809 strinfo in the chain.
10811 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
10814 * varasm.c (weak_finish): Clean up weak_decls.
10816 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10818 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
10819 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
10820 UNSPEC_UADALP values.
10821 * config/aarch64/iterators.md (ABAL): New int iterator.
10824 (sur): Add mappings for the above.
10825 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
10827 (aarch64_<sur>abal<mode>_4): Likewise.
10828 (aarch64_<sur>adalp<mode>_3): Likewise.
10829 (<sur>sadv16qi): New define_expand.
10831 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
10833 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
10834 (*movdf_internal): Ditto.
10835 (*rcpsf2_sse): Ditto.
10836 (*rsqrtsf2_sse): Ditto.
10837 (*sqrt<mode>2_sse): Ditto.
10839 2018-05-21 Tamar Christina <tamar.christina@arm.com>
10841 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
10843 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
10844 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
10845 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
10846 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
10848 * config/aarch64/arm_neon.h: Likewise.
10849 * config/aarch64/iterators.md (VQ_I): New.
10851 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
10853 * config.gcc: Add arc/t-multilib-linux to tmake_file for
10855 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
10858 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
10860 * config/nds32/constraints.md (S): New constraint.
10861 * config/nds32/nds32.md (call_internal): Use constraint S.
10862 (call_value_internal): Likewise.
10863 (sibcall_internal): Likewise.
10864 (sibcall_value_internal): Likewise.
10866 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
10867 Chung-Ju Wu <jasonwucj@gmail.com>
10869 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
10870 into consideration.
10872 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
10873 Chung-Ju Wu <jasonwucj@gmail.com>
10875 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
10876 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
10877 (nds32_rtx_costs_impl): Simplify.
10878 (nds32_address_cost_impl): Simplify.
10879 (nds32_init_rtx_costs): New function.
10880 (nds32_rtx_costs_speed_prefer): Likewise.
10881 (nds32_rtx_costs_size_prefer): Likewise.
10882 (nds32_address_cost_speed_prefer): Likewise.
10883 (nds32_address_cost_speed_fwprop): Likewise.
10884 (nds32_address_cost_size_prefer): Likewise.
10885 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
10886 * config/nds32/nds32.c (nds32_option_override): Use
10887 nds32_init_rtx_costs function.
10889 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
10891 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
10892 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
10893 (TARGET_PIPELINE_N8): Likewise.
10894 (TARGET_PIPELINE_N10): Likewise.
10895 (TARGET_PIPELINE_N13): Likewise.
10896 (TARGET_PIPELINE_GRAYWOLF): Likewise.
10898 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
10900 * config/nds32/nds32-fpu.md: Update copyright year.
10902 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10904 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
10906 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10908 * config/nds32/nds32.c
10909 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
10910 * config/nds32/nds32.opt (minline-asm-r15): New option.
10912 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10914 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
10916 * config/nds32/nds32.md (abssi2): New pattern.
10918 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
10920 * config/i386/i386.md (rex64namesuffix): New mode attribute.
10921 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
10922 Merge insn pattern from sse_cvtsi2ss<round_name> and
10923 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
10924 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
10925 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
10926 using SWI48 mode iterator.
10927 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
10928 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
10929 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
10930 pattern from sse_cvttss2si<round_saeonly_name>
10931 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
10932 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
10933 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
10934 using SWI48 mode iterator.
10935 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
10936 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
10937 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
10938 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
10939 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
10940 using SWI48 mode iterator.
10941 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
10942 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
10943 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
10944 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
10945 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
10946 SWI48 mode iterator.
10947 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
10948 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
10949 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
10950 pattern from sse_cvttsd2si<round_saeonly_name>
10951 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
10953 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10955 * config/nds32/nds32-md-auxiliary.c
10956 (nds32_valid_smw_lwm_base_p): Refine.
10957 (nds32_output_smw_single_word): Refine.
10958 (nds32_output_smw_double_word): New.
10959 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
10961 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10963 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
10964 (nds32_output_stack_pop): Refine.
10965 (nds32_expand_unaligned_load): Refine.
10966 (nds32_expand_unaligned_store): Refine.
10968 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
10969 Chung-Ju Wu <jasonwucj@gmail.com>
10971 * config/nds32/constants.md: Add TP_REGNUM constant.
10972 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
10973 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
10975 * config/nds32/nds32-doubleword.md: Consider flag_pic.
10976 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
10977 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
10978 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
10979 and PIC code generation.
10980 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
10982 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
10984 * config/nds32/nds32.md: Support TLS and PIC.
10985 * config/nds32/nds32.c: Support TLS and PIC.
10986 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
10987 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
10990 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10992 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
10993 mode with E_ prefix.
10995 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
10996 Chung-Ju Wu <jasonwucj@gmail.com>
10998 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
10999 * config/nds32/nds32-md-auxiliary.c
11000 (symbolic_reference_mentioned_p): New.
11001 (nds32_legitimize_ict_address): New.
11002 (nds32_expand_ict_move): New.
11003 (nds32_indirect_call_referenced_p): New.
11004 (nds32_symbol_binds_local_p): Delete.
11005 (nds32_long_call_p): Modify.
11006 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
11007 * config/nds32/nds32-protos.h
11008 (symbolic_reference_mentioned_p): Declare.
11009 (nds32_legitimize_ict_address): Declare.
11010 (nds32_expand_ict_move): Declare.
11011 (nds32_indirect_call_referenced_p): Declare.
11012 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
11013 (nds32_relax_group): Use nds32_ict_const_p as condition.
11014 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
11015 (nds32_asm_file_start): Output ict_model directive in asm code.
11016 (nds32_legitimate_address_p): Consider indirect call.
11017 (nds32_print_operand): Consider indirect call.
11018 (nds32_print_operand_address): Consider indirect call.
11019 (nds32_insert_attributes): Handle "indirect_call" attribute.
11020 (TARGET_LEGITIMATE_ADDRESS_P): Define.
11021 (TARGET_LEGITIMATE_CONSTANT_P): Define.
11022 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
11023 (TARGET_DELEGITIMIZE_ADDRESS): Define.
11024 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
11025 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
11026 (TARGET_ICT_MODEL_SMALL): Define.
11027 (TARGET_ICT_MODEL_LARGE): Define.
11028 * config/nds32/nds32.md (movsi): Consider ict model.
11029 (call, call_value): Consider ict model.
11030 (sibcall, sibcall_value): Consider ict model.
11031 * config/nds32/nds32.opt (mict-model): New option.
11032 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
11035 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
11036 Monk Chiang <sh.chiang04@gmail.com>
11037 Jim Wilson <jimw@sifive.com>
11039 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
11040 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
11041 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
11042 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
11043 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
11044 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
11045 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
11046 compute save_libcall_adjustment properly.
11047 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
11048 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
11049 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
11050 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
11051 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
11052 (ABI_SPEC): Handle mabi=ilp32e.
11053 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
11054 (RVE): Add RVE mask.
11055 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
11056 <-march>: Add rv32e as an example.
11058 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
11061 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
11062 (intra_create_variable_infos): Handle C++ constructors.
11064 2018-05-18 Martin Liska <mliska@suse.cz>
11066 * passes.def: Remove a redundant pass.
11068 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
11071 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
11073 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11075 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
11077 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
11079 (armv2, armv2a, armv3, armv3m): Delete architectures.
11080 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
11081 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
11082 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
11084 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
11085 (*mulsidi3adddi): Likewise.
11086 (mulsidi3): Likewise.
11087 (*mulsidi3_nov6): Likewise.
11088 (umulsidi3): Likewise.
11089 (umulsidi3_nov6): Likewise.
11090 (umaddsidi4): Likewise.
11091 (*umulsidi3adddi): Likewise.
11092 (smulsi3_highpart): Likewise.
11093 (*smulsi3_highpart_nov6): Likewise.
11094 (umulsi3_highpart): Likewise.
11095 (*umulsi3_highpart_nov6): Likewise.
11096 * config/arm/arm.h (arm_arch3m): Delete.
11097 * config/arm/arm.c (arm_arch3m): Delete.
11098 (arm_option_override_internal): Update armv3-related comment.
11099 (arm_configure_build_target): Delete use of isa_bit_mode32.
11100 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
11101 (arm_rtx_costs_internal): Delete check of arm_arch3m.
11102 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
11103 (mulsa3): Likewise.
11104 (mulusa3): Likewise.
11105 * config/arm/arm-protos.h (arm_arch3m): Delete.
11106 * config/arm/arm-tables.opt: Regenerate.
11107 * config/arm/arm-tune.md: Likewise.
11108 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
11109 deleted architectures.
11111 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11113 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
11114 (armv5t, armv5te): New features.
11115 (ARMv5, ARMv5e): Delete fgroups.
11116 (ARMv5t, ARMv5te): Adjust for above changes.
11117 (ARMv6m): Likewise.
11118 (armv5, armv5e): Delete arches.
11119 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
11121 (*call_reg_arm): Likewise.
11122 (*call_value_reg_armv5): Likewise.
11123 (*call_value_reg_arm): Likewise.
11124 (*call_symbol): Likewise.
11125 (*call_value_symbol): Likewise.
11126 (*sibcall_insn): Likewise.
11127 (*sibcall_value_insn): Likewise.
11128 (clzsi2): Likewise.
11129 (prefetch): Likewise.
11130 (define_split and define_peephole2 dependent on arm_arch5):
11132 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
11134 (TARGET_ARM_QBIT): Likewise.
11135 (TARGET_DSP_MULTIPLY): Likewise.
11136 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
11137 (arm_arch5, arm_arch5e): Delete.
11138 (arm_arch5t, arm_arch5te): Declare.
11139 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
11140 (arm_arch5t): Declare.
11141 (arm_option_reconfigure_globals): Update for the above.
11142 (arm_options_perform_arch_sanity_checks): Update comment, replace
11143 use of arm_arch5 with arm_arch5t.
11144 (use_return_insn): Likewise.
11145 (arm_emit_call_insn): Likewise.
11146 (output_return_instruction): Likewise.
11147 (arm_final_prescan_insn): Likewise.
11148 (arm_coproc_builtin_available): Likewise.
11149 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
11150 arm_arch5e with arm_arch5t and arm_arch5te.
11151 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
11152 (arm_arch5t, arm_arch5te): Declare.
11153 * config/arm/arm-tables.opt: Regenerate.
11154 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
11155 * config/arm/t-multilib: Likewise.
11156 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
11157 instead of arm_arch5.
11158 (*call_reg_thumb1): Likewise.
11159 (*call_value_reg_thumb1_v5): Likewise.
11160 (*call_value_reg_thumb1): Likewise.
11161 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
11163 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
11165 2018-05-18 Martin Liska <mliska@suse.cz>
11167 PR gcov-profile/84846
11168 * doc/gcov.texi: Document -t option of gcov tool.
11170 2018-05-18 Martin Liska <mliska@suse.cz>
11172 PR gcov-profile/84846
11173 * gcov.c (print_usage): Add new -t option.
11174 (process_args): Handle the option.
11175 (generate_results): Use stdout as output when requested by
11178 2018-05-18 Martin Liska <mliska@suse.cz>
11180 PR gcov-profile/84846
11181 * coverage.c (coverage_init): Write PWD to .gcno file.
11182 * doc/gcov.texi: Document how working directory is printed.
11183 * gcov-dump.c (dump_gcov_file): Print PWD.
11184 * gcov.c (output_intermediate_file): Likewise.
11185 (read_graph_file): Read PWD string.
11186 (output_lines): Print PWD.
11188 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11190 PR middle-end/85817
11191 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
11192 for retval and return false if all args to phi are zero.
11194 2018-05-18 Richard Biener <rguenther@suse.de>
11196 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
11198 (evrp_dom_walker::before_dom_children): Call it.
11200 2018-05-18 Richard Biener <rguenther@suse.de>
11202 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
11203 results when processing array refs with variable index.
11205 2018-05-18 Toon Moene <toon@moene.org>
11207 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
11208 directly after that of -floop-interchange. Indicate that both
11209 options are enabled by default when specifying -O3.
11211 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11213 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
11214 iterator. Delete separate integer-mode vec_set<mode> expander.
11215 (aarch64_simd_vec_setv2di): Delete.
11216 (vec_setv2di): Delete.
11217 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
11218 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
11219 the "w, r" alternative.
11221 2018-05-18 Martin Liska <mliska@suse.cz>
11223 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
11224 * tree-pass.h (make_pass_lower_switch_O0): New function.
11225 * tree-switch-conversion.c (node_has_low_bound): Remove.
11226 (node_has_high_bound): Likewise.
11227 (node_is_bounded): Likewise.
11228 (class pass_lower_switch): Make it a template type and create
11230 (pass_lower_switch::execute): Add template argument.
11231 (make_pass_lower_switch): New function.
11232 (make_pass_lower_switch_O0): New function.
11233 (do_jump_if_equal): Remove.
11234 (emit_case_nodes): Simplify to just handle all 3 cases and leave
11235 all the hard work to tree optimization passes.
11237 2018-05-18 Martin Liska <mliska@suse.cz>
11239 * dbgcnt.c (limit_low): Renamed from limit.
11240 (limit_high): New variable.
11241 (dbg_cnt_is_enabled): Check for upper limit.
11242 (dbg_cnt): Adjust dumping.
11243 (dbg_cnt_set_limit_by_index): Add new argument for high
11245 (dbg_cnt_set_limit_by_name): Likewise.
11246 (dbg_cnt_process_single_pair): Parse new format.
11247 (dbg_cnt_process_opt): Use strtok.
11248 (dbg_cnt_list_all_counters): Remove 'value' and add
11250 * doc/invoke.texi: Document changes.
11252 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
11254 * doc/sourcebuild.texi (scalar_all_fma): Document.
11255 * tree.def (FMA_EXPR): Delete.
11256 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
11257 * internal-fn.c (ternary_direct): New macro.
11258 (expand_ternary_optab_fn): Likewise.
11259 (direct_ternary_optab_supported_p): Likewise.
11260 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
11261 * builtins.c (fold_builtin_fma): Delete.
11262 (fold_builtin_3): Don't call it.
11263 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
11264 * expr.c (expand_expr_real_2): Likewise.
11265 * fold-const.c (operand_equal_p): Likewise.
11266 (fold_ternary_loc): Likewise.
11267 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
11268 * gimple.c (DEFTREECODE): Likewise.
11269 * gimplify.c (gimplify_expr): Likewise.
11270 * optabs-tree.c (optab_for_tree_code): Likewise.
11271 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
11272 * tree-eh.c (operation_could_trap_p): Likewise.
11273 (stmt_could_throw_1_p): Likewise.
11274 * tree-inline.c (estimate_operator_cost): Likewise.
11275 * tree-pretty-print.c (dump_generic_node): Likewise.
11276 (op_code_prio): Likewise.
11277 * tree-ssa-loop-im.c (stmt_cost): Likewise.
11278 * tree-ssa-operands.c (get_expr_operands): Likewise.
11279 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
11280 * fold-const-call.h (fold_fma): Delete.
11281 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
11282 CFN_FNMA and CFN_FNMS.
11283 (fold_fma): Delete.
11284 * genmatch.c (combined_fn): New enum.
11285 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
11286 (commutative_op): New function.
11287 (commutate): Use it. Handle more than 2 operands.
11288 (dt_operand::gen_gimple_expr): Use commutative_op.
11289 (parser::parse_expr): Allow :c to be used with non-binary
11290 operators if the commutative operand is known.
11291 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
11292 CFN_FMS, CFN_FNMA and CFN_FNMS.
11293 (backprop::process_assign_use): Remove FMA_EXPR handling.
11294 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
11295 (gen_hsa_fma): New function.
11296 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
11297 IFN_FNMA and IFN_FNMS.
11298 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
11299 * gimple-fold.h (follow_all_ssa_edges): Declare.
11300 * gimple-fold.c (follow_all_ssa_edges): New function.
11301 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
11302 gimple_build interface and use follow_all_ssa_edges to fold the result.
11303 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
11304 instead of checking for optabs directly.
11305 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
11306 rather than FMA_EXPRs.
11307 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
11308 call to IFN_FMA instead of an FMA_EXPR.
11310 2018-05-17 Jim Wilson <jimw@sifive.com>
11312 * expr.c (do_tablejump): When converting index to Pmode, if we have a
11313 sign extended promoted subreg, and the range does not have the sign bit
11314 set, then do a sign extend.
11316 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
11317 test, check for sign extended subreg and/or constant operands, and
11318 do a sign extend in that case.
11320 2018-05-17 Steve Ellcey <sellcey@cavium.com>
11322 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
11323 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
11325 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
11326 Change logics_shift_reg to logics_shift_imm.
11327 (thunderx2t99_fp_loadpair_basic): Delete.
11328 (thunderx2t99_fp_storepair_basic): Delete.
11329 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
11330 (thunderx2t99_asimd_polynomial): Delete.
11331 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
11332 and neon_fp_mul_d_scalar_q.
11333 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
11334 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
11335 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
11336 (thunderx2t99_asimd_lut): Add missing tbl types.
11337 (thunderx2t99_asimd_ext): Delete.
11338 (thunderx2t99_asimd_load1_1_mult): Delete.
11339 (thunderx2t99_asimd_load1_2_mult): Delete.
11340 (thunderx2t99_asimd_load1_ldp): New.
11341 (thunderx2t99_asimd_load1): New.
11342 (thunderx2t99_asimd_load2): Add missing *load2* types.
11343 (thunderx2t99_asimd_load3): New.
11344 (thunderx2t99_asimd_load4): New.
11345 (thunderx2t99_asimd_store1_1_mult): Delete.
11346 (thunderx2t99_asimd_store1_2_mult): Delete.
11347 (thunderx2t99_asimd_store2_mult): Delete.
11348 (thunderx2t99_asimd_store2_onelane): Delete.
11349 (thunderx2t99_asimd_store_stp): New.
11350 (thunderx2t99_asimd_store1): New.
11351 (thunderx2t99_asimd_store2): New.
11352 (thunderx2t99_asimd_store3): New.
11353 (thunderx2t99_asimd_store4): New.
11355 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
11357 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
11358 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
11360 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
11361 Segher Boessenkool <segher@kernel.crashing.org>
11364 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
11367 2018-05-17 Richard Biener <rguenther@suse.de>
11369 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
11370 for pruning loop and prune defs feeding only already visited PHIs.
11372 2018-05-17 Richard Biener <rguenther@suse.de>
11374 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
11376 2018-05-17 Bin Cheng <bin.cheng@arm.com>
11377 Richard Biener <rguenther@suse.de>
11379 PR tree-optimization/85793
11380 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
11381 for VMAT_ELEMENTWISE.
11383 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
11385 * internal-fn.h (lookup_internal_fn): Declare
11386 * internal-fn.c (lookup_internal_fn): New function.
11387 * gimple.c (gimple_build_call_from_tree): Handle calls to
11388 internal functions.
11389 * gimple-pretty-print.c (dump_gimple_call): Print "." before
11390 internal function names.
11391 * tree-pretty-print.c (dump_generic_node): Likewise.
11392 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
11394 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
11396 * gimple-fold.h (gimple_build): Make the function forms take
11397 combined_fn rather than built_in_function.
11398 (gimple_simplify): Likewise.
11399 * gimple-match-head.c (gimple_simplify): Likewise.
11400 * gimple-fold.c (gimple_build): Likewise.
11401 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
11402 rather than gimple_build_call_internal.
11403 (get_initial_defs_for_reduction): Likewise.
11404 (vect_create_epilog_for_reduction): Likewise.
11405 (vectorizable_live_operation): Likewise.
11407 2018-05-17 Martin Liska <mliska@suse.cz>
11409 * gimple-ssa-sprintf.c (format_directive): Do not use
11410 space in between 'G_' and '('.
11412 2018-05-17 Jakub Jelinek <jakub@redhat.com>
11415 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
11416 even if the mask is not all ones.
11419 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
11421 (ix86_gimple_fold_builtin): Likewise.
11424 * config/i386/i386.c: Include tree-vector-builder.h.
11425 (ix86_vector_shift_count): New function.
11426 (ix86_fold_builtin): Fold shift builtins by scalar count.
11427 (ix86_gimple_fold_builtin): Likewise.
11429 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
11430 _mm512_setzero): New intrinsics.
11432 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
11433 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11435 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
11436 code generation for cases where splatting a value is not useful.
11437 * simplify-rtx.c (simplify_ternary_operation): Simplify
11438 vec_merge across a vec_duplicate and a paradoxical subreg forming
11439 a vector mode to a vec_concat.
11441 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
11443 * config.gcc: Support "goldmont-plus".
11444 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
11446 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11447 PROCESSOR_GOLDMONT_PLUS.
11448 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
11449 (processor_target_table): Add "goldmont-plus".
11450 (PTA_GOLDMONT_PLUS): Define.
11451 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
11452 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
11453 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
11454 (fold_builtin_cpu): Add "goldmont-plus".
11455 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
11456 (ix86_option_override_internal): Add "goldmont-plus".
11457 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
11458 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
11459 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
11460 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
11462 2018-05-17 Richard Biener <rguenther@suse.de>
11464 PR tree-optimization/85757
11465 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
11466 remove defs that only feed that PHI from further processing.
11468 2018-05-16 Jim Wilson <jimw@sifive.com>
11470 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
11472 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
11474 2018-05-16 Mark Wielaard <mark@klomp.org>
11476 * dwarf2out.c (count_index_strings): New function.
11477 (output_indirect_strings): Call count_index_strings and generate
11478 header for dwarf_version >= 5.
11480 2018-05-16 Mark Wielaard <mark@klomp.org>
11482 * dwarf2out.c (dwarf_FORM): New function.
11483 (set_indirect_string): Use dwarf_FORM.
11484 (reset_indirect_string): Likewise.
11485 (size_of_die): Likewise.
11486 (value_format): Likewise.
11487 (output_die): Likewise.
11488 (add_skeleton_AT_string): Likewise.
11489 (output_macinfo_op): Likewise.
11490 (index_string): Likewise.
11491 (output_index_string_offset): Likewise.
11492 (output_index_string): Likewise.
11493 (count_index_strings): Likewise.
11495 2018-05-16 Carl Love <cel@us.ibm.com>
11497 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
11498 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
11500 2018-05-16 Martin Jambor <mjambor@suse.cz>
11502 * ipa-prop.c (ipa_free_all_edge_args): Remove.
11503 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
11505 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
11507 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
11508 (fnma<mode>4): Likewise.
11509 (fms<mode>4): Likewise.
11510 (fnms<mode>4): Likewise.
11511 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
11512 (aarch64_fnma<mode>4): Likewise.
11513 (aarch64_fms<mode>4): Likewise.
11514 (aarch64_fnms<mode>4): Likewise.
11515 (aarch64_fnmadd<mode>4): Likewise.
11517 2018-05-16 Jason Merrill <jason@redhat.com>
11519 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
11521 2018-05-16 Richard Biener <rguenther@suse.de>
11523 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
11524 (dump_stmt_cost): Declare.
11525 (add_stmt_cost): Dump cost we add.
11526 (add_stmt_costs): New function.
11527 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
11528 No longer exported.
11529 (vect_analyze_stmt): Adjust prototype.
11530 (vectorizable_condition): Likewise.
11531 (vectorizable_live_operation): Likewise.
11532 (vectorizable_reduction): Likewise.
11533 (vectorizable_induction): Likewise.
11534 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
11535 cost vector to pass to vectorizable_ and record afterwards.
11536 (vect_model_reduction_cost): Take cost vector argument and adjust.
11537 (vect_model_induction_cost): Likewise.
11538 (vectorizable_reduction): Likewise.
11539 (vectorizable_induction): Likewise.
11540 (vectorizable_live_operation): Likewise.
11541 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
11542 SLP_TREE_NUMBER_OF_VEC_STMTS.
11543 (vect_analyze_slp_cost_1): Remove.
11544 (vect_analyze_slp_cost): Likewise.
11545 (vect_slp_analyze_node_operations): Take visited args and
11546 a target cost vector. Avoid processing already visited stmt sets.
11547 (vect_slp_analyze_operations): Use a local cost vector to gather
11548 costs and register those of non-discarded instances.
11549 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
11550 (vect_schedule_slp_instance): Remove copying of
11551 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
11553 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
11554 adding cost. Record cost entry location.
11555 (vect_prologue_cost_for_slp_op): Function to compute cost of
11556 a constant or invariant generated for SLP vect in the prologue,
11557 split out from vect_analyze_slp_cost_1.
11558 (vect_model_simple_cost): Make static. Adjust for SLP costing.
11559 (vect_model_promotion_demotion_cost): Likewise.
11560 (vect_model_store_cost): Likewise, make static.
11561 (vect_model_load_cost): Likewise.
11562 (vectorizable_bswap): Add cost vector arg and adjust.
11563 (vectorizable_call): Likewise.
11564 (vectorizable_simd_clone_call): Likewise.
11565 (vectorizable_conversion): Likewise.
11566 (vectorizable_assignment): Likewise.
11567 (vectorizable_shift): Likewise.
11568 (vectorizable_operation): Likewise.
11569 (vectorizable_store): Likewise.
11570 (vectorizable_load): Likewise.
11571 (vectorizable_condition): Likewise.
11572 (vectorizable_comparison): Likewise.
11573 (can_vectorize_live_stmts): Likewise.
11574 (vect_analyze_stmt): Likewise.
11575 (vect_transform_stmt): Adjust calls to vectorizable_*.
11576 * tree-vectorizer.c: Include gimple-pretty-print.h.
11577 (dump_stmt_cost): New function.
11579 2018-05-16 Richard Biener <rguenther@suse.de>
11581 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
11582 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
11583 * tree-ssa-dse.c: Include tree-ssa-loop.h.
11584 (check_name): New callback.
11585 (dse_classify_store): Track cycles via a visited bitmap of PHI
11586 defs and simplify handling of in-loop and across loop dead stores
11587 and properly fail for loop-variant refs. Handle byte-tracking with
11588 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
11591 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
11593 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
11594 (vect_get_mask_type_for_stmt): Likewise.
11595 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
11597 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
11598 to determine the statement's vector type and the vector type that
11599 should be used for calculating nunits. Deal with cases in which
11600 the type has to be deferred.
11601 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
11602 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
11603 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
11604 (vect_determine_vf_for_stmt): New functions, split out from...
11605 (vect_determine_vectorization_factor): ...here.
11606 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
11607 (vect_get_mask_type_for_stmt): New functions, split out from
11608 vect_determine_vectorization_factor.
11610 2018-05-16 Richard Biener <rguenther@suse.de>
11612 * tree-cfg.c (verify_gimple_assign_ternary): Properly
11613 verify the [VEC_]COND_EXPR embedded comparison.
11615 2018-05-15 Martin Sebor <msebor@redhat.com>
11617 PR tree-optimization/85753
11618 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
11619 RECORD_TYPE in addition to ARRAY_TYPE.
11621 2018-05-15 Martin Sebor <msebor@redhat.com>
11623 PR middle-end/85643
11624 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
11626 2018-05-15 Richard Biener <rguenther@suse.de>
11628 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
11629 add by_clobber_p one. Change algorithm to collect all defs
11630 representing uses we need to walk and try reducing them to
11631 a single one before failing.
11632 (dse_dom_walker::dse_optimize_stmt): Adjust.
11634 2018-05-13 Mark Wielaard <mark@klomp.org>
11636 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
11637 (size_of_loc_descr): Likewise.
11638 (output_loc_operands): Likewise.
11639 (output_loc_operands_raw): Likewise.
11640 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
11641 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
11642 (hash_loc_operands): Likewise.
11643 (compare_loc_operands): Likewise.
11645 2018-05-14 Mark Wielaard <mark@klomp.org>
11647 * dwarf2out.c (count_index_addrs): New function.
11648 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
11650 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11652 PR tree-optimization/83648
11653 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
11654 return value as malloc candidate.
11656 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11659 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
11660 param as true in call to suggest_attribute.
11662 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
11664 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
11665 -mreadonly-in-sdata.
11667 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11669 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
11671 (aarch64_crypto_aesd_fused): Likewise.
11673 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
11675 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
11676 (movsi_aarch64): Likewise.
11677 (load_pairsi): Likewise.
11678 (load_pairdi): Likewise.
11679 (store_pairsi): Likewise.
11680 (store_pairdi): Likewise.
11681 (load_pairsf): Likewise.
11682 (load_pairdf): Likewise.
11683 (store_pairsf): Likewise.
11684 (store_pairdf): Likewise.
11685 (zero_extend): Likewise.
11686 (trunc): Swap alternatives.
11687 (fcvt_target): Add '?' to prefer w over r.
11689 2018-05-14 Jakub Jelinek <jakub@redhat.com>
11692 * config/i386/i386.md: Disallow non-commutative arithmetics in
11693 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
11694 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
11695 in the peephole2 before it.
11697 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
11699 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
11700 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
11701 (ix86_handle_option): Handle -mcldemote.
11702 * config.gcc: New header.
11703 * config/i386/cldemoteintrin.h: New file.
11704 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
11705 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
11707 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11708 OPTION_MASK_ISA_CLDEMOTE.
11709 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
11710 (ix86_valid_target_attribute_inner_p): Ditto.
11711 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
11712 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
11713 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
11714 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
11715 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
11717 * config/i386/i386.opt: Add -mcldemote.
11718 * config/i386/x86intrin.h: New header.
11719 * doc/invoke.texi: Add -mcldemote.
11721 2018-05-14 Richard Biener <rguenther@suse.de>
11723 * doc/match-and-simplify.texi: Adjust :s documentation.
11725 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
11727 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
11728 intended memcpy size.
11729 (REORDER_45): Likewise.
11731 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
11733 * sort.cc: New file.
11734 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
11735 * vec.c (qsort_chk): Use gcc_qsort.
11736 * Makefile.in (OBJS-libcommon): Add sort.o.
11737 (build/sort.o): New target. Use it...
11738 (BUILD_RTL): ... here, and...
11739 (build/gencfn-macros): ... here, and...
11740 (build/genmatch): ... here.
11742 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
11743 Chung-Ju Wu <jasonwucj@gmail.com>
11745 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
11746 * config/nds32/nds32-graywolf.md: New file.
11747 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
11748 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
11750 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
11751 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
11752 * config/nds32/nds32.md (pipeline_model): Add graywolf.
11753 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
11754 * config/nds32/pipelines.md: Include n15 settings.
11756 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
11757 Chung-Ju Wu <jasonwucj@gmail.com>
11759 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
11760 * config/nds32/nds32-n13.md: New file.
11761 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
11762 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
11764 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
11765 * config/nds32/nds32.md (pipeline_model): Add n13.
11766 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
11767 * config/nds32/pipelines.md: Include n13 settings.
11769 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
11770 Chung-Ju Wu <jasonwucj@gmail.com>
11772 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
11773 * config/nds32/nds32-n10.md: New file.
11774 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
11775 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
11777 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
11778 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
11779 * config/nds32/nds32.md (pipeline_model): Add n10.
11780 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
11781 * config/nds32/pipelines.md: Include n10 settings.
11783 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
11784 Kito Cheng <kito.cheng@gmail.com>
11785 Chung-Ju Wu <jasonwucj@gmail.com>
11787 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
11788 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11789 Add enum values for DSP extension instructions.
11790 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
11792 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
11793 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
11794 New code iterators.
11795 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
11796 * config/nds32/nds32-dspext.md: New file for DSP implementation.
11797 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
11798 * config/nds32/nds32-intrinsic.md: Likewise.
11799 * config/nds32/nds32_intrinsic.h: Likewise.
11800 * config/nds32/nds32-md-auxiliary.c: Likewise.
11801 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
11802 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
11803 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
11804 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
11805 * config/nds32/nds32-protos.h: New declarations for DSP extension.
11806 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
11807 TYPE_DMAC in switch statement.
11808 * config/nds32/nds32.c: New checking and implementation for DSP
11809 extension instructions.
11810 * config/nds32/nds32.h: Likewise.
11811 * config/nds32/nds32.md: Likewise.
11812 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
11813 * config/nds32/predicates.md: Implement new predicates for DSP
11816 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
11818 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
11819 Reformat alternatives and attributes so it is easier to identify
11820 which constraints/attributes go with which instruction.
11821 (mov<mode>_hardfloat32, FMOVE64): Likewise.
11822 (mov<mode>_softfloat32, FMOVE64): Likewise.
11823 (mov<mode>_hardfloat64, FMOVE64): Likewise.
11824 (mov<mode>_softfloat64, FMOVE64): Likewise.
11826 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
11828 * doc/extend.texi (PowerPC Built-in Functions): Rename this
11830 (Basic PowerPC Built-in Functions): The new name of the
11831 subsection previously known as "PowerPC Built-in Functions".
11832 (Basic PowerPC Built-in Functions Available on all Configurations):
11834 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
11835 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
11836 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
11837 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
11839 2018-05-11 Martin Jambor <mjambor@suse.cz>
11842 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
11845 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
11848 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
11850 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
11852 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
11853 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
11854 (ix86_handle_option): Handle -mwaitpkg.
11855 * config.gcc: New header.
11856 * config/i386/cpuid.h (bit_WAITPKG): New bit.
11857 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
11858 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
11860 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11861 OPTION_MASK_ISA_WAITPKG.
11862 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
11863 (ix86_option_override_internal): Add PTA_WAITPKG.
11864 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
11865 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
11866 IX86_BUILTIN_TPAUSE.
11867 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
11868 __builtin_ia32_umwait and __builtin_ia32_tpause.
11869 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
11870 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
11871 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
11872 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
11873 UNSPECV_TPAUSE): New.
11874 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
11875 * config/i386/i386.opt: Add -mwaitpkg.
11876 * config/i386/waitpkgintrin.h: New file.
11877 * config/i386/x86intrin.h: New header.
11878 * doc/invoke.texi: Add -mwaitpkg.
11880 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
11883 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
11885 (cortex-m0): Use armv6s-m isa.
11886 (cortex-m0plus): Likewise.
11887 (cortex-m1): Likewise.
11888 (cortex-m0.small-multiply): Likewise.
11889 (cortex-m0plus.small-multiply): Likewise.
11890 (cortex-m1.small-multiply): Likewise.
11892 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
11893 Jakub Jelinek <jakub@redhat.com>
11895 PR tree-optimization/85692
11896 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
11897 source permute as well.
11899 2018-05-11 Martin Liska <mliska@suse.cz>
11902 * doc/extend.texi: Document LLVM style format for no_sanitize
11905 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
11907 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
11908 mode_supports_vsx_dform_quad to mode_supports_dq_form.
11909 (mode_supports_vsx_dform_quad): Likewise.
11910 (mode_supports_vmx_dform): Move these functions to be next to the
11911 other mode_supports functions.
11912 (mode_supports_dq_form): Likewise.
11913 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
11914 mode_supports_dq_form.
11915 (reg_offset_addressing_ok_p): Likewise.
11916 (offsettable_ok_by_alignment): Likewise.
11917 (rs6000_legitimate_offset_address_p): Likewise.
11918 (legitimate_lo_sum_address_p): Likewise.
11919 (rs6000_legitimize_address): Likewise.
11920 (rs6000_legitimize_reload_address): Likewise.
11921 (rs6000_secondary_reload_inner): Likewise.
11922 (rs6000_preferred_reload_class): Likewise.
11923 (rs6000_output_move_128bit): Likewise.
11925 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
11927 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
11928 Generate SImode target register for null target.
11929 <case IX86_BUILTIN_XGETBV>: Ditto.
11930 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
11931 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
11933 2018-05-10 Carl Love <cel@us.ibm.com>
11935 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
11936 dcbtt and dcbtstt if operands[2] is 0.
11938 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
11941 * config/i386/sse.md (usadv64qi): New expander.
11943 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
11945 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
11946 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
11947 -maltivec=be support.
11948 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
11949 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
11950 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
11951 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
11952 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
11953 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
11954 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
11955 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
11956 altivec_vsumsws): Adjust.
11957 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
11958 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
11959 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
11961 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
11962 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
11963 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
11964 (altivec_lve<VI_char>x): Delete expand.
11965 (*altivec_lve<VI_char>x_internal): Rename to...
11966 (altivec_lve<VI_char>x): ... this.
11967 (altivec_lvxl_<mode>): Delete expand.
11968 (*altivec_lvxl_<mode>_internal): Rename to ...
11969 (altivec_lvxl_<mode>): ... this.
11970 (altivec_stvxl_<mode>): Delete expand.
11971 (*altivec_stvxl_<mode>_internal): Rename to ...
11972 (altivec_stvxl_<mode>): ... this.
11973 (altivec_stve<VI_char>x): Delete expand.
11974 (*altivec_stve<VI_char>x_internal): Rename to ...
11975 (altivec_stve<VI_char>x): ... this.
11976 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
11977 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
11978 reduc_plus_scal_<mode>): Adjust.
11979 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
11981 (rs6000_cpu_cpp_builtins): Adjust.
11982 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
11983 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
11984 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
11985 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
11986 -maltivec=be support.
11987 (rs6000_split_vec_extract_var): Adjust.
11988 (rs6000_split_v4si_init): Adjust.
11989 (swap_selector_for_mode): Delete.
11990 (altivec_expand_lvx_be, altivec_expand_stvx_be,
11991 altivec_expand_stvex_be): Delete.
11992 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
11993 -maltivec=be support.
11994 (rs6000_gimple_fold_builtin): Ditto.
11995 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
11997 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
11998 (TARGET_DIRECT_MOVE_64BIT): Adjust.
11999 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
12000 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
12001 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
12002 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
12003 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
12004 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
12005 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
12006 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
12007 anonymous split): Adjust.
12008 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
12009 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
12011 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
12013 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
12014 when --with-gxx-include-dir is also specified.
12015 * configure: Regenerate.
12017 2018-05-09 Jim Wilson <jimw@sifive.com>
12020 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
12021 * config/riscv/t-withmultilib: New.
12022 * config/riscv/withmultilib.h: New.
12023 * doc/install.texi: Document RISC-V --with-multilib-list support.
12025 2018-05-09 Richard Biener <rguenther@suse.de>
12027 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
12029 (vect_bb_vectorization_profitable_p): Adjust. Compute
12030 actual scalar cost using the cost vector and the add_stmt_cost
12033 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12035 PR rtl-optimization/85645
12036 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
12037 in the REG_CFA_REGISTER note for LR, don't leave it empty.
12039 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12041 PR rtl-optimization/85645
12042 * shrink-wrap.c (spread_components): Return a boolean saying if
12043 anything was changed.
12044 (try_shrink_wrapping_separate): Iterate spread_components until
12045 nothing changes anymore.
12047 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12049 PR rtl-optimization/85645
12050 * regrename.c (build_def_use): Also kill the chains that include the
12051 destination of a REG_CFA_REGISTER note.
12053 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12055 PR rtl-optimization/85645
12056 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
12057 insn that has a REG_CFA_REGISTER note.
12059 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
12061 * cfgexpand.c (expand_clobber): New function.
12062 (expand_gimple_stmt_1): Use it.
12063 * tree-vect-stmts.c (vect_clobber_variable): New function,
12065 (vectorizable_simd_clone_call): ...here.
12066 (vectorizable_store): Emit a clobber either side of an
12067 IFN_STORE_LANES sequence.
12068 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
12070 2018-05-09 Tom de Vries <tom@codesourcery.com>
12073 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
12074 (define_insn "trap_if_false"): Add exit after trap.
12076 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
12078 PR rtl-optimization/85638
12079 * bb-reorder.c: Include common/common-target.h.
12080 (create_forwarder_block): New function extracted from...
12081 (fix_up_crossing_landing_pad): ...here. Rename into...
12082 (dw2_fix_up_crossing_landing_pad): ...this.
12083 (sjlj_fix_up_crossing_landing_pad): New function.
12084 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
12085 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
12086 from both partitions and exit the loop after one iteration.
12088 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
12091 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12093 (Basic PowerPC Built-in Functions): The new name of the
12094 subsection previously known as "PowerPC Built-in Functions".
12095 (Basic PowerPC Built-in Functions Available on all Configurations):
12097 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
12099 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
12101 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
12103 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
12106 2018-05-08 Jim Wilson <jimw@sifive.com>
12108 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
12109 (LD_EMUL_SUFFIX): New.
12110 (LINK_SPEC): Use it.
12112 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
12114 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12116 (Basic PowerPC Built-in Functions): The new name of the
12117 subsection previously known as "PowerPC Built-in Functions".
12118 (Basic PowerPC Built-in Functions Available on all Configurations):
12120 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
12122 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
12124 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
12126 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
12129 2018-05-08 Jakub Jelinek <jakub@redhat.com>
12132 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
12133 after cmpelim optimization.
12135 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
12137 * config.gcc: Support "goldmont".
12138 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
12139 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12140 PROCESSOR_GOLDMONT.
12141 * config/i386/i386.c (m_GOLDMONT): Define.
12142 (processor_target_table): Add "goldmont".
12143 (PTA_GOLDMONT): Define.
12144 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
12145 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
12146 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
12147 (fold_builtin_cpu): Add "goldmont".
12148 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
12149 (ix86_option_override_internal): Add "goldmont".
12150 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
12151 (processor_type): Add PROCESSOR_GOLDMONT.
12152 * config/i386/i386.md: Add CPU "glm".
12153 * config/i386/glm.md: New file.
12154 * config/i386/x86-tune.def: Add m_GOLDMONT.
12155 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
12157 2018-05-08 Jakub Jelinek <jakub@redhat.com>
12160 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
12162 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
12163 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
12164 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
12167 * config/i386/i386.c (ix86_fold_builtin): Handle
12168 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
12171 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
12172 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
12174 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
12177 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
12178 (check_arch): Likewise.
12179 (check_fpu): Return the result rather than printing it.
12180 (end arch): Fix operator precedence.
12181 (end cpu): Likewise.
12182 (END): Print the result from check_fpu.
12184 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
12185 Alan Hayward <alan.hayward@arm.com>
12186 David Sherwood <david.sherwood@arm.com>
12188 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
12189 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
12190 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
12191 (*fcmuo<mode>_and): New patterns.
12193 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
12195 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
12196 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
12197 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
12198 (cmp_op, sve_imm_con): New code attributes.
12199 (SVE_COND_INT_CMP, imm_con): Delete.
12200 (cmp_op): Remove above unspecs from int attribute.
12201 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
12203 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
12204 comparison-specific unspecs.
12205 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
12206 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
12207 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
12208 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
12209 (*vec_fcm<cmp_op><mode>): Rename to...
12210 (*fcm<cmp_op><mode>): ...this and adjust likewise.
12211 (*vec_fcmuo<mode>): Rename to...
12212 (*fcmuo<mode>): ...this and adjust likewise.
12213 (*pred_fcm<cmp_op><mode>): New pattern.
12214 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
12215 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
12217 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
12219 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
12220 (aarch64_emit_sve_predicated_cond): New function.
12221 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
12222 (aarch64_emit_unspec_cond_or): Replace with...
12223 (aarch64_emit_sve_or_conds): ...this new function. Use
12224 aarch64_emit_sve_ptrue_op for the individual comparisons and
12225 aarch64_emit_binop to OR them together.
12226 (aarch64_emit_inverted_unspec_cond): Replace with...
12227 (aarch64_emit_sve_inverted_cond): ...this new function. Use
12228 aarch64_emit_sve_ptrue_op for the comparison and
12229 aarch64_emit_unop to invert the result.
12230 (aarch64_expand_sve_vec_cmp_float): Update after the above
12231 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
12233 2018-05-07 Nathan Sidwell <nathan@acm.org>
12235 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
12236 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
12237 (Backwards Compatibility): Likewise.
12239 2018-05-07 Luis Machado <luis.machado@linaro.org>
12243 2018-05-07 Luis Machado <luis.machado@linaro.org>
12245 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12246 <prefetch_dynamic_strides>: New const bool field.
12247 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12248 prefetch_dynamic_strides.
12249 (exynosm1_prefetch_tune): Likewise.
12250 (thunderxt88_prefetch_tune): Likewise.
12251 (thunderx_prefetch_tune): Likewise.
12252 (thunderx2t99_prefetch_tune): Likewise.
12253 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
12255 (aarch64_override_options_internal): Update to set
12256 PARAM_PREFETCH_DYNAMIC_STRIDES.
12257 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12258 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12259 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12260 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12261 prefetch-dynamic-strides setting.
12263 2018-05-07 Luis Machado <luis.machado@linaro.org>
12265 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12266 <minimum_stride>: New const int field.
12267 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12268 minimum_stride field.
12269 (exynosm1_prefetch_tune): Likewise.
12270 (thunderxt88_prefetch_tune): Likewise.
12271 (thunderx_prefetch_tune): Likewise.
12272 (thunderx2t99_prefetch_tune): Likewise.
12273 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
12274 (aarch64_override_options_internal): Update to set
12275 PARAM_PREFETCH_MINIMUM_STRIDE.
12276 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12277 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12278 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12279 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12280 stride is constant and is below the minimum stride threshold.
12282 2018-05-07 Luis Machado <luis.machado@linaro.org>
12284 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
12287 2018-05-07 Luis Machado <luis.machado@linaro.org>
12289 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12290 <prefetch_dynamic_strides>: New const bool field.
12291 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12292 prefetch_dynamic_strides.
12293 (exynosm1_prefetch_tune): Likewise.
12294 (thunderxt88_prefetch_tune): Likewise.
12295 (thunderx_prefetch_tune): Likewise.
12296 (thunderx2t99_prefetch_tune): Likewise.
12297 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
12299 (aarch64_override_options_internal): Update to set
12300 PARAM_PREFETCH_DYNAMIC_STRIDES.
12301 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12302 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12303 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12304 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12305 prefetch-dynamic-strides setting.
12307 2018-05-07 Luis Machado <luis.machado@linaro.org>
12309 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12310 <minimum_stride>: New const int field.
12311 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12312 minimum_stride field.
12313 (exynosm1_prefetch_tune): Likewise.
12314 (thunderxt88_prefetch_tune): Likewise.
12315 (thunderx_prefetch_tune): Likewise.
12316 (thunderx2t99_prefetch_tune): Likewise.
12317 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
12318 (aarch64_override_options_internal): Update to set
12319 PARAM_PREFETCH_MINIMUM_STRIDE.
12320 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12321 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12322 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12323 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12324 stride is constant and is below the minimum stride threshold.
12326 2018-05-06 Jakub Jelinek <jakub@redhat.com>
12329 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
12330 the type is addressable. Don't force op into register if it has
12333 2018-05-05 Roland McGrath <mcgrathr@google.com>
12336 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
12337 any section for which we don't know a specific type it should have,
12338 regardless of name. Previously this was done only for the exact
12339 names ".init_array", ".fini_array", and ".preinit_array".
12340 (default_elf_asm_named_section): Add comment about
12341 relationship with default_section_type_flags and SECTION_NOTYPE.
12342 (get_section): Don't consider it a type conflict if one side has
12343 SECTION_NOTYPE and the other doesn't, as long as neither has the
12344 SECTION_BSS et al used in the default_section_type_flags logic.
12346 2018-05-05 Tom de Vries <tom@codesourcery.com>
12349 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
12350 (workaround_barsyncs): New function.
12351 (nvptx_reorg): Use workaround_barsyncs.
12352 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
12353 (define_expand "nvptx_membar_cta"): New define_expand.
12354 (define_insn "*nvptx_membar_cta"): New insn.
12356 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
12358 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
12359 To improve optimization opportunities.
12360 * builtin-types.def: The new needed builtin types for the above.
12362 2018-05-04 Richard Biener <rguenther@suse.de>
12364 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
12365 * gimple-ssa-store-merging.c
12366 (imm_store_chain_info::output_merged_store): Remove redundant create,
12367 release split_store vector contents on failure.
12368 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
12369 scalar stmt vector on cache hit.
12371 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
12373 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
12375 * config.gcc (powerpc-xilinx-eabi*): Remove.
12376 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
12378 (fusion_addis_mem_combo_load): Ditto.
12379 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
12381 (rs6000_cpu_cpp_builtins): Ditto.
12382 * config/rs6000/rs6000-linux.c
12383 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
12384 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
12385 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
12387 (rs6000_setup_reg_addr_masks): Ditto.
12388 (rs6000_init_hard_regno_mode_ok): Ditto.
12389 (rs6000_option_override_internal): Ditto.
12390 (legitimate_lo_sum_address_p): Ditto.
12391 (rs6000_legitimize_address): Ditto.
12392 (rs6000_legitimize_reload_address): Ditto.
12393 (rs6000_legitimate_address_p): Ditto.
12394 (abi_v4_pass_in_fpr): Ditto.
12395 (setup_incoming_varargs): Ditto.
12396 (rs6000_gimplify_va_arg): Ditto.
12397 (rs6000_split_multireg_move): Ditto.
12398 (rs6000_savres_strategy): Ditto.
12399 (rs6000_emit_prologue_components): Ditto.
12400 (rs6000_emit_epilogue_components): Ditto.
12401 (rs6000_emit_prologue): Ditto.
12402 (rs6000_emit_epilogue): Ditto.
12403 (rs6000_elf_file_end): Ditto.
12404 (rs6000_function_value): Ditto.
12405 (rs6000_libcall_value): Ditto.
12406 * config/rs6000/rs6000.h: Ditto.
12407 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
12408 (TARGET_MINMAX): ... this. New.
12409 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
12410 * config/rs6000/rs6000.md: Remove Xilinx FP support.
12411 (*movsi_internal1_single): Delete.
12412 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
12413 mfpu=, mxilinx-fpu): Delete.
12414 * config/rs6000/singlefp.h: Delete.
12415 * config/rs6000/sysv4.h: Remove Xilinx FP support.
12416 * config/rs6000/t-rs6000: Ditto.
12417 * config/rs6000/t-xilinx: Delete.
12418 * config/rs6000/titan.md: Adjust for fp_type removal.
12419 * config/rs6000/vsx.md: Remove Xilinx FP support.
12420 (VStype_simple): Delete.
12421 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
12422 * config/rs6000/xfpu.h: Delete.
12423 * config/rs6000/xfpu.md: Delete.
12424 * config/rs6000/xilinx.h: Delete.
12425 * config/rs6000/xilinx.opt: Delete.
12426 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
12427 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
12429 2018-05-04 Tom de Vries <tom@codesourcery.com>
12432 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
12435 2018-05-04 Richard Biener <rguenther@suse.de>
12437 PR middle-end/85627
12438 * tree-complex.c (update_complex_assignment): We are always in SSA form.
12439 (expand_complex_div_wide): Likewise.
12440 (expand_complex_operations_1): Likewise.
12441 (expand_complex_libcall): Preserve EH info of the original stmt.
12442 (tree_lower_complex): Handle removed blocks.
12443 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
12444 on complex multiplication and division libcall builtins.
12446 2018-05-04 Richard Biener <rguenther@suse.de>
12448 PR middle-end/85574
12449 * fold-const.c (negate_expr_p): Restrict negation of operand
12450 zero of a division to when we know that can happen without
12452 (fold_negate_expr_1): Likewise.
12454 2018-05-04 Jakub Jelinek <jakub@redhat.com>
12457 * real.h (real_nextafter): Declare.
12458 * real.c (real_nextafter): New function.
12459 * fold-const-call.c (fold_const_nextafter): New function.
12460 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
12461 CASE_CFN_NEXTTOWARD.
12462 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
12463 even when arg1_mode is different from arg0_mode.
12465 2018-05-03 Nathan Sidwell <nathan@acm.org>
12467 * doc/extend.texi (Deprecated Features): Remove
12468 -ffriend-injection.
12469 (Backwards Compatibility): Likewise.
12470 * doc/invoke.texi (C++ Language Options): Likewise.
12471 (C++ Dialect Options): Likewise.
12473 2018-05-03 Jakub Jelinek <jakub@redhat.com>
12476 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
12477 _mm512_mask_mullox_epi64): New intrinsics.
12479 2018-05-03 Tom de Vries <tom@codesourcery.com>
12482 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12483 dump files): Add offload-tree.
12485 2018-05-03 Richard Biener <rguenther@suse.de>
12487 PR tree-optimization/85615
12488 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
12489 to loops not nested in BBs loop father to avoid creating multi-entry
12492 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12494 PR tree-optimization/70291
12495 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
12496 arguments. Change return type to tree. Emit libcall as a new
12497 statement rather than replacing existing one when inplace_p is true.
12498 (expand_complex_multiplication_components): New function.
12499 (expand_complex_multiplication): Expand floating-point complex
12500 multiplication using the above.
12501 (expand_complex_division): Rename inner_type parameter to type.
12502 Update expand_complex_libcall call-site.
12503 (expand_complex_operations_1): Update expand_complex_multiplication
12504 and expand_complex_division call-sites.
12506 2018-05-02 Jakub Jelinek <jakub@redhat.com>
12509 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
12510 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
12511 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
12512 the highest significant bit of the shift count mask is clear. In
12513 check whether and[sq]i3 is needed verify that all significant bits
12514 of the shift count other than the highest are set.
12516 2018-05-02 Tom de Vries <tom@codesourcery.com>
12519 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
12520 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
12521 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
12522 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
12523 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
12524 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
12525 __builtin_goacc_parlevel_size.
12527 2018-05-02 Richard Biener <rguenther@suse.de>
12529 PR tree-optimization/85597
12530 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
12531 do not use split vect_get_vec_defs call but call vect_get_slp_defs
12534 2018-05-02 Tom de Vries <tom@codesourcery.com>
12537 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12538 dump files): Add ltrans-tree.
12540 2018-05-02 Tom de Vries <tom@codesourcery.com>
12543 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12544 dump files): Add wpa-ipa.
12546 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
12548 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
12549 powerpc*-*-linux*paired* target.
12550 * config/rs6000/750cl.h: Delete.
12551 * config/rs6000/paired.h: Delete.
12552 * config/rs6000/paired.md: Delete.
12553 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
12555 * config/rs6000/rs6000-builtin.def: Remove paired float support.
12556 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
12557 comment. Remove paired float support.
12558 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
12559 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
12561 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
12562 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
12564 * config/rs6000/rs6000.c: Remove paired float support.
12565 (paired_expand_vector_init, paired_expand_vector_move,
12566 paired_emit_vector_compare, paired_emit_vector_cond_expr,
12567 (paired_expand_lv_builtin, paired_expand_stv_builtin,
12568 paired_expand_builtin, paired_expand_predicate_builtin,
12569 paired_init_builtins): Delete.
12570 * config/rs6000/rs6000.h: Remove paired float support.
12571 * config/rs6000/rs6000.md: Remove paired float support.
12572 (move_from_CR_ov_bit): Delete.
12573 * config/rs6000/rs6000.opt (mpaired): Delete.
12574 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
12575 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
12577 2018-05-02 Richard Biener <rguenther@suse.de>
12579 PR middle-end/85567
12580 * gimplify.c (gimplify_save_expr): When in SSA form allow
12581 SAVE_EXPRs to compute to SSA vars.
12583 2018-05-02 Jakub Jelinek <jakub@redhat.com>
12586 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
12587 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
12588 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
12589 clobber operands[2], instead use a new pseudo. Formatting fixes.
12591 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
12593 PR tree-optimization/85586
12594 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
12595 exit early for statements in the same group if the accesses are
12598 2018-05-02 Tom de Vries <tom@codesourcery.com>
12601 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
12604 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
12606 PR tree-optimization/85143
12607 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
12609 2018-05-01 Tom de Vries <tom@codesourcery.com>
12612 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
12613 not found" error message.
12615 2018-05-01 Tom de Vries <tom@codesourcery.com>
12618 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
12619 * vec.c (test_ordered_remove_if): New function.
12620 (vec_c_tests): Call test_ordered_remove_if.
12621 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
12622 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
12623 * tree-vect-patterns.c (vect_pattern_recog_1): Use
12624 VEC_ORDERED_REMOVE_IF.
12626 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12628 PR tree-optimization/82665
12629 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
12630 pointer subtraction where arguments come from a memchr call.
12632 2018-05-01 Jakub Jelinek <jakub@redhat.com>
12634 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
12635 --push-state --as-needed and --pop-state instead of --as-needed and
12636 --no-as-needed if ld supports it.
12637 * configure: Regenerated.
12640 * doc/install.texi2html: Replace _002d with - and _002a with * in
12641 generated html files using sed.
12643 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12646 * gcc-rich-location.c (blank_line_before_p): New function.
12647 (use_new_line): New function.
12648 (gcc_rich_location::add_fixit_insert_formatted): New function.
12649 * gcc-rich-location.h
12650 (gcc_rich_location::add_fixit_insert_formatted): New function.
12652 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12654 * selftest.c (assert_streq): Rename "expected" and "actual" to
12655 "val1" and "val2". Extend NULL-handling to cover both inputs
12656 symmetrically, while still requiring both to be non-NULL for a pass.
12657 * selftest.h (assert_streq): Rename "expected" and "actual" to
12659 (ASSERT_EQ): Likewise.
12660 (ASSERT_EQ_AT): Likewise.
12661 (ASSERT_KNOWN_EQ): Likewise.
12662 (ASSERT_KNOWN_EQ_AT): Likewise.
12663 (ASSERT_NE): Likewise.
12664 (ASSERT_MAYBE_NE): Likewise.
12665 (ASSERT_MAYBE_NE_AT): Likewise.
12666 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
12667 the assertion to pass.
12668 (ASSERT_STREQ_AT): Likewise.
12670 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
12672 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
12673 interaction with -pie.
12675 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12677 * selftest.h: Fix alphabetization of per-source-file selftest
12680 2018-04-30 Jason Merrill <jason@redhat.com>
12682 PR c++/61982 - dead stores to destroyed objects.
12683 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
12686 2018-04-30 Jason Merrill <jason@redhat.com>
12688 * tree.c (build_clobber): New.
12689 * tree.h: Declare it.
12690 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
12692 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12694 * diagnostic-show-locus.c (layout::layout): Update for
12695 location_get_source_line returning a char_span.
12696 (struct char_span): Move to input.h.
12697 (struct correction): Update for fields in char_span becoming
12699 (struct source_line): Update for location_get_source_line
12700 returning a char_span.
12701 (layout::print_line): Likewise.
12702 * edit-context.c (edited_file::print_content): Likewise.
12703 (edited_file::print_diff_hunk): Likewise.
12704 (edited_file::print_run_of_changed_lines): Likewise.
12705 (edited_file::get_num_lines): Likewise.
12706 (edited_line::edited_line): Likewise.
12707 * final.c (asm_show_source): Likewise.
12708 * input.c (location_get_source_line): Convert return type
12709 from const char * to char_span, losing the final "line_len"
12711 (dump_location_info): Update for the above.
12712 (get_substring_ranges_for_loc): Likewise. Use a char_span
12713 when handling the literal within the line.
12714 (test_reading_source_line): Update for location_get_source_line
12715 returning a char_span.
12716 * input.h (class char_span): Move here from
12717 diagnostic-show-locus.c, converting from a struct to a class.
12718 Make data members private.
12719 (char_span::operator bool): New.
12720 (char_span::length): New.
12721 (char_span::get_buffer): New.
12722 (char_span::operator[]): New.
12723 (char_span::subspan): Make const.
12724 (char_span::xstrdup): New.
12725 (location_get_source_line): Convert return type from const char *
12726 to char_span, losing the final "line_size" param.
12728 2018-04-30 Jan Hubicka <jh@suse.cz>
12730 * lto-wrapper.c (ltrans_priorities): New static var.
12731 (cmp_priority): New.
12732 (run_gcc): Read priorities and if doing parallel build order
12733 the Makefile by them.
12735 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12737 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
12739 2018-04-30 Richard Biener <rguenther@suse.de>
12741 * tree-cfg.c (verify_address): Remove base argument, add
12742 flag whether to check TREE_ADDRESSABLE and do that.
12743 (verify_expr): Remove.
12744 (verify_types_in_gimple_reference): Add pieces from verify_expr.
12745 (verify_gimple_assign_single): Likewise.
12746 (verify_gimple_switch): Likewise.
12747 (verify_expr_location_1): Dereference tp once. Add (disabled)
12748 piece from verify_expr.
12749 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
12751 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
12753 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
12755 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
12757 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
12758 (small_data_pattern): Likewise.
12759 (arc_rewrite_small_data): Likewise.
12760 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
12761 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
12762 (get_symbol_alignment): New function.
12763 (legitimate_small_data_address_p): Likewise.
12764 (legitimate_scaled_address): Update, call
12765 legitimate_small_data_address_p.
12766 (output_sdata): New static variable.
12767 (arc_print_operand): Update how we handle small data operands.
12768 (arc_print_operand_address): Likewise.
12769 (arc_legitimate_address_p): Update, use
12770 legitimate_small_data_address_p.
12771 (arc_rewrite_small_data_p): Remove.
12772 (arc_rewrite_small_data_1): Likewise.
12773 (arc_rewrite_small_data): Likewise.
12774 (small_data_pattern): Likewise.
12775 (compact_sda_memory_operand): Update to use
12776 legitimate_small_data_address_p and get_symbol_alignment.
12777 (prepare_move_operands): Don't rewite sdata pattern.
12778 (prepare_extend_operands): Remove.
12779 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
12781 (zero_extendqisi2): Likewise.
12782 (zero_extendhisi2): Likewise.
12783 (extendqihi2): Likewise.
12784 (extendqisi2): Likewise.
12785 (extendhisi2): Likewise.
12786 (addsi3): Likewise.
12787 (subsi3): Likewise.
12788 (andsi3): Likewise.
12789 * config/arc/constraints.md (Usd): Change it to memory constraint.
12791 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
12793 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
12794 as source of std instructions.
12795 * config/arc/arc.md (movsi_insn): Update pattern predicate to
12796 allow 6-bit constants as source for store instructions.
12797 (movdi_insn): Update instruction pattern to allow 6-bit constants
12798 as source for store instructions.
12800 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
12802 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
12804 2018-04-30 Nathan Sidwell <nathan@acm.org>
12805 Sandra Loosemore <sandra@codesourcery.com>
12807 * dumpfile.c (dump_open): Allow '-' for stdout.
12808 * doc/invoke.texi (Developer Options): Document dump filename
12809 determination early. Document stdin/stdout selection.
12811 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
12813 Microblaze Target: PIC data text relative
12815 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
12816 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
12818 * config/microblaze/microblaze.h (microblaze_constant_address_p):
12819 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
12820 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
12821 New addressing mode for data-text relative position indepenedent code.
12822 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
12823 'ADDRESS_SYMBOLIC_TXT_REL'.
12824 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
12825 (microblaze_legitimate_pic_operand): Exclude function calls from
12826 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
12827 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
12829 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
12830 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
12831 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
12832 for 'address + offset'.
12833 (microblaze_expand_prologue): Add new function prologue call for
12835 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
12836 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
12837 table in case of TARGET_PIC_DATA_TEXT_REL.
12838 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
12839 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
12840 Add new macros 'UNSPEC_TEXT',
12841 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
12842 + exclude function calls from 'UNSPEC_PLT' in case of data text
12844 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
12845 new target hook for generating address diff vector tables in case of
12847 * doc/tm.texi : Regenerate.
12848 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
12849 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
12850 of addr diff vector generation.
12851 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
12852 target hook definition.
12853 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
12854 Add default function for generate_pic_addr_diff_vec -> flag_pic.
12855 * doc/invoke.texi (Add new pic option): Add new microblaze pic
12856 option for data text relative.
12858 2018-04-30 Richard Biener <rguenther@suse.de>
12860 * tree-chrec.h (evolution_function_is_constant_p): Remove
12862 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
12864 2018-04-30 Richard Biener <rguenther@suse.de>
12867 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
12869 2018-04-30 Richard Biener <rguenther@suse.de>
12871 PR tree-optimization/28364
12872 PR tree-optimization/85275
12873 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
12874 copying first exit test.
12876 2018-04-28 Mark Wielaard <mark@klomp.org>
12878 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
12879 dwarf_version >= 5.
12880 (dwarf_AT): Handle DW_AT_addr_base.
12881 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
12883 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
12886 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
12887 (*ashl<dwi>3_doubleword_mask_1): Ditto.
12888 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
12889 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
12891 2018-04-28 Richard Biener <rguenther@suse.de>
12893 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
12894 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
12895 to reflect use. Only add interesting stmts.
12897 2018-04-27 Martin Jambor <mjambor@suse.cz>
12900 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
12901 the jump function allows for passing through aggregate values.
12903 2018-04-27 David Malcolm <dmalcolm@redhat.com>
12905 * input.h (in_system_header_at): Convert from macro to inline
12907 (from_macro_expansion_at): Likewise.
12908 (from_macro_definition_at): Likewise.
12910 2018-04-27 Jeff Law <law@redhat.com>
12912 * config.gcc: Mark tile* targets as deprecated/obsolete.
12914 2018-04-27 Richard Biener <rguenther@suse.de>
12916 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
12919 2018-04-27 Richard Biener <rguenther@suse.de>
12921 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
12923 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
12925 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
12926 with Yd constraint. Set "preferred_for_speed" attribute from
12927 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
12928 with Yd constraint.
12929 (*movdi_internal): Ditto.
12930 (movti_interunit splitters): Remove
12931 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
12932 (movdi_interunit splitters): Ditto.
12933 * config/i386/constraints.md (Ye): Remove.
12934 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
12936 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12939 * config/aarch64/constraints.md (Usg): Limit to 31.
12940 (Usj): Limit to 63.
12942 2018-04-27 Jakub Jelinek <jakub@redhat.com>
12944 PR tree-optimization/85529
12945 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
12946 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
12947 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
12948 zero extension or masking of the MSB bit.
12949 (optimize_range_tests): Add FIRST_BB argument, pass it through
12950 to optimize_range_tests_var_bound.
12951 (maybe_optimize_range_tests, reassociate_bb): Adjust
12952 optimize_range_tests callers.
12954 2018-04-26 Richard Biener <rguenther@suse.de>
12955 Jakub Jelinek <jakub@redhat.com>
12957 * cgraph.h (symbol_table): Just declare debug method here.
12958 * symtab.c (symbol_table::debug): Define.
12960 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
12962 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
12964 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
12966 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
12967 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
12968 (*movdi_internal): Substitute Yi and Yj constraint with x
12969 and Ym and Yn constraint with y constraint. Update "isa"
12970 attribute and set "preferred_for_speed" attribute from
12971 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
12972 (*movsi_internal): Ditto.
12973 (*movdf_internal): Ditto.
12974 (*movsf_internal): Ditto.
12975 (*zero_extendsidi2): Ditto.
12976 * config/i386/sse.md (vec_set<mode>_0): Ditto.
12977 (sse2_loadld): Ditto.
12978 (*vec_extract<ssevecmodelower>_0): Ditto.
12979 (*vec_extractv4si_0_zext_sse4): Ditto.
12980 (vec_concatv2di): Ditto.
12981 (*vec_dup<mode>): Ditto.
12982 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
12983 * config/i386/constraints.md (Yi): Remove.
12988 2018-04-26 Nathan Sidwell <nathan@acm.org>
12990 * dumpfile.c (dump_open): New.
12991 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
12992 (dump_finish): Detect stdio/stderr by value not name.
12994 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
12996 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
12998 2018-04-26 Tom de Vries <tom@codesourcery.com>
13001 * config/nvptx/nvptx.c (verify_neutering_jumps)
13002 (verify_neutering_labels): New function
13003 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
13005 2018-04-26 Tom de Vries <tom@codesourcery.com>
13008 * config/nvptx/nvptx.c (needs_neutering_p): New function.
13009 (nvptx_single): Use needs_neutering_p to skip over insns that do not
13012 2018-04-26 Richard Biener <rguenther@suse.de>
13013 Tom de Vries <tom@codesourcery.com>
13016 * lto-streamer-out.c (output_function): Fixup loops if required to match
13017 discovery done in the reader.
13019 2018-04-26 Richard Biener <rguenther@suse.de>
13021 PR tree-optimization/85116
13022 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
13023 have a loop exit from the single latch predecessor. Remove
13024 case of header with just condition.
13025 (ch_base::copy_headers): Exclude infinite loops from any
13027 (pass_ch::execute): Record exits.
13029 2018-04-26 Richard Biener <rguenther@suse.de>
13031 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
13032 prologue cost vector and pass it to vect_get_load_cost.
13033 (vect_get_peeling_costs_all_drs): Likewise.
13034 (vect_peeling_hash_get_lowest_cost): Likewise.
13035 (vect_enhance_data_refs_alignment): Likewise.
13037 2018-04-26 Richard Biener <rguenther@suse.de>
13039 PR middle-end/85450
13040 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
13041 checking of integer<->pointer conversions.
13042 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
13043 sign-/zero-extending pointer types.
13044 (expand_omp_for_static_chunk): Likewise.
13046 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
13047 Jean Lee <xiaoyur347@gmail.com>
13049 * config/mips/mips.c (mips_asan_shadow_offset): New function.
13050 (TARGET_ASAN_SHADOW_OFFSET): Define.
13051 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
13052 true for -fsanitize=address.
13054 2018-04-25 Mark Wielaard <mark@klomp.org>
13056 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
13059 2018-04-25 Jakub Jelinek <jakub@redhat.com>
13061 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
13062 than "alu", remove explicit "memory" and "imm_disp" attributes.
13063 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
13065 PR middle-end/85414
13066 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
13067 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
13068 gen_lowpart_no_emit.
13070 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
13073 * config/i386/i386.c (ix86_expand_builtin): Change memory
13074 operand to XI, extend p0 to Pmode.
13075 * config/i386/i386.md: Change unspec volatile and operand
13076 1 mode to XI, change operand 0 mode to P.
13078 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13080 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
13081 GET_MODE_MASK before any checking.
13082 (nds32_can_use_bset_p): Likewise.
13083 (nds32_can_use_btgl_p): Likewise.
13085 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13087 * config/nds32/nds32-doubleword.md: New define_split pattern for
13088 illegal register number.
13090 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13092 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
13094 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13096 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
13098 2018-04-25 Richard Biener <rguenther@suse.de>
13100 * lto-streamer.h (LTO_major_version): Bump to 8.
13102 2018-04-25 Jakub Jelinek <jakub@redhat.com>
13104 * BASE-VER: Set to 9.0.0.
13106 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
13108 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
13109 in __abskf2 and __powikf2.
13111 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13114 * config/aarch64/constraints.md (Usg, Usj): New constraints.
13115 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
13116 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
13117 Use the above on operand 2. Reindent.
13118 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
13120 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
13123 * common/config/i386/i386-common.c (ix86_handle_option): Don't
13125 * config/i386/i386.opt (mcet): Removed.
13126 * doc/install.texi: Remove -mcet documentation.
13127 * doc/invoke.texi: Likewise.
13129 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
13132 * doc/install.texi: Remove -mcet from bootstrap-cet.
13134 2018-04-24 Jakub Jelinek <jakub@redhat.com>
13137 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
13138 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
13142 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
13143 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
13144 containing a CONST_VECTOR.
13146 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
13148 * doc/install.texi: Update newlib dependency for nvptx.
13150 2018-04-24 Jakub Jelinek <jakub@redhat.com>
13153 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
13154 instead of INTVAL when shifting x left.
13156 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
13158 PR tree-optimization/85478
13159 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
13160 vect_grouped_store_supported for single element vectors.
13162 2018-04-24 Richard Biener <rguenther@suse.de>
13165 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
13166 load cost increase to the case of non-constant step.
13168 2018-04-24 Jakub Jelinek <jakub@redhat.com>
13171 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
13172 destination if any_malformed_asm.
13174 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
13176 PR middle-end/85496
13177 * expr.c (store_field): In the bitfield case, if the value comes from
13178 a function call and is returned in registers by means of a PARALLEL,
13179 do not change the mode of the temporary unless BLKmode and VOIDmode.
13181 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
13183 PR rtl-optimization/85423
13184 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
13185 dependencies to debug insns when the previous insn is non-debug.
13187 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
13189 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
13190 enums into a single definition.
13191 (fls): Fix predicates and printing.
13194 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
13196 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
13197 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
13198 and short u6 immediate.
13199 (check_if_valid_sleep_operand): Remove.
13200 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
13202 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13204 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
13205 flag_always_save_lp condition.
13206 * config/nds32/nds32.opt (malways-save-lp): New option.
13208 2018-04-22 Shiva Chen <shiva0217@gmail.com>
13210 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
13211 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
13212 * config/nds32/nds32.h
13213 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
13214 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
13216 2018-04-22 Shiva Chen <shiva0217@gmail.com>
13218 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
13219 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
13221 2018-04-22 Shiva Chen <shiva0217@gmail.com>
13222 Chung-Ju Wu <jasonwucj@gmail.com>
13224 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
13226 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
13227 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
13229 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13231 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
13233 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13235 * config/nds32/nds32-protos.h (nds32_data_alignment,
13236 nds32_local_alignment): Declare.
13237 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
13238 nds32_local_alignment): New functions.
13239 (TARGET_CONSTANT_ALIGNMENT): Define.
13240 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
13242 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13244 * config/nds32/nds32.c
13245 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
13246 (TARGET_MODES_TIEABLE_P): Likewise.
13248 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13250 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
13251 level Ofast and Og.
13253 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
13254 Chung-Ju Wu <jasonwucj@gmail.com>
13256 * config/nds32/constants.md (unspec_volatile_element): Add enum values
13257 for unaligned access.
13258 * config/nds32/nds32-intrinsic.c: Implementation of expanding
13260 * config/nds32/nds32-intrinsic.md: Likewise.
13261 * config/nds32/nds32_intrinsic.h: Likewise.
13262 * config/nds32/nds32.h (nds32_builtins): Likewise.
13263 * config/nds32/nds32.opt (munaligned-access): New option.
13264 * config/nds32/nds32.c (nds32_asm_file_start): Display
13265 flag_unaligned_access status.
13267 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
13269 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
13270 -mno-relax is present.
13271 * config/riscv/linux.h (LINK_SPEC): Ditto.
13273 2018-04-20 Martin Sebor <msebor@redhat.com>
13276 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
13278 (gimple_fold_builtin_stxcpy_chk): Same.
13279 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
13281 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
13284 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
13285 __powikf2 when long double is IEEE 128-bit.
13287 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
13289 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
13290 step to make sure stack always aligned.
13292 2018-04-20 Carl Love <cel@us.ibm.com>
13295 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
13296 size check for arg0.
13298 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
13299 Tom de Vries <tom@codesourcery.com>
13302 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
13303 Emit insns for calls too.
13304 (nvptx_find_par): Always look for worker-level predecessor insn.
13305 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
13307 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
13308 (nvptx_process_pars): Propagate frames for calls.
13310 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
13313 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
13315 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
13316 (ix86_handle_option): Don't handle OPT_mibt.
13317 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
13319 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
13321 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
13322 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
13323 (ix86_target_macros): Define __CET__ with flag_cf_protection
13324 for -fcf-protection.
13325 * config/i386/i386.c (isa2_opts): Remove -mibt.
13326 * config/i386/i386.h (TARGET_IBT): Removed.
13327 (TARGET_IBT_P): Likewise.
13328 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
13329 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
13330 * config/i386/i386.opt (mcet): Update help message.
13331 (mshstk): Likewise.
13333 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
13334 -mcet as an alias for -mshstk.
13336 2018-04-20 Richard Biener <rguenther@suse.de>
13338 PR middle-end/85475
13339 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
13340 complexity by forcing a single use of the multiply operand.
13342 2018-04-20 Martin Jambor <mjambor@suse.cz>
13345 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
13346 recursion dependency to only apply to non-clones.
13348 2018-04-20 Martin Jambor <mjambor@suse.cz>
13351 * ipa-cp.c (create_specialized_node): Check that clones of
13352 self-recursive edges exist during IPA-CP.
13354 2018-04-19 Toon Moene <toon@moene.org>
13356 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
13359 2018-04-19 Jakub Jelinek <jakub@redhat.com>
13361 PR tree-optimization/85467
13362 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
13363 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
13364 VECTOR_CST element to type.
13366 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
13369 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
13370 * config/i386/i386.md (builtin_setjmp_setup): Removed.
13371 (builtin_longjmp): Likewise.
13372 (save_stack_nonlocal): New pattern.
13373 (restore_stack_nonlocal): Likewise.
13375 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
13378 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
13379 Replace ASM_OUTPUT_LABEL with fprintf.
13381 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
13384 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
13385 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
13386 * config/i386/i386-c.c (ix86_target_macros_internal): Also
13387 define __IBT__ and __SHSTK__ for -fcf-protection.
13388 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
13390 (ix86_trampoline_init): Likewise.
13391 (x86_output_mi_thunk): Likewise.
13392 (ix86_notrack_prefixed_insn_p): Likewise.
13393 (ix86_option_override_internal): Don't disallow -fcf-protection.
13394 * config/i386/i386.md (rdssp<mode>): Also enable for
13396 (incssp<mode>): Likewise.
13397 (nop_endbr): Likewise.
13398 * config/i386/i386.opt (mcet): Change help message to built-in
13401 (mshstk): Likewise.
13402 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
13403 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
13404 enable CET built-in functions.
13406 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
13408 * common/config/i386/i386-common.c
13409 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
13410 OPTION_MASK_ISA_MOVDIRI_UNSET,
13411 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
13412 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
13413 * config.gcc (movdirintrin.h): New header.
13414 * config/i386/cpuid.h (bit_MOVDIRI,
13415 bit_MOVDIR64B): New bits.
13416 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
13418 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
13419 (VOID, PVOID, PCVOID)): New function types.
13420 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
13421 __builtin_ia32_directstoreu_u64,
13422 __builtin_ia32_movdir64b): New builtins.
13423 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
13424 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
13426 (ix86_valid_target_attribute_inner_p): Ditto.
13427 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
13428 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
13429 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
13430 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
13431 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
13432 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
13433 (movdiri<mode>, movdir64b_<mode>): New.
13434 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
13435 * config/i386/immintrin.h: Include movdirintrin.h.
13436 * config/i386/movdirintrin.h: New file.
13437 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
13439 2018-04-19 Richard Biener <rguenther@suse.de>
13441 PR middle-end/85455
13442 * cfg.c (clear_bb_flags): When loop state says we have
13443 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
13445 2018-04-19 Richard Biener <rguenther@suse.de>
13447 PR tree-optimization/84737
13448 * tree-vect-data-refs.c (vect_copy_ref_info): New function
13449 copying restrict info.
13450 (vect_setup_realignment): Use it.
13451 * tree-vectorizer.h (vect_copy_ref_info): Declare.
13452 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
13453 the first DR to all generated stores.
13454 (vectorizable_load): Likewise for loads.
13456 2018-04-19 Jakub Jelinek <jakub@redhat.com>
13458 PR tree-optimization/85446
13459 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
13460 the integral and pointer types to have the same precision.
13462 * doc/install.texi: Document --disable-cet being the default and
13465 2018-04-18 Martin Liska <mliska@suse.cz>
13467 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
13470 2018-04-18 Martin Liska <mliska@suse.cz>
13473 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
13476 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
13477 arguments if they are comparable.
13479 2018-04-18 Martin Liska <mliska@suse.cz>
13482 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
13485 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
13488 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
13491 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
13492 ENDBR after calling __morestack.
13494 2018-04-18 David Malcolm <dmalcolm@redhat.com>
13497 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
13498 by using gcc_base_ver to generate a gcc_driver_version, and use
13499 it when generating GCC_DRIVER_NAME.
13500 * configure: Regenerate.
13502 2018-04-18 Jakub Jelinek <jakub@redhat.com>
13505 * config.gcc: Obsolete powerpc*-*-*spe*.
13507 2018-04-17 Jakub Jelinek <jakub@redhat.com>
13510 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
13511 (stabstr_D): Change type of unum from unsigned int to
13512 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
13515 2018-04-17 Jim Wilson <jimw@sifive.com>
13518 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
13519 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
13520 Set arg_pointer_offset after using pretend_args_size.
13522 2018-04-17 Jakub Jelinek <jakub@redhat.com>
13524 PR rtl-optimization/85431
13525 * dse.c (record_store): Ignore zero width stores.
13528 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
13529 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
13530 __builtin_stack_restore rather than after it.
13531 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
13532 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
13533 argument instead of virtual_dynamic_stack_rtx.
13535 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
13537 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
13539 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
13540 Add note to error message to explain internal mapping of overloaded
13541 built-in function name to non-overloaded built-in function name.
13542 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
13545 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
13548 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
13549 where the inputs overlap with the output.
13551 2018-04-17 Jakub Jelinek <jakub@redhat.com>
13553 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
13554 (=v, v) alternative and explicit "memory" attribute.
13555 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
13556 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
13558 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
13559 "sselog1" type instead of "sselog".
13560 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
13561 "sselog". Remove explicit "memory" attribute.
13562 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
13563 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
13565 (vec_extract_hi_v32hi): Merge all alternatives into one, use
13566 "sselog1" type instead of "sselog". Remove explicit "memory"
13568 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
13569 use "sselog1" type instead of "sselog". Remove explicit "memory"
13571 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
13572 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
13574 (vec_extract_hi_v64qi): Merge all alternatives into one, use
13575 "sselog1" type instead of "sselog". Remove explicit "memory"
13577 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
13578 use "sselog1" type instead of "sselog". Remove explicit "memory"
13582 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
13584 PR middle-end/85414
13585 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
13588 2018-04-17 Martin Jambor <mjambor@suse.cz>
13591 * ipa-cp.c (create_specialized_node): Call
13592 expand_all_artificial_thunks if necessary.
13594 2018-04-17 Martin Liska <mliska@suse.cz>
13597 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
13598 in message, remote space in between '_G' and '('.
13600 2018-04-17 Jakub Jelinek <jakub@redhat.com>
13603 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
13604 avx512f_vmcmp<mode>3<round_saeonly_name>,
13605 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
13606 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
13607 avx512f_rndscale<mode><round_saeonly_name>,
13608 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
13609 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
13610 Use %<iptr>2 instead of %2 for -masm=intel.
13611 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
13612 avx512f_vcvttss2usi<round_saeonly_name>,
13613 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
13615 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
13616 avx512f_vcvttsd2usi<round_saeonly_name>,
13617 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
13618 Use %q1 instead of %1 for -masm=intel.
13619 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
13620 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
13621 of %3 for -masm=intel.
13622 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
13624 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
13626 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
13628 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
13629 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
13631 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
13633 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
13634 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
13635 %g1 and one with %0 and %1.
13636 (avx512er_vmrcp28<mode><round_saeonly_name>,
13637 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
13638 %1 for -masm=intel.
13639 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
13640 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
13641 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
13642 of %0 and %{%4%} for -masm=intel.
13643 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
13644 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
13645 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
13646 order of %0 and %{%5%}%{z%} for -masm=intel.
13648 2018-04-17 Jan Hubicka <jh@suse.cz>
13651 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
13653 2018-04-17 Martin Liska <mliska@suse.cz>
13656 * multiple_target.c (create_dispatcher_calls): Set apostrophes
13657 for target_clone error message. Make default implementation
13658 clone to be a local declaration.
13659 (separate_attrs): Add new argument and check for an empty
13661 (expand_target_clones): Handle it.
13662 (ipa_target_clone): Make redirection just for target_clones
13665 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
13666 Tom de Vries <tom@codesourcery.com>
13668 PR middle-end/84955
13669 * omp-expand.c (expand_oacc_for): Add dummy false branch for
13670 tiled basic blocks without omp continue statements.
13672 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
13675 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
13676 vec_extract expression as having side effects to make sure it gets
13679 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
13682 * config/i386/i386.c (get_builtin_code_for_version): Check
13685 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
13688 * config.gcc: Support "skylake".
13689 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13691 * config/i386/i386.c (m_SKYLAKE): Define.
13692 (processor_target_table): Add "skylake".
13693 (ix86_option_override_internal): Add "skylake".
13694 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
13695 PROCESSOR_CANNONLAKE.
13696 (get_builtin_code_for_version): Fix priority for
13697 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
13698 PROCESSOR_SKYLAKE-AVX512.
13699 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
13700 (processor_type): Add PROCESSOR_SKYLAKE.
13702 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
13703 Jason Merrill <jason@redhat.com>
13706 * convert.c (convert_to_integer_1): Use direct recursion for
13707 enumeral types and types with a precision less than the number
13708 of bits in their mode.
13710 2018-04-16 Julia Koval <julia.koval@intel.com>
13713 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
13714 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
13716 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
13719 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
13720 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
13721 and -mno-direct-move.
13723 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
13726 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
13727 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
13728 Ensure negative shifts result in {0}.
13730 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
13732 PR rtl-optimization/79916
13733 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
13734 regs (if any) to define how to gnerate SD moves when LRA is in
13737 2018-04-13 Jakub Jelinek <jakub@redhat.com>
13739 PR rtl-optimization/85393
13740 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
13741 * except.c (expand_dw2_landing_pad_for_region): Make static.
13742 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
13743 a label and unconditional jump to old_bb, rather than
13744 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
13747 PR rtl-optimization/85376
13748 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
13749 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
13750 instead of a specific value.
13752 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
13753 Bin Cheng <bin.cheng@arm.com>
13755 PR tree-optimization/82965
13756 PR tree-optimization/83991
13757 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
13758 by_profile_only parameter.
13759 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
13760 information if the loop was predicted to iterate too many times.
13761 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
13763 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
13766 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
13769 2018-04-13 Martin Liska <mliska@suse.cz>
13770 Jakub Jelinek <jakub@redhat.com>
13772 PR middle-end/81657
13773 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
13774 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
13775 * builtins.c (expand_builtin_memory_copy_args): Use
13776 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
13777 handle dest_addr == pc_rtx.
13779 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
13782 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
13783 asked to not generate direct moves.
13784 (fix_trunc<mode>si2_stfiwx): Similar.
13785 (fix_trunc<mode>si2_internal): Similar.
13787 2018-04-12 Jakub Jelinek <jakub@redhat.com>
13790 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
13791 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
13792 lookup if dest in some wider mode is known to be const0_rtx and
13793 if so, record permanent equivalence for it to be ZERO_EXTEND of
13794 the narrower mode destination.
13796 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
13798 * lto-streamer-out.c (output_function): Revert 259346.
13799 * omp-expand.c (expand_oacc_for): Likewise.
13801 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
13803 PR rtl-optimization/85354
13804 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
13805 * sel-sched.c (sel_global_init): ... here.
13807 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
13810 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
13811 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
13812 mode for PE-COFF targets.
13813 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
13814 (i386_pe_asm_lto_end): Likewise.
13815 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
13816 (TARGET_ASM_LTO_END): Likewise.
13817 * config/i386/winnt.c (saved_debug_info_level): New static variable.
13818 (i386_pe_asm_lto_start): New function.
13819 (i386_pe_asm_lto_end): Likewise.
13821 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
13822 Richard Biener <rguenther@suse.de>
13824 PR middle-end/84955
13825 * lto-streamer-out.c (output_function): Fix CFG loop state before
13827 * omp-expand.c (expand_oacc_for): Handle calls to internal
13828 functions like regular functions.
13830 2018-04-12 Richard Biener <rguenther@suse.de>
13833 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
13834 for the early LTO debug to properly generate references to it
13835 during DIE emission. Do not re-use that for the skeleton for
13837 (dwarf2out_early_finish): Likewise.
13839 2018-04-12 Jakub Jelinek <jakub@redhat.com>
13842 * config/i386/sse.md
13843 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
13844 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
13845 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
13846 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
13847 and output is a reg, avoid creating invalid lowpart subreg, but
13848 instead split into a 512-bit move. Don't split if not AVX512VL,
13849 input is xmm16+ reg and output is a mem.
13850 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
13851 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
13852 xmm16+ reg and output is a mem.
13854 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
13856 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
13857 also for flag_dwarf2_cfi_asm.
13859 2018-04-12 Jakub Jelinek <jakub@redhat.com>
13861 PR rtl-optimization/85342
13862 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
13863 a bool scalar var inside of the loop instead. Don't try to update
13864 recog_data.operand after failed apply_change_group.
13866 2018-04-12 Tom de Vries <tom@codesourcery.com>
13869 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
13870 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
13871 array with flexible array member as array without given dimension.
13872 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
13873 argument for undefined param to true.
13875 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
13878 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
13879 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
13880 from PowerPC section.
13881 * config/rs6000/sysv4.opt (mcall-): Improve help text.
13882 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
13883 help text that is too long.
13884 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
13885 help text that is too long.
13886 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
13887 help text that is too long.
13889 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
13891 * config/alpha/alpha.md (stack_probe_internal): Rename
13892 from "probe_stack". Update all callers.
13894 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
13896 PR rtl-optimization/84566
13897 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
13898 sched_macro_fuse_insns.
13900 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
13903 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
13904 (compute_block_dependences): ... from here.
13906 2018-04-11 Jakub Jelinek <jakub@redhat.com>
13908 PR tree-optimization/85331
13909 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
13910 from int to HOST_WIDE_INT.
13912 2018-04-11 Martin Jambor <mjambor@suse.cz>
13915 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
13916 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
13917 not the same as the source val.
13918 (cgraph_edge_brings_value_p): New parameter.
13919 (gather_edges_for_value): Pass destination value to
13920 cgraph_edge_brings_value_p.
13921 (perhaps_add_new_callers): Likewise.
13922 (get_info_about_necessary_edges): Likewise and exclude values brought
13923 only by self-recursive edges.
13924 (create_specialized_node): Redirect only clones of self-calling edges.
13925 (+self_recursive_pass_through_p): New function.
13926 (find_more_scalar_values_for_callers_subset): Use it.
13927 (find_aggregate_values_for_callers_subset): Likewise.
13928 (known_aggs_to_agg_replacement_list): Removed.
13929 (decide_whether_version_node): Re-calculate known constants for all
13930 remaining context clones.
13932 2018-04-11 Richard Biener <rguenther@suse.de>
13935 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
13936 from early DWARF output.
13937 (dwarf2out_early_finish): Output line info unconditionally into
13938 early DWARF and add reference to it.
13940 2018-04-11 Jakub Jelinek <jakub@redhat.com>
13943 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
13944 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
13945 other than V2DFmode using iptr mode attribute.
13946 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
13948 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
13950 PR rtl-optimization/84659
13951 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
13953 2018-04-11 Jakub Jelinek <jakub@redhat.com>
13956 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
13958 (output_loc_list): Pass address of a dummy size variable even in the
13959 locview handling loop.
13960 (index_location_lists): Add comment on why skip_loc_list_entry can't
13963 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
13966 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
13969 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
13972 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
13973 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
13974 and -mstring-compare-inline-limit.
13976 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
13979 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
13980 for stack clash protection in a register whenever we need it to be in
13983 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
13985 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
13986 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
13988 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
13991 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
13993 (mlong-double-): Ditto.
13994 * config/rs6000/sysv4.opt (msdata=): Ditto.
13995 (mtls-size=): Ditto.
13997 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
13999 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
14000 erroneous entries for
14001 "vector int vec_ldl (int, long int *)", and
14002 "vector unsigned int vec_ldl (int, unsigned long int *)".
14003 Add comments and entries for
14004 "vector bool char vec_ldl (int, bool char *)",
14005 "vector bool short vec_ldl (int, bool short *)",
14006 "vector bool int vec_ldl (int, bool int *)",
14007 "vector bool long long vec_ldl (int, bool long long *)",
14008 "vector pixel vec_ldl (int, pixel *)",
14009 "vector long long vec_ldl (int, long long *)",
14010 "vector unsigned long long vec_ldl (int, unsigned long long *)".
14011 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
14012 type tree bool_long_long_type_node and correct definition of
14013 bool_V2DI_type_node to make reference to this new type tree.
14014 (rs6000_mangle_type): Replace erroneous reference to
14015 bool_long_type_node with bool_long_long_type_node.
14016 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
14017 comments to emphasize sign distinctions for char and int types and
14018 replace RS6000_BTI_bool_long constant with
14019 RS6000_BTI_bool_long_long constant. Also add comment to restrict
14020 use of RS6000_BTI_pixel.
14021 (bool_long_type_node): Remove this macro definition.
14022 (bool_long_long_type_node): New macro definition
14024 2018-04-10 Jakub Jelinek <jakub@redhat.com>
14026 PR rtl-optimization/85300
14027 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
14028 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
14029 simplify_unary_operation fails.
14031 2018-04-10 Martin Liska <mliska@suse.cz>
14033 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
14034 cgraph_edge and ipa_ref.
14036 2018-04-10 Jakub Jelinek <jakub@redhat.com>
14040 * config/i386/sse.md
14041 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
14042 computation of the VEC_MERGE selector from mask.
14043 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
14044 Fix decoding of the VEC_MERGE selector into mask.
14046 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
14048 PR tree-optimization/85286
14049 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
14051 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
14053 * final.c (final_1): Set insn_last_address as well as
14054 insn_current_address.
14056 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14059 * explow.c (emit_stack_probe): Call validize_mem on memory location
14060 before passing it to gen_probe_stack. Create address operand and
14061 legitimize it for the probe_stack_address case.
14063 2018-04-09 Jan Hubicka <jh@suse.cz>
14066 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
14067 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
14068 * tree.c (free_lang_data_in_type): Fix handling of binfos;
14070 (free_lang_data): Rebuild type inheritance graph.
14072 2018-04-09 Martin Sebor <msebor@redhat.com>
14074 * invoke.texi (-finline-small-functions): Mention other optimization
14076 (-findirect-inlining, -fpartial-inlining): Same.
14077 (-finline-functions-called-once): Same.
14078 (-freorder-blocks-and-partition): Same.
14080 2018-04-09 Jan Hubicka <jh@suse.cz>
14083 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
14084 jumps; choose last target that matches the criteria (i.e.
14085 no partition changes for non-crossing jumps).
14086 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
14087 support for redirecting crossing jumps to non-crossing.
14089 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
14091 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
14092 also for naked functions.
14094 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
14096 * config/arc/arc.md (add_shift): New pattern.
14097 (add_shift2): Likewise.
14098 (sub_shift): Likewise.
14099 (sub_shift_cmp0_noout): Likewise.
14100 (compare_si_ashiftsi): Likewise.
14101 (xbfu_cmp0_noout): New combine pattern.
14102 (xbfu_cmp0"): Likewise.
14103 (movsi_set_cc_insn): Place the predicable variant first.
14104 (commutative_binary_cmp0_noout): Remove clobber.
14105 (commutative_binary_cmp0): New pattern.
14106 (noncommutative_binary_cmp0): Likewise.
14107 (noncommutative_binary_cmp0_noout): Likewise.
14108 (noncommutative_binary_comparison_result_used): Removed.
14109 (rsub_cmp0): New pattern.
14110 (rsub_cmp0_noout): Likewise.
14111 (extzvsi): Changed, keep only meaningful variants.
14112 (SQH, SEZ): New iterators.
14113 (SQH_postfix): New mode attribute.
14114 (SEZ_prefix): New code attribute.
14115 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
14116 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
14117 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
14118 of numerical value.
14119 (noncommutative_operator): Check the availability of barrel
14122 2018-04-09 Richard Biener <rguenther@suse.de>
14124 PR tree-optimization/85284
14125 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
14126 Only use the niter constraining form of simple_iv when the exit
14127 is always executed.
14129 2018-04-09 Tom de Vries <tom@codesourcery.com>
14132 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
14133 (define_expand "*memory_barrier"): New define_expand.
14134 (define_insn "memory_barrier"): New insn.
14136 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14138 PR rtl-optimization/80463
14139 PR rtl-optimization/83972
14140 PR rtl-optimization/83480
14142 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
14143 correct producer for the insn.
14144 (tidy_control_flow): Fixup seqnos in case of debug insns.
14146 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14148 PR rtl-optimization/83913
14150 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
14151 different sched-times when merging exprs.
14153 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14155 PR rtl-optimization/83962
14157 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
14158 tidy_fallthru_edge and tidy_control_flow.
14160 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14162 PR rtl-optimization/83530
14164 * sel-sched.c (force_next_insn): New global variable.
14165 (remove_insn_for_debug): When force_next_insn is true, also leave only
14166 next insn in the ready list.
14167 (sel_sched_region): When the region wasn't scheduled, make another pass
14168 over it with force_next_insn set to 1.
14170 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
14172 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
14174 * config/nds32/constants.md (unspec_volatile_element): Add enum values
14175 for interrupt control.
14176 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
14177 functions for interrupt control.
14178 * config/nds32/nds32-intrinsic.md: Likewise.
14179 * config/nds32/nds32_intrinsic.h: Likewise.
14180 * config/nds32/nds32.h (nds32_builtins): Likewise.
14182 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
14184 * config/nds32/nds32.c (nds32_init_machine_status,
14185 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
14186 strict_aligned_p field.
14187 (nds32_expand_to_rtl_hook): New function.
14188 (TARGET_EXPAND_TO_RTL_HOOK): Define.
14189 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
14191 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14192 Chung-Ju Wu <jasonwucj@gmail.com>
14194 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
14195 * config/nds32/nds32-n7.md: New file.
14196 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
14197 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
14199 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
14200 * config/nds32/nds32.md (pipeline_model): Add n7.
14201 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
14202 * config/nds32/pipelines.md: Include n7 settings.
14204 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14205 Chung-Ju Wu <jasonwucj@gmail.com>
14207 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
14208 * config/nds32/nds32-e8.md: New file.
14209 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
14210 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
14212 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
14213 * config/nds32/nds32.md (pipeline_model): Add e8.
14214 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
14215 * config/nds32/pipelines.md: Include e8 settings.
14217 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14218 Chung-Ju Wu <jasonwucj@gmail.com>
14220 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
14221 * config/nds32/nds32-n8.md: New file.
14222 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
14223 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
14225 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
14226 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
14227 * config/nds32/nds32.md (pipeline_model): Add n8.
14228 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
14229 * config/nds32/pipelines.md: Include n8 settings.
14231 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14232 Chung-Ju Wu <jasonwucj@gmail.com>
14234 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
14235 * config/nds32/nds32-n9-2r1w.md: New file.
14236 * config/nds32/nds32-n9-3r2w.md: New file.
14237 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
14238 nds32_register_ports): New or modify for cpu n9.
14239 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
14241 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
14242 * config/nds32/nds32-utils.c: New file.
14243 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
14244 TARGET_MUL_SLOW): Define.
14245 * config/nds32/nds32.md (pipeline_model): New attribute.
14246 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
14247 New options that support cpu n9.
14248 * config/nds32/pipelines.md: Include n9 settings.
14249 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
14251 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
14253 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
14254 information if necessary.
14255 (output_cond_branch_compare_zero): Likewise.
14256 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
14257 (nds32_target_alignment): Refine for alignment.
14258 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
14259 (FUNCTION_BOUNDARY): Modify.
14260 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
14262 * config/nds32/nds32.opt (malways-align, malign-functions): New.
14264 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
14266 * config/nds32/constants.md (unspec_volatile_element): Add values for
14267 TLB operation and data prefetch.
14268 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
14269 functions for TLB operation and data prefetch.
14270 * config/nds32/nds32-intrinsic.md: Likewise.
14271 * config/nds32/nds32_intrinsic.h: Likewise.
14272 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
14273 (nds32_print_operand): Likewise.
14274 * config/nds32/nds32.h (nds32_builtins): Likewise.
14276 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
14277 Andrew Pinski <pinsika@gcc.gnu.org>
14279 PR middle-end/82976
14280 * match.pd: Use constant_boolean_node of correct type instead of
14281 boolean_true_node or boolean_false_node for simplifying
14282 pointer comparisons to zero.
14284 2018-04-07 Jakub Jelinek <jakub@redhat.com>
14286 PR tree-optimization/80021
14287 * tree.c (verify_type_variant): Make error call in verify_variant_match
14288 translatable and remove final full stop.
14290 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14292 * config/nds32/constants.md (unspec_volatile_element): Add
14293 UNSPEC_VOLATILE_EH_RETURN.
14294 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
14295 nds32_output_stack_pop): Support dwarf exception handling process.
14296 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
14297 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
14298 exception handling process.
14299 (nds32_compute_stack_frame): Likewise.
14300 (nds32_return_addr_rtx): Likewise.
14301 (nds32_initial_elimination_offset): Likewise.
14302 (nds32_expand_prologue): Likewise.
14303 (nds32_expand_epilogue): Likewise.
14304 (nds32_dynamic_chain_address): New function.
14305 * config/nds32/nds32.h (machine_function): Add fields for dwarf
14306 exception handling.
14307 (DYNAMIC_CHAIN_ADDRESS): Define.
14308 (EH_RETURN_DATA_REGNO): Define.
14309 (EH_RETURN_STACKADJ_RTX): Define.
14310 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
14311 patterns for dwarf exception handling.
14313 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14315 * config/nds32/nds32.h: Clean up obsolete macros.
14317 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14319 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
14320 Add enum values for particular instructions.
14321 * config/nds32/nds32-intrinsic.c: Implementation of expanding
14322 particular intrinsic functions.
14323 * config/nds32/nds32-intrinsic.md: Likewise.
14324 * config/nds32/nds32_intrinsic.h: Likewise.
14325 * config/nds32/nds32.h (nds32_builtins): Likewise.
14326 * config/nds32/nds32.md (type): Add pbsad and pbsada.
14327 (btst, ave): New patterns for particular instructions.
14329 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14331 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
14332 Add enum values for atomic load/store and memory sync.
14333 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
14335 * config/nds32/nds32-intrinsic.md: Likewise.
14336 * config/nds32/nds32_intrinsic.h: Likewise.
14337 * config/nds32/nds32.h (nds32_builtins): Likewise.
14339 2018-04-07 Jakub Jelinek <jakub@redhat.com>
14341 PR tree-optimization/85257
14342 * fold-const.c (native_encode_vector): If not all elts could fit
14343 and off is -1, return 0 rather than offset.
14344 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
14345 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
14346 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
14347 adjust buffer in native_interpret_expr call.
14349 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14351 * config/nds32/constants.md (unspec_volatile_element): Add cache
14352 control enum values.
14353 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
14354 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
14355 * config/nds32/nds32.c (nds32_cctl_names): New.
14356 (nds32_print_operand): Handle cache control register names.
14357 * config/nds32/nds32.h (nds32_builtins): New enum values.
14358 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
14360 * config/nds32/nds32.md (type): Add mmu.
14361 * config/nds32/pipelines.md (simple_insn): Add mmu.
14363 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14365 * config/nds32/nds32.md (type): Remove call.
14366 * config/nds32/pipelines.md (simple_insn): Likewise.
14368 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14370 * config/nds32/constants.md (unspec_volatile_element): Add
14371 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
14372 UNSPEC_VOLATILE_FMFCFG.
14373 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
14374 description for fmfcfg and fmfcsr.
14375 (bdesc_1arg): Add fmtcsr.
14376 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
14377 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
14378 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
14379 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
14380 unspec_fmfcfg): New patterns.
14381 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
14382 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
14383 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
14384 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
14385 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
14386 __nds32__fmfcfg): Define.
14388 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14390 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
14391 intrinsic register names.
14392 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
14393 intrinsic register enum values and macros.
14395 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14397 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
14398 for load/store addressing form.
14399 (nds32_print_operand_address): Likewise.
14401 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
14404 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
14405 based on LABEL_REF. Remove useless assertion.
14406 (pic_address_needs_scratch): Fix formatting.
14407 (sparc_legitimize_pic_address): Minor tweaks.
14408 (sparc_delegitimize_address): Adjust assertion accordingly.
14409 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
14410 into symbolic_operand.
14411 (movsi_high_pic_label_ref): Likewise.
14412 (movsi_lo_sum_pic_label_ref): Likewise.
14413 (movdi_pic_label_ref): Likewise.
14414 (movdi_high_pic_label_ref): Likewise.
14415 (movdi_lo_sum_pic_label_ref): Likewise.
14417 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
14419 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
14420 custom LIB_SPEC setup.
14422 2018-04-06 Ruslan Bukin <br@bsdpad.com>
14423 Kito Cheng <kito.cheng@gmail.com>
14425 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
14426 * config/riscv/freebsd.h: New.
14428 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
14430 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
14431 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
14434 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
14435 Kito Cheng <kito.cheng@gmail.com>
14437 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
14438 nds32_output_call, nds32_symbol_binds_local_p): New functions.
14439 * config/nds32/nds32-protos.h (nds32_output_call,
14440 nds32_output_return): Declare.
14441 * config/nds32/nds32.md: Refine all the call and return patterns.
14443 2018-04-06 Jakub Jelinek <jakub@redhat.com>
14446 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
14447 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
14449 PR rtl-optimization/84872
14450 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
14451 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
14452 EDGE_CROSSING edge.
14454 2018-04-06 Tamar Christina <tamar.christina@arm.com>
14456 * expr.c (copy_blkmode_to_reg): Revert 254862.
14457 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
14459 2018-04-06 Richard Biener <rguenther@suse.de>
14461 PR middle-end/85244
14462 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
14463 after seeing a component reference with an adjacent field. Treat
14464 refs to arrays at struct end of external decls similar to
14465 refs to unconstrained commons.
14467 2018-04-06 Jakub Jelinek <jakub@redhat.com>
14470 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
14471 look through SAVE_EXPRs with non-side-effects argument. Adjust
14473 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
14476 2018-04-06 Richard Biener <rguenther@suse.de>
14478 PR middle-end/85180
14479 * alias.c (find_base_term): New wrapper around find_base_term
14480 unwinding CSELIB_VAL_PTR changes.
14481 (find_base_term): Do not restore CSELIB_VAL_PTR during the
14484 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14486 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
14488 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
14489 constant definitions.
14490 ("nop"): lr 0,0 -> nopr r0
14491 ("nop_lr0", "nop_lr1"): New insn definitions.
14493 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
14495 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
14496 NDS32_V3PUSH_AVAILABLE_P macro.
14498 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
14499 Chung-Ju Wu <jasonwucj@gmail.com>
14501 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
14502 (nds32*-*-*): Add float and fpu_config into supported_defaults.
14503 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
14504 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
14505 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
14506 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
14507 * config/nds32/constraints.md: New constraints and checking for hard
14508 float configuration.
14509 * config/nds32/iterators.md: New mode iterator and attribute for hard
14510 float configuration.
14511 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
14513 * config/nds32/nds32-fpu.md: New file.
14514 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
14515 deal with hard float code generation.
14516 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
14518 (abi_type, float_reg_number): New enum type.
14519 * config/nds32/nds32-predicates.c: New predicates for hard float.
14520 * config/nds32/nds32-protos.h: Declare functions for hard float.
14521 * config/nds32/nds32.c: Implementation for hard float configuration.
14522 * config/nds32/nds32.h: Definitions for hard float configuration.
14523 * config/nds32/nds32.md: Include hard float machine description and
14524 modify patterns for hard float configuration.
14525 * config/nds32/nds32.opt: New options for hard float configuration.
14526 * config/nds32/predicates.md: New predicates for hard float
14529 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
14531 * common/config/nds32/nds32-common.c
14532 (nds32_option_optimization_table): Enable -mreleax-hint by default.
14534 2018-04-05 Jakub Jelinek <jakub@redhat.com>
14536 PR middle-end/85195
14537 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
14538 CONSTRUCTOR_ELT (ctor, ...)->value.
14540 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
14543 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
14545 2018-04-05 Tom de Vries <tom@codesourcery.com>
14548 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
14551 2018-04-05 Shiva Chen <shiva0217@gmail.com>
14552 Kito Cheng <kito.cheng@gmail.com>
14554 * config/nds32/constraints.md (U33): Fine-tune checking condition.
14555 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
14556 * config/nds32/nds32.h (nds32_16bit_address_type): Add
14557 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
14559 2018-04-05 Shiva Chen <shiva0217@gmail.com>
14560 Kito Cheng <kito.cheng@gmail.com>
14562 * config/nds32/constraints.md (Ufe): New memory constraint.
14563 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
14564 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
14565 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
14567 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
14568 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
14570 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14572 * config/nds32/nds32.md: Use optimize_size in the condition for
14573 alu-shift instructions.
14575 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14577 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
14579 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14581 * config/nds32/nds32.md (negsi2): Refine pattern.
14583 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
14584 Chung-Ju Wu <jasonwucj@gmail.com>
14586 * config/nds32/iterators.md (shift_rotate): New code iterator.
14587 (shift): New code attribute.
14588 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
14589 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
14590 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
14591 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
14592 bit-wise operations.
14593 (andsi3, *andsi3): Ditto.
14594 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
14595 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
14596 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
14597 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
14598 nds32_ior_operand, nds32_xor_operand): New predicates.
14600 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14602 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
14603 (addsi3, subsi3): ... this.
14605 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14607 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
14609 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14611 * config/nds32/nds32.md: Adjust indention.
14613 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
14615 * config/nds32/nds32.md (feature): New attribute.
14617 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14619 * config/nds32/nds32.md (subtype): New attribute.
14621 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
14624 * config/arm/arm-builtins.c (arm_expand_builtin): Change
14625 expansion to perform a bitwise AND of the argument followed by a
14626 boolean negation of the result.
14628 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
14630 PR rtl-optimization/84878
14631 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
14632 the basic block. Assert the use reference is not artificial and that
14633 it has an associated insn.
14635 2018-04-04 Michael Matz <matz@suse.de>
14637 * builtins.c (compute_objsize): Pass correct operand
14638 to array_at_struct_end_p.
14640 2018-04-04 Richard Biener <rguenther@suse.de>
14643 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
14644 from contexts for DINFO_LEVEL_TERSE and below.
14646 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
14648 * config/nds32/nds32-doubleword.md (move_<mode>): Require
14649 resiter_operand condition.
14650 * config/nds32/nds32.md (*move<mode>): Ditto.
14652 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
14653 Monk Chiang <sh.chiang04@gmail.com>
14655 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
14657 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14659 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
14661 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14662 Kito Cheng <kito.cheng@gmail.com>
14664 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
14665 nds32_cond_code_str, output_cond_branch,
14666 output_cond_branch_compare_zero, nds32_expand_cbranch,
14667 nds32_expand_cstore, nds32_expand_movcc,
14668 nds32_output_cbranchsi4_equality_zero,
14669 nds32_output_cbranchsi4_equality_reg,
14670 nds32_output_cbranchsi4_equality_reg_or_const_int,
14671 nds32_output_cbranchsi4_greater_less_zero: New functions.
14672 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
14673 nds32_expand_cstore, nds32_expand_movcc,
14674 nds32_output_cbranchsi4_equality_zero,
14675 nds32_output_cbranchsi4_equality_reg,
14676 nds32_output_cbranchsi4_equality_reg_or_const_int,
14677 nds32_output_cbranchsi4_greater_less_zero): Declare.
14678 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
14679 nds32_rimm11s_operand): New predicates.
14680 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
14681 * config/nds32/nds32.md: Rewrite all the branch and conditional move
14684 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
14686 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
14687 * config/nds32/nds32.md: Ditto.
14688 * config/nds32/pipelines.md: Ditto.
14690 2018-04-04 Richard Biener <rguenther@suse.de>
14692 PR tree-optimization/85168
14693 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
14694 propagating abnormals.
14696 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14698 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
14700 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14701 Kito Cheng <kito.cheng@gmail.com>
14703 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
14704 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
14705 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
14706 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
14707 * config/nds32/nds32.md (sibcall_internal): New.
14708 (sibcall_register): Remove.
14709 (sibcall_immediate): Remove.
14710 (sibcall_value_internal): New.
14711 (sibcall_value_register): Remove.
14712 (sibcall_value_immediate): Remove.
14713 * config/nds32/predicates.md (nds32_general_register_operand): New.
14714 (nds32_call_address_operand): New.
14716 2018-04-03 Jakub Jelinek <jakub@redhat.com>
14718 PR rtl-optimization/85167
14719 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
14720 bb_defs if *split_p, instead preinitialize it to NULL.
14722 PR tree-optimization/85156
14723 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
14724 evaluating the argument multiple times.
14726 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
14728 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
14730 (_mm_cvtpd_ps): Likewise.
14731 (_mm_cvttpd_epi32): Likewise.
14732 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
14733 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
14734 vector, pixel, and bool following altivec.h include.
14736 2018-04-03 Martin Sebor <msebor@redhat.com>
14738 * doc/extend.texi (Common Function Attributes): Clarify.
14739 (const attribute): Likewise.
14740 (pure attribute): Likewise.
14742 2018-04-03 Jakub Jelinek <jakub@redhat.com>
14745 * config/i386/i386.c (ix86_expand_vector_set): Use
14746 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
14748 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
14750 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
14751 instructions when changing rounding bits to preserve precision bits
14752 in the x87 control word.
14754 2018-04-03 Martin Liska <mliska@suse.cz>
14756 PR tree-optimization/82491
14757 * rtl.h (strip_offset_and_add): Replace += suboffset with
14758 poly_uint64 () + suboffset.
14760 2018-03-29 Martin Liska <mliska@suse.cz>
14761 Martin Jambor <mjambor@suse.cz>
14764 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
14765 param_type is not an integral or pointer type.
14767 2018-04-03 Richard Biener <rguenther@suse.de>
14769 * sese.h (recompute_all_dominators): Remove.
14771 2018-04-02 Martin Sebor <msebor@redhat.com>
14773 * doc/invoke.texi (-Wrestrict): Fix typos.
14775 2018-04-02 Jim Wilson <jimw@sifive.com>
14777 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
14778 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
14779 (<optab>di3, <optab>si3_extend): Likewise.
14780 (<optab>si3_mask, <optab>si3_mask_1): New.
14781 (<optab>di3_mask, <optab>di3_mask_1): New.
14782 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
14783 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
14784 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
14786 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
14788 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
14791 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
14793 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
14794 (nds32_canonicalize_comparison): New function.
14796 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
14797 Kito Cheng <kito.cheng@gmail.com>
14798 Kuan-Lin Chen <kuanlinchentw@gmail.com>
14800 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
14801 * config/nds32/constants.md (unspec_volatile_element): Add
14802 UNSPEC_VOLATILE_RELAX_GROUP.
14803 * config/nds32/nds32-relax-opt.c: New file.
14804 * config/nds32/nds32-predicates.c
14805 (nds32_symbol_load_store_p): New function.
14806 * config/nds32/nds32-protos.h
14807 (nds32_symbol_load_store_p): Declare function.
14808 (make_pass_nds32_relax_opt): Declare new rtl pass function.
14809 * config/nds32/nds32.c
14810 (nds32_register_pass): New function to register pass.
14811 (nds32_register_passes): New function to register passes.
14812 * config/nds32/nds32.md (relax_group): New pattern.
14813 * config/nds32/nds32.opt (mrelax-hint): New option.
14814 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
14816 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
14818 * config/nds32/t-nds32: Modify files dependency.
14820 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
14822 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
14823 (PROFILE_HOOK): Define its implementation.
14825 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
14827 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
14828 type and 32-bit size.
14830 2018-04-01 Jakub Jelinek <jakub@redhat.com>
14832 PR middle-end/85090
14833 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
14834 (V_128_256): New mode iterator.
14835 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
14836 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
14837 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
14839 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
14840 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
14842 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
14845 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
14846 NaN inputs correctly.
14848 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
14851 * config/rs6000/vsx.md (??r): New mode attribute.
14852 (*vsx_mov<mode>_64bit): Use it.
14853 (*vsx_mov<mode>_32bit): Likewise.
14855 2018-03-30 Martin Sebor <msebor@redhat.com>
14857 PR tree-optimization/84818
14858 * builtins.c (check_access): Use warning_n.
14860 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
14863 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
14865 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
14868 2018-03-30 Julia Koval <julia.koval@intel.com>
14871 * x86-tune.def (movx, partial_reg_dependency): Enable for
14874 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
14876 PR inline-asm/84985
14877 * lra-constraints.c (process_alt_operands): Move setting
14878 this_alternative_matches below.
14880 2018-03-29 Martin Liska <mliska@suse.cz>
14883 * doc/invoke.texi: Document how LTO works with debug info.
14884 Describe auto-load support of binutils. Mention 'x86-64'
14885 as valid option value of -march option.
14887 2018-03-29 Jakub Jelinek <jakub@redhat.com>
14889 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
14892 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
14893 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
14894 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
14897 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
14900 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
14901 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
14902 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
14903 for RS6000_BTM_POWERPC64.
14904 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
14905 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
14906 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
14909 (DIVDEU): Likewise.
14911 2018-03-28 Carl Love <cel@us.ibm.com>
14914 2017-09-27 Carl Love <cel@us.ibm.com>
14916 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
14917 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
14918 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
14921 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14923 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
14924 instead of __vector bool.
14925 (_mm_max_pu8): Likewise.
14926 (_mm_min_pi16): Likewise.
14928 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
14931 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
14932 (DIVWEUO): Likewise.
14933 (DIVDEO): Likewise.
14934 (DIVDEUO): Likewise.
14935 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
14936 DIVWEUO and DIVDEUO.
14937 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
14938 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
14939 (div_extend): Likewise.
14940 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
14942 (__builtin_divweuo): Likewise.
14943 (__builtin_divdeo): Likewise.
14944 (__builtin_divdeuo): Likewise.
14946 2018-03-28 Jakub Jelinek <jakub@redhat.com>
14949 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
14950 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
14952 PR tree-optimization/82004
14953 * gimple-match-head.c (optimize_pow_to_exp): New function.
14954 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
14955 Don't fold to exp if optimize_pow_to_exp is false.
14957 2018-03-28 Martin Liska <mliska@suse.cz>
14960 * calls.c (initialize_argument_information): Fix trailing space.
14961 * common.opt: Fix typo and provide better explanation for
14962 -fsanitize-coverage option.
14963 * config/i386/i386.opt: Fix typo.
14965 2018-03-28 Jakub Jelinek <jakub@redhat.com>
14966 Martin Liska <mliska@suse.cz>
14969 * gimplify.c (asan_poison_variable): Don't do the check for
14970 gimplify_omp_ctxp here.
14971 (gimplify_decl_expr): Do it here.
14972 (gimplify_target_expr): Likewise.
14974 2018-03-28 Martin Liska <mliska@suse.cz>
14977 * config/i386/i386.c (ix86_function_arg_advance): Do not call
14978 chkp_type_bounds_count if MPX is not enabled.
14980 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
14982 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
14984 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
14987 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
14988 function to create the function decl for complex long double
14989 multiply and divide for -mabi=ieeelongdouble.
14990 (init_float128_ieee): Call it.
14992 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
14995 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
14996 -fcf-protection=branch -mibt.
14997 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
14999 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
15002 * config/arm/arm.c (arm_valid_symbolic_address): Handle
15003 arm_word_relocations.
15005 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
15008 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
15009 extern array declarations.
15011 2018-03-27 Richard Biener <rguenther@suse.de>
15013 PR middle-end/84067
15014 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
15015 explicit single_use checks.
15017 2018-03-27 Richard Biener <rguenther@suse.de>
15019 PR tree-optimization/85082
15020 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
15023 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
15025 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
15026 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
15027 Turn on fasynchronous-unwind-tables and funwind-tables.
15029 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
15032 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
15033 (*bmi_blsr_<mode>_ccz): Ditto.
15035 2018-03-26 Tom de Vries <tom@codesourcery.com>
15037 PR tree-optimization/85063
15038 * omp-general.c (offloading_function_p): New function. Factor out
15040 * omp-offload.c (pass_omp_target_link::gate): ... here.
15041 * omp-general.h (offloading_function_p): Declare.
15042 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
15043 with attribute omp declare target for offloading functions.
15045 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
15047 PR tree-optimization/84005
15048 * tree-data-ref.h (get_base_for_alignment): Declare.
15049 * tree-data-ref.c (get_base_for_alignment_1): New function.
15050 (get_base_for_alignment): Likewise.
15051 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
15052 get_base_for_alignment to find a suitable base object, instead
15053 of always using drb->base_address.
15055 2018-03-23 Jakub Jelinek <jakub@redhat.com>
15057 PR inline-asm/85022
15058 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
15059 known size by default.
15061 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
15063 PR inline-asm/85030
15064 * lra-constraints.c (process_alt_operands): Don't match BLKmode
15065 and non BLKmode operands.
15067 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15070 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
15071 Clean up attributes.
15073 2018-03-23 Richard Biener <rguenther@suse.de>
15076 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
15077 we are going to emit early debug for LTO.
15079 2018-03-23 Jakub Jelinek <jakub@redhat.com>
15081 PR inline-asm/85034
15082 * function.c (match_asm_constraints_1): Don't optimize if input
15083 doesn't satisfy general_operand predicate for output's mode.
15085 PR inline-asm/85022
15086 * alias.c (write_dependence_p): Don't require for x_canonicalized
15087 non-VOIDmode if x has VOIDmode.
15090 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
15091 just don't try to optimize it rather than assert it never happens.
15093 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
15095 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
15096 macro expansions for definition of ST_INTERNAL_<mode> and
15097 LD_INTERNAL_<mode> builtins.
15098 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
15100 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
15102 (altivec_expand_st_builtin): Likewise.
15103 (altivec_expand_builtin): Remove calls to deleted functions.
15104 (rs6000_address_for_altivec): Delete this function.
15105 * config/rs6000/vector.md: Remove expands for
15106 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
15108 2018-03-22 Sudakshina Das <sudi.das@arm.com>
15111 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
15112 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
15113 re-computing once computed.
15114 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
15115 (arm_init_machine_status): Initialize
15116 machine->static_chain_stack_bytes.
15118 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
15121 * doc/extend.texi: Add four new prototypes for vec_ld.
15122 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
15123 definitions for more logical presentation.
15124 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
15125 entries for V1TI variants of __builtin_altivec_ld builtin.
15126 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
15127 handling of V1TI variant of LVX icode pattern.
15128 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
15129 (rs6000_gimple_fold_builtin): Likewise.
15130 (altivec_init_builtins): Add code to define
15131 __builtin_altivec_lvx_v1ti function.
15133 2018-03-22 Jakub Jelinek <jakub@redhat.com>
15135 PR inline-asm/84941
15136 * function.c (match_asm_constraints_1): Don't do the optimization
15137 if input isn't a REG, SUBREG, MEM or constant.
15139 2018-03-22 Tom de Vries <tom@codesourcery.com>
15141 PR tree-optimization/84956
15142 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
15143 bb_has_abnormal_pred.
15145 2018-03-22 Jakub Jelinek <jakub@redhat.com>
15148 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
15149 DECL_INITIAL (decl) to decl at the end.
15150 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
15151 adjust the comment.
15153 2018-03-21 Joseph Myers <joseph@codesourcery.com>
15155 * doc/extend.texi (__builtin_tgmath): Document when complex
15156 integer types are treated as _Complex _Float64.
15158 2018-03-21 Tom de Vries <tom@codesourcery.com>
15160 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
15162 2018-03-21 Jakub Jelinek <jakub@redhat.com>
15164 PR tree-optimization/84960
15165 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
15166 if it is ENTRY block, move them into single succ of ENTRY in that case.
15168 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
15170 PR tree-optimization/84811
15171 * poly-int.h (poly_span_traits): Remove the T3 parameter and
15172 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
15173 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
15174 (known_subrange_p): Update accordingly. Cast each value involved
15175 in the size comparison, rather than casting the result of the
15178 2018-03-21 Jakub Jelinek <jakub@redhat.com>
15180 PR tree-optimization/84982
15181 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
15182 by flipping the least significant bit rather than all bits from
15183 bitpos to bitpos + bitsize - 1.
15185 2018-03-21 Nathan Sidwell <nathan@acm.org>
15187 * doc/extend.texi (Deprecated Features): Remove mention of
15188 long-deleted deprecations.
15190 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15193 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
15194 * configure: Regenerate.
15196 2018-03-21 Tom de Vries <tom@codesourcery.com>
15198 PR tree-optimization/83126
15199 * tree-parloops.c (num_phis): New function.
15200 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
15202 2018-03-21 Nathan Sidwell <nathan@acm.org>
15204 * doc/extend.texi (Deprecated Features): Update deprecated flags,
15205 mention anon-struct/union members and trailing attributes.
15207 2018-03-21 Bin Cheng <bin.cheng@arm.com>
15209 PR tree-optimization/84969
15210 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
15211 builtin memset partitions if they set different rhs values.
15213 2018-03-21 Jakub Jelinek <jakub@redhat.com>
15215 PR rtl-optimization/84989
15216 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
15217 VEC_DUPLICATE with scalar result mode.
15219 2018-03-21 Martin Liska <mliska@suse.cz>
15222 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
15223 not intended return statement.
15225 2018-03-21 Martin Liska <mliska@suse.cz>
15228 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
15229 (chkp_find_bound_slots_1): Limit number of iterations.
15231 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
15234 * Minor grammar fixes for x86 options.
15236 2018-03-20 Jakub Jelinek <jakub@redhat.com>
15239 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
15240 holding REG_CFA_RESTORE notes, instead turn them into a USE.
15242 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
15245 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
15246 (altivec_lvx_<mode>_1op): Likewise.
15247 (altivec_stvx_<mode>_2op): Likewise.
15248 (altivec_stvx_<mode>_1op): Likewise.
15249 (altivec_lvx_<VM2:mode>): New define_expand.
15250 (altivec_stvx_<VM2:mode>): Likewise.
15251 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
15252 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
15253 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
15254 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
15255 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
15256 (rs6000_gen_lvx): Likewise.
15257 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
15258 (altivec_expand_stv_builtin): Likewise.
15259 (altivec_expand_builtin): Likewise.
15260 * config/rs6000/vector.md: Likewise.
15262 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15265 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
15268 2018-03-20 Richard Biener <rguenther@suse.de>
15271 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
15272 sign-conversions as zero, fall back to standard scalar_stmt
15275 2018-03-20 Martin Liska <mliska@suse.cz>
15278 * predict.c (rebuild_frequencies): Handle case when we have
15279 PROFILE_ABSENT, but flag_guess_branch_prob is false.
15281 2018-03-20 Jakub Jelinek <jakub@redhat.com>
15284 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
15285 flag_section_anchors.
15286 * varasm.c (use_blocks_for_decl_p): Remove hack for
15287 dw2_force_const_mem.
15290 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
15292 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
15293 be created, use lowpart_subreg of operands[0] rather than operands[0]
15295 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
15296 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
15297 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
15298 and n constraint instead of aarch64_shift_imm_di and Usd.
15299 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
15300 (*aarch64_<optab>_reg_minus<mode>3): ... this.
15302 2018-03-20 Sudakshina Das <sudi.das@arm.com>
15305 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
15306 to favor GPR over NEON registers.
15307 (<shift>di3_neon): Likewise.
15309 2018-03-20 Tom de Vries <tom@codesourcery.com>
15312 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
15313 (nvptx_process_pars): Emit bar.sync asap and alap.
15315 2018-03-20 Tom de Vries <tom@codesourcery.com>
15318 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
15319 seen_label if seen_label is already set.
15321 2018-03-20 Jakub Jelinek <jakub@redhat.com>
15324 * config/i386/i386.c (fold_builtin_cpu): For features above 31
15325 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
15326 Use 1U instead of 1. Formatting fixes.
15329 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
15330 instead of TREE_TYPE (s1) for the return value.
15332 2018-03-19 Jakub Jelinek <jakub@redhat.com>
15334 PR tree-optimization/84946
15335 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
15336 bitsize + bitsize in poly_uint64 rather than poly_int64.
15339 * dwarf2asm.c: Include fold-const.c.
15340 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
15341 of decl rather than decl itself.
15343 PR rtl-optimization/84643
15344 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
15346 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
15349 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
15350 calling assemble_variable.
15352 2018-03-19 Sudakshina Das <sudi.das@arm.com>
15355 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
15356 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
15358 2018-03-19 Jim Wilson <jimw@sifive.com>
15361 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
15362 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
15363 (riscv_first_stack_step): Likewise.
15364 (riscv_option_override): Use STACK_BOUNDARY instead of
15365 MIN_STACK_BOUNDARY.
15366 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
15367 MIN_STACK_BOUNDARY.
15368 (BIGGEST_ALIGNMENT): Set to 128.
15369 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
15370 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
15373 2018-03-19 Richard Biener <rguenther@suse.de>
15375 PR tree-optimization/84933
15376 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
15377 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
15379 2018-03-19 Richard Biener <rguenther@suse.de>
15381 PR tree-optimization/84859
15382 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
15383 (cond_if_else_store_replacement): Perform sinking operation on
15384 single-store BBs regardless of MAX_STORES_TO_SINK setting.
15385 Generalize what a BB with a single eligible store is.
15387 2018-03-19 Richard Biener <rguenther@suse.de>
15389 PR tree-optimization/84929
15390 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
15391 chrec_is_positive against non-chrec arg.
15393 2018-03-19 Tamar Christina <tamar.christina@arm.com>
15396 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
15398 2018-03-18 Martin Liska <mliska@suse.cz>
15400 PR rtl-optimization/84635
15401 * regrename.c (build_def_use): Use matches_mode only when
15404 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
15406 PR tree-optimization/84913
15407 * tree-vect-loop.c (vectorizable_reduction): Don't try to
15408 vectorize chains of COND_EXPRs.
15410 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
15412 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
15414 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
15416 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
15418 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
15420 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
15422 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
15423 Kito Cheng <kito.cheng@gmail.com>
15425 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
15426 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
15427 (nds32_adjust_reg_alloc_order): New function.
15428 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
15430 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
15432 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
15433 nds32_print_operand, nds32_print_operand_address): Use
15434 HOST_WIDE_INT_PRINT_DEC instead.
15436 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
15438 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
15440 2018-03-17 Jakub Jelinek <jakub@redhat.com>
15443 * config/i386/i386.c (initial_ix86_tune_features,
15444 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
15445 unsigned long long.
15446 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
15447 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
15448 rather than 1u << ix86_tune. Formatting fix.
15449 (ix86_option_override_internal): Change ix86_arch_mask from
15450 unsigned int to unsigned HOST_WIDE_INT, initialize to
15451 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
15452 (ix86_function_specific_restore): Likewise.
15454 2018-03-16 Jakub Jelinek <jakub@redhat.com>
15457 * postreload.c (reload_combine_recognize_pattern): Perform
15458 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
15459 truncate_int_for_mode the result for the destination's mode.
15462 * hsa-gen.c (mem_type_for_type): Fix comment typo.
15463 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
15465 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
15468 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
15471 * lra-assigns.c (lra_split_hard_reg_for): Don't use
15472 regno_allocno_class_array and sorted_pseudos.
15473 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
15474 insns where regno is used.
15476 2018-03-16 Martin Liska <mliska@suse.cz>
15479 * multiple_target.c (create_dispatcher_calls): Redirect
15480 reference in the symbol table.
15482 2018-03-16 Martin Liska <mliska@suse.cz>
15485 * multiple_target.c (create_dispatcher_calls): Redirect also
15488 2018-03-16 Jakub Jelinek <jakub@redhat.com>
15492 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
15493 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
15494 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
15496 2018-03-16 Julia Koval <julia.koval@intel.com>
15498 * doc/invoke.texi (Skylake Server): Add CLWB.
15499 Cannonlake): Remove CLWB.
15501 2018-03-16 Jakub Jelinek <jakub@redhat.com>
15503 PR tree-optimization/84841
15504 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
15506 (FLOAT_ONE_CONST_TYPE): Define.
15507 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
15508 (sort_by_operand_rank): Put entries with higher constant_type last
15509 rather than first to match comments.
15511 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
15513 * config/nios2/nios2.md (movsi_internal): Fix thinko in
15516 2018-03-15 Jakub Jelinek <jakub@redhat.com>
15519 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
15520 check and use address of target always.
15522 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
15525 * config/i386/i386.c (indirect_thunk_needed): Update comments.
15526 (indirect_thunk_bnd_needed): Likewise.
15527 (indirect_thunks_used): Likewise.
15528 (indirect_thunks_bnd_used): Likewise.
15529 (indirect_return_needed): New.
15530 (indirect_return_bnd_needed): Likewise.
15531 (output_indirect_thunk_function): Add a bool argument for
15533 (output_indirect_thunk_function): Don't generate alias for
15534 function return thunk.
15535 (ix86_code_end): Call output_indirect_thunk_function to generate
15536 function return thunks.
15537 (ix86_output_function_return): Set indirect_return_bnd_needed
15538 and indirect_return_needed instead of indirect_thunk_bnd_needed
15539 and indirect_thunk_needed.
15541 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
15543 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
15544 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
15545 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
15547 2018-03-15 David Malcolm <dmalcolm@redhat.com>
15548 Paul Hua <paul.hua.gm@gmail.com>
15551 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
15553 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
15555 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
15556 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
15557 resp. SFmode cases.
15559 2018-03-15 Tamar Christina <tamar.christina@arm.com>
15562 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
15563 instead of GET_MODE_SIZE when comparing Units.
15565 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
15568 * varasm.c (hash_section): Return an unchangeble hash value
15569 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
15570 Return !aarch64_can_use_per_function_literal_pools_p ().
15572 2018-03-15 Jakub Jelinek <jakub@redhat.com>
15575 * optabs.c (emit_conditional_move): Pass address of cmode's copy
15576 rather than address of cmode as last argument to prepare_cmp_insn.
15578 2018-03-15 Julia Koval <julia.koval@intel.com>
15580 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
15581 F_AVX512VNNI, F_AVX512BITALG): New.
15583 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
15586 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
15587 insn for floating-point loads and stores.
15589 2018-03-14 Carl Love <cel@us.ibm.com>
15591 * config/rs6000/rs6000-c.c: Add macro definitions for
15592 ALTIVEC_BUILTIN_VEC_PERMXOR.
15593 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
15594 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
15595 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
15596 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
15598 * config/doc/extend.texi: Add prototypes for vec_permxor.
15600 2018-03-14 David Malcolm <dmalcolm@redhat.com>
15603 * diagnostic-show-locus.c (class layout_point): Convert m_line
15604 from int to linenum_type.
15605 (line_span::comparator): Use linenum "compare" function when
15606 comparing line numbers.
15607 (test_line_span): New function.
15608 (layout_range::contains_point): Convert param "row" from int to
15610 (layout_range::intersects_line_p): Likewise.
15611 (layout::will_show_line_p): Likewise.
15612 (layout::print_source_line): Likewise.
15613 (layout::should_print_annotation_line_p): Likewise.
15614 (layout::print_annotation_line): Likewise.
15615 (layout::print_leading_fixits): Likewise.
15616 (layout::annotation_line_showed_range_p): Likewise.
15617 (struct line_corrections): Likewise for field m_row.
15618 (line_corrections::line_corrections): Likewise for param "row".
15619 (layout::print_trailing_fixits): Likewise.
15620 (layout::get_state_at_point): Likewise.
15621 (layout::get_x_bound_for_row): Likewise.
15622 (layout::print_line): Likewise.
15623 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
15624 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
15625 * input.c (selftest::test_linenum_comparisons): New function.
15626 (selftest::input_c_tests): Call it.
15627 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
15628 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
15629 * selftest.h (ASSERT_GT): New macro.
15630 (ASSERT_GT_AT): New macro.
15631 (ASSERT_LT): New macro.
15632 (ASSERT_LT_AT): New macro.
15634 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
15636 PR rtl-optimization/84780
15637 * combine.c (distribute_links): Don't make a link based on pc_rtx.
15639 2018-03-14 Martin Liska <mliska@suse.cz>
15641 * tree.c (record_node_allocation_statistics): Use
15642 get_stats_node_kind.
15643 (get_stats_node_kind): New function extracted from
15644 record_node_allocation_statistics.
15645 (free_node): Use get_stats_node_kind.
15647 2018-03-14 Richard Biener <rguenther@suse.de>
15649 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
15650 that the value-set of ANTIC_IN doesn't grow.
15653 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
15655 (BB_VISITED_WITH_VISITED_SUCCS): New define.
15656 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
15658 2018-03-14 Julia Koval <julia.koval@intel.com>
15660 * config.gcc (icelake-client, icelake-server): New.
15662 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
15663 (initial_ix86_arch_features): Ditto.
15664 (PTA_SKYLAKE): Add SGX.
15665 (PTA_ICELAKE): Remove.
15666 (PTA_ICELAKE_CLIENT): New.
15667 (PTA_ICELAKE_SERVER): New.
15668 (ix86_option_override_internal): Split up icelake on icelake client and
15670 (get_builtin_code_for_version): Ditto.
15671 (fold_builtin_cpu): Ditto.
15672 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
15673 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
15674 * config/i386/i386.h (processor_type): Ditto.
15675 * doc/invoke.texi: Ditto.
15677 2018-03-14 Jakub Jelinek <jakub@redhat.com>
15680 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
15681 INTEGER_CST offset, add it together with bitpos / 8 and
15682 sign extend based on POINTER_SIZE.
15686 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
15689 * config/i386/constraints.md (Yc): New register constraint.
15690 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
15691 Use Yc constraint for alternative 2 of operand 0. Remove
15692 preferred_for_speed attribute.
15694 2018-03-14 Richard Biener <rguenther@suse.de>
15696 PR tree-optimization/84830
15697 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
15698 with the old one to avoid oscillations.
15700 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
15703 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
15705 (assign_by_spills): Return a flag of reload assignment failure.
15706 Do not process the reload assignment failures. Do not spill other
15707 reload pseudos if they has the same reg class. Update n if
15709 (lra_assign): Add a return arg. Set up from the result of
15710 assign_by_spills call.
15711 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15712 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
15713 usage_insns if it is not NULL.
15714 (spill_hard_reg_in_range): New function.
15715 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15716 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15717 function prototypes.
15718 (lra_assign): Change prototype.
15719 * lra.c (lra): Add code to deal with fails by splitting hard reg
15722 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
15724 * config/riscv/riscv.opt (mrelax): New option.
15725 * config/riscv/riscv.c (riscv_file_start): Emit ".option
15726 "norelax" when riscv_mrelax is disabled.
15727 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
15729 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15732 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
15733 reassociation for int modes.
15735 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
15737 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
15738 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
15740 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
15741 * config/aarch64/aarch64-sve.md
15742 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
15743 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
15744 (*extend<mode><Vwide>2): Rename to...
15745 (aarch64_sve_extend<mode><Vwide>2): ...this.
15746 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
15747 renaming the old pattern to...
15748 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
15750 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
15751 define_expand, renaming the old pattern to...
15752 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
15753 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
15754 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
15755 account when deciding which SVE instruction the optab should use.
15756 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
15758 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
15760 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
15761 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
15762 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
15763 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
15764 (tlsdesc_small_<mode>): Turn a define_expand and use
15765 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
15766 (tlsdesc_small_advsimd_<mode>): ...this.
15767 (tlsdesc_small_sve_<mode>): New pattern.
15769 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
15771 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
15772 (UNSPEC_UMUL_HIGHPART): New constants.
15773 (MUL_HIGHPART): New int iteraor.
15774 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
15775 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
15777 (*<su>mul<mode>3_highpart): New define_insn.
15779 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
15782 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
15785 2018-03-13 Martin Liska <mliska@suse.cz>
15788 * (sem_item_optimizer::sem_item_optimizer): Initialize new
15790 (sem_item_optimizer::~sem_item_optimizer): Release it.
15791 (sem_item_optimizer::merge_classes): Register variable aliases.
15792 (sem_item_optimizer::fixup_pt_set): New function.
15793 (sem_item_optimizer::fixup_points_to_sets): Likewise.
15794 * ipa-icf.h: Declare new variables and functions.
15796 2018-03-13 Jakub Jelinek <jakub@redhat.com>
15798 PR middle-end/84834
15799 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
15800 integer_pow2p@2 and test integer_pow2p in condition.
15801 (A < 0 ? C : 0): Similarly for @1.
15803 PR middle-end/84831
15804 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
15805 characters starting at p contain '\0' character, don't look beyond
15809 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
15810 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
15813 * reg-stack.c (change_stack): Change update_end var from int to
15814 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
15815 also call set_block_for_insn on the newly added insns and rescan.
15818 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
15819 on the last operand.
15822 * tree.c (stabilize_reference_1): Return save_expr (e) for
15823 STATEMENT_LIST even if it doesn't have side-effects.
15825 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
15827 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
15829 2018-03-12 Renlin Li <renlin.li@arm.com>
15831 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
15832 aarch64_output_scalar_simd_mov_immediate.
15834 2018-03-12 Martin Sebor <msebor@redhat.com>
15836 PR tree-optimization/83456
15837 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
15838 for perfectly overlapping calls to memcpy.
15839 (gimple_fold_builtin_memory_chk): Same.
15840 (gimple_fold_builtin_strcpy): Handle no-warning.
15841 (gimple_fold_builtin_stxcpy_chk): Same.
15842 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
15844 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
15846 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
15847 parameter. Use it for SFmode.
15848 (rs6000_function_arg_advance_1): Adjust.
15849 (rs6000_function_arg): Adjust.
15850 (rs6000_gimplify_va_arg): Pass false for that new parameter.
15852 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
15854 PR rtl-optimization/84169
15855 PR rtl-optimization/84780
15856 * combine.c (can_combine_p): Check for a 2-insn combination whether
15857 the destination register is used between the two insns, too.
15859 2018-03-12 Richard Biener <rguenther@suse.de>
15861 PR tree-optimization/84803
15862 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
15863 for refs DR analysis didn't process.
15865 2018-03-12 Richard Biener <rguenther@suse.de>
15867 PR tree-optimization/84777
15868 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
15869 force-vectorize loops ignore whether we are optimizing for size.
15871 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
15873 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
15874 (TARGET_MD_ASM_ADJUST): Define.
15876 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
15877 Kito Cheng <kito.cheng@gmail.com>
15878 Chung-Ju Wu <jasonwucj@gmail.com>
15880 * config/nds32/nds32.c (nds32_compute_stack_frame,
15881 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
15882 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
15883 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
15884 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
15885 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
15886 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
15887 * config/nds32/nds32.md (prologue, epilogue): Use macro
15888 NDS32_V3PUSH_AVAILABLE_P to do checking.
15890 2018-03-11 Jakub Jelinek <jakub@redhat.com>
15893 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
15894 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
15895 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
15896 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
15897 addition of most attributes on !orig_type_die or the attribute not
15898 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
15900 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
15901 Chung-Ju Wu <jasonwucj@gmail.com>
15903 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
15904 __NDS32_VH__ macro.
15905 * config/nds32/nds32.opt (mvh): New option.
15907 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
15908 Chung-Ju Wu <jasonwucj@gmail.com>
15910 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
15912 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
15913 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
15916 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
15917 Chung-Ju Wu <jasonwucj@gmail.com>
15919 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
15921 * config/nds32/nds32-multiple.md (strlensi): New pattern.
15922 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
15924 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
15925 Kito Cheng <kito.cheng@gmail.com>
15926 Chung-Ju Wu <jasonwucj@gmail.com>
15928 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
15929 UNSPEC_FFMISM and UNSPEC_FLMISM.
15930 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
15931 for ffb, ffmism and flmism.
15932 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
15933 (unspec_ffmism): Ditto.
15934 (unspec_flmism): Ditto.
15935 (nds32_expand_builtin_impl): Check if string extension is available.
15936 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
15937 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
15939 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
15942 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
15945 * lra-assigns.c (assign_by_spills): Return a flag of reload
15946 assignment failure. Do not process the reload assignment
15947 failures. Do not spill other reload pseudos if they has the same
15949 (lra_assign): Add a return arg. Set up from the result of
15950 assign_by_spills call.
15951 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15952 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
15953 usage_insns if it is not NULL.
15954 (spill_hard_reg_in_range): New function.
15955 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15956 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15957 function prototypes.
15958 (lra_assign): Change prototype.
15959 * lra.c (lra): Add code to deal with fails by splitting hard reg
15962 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
15965 * config/i386/i386.opt: Replace Enforcment with Enforcement.
15967 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
15970 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
15971 (dw_val_node): Add val_symbolic_view.
15972 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
15973 (symview_upper_bound): New.
15974 (new_line_info_table): Initialize symviews_since_reset.
15975 (dwarf2out_source_line): Count symviews_since_reset and set
15976 symview_upper_bound.
15977 (dw_val_equal_p): Handle symview.
15978 (add_AT_symview): New.
15979 (print_dw_val): Handle symview.
15980 (attr_checksum, attr_checksum_ordered): Likewise.
15981 (same_dw_val_p, size_of_die): Likewise.
15982 (value_format, output_die): Likewise.
15983 (add_high_low_attributes): Use add_AT_symview for entry_view.
15984 (dwarf2out_finish): Reset symview_upper_bound, clear
15987 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
15990 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
15991 Add strict argument and use it.
15992 (rs6000_split_multireg_move): Update for new strict argument.
15993 (mem_operand_gpr): Disallow all non-offsettable addresses.
15994 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
15996 2018-03-09 Jakub Jelinek <jakub@redhat.com>
15999 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
16000 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
16001 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
16004 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
16005 decl, use remap_type if we want to use the type.
16007 2018-03-09 Martin Sebor <msebor@redhat.com>
16009 PR tree-optimization/84526
16010 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16012 (builtin_access::generic_overlap): Be prepared to handle non-array
16015 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
16017 PR rtl-optimization/84682
16018 * lra-constraints.c (process_address_1): Check is_address flag
16019 for address constraints.
16020 (process_alt_operands): Likewise.
16021 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
16022 preprocess_constraints.
16023 * recog.h (preprocess_constraints): Add oploc parameter.
16025 * recog.c (preprocess_constraints): Test address_operand for
16026 CT_ADDRESS constraints.
16028 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
16031 * lra-assigns.c (assign_by_spills): Return a flag of reload
16032 assignment failure. Do not process the reload assignment
16033 failures. Do not spill other reload pseudos if they has the same
16035 (lra_assign): Add a return arg. Set up from the result of
16036 assign_by_spills call.
16037 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16038 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16039 usage_insns if it is not NULL.
16040 (spill_hard_reg_in_range): New function.
16041 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16042 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16043 function prototypes.
16044 (lra_assign): Change prototype.
16045 * lra.c (lra): Add code to deal with fails by splitting hard reg
16048 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16051 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
16052 Accept complain bool parameter. Only emit errors if it is true.
16053 (arm_parse_cpu_option_name): Likewise.
16054 (arm_target_thumb_only): Adjust callers of the above.
16055 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
16056 prototype to take a default true bool parameter.
16057 (arm_parse_arch_option_name): Likewise.
16059 2018-03-09 David Malcolm <dmalcolm@redhat.com>
16060 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
16064 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
16065 * configure: Regenerate.
16066 * configure.ac ("linker --version-script option"): New.
16067 ("linker soname option"): New.
16069 2018-03-09 Richard Biener <rguenther@suse.de>
16071 PR tree-optimization/84775
16072 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
16073 immediate uses of predicate stmts and mark them modified.
16076 PR tree-optimization/84178
16077 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
16079 (version_loop_for_if_conversion): Delay update_ssa call.
16080 (tree_if_conversion): Delay update_ssa until after predicate
16083 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
16086 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
16087 when the function accesses prior frames.
16089 2018-03-08 Jakub Jelinek <jakub@redhat.com>
16092 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
16093 gen_llsym, otherwise call maybe_gen_llsym.
16095 PR inline-asm/84742
16096 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
16097 has ',' character inside of it.
16099 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16102 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
16103 as clobbering CC_REGNUM.
16105 2018-03-08 Richard Biener <rguenther@suse.de>
16107 PR middle-end/84552
16108 * tree-scalar-evolution.c: Include tree-into-ssa.h.
16109 (follow_copies_to_constant): Do not follow SSA names registered
16112 2018-03-08 Richard Biener <rguenther@suse.de>
16114 PR tree-optimization/84178
16115 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
16117 (version_loop_for_if_conversion): Delay update_ssa call.
16118 (tree_if_conversion): Delay update_ssa until after predicate
16121 2018-03-08 David Malcolm <dmalcolm@redhat.com>
16123 PR tree-optimization/84178
16124 * tree-if-conv.c (release_bb_predicate): Remove the
16125 the assertion that the stmts have NULL use_ops.
16126 Discard the statements, asserting that they haven't
16127 yet been added to a BB.
16129 2018-03-08 Richard Biener <rguenther@suse.de>
16131 PR tree-optimization/84746
16132 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
16133 (phi_translate): Pass in destination ANTIC_OUT set.
16134 (phi_translate_1): Likewise. For a simplified result lookup
16135 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
16136 (phi_translate_set): Adjust.
16137 (do_pre_regular_insertion): Likewise.
16138 (do_pre_partial_partial_insertion): Likewise.
16140 2018-03-08 Martin Liska <mliska@suse.cz>
16142 PR gcov-profile/84735
16143 * doc/gcov.texi: Document usage of profile files.
16144 * gcov-io.h: Document changes in the format.
16146 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
16150 * dwarf2out.c (struct dw_line_info_table): Update comments for
16152 (FORCE_RESET_NEXT_VIEW): New.
16153 (FORCE_RESETTING_VIEW_P): New.
16154 (RESETTING_VIEW_P): Check for -1 too.
16155 (ZERO_VIEW_P): Likewise.
16156 (new_line_info_table): Force-reset next view.
16157 (dwarf2out_begin_function): Likewise.
16158 (dwarf2out_source_line): Simplify zero_view_p initialization.
16159 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
16160 view directly. Omit view when omitting .loc at line 0.
16162 2018-03-08 Jakub Jelinek <jakub@redhat.com>
16164 PR tree-optimization/84740
16165 * tree-switch-conversion.c (process_switch): Call build_constructors
16166 only if info.phi_count is non-zero.
16168 PR tree-optimization/84739
16169 * tree-tailcall.c (find_tail_calls): Check call arguments against
16170 DECL_ARGUMENTS (current_function_decl) rather than
16171 DECL_ARGUMENTS (func) when checking for tail recursion.
16173 2018-03-07 Jakub Jelinek <jakub@redhat.com>
16175 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
16176 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
16177 Volker Reichelt's entry and add entries for people that perform
16178 GCC fuzzy testing and report numerous bugs.
16180 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
16183 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
16184 readonly data in sdata, if that is disabled.
16185 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
16186 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
16187 -mreadonly-in-sdata option.
16189 2018-03-07 Martin Sebor <msebor@redhat.com>
16191 PR tree-optimization/84468
16192 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
16193 basic block when looking for nul assignment.
16195 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
16198 * except.h (output_function_exception_table): Adjust prototype.
16199 * except.c (output_function_exception_table): Remove FNNAME parameter
16200 and add SECTION parameter. Ouput one part of the table at a time.
16201 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
16202 the first part of the exception table and emit unwind directives.
16203 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
16204 (i386_pe_seh_cold_init): Likewise.
16205 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
16206 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
16207 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
16208 (ix86_output_call_insn): Emit a nop in one more case for SEH.
16209 * config/i386/winnt.c: Include except.h.
16210 (struct seh_frame_state): Add reg_offset, after_prologue and
16211 in_cold_section fields.
16212 (i386_pe_seh_end_prologue): Set seh->after_prologue.
16213 (i386_pe_seh_cold_init): New function.
16214 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
16215 to seh->in_cold_section.
16216 (seh_emit_push): Record the offset of the push.
16217 (seh_emit_save): Record the offet of the save.
16218 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
16219 Test seh->after_prologue to disregard the epilogue.
16220 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
16221 (i386_pe_end_cold_function): New function.
16223 2018-03-07 Jakub Jelinek <jakub@redhat.com>
16226 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
16227 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
16230 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
16232 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
16233 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
16235 PR middle-end/84723
16236 * multiple_target.c: Include tree-inline.h and intl.h.
16237 (expand_target_clones): Diagnose and fail if node->definition and
16238 !tree_versionable_function_p (node->decl).
16240 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
16242 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
16244 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
16245 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
16246 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
16248 2018-03-06 Jakub Jelinek <jakub@redhat.com>
16251 * combine.c (try_combine): Use reg_or_subregno instead of handling
16252 just paradoxical SUBREGs and REGs.
16254 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
16256 * config/arc/arc.c (arc_finalize_pic): Remove function.
16257 (arc_must_save_register): We use single base PIC register, remove
16258 checks to save/restore the PIC register.
16259 (arc_expand_prologue): Likewise.
16260 * config/arc/arc-protos.h (arc_set_default_type_attributes):
16262 (arc_verify_short): Likewise.
16263 (arc_attr_type): Likewise.
16264 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
16265 (walk_stores): Likewise.
16266 (arc_address_cost): Make it static.
16267 (arc_verify_short): Likewise.
16268 (branch_dest): Likewise.
16269 (arc_attr_type): Likewise.
16270 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
16271 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
16272 (arc_final_prescan_insn): Remove inserting the nops due to
16273 hardware hazards. It is done in reorg step.
16274 (insn_length_variant_t): Remove.
16275 (insn_length_parameters_t): Likewise.
16276 (arc_insn_length_parameters): Likewise.
16277 (arc_get_insn_variants): Likewise.
16278 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
16280 2018-03-06 Jakub Jelinek <jakub@redhat.com>
16282 PR inline-asm/84683
16283 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
16286 PR tree-optimization/84687
16287 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
16289 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
16291 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16293 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
16294 Rename to ppc_speculation_barrier.
16295 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
16296 __builtin_ppc_speculation_barrier.
16298 2018-03-05 Jakub Jelinek <jakub@redhat.com>
16301 * combine.c (combine_simplify_rtx): Don't try to simplify if
16302 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
16305 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
16307 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
16308 to 32 bytes when compiling for POWER9.
16310 2018-03-05 Jakub Jelinek <jakub@redhat.com>
16313 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
16314 regparm >= 3 with no arg reg available also for calls with
16315 flag_force_indirect_call. Pass decl to ix86_function_regparm.
16318 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
16320 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
16322 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
16325 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
16327 2018-03-05 Richard Biener <rguenther@suse.de>
16329 PR tree-optimization/84486
16330 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
16331 When inserting a __builtin_assume_aligned call set the LHS
16332 SSA name alignment info accordingly.
16334 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
16336 PR tree-optimization/84114
16337 * config/aarch64/aarch64.c (aarch64_reassociation_width)
16338 Avoid reassociation of FLOAT_MODE addition.
16340 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
16342 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
16343 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
16344 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
16345 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
16346 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
16347 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
16348 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
16350 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
16351 __builtin_ia32_wbinvd): New builtins.
16352 (SPECIAL_ARGS2): New.
16353 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
16354 (SPECIAL_ARGS2): New.
16355 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
16356 (ix86_valid_target_attribute_inner_p): Ditto.
16357 (ix86_init_mmx_sse_builtins): Add special_args2.
16358 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
16359 TARGET_WBNOINVD_P): New.
16360 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
16361 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
16362 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
16363 * config/i386/immintrin.h (_wbinvd): New intrinsic.
16364 * config/i386/pconfigintrin.h: New file.
16365 * config/i386/wbnoinvdintrin.h: Ditto.
16366 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
16368 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
16370 2018-03-05 Richard Biener <rguenther@suse.de>
16372 PR tree-optimization/84670
16373 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16375 (BB_VISITED_WITH_VISITED_SUCCS): New define.
16376 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16377 (compute_antic_aux): Only assert the number of values in ANTIC_IN
16378 doesn't grow if all successors (recursively) were visited at least
16381 2018-03-05 Richard Biener <rguenther@suse.de>
16383 PR tree-optimization/84650
16384 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
16385 if executed in the loop pipeline.
16387 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
16389 * doc/configfiles.texi (Configuration Files): Move info about
16390 conditionalizing $target-protos.h to...
16391 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
16392 differs from $target-protos.h.
16394 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
16395 Chung-Ju Wu <jasonwucj@gmail.com>
16397 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
16398 * config/nds32/nds32-multiple.md (setmemsi): Define.
16399 * config/nds32/nds32-memory-manipulation.c
16400 (nds32_gen_dup_4_byte_to_word_value): New.
16401 (emit_setmem_word_loop): New.
16402 (emit_setmem_byte_loop): New.
16403 (nds32_expand_setmem_loop): New.
16404 (nds32_expand_setmem_loop_v3m): New.
16405 (nds32_expand_setmem_unroll): New.
16406 (nds32_expand_setmem): New.
16408 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
16409 Chung-Ju Wu <jasonwucj@gmail.com>
16411 * config/nds32/nds32-memory-manipulation.c
16412 (nds32_emit_load_store): New.
16413 (nds32_emit_post_inc_load_store): New.
16414 (nds32_emit_mem_move): New.
16415 (nds32_emit_mem_move_block): New.
16416 (nds32_expand_movmemsi_loop_unknown_size): New.
16417 (nds32_expand_movmemsi_loop_known_size): New.
16418 (nds32_expand_movmemsi_loop): New.
16419 (nds32_expand_movmemsi_unroll): New.
16420 (nds32_expand_movmemqi): Rename ...
16421 (nds32_expand_movmemsi): ... to this.
16422 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
16423 (movmemsi): ... to this.
16424 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
16425 (nds32_expand_movmemsi): ... to this.
16427 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
16428 Monk Chiang <sh.chiang04@gmail.com>
16429 Chung-Ju Wu <jasonwucj@gmail.com>
16431 * config/nds32/nds32-protos.h
16432 (nds32_expand_load_multiple): New arguments.
16433 (nds32_expand_store_multiple): Ditto.
16434 (nds32_valid_multiple_load_store): Rename ...
16435 (nds32_valid_multiple_load_store_p): ... to this.
16436 * config/nds32/nds32-memory-manipulation.c
16437 (nds32_expand_load_multiple): Refine implementation.
16438 (nds32_expand_store_multiple): Ditto.
16439 * config/nds32/nds32-multiple.md
16440 (load_multiple): Update nds32_expand_load_multiple interface.
16441 (store_multiple): Update nds32_expand_store_multiple interface.
16442 * config/nds32/nds32-predicates.c
16443 (nds32_valid_multiple_load_store): Rename ...
16444 (nds32_valid_multiple_load_store_p): ... to this and refine
16446 * config/nds32/predicates.md
16447 (nds32_load_multiple_and_update_address_operation): New predicate.
16448 (nds32_store_multiple_and_update_address_operation): New predicate.
16450 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
16451 Chung-Ju Wu <jasonwucj@gmail.com>
16453 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
16454 (combo): New attribute.
16455 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
16457 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
16459 * config/nds32/nds32.opt: Change -mcmodel= default value.
16461 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
16462 Monk Chiang <sh.chiang04@gmail.com>
16463 Chung-Ju Wu <jasonwucj@gmail.com>
16465 * config/nds32/constants.md (unspec_element): New enum.
16466 * config/nds32/constraints.md (Umw): New constraint.
16467 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
16468 * config/nds32/nds32-intrinsic.md: Likewise.
16469 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
16470 (nds32_valid_smw_lwm_base_p): New.
16471 (nds32_output_smw_single_word): New.
16472 (nds32_output_lmw_single_word): New.
16473 (nds32_expand_unaligned_load): New.
16474 (nds32_expand_unaligned_store): New.
16475 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
16476 (nds32_output_smw_single_word): Declare.
16477 (nds32_output_lmw_single_word): Declare.
16478 (nds32_expand_unaligned_load): Declare.
16479 (nds32_expand_unaligned_store): Declare.
16480 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
16481 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
16482 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
16483 NDS32_BUILTIN_UASTORE_DW.
16484 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
16487 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
16488 Kito Cheng <kito.cheng@gmail.com>
16489 Chung-Ju Wu <jasonwucj@gmail.com>
16491 * config/nds32/nds32-intrinsic.c
16492 (nds32_expand_builtin_null_ftype_reg): Delete.
16493 (nds32_expand_builtin_reg_ftype_imm): Ditto.
16494 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
16495 (nds32_read_argument): New.
16496 (nds32_legitimize_target): Ditto.
16497 (nds32_legitimize_argument): Ditto.
16498 (nds32_check_constant_argument): Ditto.
16499 (nds32_expand_unop_builtin): Ditto.
16500 (nds32_expand_unopimm_builtin): Ditto.
16501 (nds32_expand_binop_builtin): Ditto.
16502 (nds32_builtin_decl_impl): Ditto.
16503 (builtin_description): Ditto.
16504 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
16505 (nds32_init_builtins_impl): Ditto.
16506 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
16507 (nds32_builtin_decl): New.
16508 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
16509 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
16511 2018-03-02 Jeff Law <law@redhat.com>
16513 * reorg.c (stop_search_p): Handle DEBUG_INSN.
16514 (redundant_insn, fill_simple_delay_slots): Likewise.
16515 (fill_slots_from_thread): Likewise.
16516 * resource.c (mark_referenced_resources): Likewise.
16517 (mark_set_resources, find_dead_or_set_registers): Likewise.
16519 2018-03-02 Jakub Jelinek <jakub@redhat.com>
16521 * substring-locations.h (format_warning_va): Formatting fix for
16522 ATTRIBUTE_GCC_DIAG.
16523 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
16525 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
16526 * substring-locations.c: Include intl.h.
16527 (format_warning_va): Turned into small wrapper around
16528 format_warning_n_va, renamed to ...
16529 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
16530 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
16532 (format_warning_at_substring_n): New function.
16533 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
16534 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
16535 format_warning_at_substring with just a shorter name instead of
16536 const function pointer.
16537 (fmtwarn_n): New function.
16538 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
16539 appropriate, get rid of all the fmtstr temporaries, move conditionals
16540 with G_() wrapped string literals directly into fmtwarn arguments,
16541 cast dir.len to (int), formatting fixes.
16543 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
16545 * doc/invoke.texi: Remove "Cilk Plus" references.
16547 2018-03-02 Jakub Jelinek <jakub@redhat.com>
16548 Richard Biener <rguenther@suse.de>
16551 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
16552 for error or warning attributes if CALL_FROM_THUNK_P is set.
16555 2018-03-02 Jakub Jelinek <jakub@redhat.com>
16558 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
16559 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
16562 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
16563 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
16565 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
16566 instead of -1U in last predictors element's probability member.
16568 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
16571 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
16572 arguments if they are comparable.
16574 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
16576 PR tree-optimization/84634
16577 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
16578 masks and masked_loop_p with a single loop_masks, making sure it's
16579 null for bb vectorization.
16581 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
16583 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
16584 (vect_analyze_data_ref_access): Use loop->safe_len rather than
16585 loop->force_vectorize to check whether there is no alias.
16587 2018-03-02 Jakub Jelinek <jakub@redhat.com>
16590 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
16592 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
16594 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
16595 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
16596 instead of a loop around prev_real_insn.
16597 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
16600 PR inline-asm/84625
16601 * config/i386/i386.c (ix86_print_operand): Use conditional
16602 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
16605 2018-03-02 Richard Biener <rguenther@suse.de>
16607 PR tree-optimization/84427
16608 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
16609 (bitmap_set_subtract_values): Rewrite to handle multiple
16612 (prune_clobbered_mems): Likewise.
16613 (phi_translate): Take edge instead of pred/phiblock.
16614 (phi_translate_1): Likewise.
16615 (phi_translate_set): Likewise. Insert all translated
16616 exprs for a value into the set, keeping possibly multiple
16617 expressions per value.
16618 (compute_antic_aux): Adjust for phi_translate changes.
16619 When intersecting union the expressions and prune those
16620 not in the final value set, keeping possibly multiple
16621 expressions per value. Do not use value-insertion
16622 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
16623 all expressions. Add verification that the value-sets
16624 only shrink during iteration.
16625 (compute_partial_antic_aux): Adjust for the phi_translate changes.
16626 (do_pre_regular_insertion): Likewise.
16627 (do_pre_partial_partial_insertion): Likewise.
16629 2018-03-02 Richard Biener <rguenther@suse.de>
16632 * config/darwin.c (saved_debug_info_level): New static global.
16633 (darwin_asm_lto_start): Disable debug info generation for LTO out.
16634 (darwin_asm_lto_end): Restore debug info generation settings.
16636 2018-03-01 Martin Liska <mliska@suse.cz>
16639 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
16640 volatile arguments.
16642 2018-03-01 Richard Biener <rguenther@suse.de>
16645 * dwarf2out.c (gen_variable_die): Properly handle late VLA
16646 type annotation with LTO when debug was disabled at compile-time.
16648 2018-03-01 Matthew Fortune <mfortune@gmail.com>
16650 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
16652 (mips_final_postscan_insn): Likewise.
16654 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
16656 PR rtl-optimization/84528
16657 * alias.c (init_alias_target): Add commentary.
16658 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
16659 a unique base value if the frame pointer is not eliminated
16660 to the stack pointer.
16662 2018-03-01 Tom de Vries <tom@codesourcery.com>
16664 PR rtl-optimization/83327
16665 * lra-int.h (hard_regs_spilled_into): Declare.
16666 * lra.c (hard_regs_spilled_into): Define.
16667 (init_reg_info): Init hard_regs_spilled_into.
16668 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
16669 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
16670 (process_bb_lives): Handle hard_regs_spilled_into.
16671 (lra_create_live_ranges_1): Before doing liveness propagation, clear
16672 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
16674 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
16676 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
16677 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
16678 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
16679 * config/rs6000/aix72.h: New file.
16681 2018-02-28 Jakub Jelinek <jakub@redhat.com>
16683 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
16684 instead of warning_at with conditional singular and plural messages
16688 * stor-layout.c (update_alignment_for_field): For
16689 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
16690 && !DECL_PACKED (field), do the alignment update, just use
16691 only desired_align instead of MAX (type_align, desired_align)
16693 (place_field): Don't do known_align < desired_align handling
16694 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
16695 is non-NULL, instead do it after rli->prev_field handling and
16696 only if not within a bitfield word. For DECL_PACKED (field)
16697 use type_align of BITS_PER_UNIT.
16699 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
16701 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
16702 superfluous parentheses and trailing spaces.
16704 2018-02-28 Richard Biener <rguenther@suse.de>
16706 PR tree-optimization/84584
16707 * graphite-scop-detection.c (scop_detection::add_scop): Discard
16708 SCoPs with fake exit edge.
16710 2018-02-28 Martin Liska <mliska@suse.cz>
16713 * timevar.c (timer::print): Fix format to properly print 100%
16716 2018-02-28 Richard Biener <rguenther@suse.de>
16718 PR middle-end/84607
16719 * genmatch.c (capture_info::walk_match): Do not mark
16720 captured expressions without operands as expr_p given
16721 they act more like predicates and should be subject to
16722 "lost tail" side-effect preserving.
16724 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
16726 PR rtl-optimization/81611
16727 * auto-inc-dec.c (attempt_change): Move dead note from
16728 mem_insn if it's the next use of regno
16729 (find_address): Take address use of reg holding
16730 non-incremented value. Add parm to limit search to the named
16732 (merge_in_block): Attempt to use a mem insn that is the next
16733 use of the original regno.
16735 2018-02-27 Martin Sebor <msebor@redhat.com>
16738 * doc/invoke.texi (-Wmissing-attributes): New option.
16739 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
16741 2018-02-27 Martin Sebor <msebor@redhat.com>
16743 PR translation/84207
16744 * diagnostic-core.h (warning_n, error_n, inform_n): Change
16745 n argument to unsigned HOST_WIDE_INT.
16746 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
16747 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
16748 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
16749 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
16751 2018-02-27 Richard Biener <rguenther@suse.de>
16753 PR tree-optimization/84512
16754 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
16755 Do not use the estimate returned from record_stmt_cost for
16756 the scalar iteration cost but sum properly using add_stmt_cost.
16758 2018-02-27 Richard Biener <rguenther@suse.de>
16760 PR tree-optimization/84466
16761 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
16762 Adjust last change to less strictly validate use operands.
16764 2018-02-27 Martin Liska <mliska@suse.cz>
16766 PR gcov-profile/84548
16767 * gcov.c (process_file): Allow partial overlap and consider it
16768 also as group functions.
16769 (output_lines): Properly calculate range of lines for a group.
16771 2018-02-27 Martin Liska <mliska@suse.cz>
16773 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
16774 'ggc' suffixes. Change first column width.
16775 (timer::print): Fix formatting of the column.
16777 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
16779 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
16780 preserve inline entry blocks for the sake of debug inline
16781 entry point markers alone.
16782 (remove_unused_locals): Suggest in comments a better place to
16783 force the preservation of inline entry blocks that are
16784 otherwise unused, but do not preserve them.
16786 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
16788 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
16790 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
16793 * config/i386/constraints.md (Bs): Replace
16794 ix86_indirect_branch_register with
16795 TARGET_INDIRECT_BRANCH_REGISTER.
16797 * config/i386/i386.md (indirect_jump): Likewise.
16798 (tablejump): Likewise.
16799 (*sibcall_memory): Likewise.
16800 (*sibcall_value_memory): Likewise.
16801 Peepholes of indirect call and jump via memory: Likewise.
16802 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
16803 (*sibcall_value_GOT_32): Likewise.
16804 * config/i386/predicates.md (indirect_branch_operand): Likewise.
16805 (GOT_memory_operand): Likewise.
16806 (call_insn_operand): Likewise.
16807 (sibcall_insn_operand): Likewise.
16808 (GOT32_symbol_operand): Likewise.
16809 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
16811 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
16813 PR rtl-optimization/83496
16814 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
16815 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
16816 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
16817 redundant insn, if any.
16818 (relax_delay_slots): Likewise.
16819 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
16821 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
16823 PR tree-optimization/83965
16824 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
16825 that grouped statements are part of a reduction chain. Return
16826 true if the statement is not marked as a reduction itself but
16827 is part of a group.
16828 (vect_recog_dot_prod_pattern): Don't check whether the statement
16829 is part of a group here.
16830 (vect_recog_sad_pattern): Likewise.
16831 (vect_recog_widen_sum_pattern): Likewise.
16833 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
16836 * final.c (rest_of_clean_state): Also look for calls inside sequences.
16838 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
16841 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
16843 (ix86_output_indirect_function_return): New prototype.
16844 (ix86_split_simple_return_pop_internal): Likewise.
16845 * config/i386/i386.c (indirect_return_via_cx): New.
16846 (indirect_return_via_cx_bnd): Likewise.
16847 (indirect_thunk_name): Handle return va CX_REG.
16848 (output_indirect_thunk_function): Create alias for
16849 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
16850 (ix86_output_indirect_jmp): Remove the bool argument.
16851 (ix86_output_indirect_function_return): New function.
16852 (ix86_split_simple_return_pop_internal): Likewise.
16853 * config/i386/i386.md (*indirect_jump): Don't pass false
16854 to ix86_output_indirect_jmp.
16855 (*tablejump_1): Likewise.
16856 (simple_return_pop_internal): Change it to define_insn_and_split.
16857 Call ix86_split_simple_return_pop_internal to split it for
16858 -mfunction-return=.
16859 (simple_return_indirect_internal): Call
16860 ix86_output_indirect_function_return instead of
16861 ix86_output_indirect_jmp.
16863 2018-02-26 Jakub Jelinek <jakub@redhat.com>
16866 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
16867 memset and value initialization afterwards.
16869 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
16871 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
16873 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16876 * common/config/aarch64/aarch64-common.c
16877 (aarch_option_optimization_table[]): Switch
16878 off fomit-frame-pointer
16880 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
16881 Chung-Ju Wu <jasonwucj@gmail.com>
16883 * config/nds32/nds32-multiple.md (load_multiple): Disallow
16885 (store_multiple): Ditto.
16887 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
16889 * config.gcc: Add --with-cpu support for nds32 target.
16890 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
16891 * config/nds32/nds32.opt: Add -mcpu= option.
16893 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
16895 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
16896 isel=yes): Warn for these deprecated options.
16898 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
16900 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
16901 ISA_2_5_MASKS_EMBEDDED.
16903 2018-02-23 Jakub Jelinek <jakub@redhat.com>
16905 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
16906 p->max as pointers rather than using iterative_hash_expr.
16908 2018-02-23 Carl Love <cel@us.ibm.com>
16910 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
16911 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
16913 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
16914 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
16915 P8V_BUILTIN_VEC_VUNSIGNED2.
16917 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
16920 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
16921 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
16923 * lra-constraints.c (curr_insn_transform): Set up
16924 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
16926 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
16927 * lra-eliminations.c (spill_pseudos): Ditto.
16928 (process_insn_for_elimination): Ditto.
16929 * lra-lives.c (reg_early_clobber_p): Use the new macros.
16930 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
16931 LRA_NON_CLOBBERED_ALT.
16933 2018-02-22 Martin Sebor <msebor@redhat.com>
16935 PR tree-optimization/84480
16936 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
16937 to maybe_diag_stxncpy_trunc. Call it.
16938 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
16939 from gimple_fold_builtin_strcpy. Print inlining stack.
16940 (handle_builtin_stxncpy): Print inlining stack.
16941 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
16943 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
16946 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
16947 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
16948 and -fcheck-pointer-bounds are used together.
16949 (indirect_thunk_prefix): New enum.
16950 (indirect_thunk_need_prefix): New function.
16951 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
16952 "_nt" instead of "_bnd" for NOTRACK prefix.
16953 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
16954 (output_indirect_thunk_function): Likewise.
16956 (ix86_code_end): Update output_indirect_thunk_function calls.
16957 (ix86_output_indirect_branch_via_reg): Replace
16958 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
16959 (ix86_output_indirect_branch_via_push): Likewise.
16960 (ix86_output_function_return): Likewise.
16961 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
16962 incompatible with -fcf-protection=branch and
16963 -fcheck-pointer-bounds.
16965 2018-02-22 Steve Ellcey <sellcey@cavium.com>
16968 * config/aarch64/aarch64.c (aarch64_print_address_internal):
16969 Change gcc_assert call to output_operand_lossage.
16971 2018-02-22 Steve Ellcey <sellcey@cavium.com>
16973 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
16975 2018-02-22 DJ Delorie <dj@redhat.com>
16976 Sebastian Perta <sebastian.perta@renesas.com>
16977 Oleg Endo <olegendo@gcc.gnu.org>
16979 * config/rx/rx.c (rx_rtx_costs): New function.
16980 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
16982 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
16984 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
16986 2018-02-22 Martin Liska <mliska@suse.cz>
16989 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
16990 Add "native" as a possible value.
16992 2018-02-22 Martin Liska <mliska@suse.cz>
16995 * config/i386/i386.c (ix86_option_override_internal):
16996 Add "native" as a possible value for -march and -mtune.
16998 2018-02-22 Jakub Jelinek <jakub@redhat.com>
17001 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
17002 to all type variants.
17004 PR tree-optimization/84503
17005 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
17006 width as info->bitpos + info->bitsize - start.
17007 (merged_store_group::merge_overlapping): Simplify width computation.
17008 (check_no_overlap): New function.
17009 (imm_store_chain_info::try_coalesce_bswap): Compute expected
17010 start + width and last_order of the group, fail if check_no_overlap
17012 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
17013 to group if check_no_overlap fails.
17015 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
17017 * config/rs6000/altivec.md: Delete contraint arguments to
17018 define_expand, define_split, and define_peephole2, and in
17019 define_insn_and_split if always unused.
17020 * config/rs6000/darwin.md: Ditto.
17021 * config/rs6000/dfp.md: Ditto.
17022 * config/rs6000/rs6000.md: Ditto.
17023 * config/rs6000/sync.md: Ditto.
17024 * config/rs6000/vector.md: Ditto.
17025 * config/rs6000/vsx.md: Ditto.
17027 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
17029 * config/rs6000/altivec.md: Write output control strings as braced
17030 blocks instead of double-quoted strings.
17031 * config/rs6000/darwin.md: Ditto.
17032 * config/rs6000/rs6000.md: Ditto.
17033 * config/rs6000/vector.md: Ditto.
17034 * config/rs6000/vsx.md: Ditto.
17036 2018-02-21 Jason Merrill <jason@redhat.com>
17038 PR c++/84314 - ICE with templates and fastcall attribute.
17039 * attribs.c (build_type_attribute_qual_variant): Remove assert.
17041 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
17043 * ipa-cp.c (determine_versionability): Fix comment typos.
17045 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
17048 * ipa-cp.c (determine_versionability): Do not version functions caling
17051 2018-02-21 Martin Liska <mliska@suse.cz>
17054 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
17055 Add "native" as a possible value.
17056 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
17057 the macro when native cpu detection is available.
17059 2018-02-21 Martin Liska <mliska@suse.cz>
17062 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
17063 Add "native" as a possible value.
17064 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
17065 when native cpu detection is available.
17067 2018-02-21 Jakub Jelinek <jakub@redhat.com>
17068 Martin Sebor <msebor@redhat.com>
17070 PR tree-optimization/84478
17071 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
17073 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
17074 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
17075 support which is conservatively correct, for 2 only stay conservative
17076 for maxlen. Formatting and comment capitalization fixes. Add STRICT
17077 argument to the 2 argument get_range_strlen, adjust 6 arg
17078 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
17080 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
17081 (gimple_fold_builtin_strlen): Pass true as last argument to
17084 2018-02-20 Martin Sebor <msebor@redhat.com>
17086 PR middle-end/84095
17087 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
17088 (builtin_memref::set_base_and_offset): Same. Handle inner references.
17089 (builtin_memref::builtin_memref): Factor out parts into
17090 set_base_and_offset and call it.
17092 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
17094 PR middle-end/84406
17095 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
17096 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
17097 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
17098 search at the associated MODE_INT.
17100 2018-02-20 Jeff Law <law@redhat.com>
17102 PR middle-end/82123
17103 PR tree-optimization/81592
17104 PR middle-end/79257
17105 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
17106 for range data rather than using global data.
17107 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
17108 range data rather than using global data.
17109 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
17110 pass it to children as needed.
17111 (struct directive::fmtresult): Similarly.
17112 (struct directive::set_width): Similarly.
17113 (struct directive::set_precision): Similarly.
17114 (format_integer, format_directive, parse_directive): Similarly.
17115 (format_none): Accept unnamed vr_values parameter.
17116 (format_percent, format_floating, format_character): Similarly.
17117 (format_string, format_plain): Similarly.
17118 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
17119 the EVRP range analyzer for range data rather than using global data.
17120 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
17121 gimple-ssa-evrp-analyze.h
17122 (class sprintf_dom_walker): Add after_dom_children member function.
17123 Add evrp_range_analyzer member.
17124 (sprintf_dom_walker::before_dom_children): Call into the EVRP
17125 range analyzer as needed.
17126 (sprintf_dom_walker::after_dom_children): New member function.
17127 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
17129 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
17130 (evrp_range_analyzer::pop_to_marker): Likewise.
17132 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
17134 PR tree-optimization/84419
17135 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
17136 with the required type if its current type is compatible but
17139 2018-02-20 Jakub Jelinek <jakub@redhat.com>
17141 PR middle-end/82004
17142 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
17143 after vectorization.
17145 2018-02-20 Martin Liska <mliska@suse.cz>
17148 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
17149 possible values if we don't have a hint.
17151 2018-02-20 Martin Liska <mliska@suse.cz>
17155 * final.c (shorten_branches): Build align_tab array with one
17157 * opts.c (finish_options): Add alignment option limit check.
17158 (MAX_CODE_ALIGN): Likewise.
17159 (MAX_CODE_ALIGN_VALUE): Likewise.
17160 * doc/invoke.texi: Document maximum allowed option value for
17161 all -falign-* options.
17163 2018-02-19 Jakub Jelinek <jakub@redhat.com>
17166 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
17167 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
17168 * var-tracking.c (emit_note_insn_var_location): Remove all references
17169 to NOTE_INSN_CALL_ARG_LOCATION.
17170 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
17171 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
17172 Use copy_rtx_if_shared.
17173 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
17174 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
17175 (dwarf2out_var_location): Remove handling of
17176 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
17178 * final.c (final_scan_insn): Remove all references to
17179 NOTE_INSN_CALL_ARG_LOCATION.
17180 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
17181 before dumping final insns.
17182 * except.c (emit_note_eh_region_end): Remove all references to
17183 NOTE_INSN_CALL_ARG_LOCATION.
17184 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
17185 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
17186 * config/arc/arc.c (hwloop_optimize): Likewise.
17187 * config/arm/arm.c (create_fix_barrier): Likewise.
17188 * config/s390/s390.c (s390_chunkify_start): Likewise.
17189 * config/sh/sh.c (find_barrier): Likewise.
17190 * config/i386/i386.c (rest_of_insert_endbranch,
17191 ix86_seh_fixup_eh_fallthru): Likewise.
17192 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
17193 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
17194 * config/frv/frv.c (frv_function_prologue): Likewise.
17195 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
17197 (note_outside_basic_block_p): Remove all references to
17198 NOTE_INSN_CALL_ARG_LOCATION.
17199 * gengtype.c (adjust_field_rtx_def): Likewise.
17200 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
17202 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
17203 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
17206 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
17209 PR tree-optimization/84452
17210 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
17211 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
17214 2018-02-19 Martin Liska <mliska@suse.cz>
17217 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
17219 2018-02-19 Martin Liska <mliska@suse.cz>
17220 Richard Sandiford <richard.sandiford@linaro.org>
17222 PR tree-optimization/82491
17223 * gimple-fold.c (get_base_constructor): Make earlier bail out
17226 2018-02-19 Carl Love <cel@us.ibm.com>
17228 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
17229 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
17231 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
17232 P8V_BUILTIN_VEC_NEG.
17234 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
17236 * config/rl78/rl78.md (movdf): New define expand.
17238 2018-02-19 Martin Liska <mliska@suse.cz>
17241 * doc/invoke.texi: Fix typo.
17242 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
17244 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
17246 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
17247 handle rs6000_single_float and rs6000_double_float specially for
17250 2018-02-16 Jeff Law <law@redhat.com>
17252 * config/rx/rx.c (add_pop_cfi_notes): New function.;
17253 (pop_regs): Use it.
17255 2018-02-16 Jakub Jelinek <jakub@redhat.com>
17258 * ipa-inline.c (inline_small_functions): Fix a typo.
17260 2018-02-16 Nathan Sidwell <nathan@acm.org>
17262 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
17264 2018-02-16 Carl Love <cel@us.ibm.com>
17266 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
17267 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
17268 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
17269 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
17270 expansion to P8V_BUILTIN_VEC_FLOAT2.
17272 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
17274 PR rtl-optimization/70023
17275 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
17276 src_regno into account.
17278 2018-02-16 Carl Love <cel@us.ibm.com>
17280 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
17281 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
17282 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
17283 * config/rs6000/rs6000.c: Remove case statements for
17284 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
17285 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
17286 and P9V_BUILTIN_VEC_VINSERT4B.
17287 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
17288 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
17289 * config/rs6000/vsx.md:
17290 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
17293 2018-02-16 Carl Love <cel@us.ibm.com>
17295 * config/rs6000/altivec.h: Add builtin names vec_extract4b
17297 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
17299 * config/rs6000/rs6000-c.c: Add the definitions for
17300 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
17301 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
17302 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
17303 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
17304 definition for insert4b and define insn *insert3b_internal.
17305 * doc/extend.texi: Add documentation for vec_extract4b.
17307 2018-02-16 Nathan Sidwell <nathan@acm.org>
17309 * doc/extend.texi (Backwards Compatibility): Mention friend
17310 injection. Note for-scope is deprecated.
17311 * doc/invoke.texi (-ffriend-injection): Deprecate.
17313 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
17315 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
17316 that moved to I2, also allow destinations that are a paradoxical
17317 subreg (instead of a normal reg).
17319 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
17322 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
17325 2018-02-16 Richard Biener <rguenther@suse.de>
17327 PR tree-optimization/84037
17328 PR tree-optimization/84016
17330 * config/i386/i386.c (ix86_builtin_vectorization_cost):
17331 Adjust vec_construct for the fact we need additional higher latency
17332 128bit inserts for AVX256 and AVX512 vector builds.
17333 (ix86_add_stmt_cost): Scale vector construction cost for
17336 2018-02-16 Richard Biener <rguenther@suse.de>
17338 PR tree-optimization/84417
17339 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
17340 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
17341 (non_rewritable_lvalue_p): Likewise, use poly-ints.
17343 2018-02-16 Martin Liska <mliska@suse.cz>
17346 * internal-fn.def (ASAN_CHECK): Set proper flags.
17347 (ASAN_MARK): Likewise.
17349 2018-02-16 Julia Koval <julia.koval@intel.com>
17351 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
17352 from PTA_CANNONLAKE.
17354 2018-02-16 Jakub Jelinek <jakub@redhat.com>
17357 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
17358 Use ++iter rather than iter++ for std::list iterators.
17359 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
17360 defer deleting them until all nodes in the forest are processed. Do
17361 free even leaf nodes. Change to_process into auto_vec.
17364 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
17365 * vec.h (vec_default_construct): Use memset instead of placement new
17366 if BROKEN_VALUE_INITIALIZATION is defined.
17367 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
17368 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
17371 PR rtl-optimization/83723
17372 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
17373 * lra.c (lra_substitute_pseudo): Likewise. If true, use
17374 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
17376 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
17378 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
17380 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
17382 PR rtl-optimization/81443
17383 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
17384 from inner REGs to paradoxical SUBREGs.
17386 2018-02-16 Richard Biener <rguenther@suse.de>
17388 PR tree-optimization/84399
17389 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17390 For operands we can analyze at their definition make sure we can
17391 analyze them at each use as well.
17393 2018-02-16 Richard Biener <rguenther@suse.de>
17395 PR tree-optimization/84190
17396 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
17397 volatile accesses if the decl isn't volatile.
17399 2018-02-15 Jason Merrill <jason@redhat.com>
17401 PR c++/84314 - ICE with templates and fastcall attribute.
17402 * attribs.c (build_type_attribute_qual_variant): Don't clobber
17403 TYPE_CANONICAL on an existing type.
17405 2018-02-15 Jakub Jelinek <jakub@redhat.com>
17407 PR tree-optimization/84383
17408 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
17409 dstoff nor call operand_equal_p if dstbase is NULL.
17411 PR tree-optimization/84334
17412 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
17413 also a CONSTANT_CLASS_P, punt.
17415 2018-02-14 Jim Wilson <jimw@sifive.com>
17417 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
17418 first SMALL_OPERAND check. New local min_second_step. Move assert
17419 to where locals are set. Add TARGET_RVC support.
17420 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
17422 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
17424 * doc/invoke.texi: Correct -Wformat-overflow code sample.
17426 2018-02-14 Martin Sebor <msebor@redhat.com>
17428 PR tree-optimization/83698
17429 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
17430 arrays constrain the offset range to their bounds.
17431 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
17432 (builtin_access::overlap): Avoid setting the size of overlap if it's
17434 (maybe_diag_overlap): Also consider arrays when deciding what values
17435 of offsets to include in diagnostics.
17437 2018-02-14 Martin Sebor <msebor@redhat.com>
17440 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
17441 that correspond to the kind of a declaration.
17443 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
17446 * config/pa/pa.md: Load address of PIC label using the linkage table
17447 if the label is nonlocal.
17449 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
17451 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
17452 warning message if user requests -maltivec=be.
17453 * doc/invoke.texi: Document deprecation of -maltivec=be.
17455 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
17458 * config/rs6000/rs6000-c.c: Update definitions for
17459 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
17460 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
17462 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
17465 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
17466 add _get_ssp intrinsics. Remove argument from
17467 __builtin_ia32_rdssp[d|q].
17468 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
17469 * config/i386/i386-builtin.def: Remove argument from
17470 __builtin_ia32_rdssp[d|q].
17471 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
17472 ix86_expand_special_args_builtin for _rdssp[d|q].
17473 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
17474 Clear register before usage.
17475 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
17476 Add documentation for new _get_ssp and _inc_ssp intrinsics.
17478 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
17480 PR tree-optimization/84357
17481 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
17482 operand 1 of an ARRAY_REF too.
17484 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
17487 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
17488 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
17490 (set_of_reg): New struct.
17491 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
17492 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
17493 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
17495 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
17496 Split into bitclr, bitset, bitinvert patterns if appropriate.
17497 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
17498 use rx_fuse_in_memory_bitop.
17499 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
17500 to named insn, correct maximum insn length.
17502 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
17505 * machmode.def: Define a complex mode for PARTIAL_INT.
17506 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
17508 * doc/rtl.texi: Document CSPImode.
17509 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
17511 (msp430_hard_regno_nregs_with_padding): Likewise.
17513 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
17516 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
17518 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
17520 PR rtl-optimization/84169
17521 * combine.c (try_combine): New variable split_i2i3. Set it to true if
17522 we generated a parallel as new i3 and we split that to new i2 and i3
17523 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
17524 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
17525 those to i2, not i1. Partially rewrite this scan code.
17527 2018-02-13 Jakub Jelinek <jakub@redhat.com>
17530 * stor-layout.c (place_field): For variable length fields, adjust
17531 offset_align afterwards not just based on the field's alignment,
17532 but also on the size.
17534 PR middle-end/84309
17535 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
17536 of exps and logs in the use_exp2 case.
17538 2018-02-13 Jeff Law <law@redhat.com>
17540 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
17541 entry for "vector".
17543 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
17546 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
17550 * common.opt (gas-loc-support, gas-locview-support): New.
17551 (ginline-points, ginternal-reset-location-views): New.
17552 * doc/invoke.texi: Document them. Use @itemx where intended.
17553 (gvariable-location-views): Adjust.
17554 * target.def (reset_location_view): New.
17555 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
17556 (TARGET_RESET_LOCATION_VIEW): New.
17557 * doc/tm.texi: Rebuilt.
17558 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
17559 (dwarf2out_default_as_locview_support): New.
17560 (output_asm_line_debug_info): Use option variables.
17561 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
17562 (output_loc_list): Likewise.
17563 (add_high_low_attributes): Check option variables.
17564 Don't output entry view attribute in strict mode.
17565 (gen_inlined_subroutine_die): Check option variables.
17566 (dwarf2out_inline_entry): Likewise.
17567 (init_sections_and_labels): Likewise.
17568 (dwarf2out_early_finish): Likewise.
17569 (maybe_reset_location_view): New, from...
17570 (dwarf2out_var_location): ... here. Call it.
17571 * debug.h (dwarf2out_default_as_loc_support): Declare.
17572 (dwarf2out_default_as_locview_support): Declare.
17573 * hooks.c (hook_int_rtx_insn_0): New.
17574 * hooks.h (hook_int_rtx_insn_0): Declare.
17575 * toplev.c (process_options): Take -gas-loc-support and
17576 -gas-locview-support from dwarf2out. Enable
17577 -gvariable-location-views by default only with locview
17578 assembler support. Enable -ginternal-reset-location-views by
17579 default only if the target defines the corresponding hook.
17580 Enable -ginline-points by default if location views are
17581 enabled; force it disabled if statement frontiers are
17583 * tree-inline.c (expand_call_inline): Check option variables.
17584 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
17586 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
17588 PR tree-optimization/84321
17589 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
17590 handling. Also check whether the anti-range contains any values
17591 that satisfy the mask; switch to a VR_RANGE if not.
17593 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
17596 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
17598 2018-02-13 Martin Jambor <mjambor@suse.cz>
17601 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
17602 of call statements, also set location of a load to a temporary.
17604 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
17606 * config/rl78/rl78.c (add_vector_labels): New function.
17607 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
17608 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
17609 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
17610 which checks that no arguments are passed.
17611 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
17612 * doc/extend.texi: Documentation for the new attribute.
17614 2018-02-13 Andreas Schwab <schwab@suse.de>
17616 * config/riscv/linux.h (CPP_SPEC): Define.
17618 2018-02-13 Jakub Jelinek <jakub@redhat.com>
17621 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
17622 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
17623 OPTION_MASK_ISA_AES as first argument to def_builtin_const
17624 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
17625 instead of OPTION_MASK_ISA_PCLMUL as first argument to
17626 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
17627 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
17628 temporarily for AES and PCLMUL builtins.
17630 PR tree-optimization/84339
17631 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
17632 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
17635 PR middle-end/84309
17636 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
17637 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
17638 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
17640 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
17642 * omp-simd-clone.h: New file.
17643 * omp-simd-clone.c: Include omp-simd-clone.h.
17644 (expand_simd_clones): No longer static.
17645 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
17646 cgraph.h and omp-simd-clone.h.
17647 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
17648 (vect_recog_widen_shift_pattern): Formatting fix.
17649 (vect_pattern_recog_1): Don't check optab for calls.
17652 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
17653 operands[2] into a REG before using gen_lowpart on it.
17655 2018-02-12 Jeff Law <law@redhat.com>
17658 * config/sh/sh.c (find_barrier): Consider a sibling call
17661 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
17662 successfully back substituting a reg.
17664 2018-02-12 Richard Biener <rguenther@suse.de>
17666 PR tree-optimization/84037
17667 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
17668 parameter, move visited init to caller.
17669 (vect_slp_analyze_operations): Separate cost from validity
17670 check, initialize visited once for all instances.
17671 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
17673 * tree-vect-stmts.c (vect_model_simple_cost): Make early
17675 (vect_model_promotion_demotion_cost): Likewise.
17676 (vectorizable_bswap): Guard cost modeling with !slp_node
17677 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
17679 (vectorizable_call): Likewise.
17680 (vectorizable_conversion): Likewise.
17681 (vectorizable_assignment): Likewise.
17682 (vectorizable_shift): Likewise.
17683 (vectorizable_operation): Likewise.
17684 (vectorizable_store): Likewise.
17685 (vectorizable_load): Likewise.
17686 (vectorizable_condition): Likewise.
17687 (vectorizable_comparison): Likewise.
17689 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
17692 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
17693 (ASAN_MARK): Fix fnspec to account for return value, change pointer
17694 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
17696 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
17698 PR middle-end/83665
17699 * params.def (inline-min-speedup): Increase from 8 to 15.
17700 (max-inline-insns-auto): Decrease from 40 to 30.
17701 * ipa-split.c (consider_split): Add some buffer for function to
17702 be considered inlining candidate.
17703 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
17706 2018-02-12 Richard Biener <rguenther@suse.de>
17708 PR tree-optimization/84037
17709 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
17710 matched stmts if we cannot swap the non-matched ones.
17712 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
17714 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
17715 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
17716 _mm_maskz_scalef_round_ss): New intrinsics.
17717 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
17718 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
17719 __builtin_ia32_scalefss_round): Remove.
17720 (__builtin_ia32_scalefsd_mask_round,
17721 __builtin_ia32_scalefss_mask_round): New intrinsics.
17722 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
17723 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
17724 ((match_operand:VF_128 2 "<round_nimm_predicate>"
17725 "<round_constraint>")): Changed to ...
17726 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
17727 "<round_scalar_constraint>")): ... this.
17728 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
17729 %0, %1, %2<round_op3>}"): Changed to ...
17730 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
17731 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
17732 %2<round_scalar_mask_op3>}"): ... this.
17733 * config/i386/subst.md (round_scalar_nimm_predicate): New.
17735 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
17737 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
17738 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
17739 (_mm_maskz_sqrt_round_ss): New intrinsics.
17740 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
17741 (__builtin_ia32_sqrtsd_mask_round)
17742 (__builtin_ia32_sqrtss_mask_round): New builtins.
17743 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
17744 (__builtin_ia32_sqrtss_round): Remove.
17745 (__builtin_ia32_sqrtsd_mask_round)
17746 (__builtin_ia32_sqrtss_mask_round): New builtins.
17747 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
17748 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
17749 ((match_operand:VF_128 1 "vector_operand"
17750 "xBm,<round_constraint>")): Changed to ...
17751 ((match_operand:VF_128 1 "vector_operand"
17752 "xBm,<round_scalar_constraint>")): ... this.
17753 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
17754 %0, %2, %<iptr>1<round_op3>}): Changed to ...
17755 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
17756 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
17757 %<iptr>1<round_scalar_mask_op3>}): ... this.
17758 ((set_attr "prefix" "<round_prefix>")): Changed to ...
17759 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
17761 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
17764 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
17765 Cast vec_cmpeq result to correct type.
17766 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
17767 Cast vec_cmpgt result to correct type.
17769 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
17771 * final.c (final_scan_insn_1): Renamed from...
17772 (final_scan_insn): ... this. New wrapper, to recover
17773 seen from the outermost call in recursive ones.
17774 * config/sparc/sparc.c (output_return): Drop seen from call.
17775 (output_sibcall): Likewise.
17776 * config/visium/visium.c (output_branch): Likewise.
17778 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
17780 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
17783 2018-02-10 Alan Modra <amodra@gmail.com>
17786 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
17787 Specify LR as an input.
17789 2018-02-10 Jakub Jelinek <jakub@redhat.com>
17792 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
17793 remove_member_access_dummy_vars): New functions.
17794 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
17795 lower_omp_1, execute_lower_omp): Use them.
17797 PR rtl-optimization/84308
17798 * shrink-wrap.c (spread_components): Release todo vector.
17800 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
17802 PR rtl-optimization/57193
17803 * ira-color.c (struct allocno_color_data): Add member
17804 conflict_allocno_hard_prefs.
17805 (update_conflict_allocno_hard_prefs): New.
17806 (bucket_allocno_compare_func): Add a preference based on
17807 conflict_allocno_hard_prefs.
17808 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
17809 (color_allocnos): Remove a dead code. Initiate
17810 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
17812 2018-02-09 Jakub Jelinek <jakub@redhat.com>
17815 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
17816 constraint from =wa to wa. Avoid a subreg on the output operand,
17817 instead use a pseudo and subreg it in a move.
17818 (p9_xxbrd_<mode>): Changed to ...
17819 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
17820 (p9_xxbrd_v2df): New expander.
17821 (p9_xxbrw_<mode>): Changed to ...
17822 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
17823 (p9_xxbrw_v4sf): New expander.
17825 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
17827 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
17829 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
17832 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
17833 multiply in 32-bit mode.
17834 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
17835 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
17838 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
17840 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
17841 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
17842 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
17843 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
17845 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
17848 * dwarf2out.c (is_trivial_indirect_ref): New function.
17849 (dwarf2out_late_global_decl): Do not generate a location
17850 attribute for variables that have a non-trivial DECL_VALUE_EXPR
17851 and that are not defined in the current unit.
17853 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
17855 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
17856 instead of a libcall for UNORDERED.
17858 2018-02-09 Tamar Christina <tamar.christina@arm.com>
17861 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
17862 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
17864 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17867 * config/s390/s390.c (s390_set_current_function): Invoke
17868 s390_indirect_branch_settings also if fndecl didn't change.
17870 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
17872 * config/rs6000/rs6000.md (blockage): Set length to zero.
17874 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
17876 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
17878 2018-02-09 Jakub Jelinek <jakub@redhat.com>
17881 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
17882 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
17886 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
17887 PARALLEL incoming that failed vt_get_decl_and_offset check.
17889 PR middle-end/84237
17890 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
17891 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
17893 (get_variable_section): For decls in named .bss* sections pass true as
17894 second argument to bss_initializer_p.
17896 2018-02-09 Marek Polacek <polacek@redhat.com>
17897 Jakub Jelinek <jakub@redhat.com>
17900 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
17901 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
17902 Sync some changes from cxx_fold_indirect_ref.
17904 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
17906 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
17908 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
17909 (BLOCK_INLINE_ENTRY_LABEL): New.
17910 (dwarf2out_var_location): Disregard inline entry markers.
17911 (inline_entry_data): New struct.
17912 (inline_entry_data_hasher): New hashtable type.
17913 (inline_entry_data_hasher::hash): New.
17914 (inline_entry_data_hasher::equal): New.
17915 (inline_entry_data_table): New variable.
17916 (add_high_low_attributes): Add DW_AT_entry_pc and
17917 DW_AT_GNU_entry_view attributes if a pending entry is found
17918 in inline_entry_data_table. Add old entry_pc attribute only
17919 if debug nonbinding markers are disabled.
17920 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
17921 markers are enabled.
17922 (block_within_block_p, dwarf2out_inline_entry): New.
17923 (dwarf2out_finish): Check that no entries remained in
17924 inline_entry_data_table.
17925 * final.c (reemit_insn_block_notes): Handle inline entry notes.
17926 (final_scan_insn, notice_source_line): Likewise.
17927 (rest_of_clean_state): Skip inline entry markers.
17928 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
17930 * gimple.c (gimple_build_debug_inline_entry): New.
17931 * gimple.h (enum gimple_debug_subcode): Add
17932 GIMPLE_DEBUG_INLINE_ENTRY.
17933 (gimple_build_debug_inline_entry): Declare.
17934 (gimple_debug_inline_entry_p): New.
17935 (gimple_debug_nonbind_marker_p): Adjust.
17936 * insn-notes.def (INLINE_ENTRY): New.
17937 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
17938 inline entry marker notes.
17939 (print_insn): Likewise.
17940 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
17941 (INSN_DEBUG_MARKER_KIND): Likewise.
17942 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
17943 * tree-inline.c (expand_call_inline): Build and insert
17944 debug_inline_entry stmt.
17945 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
17946 inline entry blocks early, if nonbind markers are enabled.
17947 (dump_scope_block): Dump fragment info.
17948 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
17949 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
17950 (gimple_build_debug_inline_entry): New.
17951 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
17952 Enable/disable inline entry points too.
17953 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
17954 (DEBUG_INSN): Describe inline entry markers.
17956 * common.opt (gvariable-location-views): New.
17957 (gvariable-location-views=incompat5): New.
17958 * config.in: Rebuilt.
17959 * configure: Rebuilt.
17960 * configure.ac: Test assembler for view support.
17961 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
17962 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
17963 * dwarf2out.c (var_loc_view): New typedef.
17964 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
17965 (dwarf2out_locviews_in_attribute): New.
17966 (dwarf2out_locviews_in_loclist): New.
17967 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
17968 (enum dw_line_info_opcode): Add LI_adv_address.
17969 (struct dw_line_info_table): Add view.
17970 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
17971 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
17972 (zero_view_p): New variable.
17973 (ZERO_VIEW_P): New macro.
17974 (output_asm_line_debug_info): New.
17975 (struct var_loc_node): Add view.
17976 (add_AT_view_list, AT_loc_list): New.
17977 (add_var_loc_to_decl): Add view param. Test it against last.
17978 (new_loc_list): Add view params. Record them.
17979 (AT_loc_list_ptr): Handle loc and view lists.
17980 (view_list_to_loc_list_val_node): New.
17981 (print_dw_val): Handle dw_val_class_view_list.
17982 (size_of_die): Likewise.
17983 (value_format): Likewise.
17984 (loc_list_has_views): New.
17985 (gen_llsym): Set vl_symbol too.
17986 (maybe_gen_llsym, skip_loc_list_entry): New.
17987 (dwarf2out_maybe_output_loclist_view_pair): New.
17988 (output_loc_list): Output view list or entries too.
17989 (output_view_list_offset): New.
17990 (output_die): Handle dw_val_class_view_list.
17991 (output_dwarf_version): New.
17992 (output_compilation_unit_header): Use it.
17993 (output_skeleton_debug_sections): Likewise.
17994 (output_rnglists, output_line_info): Likewise.
17995 (output_pubnames, output_aranges): Update version comments.
17996 (output_one_line_info_table): Output view numbers in asm comments.
17997 (dw_loc_list): Determine current endview, pass it to new_loc_list.
17998 Call maybe_gen_llsym.
17999 (loc_list_from_tree_1): Adjust.
18000 (add_AT_location_description): Create view list attribute if
18001 needed, check it's absent otherwise.
18002 (convert_cfa_to_fb_loc_list): Adjust.
18003 (maybe_emit_file): Call output_asm_line_debug_info for test.
18004 (dwarf2out_var_location): Reset views as needed. Precompute
18005 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
18006 attribute. Set view.
18007 (new_line_info_table): Reset next view.
18008 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
18009 (dwarf2out_source_line): Likewise. Output view resets and labels to
18010 the assembler, or select appropriate line info opcodes.
18011 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
18012 (optimize_string_length): Catch it. Adjust.
18013 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
18014 dw_val_class_view_list, and remove it if no longer needed.
18015 (hash_loc_list): Hash view numbers.
18016 (loc_list_hasher::equal): Compare them.
18017 (optimize_location_lists): Check whether a view list symbol is
18018 needed, and whether the locview attribute is present, and
18019 whether they match. Remove the locview attribute if no longer
18021 (index_location_lists): Call skip_loc_list_entry for test.
18022 (dwarf2out_finish): Call output_asm_line_debug_info for test.
18023 Use output_dwarf_version.
18024 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
18025 (struct dw_val_node): Add val_view_list.
18026 * final.c (SEEN_NEXT_VIEW): New.
18027 (set_next_view_needed): New.
18028 (clear_next_view_needed): New.
18029 (maybe_output_next_view): New.
18030 (final_start_function): Rename to...
18031 (final_start_function_1): ... this. Take pointer to FIRST,
18032 add SEEN parameter. Emit param bindings in the initial view.
18033 (final_start_function): Reintroduce SEEN-less interface.
18034 (final): Rename to...
18035 (final_1): ... this. Take SEEN parameter. Output final pending
18036 next view at the end.
18037 (final): Reintroduce seen-less interface.
18038 (final_scan_insn): Output pending next view before switching
18039 sections or ending a block. Mark the next view as needed when
18040 outputting variable locations. Notify debug backend of section
18041 changes, and of location view changes.
18042 (rest_of_handle_final): Adjust.
18043 * toplev.c (process_options): Autodetect value for debug variable
18044 location views option. Warn on incompat5 without -gdwarf-5.
18045 * doc/invoke.texi (gvariable-location-views): New.
18046 (gvariable-location-views=incompat5): New.
18047 (gno-variable-location-views): New.
18049 2018-02-08 David Malcolm <dmalcolm@redhat.com>
18051 PR tree-optimization/84136
18052 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
18053 that the result of find_edge is non-NULL.
18055 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
18058 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
18059 storing integer register in SImode. Fix cost of 256 and 512
18060 byte aligned SSE register store.
18062 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
18064 * config/i386/i386.c (ix86_multiplication_cost): Fix
18065 multiplication cost for TARGET_AVX512DQ.
18067 2018-02-08 Marek Polacek <polacek@redhat.com>
18069 PR tree-optimization/84238
18070 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
18073 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18075 PR tree-optimization/84265
18076 * tree-vect-stmts.c (vectorizable_store): Don't treat
18077 VMAT_CONTIGUOUS accesses as grouped.
18078 (vectorizable_load): Likewise.
18080 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18082 PR tree-optimization/81635
18083 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
18084 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
18085 (test_round_for_mask): New functions.
18086 (wide_int_cc_tests): Call test_round_for_mask.
18087 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
18088 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
18089 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
18090 range returned by get_range_info.
18092 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
18095 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
18096 * symtab.c: Include builtins.h
18097 (symtab_node::output_to_lto_symbol_table_p): Move here
18098 from lto-streamer-out.c:output_symbol_p.
18099 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
18100 (output_symbol_p): Move all logic to symtab.c
18101 (produce_symtab): Update.
18103 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18105 * config/s390/s390-opts.h (enum indirect_branch): Define.
18106 * config/s390/s390-protos.h (s390_return_addr_from_memory)
18107 (s390_indirect_branch_via_thunk)
18108 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
18109 (enum s390_indirect_branch_type): Define.
18110 * config/s390/s390.c (struct s390_frame_layout, struct
18111 machine_function): Remove.
18112 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
18113 (indirect_branch_table_label_no, indirect_branch_table_name):
18115 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
18116 (enum s390_indirect_branch_option): Define.
18117 (s390_return_addr_from_memory): New function.
18118 (s390_handle_string_attribute): New function.
18119 (s390_attribute_table): Add new attribute handler.
18120 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
18121 (s390_indirect_branch_via_thunk): New function.
18122 (s390_indirect_branch_via_inline_thunk): New function.
18123 (s390_function_ok_for_sibcall): When jumping via thunk disallow
18124 sibling call optimization for non z10 compiles.
18125 (s390_emit_call): Force indirect branch target to be a single
18126 register. Add r1 clobber for non-z10 compiles.
18127 (s390_emit_epilogue): Emit return jump via return_use expander.
18128 (s390_reorg): Handle JUMP_INSNs as execute targets.
18129 (s390_option_override_internal): Perform validity checks for the
18130 new command line options.
18131 (s390_indirect_branch_attrvalue): New function.
18132 (s390_indirect_branch_settings): New function.
18133 (s390_set_current_function): Invoke s390_indirect_branch_settings.
18134 (s390_output_indirect_thunk_function): New function.
18135 (s390_code_end): Implement target hook.
18136 (s390_case_values_threshold): Implement target hook.
18137 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
18139 * config/s390/s390.h (struct s390_frame_layout)
18140 (struct machine_function): Move here from s390.c.
18141 (TARGET_INDIRECT_BRANCH_NOBP_RET)
18142 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
18143 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
18144 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
18145 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
18146 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
18147 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
18148 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
18149 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
18150 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
18151 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
18152 (mnemonic attribute): Add values which aren't recognized
18154 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
18155 pattern for branch conversion. Fix mnemonic attribute.
18156 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
18157 indirect branch via thunk if requested.
18158 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
18159 ("*indirect_jump"): Disable for branch conversion using out of
18161 ("indirect_jump_via_thunk<mode>_z10")
18162 ("indirect_jump_via_thunk<mode>")
18163 ("indirect_jump_via_inlinethunk<mode>_z10")
18164 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
18165 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
18166 ("casesi_jump_via_inlinethunk<mode>_z10")
18167 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
18168 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
18169 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
18170 ("*indirect2_jump"): Disable for branch conversion.
18171 ("casesi_jump"): Turn into expander and expand patterns for branch
18173 ("return_use"): New expander.
18174 ("*return"): Emit return via thunk and rename it to ...
18175 ("*return<mode>"): ... this one.
18176 * config/s390/s390.opt: Add new options and and enum for the
18179 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18181 * lra-constraints.c (match_reload): Unconditionally use
18182 gen_lowpart_SUBREG, rather than selecting between that
18183 and equivalent gen_rtx_SUBREG code.
18185 2018-02-08 Richard Biener <rguenther@suse.de>
18187 PR tree-optimization/84233
18188 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
18189 changed flag instead of boguously re-using phi_inserted.
18191 2018-02-08 Martin Jambor <mjambor@suse.cz>
18193 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
18194 static local variables.
18196 2018-02-08 Richard Biener <rguenther@suse.de>
18198 PR tree-optimization/84278
18199 * tree-vect-stmts.c (vectorizable_store): When looking for
18200 smaller vector types to perform grouped strided loads/stores
18201 make sure the mode is supported by the target.
18202 (vectorizable_load): Likewise.
18204 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
18206 * config/aarch64/aarch64.c (aarch64_components_for_bb):
18207 Increase LDP/STP opportunities by adding adjacent callee-saves.
18209 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
18211 PR rtl-optimization/84068
18212 PR rtl-optimization/83459
18213 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
18215 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
18217 PR tree-optimization/84224
18218 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
18219 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
18220 non-zero arguments.
18222 2018-02-07 Iain Sandoe <iain@codesourcery.com>
18225 * config/rs6000/altivec.md (*restore_world): Remove LR use.
18226 * config/rs6000/predicates.md (restore_world_operation): Adjust op
18227 count, remove one USE.
18229 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
18231 * doc/install.texi (Configuration): Document the
18232 --with-long-double-format={ibm,ieee} PowerPC configuration
18236 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
18237 Convert from define_expand to be define_insn_and_split. Rework
18238 float/double/_Float128 conversions to QI/HI/SImode to work with
18239 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
18240 conversions to QI/HImode types did a store and then a load to
18241 truncate the value. For conversions to VSX registers, don't split
18242 the insn, instead emit the code directly. Use the code iterator
18243 any_fix to combine signed and unsigned conversions.
18244 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
18245 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
18246 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
18247 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
18248 (fix_<mode>di2_hw): Likewise.
18249 (fixuns_<mode>di2_hw): Likewise.
18250 (fix_<mode>si2_hw): Likewise.
18251 (fixuns_<mode>si2_hw): Likewise.
18252 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
18253 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
18254 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
18255 fix<uns>_trunc<SFDF:mode>si2_p8.
18256 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
18257 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
18258 (fix<uns>_<mode>_mem): Likewise.
18259 (fctiw<u>z_<mode>_mem): Likewise.
18260 (fix<uns>_<mode>_mem): Likewise.
18261 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
18262 the register allocator from doing a direct move to the GPRs to do
18263 a store, and instead use the ISA 3.0 store byte/half-word from
18264 vector register instruction. For IEEE 128-bit floating point,
18265 also optimize stores of 32-bit ints.
18266 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
18268 2018-02-07 Alan Hayward <alan.hayward@arm.com>
18270 * genextract.c (push_pathstr_operand): New function to support
18272 (walk_rtx): Call push_pathstr_operand.
18273 (print_path): Support [a-zA-Z].
18275 2018-02-07 Richard Biener <rguenther@suse.de>
18277 PR tree-optimization/84037
18278 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
18279 (cse_and_gimplify_to_preheader): Declare.
18280 (vect_get_place_in_interleaving_chain): Likewise.
18281 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18283 (_loop_vec_info::~_loop_vec_info): Delete it.
18284 (cse_and_gimplify_to_preheader): New function.
18285 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
18286 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
18287 (vectorizable_load): Likewise. For grouped stores always base
18288 the IV on the first element.
18289 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
18290 condition before gimplifying.
18292 2018-02-07 Jakub Jelinek <jakub@redhat.com>
18294 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
18295 *DIV_EXPR and *MOD_EXPR.
18297 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
18300 * config/i386/i386.c (ix86_option_override_internal): Mask out
18301 the CF_SET bit when checking -fcf-protection.
18303 2018-02-07 Tom de Vries <tom@codesourcery.com>
18306 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
18309 2018-02-07 Richard Biener <rguenther@suse.de>
18311 PR tree-optimization/84204
18312 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
18315 PR tree-optimization/84205
18316 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
18317 special-case isl_ast_op_zdiv_r.
18319 PR tree-optimization/84223
18320 * graphite-scop-detection.c (gather_bbs::before_dom_children):
18321 Only add conditions from within the region.
18322 (gather_bbs::after_dom_children): Adjust.
18324 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
18327 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
18328 * config/avr/avr.md: Only post-reload split REG-REG moves if
18329 either register is GENERAL_REG_P.
18331 2018-02-07 Jakub Jelinek <jakub@redhat.com>
18333 PR tree-optimization/84235
18334 * tree-ssa-scopedtables.c
18335 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
18336 if the subtraction is performed in floating point type where NaNs are
18337 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
18338 build 1. Formatting fix.
18340 2018-02-06 Jakub Jelinek <jakub@redhat.com>
18343 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
18344 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
18345 and skip it regardless of bb boundaries. Use CALL_P macro,
18346 don't test INSN_P (insn) together with CALL_P or JUMP_P check
18347 unnecessarily, formatting fix.
18349 2018-02-06 Michael Collison <michael.collison@arm.com>
18351 * config/arm/thumb2.md:
18352 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
18353 (*thumb_mov_notscc): Ditto.
18355 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
18358 * config/rs6000/rs6000.md (su code attribute): Use "u" for
18359 unsigned_fix, not "s".
18361 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18363 * configure.ac (gcc_fn_eh_frame_ro): New function.
18364 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
18365 correct .eh_frame permissions.
18366 * configure: Regenerate.
18368 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
18370 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
18371 irrelevant options.
18373 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18375 * config/rs6000/rs6000.c (rs6000_option_override_internal):
18376 Display warning message for -mno-speculate-indirect-jumps.
18378 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
18380 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
18382 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
18384 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
18386 PR tree-optimization/84225
18387 * tree-eh.c (find_trapping_overflow): Only call
18388 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
18390 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18393 * config/i386/i386.c: Reimplement the check of possible options
18394 -mibt/-mshstk conbination. Change error messages.
18395 * doc/invoke.texi: Fix a typo: remove extra '='.
18397 2018-02-06 Marek Polacek <polacek@redhat.com>
18399 PR tree-optimization/84228
18400 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
18402 2018-02-06 Tamar Christina <tamar.christina@arm.com>
18405 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
18406 emitted arch directives.
18407 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
18408 __ARM_FEATURE_COPROC before changing architectures.
18410 2018-02-06 Richard Biener <rguenther@suse.de>
18412 * config/i386/i386.c (print_reg): Fix typo.
18413 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
18415 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
18417 * configure: Regenerate.
18419 2018-02-05 Martin Sebor <msebor@redhat.com>
18421 PR tree-optimization/83369
18422 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
18425 2018-02-05 Martin Liska <mliska@suse.cz>
18427 * doc/invoke.texi: Cherry-pick upstream r323995.
18429 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
18431 * ira.c (ira_init_register_move_cost): Adjust comment.
18433 2018-02-05 Martin Liska <mliska@suse.cz>
18435 PR gcov-profile/84137
18436 * doc/gcov.texi: Fix typo in documentation.
18438 2018-02-05 Martin Liska <mliska@suse.cz>
18440 PR gcov-profile/83879
18441 * doc/gcov.texi: Document necessity of --dynamic-list-data when
18442 using dlopen functionality.
18444 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
18446 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
18447 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
18448 _mm_maskz_range_ss, _mm_mask_range_round_ss,
18449 _mm_maskz_range_round_ss): New intrinsics.
18450 (__builtin_ia32_rangesd128_round)
18451 (__builtin_ia32_rangess128_round): Remove.
18452 (__builtin_ia32_rangesd128_mask_round,
18453 __builtin_ia32_rangess128_mask_round): New builtins.
18454 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
18455 __builtin_ia32_rangess128_round): Remove.
18456 (__builtin_ia32_rangesd128_mask_round,
18457 __builtin_ia32_rangess128_mask_round): New builtins.
18458 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
18459 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
18460 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
18461 "<round_saeonly_constraint>")): Changed to ...
18462 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
18463 "<round_saeonly_scalar_constraint>")): ... this.
18464 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
18465 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
18466 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
18467 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
18468 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
18470 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
18472 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
18474 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
18475 Remove all values except native, 8540 and 8548.
18477 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
18479 * config/i386/i386.c (ix86_output_function_return): Pass
18480 INVALID_REGNUM, instead of -1, as invalid register number to
18481 indirect_thunk_name and output_indirect_thunk.
18483 2018-02-02 Julia Koval <julia.koval@intel.com>
18485 * config.gcc: Add -march=icelake.
18486 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
18487 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
18488 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
18489 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
18490 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
18491 (processor_target_table): Add icelake.
18492 (ix86_option_override_internal): Handle new PTAs.
18493 (get_builtin_code_for_version): Handle icelake.
18494 (M_INTEL_COREI7_ICELAKE): New.
18495 (fold_builtin_cpu): Handle icelake.
18496 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
18497 * doc/invoke.texi: Add -march=icelake.
18499 2018-02-02 Julia Koval <julia.koval@intel.com>
18501 * config/i386/i386.c (ix86_option_override_internal): Change flags type
18502 to wide_int_bitmask.
18503 * wide-int-bitmask.h: New.
18505 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18508 * config/i386/i386.md: Replace Pmode with word_mode in
18509 builtin_setjmp_setup and builtin_longjmp to support x32.
18511 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
18515 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
18517 (rs6000_supported_cpu_names): New static variable.
18518 (linux_cpu_translation_table): Likewise.
18519 (elf_platform) <cpu>: Define new static variable and use it.
18520 Translate kernel AT_PLATFORM name to canonical name if needed.
18521 Error if platform name is unknown.
18523 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
18526 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
18528 2018-02-01 Jeff Law <law@redhat.com>
18531 * config/i386/i386.c (release_scratch_register_on_entry): Add new
18532 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
18533 the scratch if RELEASE_VIA_POP is false.
18534 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
18535 If we have to save a temporary register, decrement SIZE appropriately.
18536 Pass new arguments to release_scratch_register_on_entry.
18537 (ix86_adjust_stack_and_probe): Likewise.
18538 (ix86_emit_probe_stack_range): Pass new arguments to
18539 release_scratch_register_on_entry.
18541 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
18543 PR rtl-optimization/84157
18544 * combine.c (change_zero_ext): Use REG_P predicate in
18545 front of HARD_REGISTER_P predicate.
18547 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
18549 * config/avr/avr.c (avr_option_override): Move disabling of
18550 -fdelete-null-pointer-checks to...
18551 * common/config/avr/avr-common.c (avr_option_optimization_table):
18554 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18556 PR tree-optimization/81635
18557 * tree-data-ref.c (split_constant_offset_1): For types that
18558 wrap on overflow, try to use range info to prove that wrapping
18561 2018-02-01 Renlin Li <renlin.li@arm.com>
18564 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
18565 TAILCALL_ADDR_REGS.
18566 (aarch64_register_move_cost): Likewise.
18567 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
18568 TAILCALL_ADDR_REGS.
18569 (REG_CLASS_NAMES): Likewise.
18570 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
18571 TAILCALL_ADDR_REGS. Remove IP registers.
18572 * config/aarch64/aarch64.md (Ucs): Update register constraint.
18574 2018-02-01 Richard Biener <rguenther@suse.de>
18576 * domwalk.h (dom_walker::dom_walker): Add additional constructor
18577 for specifying RPO order and allow NULL for that.
18578 * domwalk.c (dom_walker::dom_walker): Likewise.
18579 (dom_walker::walk): Handle NULL RPO order.
18580 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
18582 (rewrite_update_dom_walker): Likewise.
18583 (mark_def_dom_walker): Likewise.
18585 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18587 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
18588 (aarch64_maybe_expand_sve_subreg_move): Declare.
18589 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
18590 * config/aarch64/predicates.md (aarch64_any_register_operand): New
18592 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
18593 that are semantically a reverse operation.
18594 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
18595 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
18596 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
18598 (aarch64_can_change_mode_class): For big-endian, forbid changes
18599 between two SVE modes if they have different element sizes.
18601 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18603 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
18604 the TImode handling for big-endian targets.
18606 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18608 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
18609 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
18611 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
18612 Remove BSWAP handing for big-endian targets and use the form of
18613 LD1RQ appropariate for the mode.
18615 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18617 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
18618 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
18619 duplicated element.
18621 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18624 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
18625 check for operands that need to go through aarch64_sve_reload_be.
18627 2018-02-01 Jakub Jelinek <jakub@redhat.com>
18629 PR tree-optimization/81661
18630 PR tree-optimization/84117
18631 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
18632 * tree-eh.c: Include gimplify.h.
18633 (find_trapping_overflow, replace_trapping_overflow,
18634 rewrite_to_non_trapping_overflow): New functions.
18635 * tree-vect-loop.c: Include tree-eh.h.
18636 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
18637 * tree-data-ref.c: Include tree-eh.h.
18638 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
18640 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
18642 PR rtl-optimization/84123
18643 * combine.c (change_zero_ext): Check if hard register satisfies
18644 can_change_dest_mode before calling gen_lowpart_SUBREG.
18646 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
18649 * ira.c (ira_init_register_move_cost): Remove assert.
18651 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
18653 PR rtl-optimization/84071
18654 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
18655 * doc/tm.texi: Regenerate.
18657 2018-01-31 Richard Biener <rguenther@suse.de>
18659 PR tree-optimization/84132
18660 * tree-data-ref.c (analyze_miv_subscript): Properly
18661 check whether evolution_function_is_affine_multivariate_p
18662 before calling gcd_of_steps_may_divide_p.
18664 2018-01-31 Julia Koval <julia.koval@intel.com>
18667 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
18668 * config/i386/i386.md (rdpid_rex64) New.
18669 (rdpid): Make 32bit only.
18671 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
18674 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
18675 an IDENTIFIER_NODE for FUNCTION_TYPE's.
18677 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
18680 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
18682 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
18684 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
18686 PR rtl-optimization/84071
18687 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
18688 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
18690 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
18692 * config/arc/arc.c (arc_handle_aux_attribute): New function.
18693 (arc_attribute_table): Add 'aux' attribute.
18694 (arc_in_small_data_p): Consider aux like variables.
18695 (arc_is_aux_reg_p): New function.
18696 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
18697 (arc_get_aux_arg): New function.
18698 (prepare_move_operands): Handle aux-register access.
18699 (arc_handle_aux_attribute): New function.
18700 * doc/extend.texi (ARC Variable attributes): Add subsection.
18702 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
18704 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
18705 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
18706 (arc_attribute_table): Add 'uncached' attribute.
18707 (arc_print_operand): Print '.di' flag for uncached memory
18709 (arc_in_small_data_p): Do not consider for small data the uncached
18711 (arc_is_uncached_mem_p): New function.
18712 * config/arc/predicates.md (compact_store_memory_operand): Check
18713 for uncached memory accesses.
18714 (nonvol_nonimm_operand): Likewise.
18715 * doc/extend.texi (ARC Type Attribute): New subsection.
18717 2018-01-31 Jakub Jelinek <jakub@redhat.com>
18720 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
18721 falign-loops=): Add Optimization flag.
18723 2018-01-30 Jeff Law <law@redhat.com>
18726 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
18727 INT_REGISTERS_SAVED. Check it prior to calling
18728 get_scratch_register_on_entry.
18729 (ix86_adjust_stack_and_probe): Similarly.
18730 (ix86_emit_probe_stack_range): Similarly.
18731 (ix86_expand_prologue): Corresponding changes.
18733 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18736 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
18737 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
18739 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
18742 * lra-constraints.c (curr_insn_transform): Process AND in the
18745 2018-01-30 Jakub Jelinek <jakub@redhat.com>
18747 PR rtl-optimization/83986
18748 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
18749 dependence against last_pending_memory_flush in addition to
18750 pending_jump_insns.
18752 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
18754 PR tree-optimization/81611
18755 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
18758 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18761 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
18764 2018-01-30 Richard Biener <rguenther@suse.de>
18765 Jakub Jelinek <jakub@redhat.com>
18767 PR tree-optimization/84111
18768 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
18769 inner loops added during recursion, as they don't have up-to-date
18772 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
18775 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
18776 (can_inline_edge_by_limits_p): ... here.
18777 (can_early_inline_edge_p, check_callers,
18778 update_caller_keys, update_callee_keys, recursive_inlining,
18779 add_new_edges_to_heap, speculation_useful_p,
18780 inline_small_functions,
18781 inline_small_functions, flatten_function,
18782 inline_to_all_callers_1): Update.
18784 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
18786 * profile-count.c (profile_count::combine_with_ipa_count): Handle
18789 2018-01-30 Richard Biener <rguenther@suse.de>
18791 PR tree-optimization/83008
18792 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
18793 invariant and constant vector uses in stmts when they need
18794 more than one stmt.
18796 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18799 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
18800 * configure: Regenerate.
18802 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
18804 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
18806 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
18807 Use gen_rtx_REG rather than gen_lowpart.
18809 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
18811 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
18812 rather than 0 when creating partial subregs.
18814 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
18816 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
18819 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
18822 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
18823 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
18824 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
18825 flags. This restores the settings used before the 2017-07-24.
18826 Turning off pre increment/decrement/modify allows IVOPTS to
18827 optimize DF/SF loops where the index is an int.
18829 2018-01-29 Richard Biener <rguenther@suse.de>
18830 Kelvin Nilsen <kelvin@gcc.gnu.org>
18833 * tree-vect-stmts.c (vectorizable_call): Don't call
18834 targetm.vectorize_builtin_md_vectorized_function if callee is
18837 2018-01-22 Carl Love <cel@us.ibm.com>
18839 * doc/extend.tex: Fix typo in second arg in
18840 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
18842 2018-01-29 Richard Biener <rguenther@suse.de>
18844 PR tree-optimization/84086
18845 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
18846 (flush_ssaname_freelist): When SSA names were released reset
18847 the SCEV hash table.
18849 2018-01-29 Richard Biener <rguenther@suse.de>
18851 PR tree-optimization/84057
18852 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
18853 removed paths when removing edges.
18855 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
18857 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
18858 -mfunction-return=@var{choice}.
18860 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
18862 PR diagnostic/84034
18863 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
18864 Handle CR like TAB.
18865 (layout::print_source_line): Likewise.
18866 (test_get_line_width_without_trailing_whitespace): Add test cases.
18868 2018-01-27 Jakub Jelinek <jakub@redhat.com>
18870 PR middle-end/84040
18871 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
18874 2018-01-26 Jim Wilson <jimw@sifive.com>
18876 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
18878 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
18881 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18883 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
18884 and CMP + SUB-immediate -> SUBS.
18886 2018-01-26 Martin Sebor <msebor@redhat.com>
18888 PR tree-optimization/83896
18889 * tree-ssa-strlen.c (get_string_len): Rename...
18890 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
18891 Avoid assuming length is constant.
18892 (handle_char_store): Use HOST_WIDE_INT for string length.
18894 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
18897 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
18898 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
18900 2018-01-26 Richard Biener <rguenther@suse.de>
18902 PR rtl-optimization/84003
18903 * dse.c (record_store): Only record redundant stores when
18904 the earlier store aliases at least all accesses the later one does.
18906 2018-01-26 Jakub Jelinek <jakub@redhat.com>
18908 PR rtl-optimization/83985
18909 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
18910 REG_CFA_RESTORE insns.
18911 (delete_unmarked_insns): Don't ignore separate shrink wrapping
18912 REG_CFA_RESTORE insns here.
18915 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
18916 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
18918 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18920 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
18921 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
18922 (arc_init): Likewise.
18923 (arc_override_options): Likewise.
18924 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
18926 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
18928 * config/arc/arc.h (TARGET_DBNZ): Define.
18929 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
18930 properly set the tune attribute.
18931 (dbnz): Use TARGET_DBNZ guard.
18932 * config/arc/arc.opt (mtune): Add core3 option.
18934 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18936 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
18937 recognize new pic like addresses.
18938 (arc_delegitimize_address): Clean up.
18940 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18942 * config/arc/arc-arches.def: Option mrf16 valid for all
18944 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
18945 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
18946 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
18947 * config/arc/arc-tables.opt: Regenerate.
18948 * config/arc/arc.c (arc_conditional_register_usage): Handle
18949 reduced register file case.
18950 (arc_file_start): Set must have build attributes.
18951 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
18952 mrf16 option value.
18953 * config/arc/arc.opt (mrf16): Add new option.
18954 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
18955 * config/arc/genmultilib.awk: Handle new mrf16 option.
18956 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
18957 * config/arc/t-multilib: Regenerate.
18958 * doc/invoke.texi (ARC Options): Document mrf16 option.
18960 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18962 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
18963 * config/arc/arc.c (arc_handle_secure_attribute): New function.
18964 (arc_attribute_table): Add 'secure_call' attribute.
18965 (arc_print_operand): Print secure call operand.
18966 (arc_function_ok_for_sibcall): Don't optimize tail calls when
18968 (arc_is_secure_call_p): New function. * config/arc/arc.md
18969 (call_i): Add support for sjli instruction.
18970 (call_value_i): Likewise.
18971 * config/arc/constraints.md (Csc): New constraint.
18973 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18974 John Eric Martin <John.Martin@emmicro-us.com>
18976 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
18977 * config/arc/arc.c (_arc_jli_section): New struct.
18978 (arc_jli_section): New type.
18979 (rc_jli_sections): New static variable.
18980 (arc_handle_jli_attribute): New function.
18981 (arc_attribute_table): Add jli_always and jli_fixed attribute.
18982 (arc_file_end): New function.
18983 (TARGET_ASM_FILE_END): Define.
18984 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
18985 (arc_add_jli_section): New function.
18986 (jli_call_scan): Likewise.
18987 (arc_reorg): Call jli_call_scan.
18988 (arc_output_addsi): Remove 'S' from printing asm operand.
18989 (arc_is_jli_call_p): New function.
18990 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
18992 (movhi_insn): Likewise.
18993 (movsi_insn): Likewise.
18994 (movsi_set_cc_insn): Likewise.
18995 (loadqi_update): Likewise.
18996 (load_zeroextendqisi_update): Likewise.
18997 (load_signextendqisi_update): Likewise.
18998 (loadhi_update): Likewise.
18999 (load_zeroextendhisi_update): Likewise.
19000 (load_signextendhisi_update): Likewise.
19001 (loadsi_update): Likewise.
19002 (loadsf_update): Likewise.
19003 (movsicc_insn): Likewise.
19004 (bset_insn): Likewise.
19005 (bxor_insn): Likewise.
19006 (bclr_insn): Likewise.
19007 (bmsk_insn): Likewise.
19008 (bicsi3_insn): Likewise.
19009 (cmpsi_cc_c_insn): Likewise.
19010 (movsi_ne): Likewise.
19011 (movsi_cond_exec): Likewise.
19012 (clrsbsi2): Likewise.
19013 (norm_f): Likewise.
19023 (call_i): Remove 'S' asm letter, add jli instruction.
19024 (call_value_i): Likewise.
19025 * config/arc/arc.op (mjli-always): New option.
19026 * config/arc/constraints.md (Cji): New constraint.
19027 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
19029 (subsf3_fpx): Likewise.
19030 (mulsf3_fpx): Likewise.
19031 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
19033 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
19034 function attrbutes.
19035 * doc/invoke.texi (ARC): Document mjli-always option.
19037 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
19039 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
19040 avoid addition with 0 and use incw and decw where possible.
19042 2018-01-26 Richard Biener <rguenther@suse.de>
19044 PR tree-optimization/81082
19045 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
19046 association if it requires casting to unsigned.
19047 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
19048 from fold_plusminus_mult_expr to catch important cases late when
19049 range info is available.
19051 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19053 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
19054 * configure.ac (hidden_linkonce): New test.
19055 * configure: Regenerate.
19056 * config.in: Regenerate.
19058 2018-01-26 Julia Koval <julia.koval@intel.com>
19060 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
19061 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
19062 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
19063 _mm_mask_bitshuffle_epi64_mask): Fix type.
19064 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
19065 USI_FTYPE_V4DI_V4DI_USI): Remove.
19066 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
19067 __builtin_ia32_vpshufbitqmb256_mask,
19068 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
19069 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
19070 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
19072 2018-01-26 Alan Modra <amodra@gmail.com>
19075 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
19076 UNSPEC_VBPERMQ. Sort other unspecs.
19078 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
19080 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
19082 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
19084 PR middle-end/83055
19085 * predict.c (drop_profile): Do not push/pop cfun; update also
19087 (handle_missing_profiles): Fix logic looking for zero profiles.
19089 2018-01-25 Jakub Jelinek <jakub@redhat.com>
19091 PR middle-end/83977
19092 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
19093 on functions with #pragma omp declare simd or functions with simd
19095 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
19096 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
19097 Remove trailing \n from warning_at calls.
19099 2018-01-25 Tom de Vries <tom@codesourcery.com>
19102 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
19103 for neutered workers.
19105 2018-01-24 Joseph Myers <joseph@codesourcery.com>
19108 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
19109 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
19111 2018-01-24 Jeff Law <law@redhat.com>
19114 * i386.c (get_probe_interval): Move to earlier point.
19115 (ix86_compute_frame_layout): If -fstack-clash-protection and
19116 the frame is larger than the probe interval, then use pushes
19117 to save registers rather than reg->mem moves.
19118 (ix86_expand_prologue): Remove conditional for int_registers_saved
19121 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
19124 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
19125 min/max for never referenced object.
19127 2018-01-24 Jakub Jelinek <jakub@redhat.com>
19129 PR middle-end/83977
19130 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
19132 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
19133 attributes from DECL_ATTRIBUTES (decl) without affecting
19134 DECL_ATTRIBUTES (current_function_decl).
19135 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
19136 functions with non-NULL DECL_ABSTRACT_ORIGIN.
19138 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
19140 PR tree-optimization/83979
19141 * fold-const.c (fold_comparison): Use constant_boolean_node
19142 instead of boolean_{true,false}_node.
19144 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
19146 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
19149 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19151 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19152 Simplify the clause that sets the length attribute.
19153 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19154 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
19155 clause that sets the length attribute.
19156 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19158 2018-01-24 Tom de Vries <tom@codesourcery.com>
19161 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
19162 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
19163 Add strict parameter.
19164 (prevent_branch_around_nothing): Insert dummy insn between branch to
19165 label and label with no ptx insn inbetween.
19166 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
19168 2018-01-24 Tom de Vries <tom@codesourcery.com>
19171 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
19172 for neutered threads in warp.
19173 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
19175 2018-01-24 Richard Biener <rguenther@suse.de>
19177 PR tree-optimization/83176
19178 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
19181 2018-01-24 Richard Biener <rguenther@suse.de>
19183 PR tree-optimization/82819
19184 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
19185 code generating pluses that are no-ops in the target precision.
19187 2018-01-24 Richard Biener <rguenther@suse.de>
19189 PR middle-end/84000
19190 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
19192 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
19194 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
19195 to merge probabilities.
19196 * predict.c (probably_never_executed): Also mark as cold functions
19197 with global 0 profile and guessed local profile.
19198 * profile-count.c (profile_probability::combine_with_count): New
19200 * profile-count.h (profile_probability::operator*,
19201 profile_probability::operator*=, profile_probability::operator/,
19202 profile_probability::operator/=): Reduce precision to adjusted
19203 and set value to guessed on contradictory divisions.
19204 (profile_probability::combine_with_freq): Remove.
19205 (profile_probability::combine_wiht_count): Declare.
19206 (profile_count::force_nonzero):: Set to adjusted.
19207 (profile_count::probability_in):: Set quality to adjusted.
19208 * tree-ssa-tail-merge.c (replace_block_by): Use
19209 combine_with_count.
19211 2018-01-23 Andrew Waterman <andrew@sifive.com>
19212 Jim Wilson <jimw@sifive.com>
19214 * config/riscv/riscv.c (riscv_stack_boundary): New.
19215 (riscv_option_override): Set riscv_stack_boundary. Handle
19216 riscv_preferred_stack_boundary_arg.
19217 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
19218 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
19219 (STACK_BOUNDARY): Set to riscv_stack_boundary.
19220 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
19221 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
19222 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
19224 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
19227 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
19228 of struct ix86_frame.
19229 (ix86_expand_epilogue): Likewise. Add a local variable for
19230 the reg_save_offset field in struct ix86_frame.
19232 2018-01-23 Bin Cheng <bin.cheng@arm.com>
19234 PR tree-optimization/82604
19235 * tree-loop-distribution.c (enum partition_kind): New enum item
19236 PKIND_PARTIAL_MEMSET.
19237 (partition_builtin_p): Support above new enum item.
19238 (generate_code_for_partition): Ditto.
19239 (compute_access_range): Differentiate cases that equality can be
19240 proven at all loops, the innermost loops or no loops.
19241 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
19242 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
19243 (finalize_partitions, distribute_loop): Don't fuse partition of
19244 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
19245 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
19246 parloop is enabled.
19248 2018-01-23 Martin Liska <mliska@suse.cz>
19250 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
19251 order to ignore the predictor.
19252 (PRED_POLYMORPHIC_CALL): Likewise.
19253 (PRED_RECURSIVE_CALL): Likewise.
19255 2018-01-23 Martin Liska <mliska@suse.cz>
19257 * tree-profile.c (tree_profiling): Print function header to
19258 aware reader which function we are working on.
19259 * value-prof.c (gimple_find_values_to_profile): Do not print
19260 not interesting value histograms.
19262 2018-01-23 Martin Liska <mliska@suse.cz>
19264 * profile-count.h (enum profile_quality): Add
19265 profile_uninitialized as the first value. Do not number values
19266 as they are zero based.
19267 (profile_count::verify): Update sanity check.
19268 (profile_probability::verify): Likewise.
19270 2018-01-23 Nathan Sidwell <nathan@acm.org>
19272 * doc/invoke.texi (ffor-scope): Deprecate.
19274 2018-01-23 David Malcolm <dmalcolm@redhat.com>
19276 PR tree-optimization/83510
19277 * domwalk.c (set_all_edges_as_executable): New function.
19278 (dom_walker::dom_walker): Convert bool param
19279 "skip_unreachable_blocks" to enum reachability. Move setup of
19280 edge flags to set_all_edges_as_executable and only do it when
19281 reachability is REACHABLE_BLOCKS.
19282 * domwalk.h (enum dom_walker::reachability): New enum.
19283 (dom_walker::dom_walker): Convert bool param
19284 "skip_unreachable_blocks" to enum reachability.
19285 (set_all_edges_as_executable): New decl.
19286 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
19287 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
19289 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
19290 but converting true to REACHABLE_BLOCKS.
19291 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
19293 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
19294 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
19295 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
19297 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
19298 if check_all_array_refs will be called.
19300 2018-01-23 David Malcolm <dmalcolm@redhat.com>
19302 * tree.c (selftest::test_location_wrappers): Add more test
19305 2018-01-23 David Malcolm <dmalcolm@redhat.com>
19307 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
19308 (selftest::test_bit_in_range): Likewise.
19310 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
19313 * doc/sourcebuild.texi (vect_float): Say that the selector
19314 only describes the situation when -funsafe-math-optimizations is on.
19315 (vect_float_strict): Document.
19317 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
19319 PR tree-optimization/83965
19320 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
19321 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
19322 instead of checking only for a reduction.
19323 (vect_recog_widen_sum_pattern): Likewise.
19325 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
19327 * predict.c (probably_never_executed): Only use precise profile info.
19328 (compute_function_frequency): Skip after inlining hack since we now
19329 have quality checking.
19331 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
19333 * profile-count.h (profile_probability::very_unlikely,
19334 profile_probability::unlikely, profile_probability::even): Set
19335 precision to guessed.
19337 2018-01-23 Richard Biener <rguenther@suse.de>
19339 PR tree-optimization/83963
19340 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
19341 Properly terminate dominator walk when crossing the exit edge not
19342 when visiting its source block.
19344 2018-01-23 Jakub Jelinek <jakub@redhat.com>
19347 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
19348 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
19350 2018-01-22 Jakub Jelinek <jakub@redhat.com>
19352 PR tree-optimization/83957
19353 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
19354 semicolon after for body surrounded by braces.
19356 PR tree-optimization/83081
19357 * profile-count.h (profile_probability::split): New method.
19358 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
19359 Use profile_probability::split.
19360 (do_compare_rtx_and_jump): Fix adjustment of probabilities
19361 when splitting a single conditional jump into 2.
19363 2018-01-22 David Malcolm <dmalcolm@redhat.com>
19365 PR tree-optimization/69452
19366 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
19369 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19371 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
19372 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
19373 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
19375 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19377 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
19379 * config/rl78/rl78.md (movdi): New define_expand.
19380 * config/rl78/rl78.c (rl78_split_movdi): New function.
19382 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
19385 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
19387 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
19388 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
19389 128-bit to produce an UNSPEC move to get the double word with the
19390 signbit and then a shift directly to do signbit.
19391 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
19392 implementation with a new version that just does either a direct
19393 move or a regular move. Move memory interface to separate insns.
19394 Move insns so they are next to the expander.
19395 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
19396 with signbit move. Split big and little endian case.
19397 (signbit<mode>2_dm_mem_le): Likewise.
19398 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
19399 (signbit<mode>2_dm2): Likewise.
19401 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19403 * config/rl78/rl78.md (anddi3): New define_expand.
19405 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19407 * config/rl78/rl78.md (umindi3): New define_expand.
19409 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19411 * config/rl78/rl78.md (smindi3): New define_expand.
19413 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19415 * config/rl78/rl78.md (smaxdi3): New define_expand.
19417 2018-01-22 Carl Love <cel@us.ibm.com>
19419 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
19420 LVX_V1TI): Add macro expansion.
19421 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
19422 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
19423 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
19424 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
19425 Change check to determine if the instruction is a byte reversing
19426 entry. Fix typo in comment.
19427 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
19428 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
19429 Add def_builtin calls for new builtins.
19430 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
19431 Add define_insn expansion.
19433 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19435 * config/rl78/rl78.md (umaxdi3): New define_expand.
19437 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19439 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
19440 for non-QImode registers.
19442 2018-01-22 Richard Biener <rguenther@suse.de>
19444 PR tree-optimization/83963
19445 * graphite-scop-detection.c (scop_detection::get_sese): Delay
19446 including the loop exit block.
19447 (scop_detection::merge_sese): Likewise.
19448 (scop_detection::add_scop): Do it here instead.
19450 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19452 * doc/sourcebuild.texi (arm_softfloat): Document.
19454 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
19457 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
19458 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
19459 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
19461 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19462 David Edelsohn <dje.gcc@gmail.com>
19465 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19466 Change "crset eq" to "crset 2".
19467 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19468 (*call_indirect_aix<mode>_nospec): Likewise.
19469 (*call_value_indirect_aix<mode>_nospec): Likewise.
19470 (*call_indirect_elfv2<mode>_nospec): Likewise.
19471 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
19472 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
19473 change assembly output from . to $.
19474 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19475 (indirect_jump<mode>_nospec): Change assembly output from . to $.
19476 (*tablejump<mode>_internal1_nospec): Likewise.
19478 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
19481 * config/sh/sh_optimize_sett_clrt.cc:
19482 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
19484 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
19486 PR tree-optimization/83940
19487 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
19488 offset_dt to vect_constant_def rather than vect_unknown_def_type.
19489 (vect_check_load_store_mask): Add a mask_dt_out parameter and
19490 use it to pass back the definition type.
19491 (vect_check_store_rhs): Likewise rhs_dt_out.
19492 (vect_build_gather_load_calls): Add a mask_dt argument and use
19493 it instead of a call to vect_is_simple_use.
19494 (vectorizable_store): Update calls to vect_check_load_store_mask
19495 and vect_check_store_rhs. Use the dt returned by the latter instead
19496 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
19497 instead of calls to vect_is_simple_use. Pass the scalar rather
19498 than the vector operand to vect_is_simple_use when handling
19499 second and subsequent copies of an rhs value.
19500 (vectorizable_load): Update calls to vect_check_load_store_mask
19501 and vect_build_gather_load_calls. Use the cached mask_dt and
19502 gs_info.offset_dt instead of calls to vect_is_simple_use.
19504 2018-01-20 Jakub Jelinek <jakub@redhat.com>
19506 PR middle-end/83945
19507 * tree-emutls.c: Include gimplify.h.
19508 (lower_emutls_2): New function.
19509 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
19510 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
19511 it before further processing.
19514 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
19515 UINTVAL (trueop1) instead of INTVAL (op1).
19517 2018-01-19 Jakub Jelinek <jakub@redhat.com>
19521 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
19522 INCOMING_FRAME_SP_OFFSET if not defined.
19523 (scan_trace): Add ENTRY argument. If true and
19524 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
19525 emit a note to adjust the CFA offset.
19526 (create_cfi_notes): Adjust scan_trace callers.
19527 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
19528 INCOMING_FRAME_SP_OFFSET in the CIE.
19529 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
19530 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
19532 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
19533 * doc/tm.texi: Regenerated.
19535 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19537 PR rtl-optimization/83147
19538 * lra-constraints.c (remove_inheritance_pseudos): Use
19539 lra_substitute_pseudo_within_insn.
19541 2018-01-19 Tom de Vries <tom@codesourcery.com>
19542 Cesar Philippidis <cesar@codesourcery.com>
19545 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
19547 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
19550 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
19551 spaces for function labels.
19553 2018-01-19 Martin Liska <mliska@suse.cz>
19555 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
19556 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
19557 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
19558 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
19559 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
19560 (PRED_CONST_RETURN): Change from 69 to 65.
19561 (PRED_NULL_RETURN): Change from 91 to 71.
19562 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
19563 (PRED_LOOP_GUARD): Change from 66 to 73.
19565 2018-01-19 Martin Liska <mliska@suse.cz>
19567 * predict.c (predict_insn_def): Add new assert.
19568 (struct branch_predictor): Change type to signed integer.
19569 (test_prediction_value_range): Amend test to cover
19570 PROB_UNINITIALIZED.
19571 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
19572 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
19573 (PRED_LOOP_ITERATIONS_MAX): Likewise.
19574 (PRED_LOOP_IV_COMPARE): Likewise.
19575 * predict.h (PROB_UNINITIALIZED): Define new constant.
19577 2018-01-19 Martin Liska <mliska@suse.cz>
19579 * predict.c (dump_prediction): Add new format for
19580 analyze_brprob.py script which is enabled with -details
19582 * profile-count.h (precise_p): New function.
19584 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
19586 PR tree-optimization/83922
19587 * tree-vect-loop.c (vect_verify_full_masking): Return false if
19588 there are no statements that need masking.
19589 (vect_active_double_reduction_p): New function.
19590 (vect_analyze_loop_operations): Use it when handling phis that
19591 are not in the loop header.
19593 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
19595 PR tree-optimization/83914
19596 * tree-vect-loop.c (vectorizable_induction): Don't convert
19597 init_expr or apply the peeling adjustment for inductions
19598 that are nested within the vectorized loop.
19600 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19602 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
19605 2018-01-18 Jakub Jelinek <jakub@redhat.com>
19609 * function.h (gimplify_parameters): Add gimple_seq * argument.
19610 * function.c: Include gimple.h and options.h.
19611 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
19612 for the added local temporaries if needed.
19613 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
19614 if there are any parameter cleanups, wrap whole body into a
19615 try/finally with the cleanups.
19617 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
19620 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
19621 Use GET_MODE_CLASS for scalar floating point.
19623 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
19627 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
19628 Fix call of call_cgraph_insertion_hooks.
19630 2018-01-18 Martin Sebor <msebor@redhat.com>
19632 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
19634 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
19637 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
19640 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
19643 * common.opt: (-ffile-prefix-map): New option.
19644 * opts.c (common_handle_option): Defer it.
19645 * opts-global.c (handle_common_deferred_options): Handle it.
19646 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
19647 * file-prefix-map.h: New file.
19648 (remap_debug_filename, add_debug_prefix_map): ...here.
19649 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
19650 * final.c (debug_prefix_map, add_debug_prefix_map
19651 remap_debug_filename): Move to...
19652 * file-prefix-map.c: New file.
19653 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
19654 generalize, get rid of alloca(), use strrchr() instead of strchr().
19655 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
19656 Implement in terms of add_prefix_map().
19657 (remap_macro_filename, remap_debug_filename): Implement in term of
19659 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
19660 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
19661 * dbxout.c: Include file-prefix-map.h.
19662 * varasm.c: Likewise.
19663 * vmsdbgout.c: Likewise.
19664 * xcoffout.c: Likewise.
19665 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
19666 * doc/cppopts.texi (-fmacro-prefix-map): Document.
19667 * doc/invoke.texi (-ffile-prefix-map): Document.
19668 (-fdebug-prefix-map): Update description.
19670 2018-01-18 Martin Liska <mliska@suse.cz>
19672 * config/i386/i386.c (indirect_thunk_name): Document that also
19674 (output_indirect_thunk): Document why both instructions
19675 (pause and lfence) are generated.
19677 2018-01-18 Richard Biener <rguenther@suse.de>
19679 PR tree-optimization/83887
19680 * graphite-scop-detection.c
19681 (scop_detection::get_nearest_dom_with_single_entry): Remove.
19682 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
19683 (scop_detection::merge_sese): Re-implement with a flood-fill
19684 algorithm that properly finds a SESE region if it exists.
19686 2018-01-18 Jakub Jelinek <jakub@redhat.com>
19689 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
19690 pointer_diff optimizations use view_convert instead of convert.
19692 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19694 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19695 Generate different code for -mno-speculate-indirect-jumps.
19696 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19697 (*call_indirect_aix<mode>): Disable for
19698 -mno-speculate-indirect-jumps.
19699 (*call_indirect_aix<mode>_nospec): New define_insn.
19700 (*call_value_indirect_aix<mode>): Disable for
19701 -mno-speculate-indirect-jumps.
19702 (*call_value_indirect_aix<mode>_nospec): New define_insn.
19703 (*sibcall_nonlocal_sysv<mode>): Generate different code for
19704 -mno-speculate-indirect-jumps.
19705 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19707 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
19709 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
19710 long double type, set the flags for noting the default long double
19711 type, even if we don't pass or return a long double type.
19713 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
19716 * ipa-inline.c (flatten_function): Do not overwrite final inlining
19719 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
19721 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
19722 support for merge[hl].
19723 (fold_mergehl_helper): New helper function.
19724 (tree-vector-builder.h): New #include for tree_vector_builder usage.
19725 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
19726 (altivec_vmrglw_direct): Add xxmrglw insn.
19728 2018-01-17 Andrew Waterman <andrew@sifive.com>
19730 * config/riscv/riscv.c (riscv_conditional_register_usage): If
19731 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
19733 2018-01-17 David Malcolm <dmalcolm@redhat.com>
19736 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
19737 call the lto_location_cache before reading the
19738 DECL_SOURCE_LOCATION of the types.
19740 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
19741 Richard Sandiford <richard.sandiford@linaro.org>
19743 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
19744 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
19745 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
19746 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
19747 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
19749 * config/aarch64/constraints.md (aarch64_movti_operand):
19751 * config/aarch64/predicates.md (Uti): Add new constraint.
19753 2018-01-17 Carl Love <cel@us.ibm.com>
19755 * config/rs6000/vsx.md (define_expand xl_len_r,
19756 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
19757 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
19759 (define_expand, define_insn): Move the shift left from the
19760 define_insn to the define_expand for lxvl and stxvl instructions.
19761 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
19762 and XL_LEN_R definitions to PURE.
19764 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
19766 * config/i386/i386.c (indirect_thunk_name): Declare regno
19767 as unsigned int. Compare regno with INVALID_REGNUM.
19768 (output_indirect_thunk): Ditto.
19769 (output_indirect_thunk_function): Ditto.
19770 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
19771 in the call to output_indirect_thunk_function.
19773 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
19775 PR middle-end/83884
19776 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
19777 rather than the size of inner_type to determine the stack slot size
19778 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
19780 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
19783 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
19786 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
19788 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
19789 endian Linux systems to optionally enable multilibs for selecting
19790 the long double type if the user configured an explicit type.
19791 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
19792 have no long double multilibs if not defined.
19793 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
19794 warn if the user used -mabi={ieee,ibm}longdouble and we built
19795 multilibs for long double.
19796 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
19797 appropriate multilib option.
19798 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
19800 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
19801 for building long double multilibs.
19802 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
19804 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
19806 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
19809 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
19811 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
19814 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
19817 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
19820 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
19822 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
19823 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
19825 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
19827 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
19828 different rtl trees depending on TARGET_64BIT.
19829 (rs6000_gen_lvx): Likewise.
19831 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
19833 * config/visium/visium.md (nop): Tweak comment.
19834 (hazard_nop): Likewise.
19836 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19838 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
19839 -mspeculate-indirect-jumps.
19840 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
19841 for -mno-speculate-indirect-jumps.
19842 (*call_indirect_elfv2<mode>_nospec): New define_insn.
19843 (*call_value_indirect_elfv2<mode>): Disable for
19844 -mno-speculate-indirect-jumps.
19845 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
19846 (indirect_jump): Emit different RTL for
19847 -mno-speculate-indirect-jumps.
19848 (*indirect_jump<mode>): Disable for
19849 -mno-speculate-indirect-jumps.
19850 (*indirect_jump<mode>_nospec): New define_insn.
19851 (tablejump): Emit different RTL for
19852 -mno-speculate-indirect-jumps.
19853 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
19854 (tablejumpsi_nospec): New define_expand.
19855 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
19856 (tablejumpdi_nospec): New define_expand.
19857 (*tablejump<mode>_internal1): Disable for
19858 -mno-speculate-indirect-jumps.
19859 (*tablejump<mode>_internal1_nospec): New define_insn.
19860 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
19863 2018-01-16 Artyom Skrobov tyomitch@gmail.com
19865 * caller-save.c (insert_save): Drop unnecessary parameter. All
19868 2018-01-16 Jakub Jelinek <jakub@redhat.com>
19869 Richard Biener <rguenth@suse.de>
19872 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
19873 return early, inline manually is_gimple_sizepos. Make sure if we
19874 call gimplify_expr we don't end up with a gimple constant.
19875 * tree.c (variably_modified_type_p): Don't return true for
19876 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
19877 * gimplify.h (is_gimple_sizepos): Remove.
19879 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19881 PR tree-optimization/83857
19882 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
19883 vectorizable_live_operation for pure SLP statements.
19884 (vectorizable_live_operation): Handle PHIs.
19886 2018-01-16 Richard Biener <rguenther@suse.de>
19888 PR tree-optimization/83867
19889 * tree-vect-stmts.c (vect_transform_stmt): Precompute
19890 nested_in_vect_loop_p since the scalar stmt may get invalidated.
19892 2018-01-16 Jakub Jelinek <jakub@redhat.com>
19895 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
19896 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
19897 If off is not INTEGER_CST, issue a may not be aligned warning
19898 rather than isn't aligned. Use isn%'t rather than isn't.
19899 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
19901 <case MULT_EXPR>: Improve the case when bottom and one of the
19902 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
19903 operand, in that case check if the other operand is multiple of
19904 bottom divided by the INTEGER_CST operand.
19906 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19909 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
19910 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
19911 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
19912 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
19913 * config/pa/pa.c (pa_function_arg_advance): Likewise.
19914 (pa_function_arg, pa_arg_partial_bytes): Likewise.
19915 (pa_function_arg_size): New function.
19917 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19919 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
19920 in a separate statement.
19922 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19924 PR tree-optimization/83847
19925 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
19926 group gathers and scatters.
19928 2018-01-16 Jakub Jelinek <jakub@redhat.com>
19930 PR rtl-optimization/86620
19931 * params.def (max-sched-ready-insns): Bump minimum value to 1.
19933 PR rtl-optimization/83213
19934 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
19935 to last if both are JUMP_INSNs.
19937 PR tree-optimization/83843
19938 * gimple-ssa-store-merging.c
19939 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
19940 store_immediate_info for bswap/nop orig_stores.
19942 2018-01-15 Andrew Waterman <andrew@sifive.com>
19944 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
19946 <UDIV>: Increase cost if !TARGET_DIV.
19948 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
19950 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
19951 (define_attr "cr_logical_3op"): New.
19952 (cceq_ior_compare): Adjust.
19953 (cceq_ior_compare_complement): Adjust.
19954 (*cceq_rev_compare): Adjust.
19955 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
19956 (is_cracked_insn): Adjust.
19957 (insn_must_be_first_in_group): Adjust.
19958 * config/rs6000/40x.md: Adjust.
19959 * config/rs6000/440.md: Adjust.
19960 * config/rs6000/476.md: Adjust.
19961 * config/rs6000/601.md: Adjust.
19962 * config/rs6000/603.md: Adjust.
19963 * config/rs6000/6xx.md: Adjust.
19964 * config/rs6000/7450.md: Adjust.
19965 * config/rs6000/7xx.md: Adjust.
19966 * config/rs6000/8540.md: Adjust.
19967 * config/rs6000/cell.md: Adjust.
19968 * config/rs6000/e300c2c3.md: Adjust.
19969 * config/rs6000/e500mc.md: Adjust.
19970 * config/rs6000/e500mc64.md: Adjust.
19971 * config/rs6000/e5500.md: Adjust.
19972 * config/rs6000/e6500.md: Adjust.
19973 * config/rs6000/mpc.md: Adjust.
19974 * config/rs6000/power4.md: Adjust.
19975 * config/rs6000/power5.md: Adjust.
19976 * config/rs6000/power6.md: Adjust.
19977 * config/rs6000/power7.md: Adjust.
19978 * config/rs6000/power8.md: Adjust.
19979 * config/rs6000/power9.md: Adjust.
19980 * config/rs6000/rs64.md: Adjust.
19981 * config/rs6000/titan.md: Adjust.
19983 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19985 * config/i386/predicates.md (indirect_branch_operand): Rewrite
19986 ix86_indirect_branch_register logic.
19988 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19990 * config/i386/constraints.md (Bs): Update
19991 ix86_indirect_branch_register check. Don't check
19992 ix86_indirect_branch_register with GOT_memory_operand.
19994 * config/i386/predicates.md (GOT_memory_operand): Don't check
19995 ix86_indirect_branch_register here.
19996 (GOT32_symbol_operand): Likewise.
19998 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20000 * config/i386/predicates.md (constant_call_address_operand):
20001 Rewrite ix86_indirect_branch_register logic.
20002 (sibcall_insn_operand): Likewise.
20004 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20006 * config/i386/constraints.md (Bs): Replace
20007 ix86_indirect_branch_thunk_register with
20008 ix86_indirect_branch_register.
20010 * config/i386/i386.md (indirect_jump): Likewise.
20011 (tablejump): Likewise.
20012 (*sibcall_memory): Likewise.
20013 (*sibcall_value_memory): Likewise.
20014 Peepholes of indirect call and jump via memory: Likewise.
20015 * config/i386/i386.opt: Likewise.
20016 * config/i386/predicates.md (indirect_branch_operand): Likewise.
20017 (GOT_memory_operand): Likewise.
20018 (call_insn_operand): Likewise.
20019 (sibcall_insn_operand): Likewise.
20020 (GOT32_symbol_operand): Likewise.
20022 2018-01-15 Jakub Jelinek <jakub@redhat.com>
20024 PR middle-end/83837
20025 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
20026 type rather than type addr's type points to.
20027 (expand_omp_atomic_mutex): Likewise.
20028 (expand_omp_atomic): Likewise.
20030 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20033 * config/i386/i386.c (output_indirect_thunk_function): Use
20034 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
20035 for __x86_return_thunk.
20037 2018-01-15 Richard Biener <rguenther@suse.de>
20039 PR middle-end/83850
20040 * expmed.c (extract_bit_field_1): Fix typo.
20042 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20045 * config/arm/iterators.md (VF): New mode iterator.
20046 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
20047 Remove integer-related logic from pattern.
20048 (neon_vabd<mode>_3): Likewise.
20050 2018-01-15 Jakub Jelinek <jakub@redhat.com>
20052 PR middle-end/82694
20053 * common.opt (fstrict-overflow): No longer an alias.
20054 (fwrapv-pointer): New option.
20055 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
20056 also for pointer types based on flag_wrapv_pointer.
20057 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
20058 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
20059 opts->x_flag_wrapv got set.
20060 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
20061 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
20062 POINTER_TYPE_OVERFLOW_UNDEFINED.
20063 * match.pd: Likewise in address comparison pattern.
20064 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
20066 2018-01-15 Richard Biener <rguenther@suse.de>
20069 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
20070 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
20071 Reset type names to their identifier if their TYPE_DECL doesn't
20072 have linkage (and thus is used for ODR and devirt).
20073 (save_debug_info_for_decl): Remove.
20074 (save_debug_info_for_type): Likewise.
20075 (add_tree_to_fld_list): Adjust.
20076 * tree-pretty-print.c (dump_generic_node): Make dumping of
20077 type names more robust.
20079 2018-01-15 Richard Biener <rguenther@suse.de>
20081 * BASE-VER: Bump to 8.0.1.
20083 2018-01-14 Martin Sebor <msebor@redhat.com>
20086 * builtins.c (check_access): Avoid warning when the no-warning bit
20089 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
20091 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
20092 * ira-color (allocno_hard_regs_compare): Likewise.
20094 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
20097 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
20098 Use .pushsection/.popsection.
20100 2018-01-14 Martin Sebor <msebor@redhat.com>
20103 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
20105 2018-01-14 Jakub Jelinek <jakub@redhat.com>
20107 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
20108 entry from extra_headers.
20109 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
20110 extra_headers, make the list bitwise identical to the i?86-*-* one.
20112 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20114 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
20115 -mcmodel=large with -mindirect-branch=thunk,
20116 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
20117 -mfunction-return=thunk-extern.
20118 * doc/invoke.texi: Document -mcmodel=large is incompatible with
20119 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
20120 -mfunction-return=thunk and -mfunction-return=thunk-extern.
20122 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20124 * config/i386/i386.c (print_reg): Print the name of the full
20125 integer register without '%'.
20126 (ix86_print_operand): Handle 'V'.
20127 * doc/extend.texi: Document 'V' modifier.
20129 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20131 * config/i386/constraints.md (Bs): Disallow memory operand for
20132 -mindirect-branch-register.
20134 * config/i386/predicates.md (indirect_branch_operand): Likewise.
20135 (GOT_memory_operand): Likewise.
20136 (call_insn_operand): Likewise.
20137 (sibcall_insn_operand): Likewise.
20138 (GOT32_symbol_operand): Likewise.
20139 * config/i386/i386.md (indirect_jump): Call convert_memory_address
20140 for -mindirect-branch-register.
20141 (tablejump): Likewise.
20142 (*sibcall_memory): Likewise.
20143 (*sibcall_value_memory): Likewise.
20144 Disallow peepholes of indirect call and jump via memory for
20145 -mindirect-branch-register.
20146 (*call_pop): Replace m with Bw.
20147 (*call_value_pop): Likewise.
20148 (*sibcall_pop_memory): Replace m with Bs.
20149 * config/i386/i386.opt (mindirect-branch-register): New option.
20150 * doc/invoke.texi: Document -mindirect-branch-register option.
20152 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20154 * config/i386/i386-protos.h (ix86_output_function_return): New.
20155 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
20156 set function_return_type.
20157 (indirect_thunk_name): Add ret_p to indicate thunk for function
20159 (output_indirect_thunk_function): Pass false to
20160 indirect_thunk_name.
20161 (ix86_output_indirect_branch_via_reg): Likewise.
20162 (ix86_output_indirect_branch_via_push): Likewise.
20163 (output_indirect_thunk_function): Create alias for function
20164 return thunk if regno < 0.
20165 (ix86_output_function_return): New function.
20166 (ix86_handle_fndecl_attribute): Handle function_return.
20167 (ix86_attribute_table): Add function_return.
20168 * config/i386/i386.h (machine_function): Add
20169 function_return_type.
20170 * config/i386/i386.md (simple_return_internal): Use
20171 ix86_output_function_return.
20172 (simple_return_internal_long): Likewise.
20173 * config/i386/i386.opt (mfunction-return=): New option.
20174 (indirect_branch): Mention -mfunction-return=.
20175 * doc/extend.texi: Document function_return function attribute.
20176 * doc/invoke.texi: Document -mfunction-return= option.
20178 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20180 * config/i386/i386-opts.h (indirect_branch): New.
20181 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
20182 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
20183 with local indirect jump when converting indirect call and jump.
20184 (ix86_set_indirect_branch_type): New.
20185 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
20186 (indirectlabelno): New.
20187 (indirect_thunk_needed): Likewise.
20188 (indirect_thunk_bnd_needed): Likewise.
20189 (indirect_thunks_used): Likewise.
20190 (indirect_thunks_bnd_used): Likewise.
20191 (INDIRECT_LABEL): Likewise.
20192 (indirect_thunk_name): Likewise.
20193 (output_indirect_thunk): Likewise.
20194 (output_indirect_thunk_function): Likewise.
20195 (ix86_output_indirect_branch_via_reg): Likewise.
20196 (ix86_output_indirect_branch_via_push): Likewise.
20197 (ix86_output_indirect_branch): Likewise.
20198 (ix86_output_indirect_jmp): Likewise.
20199 (ix86_code_end): Call output_indirect_thunk_function if needed.
20200 (ix86_output_call_insn): Call ix86_output_indirect_branch if
20202 (ix86_handle_fndecl_attribute): Handle indirect_branch.
20203 (ix86_attribute_table): Add indirect_branch.
20204 * config/i386/i386.h (machine_function): Add indirect_branch_type
20205 and has_local_indirect_jump.
20206 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
20208 (tablejump): Likewise.
20209 (*indirect_jump): Use ix86_output_indirect_jmp.
20210 (*tablejump_1): Likewise.
20211 (simple_return_indirect_internal): Likewise.
20212 * config/i386/i386.opt (mindirect-branch=): New option.
20213 (indirect_branch): New.
20216 (thunk-inline): Likewise.
20217 (thunk-extern): Likewise.
20218 * doc/extend.texi: Document indirect_branch function attribute.
20219 * doc/invoke.texi: Document -mindirect-branch= option.
20221 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
20224 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
20226 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
20228 * ipa-inline.c (want_inline_small_function_p): Return false if
20229 inlining has already failed with CIF_FINAL_ERROR.
20230 (update_caller_keys): Call want_inline_small_function_p before
20232 (update_callee_keys): Likewise.
20234 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
20236 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
20238 (rs6000_quadword_masked_address_p): Likewise.
20239 (quad_aligned_load_p): Likewise.
20240 (quad_aligned_store_p): Likewise.
20241 (const_load_sequence_p): Add comment to describe the outer-most loop.
20242 (mimic_memory_attributes_and_flags): New function.
20243 (rs6000_gen_stvx): Likewise.
20244 (replace_swapped_aligned_store): Likewise.
20245 (rs6000_gen_lvx): Likewise.
20246 (replace_swapped_aligned_load): Likewise.
20247 (replace_swapped_load_constant): Capitalize argument name in
20248 comment describing this function.
20249 (rs6000_analyze_swaps): Add a third pass to search for vector loads
20250 and stores that access quad-word aligned addresses and replace
20251 with stvx or lvx instructions when appropriate.
20252 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
20253 New function prototype.
20254 (rs6000_quadword_masked_address_p): Likewise.
20255 (rs6000_gen_lvx): Likewise.
20256 (rs6000_gen_stvx): Likewise.
20257 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
20258 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
20259 when memory address is aligned.
20260 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
20261 this split to select lvx instruction when memory address is aligned.
20262 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
20263 instruction when memory address is aligned.
20264 (*vsx_le_perm_load_v16qi): Likewise.
20265 (four unnamed splitters): Modify to select the stvx instruction
20266 when memory is aligned.
20268 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
20270 * predict.c (determine_unlikely_bbs): Handle correctly BBs
20271 which appears in the queue multiple times.
20273 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20274 Alan Hayward <alan.hayward@arm.com>
20275 David Sherwood <david.sherwood@arm.com>
20277 * tree-vectorizer.h (vec_lower_bound): New structure.
20278 (_loop_vec_info): Add check_nonzero and lower_bounds.
20279 (LOOP_VINFO_CHECK_NONZERO): New macro.
20280 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
20281 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
20282 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
20283 fields. Make seg_len the distance travelled, not including the
20285 (dr_direction_indicator): Declare.
20286 (dr_zero_step_indicator): Likewise.
20287 (dr_known_forward_stride_p): Likewise.
20288 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
20290 (runtime_alias_check_p): Allow runtime alias checks with
20292 (operator ==): Compare access_size and align.
20293 (prune_runtime_alias_test_list): Rework for new distinction between
20294 the access_size and seg_len.
20295 (create_intersect_range_checks_index): Likewise. Cope with polynomial
20297 (get_segment_min_max): New function.
20298 (create_intersect_range_checks): Use it.
20299 (dr_step_indicator): New function.
20300 (dr_direction_indicator): Likewise.
20301 (dr_zero_step_indicator): Likewise.
20302 (dr_known_forward_stride_p): Likewise.
20303 * tree-loop-distribution.c (data_ref_segment_size): Return
20304 DR_STEP * (niters - 1).
20305 (compute_alias_check_pairs): Update call to the dr_with_seg_len
20307 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
20308 (vect_preserves_scalar_order_p): New function, split out from...
20309 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
20310 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
20311 (vect_vfa_access_size): New function.
20312 (vect_vfa_align): Likewise.
20313 (vect_compile_time_alias): Take access_size_a and access_b arguments.
20314 (dump_lower_bound): New function.
20315 (vect_check_lower_bound): Likewise.
20316 (vect_small_gap_p): Likewise.
20317 (vectorizable_with_step_bound_p): Likewise.
20318 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
20319 depencies if the vectorization factor is 1. Convert the checks
20320 for nonzero steps into checks on the bounds of DR_STEP. Try using
20321 a bunds check for variable steps if the minimum required step is
20322 relatively small. Update calls to the dr_with_seg_len
20323 constructor and to vect_compile_time_alias.
20324 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
20326 (vect_loop_versioning): Call it.
20327 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
20329 (vect_estimate_min_profitable_iters): Account for any bounds checks.
20331 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20332 Alan Hayward <alan.hayward@arm.com>
20333 David Sherwood <david.sherwood@arm.com>
20335 * doc/sourcebuild.texi (vect_scatter_store): Document.
20336 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
20338 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
20340 * genopinit.c (main): Add supports_vec_scatter_store and
20341 supports_vec_scatter_store_cached to target_optabs.
20342 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
20343 IFN_MASK_SCATTER_STORE.
20344 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
20346 * internal-fn.h (internal_store_fn_p): Declare.
20347 (internal_fn_stored_value_index): Likewise.
20348 * internal-fn.c (scatter_store_direct): New macro.
20349 (expand_scatter_store_optab_fn): New function.
20350 (direct_scatter_store_optab_supported_p): New macro.
20351 (internal_store_fn_p): New function.
20352 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
20353 IFN_MASK_SCATTER_STORE.
20354 (internal_fn_mask_index): Likewise.
20355 (internal_fn_stored_value_index): New function.
20356 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
20357 for scatter stores.
20358 * optabs-query.h (supports_vec_scatter_store_p): Declare.
20359 * optabs-query.c (supports_vec_scatter_store_p): New function.
20360 * tree-vectorizer.h (vect_get_store_rhs): Declare.
20361 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
20362 true for scatter stores.
20363 (vect_gather_scatter_fn_p): Handle scatter stores too.
20364 (vect_check_gather_scatter): Consider using scatter stores if
20365 supports_vec_scatter_store_p.
20366 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
20367 scatter stores too.
20368 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
20369 internal_fn_stored_value_index.
20370 (check_load_store_masking): Handle scatter stores too.
20371 (vect_get_store_rhs): Make public.
20372 (vectorizable_call): Use internal_store_fn_p.
20373 (vectorizable_store): Handle scatter store internal functions.
20374 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
20375 when deciding whether the end of the group has been reached.
20376 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
20377 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
20378 (mask_scatter_store<mode>): New insns.
20380 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20381 Alan Hayward <alan.hayward@arm.com>
20382 David Sherwood <david.sherwood@arm.com>
20384 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
20385 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
20386 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
20388 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
20389 Use vect_truncate_gather_scatter_offset if we can't treat the
20390 operation as a normal gather load or scatter store.
20391 (get_group_load_store_type): Take the gather_scatter_info
20392 as argument. Try using a gather load or scatter store for
20393 single-element groups.
20394 (get_load_store_type): Update calls to get_group_load_store_type
20395 and vect_use_strided_gather_scatters_p.
20397 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20398 Alan Hayward <alan.hayward@arm.com>
20399 David Sherwood <david.sherwood@arm.com>
20401 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
20402 optional tree argument.
20403 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
20405 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
20406 but continue to use the current value as a fallback.
20407 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
20408 to compare the updates.
20409 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
20410 (get_load_store_type): Use it when handling a strided access.
20411 (vect_get_strided_load_store_ops): New function.
20412 (vect_get_data_ptr_increment): Likewise.
20413 (vectorizable_load): Handle strided gather loads. Always pass
20414 a step to vect_create_data_ref_ptr and bump_vector_ptr.
20416 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20417 Alan Hayward <alan.hayward@arm.com>
20418 David Sherwood <david.sherwood@arm.com>
20420 * doc/md.texi (gather_load@var{m}): Document.
20421 (mask_gather_load@var{m}): Likewise.
20422 * genopinit.c (main): Add supports_vec_gather_load and
20423 supports_vec_gather_load_cached to target_optabs.
20424 * optabs-tree.c (init_tree_optimization_optabs): Use
20425 ggc_cleared_alloc to allocate target_optabs.
20426 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
20427 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
20429 * internal-fn.h (internal_load_fn_p): Declare.
20430 (internal_gather_scatter_fn_p): Likewise.
20431 (internal_fn_mask_index): Likewise.
20432 (internal_gather_scatter_fn_supported_p): Likewise.
20433 * internal-fn.c (gather_load_direct): New macro.
20434 (expand_gather_load_optab_fn): New function.
20435 (direct_gather_load_optab_supported_p): New macro.
20436 (direct_internal_fn_optab): New function.
20437 (internal_load_fn_p): Likewise.
20438 (internal_gather_scatter_fn_p): Likewise.
20439 (internal_fn_mask_index): Likewise.
20440 (internal_gather_scatter_fn_supported_p): Likewise.
20441 * optabs-query.c (supports_at_least_one_mode_p): New function.
20442 (supports_vec_gather_load_p): Likewise.
20443 * optabs-query.h (supports_vec_gather_load_p): Declare.
20444 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
20445 and memory_type field.
20446 (NUM_PATTERNS): Bump to 15.
20447 * tree-vect-data-refs.c: Include internal-fn.h.
20448 (vect_gather_scatter_fn_p): New function.
20449 (vect_describe_gather_scatter_call): Likewise.
20450 (vect_check_gather_scatter): Try using internal functions for
20451 gather loads. Recognize existing calls to a gather load function.
20452 (vect_analyze_data_refs): Consider using gather loads if
20453 supports_vec_gather_load_p.
20454 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
20455 (vect_get_gather_scatter_offset_type): Likewise.
20456 (vect_convert_mask_for_vectype): Likewise.
20457 (vect_add_conversion_to_patterm): Likewise.
20458 (vect_try_gather_scatter_pattern): Likewise.
20459 (vect_recog_gather_scatter_pattern): New pattern recognizer.
20460 (vect_vect_recog_func_ptrs): Add it.
20461 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
20462 internal_fn_mask_index and internal_gather_scatter_fn_p.
20463 (check_load_store_masking): Take the gather_scatter_info as an
20464 argument and handle gather loads.
20465 (vect_get_gather_scatter_ops): New function.
20466 (vectorizable_call): Check internal_load_fn_p.
20467 (vectorizable_load): Likewise. Handle gather load internal
20469 (vectorizable_store): Update call to check_load_store_masking.
20470 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
20471 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
20472 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
20473 (aarch64_gather_scale_operand_d): New predicates.
20474 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
20475 (mask_gather_load<mode>): New insns.
20477 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20478 Alan Hayward <alan.hayward@arm.com>
20479 David Sherwood <david.sherwood@arm.com>
20481 * optabs.def (fold_left_plus_optab): New optab.
20482 * doc/md.texi (fold_left_plus_@var{m}): Document.
20483 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
20484 * internal-fn.c (fold_left_direct): Define.
20485 (expand_fold_left_optab_fn): Likewise.
20486 (direct_fold_left_optab_supported_p): Likewise.
20487 * fold-const-call.c (fold_const_fold_left): New function.
20488 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
20489 * tree-parloops.c (valid_reduction_p): New function.
20490 (gather_scalar_reductions): Use it.
20491 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
20492 (vect_finish_replace_stmt): Declare.
20493 * tree-vect-loop.c (fold_left_reduction_fn): New function.
20494 (needs_fold_left_reduction_p): New function, split out from...
20495 (vect_is_simple_reduction): ...here. Accept reductions that
20496 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
20497 (vect_force_simple_reduction): Also store the reduction type in
20498 the assignment's STMT_VINFO_REDUC_TYPE.
20499 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
20500 (merge_with_identity): New function.
20501 (vect_expand_fold_left): Likewise.
20502 (vectorize_fold_left_reduction): Likewise.
20503 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
20504 scalar phi in place for it. Check for target support and reject
20505 cases that would reassociate the operation. Defer the transform
20506 phase to vectorize_fold_left_reduction.
20507 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
20508 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
20509 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
20511 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20513 * tree-if-conv.c (predicate_mem_writes): Remove redundant
20514 call to ifc_temp_var.
20516 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20517 Alan Hayward <alan.hayward@arm.com>
20518 David Sherwood <david.sherwood@arm.com>
20520 * target.def (legitimize_address_displacement): Take the original
20521 offset as a poly_int.
20522 * targhooks.h (default_legitimize_address_displacement): Update
20524 * targhooks.c (default_legitimize_address_displacement): Likewise.
20525 * doc/tm.texi: Regenerate.
20526 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
20527 as an argument, moving assert of ad->disp == ad->disp_term to...
20528 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
20529 Try calling targetm.legitimize_address_displacement before expanding
20530 the address rather than afterwards, and adjust for the new interface.
20531 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
20532 Match the new hook interface. Handle SVE addresses.
20533 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
20534 new hook interface.
20536 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20538 * Makefile.in (OBJS): Add early-remat.o.
20539 * target.def (select_early_remat_modes): New hook.
20540 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
20541 * doc/tm.texi: Regenerate.
20542 * targhooks.h (default_select_early_remat_modes): Declare.
20543 * targhooks.c (default_select_early_remat_modes): New function.
20544 * timevar.def (TV_EARLY_REMAT): New timevar.
20545 * passes.def (pass_early_remat): New pass.
20546 * tree-pass.h (make_pass_early_remat): Declare.
20547 * early-remat.c: New file.
20548 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
20550 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
20552 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20553 Alan Hayward <alan.hayward@arm.com>
20554 David Sherwood <david.sherwood@arm.com>
20556 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
20557 vfm1 with a bound_epilog parameter.
20558 (vect_do_peeling): Update calls accordingly, and move the prologue
20559 call earlier in the function. Treat the base bound_epilog as 0 for
20560 fully-masked loops and retain vf - 1 for other loops. Add 1 to
20561 this base when peeling for gaps.
20562 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
20563 with fully-masked loops.
20564 (vect_estimate_min_profitable_iters): Handle the single peeled
20565 iteration in that case.
20567 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20568 Alan Hayward <alan.hayward@arm.com>
20569 David Sherwood <david.sherwood@arm.com>
20571 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
20572 single-element interleaving even if the size is not a power of 2.
20573 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
20574 accesses for single-element interleaving if the group size is
20577 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20578 Alan Hayward <alan.hayward@arm.com>
20579 David Sherwood <david.sherwood@arm.com>
20581 * doc/md.texi (fold_extract_last_@var{m}): Document.
20582 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
20583 * optabs.def (fold_extract_last_optab): New optab.
20584 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
20585 * internal-fn.c (fold_extract_direct): New macro.
20586 (expand_fold_extract_optab_fn): Likewise.
20587 (direct_fold_extract_optab_supported_p): Likewise.
20588 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
20589 * tree-vect-loop.c (vect_model_reduction_cost): Handle
20590 EXTRACT_LAST_REDUCTION.
20591 (get_initial_def_for_reduction): Do not create an initial vector
20592 for EXTRACT_LAST_REDUCTION reductions.
20593 (vectorizable_reduction): Leave the scalar phi in place for
20594 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
20595 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
20596 epilogue code for EXTRACT_LAST_REDUCTION and defer the
20597 transform phase to vectorizable_condition.
20598 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
20600 (vect_finish_stmt_generation): ...here.
20601 (vect_finish_replace_stmt): New function.
20602 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
20603 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
20605 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
20607 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20608 Alan Hayward <alan.hayward@arm.com>
20609 David Sherwood <david.sherwood@arm.com>
20611 * doc/md.texi (extract_last_@var{m}): Document.
20612 * optabs.def (extract_last_optab): New optab.
20613 * internal-fn.def (EXTRACT_LAST): New internal function.
20614 * internal-fn.c (cond_unary_direct): New macro.
20615 (expand_cond_unary_optab_fn): Likewise.
20616 (direct_cond_unary_optab_supported_p): Likewise.
20617 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
20618 loops using EXTRACT_LAST.
20619 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
20620 (extract_last_<mode>): ...this optab.
20621 (vec_extract<mode><Vel>): Update accordingly.
20623 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20624 Alan Hayward <alan.hayward@arm.com>
20625 David Sherwood <david.sherwood@arm.com>
20627 * target.def (empty_mask_is_expensive): New hook.
20628 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
20629 * doc/tm.texi: Regenerate.
20630 * targhooks.h (default_empty_mask_is_expensive): Declare.
20631 * targhooks.c (default_empty_mask_is_expensive): New function.
20632 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
20633 if the target says that empty masks are expensive.
20634 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
20636 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
20638 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20639 Alan Hayward <alan.hayward@arm.com>
20640 David Sherwood <david.sherwood@arm.com>
20642 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
20643 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
20644 (vect_use_loop_mask_for_alignment_p): New function.
20645 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
20646 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
20647 niters_skip argument. Make sure that the first niters_skip elements
20648 of the first iteration are inactive.
20649 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
20650 Update call to vect_set_loop_masks_directly.
20651 (get_misalign_in_elems): New function, split out from...
20652 (vect_gen_prolog_loop_niters): ...here.
20653 (vect_update_init_of_dr): Take a code argument that specifies whether
20654 the adjustment should be added or subtracted.
20655 (vect_update_init_of_drs): Likewise.
20656 (vect_prepare_for_masked_peels): New function.
20657 (vect_do_peeling): Skip prologue peeling if we're using a mask
20658 instead. Update call to vect_update_inits_of_drs.
20659 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
20661 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
20662 alignment. Do not include the number of peeled iterations in
20663 the minimum threshold in that case.
20664 (vectorizable_induction): Adjust the start value down by
20665 LOOP_VINFO_MASK_SKIP_NITERS iterations.
20666 (vect_transform_loop): Call vect_prepare_for_masked_peels.
20667 Take the number of skipped iterations into account when calculating
20669 * tree-vect-stmts.c (vect_gen_while_not): New function.
20671 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20672 Alan Hayward <alan.hayward@arm.com>
20673 David Sherwood <david.sherwood@arm.com>
20675 * doc/sourcebuild.texi (vect_fully_masked): Document.
20676 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
20677 default value to 0.
20678 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
20680 (vect_analyze_loop_2): ...here. Don't check the vectorization
20681 factor against the number of loop iterations if the loop is
20684 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20685 Alan Hayward <alan.hayward@arm.com>
20686 David Sherwood <david.sherwood@arm.com>
20688 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
20689 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
20690 (dump_groups): Update accordingly.
20691 (iv_use::mem_type): New member variable.
20692 (address_p): New function.
20693 (record_use): Add a mem_type argument and initialize the new
20695 (record_group_use): Add a mem_type argument. Use address_p.
20696 Remove obsolete null checks of base_object. Update call to record_use.
20697 (find_interesting_uses_op): Update call to record_group_use.
20698 (find_interesting_uses_cond): Likewise.
20699 (find_interesting_uses_address): Likewise.
20700 (get_mem_type_for_internal_fn): New function.
20701 (find_address_like_use): Likewise.
20702 (find_interesting_uses_stmt): Try find_address_like_use before
20703 calling find_interesting_uses_op.
20704 (addr_offset_valid_p): Use the iv mem_type field as the type
20705 of the addressed memory.
20706 (add_autoinc_candidates): Likewise.
20707 (get_address_cost): Likewise.
20708 (split_small_address_groups_p): Use address_p.
20709 (split_address_groups): Likewise.
20710 (add_iv_candidate_for_use): Likewise.
20711 (autoinc_possible_for_pair): Likewise.
20712 (rewrite_groups): Likewise.
20713 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
20714 (determine_group_iv_cost): Update after split of USE_ADDRESS.
20715 (get_alias_ptr_type_for_ptr_address): New function.
20716 (rewrite_use_address): Rewrite address uses in calls that were
20717 identified by find_address_like_use.
20719 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20720 Alan Hayward <alan.hayward@arm.com>
20721 David Sherwood <david.sherwood@arm.com>
20723 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
20725 * gimple-expr.h (is_gimple_addressable: Likewise.
20726 * gimple-expr.c (is_gimple_address): Likewise.
20727 * internal-fn.c (expand_call_mem_ref): New function.
20728 (expand_mask_load_optab_fn): Use it.
20729 (expand_mask_store_optab_fn): Likewise.
20731 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20732 Alan Hayward <alan.hayward@arm.com>
20733 David Sherwood <david.sherwood@arm.com>
20735 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
20736 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
20737 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
20738 (cond_umax@var{mode}): Document.
20739 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
20740 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
20741 (cond_umin_optab, cond_umax_optab): New optabs.
20742 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
20743 (COND_IOR, COND_XOR): New internal functions.
20744 * internal-fn.h (get_conditional_internal_fn): Declare.
20745 * internal-fn.c (cond_binary_direct): New macro.
20746 (expand_cond_binary_optab_fn): Likewise.
20747 (direct_cond_binary_optab_supported_p): Likewise.
20748 (get_conditional_internal_fn): New function.
20749 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
20750 Cope with reduction statements that are vectorized as calls rather
20752 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
20753 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
20754 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
20755 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
20756 (UNSPEC_COND_EOR): New unspecs.
20757 (optab): Add mappings for them.
20758 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
20759 (sve_int_op, sve_fp_op): New int attributes.
20761 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20762 Alan Hayward <alan.hayward@arm.com>
20763 David Sherwood <david.sherwood@arm.com>
20765 * optabs.def (while_ult_optab): New optab.
20766 * doc/md.texi (while_ult@var{m}@var{n}): Document.
20767 * internal-fn.def (WHILE_ULT): New internal function.
20768 * internal-fn.h (direct_internal_fn_supported_p): New override
20769 that takes two types as argument.
20770 * internal-fn.c (while_direct): New macro.
20771 (expand_while_optab_fn): New function.
20772 (convert_optab_supported_p): Likewise.
20773 (direct_while_optab_supported_p): New macro.
20774 * wide-int.h (wi::udiv_ceil): New function.
20775 * tree-vectorizer.h (rgroup_masks): New structure.
20776 (vec_loop_masks): New typedef.
20777 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
20778 and fully_masked_p.
20779 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
20780 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
20781 (vect_max_vf): New function.
20782 (slpeel_make_loop_iterate_ntimes): Delete.
20783 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
20784 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
20785 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
20786 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
20787 internal-fn.h, stor-layout.h and optabs-query.h.
20788 (vect_set_loop_mask): New function.
20789 (add_preheader_seq): Likewise.
20790 (add_header_seq): Likewise.
20791 (interleave_supported_p): Likewise.
20792 (vect_maybe_permute_loop_masks): Likewise.
20793 (vect_set_loop_masks_directly): Likewise.
20794 (vect_set_loop_condition_masked): Likewise.
20795 (vect_set_loop_condition_unmasked): New function, split out from
20796 slpeel_make_loop_iterate_ntimes.
20797 (slpeel_make_loop_iterate_ntimes): Rename to..
20798 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
20799 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
20800 (vect_do_peeling): Update call accordingly.
20801 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
20803 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
20804 mask_compare_type, can_fully_mask_p and fully_masked_p.
20805 (release_vec_loop_masks): New function.
20806 (_loop_vec_info): Use it to free the loop masks.
20807 (can_produce_all_loop_masks_p): New function.
20808 (vect_get_max_nscalars_per_iter): Likewise.
20809 (vect_verify_full_masking): Likewise.
20810 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
20811 retries, and free the mask rgroups before retrying. Check loop-wide
20812 reasons for disallowing fully-masked loops. Make the final decision
20813 about whether use a fully-masked loop or not.
20814 (vect_estimate_min_profitable_iters): Do not assume that peeling
20815 for the number of iterations will be needed for fully-masked loops.
20816 (vectorizable_reduction): Disable fully-masked loops.
20817 (vectorizable_live_operation): Likewise.
20818 (vect_halve_mask_nunits): New function.
20819 (vect_double_mask_nunits): Likewise.
20820 (vect_record_loop_mask): Likewise.
20821 (vect_get_loop_mask): Likewise.
20822 (vect_transform_loop): Handle the case in which the final loop
20823 iteration might handle a partial vector. Call vect_set_loop_condition
20824 instead of slpeel_make_loop_iterate_ntimes.
20825 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
20826 (check_load_store_masking): New function.
20827 (prepare_load_store_mask): Likewise.
20828 (vectorizable_store): Handle fully-masked loops.
20829 (vectorizable_load): Likewise.
20830 (supportable_widening_operation): Use vect_halve_mask_nunits for
20832 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
20833 (vect_gen_while): New function.
20834 * config/aarch64/aarch64.md (umax<mode>3): New expander.
20835 (aarch64_uqdec<mode>): New insn.
20837 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20838 Alan Hayward <alan.hayward@arm.com>
20839 David Sherwood <david.sherwood@arm.com>
20841 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
20842 (reduc_xor_scal_optab): New optabs.
20843 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
20844 (reduc_xor_scal_@var{m}): Document.
20845 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
20846 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
20847 internal functions.
20848 * fold-const-call.c (fold_const_call): Handle them.
20849 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
20850 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
20851 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
20852 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
20853 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
20854 (UNSPEC_XORV): New unspecs.
20855 (optab): Add entries for them.
20856 (BITWISEV): New int iterator.
20857 (bit_reduc_op): New int attributes.
20859 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20860 Alan Hayward <alan.hayward@arm.com>
20861 David Sherwood <david.sherwood@arm.com>
20863 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
20864 * internal-fn.def (VEC_SHL_INSERT): New internal function.
20865 * optabs.def (vec_shl_insert_optab): New optab.
20866 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
20867 (duplicate_and_interleave): Likewise.
20868 * tree-vect-loop.c: Include internal-fn.h.
20869 (neutral_op_for_slp_reduction): New function, split out from
20870 get_initial_defs_for_reduction.
20871 (get_initial_def_for_reduction): Handle option 2 for variable-length
20872 vectors by loading the neutral value into a vector and then shifting
20873 the initial value into element 0.
20874 (get_initial_defs_for_reduction): Replace the code argument with
20875 the neutral value calculated by neutral_op_for_slp_reduction.
20876 Use gimple_build_vector for constant-length vectors.
20877 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
20878 but the first group_size elements have a neutral value.
20879 Use duplicate_and_interleave otherwise.
20880 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
20881 Update call to get_initial_defs_for_reduction. Handle SLP
20882 reductions for variable-length vectors by creating one vector
20883 result for each scalar result, with the elements associated
20884 with other scalar results stubbed out with the neutral value.
20885 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
20886 Require IFN_VEC_SHL_INSERT for double reductions on
20887 variable-length vectors, or SLP reductions that have
20888 a neutral value. Require can_duplicate_and_interleave_p
20889 support for variable-length unchained SLP reductions if there
20890 is no neutral value, such as for MIN/MAX reductions. Also require
20891 the number of vector elements to be a multiple of the number of
20892 SLP statements when doing variable-length unchained SLP reductions.
20893 Update call to vect_create_epilog_for_reduction.
20894 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
20895 and remove initial values.
20896 (duplicate_and_interleave): Make public.
20897 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
20898 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
20900 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20901 Alan Hayward <alan.hayward@arm.com>
20902 David Sherwood <david.sherwood@arm.com>
20904 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
20905 (can_duplicate_and_interleave_p): New function.
20906 (vect_get_and_check_slp_defs): Take the vector of statements
20907 rather than just the current one. Remove excess parentheses.
20908 Restriction rejectinon of vect_constant_def and vect_external_def
20909 for variable-length vectors to boolean types, or types for which
20910 can_duplicate_and_interleave_p is false.
20911 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
20912 (duplicate_and_interleave): New function.
20913 (vect_get_constant_vectors): Use gimple_build_vector for
20914 constant-length vectors and suitable variable-length constant
20915 vectors. Use duplicate_and_interleave for other variable-length
20916 vectors. Don't defer the update when inserting new statements.
20918 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20919 Alan Hayward <alan.hayward@arm.com>
20920 David Sherwood <david.sherwood@arm.com>
20922 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
20923 min_profitable_iters doesn't go negative.
20925 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20926 Alan Hayward <alan.hayward@arm.com>
20927 David Sherwood <david.sherwood@arm.com>
20929 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
20930 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
20931 * optabs.def (vec_mask_load_lanes_optab): New optab.
20932 (vec_mask_store_lanes_optab): Likewise.
20933 * internal-fn.def (MASK_LOAD_LANES): New internal function.
20934 (MASK_STORE_LANES): Likewise.
20935 * internal-fn.c (mask_load_lanes_direct): New macro.
20936 (mask_store_lanes_direct): Likewise.
20937 (expand_mask_load_optab_fn): Handle masked operations.
20938 (expand_mask_load_lanes_optab_fn): New macro.
20939 (expand_mask_store_optab_fn): Handle masked operations.
20940 (expand_mask_store_lanes_optab_fn): New macro.
20941 (direct_mask_load_lanes_optab_supported_p): Likewise.
20942 (direct_mask_store_lanes_optab_supported_p): Likewise.
20943 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
20945 (vect_load_lanes_supported): Likewise.
20946 * tree-vect-data-refs.c (strip_conversion): New function.
20947 (can_group_stmts_p): Likewise.
20948 (vect_analyze_data_ref_accesses): Use it instead of checking
20949 for a pair of assignments.
20950 (vect_store_lanes_supported): Take a masked_p parameter.
20951 (vect_load_lanes_supported): Likewise.
20952 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
20953 vect_store_lanes_supported and vect_load_lanes_supported.
20954 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
20955 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
20956 parameter. Don't allow gaps for masked accesses.
20957 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
20958 and vect_load_lanes_supported.
20959 (get_load_store_type): Take a masked_p parameter and update
20960 call to get_group_load_store_type.
20961 (vectorizable_store): Update call to get_load_store_type.
20962 Handle IFN_MASK_STORE_LANES.
20963 (vectorizable_load): Update call to get_load_store_type.
20964 Handle IFN_MASK_LOAD_LANES.
20966 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20967 Alan Hayward <alan.hayward@arm.com>
20968 David Sherwood <david.sherwood@arm.com>
20970 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
20972 * config/aarch64/aarch64-protos.h
20973 (aarch64_sve_struct_memory_operand_p): Declare.
20974 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
20975 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
20976 (VPRED, vpred): Handle SVE structure modes.
20977 * config/aarch64/constraints.md (Utx): New constraint.
20978 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
20979 (aarch64_sve_struct_nonimmediate_operand): New predicates.
20980 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
20981 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
20982 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
20983 structure modes. Split into pieces after RA.
20984 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
20985 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
20987 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
20988 SVE structure modes.
20989 (aarch64_classify_address): Likewise.
20990 (sizetochar): Move earlier in file.
20991 (aarch64_print_operand): Handle SVE register lists.
20992 (aarch64_array_mode): New function.
20993 (aarch64_sve_struct_memory_operand_p): Likewise.
20994 (TARGET_ARRAY_MODE): Redefine.
20996 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20997 Alan Hayward <alan.hayward@arm.com>
20998 David Sherwood <david.sherwood@arm.com>
21000 * target.def (array_mode): New target hook.
21001 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
21002 * doc/tm.texi: Regenerate.
21003 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
21004 * hooks.c (hook_optmode_mode_uhwi_none): New function.
21005 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
21006 targetm.array_mode.
21007 * stor-layout.c (mode_for_array): Likewise. Support polynomial
21010 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21011 Alan Hayward <alan.hayward@arm.com>
21012 David Sherwood <david.sherwood@arm.com>
21014 * fold-const.c (fold_binary_loc): Check the argument types
21015 rather than the result type when testing for a vector operation.
21017 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21019 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
21020 * doc/tm.texi: Regenerate.
21022 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21023 Alan Hayward <alan.hayward@arm.com>
21024 David Sherwood <david.sherwood@arm.com>
21026 * doc/invoke.texi (-msve-vector-bits=): Document new option.
21027 (sve): Document new AArch64 extension.
21028 * doc/md.texi (w): Extend the description of the AArch64
21029 constraint to include SVE vectors.
21030 (Upl, Upa): Document new AArch64 predicate constraints.
21031 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
21033 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
21034 (msve-vector-bits=): New option.
21035 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
21036 SVE when these are disabled.
21037 (sve): New extension.
21038 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
21039 modes. Adjust their number of units based on aarch64_sve_vg.
21040 (MAX_BITSIZE_MODE_ANY_MODE): Define.
21041 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
21042 aarch64_addr_query_type.
21043 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
21044 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
21045 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
21046 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
21047 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
21048 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
21049 (aarch64_simd_imm_zero_p): Delete.
21050 (aarch64_check_zero_based_sve_index_immediate): Declare.
21051 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
21052 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
21053 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
21054 (aarch64_sve_float_mul_immediate_p): Likewise.
21055 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
21056 rather than an rtx.
21057 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
21058 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
21059 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
21060 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
21061 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
21062 (aarch64_regmode_natural_size): Likewise.
21063 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
21064 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
21066 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
21067 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
21068 for VG and the SVE predicate registers.
21069 (V_ALIASES): Add a "z"-prefixed alias.
21070 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
21071 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
21072 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
21073 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
21074 (REG_CLASS_NAMES): Add entries for them.
21075 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
21076 and the predicate registers.
21077 (aarch64_sve_vg): Declare.
21078 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
21079 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
21080 (REGMODE_NATURAL_SIZE): Define.
21081 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
21083 * config/aarch64/aarch64.c: Include cfgrtl.h.
21084 (simd_immediate_info): Add a constructor for series vectors,
21085 and an associated step field.
21086 (aarch64_sve_vg): New variable.
21087 (aarch64_dbx_register_number): Handle VG and the predicate registers.
21088 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
21089 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
21090 (VEC_ANY_DATA, VEC_STRUCT): New constants.
21091 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
21092 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
21093 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
21094 (aarch64_get_mask_mode): New functions.
21095 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
21096 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
21097 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
21098 predicate modes and predicate registers. Explicitly restrict
21099 GPRs to modes of 16 bytes or smaller. Only allow FP registers
21100 to store a vector mode if it is recognized by
21101 aarch64_classify_vector_mode.
21102 (aarch64_regmode_natural_size): New function.
21103 (aarch64_hard_regno_caller_save_mode): Return the original mode
21105 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
21106 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
21107 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
21108 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
21110 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
21111 does not overlap dest if the function is frame-related. Handle
21113 (aarch64_split_add_offset): New function.
21114 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
21115 them aarch64_add_offset.
21116 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
21117 and update call to aarch64_sub_sp.
21118 (aarch64_add_cfa_expression): New function.
21119 (aarch64_expand_prologue): Pass extra temporary registers to the
21120 functions above. Handle the case in which we need to emit new
21121 DW_CFA_expressions for registers that were originally saved
21122 relative to the stack pointer, but now have to be expressed
21123 relative to the frame pointer.
21124 (aarch64_output_mi_thunk): Pass extra temporary registers to the
21126 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
21127 IP0 and IP1 values for SVE frames.
21128 (aarch64_expand_vec_series): New function.
21129 (aarch64_expand_sve_widened_duplicate): Likewise.
21130 (aarch64_expand_sve_const_vector): Likewise.
21131 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
21132 Handle SVE constants. Use emit_move_insn to move a force_const_mem
21133 into the register, rather than emitting a SET directly.
21134 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
21135 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
21136 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
21137 (offset_9bit_signed_scaled_p): New functions.
21138 (aarch64_replicate_bitmask_imm): New function.
21139 (aarch64_bitmask_imm): Use it.
21140 (aarch64_cannot_force_const_mem): Reject expressions involving
21141 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
21142 (aarch64_classify_index): Handle SVE indices, by requiring
21143 a plain register index with a scale that matches the element size.
21144 (aarch64_classify_address): Handle SVE addresses. Assert that
21145 the mode of the address is VOIDmode or an integer mode.
21146 Update call to aarch64_classify_symbol.
21147 (aarch64_classify_symbolic_expression): Update call to
21148 aarch64_classify_symbol.
21149 (aarch64_const_vec_all_in_range_p): New function.
21150 (aarch64_print_vector_float_operand): Likewise.
21151 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
21152 "vN" for FP registers with SVE modes. Handle (const ...) vectors
21153 and the FP immediates 1.0 and 0.5.
21154 (aarch64_print_address_internal): Handle SVE addresses.
21155 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
21156 (aarch64_regno_regclass): Handle predicate registers.
21157 (aarch64_secondary_reload): Handle big-endian reloads of SVE
21159 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
21160 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
21161 (aarch64_convert_sve_vector_bits): New function.
21162 (aarch64_override_options): Use it to handle -msve-vector-bits=.
21163 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
21164 rather than an rtx.
21165 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
21166 Handle SVE vector and predicate modes. Accept VL-based constants
21167 that need only one temporary register, and VL offsets that require
21168 no temporary registers.
21169 (aarch64_conditional_register_usage): Mark the predicate registers
21170 as fixed if SVE isn't available.
21171 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
21172 Return true for SVE vector and predicate modes.
21173 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
21174 rather than an unsigned int. Handle SVE modes.
21175 (aarch64_preferred_simd_mode): Update call accordingly. Handle
21177 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
21179 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
21180 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
21181 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
21182 (aarch64_sve_float_mul_immediate_p): New functions.
21183 (aarch64_sve_valid_immediate): New function.
21184 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
21185 Explicitly reject structure modes. Check for INDEX constants.
21186 Handle PTRUE and PFALSE constants.
21187 (aarch64_check_zero_based_sve_index_immediate): New function.
21188 (aarch64_simd_imm_zero_p): Delete.
21189 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
21190 vector modes. Accept constants in the range of CNT[BHWD].
21191 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
21192 ask for an Advanced SIMD mode.
21193 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
21194 (aarch64_simd_vector_alignment): Handle SVE predicates.
21195 (aarch64_vectorize_preferred_vector_alignment): New function.
21196 (aarch64_simd_vector_alignment_reachable): Use it instead of
21198 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
21199 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
21201 (MAX_VECT_LEN): Delete.
21202 (expand_vec_perm_d): Add a vec_flags field.
21203 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
21204 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
21205 (aarch64_evpc_ext): Don't apply a big-endian lane correction
21207 (aarch64_evpc_rev): Rename to...
21208 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
21209 (aarch64_evpc_rev_global): New function.
21210 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
21211 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
21213 (aarch64_evpc_sve_tbl): New function.
21214 (aarch64_expand_vec_perm_const_1): Update after rename of
21215 aarch64_evpc_rev. Handle SVE permutes too, trying
21216 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
21217 than aarch64_evpc_tbl.
21218 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
21219 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
21220 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
21221 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
21222 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
21223 (aarch64_expand_sve_vcond): New functions.
21224 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
21225 of aarch64_vector_mode_p.
21226 (aarch64_dwarf_poly_indeterminate_value): New function.
21227 (aarch64_compute_pressure_classes): Likewise.
21228 (aarch64_can_change_mode_class): Likewise.
21229 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
21230 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
21231 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
21232 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
21233 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
21234 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
21235 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
21236 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
21238 (Dn, Dl, Dr): Accept const as well as const_vector.
21239 (Dz): Likewise. Compare against CONST0_RTX.
21240 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
21241 of "vector" where appropriate.
21242 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
21243 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
21244 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
21245 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
21246 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
21247 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
21248 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
21249 (v_int_equiv): Extend to SVE modes.
21250 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
21252 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
21253 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
21254 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
21255 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
21256 (SVE_COND_FP_CMP): New int iterators.
21257 (perm_hilo): Handle the new unpack unspecs.
21258 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
21260 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
21261 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
21262 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
21263 (aarch64_equality_operator, aarch64_constant_vector_operand)
21264 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
21265 (aarch64_sve_nonimmediate_operand): Likewise.
21266 (aarch64_sve_general_operand): Likewise.
21267 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
21268 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
21269 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
21270 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
21271 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
21272 (aarch64_sve_float_arith_immediate): Likewise.
21273 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
21274 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
21275 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
21276 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
21277 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
21278 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
21279 (aarch64_sve_float_arith_operand): Likewise.
21280 (aarch64_sve_float_arith_with_sub_operand): Likewise.
21281 (aarch64_sve_float_mul_operand): Likewise.
21282 (aarch64_sve_vec_perm_operand): Likewise.
21283 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
21284 (aarch64_mov_operand): Accept const_poly_int and const_vector.
21285 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
21286 as well as const_vector.
21287 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
21288 in file. Use CONST0_RTX and CONSTM1_RTX.
21289 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
21290 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
21291 Use aarch64_simd_imm_zero.
21292 * config/aarch64/aarch64-sve.md: New file.
21293 * config/aarch64/aarch64.md: Include it.
21294 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
21295 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
21296 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
21297 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
21298 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
21299 (sve): New attribute.
21300 (enabled): Disable instructions with the sve attribute unless
21302 (movqi, movhi): Pass CONST_POLY_INT operaneds through
21303 aarch64_expand_mov_immediate.
21304 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
21305 CNT[BHSD] immediates.
21306 (movti): Split CONST_POLY_INT moves into two halves.
21307 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
21308 Split additions that need a temporary here if the destination
21309 is the stack pointer.
21310 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
21311 (*add<mode>3_poly_1): New instruction.
21312 (set_clobber_cc): New expander.
21314 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21316 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
21317 parameter and use it instead of GET_MODE_SIZE (innermode). Use
21318 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
21319 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
21320 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
21321 Change innermode from fixed_mode_size to machine_mode.
21322 (simplify_subreg): Update call accordingly. Handle a constant-sized
21323 subreg of a variable-length CONST_VECTOR.
21325 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21326 Alan Hayward <alan.hayward@arm.com>
21327 David Sherwood <david.sherwood@arm.com>
21329 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
21330 (add_offset_to_base): New function, split out from...
21331 (create_mem_ref): ...here. When handling a scale other than 1,
21332 check first whether the address is valid without the offset.
21333 Add it into the base if so, leaving the index and scale as-is.
21335 2018-01-12 Jakub Jelinek <jakub@redhat.com>
21338 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
21339 fold_for_warn before checking if arg2 is INTEGER_CST.
21341 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
21343 * config/rs6000/predicates.md (load_multiple_operation): Delete.
21344 (store_multiple_operation): Delete.
21345 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
21346 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
21347 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
21348 guarded by TARGET_STRING.
21349 (rs6000_output_load_multiple): Delete.
21350 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
21351 OPTION_MASK_STRING / TARGET_STRING handling.
21352 (print_operand) <'N', 'O'>: Add comment that these are unused now.
21353 (const rs6000_opt_masks) <"string">: Change mask to 0.
21354 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
21355 (MASK_STRING): Delete.
21356 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
21358 (load_multiple): Delete.
21365 (store_multiple): Delete.
21372 (movmemsi_8reg): Delete.
21373 (corresponding unnamed define_insn): Delete.
21374 (movmemsi_6reg): Delete.
21375 (corresponding unnamed define_insn): Delete.
21376 (movmemsi_4reg): Delete.
21377 (corresponding unnamed define_insn): Delete.
21378 (movmemsi_2reg): Delete.
21379 (corresponding unnamed define_insn): Delete.
21380 (movmemsi_1reg): Delete.
21381 (corresponding unnamed define_insn): Delete.
21382 * config/rs6000/rs6000.opt (mno-string): New.
21383 (mstring): Replace by deprecation warning stub.
21384 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
21386 2018-01-12 Jakub Jelinek <jakub@redhat.com>
21388 * regrename.c (regrename_do_replace): If replacing the same
21389 reg multiple times, try to reuse last created gen_raw_REG.
21392 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
21393 main to workaround a bug in GDB.
21395 2018-01-12 Tom de Vries <tom@codesourcery.com>
21398 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
21400 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
21402 PR rtl-optimization/80481
21403 * ira-color.c (get_cap_member): New function.
21404 (allocnos_conflict_by_live_ranges_p): Use it.
21405 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
21406 (setup_slot_coalesced_allocno_live_ranges): Ditto.
21408 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
21411 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
21412 (*saddl_se_1): Ditto.
21413 (*ssubsi_1): Ditto.
21414 (*ssubl_se_1): Ditto.
21416 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
21418 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
21419 rather than wi::to_widest for DR_INITs.
21420 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
21421 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
21422 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
21424 (vect_analyze_group_access_1): Note that here.
21426 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
21428 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
21429 polynomial type sizes.
21431 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
21433 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
21434 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
21435 (gimple_add_tmp_var): Likewise.
21437 2018-01-12 Martin Liska <mliska@suse.cz>
21439 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
21440 (gimple_alloc_sizes): Likewise.
21441 (dump_gimple_statistics): Use PRIu64 in printf format.
21442 * gimple.h: Change uint64_t to int.
21444 2018-01-12 Martin Liska <mliska@suse.cz>
21446 * tree-core.h: Use uint64_t instead of int.
21447 * tree.c (tree_node_counts): Likewise.
21448 (tree_node_sizes): Likewise.
21449 (dump_tree_statistics): Use PRIu64 in printf format.
21451 2018-01-12 Martin Liska <mliska@suse.cz>
21453 * Makefile.in: As qsort_chk is implemented in vec.c, add
21454 vec.o to linkage of gencfn-macros.
21455 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
21456 passing the info to record_node_allocation_statistics.
21457 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
21459 * ggc-common.c (struct ggc_usage): Add operator== and use
21460 it in operator< and compare function.
21461 * mem-stats.h (struct mem_usage): Likewise.
21462 * vec.c (struct vec_usage): Remove operator< and compare
21463 function. Can be simply inherited.
21465 2018-01-12 Martin Jambor <mjambor@suse.cz>
21468 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
21469 * tree-ssa-math-opts.c: Include domwalk.h.
21470 (convert_mult_to_fma_1): New function.
21471 (fma_transformation_info): New type.
21472 (fma_deferring_state): Likewise.
21473 (cancel_fma_deferring): New function.
21474 (result_of_phi): Likewise.
21475 (last_fma_candidate_feeds_initial_phi): Likewise.
21476 (convert_mult_to_fma): Added deferring logic, split actual
21477 transformation to convert_mult_to_fma_1.
21478 (math_opts_dom_walker): New type.
21479 (math_opts_dom_walker::after_dom_children): New method, body moved
21480 here from pass_optimize_widening_mul::execute, added deferring logic
21482 (pass_optimize_widening_mul::execute): Moved most of code to
21483 math_opts_dom_walker::after_dom_children.
21484 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
21485 * config/i386/i386.c (ix86_option_override_internal): Added
21486 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
21488 2018-01-12 Richard Biener <rguenther@suse.de>
21491 * dwarf2out.c (gen_variable_die): Do not reset old_die for
21492 inline instance vars.
21494 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
21497 * config/rx/rx.c (rx_is_restricted_memory_address):
21498 Handle SUBREG case.
21500 2018-01-12 Richard Biener <rguenther@suse.de>
21502 PR tree-optimization/80846
21503 * target.def (split_reduction): New target hook.
21504 * targhooks.c (default_split_reduction): New function.
21505 * targhooks.h (default_split_reduction): Declare.
21506 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
21507 target requests first reduce vectors by combining low and high
21509 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
21510 (get_vectype_for_scalar_type_and_size): Export.
21511 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
21512 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
21513 * doc/tm.texi: Regenerate.
21514 * config/i386/i386.c (ix86_split_reduction): Implement
21515 TARGET_VECTORIZE_SPLIT_REDUCTION.
21517 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
21520 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
21521 in PIC mode except for TARGET_VXWORKS_RTP.
21522 * config/sparc/sparc.c: Include cfgrtl.h.
21523 (TARGET_INIT_PIC_REG): Define.
21524 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
21525 (sparc_pic_register_p): New predicate.
21526 (sparc_legitimate_address_p): Use it.
21527 (sparc_legitimize_pic_address): Likewise.
21528 (sparc_delegitimize_address): Likewise.
21529 (sparc_mode_dependent_address_p): Likewise.
21530 (gen_load_pcrel_sym): Remove 4th parameter.
21531 (load_got_register): Adjust call to above. Remove obsolete stuff.
21532 (sparc_expand_prologue): Do not call load_got_register here.
21533 (sparc_flat_expand_prologue): Likewise.
21534 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
21535 (sparc_use_pseudo_pic_reg): New function.
21536 (sparc_init_pic_reg): Likewise.
21537 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
21538 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
21540 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
21542 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
21543 Add item for branch_cost.
21545 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
21547 PR rtl-optimization/83565
21548 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
21549 not extend the result to a larger mode for rotate operations.
21550 (num_sign_bit_copies1): Likewise.
21552 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
21555 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
21557 Use values-Xc.o for -pedantic.
21558 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
21560 2018-01-12 Martin Liska <mliska@suse.cz>
21563 * ipa-devirt.c (final_warning_record::grow_type_warnings):
21565 (possible_polymorphic_call_targets): Use it.
21566 (ipa_devirt): Likewise.
21568 2018-01-12 Martin Liska <mliska@suse.cz>
21570 * profile-count.h (enum profile_quality): Use 0 as invalid
21571 enum value of profile_quality.
21573 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
21575 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
21576 -mext-string options.
21578 2018-01-12 Richard Biener <rguenther@suse.de>
21580 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
21581 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
21582 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
21584 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
21586 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
21588 * configure.ac (--with-long-double-format): Add support for the
21589 configuration option to change the default long double format on
21591 * config.gcc (powerpc*-linux*-*): Likewise.
21592 * configure: Regenerate.
21593 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
21594 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
21595 used without modification.
21597 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21599 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
21600 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
21601 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
21602 MISC_BUILTIN_SPEC_BARRIER.
21603 (rs6000_init_builtins): Likewise.
21604 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
21606 (speculation_barrier): New define_insn.
21607 * doc/extend.texi: Document __builtin_speculation_barrier.
21609 2018-01-11 Jakub Jelinek <jakub@redhat.com>
21612 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
21613 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
21614 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
21616 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
21617 integral modes instead of "ss" and "sd".
21618 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
21619 vectors with 32-bit and 64-bit elements.
21620 (vecdupssescalarmodesuffix): New mode attribute.
21621 (vec_dup<mode>): Use it.
21623 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
21626 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
21627 frame if argument is passed on stack.
21629 2018-01-11 Jakub Jelinek <jakub@redhat.com>
21632 * ree.c (combine_reaching_defs): Optimize also
21633 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
21634 reg2=any_extend(exp); reg1=reg2;, formatting fix.
21636 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
21638 PR middle-end/83189
21639 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
21641 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
21643 PR middle-end/83718
21644 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
21645 after they are computed.
21647 2018-01-11 Bin Cheng <bin.cheng@arm.com>
21649 PR tree-optimization/83695
21650 * gimple-loop-linterchange.cc
21651 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
21652 reset cached scev information after interchange.
21653 (pass_linterchange::execute): Remove call to scev_reset_htab.
21655 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21657 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
21658 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
21659 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
21660 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
21661 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
21662 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
21663 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
21664 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
21665 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
21666 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
21667 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
21668 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
21669 (V_lane_reg): Likewise.
21670 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
21672 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
21673 (vfmal_lane_low<mode>_intrinsic,
21674 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
21675 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
21676 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
21677 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
21678 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
21679 vfmsl_lane_high<mode>_intrinsic): New define_insns.
21681 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21683 * config/arm/arm-cpus.in (fp16fml): New feature.
21684 (ALL_SIMD): Add fp16fml.
21685 (armv8.2-a): Add fp16fml as an option.
21686 (armv8.3-a): Likewise.
21687 (armv8.4-a): Add fp16fml as part of fp16.
21688 * config/arm/arm.h (TARGET_FP16FML): Define.
21689 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
21691 * config/arm/arm-modes.def (V2HF): Define.
21692 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
21693 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
21694 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
21695 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
21696 vfmsl_low, vfmsl_high): New set of builtins.
21697 * config/arm/iterators.md (PLUSMINUS): New code iterator.
21698 (vfml_op): New code attribute.
21699 (VFMLHALVES): New int iterator.
21700 (VFML, VFMLSEL): New mode attributes.
21701 (V_reg): Define mapping for V2HF.
21702 (V_hi, V_lo): New mode attributes.
21703 (VF_constraint): Likewise.
21704 (vfml_half, vfml_half_selector): New int attributes.
21705 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
21707 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
21708 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
21710 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
21711 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
21712 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
21713 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
21715 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
21716 Document new effective target and option set.
21718 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21720 * config/arm/arm-cpus.in (armv8_4): New feature.
21721 (ARMv8_4a): New fgroup.
21722 (armv8.4-a): New arch.
21723 * config/arm/arm-tables.opt: Regenerate.
21724 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
21725 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
21726 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
21727 Add matching rules for -march=armv8.4-a and extensions.
21728 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
21730 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
21733 * config/rx/rx.md (BW): New mode attribute.
21734 (sync_lock_test_and_setsi): Add mode suffix to insn output.
21736 2018-01-11 Richard Biener <rguenther@suse.de>
21738 PR tree-optimization/83435
21739 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
21740 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
21741 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
21743 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21744 Alan Hayward <alan.hayward@arm.com>
21745 David Sherwood <david.sherwood@arm.com>
21747 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
21749 (aarch64_classify_address): Initialize it. Track polynomial offsets.
21750 (aarch64_print_address_internal): Use it to check for a zero offset.
21752 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21753 Alan Hayward <alan.hayward@arm.com>
21754 David Sherwood <david.sherwood@arm.com>
21756 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
21757 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
21758 Return a poly_int64 rather than a HOST_WIDE_INT.
21759 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
21760 rather than a HOST_WIDE_INT.
21761 * config/aarch64/aarch64.h (aarch64_frame): Protect with
21762 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
21763 hard_fp_offset, frame_size, initial_adjust, callee_offset and
21764 final_offset from HOST_WIDE_INT to poly_int64.
21765 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
21766 to_constant when getting the number of units in an Advanced SIMD
21768 (aarch64_builtin_vectorized_function): Check for a constant number
21770 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
21772 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
21773 attribute instead of GET_MODE_NUNITS.
21774 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
21775 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
21776 GET_MODE_SIZE for fixed-size registers.
21777 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
21778 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
21779 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
21780 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
21781 (aarch64_print_operand, aarch64_print_address_internal)
21782 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
21783 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
21784 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
21785 Handle polynomial GET_MODE_SIZE.
21786 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
21787 wider than SImode without modification.
21788 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
21789 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
21790 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
21791 passing and returning SVE modes.
21792 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
21793 rather than GEN_INT.
21794 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
21795 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
21796 (aarch64_allocate_and_probe_stack_space): Likewise.
21797 (aarch64_layout_frame): Cope with polynomial offsets.
21798 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
21799 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
21800 polynomial offsets.
21801 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
21802 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
21803 poly_int64 rather than a HOST_WIDE_INT.
21804 (aarch64_get_separate_components, aarch64_process_components)
21805 (aarch64_expand_prologue, aarch64_expand_epilogue)
21806 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
21807 (aarch64_anchor_offset): New function, split out from...
21808 (aarch64_legitimize_address): ...here.
21809 (aarch64_builtin_vectorization_cost): Handle polynomial
21810 TYPE_VECTOR_SUBPARTS.
21811 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
21813 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
21814 number of elements from the PARALLEL rather than the mode.
21815 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
21816 rather than GET_MODE_BITSIZE.
21817 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
21818 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
21819 (aarch64_expand_vec_perm_const_1): Handle polynomial
21820 d->perm.length () and d->perm elements.
21821 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
21822 Apply to_constant to d->perm elements.
21823 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
21824 polynomial CONST_VECTOR_NUNITS.
21825 (aarch64_move_pointer): Take amount as a poly_int64 rather
21827 (aarch64_progress_pointer): Avoid temporary variable.
21828 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
21829 the mode attribute instead of GET_MODE.
21831 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21832 Alan Hayward <alan.hayward@arm.com>
21833 David Sherwood <david.sherwood@arm.com>
21835 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
21836 x exists before using it.
21837 (aarch64_add_constant_internal): Rename to...
21838 (aarch64_add_offset_1): ...this. Replace regnum with separate
21839 src and dest rtxes. Handle the case in which they're different,
21840 including when the offset is zero. Replace scratchreg with an rtx.
21841 Use 2 additions if there is no spare register into which we can
21842 move a 16-bit constant.
21843 (aarch64_add_constant): Delete.
21844 (aarch64_add_offset): Replace reg with separate src and dest
21845 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
21846 Use aarch64_add_offset_1.
21847 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
21848 an rtx rather than an int. Take the delta as a poly_int64
21849 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
21850 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
21851 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
21852 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
21853 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
21854 and aarch64_add_sp.
21855 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
21856 aarch64_add_constant.
21858 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21860 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
21861 Use scalar_float_mode.
21863 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21865 * config/aarch64/aarch64-simd.md
21866 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
21867 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
21868 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
21869 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
21870 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
21871 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
21872 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
21873 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
21874 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
21875 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
21877 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21880 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
21881 targ_options->x_arm_arch_string is non NULL.
21883 2018-01-11 Tamar Christina <tamar.christina@arm.com>
21885 * config/aarch64/aarch64.h
21886 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
21888 2018-01-11 Sudakshina Das <sudi.das@arm.com>
21891 * expmed.c (emit_store_flag_force): Swap if const op0
21892 and change VOIDmode to mode of op0.
21894 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21896 PR rtl-optimization/83761
21897 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
21898 than bytes to mode_for_size.
21900 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
21902 PR middle-end/83189
21903 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
21904 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
21907 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
21909 PR middle-end/83575
21910 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
21911 when in layout mode.
21912 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
21913 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
21916 2018-01-10 Michael Collison <michael.collison@arm.com>
21918 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
21919 * config/aarch64/aarch64-option-extension.def: Add
21920 AARCH64_OPT_EXTENSION of 'fp16fml'.
21921 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21922 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
21923 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
21924 * config/aarch64/constraints.md (Ui7): New constraint.
21925 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
21926 (VFMLA_SEL_W): Ditto.
21929 (VFMLA16_LOW): New int iterator.
21930 (VFMLA16_HIGH): Ditto.
21931 (UNSPEC_FMLAL): New unspec.
21932 (UNSPEC_FMLSL): Ditto.
21933 (UNSPEC_FMLAL2): Ditto.
21934 (UNSPEC_FMLSL2): Ditto.
21935 (f16mac): New code attribute.
21936 * config/aarch64/aarch64-simd-builtins.def
21937 (aarch64_fmlal_lowv2sf): Ditto.
21938 (aarch64_fmlsl_lowv2sf): Ditto.
21939 (aarch64_fmlalq_lowv4sf): Ditto.
21940 (aarch64_fmlslq_lowv4sf): Ditto.
21941 (aarch64_fmlal_highv2sf): Ditto.
21942 (aarch64_fmlsl_highv2sf): Ditto.
21943 (aarch64_fmlalq_highv4sf): Ditto.
21944 (aarch64_fmlslq_highv4sf): Ditto.
21945 (aarch64_fmlal_lane_lowv2sf): Ditto.
21946 (aarch64_fmlsl_lane_lowv2sf): Ditto.
21947 (aarch64_fmlal_laneq_lowv2sf): Ditto.
21948 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
21949 (aarch64_fmlalq_lane_lowv4sf): Ditto.
21950 (aarch64_fmlsl_lane_lowv4sf): Ditto.
21951 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
21952 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
21953 (aarch64_fmlal_lane_highv2sf): Ditto.
21954 (aarch64_fmlsl_lane_highv2sf): Ditto.
21955 (aarch64_fmlal_laneq_highv2sf): Ditto.
21956 (aarch64_fmlsl_laneq_highv2sf): Ditto.
21957 (aarch64_fmlalq_lane_highv4sf): Ditto.
21958 (aarch64_fmlsl_lane_highv4sf): Ditto.
21959 (aarch64_fmlalq_laneq_highv4sf): Ditto.
21960 (aarch64_fmlsl_laneq_highv4sf): Ditto.
21961 * config/aarch64/aarch64-simd.md:
21962 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
21963 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
21964 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
21965 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
21966 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
21967 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
21968 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
21969 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
21970 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
21971 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
21972 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
21973 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
21974 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
21975 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
21976 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
21977 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
21978 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
21979 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
21980 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
21981 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
21982 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
21983 (vfmlsl_low_u32): Ditto.
21984 (vfmlalq_low_u32): Ditto.
21985 (vfmlslq_low_u32): Ditto.
21986 (vfmlal_high_u32): Ditto.
21987 (vfmlsl_high_u32): Ditto.
21988 (vfmlalq_high_u32): Ditto.
21989 (vfmlslq_high_u32): Ditto.
21990 (vfmlal_lane_low_u32): Ditto.
21991 (vfmlsl_lane_low_u32): Ditto.
21992 (vfmlal_laneq_low_u32): Ditto.
21993 (vfmlsl_laneq_low_u32): Ditto.
21994 (vfmlalq_lane_low_u32): Ditto.
21995 (vfmlslq_lane_low_u32): Ditto.
21996 (vfmlalq_laneq_low_u32): Ditto.
21997 (vfmlslq_laneq_low_u32): Ditto.
21998 (vfmlal_lane_high_u32): Ditto.
21999 (vfmlsl_lane_high_u32): Ditto.
22000 (vfmlal_laneq_high_u32): Ditto.
22001 (vfmlsl_laneq_high_u32): Ditto.
22002 (vfmlalq_lane_high_u32): Ditto.
22003 (vfmlslq_lane_high_u32): Ditto.
22004 (vfmlalq_laneq_high_u32): Ditto.
22005 (vfmlslq_laneq_high_u32): Ditto.
22006 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
22007 (AARCH64_FL_FOR_ARCH8_4): New.
22008 (AARCH64_ISA_F16FML): New ISA flag.
22009 (TARGET_F16FML): New feature flag for fp16fml.
22010 (doc/invoke.texi): Document new fp16fml option.
22012 2018-01-10 Michael Collison <michael.collison@arm.com>
22014 * config/aarch64/aarch64-builtins.c:
22015 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
22016 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22017 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
22018 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
22019 (AARCH64_ISA_SHA3): New ISA flag.
22020 (TARGET_SHA3): New feature flag for sha3.
22021 * config/aarch64/iterators.md (sha512_op): New int attribute.
22022 (CRYPTO_SHA512): New int iterator.
22023 (UNSPEC_SHA512H): New unspec.
22024 (UNSPEC_SHA512H2): Ditto.
22025 (UNSPEC_SHA512SU0): Ditto.
22026 (UNSPEC_SHA512SU1): Ditto.
22027 * config/aarch64/aarch64-simd-builtins.def
22028 (aarch64_crypto_sha512hqv2di): New builtin.
22029 (aarch64_crypto_sha512h2qv2di): Ditto.
22030 (aarch64_crypto_sha512su0qv2di): Ditto.
22031 (aarch64_crypto_sha512su1qv2di): Ditto.
22032 (aarch64_eor3qv8hi): Ditto.
22033 (aarch64_rax1qv2di): Ditto.
22034 (aarch64_xarqv2di): Ditto.
22035 (aarch64_bcaxqv8hi): Ditto.
22036 * config/aarch64/aarch64-simd.md:
22037 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
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/arm_neon.h (vsha512hq_u64): New intrinsic.
22045 (vsha512h2q_u64): Ditto.
22046 (vsha512su0q_u64): Ditto.
22047 (vsha512su1q_u64): Ditto.
22048 (veor3q_u16): Ditto.
22049 (vrax1q_u64): Ditto.
22050 (vxarq_u64): Ditto.
22051 (vbcaxq_u16): Ditto.
22052 * config/arm/types.md (crypto_sha512): New type attribute.
22053 (crypto_sha3): Ditto.
22054 (doc/invoke.texi): Document new sha3 option.
22056 2018-01-10 Michael Collison <michael.collison@arm.com>
22058 * config/aarch64/aarch64-builtins.c:
22059 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
22060 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22061 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
22062 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
22063 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
22064 (AARCH64_ISA_SM4): New ISA flag.
22065 (TARGET_SM4): New feature flag for sm4.
22066 * config/aarch64/aarch64-simd-builtins.def
22067 (aarch64_sm3ss1qv4si): Ditto.
22068 (aarch64_sm3tt1aq4si): Ditto.
22069 (aarch64_sm3tt1bq4si): Ditto.
22070 (aarch64_sm3tt2aq4si): Ditto.
22071 (aarch64_sm3tt2bq4si): Ditto.
22072 (aarch64_sm3partw1qv4si): Ditto.
22073 (aarch64_sm3partw2qv4si): Ditto.
22074 (aarch64_sm4eqv4si): Ditto.
22075 (aarch64_sm4ekeyqv4si): Ditto.
22076 * config/aarch64/aarch64-simd.md:
22077 (aarch64_sm3ss1qv4si): Ditto.
22078 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
22079 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
22080 (aarch64_sm4eqv4si): Ditto.
22081 (aarch64_sm4ekeyqv4si): Ditto.
22082 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
22083 (sm3part_op): Ditto.
22084 (CRYPTO_SM3TT): Ditto.
22085 (CRYPTO_SM3PART): Ditto.
22086 (UNSPEC_SM3SS1): New unspec.
22087 (UNSPEC_SM3TT1A): Ditto.
22088 (UNSPEC_SM3TT1B): Ditto.
22089 (UNSPEC_SM3TT2A): Ditto.
22090 (UNSPEC_SM3TT2B): Ditto.
22091 (UNSPEC_SM3PARTW1): Ditto.
22092 (UNSPEC_SM3PARTW2): Ditto.
22093 (UNSPEC_SM4E): Ditto.
22094 (UNSPEC_SM4EKEY): Ditto.
22095 * config/aarch64/constraints.md (Ui2): New constraint.
22096 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
22097 * config/arm/types.md (crypto_sm3): New type attribute.
22098 (crypto_sm4): Ditto.
22099 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
22100 (vsm3tt1aq_u32): Ditto.
22101 (vsm3tt1bq_u32): Ditto.
22102 (vsm3tt2aq_u32): Ditto.
22103 (vsm3tt2bq_u32): Ditto.
22104 (vsm3partw1q_u32): Ditto.
22105 (vsm3partw2q_u32): Ditto.
22106 (vsm4eq_u32): Ditto.
22107 (vsm4ekeyq_u32): Ditto.
22108 (doc/invoke.texi): Document new sm4 option.
22110 2018-01-10 Michael Collison <michael.collison@arm.com>
22112 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
22113 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
22114 (AARCH64_FL_FOR_ARCH8_4): New.
22115 (AARCH64_FL_V8_4): New flag.
22116 (doc/invoke.texi): Document new armv8.4-a option.
22118 2018-01-10 Michael Collison <michael.collison@arm.com>
22120 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22121 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
22122 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
22123 * config/aarch64/aarch64-option-extension.def: Add
22124 AARCH64_OPT_EXTENSION of 'sha2'.
22125 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
22126 (crypto): Disable sha2 and aes if crypto disabled.
22127 (crypto): Enable aes and sha2 if enabled.
22128 (simd): Disable sha2 and aes if simd disabled.
22129 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
22131 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
22132 (TARGET_SHA2): New feature flag for sha2.
22133 (TARGET_AES): New feature flag for aes.
22134 * config/aarch64/aarch64-simd.md:
22135 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
22136 conditional on TARGET_AES.
22137 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
22138 (aarch64_crypto_sha1hsi): Make pattern conditional
22140 (aarch64_crypto_sha1hv4si): Ditto.
22141 (aarch64_be_crypto_sha1hv4si): Ditto.
22142 (aarch64_crypto_sha1su1v4si): Ditto.
22143 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
22144 (aarch64_crypto_sha1su0v4si): Ditto.
22145 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
22146 (aarch64_crypto_sha256su0v4si): Ditto.
22147 (aarch64_crypto_sha256su1v4si): Ditto.
22148 (doc/invoke.texi): Document new aes and sha2 options.
22150 2018-01-10 Martin Sebor <msebor@redhat.com>
22152 PR tree-optimization/83781
22153 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
22156 2018-01-11 Martin Sebor <msebor@gmail.com>
22157 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22159 PR tree-optimization/83501
22160 PR tree-optimization/81703
22162 * tree-ssa-strlen.c (get_string_cst): Rename...
22163 (get_string_len): ...to this. Handle global constants.
22164 (handle_char_store): Adjust.
22166 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
22167 Jim Wilson <jimw@sifive.com>
22169 * config/riscv/riscv-protos.h (riscv_output_return): New.
22170 * config/riscv/riscv.c (struct machine_function): New naked_p field.
22171 (riscv_attribute_table, riscv_output_return),
22172 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
22173 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
22174 (riscv_compute_frame_info): Only compute frame->mask if not a naked
22176 (riscv_expand_prologue): Add early return for naked function.
22177 (riscv_expand_epilogue): Likewise.
22178 (riscv_function_ok_for_sibcall): Return false for naked function.
22179 (riscv_set_current_function): New.
22180 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
22181 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
22182 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
22183 * doc/extend.texi (RISC-V Function Attributes): New.
22185 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
22187 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
22188 check for 128-bit long double before checking TCmode.
22189 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
22190 128-bit long doubles before checking TFmode or TCmode.
22191 (FLOAT128_IBM_P): Likewise.
22193 2018-01-10 Martin Sebor <msebor@redhat.com>
22195 PR tree-optimization/83671
22196 * builtins.c (c_strlen): Unconditionally return zero for the empty
22198 Use -Warray-bounds for warnings.
22199 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
22200 for non-constant array indices with COMPONENT_REF, arrays of
22201 arrays, and pointers to arrays.
22202 (gimple_fold_builtin_strlen): Determine and set length range for
22203 non-constant character arrays.
22205 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
22207 PR middle-end/81897
22208 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
22211 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
22213 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
22215 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
22218 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
22219 VECTOR_MEM_ALTIVEC_OR_VSX_P.
22220 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
22221 indexed_or_indirect_operand predicate.
22222 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
22223 (*vsx_le_perm_load_v8hi): Likewise.
22224 (*vsx_le_perm_load_v16qi): Likewise.
22225 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
22226 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
22227 (*vsx_le_perm_store_v8hi): Likewise.
22228 (*vsx_le_perm_store_v16qi): Likewise.
22229 (eight unnamed splitters): Likewise.
22231 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
22233 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
22234 * config/rs6000/emmintrin.h: Likewise.
22235 * config/rs6000/mmintrin.h: Likewise.
22236 * config/rs6000/xmmintrin.h: Likewise.
22238 2018-01-10 David Malcolm <dmalcolm@redhat.com>
22241 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
22243 * tree.c (tree_nop_conversion): Return true for location wrapper
22245 (maybe_wrap_with_location): New function.
22246 (selftest::check_strip_nops): New function.
22247 (selftest::test_location_wrappers): New function.
22248 (selftest::tree_c_tests): Call it.
22249 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
22250 (maybe_wrap_with_location): New decl.
22251 (EXPR_LOCATION_WRAPPER_P): New macro.
22252 (location_wrapper_p): New inline function.
22253 (tree_strip_any_location_wrapper): New inline function.
22255 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
22258 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
22259 stack_realign_offset for the largest alignment of stack slot
22261 (ix86_find_max_used_stack_alignment): New function.
22262 (ix86_finalize_stack_frame_flags): Use it. Set
22263 max_used_stack_alignment if we don't realign stack.
22264 * config/i386/i386.h (machine_function): Add
22265 max_used_stack_alignment.
22267 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
22269 * config/arm/arm.opt (-mbranch-cost): New option.
22270 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
22273 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
22276 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
22277 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
22279 2018-01-10 Richard Biener <rguenther@suse.de>
22282 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
22283 early out so it also covers the case where we have a non-NULL
22286 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
22288 PR tree-optimization/83753
22289 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
22290 for non-strided grouped accesses if the number of elements is 1.
22292 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22295 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
22296 * i386.h (TARGET_USE_GATHER): Define.
22297 * x86-tune.def (X86_TUNE_USE_GATHER): New.
22299 2018-01-10 Martin Liska <mliska@suse.cz>
22302 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
22303 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
22305 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
22306 CLEANUP_NO_PARTITIONING is not set.
22308 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
22310 * doc/rtl.texi: Remove documentation of (const ...) wrappers
22311 for vectors, as a partial revert of r254296.
22312 * rtl.h (const_vec_p): Delete.
22313 (const_vec_duplicate_p): Don't test for vector CONSTs.
22314 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
22315 * expmed.c (make_tree): Likewise.
22318 * common.md (E, F): Use CONSTANT_P instead of checking for
22320 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
22321 checking for CONST_VECTOR.
22323 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
22325 PR middle-end/83575
22326 * predict.c (force_edge_cold): Handle in more sane way edges
22327 with no prediction.
22329 2018-01-09 Carl Love <cel@us.ibm.com>
22331 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
22333 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
22334 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
22335 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
22336 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
22337 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
22338 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
22339 * config/rs6000/rs6000-protos.h: Add extern defition for
22340 rs6000_generate_float2_double_code.
22341 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
22343 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
22344 (float2_v2df): Add define_expand.
22346 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
22349 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
22350 op_mode in the force_to_mode call.
22352 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
22354 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
22355 instead of checking each element individually.
22356 (aarch64_evpc_uzp): Likewise.
22357 (aarch64_evpc_zip): Likewise.
22358 (aarch64_evpc_ext): Likewise.
22359 (aarch64_evpc_rev): Likewise.
22360 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
22361 instead of checking each element individually. Return true without
22363 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
22364 whether all selected elements come from the same input, instead of
22365 checking each element individually. Remove calls to gen_rtx_REG,
22366 start_sequence and end_sequence and instead assert that no rtl is
22369 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
22371 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
22372 order of HIGH and CONST checks.
22374 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
22376 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
22377 if the destination isn't an SSA_NAME.
22379 2018-01-09 Richard Biener <rguenther@suse.de>
22381 PR tree-optimization/83668
22382 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
22384 (canonicalize_loop_form): ... here, renamed from ...
22385 (canonicalize_loop_closed_ssa_form): ... this and amended to
22386 swap successor edges for loop exit blocks to make us use
22387 the RPO order we need for initial schedule generation.
22389 2018-01-09 Joseph Myers <joseph@codesourcery.com>
22391 PR tree-optimization/64811
22392 * match.pd: When optimizing comparisons with Inf, avoid
22393 introducing or losing exceptions from comparisons with NaN.
22395 2018-01-09 Martin Liska <mliska@suse.cz>
22398 * asan.c (shadow_mem_size): Add gcc_assert.
22400 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
22402 Don't save registers in main().
22405 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
22406 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
22407 * config/avr/avr.c (avr_set_current_function): Don't error if
22408 naked, OS_task or OS_main are specified at the same time.
22409 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
22411 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
22413 * common/config/avr/avr-common.c (avr_option_optimization_table):
22414 Switch on -mmain-is-OS_task for optimizing compilations.
22416 2018-01-09 Richard Biener <rguenther@suse.de>
22418 PR tree-optimization/83572
22419 * graphite.c: Include cfganal.h.
22420 (graphite_transform_loops): Connect infinite loops to exit
22421 and remove fake edges at the end.
22423 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
22425 * ipa-inline.c (edge_badness): Revert accidental checkin.
22427 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
22430 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
22431 symbols; not inline clones.
22433 2018-01-09 Jakub Jelinek <jakub@redhat.com>
22436 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
22437 hard registers. Formatting fixes.
22439 PR preprocessor/83722
22440 * gcc.c (try_generate_repro): Pass
22441 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
22442 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
22445 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
22446 Kito Cheng <kito.cheng@gmail.com>
22448 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
22449 (riscv_leaf_function_p): Delete.
22450 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
22452 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22454 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
22456 (do_ifelse): New function.
22457 (do_isel): New function.
22458 (do_sub3): New function.
22459 (do_add3): New function.
22460 (do_load_mask_compare): New function.
22461 (do_overlap_load_compare): New function.
22462 (expand_compare_loop): New function.
22463 (expand_block_compare): Call expand_compare_loop() when appropriate.
22464 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
22465 option description.
22466 (-mblock-compare-inline-loop-limit): New option.
22468 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22471 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
22472 Reverse order of second and third operands in first alternative.
22473 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
22474 of first and second elements in UNSPEC_VPERMR vector.
22475 (altivec_expand_vec_perm_le): Likewise.
22477 2018-01-08 Jeff Law <law@redhat.com>
22479 PR rtl-optimizatin/81308
22480 * tree-switch-conversion.c (cfg_altered): New file scoped static.
22481 (process_switch): If group_case_labels makes a change, then set
22483 (pass_convert_switch::execute): If a switch is converted, then
22484 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
22486 PR rtl-optimization/81308
22487 * recog.c (split_all_insns): Conditionally cleanup the CFG after
22490 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
22492 PR target/83663 - Revert r255946
22493 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
22494 generation for cases where splatting a value is not useful.
22495 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
22496 across a vec_duplicate and a paradoxical subreg forming a vector
22497 mode to a vec_concat.
22499 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22501 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
22502 -march=armv8.3-a variants.
22503 * config/arm/t-multilib: Likewise.
22504 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
22506 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22508 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
22510 (cceq_ior_compare_complement): Give it a name so I can use it, and
22511 change boolean_or_operator predicate to boolean_operator so it can
22512 be used to generate a crand.
22513 (eqne): New code iterator.
22514 (bd/bd_neg): New code_attrs.
22515 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
22516 a single define_insn.
22517 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
22518 decrement (bdnzt/bdnzf/bdzt/bdzf).
22519 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
22520 with the new names of the branch decrement patterns, and added the
22521 names of the branch decrement conditional patterns.
22523 2018-01-08 Richard Biener <rguenther@suse.de>
22525 PR tree-optimization/83563
22526 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
22529 2018-01-08 Richard Biener <rguenther@suse.de>
22531 PR middle-end/83713
22532 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
22534 2018-01-08 Richard Biener <rguenther@suse.de>
22536 PR tree-optimization/83685
22537 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
22538 references to abnormals.
22540 2018-01-08 Richard Biener <rguenther@suse.de>
22543 * dwarf2out.c (output_indirect_strings): Handle empty
22544 skeleton_debug_str_hash.
22545 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
22547 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
22549 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
22550 (emit_store_direct): Likewise.
22551 (arc_trampoline_adjust_address): Likewise.
22552 (arc_asm_trampoline_template): New function.
22553 (arc_initialize_trampoline): Use asm_trampoline_template.
22554 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
22555 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
22556 * config/arc/arc.md (flush_icache): Delete pattern.
22558 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
22560 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
22561 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
22564 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
22567 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
22568 by not USED_FOR_TARGET.
22569 (make_pass_resolve_sw_modes): Likewise.
22571 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
22573 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
22576 2018-01-08 Richard Biener <rguenther@suse.de>
22578 PR middle-end/83580
22579 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
22581 2018-01-08 Richard Biener <rguenther@suse.de>
22583 PR middle-end/83517
22584 * match.pd ((t * 2) / 2) -> t): Add missing :c.
22586 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
22588 PR middle-end/81897
22589 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
22590 basic blocks with a small number of successors.
22591 (convert_control_dep_chain_into_preds): Improve handling of
22593 (dump_predicates): Split apart into...
22594 (dump_pred_chain): ...here...
22595 (dump_pred_info): ...and here.
22596 (can_one_predicate_be_invalidated_p): Add debugging printfs.
22597 (can_chain_union_be_invalidated_p): Improve check for invalidation
22599 (uninit_uses_cannot_happen): Avoid unnecessary if
22600 convert_control_dep_chain_into_preds yielded nothing.
22602 2018-01-06 Martin Sebor <msebor@redhat.com>
22604 PR tree-optimization/83640
22605 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
22606 subtracting negative offset from size.
22607 (builtin_access::overlap): Adjust offset bounds of the access to fall
22608 within the size of the object if possible.
22610 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
22612 PR rtl-optimization/83699
22613 * expmed.c (extract_bit_field_1): Restrict the vector usage of
22614 extract_bit_field_as_subreg to cases in which the extracted
22615 value is also a vector.
22617 * lra-constraints.c (process_alt_operands): Test for the equivalence
22618 substitutions when detecting a possible reload cycle.
22620 2018-01-06 Jakub Jelinek <jakub@redhat.com>
22623 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
22624 by default if flag_selective_schedling{,2}. Formatting fixes.
22626 PR rtl-optimization/83682
22627 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
22628 if it has non-VECTOR_MODE element mode.
22629 (vec_duplicate_p): Likewise.
22631 PR middle-end/83694
22632 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
22633 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
22635 2018-01-05 Jakub Jelinek <jakub@redhat.com>
22638 * config/i386/i386-builtin.def
22639 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
22640 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
22641 Require also OPTION_MASK_ISA_AVX512F in addition to
22642 OPTION_MASK_ISA_GFNI.
22643 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
22644 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
22645 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
22646 to OPTION_MASK_ISA_GFNI.
22647 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
22648 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
22649 OPTION_MASK_ISA_AVX512BW.
22650 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
22651 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
22652 addition to OPTION_MASK_ISA_GFNI.
22653 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
22654 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
22655 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
22656 to OPTION_MASK_ISA_GFNI.
22657 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
22658 a requirement for all ISAs rather than any of them with a few
22660 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
22662 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
22663 bitmasks to be enabled with 3 exceptions, instead of requiring any
22664 enabled ISA with lots of exceptions.
22665 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
22666 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
22667 Change avx512bw in isa attribute to avx512f.
22668 * config/i386/sgxintrin.h: Add license boilerplate.
22669 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
22670 to __AVX512F__ and __AVX512VL to __AVX512VL__.
22671 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
22672 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
22674 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
22675 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
22676 temporarily sse2 rather than sse if not enabled already.
22679 * config/i386/sse.md (VI248_VLBW): Rename to ...
22680 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
22681 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
22682 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
22683 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
22684 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
22685 mode iterator instead of VI248_VLBW.
22687 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
22689 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
22690 (record_modified): Skip clobbers; add debug output.
22691 (param_change_prob): Use sreal frequencies.
22693 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
22695 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
22696 punt for user-aligned variables.
22698 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
22700 * tree-chrec.c (chrec_contains_symbols): Return true for
22703 2018-01-05 Sudakshina Das <sudi.das@arm.com>
22706 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
22707 of (x|y) == x for BICS pattern.
22709 2018-01-05 Jakub Jelinek <jakub@redhat.com>
22711 PR tree-optimization/83605
22712 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
22713 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
22716 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
22718 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
22719 * config/epiphany/rtems.h: New file.
22721 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22722 Uros Bizjak <ubizjak@gmail.com>
22725 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
22726 QIreg_operand instead of register_operand predicate.
22727 * config/i386/i386.c (ix86_rop_should_change_byte_p,
22728 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
22729 comments instead of -fmitigate[-_]rop.
22731 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22734 * cgraphunit.c (symbol_table::compile): Switch to text_section
22735 before calling assembly_start debug hook.
22736 * run-rtl-passes.c (run_rtl_passes): Likewise.
22739 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22741 * tree-vrp.c (extract_range_from_binary_expr_1): Check
22742 range_int_cst_p rather than !symbolic_range_p before calling
22743 extract_range_from_multiplicative_op_1.
22745 2018-01-04 Jeff Law <law@redhat.com>
22747 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
22748 redundant test in assertion.
22750 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22752 * doc/rtl.texi: Document machine_mode wrapper classes.
22754 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22756 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
22757 using tree_to_uhwi.
22759 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22761 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
22762 the VEC_PERM_EXPR fold to fail.
22764 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22767 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
22768 to switched_sections.
22770 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22773 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
22774 test for d.testing.
22776 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
22779 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
22780 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
22782 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22785 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
22786 is BLKmode and bitpos not zero or mode change is needed.
22788 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22791 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
22794 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
22797 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
22798 instead of MULT rtx. Update all corresponding splitters.
22799 (*saddl_se): Ditto.
22800 (*ssub<modesuffix>): Ditto.
22801 (*ssubl_se): Ditto.
22802 (*cmp_sadd_di): Update split patterns.
22803 (*cmp_sadd_si): Ditto.
22804 (*cmp_sadd_sidi): Ditto.
22805 (*cmp_ssub_di): Ditto.
22806 (*cmp_ssub_si): Ditto.
22807 (*cmp_ssub_sidi): Ditto.
22808 * config/alpha/predicates.md (const23_operand): New predicate.
22809 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
22810 Look for ASHIFT, not MULT inner operand.
22811 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
22813 2018-01-04 Martin Liska <mliska@suse.cz>
22815 PR gcov-profile/83669
22816 * gcov.c (output_intermediate_file): Add version to intermediate
22818 * doc/gcov.texi: Document new field 'version' in intermediate
22819 file format. Fix location of '-k' option of gcov command.
22821 2018-01-04 Martin Liska <mliska@suse.cz>
22824 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
22826 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22828 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
22830 2018-01-03 Martin Sebor <msebor@redhat.com>
22832 PR tree-optimization/83655
22833 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
22834 checking calls with invalid arguments.
22836 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22838 * tree-vect-stmts.c (vect_get_store_rhs): New function.
22839 (vectorizable_mask_load_store): Delete.
22840 (vectorizable_call): Return false for masked loads and stores.
22841 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
22842 instead of gimple_assign_rhs1.
22843 (vectorizable_load): Handle IFN_MASK_LOAD.
22844 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
22846 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22848 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
22850 (vectorizable_mask_load_store): ...here.
22851 (vectorizable_load): ...and here.
22853 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22855 * tree-vect-stmts.c (vect_build_all_ones_mask)
22856 (vect_build_zero_merge_argument): New functions, split out from...
22857 (vectorizable_load): ...here.
22859 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22861 * tree-vect-stmts.c (vect_check_store_rhs): New function,
22863 (vectorizable_mask_load_store): ...here.
22864 (vectorizable_store): ...and here.
22866 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22868 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
22870 (vectorizable_mask_load_store): ...here.
22872 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22874 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
22875 (vect_model_store_cost): Take a vec_load_store_type instead of a
22877 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
22878 (vect_model_store_cost): Take a vec_load_store_type instead of a
22880 (vectorizable_mask_load_store): Update accordingly.
22881 (vectorizable_store): Likewise.
22882 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
22884 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22886 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
22887 IFN_MASK_LOAD calls here rather than...
22888 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
22890 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22891 Alan Hayward <alan.hayward@arm.com>
22892 David Sherwood <david.sherwood@arm.com>
22894 * expmed.c (extract_bit_field_1): For vector extracts,
22895 fall back to extract_bit_field_as_subreg if vec_extract
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 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
22903 they are variable or constant sized.
22904 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
22905 slots for constant-sized data.
22907 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22908 Alan Hayward <alan.hayward@arm.com>
22909 David Sherwood <david.sherwood@arm.com>
22911 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
22912 handling COND_EXPRs with boolean comparisons, try to find a better
22913 basis for the mask type than the boolean itself.
22915 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22917 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
22918 is calculated and how it can be overridden.
22919 * genmodes.c (max_bitsize_mode_any_mode): New variable.
22920 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
22922 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
22925 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22926 Alan Hayward <alan.hayward@arm.com>
22927 David Sherwood <david.sherwood@arm.com>
22929 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
22930 Remove the mode argument.
22931 (aarch64_simd_valid_immediate): Remove the mode and inverse
22933 * config/aarch64/iterators.md (bitsize): New iterator.
22934 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
22935 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
22936 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
22937 aarch64_simd_valid_immediate.
22938 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
22939 (aarch64_reg_or_bic_imm): Likewise.
22940 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
22941 with an insn_type enum and msl with a modifier_type enum.
22942 Replace element_width with a scalar_mode. Change the shift
22943 to unsigned int. Add constructors for scalar_float_mode and
22944 scalar_int_mode elements.
22945 (aarch64_vect_float_const_representable_p): Delete.
22946 (aarch64_can_const_movi_rtx_p)
22947 (aarch64_simd_scalar_immediate_valid_for_move)
22948 (aarch64_simd_make_constant): Update call to
22949 aarch64_simd_valid_immediate.
22950 (aarch64_advsimd_valid_immediate_hs): New function.
22951 (aarch64_advsimd_valid_immediate): Likewise.
22952 (aarch64_simd_valid_immediate): Remove mode and inverse
22953 arguments. Rewrite to use the above. Use const_vec_duplicate_p
22954 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
22955 and aarch64_float_const_representable_p on the result.
22956 (aarch64_output_simd_mov_immediate): Remove mode argument.
22957 Update call to aarch64_simd_valid_immediate and use of
22958 simd_immediate_info.
22959 (aarch64_output_scalar_simd_mov_immediate): Update call
22962 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22963 Alan Hayward <alan.hayward@arm.com>
22964 David Sherwood <david.sherwood@arm.com>
22966 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
22967 (mode_nunits): Likewise CONST_MODE_NUNITS.
22968 * machmode.def (ADJUST_NUNITS): Document.
22969 * genmodes.c (mode_data::need_nunits_adj): New field.
22970 (blank_mode): Update accordingly.
22971 (adj_nunits): New variable.
22972 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
22974 (emit_mode_size_inline): Set need_bytesize_adj for all modes
22975 listed in adj_nunits.
22976 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
22977 listed in adj_nunits. Don't emit case statements for such modes.
22978 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
22979 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
22980 nothing if adj_nunits is nonnull.
22981 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
22982 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
22983 (emit_mode_fbit): Update use of print_maybe_const_decl.
22984 (emit_move_size): Likewise. Treat the array as non-const
22986 (emit_mode_adjustments): Handle adj_nunits.
22988 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22990 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
22991 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
22992 (VECTOR_MODES): Use it.
22993 (make_vector_modes): Take the prefix as an argument.
22995 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22996 Alan Hayward <alan.hayward@arm.com>
22997 David Sherwood <david.sherwood@arm.com>
22999 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
23000 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
23001 for MODE_VECTOR_BOOL.
23002 * machmode.def (VECTOR_BOOL_MODE): Document.
23003 * genmodes.c (VECTOR_BOOL_MODE): New macro.
23004 (make_vector_bool_mode): New function.
23005 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
23007 * lto-streamer-in.c (lto_input_mode_table): Likewise.
23008 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
23010 * stor-layout.c (int_mode_for_mode): Likewise.
23011 * tree.c (build_vector_type_for_mode): Likewise.
23012 * varasm.c (output_constant_pool_2): Likewise.
23013 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
23014 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
23015 for MODE_VECTOR_BOOL.
23016 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
23017 of mode class checks.
23018 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
23019 instead of a list of mode class checks.
23020 (expand_vector_scalar_condition): Likewise.
23021 (type_for_widest_vector_mode): Handle BImode as an inner mode.
23023 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23024 Alan Hayward <alan.hayward@arm.com>
23025 David Sherwood <david.sherwood@arm.com>
23027 * machmode.h (mode_size): Change from unsigned short to
23029 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
23030 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
23031 or if measurement_type is not polynomial.
23032 (fixed_size_mode::includes_p): Check for constant-sized modes.
23033 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
23034 return a poly_uint16 rather than an unsigned short.
23035 (emit_mode_size): Change the type of mode_size from unsigned short
23036 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
23037 (emit_mode_adjustments): Cope with polynomial vector sizes.
23038 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23040 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23042 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
23043 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
23044 * caller-save.c (setup_save_areas): Likewise.
23045 (replace_reg_with_saved_mem): Likewise.
23046 * calls.c (emit_library_call_value_1): Likewise.
23047 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
23048 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
23049 (gen_lowpart_for_combine): Likewise.
23050 * convert.c (convert_to_integer_1): Likewise.
23051 * cse.c (equiv_constant, cse_insn): Likewise.
23052 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
23053 (cselib_subst_to_values): Likewise.
23054 * dce.c (word_dce_process_block): Likewise.
23055 * df-problems.c (df_word_lr_mark_ref): Likewise.
23056 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
23057 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
23058 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
23059 (rtl_for_decl_location): Likewise.
23060 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
23061 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
23062 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
23063 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
23064 (expand_expr_real_1): Likewise.
23065 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
23066 (pad_below): Likewise.
23067 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
23068 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
23069 * ira.c (get_subreg_tracking_sizes): Likewise.
23070 * ira-build.c (ira_create_allocno_objects): Likewise.
23071 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
23072 (ira_sort_regnos_for_alter_reg): Likewise.
23073 * ira-costs.c (record_operand_costs): Likewise.
23074 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
23075 (resolve_simple_move): Likewise.
23076 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
23077 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
23078 (lra_constraints): Likewise.
23079 (CONST_POOL_OK_P): Reject variable-sized modes.
23080 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
23081 (add_pseudo_to_slot, lra_spill): Likewise.
23082 * omp-low.c (omp_clause_aligned_alignment): Likewise.
23083 * optabs-query.c (get_best_extraction_insn): Likewise.
23084 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
23085 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
23086 (expand_mult_highpart, valid_multiword_target_p): Likewise.
23087 * recog.c (offsettable_address_addr_space_p): Likewise.
23088 * regcprop.c (maybe_mode_change): Likewise.
23089 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
23090 * regrename.c (build_def_use): Likewise.
23091 * regstat.c (dump_reg_info): Likewise.
23092 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
23093 (find_reloads, find_reloads_subreg_address): Likewise.
23094 * reload1.c (eliminate_regs_1): Likewise.
23095 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
23096 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
23097 (simplify_binary_operation_1, simplify_subreg): Likewise.
23098 * targhooks.c (default_function_arg_padding): Likewise.
23099 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
23100 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
23101 (verify_gimple_assign_ternary): Likewise.
23102 * tree-inline.c (estimate_move_cost): Likewise.
23103 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23104 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
23105 (get_address_cost_ainc): Likewise.
23106 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
23107 (vect_supportable_dr_alignment): Likewise.
23108 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
23109 (vectorizable_reduction): Likewise.
23110 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
23111 (vectorizable_operation, vectorizable_load): Likewise.
23112 * tree.c (build_same_sized_truth_vector_type): Likewise.
23113 * valtrack.c (cleanup_auto_inc_dec): Likewise.
23114 * var-tracking.c (emit_note_insn_var_location): Likewise.
23115 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
23116 (ADDR_VEC_ALIGN): Likewise.
23118 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23119 Alan Hayward <alan.hayward@arm.com>
23120 David Sherwood <david.sherwood@arm.com>
23122 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
23124 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
23125 or if measurement_type is polynomial.
23126 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
23127 * combine.c (make_extraction): Likewise.
23128 * dse.c (find_shift_sequence): Likewise.
23129 * dwarf2out.c (mem_loc_descriptor): Likewise.
23130 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
23131 (extract_bit_field, extract_low_bits): Likewise.
23132 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
23133 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
23134 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
23135 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
23136 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
23137 * reload.c (find_reloads): Likewise.
23138 * reload1.c (alter_reg): Likewise.
23139 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
23140 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
23141 * tree-if-conv.c (predicate_mem_writes): Likewise.
23142 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
23143 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
23144 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
23145 * valtrack.c (dead_debug_insert_temp): Likewise.
23146 * varasm.c (mergeable_constant_section): Likewise.
23147 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
23149 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23150 Alan Hayward <alan.hayward@arm.com>
23151 David Sherwood <david.sherwood@arm.com>
23153 * expr.c (expand_assignment): Cope with polynomial mode sizes
23154 when assigning to a CONCAT.
23156 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23157 Alan Hayward <alan.hayward@arm.com>
23158 David Sherwood <david.sherwood@arm.com>
23160 * machmode.h (mode_precision): Change from unsigned short to
23162 (mode_to_precision): Return a poly_uint16 rather than an unsigned
23164 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
23165 or if measurement_type is not polynomial.
23166 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
23167 in which the mode is already known to be a scalar_int_mode.
23168 * genmodes.c (emit_mode_precision): Change the type of mode_precision
23169 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
23171 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23172 for GET_MODE_PRECISION.
23173 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23174 for GET_MODE_PRECISION.
23175 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
23177 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
23178 (expand_field_assignment, make_extraction): Likewise.
23179 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
23180 (get_last_value): Likewise.
23181 * convert.c (convert_to_integer_1): Likewise.
23182 * cse.c (cse_insn): Likewise.
23183 * expr.c (expand_expr_real_1): Likewise.
23184 * lra-constraints.c (simplify_operand_subreg): Likewise.
23185 * optabs-query.c (can_atomic_load_p): Likewise.
23186 * optabs.c (expand_atomic_load): Likewise.
23187 (expand_atomic_store): Likewise.
23188 * ree.c (combine_reaching_defs): Likewise.
23189 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
23190 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
23191 * tree.h (type_has_mode_precision_p): Likewise.
23192 * ubsan.c (instrument_si_overflow): Likewise.
23194 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23195 Alan Hayward <alan.hayward@arm.com>
23196 David Sherwood <david.sherwood@arm.com>
23198 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
23199 polynomial numbers of units.
23200 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
23201 (valid_vector_subparts_p): New function.
23202 (build_vector_type): Remove temporary shim and take the number
23203 of units as a poly_uint64 rather than an int.
23204 (build_opaque_vector_type): Take the number of units as a
23205 poly_uint64 rather than an int.
23206 * tree.c (build_vector_from_ctor): Handle polynomial
23207 TYPE_VECTOR_SUBPARTS.
23208 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
23209 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
23210 (build_vector_from_val): If the number of units is variable,
23211 use build_vec_duplicate_cst for constant operands and
23212 VEC_DUPLICATE_EXPR otherwise.
23213 (make_vector_type): Remove temporary is_constant ().
23214 (build_vector_type, build_opaque_vector_type): Take the number of
23215 units as a poly_uint64 rather than an int.
23216 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
23218 * cfgexpand.c (expand_debug_expr): Likewise.
23219 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
23220 (store_constructor, expand_expr_real_1): Likewise.
23221 (const_scalar_mask_from_tree): Likewise.
23222 * fold-const-call.c (fold_const_reduction): Likewise.
23223 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
23224 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
23225 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
23226 (fold_relational_const): Likewise.
23227 (native_interpret_vector): Likewise. Change the size from an
23228 int to an unsigned int.
23229 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
23230 TYPE_VECTOR_SUBPARTS.
23231 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
23232 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
23233 duplicating a non-constant operand into a variable-length vector.
23234 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
23235 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
23236 * ipa-icf.c (sem_variable::equals): Likewise.
23237 * match.pd: Likewise.
23238 * omp-simd-clone.c (simd_clone_subparts): Likewise.
23239 * print-tree.c (print_node): Likewise.
23240 * stor-layout.c (layout_type): Likewise.
23241 * targhooks.c (default_builtin_vectorization_cost): Likewise.
23242 * tree-cfg.c (verify_gimple_comparison): Likewise.
23243 (verify_gimple_assign_binary): Likewise.
23244 (verify_gimple_assign_ternary): Likewise.
23245 (verify_gimple_assign_single): Likewise.
23246 * tree-pretty-print.c (dump_generic_node): Likewise.
23247 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23248 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
23249 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
23250 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
23251 (vect_shift_permute_load_chain): Likewise.
23252 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
23253 (expand_vector_condition, optimize_vector_constructor): Likewise.
23254 (lower_vec_perm, get_compute_type): Likewise.
23255 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
23256 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
23257 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
23258 (vect_recog_mask_conversion_pattern): Likewise.
23259 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
23260 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
23261 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23262 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
23263 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
23264 (vectorizable_shift, vectorizable_operation, vectorizable_store)
23265 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
23266 (supportable_widening_operation): Likewise.
23267 (supportable_narrowing_operation): Likewise.
23268 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
23270 * varasm.c (output_constant): Likewise.
23272 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23273 Alan Hayward <alan.hayward@arm.com>
23274 David Sherwood <david.sherwood@arm.com>
23276 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
23277 so that both the length == 3 and length != 3 cases set up their
23278 own permute vectors. Add comments explaining why we know the
23279 number of elements is constant.
23280 (vect_permute_load_chain): Likewise.
23282 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23283 Alan Hayward <alan.hayward@arm.com>
23284 David Sherwood <david.sherwood@arm.com>
23286 * machmode.h (mode_nunits): Change from unsigned char to
23288 (ONLY_FIXED_SIZE_MODES): New macro.
23289 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
23290 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
23291 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
23293 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
23294 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
23295 or if measurement_type is not polynomial.
23296 * genmodes.c (ZERO_COEFFS): New macro.
23297 (emit_mode_nunits_inline): Make mode_nunits_inline return a
23299 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
23300 Use ZERO_COEFFS when emitting initializers.
23301 * data-streamer.h (bp_pack_poly_value): New function.
23302 (bp_unpack_poly_value): Likewise.
23303 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23304 for GET_MODE_NUNITS.
23305 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23306 for GET_MODE_NUNITS.
23307 * tree.c (make_vector_type): Remove temporary shim and make
23308 the real function take the number of units as a poly_uint64
23309 rather than an int.
23310 (build_vector_type_for_mode): Handle polynomial nunits.
23311 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
23312 * emit-rtl.c (const_vec_series_p_1): Likewise.
23313 (gen_rtx_CONST_VECTOR): Likewise.
23314 * fold-const.c (test_vec_duplicate_folding): Likewise.
23315 * genrecog.c (validate_pattern): Likewise.
23316 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
23317 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
23318 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
23319 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
23320 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
23321 * rtlanal.c (subreg_get_info): Likewise.
23322 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23323 (vect_grouped_load_supported): Likewise.
23324 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
23325 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
23326 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
23327 (simplify_const_unary_operation, simplify_binary_operation_1)
23328 (simplify_const_binary_operation, simplify_ternary_operation)
23329 (test_vector_ops_duplicate, test_vector_ops): Likewise.
23330 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
23331 instead of CONST_VECTOR_NUNITS.
23332 * varasm.c (output_constant_pool_2): Likewise.
23333 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
23334 explicit-encoded elements in the XVEC for variable-length vectors.
23336 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23338 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
23340 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23341 Alan Hayward <alan.hayward@arm.com>
23342 David Sherwood <david.sherwood@arm.com>
23344 * coretypes.h (fixed_size_mode): Declare.
23345 (fixed_size_mode_pod): New typedef.
23346 * builtins.h (target_builtins::x_apply_args_mode)
23347 (target_builtins::x_apply_result_mode): Change type to
23348 fixed_size_mode_pod.
23349 * builtins.c (apply_args_size, apply_result_size, result_vector)
23350 (expand_builtin_apply_args_1, expand_builtin_apply)
23351 (expand_builtin_return): Update accordingly.
23353 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23355 * cse.c (hash_rtx_cb): Hash only the encoded elements.
23356 * cselib.c (cselib_hash_rtx): Likewise.
23357 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
23358 CONST_VECTOR encoding.
23360 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23361 Jeff Law <law@redhat.com>
23364 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
23365 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
23366 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
23367 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
23370 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
23371 explicitly probe *sp in a noreturn function if there were any callee
23372 register saves or frame pointer is needed.
23374 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23377 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
23378 BLKmode for ternary, binary or unary expressions.
23381 * var-tracking.c (delete_vta_debug_insn): New inline function.
23382 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
23383 insns from get_insns () to NULL instead of each bb separately.
23384 Use delete_vta_debug_insn. No longer static.
23385 (vt_debug_insns_local, variable_tracking_main_1): Adjust
23386 delete_vta_debug_insns callers.
23387 * rtl.h (delete_vta_debug_insns): Declare.
23388 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
23389 instead of variable_tracking_main.
23391 2018-01-03 Martin Sebor <msebor@redhat.com>
23393 PR tree-optimization/83603
23394 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
23395 arguments past the endof the argument list in functions declared
23396 without a prototype.
23397 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
23398 Avoid checking when arguments are null.
23400 2018-01-03 Martin Sebor <msebor@redhat.com>
23403 * doc/extend.texi (attribute const): Fix a typo.
23404 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
23405 issuing -Wsuggest-attribute for void functions.
23407 2018-01-03 Martin Sebor <msebor@redhat.com>
23409 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
23410 offset_int::from instead of wide_int::to_shwi.
23411 (maybe_diag_overlap): Remove assertion.
23412 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
23413 * gimple-ssa-sprintf.c (format_directive): Same.
23414 (parse_directive): Same.
23415 (sprintf_dom_walker::compute_format_length): Same.
23416 (try_substitute_return_value): Same.
23418 2018-01-03 Jeff Law <law@redhat.com>
23420 PR middle-end/83654
23421 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
23422 non-constant residual for zero at runtime and avoid probing in
23423 that case. Reorganize code for trailing problem to mirror handling
23426 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23428 PR tree-optimization/83501
23429 * tree-ssa-strlen.c (get_string_cst): New.
23430 (handle_char_store): Call get_string_cst.
23432 2018-01-03 Martin Liska <mliska@suse.cz>
23434 PR tree-optimization/83593
23435 * tree-ssa-strlen.c: Include tree-cfg.h.
23436 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
23437 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
23438 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
23440 (strlen_dom_walker::before_dom_children): Call
23441 gimple_purge_dead_eh_edges. Dump tranformation with details
23443 (strlen_dom_walker::before_dom_children): Update call by adding
23444 new argument cleanup_eh.
23445 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
23447 2018-01-03 Martin Liska <mliska@suse.cz>
23450 * cif-code.def (VARIADIC_THUNK): New enum value.
23451 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
23454 2018-01-03 Jan Beulich <jbeulich@suse.com>
23456 * sse.md (mov<mode>_internal): Tighten condition for when to use
23457 vmovdqu<ssescalarsize> for TI and OI modes.
23459 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23461 Update copyright years.
23463 2018-01-03 Martin Liska <mliska@suse.cz>
23466 * ipa-visibility.c (function_and_variable_visibility): Skip
23467 functions with noipa attribure.
23469 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23471 * gcc.c (process_command): Update copyright notice dates.
23472 * gcov-dump.c (print_version): Ditto.
23473 * gcov.c (print_version): Ditto.
23474 * gcov-tool.c (print_version): Ditto.
23475 * gengtype.c (create_file): Ditto.
23476 * doc/cpp.texi: Bump @copying's copyright year.
23477 * doc/cppinternals.texi: Ditto.
23478 * doc/gcc.texi: Ditto.
23479 * doc/gccint.texi: Ditto.
23480 * doc/gcov.texi: Ditto.
23481 * doc/install.texi: Ditto.
23482 * doc/invoke.texi: Ditto.
23484 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23486 * vector-builder.h (vector_builder::m_full_nelts): Change from
23487 unsigned int to poly_uint64.
23488 (vector_builder::full_nelts): Update prototype accordingly.
23489 (vector_builder::new_vector): Likewise.
23490 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
23491 (vector_builder::operator ==): Likewise.
23492 (vector_builder::finalize): Likewise.
23493 * int-vector-builder.h (int_vector_builder::int_vector_builder):
23494 Take the number of elements as a poly_uint64 rather than an
23496 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
23497 from unsigned int to poly_uint64.
23498 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
23499 (vec_perm_indices::new_vector): Likewise.
23500 (vec_perm_indices::length): Likewise.
23501 (vec_perm_indices::nelts_per_input): Likewise.
23502 (vec_perm_indices::input_nelts): Likewise.
23503 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
23504 number of elements per input as a poly_uint64 rather than an
23505 unsigned int. Use the original encoding for variable-length
23506 vectors, rather than clamping each individual element.
23507 For the second and subsequent elements in each pattern,
23508 clamp the step and base before clamping their sum.
23509 (vec_perm_indices::series_p): Handle polynomial element counts.
23510 (vec_perm_indices::all_in_range_p): Likewise.
23511 (vec_perm_indices_to_tree): Likewise.
23512 (vec_perm_indices_to_rtx): Likewise.
23513 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
23514 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
23515 (tree_vector_builder::new_binary_operation): Handle polynomial
23516 element counts. Return false if we need to know the number
23517 of elements at compile time.
23518 * fold-const.c (fold_vec_perm): Punt if the number of elements
23519 isn't known at compile time.
23521 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23523 * vec-perm-indices.h (vec_perm_builder): Change element type
23524 from HOST_WIDE_INT to poly_int64.
23525 (vec_perm_indices::element_type): Update accordingly.
23526 (vec_perm_indices::clamp): Handle polynomial element_types.
23527 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
23528 (vec_perm_indices::all_in_range_p): Likewise.
23529 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
23531 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
23532 polynomial vec_perm_indices element types.
23533 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
23534 * fold-const.c (fold_vec_perm): Likewise.
23535 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
23536 * tree-vect-generic.c (lower_vec_perm): Likewise.
23537 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
23538 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
23539 element type to HOST_WIDE_INT.
23541 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23542 Alan Hayward <alan.hayward@arm.com>
23543 David Sherwood <david.sherwood@arm.com>
23545 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
23546 rather than an int. Use plus_constant.
23547 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
23548 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
23550 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23551 Alan Hayward <alan.hayward@arm.com>
23552 David Sherwood <david.sherwood@arm.com>
23554 * calls.c (emit_call_1, expand_call): Change struct_value_size from
23555 a HOST_WIDE_INT to a poly_int64.
23557 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23558 Alan Hayward <alan.hayward@arm.com>
23559 David Sherwood <david.sherwood@arm.com>
23561 * calls.c (load_register_parameters): Cope with polynomial
23562 mode sizes. Require a constant size for BLKmode parameters
23563 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
23564 forces a parameter to be padded at the lsb end in order to
23565 fill a complete number of words, require the parameter size
23566 to be ordered wrt UNITS_PER_WORD.
23568 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23569 Alan Hayward <alan.hayward@arm.com>
23570 David Sherwood <david.sherwood@arm.com>
23572 * reload1.c (spill_stack_slot_width): Change element type
23573 from unsigned int to poly_uint64_pod.
23574 (alter_reg): Treat mode sizes as polynomial.
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 * reload.c (complex_word_subreg_p): New function.
23581 (reload_inner_reg_of_subreg, push_reload): Use it.
23583 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23584 Alan Hayward <alan.hayward@arm.com>
23585 David Sherwood <david.sherwood@arm.com>
23587 * lra-constraints.c (process_alt_operands): Reject matched
23588 operands whose sizes aren't ordered.
23589 (match_reload): Refer to this check here.
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 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
23596 that the mode size is in the set {1, 2, 4, 8, 16}.
23598 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23599 Alan Hayward <alan.hayward@arm.com>
23600 David Sherwood <david.sherwood@arm.com>
23602 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
23603 Use plus_constant instead of gen_rtx_PLUS.
23605 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23606 Alan Hayward <alan.hayward@arm.com>
23607 David Sherwood <david.sherwood@arm.com>
23609 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
23610 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
23611 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
23612 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
23613 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
23614 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
23615 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
23616 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
23617 * config/i386/i386.c (ix86_push_rounding): ...this new function.
23618 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
23620 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
23621 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
23622 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
23623 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
23624 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
23625 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
23626 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
23627 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
23628 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
23629 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
23631 * expr.c (emit_move_resolve_push): Treat the input and result
23632 of PUSH_ROUNDING as a poly_int64.
23633 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
23634 (emit_push_insn): Likewise.
23635 * lra-eliminations.c (mark_not_eliminable): Likewise.
23636 * recog.c (push_operand): Likewise.
23637 * reload1.c (elimination_effects): Likewise.
23638 * rtlanal.c (nonzero_bits1): Likewise.
23639 * calls.c (store_one_arg): Likewise. Require the padding to be
23640 known at compile time.
23642 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23643 Alan Hayward <alan.hayward@arm.com>
23644 David Sherwood <david.sherwood@arm.com>
23646 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
23647 Use plus_constant instead of gen_rtx_PLUS.
23649 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23650 Alan Hayward <alan.hayward@arm.com>
23651 David Sherwood <david.sherwood@arm.com>
23653 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
23654 rather than an int.
23656 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23657 Alan Hayward <alan.hayward@arm.com>
23658 David Sherwood <david.sherwood@arm.com>
23660 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
23661 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
23662 via stack temporaries. Treat the mode size as polynomial too.
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_2): When handling conversions involving
23669 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
23670 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
23671 as a poly_uint64 too.
23673 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23674 Alan Hayward <alan.hayward@arm.com>
23675 David Sherwood <david.sherwood@arm.com>
23677 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
23679 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23680 Alan Hayward <alan.hayward@arm.com>
23681 David Sherwood <david.sherwood@arm.com>
23683 * combine.c (can_change_dest_mode): Handle polynomial
23684 REGMODE_NATURAL_SIZE.
23685 * expmed.c (store_bit_field_1): Likewise.
23686 * expr.c (store_constructor): Likewise.
23687 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
23688 and polynomial REGMODE_NATURAL_SIZE.
23689 (gen_lowpart_common): Likewise.
23690 * reginfo.c (record_subregs_of_mode): Likewise.
23691 * rtlanal.c (read_modify_subreg_p): Likewise.
23693 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23694 Alan Hayward <alan.hayward@arm.com>
23695 David Sherwood <david.sherwood@arm.com>
23697 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
23698 numbers of elements.
23700 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23701 Alan Hayward <alan.hayward@arm.com>
23702 David Sherwood <david.sherwood@arm.com>
23704 * match.pd: Cope with polynomial numbers of vector elements.
23706 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23707 Alan Hayward <alan.hayward@arm.com>
23708 David Sherwood <david.sherwood@arm.com>
23710 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
23711 in a POINTER_PLUS_EXPR.
23713 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23714 Alan Hayward <alan.hayward@arm.com>
23715 David Sherwood <david.sherwood@arm.com>
23717 * omp-simd-clone.c (simd_clone_subparts): New function.
23718 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
23719 (ipa_simd_modify_function_body): Likewise.
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 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
23726 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
23727 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
23728 (expand_vector_condition, vector_element): Likewise.
23729 (subparts_gt): New function.
23730 (get_compute_type): Use subparts_gt.
23731 (count_type_subparts): Delete.
23732 (expand_vector_operations_1): Use subparts_gt instead of
23733 count_type_subparts.
23735 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23736 Alan Hayward <alan.hayward@arm.com>
23737 David Sherwood <david.sherwood@arm.com>
23739 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
23740 (vect_compile_time_alias): ...this new function. Do the calculation
23741 on poly_ints rather than trees.
23742 (vect_prune_runtime_alias_test_list): Update call accordingly.
23744 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23745 Alan Hayward <alan.hayward@arm.com>
23746 David Sherwood <david.sherwood@arm.com>
23748 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
23750 (vect_schedule_slp_instance): Likewise.
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_get_and_check_slp_defs): Reject
23757 constant and extern definitions for variable-length vectors.
23758 (vect_get_constant_vectors): Note that the number of units
23759 is known to be constant.
23761 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23762 Alan Hayward <alan.hayward@arm.com>
23763 David Sherwood <david.sherwood@arm.com>
23765 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
23766 of units as polynomial. Choose between WIDE and NARROW based
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 (simd_clone_subparts): New function.
23774 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
23776 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23777 Alan Hayward <alan.hayward@arm.com>
23778 David Sherwood <david.sherwood@arm.com>
23780 * tree-vect-stmts.c (vectorizable_call): Treat the number of
23781 vectors as polynomial. Use build_index_vector for
23782 IFN_GOMP_SIMD_LANE.
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 (get_load_store_type): Treat the number of
23789 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
23790 for variable-length vectors.
23791 (vectorizable_mask_load_store): Treat the number of units as
23792 polynomial, asserting that it is constant if the condition has
23793 already been enforced.
23794 (vectorizable_store, vectorizable_load): Likewise.
23796 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23797 Alan Hayward <alan.hayward@arm.com>
23798 David Sherwood <david.sherwood@arm.com>
23800 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
23801 of units as polynomial. Punt if we can't tell at compile time
23802 which vector contains the final result.
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_induction): Treat the number
23809 of units as polynomial. Punt on SLP inductions. Use an integer
23810 VEC_SERIES_EXPR for variable-length integer reductions. Use a
23811 cast of such a series for variable-length floating-point
23814 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23815 Alan Hayward <alan.hayward@arm.com>
23816 David Sherwood <david.sherwood@arm.com>
23818 * tree.h (build_index_vector): Declare.
23819 * tree.c (build_index_vector): New function.
23820 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
23821 of units as polynomial, forcibly converting it to a constant if
23822 vectorizable_reduction has already enforced the condition.
23823 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
23824 to create a {1,2,3,...} vector.
23825 (vectorizable_reduction): Treat the number of units as polynomial.
23826 Choose vectype_in based on the largest scalar element size rather
23827 than the smallest number of units. Enforce the restrictions
23830 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23831 Alan Hayward <alan.hayward@arm.com>
23832 David Sherwood <david.sherwood@arm.com>
23834 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
23835 number of units as polynomial.
23837 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23838 Alan Hayward <alan.hayward@arm.com>
23839 David Sherwood <david.sherwood@arm.com>
23841 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
23842 * target.def (autovectorize_vector_sizes): Return the vector sizes
23843 by pointer, using vector_sizes rather than a bitmask.
23844 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
23845 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
23846 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
23848 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
23849 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
23850 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
23851 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
23852 * omp-general.c (omp_max_vf): Likewise.
23853 * omp-low.c (omp_clause_aligned_alignment): Likewise.
23854 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
23855 * tree-vect-loop.c (vect_analyze_loop): Likewise.
23856 * tree-vect-slp.c (vect_slp_bb): Likewise.
23857 * doc/tm.texi: Regenerate.
23858 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
23860 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
23861 the vector size as a poly_uint64 rather than an unsigned int.
23862 (current_vector_size): Change from an unsigned int to a poly_uint64.
23863 (get_vectype_for_scalar_type): Update accordingly.
23864 * tree.h (build_truth_vector_type): Take the size and number of
23865 units as a poly_uint64 rather than an unsigned int.
23866 (build_vector_type): Add a temporary overload that takes
23867 the number of units as a poly_uint64 rather than an unsigned int.
23868 * tree.c (make_vector_type): Likewise.
23869 (build_truth_vector_type): Take the number of units as a poly_uint64
23870 rather than an unsigned int.
23872 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23873 Alan Hayward <alan.hayward@arm.com>
23874 David Sherwood <david.sherwood@arm.com>
23876 * target.def (get_mask_mode): Take the number of units and length
23877 as poly_uint64s rather than unsigned ints.
23878 * targhooks.h (default_get_mask_mode): Update accordingly.
23879 * targhooks.c (default_get_mask_mode): Likewise.
23880 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
23881 * doc/tm.texi: Regenerate.
23883 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23884 Alan Hayward <alan.hayward@arm.com>
23885 David Sherwood <david.sherwood@arm.com>
23887 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
23888 * omp-general.c (omp_max_vf): Likewise.
23889 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
23890 (expand_omp_simd): Handle polynomial safelen.
23891 * omp-low.c (omplow_simd_context): Add a default constructor.
23892 (omplow_simd_context::max_vf): Change from int to poly_uint64.
23893 (lower_rec_simd_input_clauses): Update accordingly.
23894 (lower_rec_input_clauses): Likewise.
23896 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23897 Alan Hayward <alan.hayward@arm.com>
23898 David Sherwood <david.sherwood@arm.com>
23900 * tree-vectorizer.h (vect_nunits_for_cost): New function.
23901 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
23902 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
23903 (vect_analyze_slp_cost): Likewise.
23904 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
23905 (vect_model_load_cost): Likewise.
23907 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23908 Alan Hayward <alan.hayward@arm.com>
23909 David Sherwood <david.sherwood@arm.com>
23911 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
23912 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
23913 from an unsigned int * to a poly_uint64_pod *.
23914 (calculate_unrolling_factor): New function.
23915 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
23917 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23918 Alan Hayward <alan.hayward@arm.com>
23919 David Sherwood <david.sherwood@arm.com>
23921 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
23922 from an unsigned int to a poly_uint64.
23923 (_loop_vec_info::slp_unrolling_factor): Likewise.
23924 (_loop_vec_info::vectorization_factor): Change from an int
23926 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
23927 (vect_get_num_vectors): New function.
23928 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
23929 (vect_get_num_copies): Use vect_get_num_vectors.
23930 (vect_analyze_data_ref_dependences): Change max_vf from an int *
23931 to an unsigned int *.
23932 (vect_analyze_data_refs): Change min_vf from an int * to a
23934 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
23935 than an unsigned HOST_WIDE_INT.
23936 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
23937 (vect_analyze_data_ref_dependence): Change max_vf from an int *
23938 to an unsigned int *.
23939 (vect_analyze_data_ref_dependences): Likewise.
23940 (vect_compute_data_ref_alignment): Handle polynomial vf.
23941 (vect_enhance_data_refs_alignment): Likewise.
23942 (vect_prune_runtime_alias_test_list): Likewise.
23943 (vect_shift_permute_load_chain): Likewise.
23944 (vect_supportable_dr_alignment): Likewise.
23945 (dependence_distance_ge_vf): Take the vectorization factor as a
23946 poly_uint64 rather than an unsigned HOST_WIDE_INT.
23947 (vect_analyze_data_refs): Change min_vf from an int * to a
23949 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
23950 vfm1 as a poly_uint64 rather than an int. Make the same change
23951 for the returned bound_scalar.
23952 (vect_gen_vector_loop_niters): Handle polynomial vf.
23953 (vect_do_peeling): Likewise. Update call to
23954 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
23955 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
23957 * tree-vect-loop.c (vect_determine_vectorization_factor)
23958 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
23959 (vect_get_known_peeling_cost): Likewise.
23960 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
23961 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
23962 (vect_transform_loop): Likewise. Use the lowest possible VF when
23963 updating the upper bounds of the loop.
23964 (vect_min_worthwhile_factor): Make static. Return an unsigned int
23965 rather than an int.
23966 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
23967 polynomial unroll factors.
23968 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
23969 (vect_make_slp_decision): Likewise.
23970 (vect_supported_load_permutation_p): Likewise, and polynomial
23972 (vect_analyze_slp_cost): Handle polynomial vf.
23973 (vect_slp_analyze_node_operations): Likewise.
23974 (vect_slp_analyze_bb_1): Likewise.
23975 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
23976 than an unsigned HOST_WIDE_INT.
23977 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
23978 (vectorizable_load): Handle polynomial vf.
23979 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
23981 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
23983 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23984 Alan Hayward <alan.hayward@arm.com>
23985 David Sherwood <david.sherwood@arm.com>
23987 * match.pd: Handle bit operations involving three constants
23988 and try to fold one pair.
23990 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23992 * tree-vect-loop-manip.c: Include gimple-fold.h.
23993 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
23994 niters_maybe_zero parameters. Handle other cases besides a step of 1.
23995 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
23996 Add a path that uses a step of VF instead of 1, but disable it
23998 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
23999 and niters_no_overflow parameters. Update calls to
24000 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
24001 Create a new SSA name if the latter choses to use a ste other
24002 than zero, and return it via niters_vector_mult_vf_var.
24003 * tree-vect-loop.c (vect_transform_loop): Update calls to
24004 vect_do_peeling, vect_gen_vector_loop_niters and
24005 slpeel_make_loop_iterate_ntimes.
24006 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
24007 (vect_gen_vector_loop_niters): Update declarations after above changes.
24009 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
24011 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
24012 128-bit round to integer instructions.
24013 (ceil<mode>2): Likewise.
24014 (btrunc<mode>2): Likewise.
24015 (round<mode>2): Likewise.
24017 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24019 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
24020 unaligned VSX load/store on P8/P9.
24021 (expand_block_clear): Allow the use of unaligned VSX
24022 load/store on P8/P9.
24024 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24026 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
24028 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
24029 swap associated with both a load and a store.
24031 2018-01-02 Andrew Waterman <andrew@sifive.com>
24033 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
24034 * config/riscv/riscv.md (clear_cache): Use it.
24036 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
24038 * web.c: Remove out-of-date comment.
24040 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24042 * expr.c (fixup_args_size_notes): Check that any existing
24043 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
24044 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
24045 (emit_single_push_insn): ...here.
24047 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24049 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
24050 (const_vector_encoded_nelts): New function.
24051 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
24052 (const_vector_int_elt, const_vector_elt): Declare.
24053 * emit-rtl.c (const_vector_int_elt_1): New function.
24054 (const_vector_elt): Likewise.
24055 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
24056 of CONST_VECTOR_ELT.
24058 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24060 * expr.c: Include rtx-vector-builder.h.
24061 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
24062 directly on the tree encoding.
24063 (const_vector_from_tree): Likewise.
24064 * optabs.c: Include rtx-vector-builder.h.
24065 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
24066 sequence of "u" values.
24067 * vec-perm-indices.c: Include rtx-vector-builder.h.
24068 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
24069 directly on the vec_perm_indices encoding.
24071 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24073 * doc/rtl.texi (const_vector): Describe new encoding scheme.
24074 * Makefile.in (OBJS): Add rtx-vector-builder.o.
24075 * rtx-vector-builder.h: New file.
24076 * rtx-vector-builder.c: Likewise.
24077 * rtl.h (rtx_def::u2): Add a const_vector field.
24078 (CONST_VECTOR_NPATTERNS): New macro.
24079 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
24080 (CONST_VECTOR_DUPLICATE_P): Likewise.
24081 (CONST_VECTOR_STEPPED_P): Likewise.
24082 (CONST_VECTOR_ENCODED_ELT): Likewise.
24083 (const_vec_duplicate_p): Check for a duplicated vector encoding.
24084 (unwrap_const_vec_duplicate): Likewise.
24085 (const_vec_series_p): Check for a non-duplicated vector encoding.
24086 Say that the function only returns true for integer vectors.
24087 * emit-rtl.c: Include rtx-vector-builder.h.
24088 (gen_const_vec_duplicate_1): Delete.
24089 (gen_const_vector): Call gen_const_vec_duplicate instead of
24090 gen_const_vec_duplicate_1.
24091 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
24092 (gen_const_vec_duplicate): Use rtx_vector_builder.
24093 (gen_const_vec_series): Likewise.
24094 (gen_rtx_CONST_VECTOR): Likewise.
24095 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
24096 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
24097 Build a new vector rather than modifying a CONST_VECTOR in-place.
24098 (handle_special_swappables): Update call accordingly.
24099 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
24100 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
24101 Build a new vector rather than modifying a CONST_VECTOR in-place.
24102 (handle_special_swappables): Update call accordingly.
24104 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24106 * simplify-rtx.c (simplify_const_binary_operation): Use
24107 CONST_VECTOR_ELT instead of XVECEXP.
24109 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24111 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
24112 the selector elements to be different from the data elements
24113 if the selector is a VECTOR_CST.
24114 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
24115 ssizetype for the selector.
24117 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24119 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
24120 before testing each element individually.
24121 * tree-vect-generic.c (lower_vec_perm): Likewise.
24123 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24125 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
24126 * selftest-run-tests.c (selftest::run_tests): Call it.
24127 * vector-builder.h (vector_builder::operator ==): New function.
24128 (vector_builder::operator !=): Likewise.
24129 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
24130 (vec_perm_indices::all_from_input_p): New function.
24131 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24132 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
24133 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
24134 instead of reading the VECTOR_CST directly. Detect whether both
24135 vector inputs are the same before constructing the vec_perm_indices,
24136 and update the number of inputs argument accordingly. Use the
24137 utility functions added above. Only construct sel2 if we need to.
24139 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24141 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
24142 the broadcast of the low byte.
24143 (expand_mult_highpart): Use an explicit encoding for the permutes.
24144 * optabs-query.c (can_mult_highpart_p): Likewise.
24145 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
24146 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24147 (vectorizable_bswap): Likewise.
24148 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
24149 explicit encoding for the power-of-2 permutes.
24150 (vect_permute_store_chain): Likewise.
24151 (vect_grouped_load_supported): Likewise.
24152 (vect_permute_load_chain): Likewise.
24154 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24156 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
24157 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
24158 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
24159 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24160 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
24161 (vect_gen_perm_mask_any): Likewise.
24163 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24165 * int-vector-builder.h: New file.
24166 * vec-perm-indices.h: Include int-vector-builder.h.
24167 (vec_perm_indices): Redefine as an int_vector_builder.
24168 (auto_vec_perm_indices): Delete.
24169 (vec_perm_builder): Redefine as a stand-alone class.
24170 (vec_perm_indices::vec_perm_indices): New function.
24171 (vec_perm_indices::clamp): Likewise.
24172 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
24173 (vec_perm_indices::new_vector): New function.
24174 (vec_perm_indices::new_expanded_vector): Update for new
24175 vec_perm_indices class.
24176 (vec_perm_indices::rotate_inputs): New function.
24177 (vec_perm_indices::all_in_range_p): Operate directly on the
24178 encoded form, without computing elided elements.
24179 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
24180 encoding. Update for new vec_perm_indices class.
24181 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
24182 the given vec_perm_builder.
24183 (expand_vec_perm_var): Update vec_perm_builder constructor.
24184 (expand_mult_highpart): Use vec_perm_builder instead of
24185 auto_vec_perm_indices.
24186 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
24187 vec_perm_indices instead of auto_vec_perm_indices. Use a single
24188 or double series encoding as appropriate.
24189 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
24190 vec_perm_indices instead of auto_vec_perm_indices.
24191 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24192 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24193 (vect_permute_store_chain): Likewise.
24194 (vect_grouped_load_supported): Likewise.
24195 (vect_permute_load_chain): Likewise.
24196 (vect_shift_permute_load_chain): Likewise.
24197 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
24198 (vect_transform_slp_perm_load): Likewise.
24199 (vect_schedule_slp_instance): Likewise.
24200 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24201 (vectorizable_mask_load_store): Likewise.
24202 (vectorizable_bswap): Likewise.
24203 (vectorizable_store): Likewise.
24204 (vectorizable_load): Likewise.
24205 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
24206 vec_perm_indices instead of auto_vec_perm_indices. Use
24207 tree_to_vec_perm_builder to read the vector from a tree.
24208 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
24209 vec_perm_builder instead of a vec_perm_indices.
24210 (have_whole_vector_shift): Use vec_perm_builder and
24211 vec_perm_indices instead of auto_vec_perm_indices. Leave the
24212 truncation to calc_vec_perm_mask_for_shift.
24213 (vect_create_epilog_for_reduction): Likewise.
24214 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
24215 from auto_vec_perm_indices to vec_perm_indices.
24216 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
24217 instead of changing individual elements.
24218 (aarch64_vectorize_vec_perm_const): Use new_vector to install
24219 the vector in d.perm.
24220 * config/arm/arm.c (expand_vec_perm_d::perm): Change
24221 from auto_vec_perm_indices to vec_perm_indices.
24222 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
24223 instead of changing individual elements.
24224 (arm_vectorize_vec_perm_const): Use new_vector to install
24225 the vector in d.perm.
24226 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
24227 Update vec_perm_builder constructor.
24228 (rs6000_expand_interleave): Likewise.
24229 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
24230 (rs6000_expand_interleave): Likewise.
24232 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24234 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
24235 to qimode could truncate the indices.
24236 * optabs.c (expand_vec_perm_var): Likewise.
24238 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24240 * Makefile.in (OBJS): Add vec-perm-indices.o.
24241 * vec-perm-indices.h: New file.
24242 * vec-perm-indices.c: Likewise.
24243 * target.h (vec_perm_indices): Replace with a forward class
24245 (auto_vec_perm_indices): Move to vec-perm-indices.h.
24246 * optabs.h: Include vec-perm-indices.h.
24247 (expand_vec_perm): Delete.
24248 (selector_fits_mode_p, expand_vec_perm_var): Declare.
24249 (expand_vec_perm_const): Declare.
24250 * target.def (vec_perm_const_ok): Replace with...
24251 (vec_perm_const): ...this new hook.
24252 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
24253 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
24254 * doc/tm.texi: Regenerate.
24255 * optabs.def (vec_perm_const): Delete.
24256 * doc/md.texi (vec_perm_const): Likewise.
24257 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
24258 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
24259 expand_vec_perm for constant permutation vectors. Assert that
24260 the mode of variable permutation vectors is the integer equivalent
24261 of the mode that is being permuted.
24262 * optabs-query.h (selector_fits_mode_p): Declare.
24263 * optabs-query.c: Include vec-perm-indices.h.
24264 (selector_fits_mode_p): New function.
24265 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
24266 is defined, instead of checking whether the vec_perm_const_optab
24267 exists. Use targetm.vectorize.vec_perm_const instead of
24268 targetm.vectorize.vec_perm_const_ok. Check whether the indices
24269 fit in the vector mode before using a variable permute.
24270 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
24271 vec_perm_indices instead of an rtx.
24272 (expand_vec_perm): Replace with...
24273 (expand_vec_perm_const): ...this new function. Take the selector
24274 as a vec_perm_indices rather than an rtx. Also take the mode of
24275 the selector. Update call to shift_amt_for_vec_perm_mask.
24276 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
24277 Use vec_perm_indices::new_expanded_vector to expand the original
24278 selector into bytes. Check whether the indices fit in the vector
24279 mode before using a variable permute.
24280 (expand_vec_perm_var): Make global.
24281 (expand_mult_highpart): Use expand_vec_perm_const.
24282 * fold-const.c: Includes vec-perm-indices.h.
24283 * tree-ssa-forwprop.c: Likewise.
24284 * tree-vect-data-refs.c: Likewise.
24285 * tree-vect-generic.c: Likewise.
24286 * tree-vect-loop.c: Likewise.
24287 * tree-vect-slp.c: Likewise.
24288 * tree-vect-stmts.c: Likewise.
24289 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
24291 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
24292 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
24293 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
24294 (aarch64_vectorize_vec_perm_const): ...this new function.
24295 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24296 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24297 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
24298 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
24299 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24300 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24301 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
24303 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
24304 check for NEON modes.
24305 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
24306 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
24307 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
24308 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
24310 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
24311 the old VEC_PERM_CONST conditions.
24312 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
24313 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
24314 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
24315 (ia64_vectorize_vec_perm_const_ok): Merge into...
24316 (ia64_vectorize_vec_perm_const): ...this new function.
24317 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
24318 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
24319 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
24320 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
24321 * config/mips/mips.c (mips_expand_vec_perm_const)
24322 (mips_vectorize_vec_perm_const_ok): Merge into...
24323 (mips_vectorize_vec_perm_const): ...this new function.
24324 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
24325 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
24326 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
24327 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
24328 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
24329 (rs6000_expand_vec_perm_const): Delete.
24330 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
24332 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24333 (altivec_expand_vec_perm_const_le): Take each operand individually.
24334 Operate on constant selectors rather than rtxes.
24335 (altivec_expand_vec_perm_const): Likewise. Update call to
24336 altivec_expand_vec_perm_const_le.
24337 (rs6000_expand_vec_perm_const): Delete.
24338 (rs6000_vectorize_vec_perm_const_ok): Delete.
24339 (rs6000_vectorize_vec_perm_const): New function.
24340 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
24341 an element count and rtx array.
24342 (rs6000_expand_extract_even): Update call accordingly.
24343 (rs6000_expand_interleave): Likewise.
24344 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
24345 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
24346 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
24347 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
24348 (rs6000_expand_vec_perm_const): Delete.
24349 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24350 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24351 (altivec_expand_vec_perm_const_le): Take each operand individually.
24352 Operate on constant selectors rather than rtxes.
24353 (altivec_expand_vec_perm_const): Likewise. Update call to
24354 altivec_expand_vec_perm_const_le.
24355 (rs6000_expand_vec_perm_const): Delete.
24356 (rs6000_vectorize_vec_perm_const_ok): Delete.
24357 (rs6000_vectorize_vec_perm_const): New function. Remove stray
24358 reference to the SPE evmerge intructions.
24359 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
24360 an element count and rtx array.
24361 (rs6000_expand_extract_even): Update call accordingly.
24362 (rs6000_expand_interleave): Likewise.
24363 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
24364 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
24366 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24368 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24370 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
24371 vector mode and that that mode matches the mode of the data
24373 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
24374 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
24375 directly using expand_vec_perm_1 when forcing selectors into
24377 (expand_vec_perm_var): New function, split out from expand_vec_perm.
24379 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24381 * optabs-query.h (can_vec_perm_p): Delete.
24382 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
24383 * optabs-query.c (can_vec_perm_p): Split into...
24384 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
24385 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
24386 particular selector is valid.
24387 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24388 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24389 (vect_grouped_load_supported): Likewise.
24390 (vect_shift_permute_load_chain): Likewise.
24391 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
24392 (vect_transform_slp_perm_load): Likewise.
24393 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24394 (vectorizable_bswap): Likewise.
24395 (vect_gen_perm_mask_checked): Likewise.
24396 * fold-const.c (fold_ternary_loc): Likewise. Don't take
24397 implementations of variable permutation vectors into account
24398 when deciding which selector to use.
24399 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
24400 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
24401 with a false third argument.
24402 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
24403 to test whether the constant selector is valid and can_vec_perm_var_p
24404 to test whether a variable selector is valid.
24406 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24408 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
24409 * optabs-query.c (can_vec_perm_p): Likewise.
24410 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
24411 instead of vec_perm_indices.
24412 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
24413 (vect_gen_perm_mask_checked): Likewise,
24414 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
24415 (vect_gen_perm_mask_checked): Likewise,
24417 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24419 * optabs-query.h (qimode_for_vec_perm): Declare.
24420 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
24421 (qimode_for_vec_perm): ...this new function.
24422 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
24424 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24426 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
24427 does not have a conditional at the top.
24429 2018-01-02 Richard Biener <rguenther@suse.de>
24431 * ipa-inline.c (big_speedup_p): Fix expression.
24433 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
24436 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
24439 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
24443 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
24444 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
24445 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
24446 cond_taken_branch_cost 3->4.
24448 2018-01-01 Jakub Jelinek <jakub@redhat.com>
24450 PR tree-optimization/83581
24451 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
24452 TODO_cleanup_cfg if any changes have been made.
24454 PR middle-end/83608
24455 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
24456 convert_modes if target mode has the right side, but different mode
24459 PR middle-end/83609
24460 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
24461 last argument when extracting from CONCAT. If either from_real or
24462 from_imag is NULL, use expansion through memory. If result is not
24463 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
24464 the parts directly to inner mode, if even that fails, use expansion
24467 PR middle-end/83623
24468 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
24469 check for bswap in mode rather than HImode and use that in expand_unop
24472 Copyright (C) 2018 Free Software Foundation, Inc.
24474 Copying and distribution of this file, with or without modification,
24475 are permitted in any medium without royalty provided the copyright
24476 notice and this notice are preserved.