1 2018-08-29 Richard Biener <rguenther@suse.de>
3 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
4 virtual operands that are not default defs to honor region
6 (rpo_vn_valueize): Remove ineffective code here.
8 2018-08-29 Richard Biener <rguenther@suse.de>
10 PR tree-optimization/87132
11 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
12 when skipping defs reachable over backedges.
14 2018-08-29 Richard Biener <rguenther@suse.de>
16 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
17 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
18 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
19 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
20 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
21 (vn_reference_lookup_3): Remove use of const_parms.
22 (free_rpo_vn): Do not free const_parms.
23 (do_rpo_vn): Do not call init_const_parms.
24 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
25 SSA_NAME_POINTS_TO_READONLY_MEMORY.
26 (call_may_clobber_ref_p_1): Likewise.
28 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
31 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
33 (-ftree-scev-cprop): Document.
35 2018-08-29 Jan Hubicka <jh@suse.cz>
37 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
39 (sreal constructor): Update.
40 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
41 sreal:operator/): Update.
43 2018-08-29 Martin Liska <mliska@suse.cz>
45 * tree-switch-conversion.c (switch_conversion::expand):
46 Strenghten assumption about gswitch statements.
48 2018-08-29 Richard Biener <rguenther@suse.de>
50 PR tree-optimization/87117
51 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
52 re-value-number released SSA VDEFs.
54 2018-08-29 Richard Biener <rguenther@suse.de>
56 PR tree-optimization/87126
57 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
59 2018-08-28 Jim Wilson <jimw@sifive.com>
61 * config/riscv/pic.md: Rewrite.
62 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
64 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
65 (SOFTF, default_load, softload, softstore): New.
67 2018-08-28 Jeff Law <law@redhat.com>
69 * fold-const.c (fold_binary_loc): Remove recently added assert.
71 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
73 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
74 to OP parmeter of generated function.
76 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
78 PR tree-optimization/87009
79 * match.pd: Add boolean optimizations.
81 2018-08-28 Martin Sebor <msebor@redhat.com>
84 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
85 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
86 (pass_walloca::gate): Use it.
87 (alloca_call_type): Same.
88 (pass_walloca::execute): Same.
89 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
91 2018-08-28 David Malcolm <dmalcolm@redhat.com>
93 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
94 GCC_VERSION for usage of "__gcc_dump_printf__" format from
97 2018-08-28 Richard Biener <rguenther@suse.de>
99 PR tree-optimization/87124
100 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
101 constants before looking up avail.
103 2018-08-28 Jakub Jelinek <jakub@redhat.com>
106 * calls.c (maybe_warn_nonstring_arg): Punt early if
107 warn_stringop_overflow is zero. Don't call get_range_strlen
108 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
109 Swap comparison operands to have constants on rhs. Only use
110 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
113 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
115 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
116 use of tree_to_shwi. Remove duplicated test for the size being
117 a whole number of bytes.
119 2018-08-28 Richard Biener <rguenther@suse.de>
121 PR tree-optimization/87117
122 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
123 Handle removed stmt without LHS (GIMPLE_NOP).
125 2018-08-28 Richard Biener <rguenther@suse.de>
127 PR tree-optimization/87117
128 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
129 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
131 2018-08-28 Richard Biener <rguenther@suse.de>
133 PR tree-optimization/87117
134 * tree-ssa-pre.c (compute_avail): Do not make expressions
135 with predicated values available.
136 (get_expr_value_id): Assert we do not run into predicated value
139 2018-08-28 Richard Biener <rguenther@suse.de>
141 PR tree-optimization/87117
142 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
143 get virtual operands.
144 (get_expr_operands): Handle STRING_CST like other decls.
146 2018-08-28 Martin Liska <mliska@suse.cz>
148 * tree.h: Update documentation of fndecl_built_in_p
152 2018-08-27 Jeff Law <law@redhat.com>
153 PR tree-optimization/87110
154 * tree-ssa-dse.c (compute_trims): Handle non-constant
157 2018-08-27 Martin Sebor <msebor@redhat.com>
159 PR tree-optimization/86914
160 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
162 2018-08-27 Martin Sebor <msebor@redhat.com>
164 PR tree-optimization/87112
165 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
166 the type of the bound argument.
168 2018-08-27 Jeff Law <law@redhat.com>
170 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
171 type does not have a TYPE_SIZE_UNIT.
173 2018-08-27 Steve Ellcey <sellcey@cavium.com>
175 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
176 with include of backend.h.
178 2018-08-27 Richard Biener <rguenther@suse.de>
180 PR tree-optimization/86927
181 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
182 use const cond reduction code.
184 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
186 PR tree-optimization/85758
187 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
189 2018-08-27 David Malcolm <dmalcolm@redhat.com>
192 * diagnostic-show-locus.c (class layout_range): Update for
193 conversion of show_caret_p to a tri-state.
194 (layout_range::layout_range): Likewise.
195 (make_range): Likewise.
196 (layout::maybe_add_location_range): Likewise.
197 (layout::should_print_annotation_line_p): Don't show annotation
198 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
199 (layout::get_state_at_point): Update for conversion of
200 show_caret_p to a tri-state. Bail out early for
201 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
202 underlining or source colorization.
203 (gcc_rich_location::add_location_if_nearby): Update for conversion
204 of show_caret_p to a tri-state.
205 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
206 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
208 (selftest::test_one_liner_labels): Likewise.
209 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
210 conversion of show_caret_p to a tri-state.
211 * pretty-print.c (text_info::set_location): Likewise.
212 * pretty-print.h (text_info::set_location): Likewise.
213 * substring-locations.c (format_warning_n_va): Likewise.
214 * tree-diagnostic.c (default_tree_printer): Likewise.
215 * tree-pretty-print.c (newline_and_indent): Likewise.
217 2018-08-27 David Malcolm <dmalcolm@redhat.com>
220 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
221 line above for line-insertion fix-it hints.
222 (selftest::test_fixit_insert_containing_newline): Update the
223 expected results, and add a test with line-numbering enabled.
225 2018-08-27 Martin Liska <mliska@suse.cz>
228 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
229 params with DECL_HAS_VALUE_EXPR_P.
231 2018-08-27 Martin Liska <mliska@suse.cz>
233 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
234 selected expansion strategy.
236 2018-08-27 Martin Liska <mliska@suse.cz>
238 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
239 * builtins.c (is_builtin_fn): Likewise.
240 * attribs.c (diag_attr_exclusions): Use new function
241 fndecl_built_in_p and remove check for FUNCTION_DECL if
243 (builtin_mathfn_code): Likewise.
244 (fold_builtin_expect): Likewise.
245 (fold_call_expr): Likewise.
246 (fold_builtin_call_array): Likewise.
247 (fold_call_stmt): Likewise.
248 (set_builtin_user_assembler_name): Likewise.
249 (is_simple_builtin): Likewise.
250 * calls.c (gimple_alloca_call_p): Likewise.
251 (maybe_warn_nonstring_arg): Likewise.
252 * cfgexpand.c (expand_call_stmt): Likewise.
253 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
254 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
255 (cgraph_node::verify_node): Likewise.
256 * cgraphclones.c (build_function_decl_skip_args): Likewise.
257 (cgraph_node::create_clone): Likewise.
258 * config/arm/arm.c (arm_insert_attributes): Likewise.
259 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
260 * dse.c (scan_insn): Likewise.
261 * expr.c (expand_expr_real_1): Likewise.
262 * fold-const.c (operand_equal_p): Likewise.
263 (fold_binary_loc): Likewise.
264 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
265 * gimple-low.c (lower_stmt): Likewise.
266 * gimple-pretty-print.c (dump_gimple_call): Likewise.
267 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
268 * gimple.c (gimple_build_call_from_tree): Likewise.
269 (gimple_call_builtin_p): Likewise.
270 (gimple_call_combined_fn): Likewise.
271 * gimplify.c (gimplify_call_expr): Likewise.
272 (gimple_boolify): Likewise.
273 (gimplify_modify_expr): Likewise.
274 (gimplify_addr_expr): Likewise.
275 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
276 * ipa-cp.c (determine_versionability): Likewise.
277 * ipa-fnsummary.c (compute_fn_summary): Likewise.
278 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
279 * ipa-split.c (visit_bb): Likewise.
280 (split_function): Likewise.
281 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
282 * lto-cgraph.c (input_node): Likewise.
283 * lto-streamer-out.c (write_symbol): Likewise.
284 * omp-low.c (setjmp_or_longjmp_p): Likewise.
285 (lower_omp_1): Likewise.
286 * predict.c (strip_predict_hints): Likewise.
287 * print-tree.c (print_node): Likewise.
288 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
289 * trans-mem.c (is_tm_irrevocable): Likewise.
290 (is_tm_load): Likewise.
291 (is_tm_simple_load): Likewise.
292 (is_tm_store): Likewise.
293 (is_tm_simple_store): Likewise.
294 (is_tm_abort): Likewise.
295 (tm_region_init_1): Likewise.
296 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
297 * tree-cfg.c (verify_gimple_call): Likewise.
298 (move_stmt_r): Likewise.
299 (stmt_can_terminate_bb_p): Likewise.
300 * tree-eh.c (lower_eh_constructs_2): Likewise.
301 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
302 * tree-inline.c (remap_gimple_stmt): Likewise.
304 (estimate_num_insns): Likewise.
305 (fold_marked_statements): Likewise.
306 * tree-sra.c (scan_function): Likewise.
307 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
308 (optimize_stack_restore): Likewise.
309 (pass_fold_builtins::execute): Likewise.
310 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
311 (mark_all_reaching_defs_necessary_1): Likewise.
312 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
313 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
314 (pass_forwprop::execute): Likewise.
315 * tree-ssa-loop-im.c (stmt_cost): Likewise.
316 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
317 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
318 * tree-ssa-strlen.c (get_string_length): Likewise.
319 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
320 (find_func_aliases_for_call): Likewise.
321 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
322 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
323 * tree-tailcall.c (find_tail_calls): Likewise.
324 * tree.c (need_assembler_name_p): Likewise.
325 (free_lang_data_in_decl): Likewise.
326 (get_call_combined_fn): Likewise.
327 * ubsan.c (is_ubsan_builtin_p): Likewise.
328 * varasm.c (incorporeal_function_p): Likewise.
329 * tree.h (DECL_BUILT_IN): Remove and replace with
331 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
332 (fndecl_built_in_p): New.
334 2018-08-27 Martin Liska <mliska@suse.cz>
336 PR tree-optimization/86847
337 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
338 Dump also subtree probability.
339 (switch_decision_tree::do_jump_if_equal): New function.
340 (switch_decision_tree::emit_case_nodes): Handle special
341 situations in balanced tree that can be emitted much simpler.
342 Fix calculation of probabilities that happen in tree expansion.
343 * tree-switch-conversion.h (struct cluster): Add
345 (struct simple_cluster): Likewise.
346 (struct case_tree_node): Add new function has_child.
347 (do_jump_if_equal): New.
349 2018-08-27 Martin Liska <mliska@suse.cz>
351 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
352 Add new argument to bit_test_cluster constructor.
353 (bit_test_cluster::emit): Set bits really number of values
355 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
356 probability argument.
357 * tree-switch-conversion.h (struct bit_test_cluster):
358 Add m_handles_entire_switch.
360 2018-08-27 Martin Liska <mliska@suse.cz>
362 PR tree-optimization/86702
363 * tree-switch-conversion.c (jump_table_cluster::emit):
364 Make probabilities even for values in jump table
365 according to number of cases handled.
366 (switch_decision_tree::compute_cases_per_edge): Pass
367 argument to reset_out_edges_aux function.
368 (switch_decision_tree::analyze_switch_statement): Likewise.
369 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
372 2018-08-27 Martin Liska <mliska@suse.cz>
374 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
375 cfun argument explicitly.
376 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
377 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
378 function gimple_switch_default_bb.
379 (convert_switch_statements):
381 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
382 * stmt.c (label_to_block_fn): Use label_to_block and pass
383 cfun argument explicitly and use gimple_switch_label_bb.
384 (expand_case): Likewise.
385 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
386 cfun argument explicitly. Likewise.
387 (make_edges_bb): Likewise.
388 (make_cond_expr_edges): Likewise.
389 (get_cases_for_edge): Likewise.
390 (make_gimple_switch_edges): Likewise.
391 (label_to_block_fn): Likewise.
392 (label_to_block): Likewise.
393 (make_goto_expr_edges): Likewise.
394 (make_gimple_asm_edges): Likewise.
395 (main_block_label): Likewise.
396 (group_case_labels_stmt): Likewise.
397 (find_taken_edge_computed_goto): Likewise.
398 (find_taken_edge_switch_expr): Likewise.
399 (gimple_verify_flow_info): Likewise.
400 (gimple_redirect_edge_and_branch): Likewise.
401 (gimple_switch_label_bb): New function.
402 (gimple_switch_default_bb): Likewise.
403 (gimple_switch_edge): Likewise.
404 (gimple_switch_default_edge): Likewise.
405 * tree-cfg.h (label_to_block_fn): Remove and replace ...
406 (label_to_block): ... with this.
407 (gimple_switch_label_bb): New.
408 (gimple_switch_default_bb): Likewise.
409 (gimple_switch_edge): Likewise.
410 (gimple_switch_default_edge): Likewise.
411 * tree-cfgcleanup.c (convert_single_case_switch): Use
412 new gimple functions and pass new argument to label_to_block.
413 (cleanup_control_flow_bb):
414 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
415 cfun argument explicitly.
416 (make_eh_edges): Likewise.
417 (redirect_eh_dispatch_edge): Likewise.
418 (lower_resx): Likewise.
419 (lower_eh_dispatch): Likewise.
420 (maybe_remove_unreachable_handlers): Likewise.
421 (unsplit_eh): Likewise.
422 (cleanup_empty_eh): Likewise.
423 (verify_eh_edges): Likewise.
424 (verify_eh_dispatch_edge): Likewise.
425 * tree-ssa-dom.c (record_edge_info): Likewise.
426 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
427 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
428 (thread_through_normal_block): Likewise.
429 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
430 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
431 * tree-switch-conversion.c (switch_conversion::collect): Use new
433 (switch_conversion::check_final_bb): Likewise.
434 (switch_conversion::gather_default_values): Pass new argument
436 (switch_conversion::build_constructors): Likewise.
437 (switch_decision_tree::compute_cases_per_edge): Use new
438 gimple_switch_edge function.
439 (switch_decision_tree::analyze_switch_statement): Pass new argument
441 (switch_decision_tree::try_switch_expansion): Use
442 gimple_switch_default_edge.
443 * tree-vrp.c (find_switch_asserts): Pass new argument
445 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
446 (vr_values::simplify_switch_using_ranges): Likewise.
448 2018-08-27 Richard Biener <rguenther@suse.de>
450 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
451 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
453 * tree-ssa-sccvn.h (struct vn_pval): New structure.
454 (struct vn_nary_op_s): Add unwind_to member. Add
455 predicated_values flag and put result into a union together
456 with a linked list of vn_pval.
457 (struct vn_ssa_aux): Add name member to make maintaining
458 a map of SSA name to vn_ssa_aux possible. Remove no longer
459 needed info, dfsnum, low, visited, on_sccstack, use_processed
460 and range_info_anti_range_p members.
461 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
462 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
464 (vn_valueize): New global.
465 (vn_context_bb): Likewise.
466 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
467 VN_INFO_PTR_INFO): Remove.
468 * tree-ssa-sccvn.c: ... (rewrite)
469 (pass_fre::execute): For -O2+ initialize loops and run
470 RPO VN in optimistic mode (iterating). For -O1 and -Og
471 run RPO VN in non-optimistic mode.
472 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
473 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
474 * doc/invoke.texi (sccvn-max-scc-size): Remove.
475 (rpo-vn-max-loop-depth): Document.
476 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
477 when valuezing the VUSE signals we walked out of the region.
478 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
479 (phi_translate): Set VN context block to use for availability
481 (compute_avail): Likewise.
482 (pre_valueize): New function.
483 (pass_pre::execute): Adjust to the RPO VN API.
485 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
486 (propagate_constants_for_unrolling): Remove.
487 (tree_unroll_loops_completely): Perform value-numbering
488 on the unrolled bodies loop parent.
490 2018-08-27 Richard Biener <rguenther@suse.de>
492 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
493 for partial antic compute.
495 2018-08-27 Jakub Jelinek <jakub@redhat.com>
497 PR rtl-optimization/87065
498 * combine.c (simplify_if_then_else): Formatting fix.
499 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
501 (known_cond): Don't return const_true_rtx for vector modes. Use
502 CONST0_RTX instead of const0_rtx. Formatting fixes.
504 2018-08-27 Martin Liska <mliska@suse.cz>
506 PR gcov-profile/87069
507 * gcov.c (process_file): Record files already processed
508 and warn about a file being processed multiple times.
510 2018-08-27 Martin Liska <mliska@suse.cz>
513 * config/aarch64/aarch64.c (aarch64_override_options_internal):
514 Set default values for x_aarch64_*_string strings.
515 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
516 prefix. For -mabi do not print '=ABI' in help and use
517 <option_value> format for -msve-vector-bits and -moverride
520 2018-08-26 Jeff Law <law@redhat.com>
522 * config/mips/frame-header-opt.c: Include "backend.h" rather than
525 2018-08-26 Marek Polacek <polacek@redhat.com>
527 PR c++/87029, Implement -Wredundant-move.
528 * doc/invoke.texi: Document -Wredundant-move.
530 2018-08-25 Martin Sebor <msebor@redhat.com>
532 PR tree-optimization/87059
533 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
534 to the same type as the other.
535 * fold-const.c (fold_binary_loc): Assert expectation.
537 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
539 * config/darwin.c (machopic_legitimize_pic_address): Clean up
540 extraneous parentheses, dead code section and formatting.
542 2018-08-24 David Malcolm <dmalcolm@redhat.com>
545 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
546 wide enough for jumps in the line-numbering to be visible.
547 (layout::print_gap_in_line_numbering): New member function.
548 (layout::calculate_line_spans): When using line numbering, merge
549 line spans that are only 1 line apart.
550 (diagnostic_show_locus): When printing line numbers, show gaps in
551 line numbering directly, rather than printing headers.
552 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
553 line-numbering with multiple line spans.
554 (selftest::test_fixit_insert_containing_newline_2): Add test of
555 line-numbering, in which the spans are close enough to be merged.
557 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
559 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
560 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
561 * tree-vrp.c (range_is_nonnull): Remove.
562 (range_includes_zero_p): Accept value_range instead of min/max.
563 (extract_range_from_binary_expr_1): Do not early bail on
565 Use range_includes_zero_p instead of range_is_nonnull.
566 (extract_range_from_unary_expr): Use range_includes_zero_p instead
568 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
569 special case VR_ANTI_RANGE.
570 (vrp_finalize): Same.
571 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
573 (range_is_nonnull): Remove.
574 * vr-values.c (vrp_stmt_computes_nonzero): Use
575 range_includes_zero_p instead of range_is_nonnull.
576 (extract_range_basic): Pass value_range to range_includes_zero_p
577 instead of range_is_nonnull.
579 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
581 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
582 * emit-rtl.h (rtl_data): Remove return_bnd.
583 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
584 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
585 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
586 (POINTER_BOUNDS_MODE): Remove definition.
587 (make_pointer_bounds_mode): Remove.
588 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
589 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
590 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
591 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
592 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
593 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
594 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
596 * config/i386/i386-modes.def (BND32, BND64): Remove.
597 * config/i386/i386.c (dbx_register_map): Remove bound registers.
598 (dbx64_register_map): Ditto.
599 (svr4_dbx_register_map): Ditto.
600 (indirect_thunk_bnd_needed): Remove.
601 (indirect_thunks_bnd_used): Ditto.
602 (indirect_return_bnd_needed): Ditto.
603 (indirect_return_via_cx_bnd): Ditto.
604 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
605 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
606 (output_indirect_thunk): Ditto. Remove need_prefix argument.
607 (output_indirect_thunk_function): Remove handling of
608 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
609 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
610 (ix86_save_reg): Remove handling of crtl->return_bnd.
611 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
612 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
613 and UNSPEC_BNDLX_ADDR.
614 (ix86_output_indirect_branch_via_reg): Remove handling of
615 indirect_thunk_prefix_bnd.
616 (ix86_output_indirect_branch_via_push): Ditto.
617 (ix86_output_function_return): Ditto.
618 (ix86_output_indirect_function_return): Ditto.
619 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
620 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
621 (CALL_USED_REGISTERS): Ditto.
622 (REG_ALLOC_ORDER): Update for removal of bound registers.
623 (HI_REGISTER_NAMES): Ditto.
624 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
625 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
626 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
627 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
628 (FIRST_PSEUDO_REG): Update.
629 (BND): Remove mode iterator.
630 * config/i386/predicates.md (bnd_mem_operator): Remove.
632 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
634 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
637 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
639 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
640 the case in which the permute needs only a single element and
641 repeats for every vector of the result. Extend that case to
642 handle variable-length vectors.
643 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
645 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
648 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
649 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
651 2018-08-24 Richard Biener <rguenther@suse.de>
653 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
654 bb_flags_allocated members.
655 (auto_flag): New RAII class for allocating flags.
656 (auto_edge_flag): New RAII class for allocating edge flags.
657 (auto_bb_flag): New RAII class for allocating bb flags.
658 * cfgloop.c (verify_loop_structure): Allocate temporary edge
660 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
661 in favor of temporarily allocated BB flag.
662 * hsa-brig.c: Re-order includes.
663 * hsa-dump.c: Likewise.
664 * hsa-regalloc.c: Likewise.
665 * print-rtl.c: Likewise.
666 * profile-count.c: Likewise.
668 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
671 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
674 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
677 * wide-int-range.cc (wide_int_range_div): Do not ignore result
678 from wide_int_range_multiplicative_op.
680 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
682 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
685 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
687 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
690 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
692 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
693 full GENERIC expression used for replacement.
695 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
697 * tree-vrp.c (abs_extent_range): Remove.
698 (extract_range_into_wide_ints): Pass wide ints by reference.
699 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
700 Pass wide ints by reference in all calls to
701 extract_range_into_wide_ints.
702 * wide-int-range.cc (wide_int_range_div): New.
703 * wide-int-range.h (wide_int_range_div): New.
704 (wide_int_range_includes_zero_p): New.
705 (wide_int_range_zero_p): New.
707 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
709 * config/aarch64/aarch64.md (arches): New enum.
710 (arch): New enum attr.
711 (arch_enabled): New attr.
712 (enabled): Now uses arch_enabled only.
713 (simd, sve, fp16): Removed attribute.
714 (fp): Attr now defined in terms of 'arch'.
715 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
716 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
717 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
718 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
719 attributes into 'arch'.
720 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
721 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
722 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
723 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
724 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
725 'simd' attribute into 'arch'.
726 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
727 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
728 Convert use of 'fp' attribute to 'arch'.
729 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
730 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
732 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
733 (different modes) Merge 'fp' and 'simd' into 'arch'.
734 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
737 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
739 PR rtl-optimization/87026
740 * expmed.c (canonicalize_comparison): If we can no longer create
741 pseudoregisters, don't.
743 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
746 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
748 * config/arm/arm.c (speculation_barrier_libfunc): New static
750 (arm_init_libfuncs): Initialize it.
751 (arm_emit_speculation_barrier): New function.
752 * config/arm/arm.md (speculation_barrier): Call
753 arm_emit_speculation_barrier for architectures that do not have
755 (speculation_barrier_insn): Only match on Armv7 or later.
757 2018-08-23 Richard Biener <rguenther@suse.de>
760 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
763 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
765 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
766 of single-vector TBLs.
767 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
770 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
773 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
774 aarch64_evpc_tbl guard.
776 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
778 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
781 2018-08-22 Martin Sebor <msebor@redhat.com>
784 * tree-pretty-print.c (pretty_print_string): Add argument.
785 (dump_generic_node): Call to pretty_print_string with string size.
787 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
789 PR rtl-optimization/86771
790 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
791 of two SETs into those two SETs, one to be placed at i2, if that SETs
792 destination is modified between i2 and i3.
794 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
796 PR tree-optimization/86725
797 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
799 (vect_analyze_scalar_cycles_1): Check it.
801 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
803 PR tree-optimization/86725
804 * tree-vect-loop.c (vect_is_simple_reduction): When treating
805 an outer loop phi as a double reduction, make sure that the
806 single user of the phi result is an inner loop phi.
808 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
810 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
811 grouped stores with gaps to a strided group.
813 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
815 * tree-vect-stmts.c (get_group_load_store_type)
816 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
817 first statement in a group.
819 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
821 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
822 the sequence used in gcc/gcc.c.
824 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
827 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
830 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
832 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
833 Darwin10-specific unwinder-shim.
834 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
835 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
836 New to cater for Darwin10 Rosetta.
838 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
840 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
841 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
843 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
848 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
849 (dwarf2out_switch_text_section): Generate a local label for the
850 second function sub-section and apply it as the second FDE start
852 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
853 second sub-section start.
855 2018-08-22 Richard Biener <rguenther@suse.de>
857 PR tree-optimization/86988
858 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
860 2018-08-22 Richard Biener <rguenther@suse.de>
862 PR tree-optimization/86945
863 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
865 2018-08-22 Alexandre Oliva <oliva@adacore.com>
867 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
868 a comment about how uses of r2 for .sdata2 come about.
870 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
872 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
874 2018-08-21 Marek Polacek <polacek@redhat.com>
876 PR c++/86981, Implement -Wpessimizing-move.
877 * doc/invoke.texi: Document -Wpessimizing-move.
879 2018-08-21 Jan Hubicka <jh@suse.cz>
881 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
882 * tree.h (is_redundant_typedef): Remove.
883 * dwarf2out.c (is_redundant_typedef): Turn into static function.
885 2018-08-21 Jan Hubicka <jh@suse.cz>
887 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
890 2018-08-21 Tamar Christina <tamar.christina@arm.com>
892 * expmed.c (extract_low_bits): Reject invalid subregs early.
894 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
897 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
900 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
902 * config/vxworks.h: Guard vxworks_asm_out_constructor and
903 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
904 * config/vxworks.c: Likewise.
906 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
908 * config/vxworks.c: Set targetm.have_ctors_dtors
909 if HAVE_INITFINI_ARRAY_SUPPORT.
910 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
911 if HAVE_INITFINI_ARRAY_SUPPORT.
913 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
915 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
916 default search path for VxWorks < 7.
918 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
920 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
921 (get_format_string): Refer to c_getstr.
923 2018-08-21 Tom de Vries <tdevries@suse.de>
925 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
926 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
927 (debuginfo_early_stop): Declare.
928 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
929 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
930 (debuginfo_early_stop): New function.
931 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
932 and debuginfo_early_stop.
933 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
934 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
935 (general_init): Call debuginfo_early_init.
936 (finalize): Call debuginfo_fini.
937 (do_compile): Call debuginfo_init.
938 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
940 (@item -fdump-debug, @item -fdump-earlydebug): Add.
942 2018-08-21 Tom de Vries <tdevries@suse.de>
944 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
945 flag_dump_noaddr and flag_dump_unnumbered.
947 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
949 * wide-int-range.cc (wide_int_range_abs): New.
950 (wide_int_range_order_set): Rename from wide_int_range_min_max.
951 * wide-int-range.h (wide_int_range_abs): New.
952 (wide_int_range_min_max): New.
953 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
954 case to call wide_int_range_abs.
955 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
956 (extract_range_from_abs_expr): Delete.
958 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
961 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
962 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
965 2018-08-20 Nathan Sidwell <nathan@acm.org>
966 Jeff Law <law@redhat.com>
968 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
969 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
971 2018-08-20 David Malcolm <dmalcolm@redhat.com>
974 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
975 (decl_attributes): Likewise.
976 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
978 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
979 * diagnostic-core.h (class auto_diagnostic_group): New class.
980 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
981 (diagnostic_report_diagnostic): Handle the first diagnostics within
983 (emit_diagnostic): Add auto_diagnostic_group instance.
985 (inform_n): Likewise.
987 (warning_at): Likewise.
988 (warning_n): Likewise.
990 (permerror): Likewise.
993 (error_at): Likewise.
995 (fatal_error): Likewise.
996 (internal_error): Likewise.
997 (internal_error_no_backtrace): Likewise.
998 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
999 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
1000 * diagnostic.h (struct diagnostic_context): Add fields
1001 "diagnostic_group_nesting_depth",
1002 "diagnostic_group_emission_count", "begin_group_cb",
1004 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
1005 Add auto_diagnostic_group instance(s).
1006 (find_explicit_erroneous_behavior): Likewise.
1007 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
1008 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
1009 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
1010 (gimplify_va_arg_expr): Likewise.
1011 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
1012 (HSA_SORRY_AT): Likewise.
1013 * ipa-devirt.c (compare_virtual_tables): Likewise.
1014 (warn_odr): Likewise.
1015 * multiple_target.c (expand_target_clones): Likewise.
1016 * opts-common.c (cmdline_handle_error): Likewise.
1017 * reginfo.c (globalize_reg): Likewise.
1018 * substring-locations.c (format_warning_n_va): Likewise.
1019 * tree-inline.c (expand_call_inline): Likewise.
1020 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
1021 * tree-ssa-loop-niter.c
1022 (do_warn_aggressive_loop_optimizations): Likewise.
1023 * tree-ssa-uninit.c (warn_uninit): Likewise.
1024 * tree.c (warn_deprecated_use): Likewise.
1026 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
1029 * config/i386/i386.md (eh_return): Always update EH return
1030 address in word_mode.
1032 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
1034 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
1035 TARGET_SPLIT_COMPLEX_ARG is defined.
1037 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
1039 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
1041 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
1044 * expr.c (expand_assignment): Assert that bitpos is positive.
1045 (store_field): Likewise
1046 (expand_expr_real_1): Make sure that bitpos is positive.
1047 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
1050 2018-08-20 Nathan Sidwell <nathan@acm.org>
1052 * Makefile.in (CPP_ID_DATA_H): Delete.
1053 (CPP_INTERNAL_H): Don't add it.
1054 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
1055 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
1057 2018-08-20 Richard Biener <rguenther@suse.de>
1059 PR tree-optimization/78655
1060 * tree-vrp.c (extract_range_from_binary_expr_1): Make
1061 pointer + offset nonnull if either operand is nonnull work.
1063 2018-08-20 Tom de Vries <tdevries@suse.de>
1065 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
1066 unless the referenced die describes the added property using
1067 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
1068 Otherwise, add a DW_AT_location to the referenced die.
1070 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
1073 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
1074 register_operand when calling ix86_set_reg_reg_cost.
1075 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
1076 Set *total to 0 for operands that satisfy x86_64_immediate_operand
1077 predicate and to 1 otherwise.
1079 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
1081 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
1082 emit a diagnostic that it is not supported and reset the option.
1083 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
1084 supported and consume the option. (ASM_FINAL_SPEC): New.
1086 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
1088 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
1091 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
1093 C-SKY port: Documentation
1095 * doc/extend.texi (C-SKY Function Attributes): New section.
1096 * doc/invoke.texi (Option Summary): Add C-SKY options.
1097 (C-SKY Options): New section.
1098 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
1100 2018-08-17 Jojo <jijie_rong@c-sky.com>
1101 Huibin Wang <huibin_wang@c-sky.com>
1102 Sandra Loosemore <sandra@codesourcery.com>
1103 Chung-Lin Tang <cltang@codesourcery.com>
1105 C-SKY port: Backend implementation
1107 * config/csky/*: New.
1108 * common/config/csky/*: New.
1110 2018-08-17 Jojo <jijie_rong@c-sky.com>
1111 Huibin Wang <huibin_wang@c-sky.com>
1112 Sandra Loosemore <sandra@codesourcery.com>
1113 Chung-Lin Tang <cltang@codesourcery.com>
1114 Andrew Jenner <andrew@codesourcery.com>
1116 C-SKY port: Configury
1118 * config.gcc (csky-*-*): New.
1119 * configure.ac: Add csky to targets for dwarf2 debug_line support.
1120 * configure: Regenerated.
1122 2018-08-17 David Malcolm <dmalcolm@redhat.com>
1124 * dump-context.h: Include "dumpfile.h".
1125 (dump_context::dump_printf_va): Convert final param from va_list
1126 to va_list *. Convert from ATTRIBUTE_PRINTF to
1127 ATTRIBUTE_GCC_DUMP_PRINTF.
1128 (dump_context::dump_printf_loc_va): Likewise.
1129 * dumpfile.c: Include "stringpool.h".
1130 (make_item_for_dump_printf_va): Delete.
1131 (make_item_for_dump_printf): Delete.
1132 (class dump_pretty_printer): New class.
1133 (dump_pretty_printer::dump_pretty_printer): New ctor.
1134 (dump_pretty_printer::emit_items): New member function.
1135 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
1137 (dump_pretty_printer::emit_item): New member function.
1138 (dump_pretty_printer::stash_item): New member function.
1139 (dump_pretty_printer::format_decoder_cb): New member function.
1140 (dump_pretty_printer::decode_format): New member function.
1141 (dump_context::dump_printf_va): Reimplement in terms of
1142 dump_pretty_printer.
1143 (dump_context::dump_printf_loc_va): Convert final param from va_list
1145 (dump_context::begin_scope): Reimplement call to
1146 make_item_for_dump_printf.
1147 (dump_printf): Update for change to dump_printf_va.
1148 (dump_printf_loc): Likewise.
1149 (selftest::test_capture_of_dump_calls): Convert "stmt" from
1150 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
1151 with %T, %E, and %G.
1152 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
1153 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
1154 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
1155 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
1156 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
1157 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
1158 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
1159 within a dump_printf_loc call to "%wu".
1160 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
1161 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
1162 missing space after "=".
1163 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
1164 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
1165 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
1166 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
1167 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
1168 duplicate "vectorized" from message.
1170 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1172 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
1173 polyNxK_t element's TYPE_STRING_FLAG.
1175 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
1177 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
1178 (they were unnamed before). Fix comments.
1180 2018-08-17 Nathan Sidwell <nathan@acm.org>
1182 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
1184 2018-08-17 Richard Biener <rguenther@suse.de>
1186 PR tree-optimization/86841
1187 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
1189 2018-08-17 Martin Liska <mliska@suse.cz>
1191 * common.opt: Remove Warn, Init and Report for options with
1192 Ignore/Deprecated flag. Warning is done automatically for
1194 * config/i386/i386.opt: Likewise.
1195 * config/ia64/ia64.opt: Likewise.
1196 * config/rs6000/rs6000.opt: Likewise.
1197 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
1198 Remove usage of flag_check_pointer_bounds.
1199 * lto-wrapper.c (merge_and_complain): Do not handle
1200 OPT_fcheck_pointer_bounds.
1201 (append_compiler_options): Likewise.
1202 * opt-functions.awk: Do not handle Deprecated.
1203 * optc-gen.awk: Check that Var, Report and Init are not
1204 used for an option with Ignore/Deprecated flag.
1205 * opts-common.c (decode_cmdline_option): Do not report
1207 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
1209 * opts.h (struct cl_option): Remove cl_deprecated flag.
1210 (CL_ERR_DEPRECATED): Remove error enum value.
1212 2018-08-17 Richard Biener <rguenther@suse.de>
1215 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
1216 across a va-arg-pack using call adjust its return value accordingly.
1218 2018-08-16 Martin Sebor <msebor@redhat.com>
1220 PR tree-optimization/86853
1221 * gimple-ssa-sprintf.c (struct format_result): Rename member.
1222 (struct fmtresult): Add member and initialize it in ctors.
1223 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
1224 (format_string): Handle %S the same as %ls. Set MAYFAIL.
1225 (format_directive): Set POSUNDER4K when MAYFAIL is set.
1226 (parse_directive): Handle %C same as %c.
1227 (sprintf_dom_walker::compute_format_length): Adjust.
1228 (is_call_safe): Adjust.
1230 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1232 * builtins.c (c_strlen): Add new parameter eltsize. Use it
1233 for determining how to count the elements.
1234 * builtins.h (c_strlen): Adjust prototype.
1235 * expr.c (string_constant): Add new parameter mem_size.
1236 Set *mem_size appropriately.
1237 * expr.h (string_constant): Adjust protoype.
1238 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
1239 * gimple-fold.h (get_range_strlen): Adjust prototype.
1240 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
1241 (format_string): Call get_string_length with eltsize.
1243 2018-08-16 David Malcolm <dmalcolm@redhat.com>
1245 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
1246 to emit the span, rather than setting it as the prefix.
1248 2018-08-16 David Malcolm <dmalcolm@redhat.com>
1250 * diagnostic-show-locus.c (layout::start_annotation_line): Add
1251 "margin_char" parameter, defaulting to space. Use it in place
1252 of pp_space for the initial part of the margin.
1253 (layout::print_leading_fixits): Use '+' when filling the margin
1254 of line-insertion fix-it hints.
1256 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1258 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
1261 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1263 * config/rs6000/altivec.md: Don't set length attribute to the default
1265 * config/rs6000/darwin.md: Ditto.
1266 * config/rs6000/dfp.md: Ditto.
1267 * config/rs6000/htm.md: Ditto.
1268 * config/rs6000/rs6000.md: Ditto.
1269 * config/rs6000/sync.md: Ditto.
1270 * config/rs6000/vsx.md: Ditto.
1272 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1274 * config/rs6000/altivec.md: Don't set length attribute to the default
1275 value, for branch instructions.
1276 * config/rs6000/darwin.md: Ditto.
1277 * config/rs6000/rs6000.md: Ditto.
1279 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1281 * config/rs6000/rs6000.md (length): Always define as const_int 4.
1282 (unnamed conditional branch define_insn): Set length to 4 or 8
1283 depending on offset.
1284 (<bd>_<mode>): Similar, for alternative 0.
1285 (<bd>tf_<mode>): Ditto.
1287 2018-08-16 Tamar Christina <tamar.christina@arm.com>
1289 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
1291 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
1293 * doc/rtl.texi: Replace old RTX class names with new names.
1296 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
1298 * expmed.h (canonicalize_comparison): New declaration.
1299 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
1300 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
1301 * optabs.c (prepare_cmp_insn): Likewise.
1302 * rtl.h (unsigned_condition_p): New function which checks if a
1303 comparison operator is unsigned.
1305 2018-08-16 Nathan Sidwell <nathan@acm.org>
1307 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
1308 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
1310 2018-08-16 Tamar Christina <tamar.christina@arm.com>
1313 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
1314 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
1315 (mov<mov>): ..this and enable unconditionally.
1317 2018-08-16 Tamar Christina <tamar.christina@arm.com>
1319 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
1321 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
1323 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
1324 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
1325 "Common" with "Target".
1327 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
1329 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
1330 * doc/invoke.texi (mmitigate-rop): Remove.
1331 * config/i386/i386.c: Do not include "regrename.h".
1332 (ix86_rop_should_change_byte_p, reg_encoded_number)
1333 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
1335 (ix86_reorg): Remove call to ix86_mitigate_rop.
1336 * config/i386/i386.md (attr "modrm_class"): Remove.
1337 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
1338 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
1339 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
1341 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
1343 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
1344 allow folding of mergeh() and mergel() for the float and double types.
1345 (fold_mergehl_helper): Rework to handle building a permute tree
1348 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
1350 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
1353 2018-08-15 David Malcolm <dmalcolm@redhat.com>
1355 * common.opt (fdiagnostics-show-labels): New option.
1356 * diagnostic-show-locus.c (class layout_range): Add field
1358 (class layout): Add field "m_show_labels_p".
1359 (layout_range::layout_range): Add param "label" and use it to
1361 (make_range): Pass in NULL for new "label" param of layout_range's
1363 (layout::layout): Initialize m_show_labels_p.
1364 (layout::maybe_add_location_range): Pass in loc_range->m_label
1365 when constructing layout_range instances.
1366 (struct line_label): New struct.
1367 (layout::print_any_labels): New member function.
1368 (layout::print_line): Call it if label-printing is enabled.
1369 (selftest::test_one_liner_labels): New test.
1370 (selftest::test_diagnostic_show_locus_one_liner): Call it.
1371 * diagnostic.c (diagnostic_initialize): Initialize
1372 context->show_labels_p.
1373 * diagnostic.h (struct diagnostic_context): Add field
1375 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
1376 -fno-diagnostics-show-labels.
1377 * dwarf2out.c (gen_producer_string): Add
1378 OPT_fdiagnostics_show_labels to the ignored options.
1379 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
1381 (gcc_rich_location::maybe_add_expr): Likewise.
1382 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
1383 label" param, defaulting to NULL.
1384 (gcc_rich_location::add_expr): Add "label" param.
1385 (gcc_rich_location::maybe_add_expr): Likewise.
1386 (class text_range_label): New class.
1387 (class range_label_for_type_mismatch): New class.
1388 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
1389 of format_warning_va.
1390 (fmtwarn_n): Likewise for new params of format_warning_n_va.
1391 * lto-wrapper.c (merge_and_complain): Add
1392 OPT_fdiagnostics_show_labels to the "pick one setting" options.
1393 (append_compiler_options): Likewise to the dropped options.
1394 (append_diag_options): Likewise to the passed-on options.
1395 * opts.c (common_handle_option): Handle the new option.
1396 * selftest-diagnostic.c
1397 (test_diagnostic_context::test_diagnostic_context): Enable
1399 * substring-locations.c: Include "gcc-rich-location.h".
1400 (format_warning_n_va): Add "fmt_label" and "param_label" params
1401 and use them as appropriate.
1402 (format_warning_va): Add "fmt_label" and "param_label" params,
1403 passing them on to format_warning_n_va.
1404 (format_warning_at_substring): Likewise.
1405 (format_warning_at_substring_n): Likewise.
1406 * substring-locations.h (format_warning_va): Add "fmt_label" and
1407 "param_label" params.
1408 (format_warning_n_va): Likewise.
1409 (format_warning_at_substring): Likewise.
1410 (format_warning_at_substring_n): Likewise.
1411 * toplev.c (general_init): Initialize global_dc->show_labels_p.
1413 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
1416 * builtins.c (expand_builtin_memcmp): Do not expand the call
1417 when overflow is detected.
1419 2018-08-15 Martin Sebor <msebor@redhat.com>
1421 PR tree-optimization/71625
1422 * config/aarch64/aarch64-builtins.c
1423 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
1425 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
1427 * config/s390/s390.c (s390_reorg): Remove loop.
1429 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1432 (darwin_function_switched_text_sections): Delete.
1433 * gcc/config/darwin.h
1434 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
1436 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1439 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
1440 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
1441 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
1443 2018-08-15 Martin Liska <mliska@suse.cz>
1445 PR tree-optimization/86925
1446 * predict.c (expr_expected_value_1): When taking
1447 later predictor, assign also probability.
1448 Use fold_build2_initializer_loc in order to fold
1449 the expression in -frounding-math.
1451 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
1453 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
1455 (expand_vec_perm_1): Try the new method.
1457 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
1460 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
1461 Check whether lra_live_max_point is 0 before dividing.
1463 2018-08-14 Martin Sebor <msebor@redhat.com>
1465 PR tree-optimization/86650
1466 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
1467 (vrp_prop::check_mem_ref): Same.
1469 2018-08-13 Liu Hao <lh_mouse@126.com>
1471 * pretty-print.c (eat_esc_sequence): Swap the foreground and
1472 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
1473 and clear it thereafter, as it only works for DBCS.
1475 2018-08-13 Liu Hao <lh_mouse@126.com>
1477 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
1478 handle returned by _get_osf_handle().
1480 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
1482 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
1483 for folding vec_perm.
1485 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
1487 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
1488 Add support for gimple-folding of vec_pack() and vec_unpack()
1491 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
1493 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
1494 vec_xst variants to the list.
1495 (rs6000_gimple_fold_builtin): Add support for folding unaligned
1496 vector loads and stores.
1498 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
1500 * config.gcc (rs6000-ibm-aix4.x): Delete.
1501 (rs6000-ibm-aix5.1): Delete.
1502 (rs6000-ibm-aix5.2): Delete.
1503 (rs6000-ibm-aix5.3): Delete.
1504 * config/rs6000/aix43.h: Delete.
1505 * config/rs6000/aix51.h: Delete.
1506 * config/rs6000/aix52.h: Delete.
1507 * config/rs6000/t-aix43: Delete.
1509 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
1511 * config/s390/s390.c (s390_decompose_constant_pool_ref):
1513 (s390_decompose_address): Factor out constant pool ref
1516 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1518 * config/nds32/nds32-predicates.c
1519 (nds32_can_use_bclr_p): Change return type as bool.
1520 (nds32_can_use_bset_p): Ditto.
1521 (nds32_can_use_btgl_p): Ditto.
1522 (nds32_can_use_bitci_p): Ditto.
1523 * config/nds32/nds32-protos.h
1524 (nds32_can_use_bclr_p): Change declaration.
1525 (nds32_can_use_bset_p): Ditto.
1526 (nds32_can_use_btgl_p): Ditto.
1527 (nds32_can_use_bitci_p): Ditto.
1529 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1531 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
1532 Support -msched-prolog-epilog option.
1533 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
1535 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1537 * common/config/nds32/nds32-common.c
1538 (nds32_option_optimization_table): Enalbe -malways-align.
1540 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1542 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
1544 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
1545 OPT_misr_secure_ case.
1546 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
1547 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
1548 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
1550 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
1551 (nds32_isr_info): New field security_level.
1552 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
1553 * config/nds32/nds32.md (return_internal): Consider critical attribute.
1554 * config/nds32/nds32.opt (misr-secure): New option.
1555 * config/nds32/nds32_init.inc: New file.
1556 * config/nds32/nds32_isr.h: New file.
1558 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
1560 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
1561 Update comment for atomic instructions.
1562 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
1563 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
1565 (atomic_loaddi): Revise fence expansion to only emit fence prior to
1566 load for __ATOMIC_SEQ_CST model.
1567 (atomic_loaddi_1): Remove float register target.
1568 (atomic_storedi): Handle CONST_INT values.
1569 (atomic_storedi_1): Remove float register source. Add special case
1571 (memory_barrier): New expander and insn.
1573 2018-08-11 Jakub Jelinek <jakub@redhat.com>
1575 PR tree-optimization/86835
1576 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
1577 new_stmt after def_gsi, make sure to insert new_square_stmt after
1578 that stmt, not 2 stmts before it.
1580 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
1583 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
1586 2018-08-10 Martin Liska <mliska@suse.cz>
1589 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
1591 * builtins.c (expand_builtin_expect_with_probability):
1593 (expand_builtin_expect_with_probability): New function.
1594 (build_builtin_expect_predicate): Add new argumnet probability
1595 for BUILT_IN_EXPECT_WITH_PROBABILITY.
1596 (fold_builtin_expect):
1599 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
1600 * builtins.h (fold_builtin_expect): Set new argument.
1601 * doc/extend.texi: Document __builtin_expect_with_probability.
1602 * doc/invoke.texi: Likewise.
1603 * gimple-fold.c (gimple_fold_call): Pass new argument.
1604 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
1605 also BUILT_IN_EXPECT_WITH_PROBABILITY.
1606 * predict.c (get_predictor_value): New function.
1607 (expr_expected_value): Add new argument probability. Assume
1608 that predictor and probability are always non-null.
1609 (expr_expected_value_1): Likewise. For __builtin_expect and
1610 __builtin_expect_with_probability set probability. Handle
1611 combination in binary expressions.
1612 (tree_predict_by_opcode): Simplify code by simply calling
1613 get_predictor_value.
1614 (pass_strip_predict_hints::execute): Add handling of
1615 BUILT_IN_EXPECT_WITH_PROBABILITY.
1616 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
1618 * tree.h (DECL_BUILT_IN_P): New function.
1620 2018-08-10 Martin Liska <mliska@suse.cz>
1622 PR tree-optimization/85799
1623 * passes.def: Add argument for pass_strip_predict_hints.
1624 * predict.c (class pass_strip_predict_hints): Add new argument
1626 (strip_predictor_early): New function.
1627 (pass_strip_predict_hints::execute): Call the function to
1629 (strip_predict_hints): New function.
1630 * predict.def: Fix comment.
1632 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
1634 * Makefile.in: Clarify which tm.texi to copy over to assert the
1635 right to grant a GFDL license for all.
1637 2018-08-09 Jeff Law <law@redhat.com>
1639 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
1642 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
1644 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
1647 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
1649 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
1650 reductions for variable-length vectors.
1652 2018-08-09 David Malcolm <dmalcolm@redhat.com>
1655 * common.opt (fdiagnostics-show-line-numbers): New option.
1656 * diagnostic-show-locus.c (class layout): Add fields
1657 "m_show_line_numbers_p" and "m_linenum_width";
1658 (num_digits): New function.
1659 (test_num_digits): New function.
1660 (layout::layout): Initialize new fields. Update m_x_offset
1661 logic to handle any left margin.
1662 (layout::print_source_line): Print line number when requested.
1663 (layout::start_annotation_line): New member function.
1664 (layout::print_annotation_line): Call it.
1665 (layout::print_leading_fixits): Likewise.
1666 (layout::print_trailing_fixits): Likewise. Update calls to
1667 move_to_column for new parameter.
1668 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
1669 it to potentially call start_annotation_line.
1670 (layout::show_ruler): Call start_annotation_line.
1671 (selftest::test_line_numbers_multiline_range): New selftest.
1672 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
1673 and selftest::test_line_numbers_multiline_range.
1674 * diagnostic.c (diagnostic_initialize): Initialize
1675 show_line_numbers_p.
1676 * diagnostic.h (struct diagnostic_context): Add field
1677 "show_line_numbers_p".
1678 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
1679 -fno-diagnostics-show-line-numbers.
1680 * dwarf2out.c (gen_producer_string): Add
1681 OPT_fdiagnostics_show_line_numbers to the ignored options.
1682 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
1683 one setting" options.
1684 (append_compiler_options): Likewise to the dropped options.
1685 (append_diag_options): Likewise to the passed-on options.
1686 * opts.c (common_handle_option): Handle the new option.
1687 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
1689 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
1691 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
1692 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
1693 third argument of type "const signed char" to descriptions of
1694 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
1695 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
1696 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
1697 __builtin_bcdsub_ov functions.
1699 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
1701 PR tree-optimization/86858
1702 * tree-vect-loop.c (vect_is_simple_reduction): Restore
1703 flow_bb_inside_loop_p calls.
1705 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
1707 PR tree-optimization/86871
1708 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
1709 instead of gimple_assign_lhs.
1711 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
1714 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
1715 register constraint to operand 0.
1716 (add<mode>3_carryinC): Likewise.
1717 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
1719 2018-08-09 Martin Liska <mliska@suse.cz>
1722 * common.opt: Remove extra line.
1724 2018-08-09 Martin Liska <mliska@suse.cz>
1726 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
1727 at the end of a line, make first letter capital and end up
1728 a sentence with a dot.
1729 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
1730 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
1731 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
1732 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
1733 (PARAM_MAX_ISL_OPERATIONS): Likewise.
1734 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
1735 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
1736 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
1737 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
1738 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
1739 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
1740 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
1741 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
1742 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
1743 (PARAM_TREE_REASSOC_WIDTH): Likewise.
1744 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
1745 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
1746 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
1748 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
1751 * config/s390/s390.c (s390_option_override_internal): Reduce the
1752 stack-clash-protection-probe-interval param if it would be too big
1755 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
1758 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
1759 * config/m68k/m68k.c (handle_move_double): Don't call
1760 m68k_final_prescan_insn.
1761 (m68k_adjust_decorated_operand): Renamed from
1762 m68k_final_prescan_insn, remove first and third operand and
1764 (print_operand): Call it.
1765 (print_operand_address): Call it.
1767 2018-08-08 Nathan Sidwell <nathan@acm.org>
1769 * diagnostic.c (diagnostic_report_current_module): Use
1770 linemap_included_from & linemap_included_from_linemap.
1772 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
1774 * config/aarch64/aarch64-cores.def: Add phecda core.
1775 * config/aarch64/aarch64-tune.md: Regenerate.
1776 * doc/invoke.texi: Add phecda core.
1778 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
1781 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
1783 * config/s390/s390.md ("movti"): Add more alternatives for
1784 constant to GPR copies.
1786 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
1788 * config/s390/s390.c: Fix whitespace damage throughout the file.
1789 * config/s390/s390.h: Likewise.
1790 * config/s390/tpf.h: Likewise.
1792 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
1794 * config/s390/s390.c (s390_loadrelative_operand_p):
1795 Remove TARGET_CPU_ZARCH usages.
1796 (s390_rtx_costs): Likewise.
1797 (s390_legitimate_constant_p): Likewise.
1798 (s390_cannot_force_const_mem): Likewise.
1799 (legitimate_reload_constant_p): Likewise.
1800 (s390_preferred_reload_class): Likewise.
1801 (legitimize_pic_address): Likewise.
1802 (legitimize_tls_address): Likewise.
1803 (s390_split_branches): Removed.
1804 (s390_add_execute): Removed.
1805 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
1806 (s390_mainpool_start): Likewise.
1807 (s390_mainpool_finish): Likewise.
1808 (s390_mainpool_cancel): Removed.
1809 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
1810 (s390_chunkify_cancel): Likewise.
1811 (s390_return_addr_rtx): Likewise.
1812 (s390_register_info): Remove split_branches_pending_p uages.
1813 (s390_optimize_register_info): Likewise.
1814 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
1815 split_branches_pending_p usages.
1816 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
1817 (s390_load_got): Likewise.
1818 (s390_expand_split_stack_prologue): Likewise.
1819 (output_asm_nops): Likewise.
1820 (s390_function_profiler): Likewise.
1821 (s390_emit_call): Likewise.
1822 (s390_conditional_register_usage): Likewise.
1823 (s390_optimize_prologue): Likewise.
1824 (s390_reorg): Remove TARGET_CPU_ZARCH and
1825 split_branches_pending_p usages.
1826 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
1828 (s390_output_indirect_thunk_function): Likewise.
1829 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
1830 (TARGET_CPU_ZARCH_P): Removed.
1831 (struct machine_function): Remove split_branches_pending_p.
1832 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
1834 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
1836 * common/config/s390/s390-common.c (processor_flags_table):
1838 * config.gcc: Remove with_arch/with_tune support.
1839 * config/s390/2064.md: Remove cpu attribute comparisons.
1840 * config/s390/driver-native.c (s390_host_detect_local_cpu):
1842 * config/s390/linux.h (ASM_SPEC):
1843 Remove -march support.
1844 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
1845 Use a table to get an arch level.
1846 * config/s390/s390-opts.h (enum processor_type):
1848 * config/s390/s390.c
1849 (processor_table): Remove entries, add arch_level values.
1850 (s390_issue_rate): Remove cases.
1851 (s390_option_override): Adjust
1852 s390_option_override_internal() call.
1853 (s390_option_override_internal): Remove deprecation warning.
1854 (s390_valid_target_attribute_tree): Adjust
1855 s390_option_override_internal() call.
1856 * config/s390/s390.h (struct s390_processor):
1857 Share with s390-c.c, add arch_level field.
1858 * config/s390/s390.md:
1859 Remove occurrences in cpu attribute.
1860 * config/s390/s390.opt: Remove -march/-mtune support.
1861 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
1862 * doc/invoke.texi: Remove deprecation warning.
1864 2018-08-08 Luis Machado <luis.machado@linaro.org>
1866 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
1868 (qdf24xx_tunings): Set vector cost structure to
1869 qdf24xx_vector_cost.
1871 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
1872 <register_sextend>: Set to 3.
1874 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
1877 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
1878 * config/aarch64/aarch64-simd.md
1879 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
1880 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
1881 (aarch64_frecpx<mode>): ...this new pattern.
1882 * config/aarch64/aarch64-simd-builtins.def: Remove comment
1883 about aarch64_frecp<FRECP:frecp_suffix><mode>.
1885 2018-08-07 Martin Liska <mliska@suse.cz>
1888 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
1889 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
1890 * predict.def (PRED_MALLOC_NONNULL): New predictor.
1891 * doc/extend.texi: Document that malloc attribute adds
1894 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
1897 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1898 Define to speculation_safe_value_not_needed.
1900 2018-08-06 Jeff Law <law@redhat.com>
1902 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
1903 the vr_values instance to cprop_into_stmt.
1904 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
1905 (cprop_operand): Also query EVRP to determine if OP is a constant.
1907 2018-08-06 Nathan Sidwell <nathan@acm.org>
1909 * diagnostic.c (diagnostic_report_current_module): Reroll
1910 included-at loop. Translate text.
1912 2018-08-06 David Malcolm <dmalcolm@redhat.com>
1914 * function-tests.c (selftest::test_expansion_to_rtl): Call
1915 free_after_compilation.
1917 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1919 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
1921 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
1923 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
1924 loops with memory block operations from getting unrolled.
1926 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
1929 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1930 Define to speculation_safe_value_not_needed.
1932 2018-08-06 Jeff Law <law@redhat.com>
1934 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
1937 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1940 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
1941 with all enabled __intN types.
1943 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
1945 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1947 * alias.c (record_set): Check for clobber high.
1948 * cfgexpand.c (expand_gimple_stmt): Likewise.
1949 * combine-stack-adj.c (single_set_for_csa): Likewise.
1950 * combine.c (find_single_use_1): Likewise.
1951 (set_nonzero_bits_and_sign_copies): Likewise.
1952 (get_combine_src_dest): Likewise.
1953 (is_parallel_of_n_reg_sets): Likewise.
1954 (try_combine): Likewise.
1955 (record_dead_and_set_regs_1): Likewise.
1956 (reg_dead_at_p_1): Likewise.
1957 (reg_dead_at_p): Likewise.
1958 * dce.c (deletable_insn_p): Likewise.
1959 (mark_nonreg_stores_1): Likewise.
1960 (mark_nonreg_stores_2): Likewise.
1961 * df-scan.c (df_find_hard_reg_defs): Likewise.
1962 (df_uses_record): Likewise.
1963 (df_get_call_refs): Likewise.
1964 * dwarf2out.c (mem_loc_descriptor): Likewise.
1965 * haifa-sched.c (haifa_classify_rtx): Likewise.
1966 * ira-build.c (create_insn_allocnos): Likewise.
1967 * ira-costs.c (scan_one_insn): Likewise.
1968 * ira.c (equiv_init_movable_p): Likewise.
1969 (rtx_moveable_p): Likewise.
1970 (interesting_dest_for_shprep): Likewise.
1971 * jump.c (mark_jump_label_1): Likewise.
1972 * postreload-gcse.c (record_opr_changes): Likewise.
1973 * postreload.c (reload_cse_simplify): Likewise.
1974 (struct reg_use): Add source expr.
1975 (reload_combine): Check for clobber high.
1976 (reload_combine_note_use): Likewise.
1977 (reload_cse_move2add): Likewise.
1978 (move2add_note_store): Likewise.
1979 * print-rtl.c (print_pattern): Likewise.
1980 * recog.c (decode_asm_operands): Likewise.
1981 (store_data_bypass_p): Likewise.
1982 (if_test_bypass_p): Likewise.
1983 * regcprop.c (kill_clobbered_value): Likewise.
1984 (kill_set_value): Likewise.
1985 * reginfo.c (reg_scan_mark_refs): Likewise.
1986 * reload1.c (maybe_fix_stack_asms): Likewise.
1987 (eliminate_regs_1): Likewise.
1988 (elimination_effects): Likewise.
1989 (mark_not_eliminable): Likewise.
1990 (scan_paradoxical_subregs): Likewise.
1991 (forget_old_reloads_1): Likewise.
1992 * reorg.c (find_end_label): Likewise.
1993 (try_merge_delay_insns): Likewise.
1994 (redundant_insn): Likewise.
1995 (own_thread_p): Likewise.
1996 (fill_simple_delay_slots): Likewise.
1997 (fill_slots_from_thread): Likewise.
1998 (dbr_schedule): Likewise.
1999 * resource.c (update_live_status): Likewise.
2000 (mark_referenced_resources): Likewise.
2001 (mark_set_resources): Likewise.
2002 * rtl.c (copy_rtx): Likewise.
2003 * rtlanal.c (reg_referenced_p): Likewise.
2004 (single_set_2): Likewise.
2005 (noop_move_p): Likewise.
2006 (note_stores): Likewise.
2007 * sched-deps.c (sched_analyze_reg): Likewise.
2008 (sched_analyze_insn): Likewise.
2010 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2012 * cse.c (invalidate_reg): New function extracted from...
2013 (invalidate): ...here.
2014 (canonicalize_insn): Check for clobber high.
2015 (invalidate_from_clobbers): invalidate clobber highs.
2016 (invalidate_from_sets_and_clobbers): Likewise.
2017 (count_reg_usage): Check for clobber high.
2018 (insn_live_p): Likewise.
2019 * cselib.c (cselib_expand_value_rtx_1):Likewise.
2020 (cselib_invalidate_regno): Check for clobber in setter.
2021 (cselib_invalidate_rtx): Pass through setter.
2022 (cselib_invalidate_rtx_note_stores):
2023 (cselib_process_insn): Check for clobber high.
2024 * cselib.h (cselib_invalidate_rtx): Add operand.
2026 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2028 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
2029 (mark_not_eliminable): Likewise.
2030 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
2031 * lra-lives.c (process_bb_lives): Check for clobber high.
2032 * lra.c (new_insn_reg): Remember clobber highs.
2033 (collect_non_operand_hard_regs): Check for clobber high.
2034 (lra_set_insn_recog_data): Likewise.
2035 (add_regs_to_insn_regno_info): Likewise.
2036 (lra_update_insn_regno_info): Likewise.
2038 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2040 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
2041 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
2043 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2045 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
2046 (copy_insn_1): Likewise.
2047 (gen_hard_reg_clobber_high): New gen function.
2048 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
2049 * genemit.c (gen_exp): Likewise.
2050 (gen_emit_seq): Pass through info.
2051 (gen_insn): Check for CLOBBER_HIGH.
2052 (gen_expand): Pass through info.
2053 (gen_split): Likewise.
2054 (output_add_clobbers): Likewise.
2055 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
2056 (remove_clobbers): Likewise.
2057 * rtl.h (gen_hard_reg_clobber_high): New declaration.
2059 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2061 * doc/rtl.texi (clobber_high): Add.
2062 (parallel): Add in clobber high
2063 * rtl.c (rtl_check_failed_code3): Add function.
2064 * rtl.def (CLOBBER_HIGH): Add expression.
2065 * rtl.h (RTL_CHECKC3): Add macro.
2066 (rtl_check_failed_code3): Add declaration.
2067 (XC3EXP): Add macro.
2069 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
2072 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
2073 cfun->machine->max_used_stack_alignment if needed.
2075 2018-08-04 Martin Sebor <msebor@redhat.com>
2077 PR tree-optimization/86571
2078 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
2081 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
2084 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2087 2018-08-03 Jeff Law <law@redhat.com>
2090 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2091 Define to speculation_safe_value_not_needed.
2093 2018-08-03 David Malcolm <dmalcolm@redhat.com>
2095 * doc/gcov.texi (-x): Remove duplicate "to".
2096 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
2097 (-Wif-not-aligned): Remove duplicate "is".
2098 (-flto): Remove duplicate "the".
2099 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
2100 duplicate "v5.00.b".
2101 (MSP430 Options): Remove duplicate "and" from the description
2102 of "-mgprel-sec=regexp".
2103 (x86 Options): Remove duplicate copies of "vmldLog102" and
2104 vmlsLog104 from description of "-mveclibabi=type".
2106 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
2108 * internal-fn.h (first_commutative_argument): Declare.
2109 * internal-fn.c (first_commutative_argument): New function.
2110 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
2111 restrictions for pattern statements. Use first_commutative_argument
2112 to look for commutative operands in calls to internal functions.
2114 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
2116 * Makefile.in (wide-int-range.o): New.
2117 * tree-vrp.c: Move all the wide_int_* functions to...
2118 * wide-int-range.cc: ...here.
2119 * tree-vrp.h: Move all the wide_int_* prototypes to...
2120 * wide-int-range.h: ...here.
2122 2018-08-03 Tom de Vries <tdevries@suse.de>
2124 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
2126 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
2127 * except.c (output_function_exception_table): Do early exit if
2128 targetm_common.except_unwind_info (&global_options) == UI_NONE.
2130 2018-08-03 Martin Liska <mliska@suse.cz>
2132 * predict.c (dump_prediction): Change to 2 digits
2135 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
2137 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
2139 (falkor_am_1_gtov_gtov): ... a new insn reservation.
2141 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
2143 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
2144 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
2145 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
2146 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
2147 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
2149 2018-08-02 David Malcolm <dmalcolm@redhat.com>
2151 * diagnostic-show-locus.c (diagnostic_show_locus): Use
2152 pp_take_prefix when saving the existing prefix.
2153 * diagnostic.c (diagnostic_append_note): Likewise.
2154 * langhooks.c (lhd_print_error_function): Likewise.
2155 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
2156 param's type. Free the existing prefix.
2157 (pp_take_prefix): New function.
2158 (pretty_printer::pretty_printer): Drop the prefix parameter.
2159 Rename the length parameter to match the comment.
2160 (pretty_printer::~pretty_printer): Free the prefix.
2161 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
2163 (struct pretty_printer): Drop the "const" from "prefix" field's
2164 type and clarify memory management.
2165 (pp_set_prefix): Drop the "const" from the 2nd param.
2166 (pp_take_prefix): New decl.
2168 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
2170 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
2171 for word_mode_ok here instead of passing as argument.
2172 (expand_block_compare): Change select_block_compare_mode() call.
2173 (expand_strncmp_gpr_sequence): New function.
2174 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
2176 2018-08-02 Jeff Law <law@redhat.com>
2179 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2180 Define to speculation_safe_value_not_needed.
2183 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2184 Define to speculation_safe_value_not_needed.
2186 2018-08-02 Tom de Vries <tdevries@suse.de>
2189 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
2190 function. Return UI_TARGET unconditionally.
2191 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
2192 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
2194 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
2196 * genemit.c (print_overload_test): Fix typo.
2198 2018-08-02 Richard Biener <rguenther@suse.de>
2200 PR tree-optimization/86816
2201 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
2202 which checks for value availability before querying it.
2203 (gvn_uses_equal): Use it.
2204 (same_succ_hash): Likewise.
2205 (gimple_equal_p): Likewise.
2207 2018-08-02 Nick Clifton <nickc@redhat.com>
2210 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2211 Define to speculation_safe_value_not_needed.
2214 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2215 Define to speculation_safe_value_not_needed.
2218 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2219 Define to speculation_safe_value_not_needed.
2222 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2223 Define to speculation_safe_value_not_needed.
2226 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2227 Define to speculation_safe_value_not_needed.
2230 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2231 Define to speculation_safe_value_not_needed.
2234 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2235 Define to speculation_safe_value_not_needed.
2238 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2239 Define to speculation_safe_value_not_needed.
2242 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
2243 speculation_safe_value_not_needed.
2246 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
2247 to speculation_safe_value_not_needed.
2249 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
2251 * doc/md.texi: Expand the documentation of instruction names
2252 to mention port-local uses. Document '@' in pattern names.
2253 * read-md.h (overloaded_instance, overloaded_name): New structs.
2255 (md_reader::handle_overloaded_name): New member function.
2256 (md_reader::get_overloads): Likewise.
2257 (md_reader::m_first_overload): New member variable.
2258 (md_reader::m_next_overload_ptr): Likewise.
2259 (md_reader::m_overloads_htab): Likewise.
2260 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
2261 m_next_overload_ptr and m_overloads_htab.
2262 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
2263 (get_mode_token, get_code_token, get_int_token): New functions.
2264 (map_attr_string): Add an optional argument that passes back
2265 the associated iterator.
2266 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
2267 (md_reader::handle_overloaded_name, add_overload_instance): New
2269 (apply_iterators): Handle '@' names. Report an error if '@'
2270 is used without iterators.
2271 (initialize_iterators): Initialize the new iterator_group fields.
2272 * genopinit.c (handle_overloaded_code_for)
2273 (handle_overloaded_gen): New functions.
2274 (main): Use them to print declarations of maybe_code_for_* and
2275 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
2276 * genemit.c (print_overload_arguments, print_overload_test)
2277 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
2278 (main): Use it to print definitions of maybe_code_for_* and
2279 maybe_gen_* functions.
2280 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
2281 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
2282 instead of explicit mode checks.
2283 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
2284 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
2285 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
2286 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
2287 (aarch64_expand_compare_and_swap): Likewise
2288 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
2289 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
2290 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
2291 (aarch64_constant_pool_reload_icode): Delete.
2292 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
2293 instead of aarch64_constant_pool_reload_icode. Use
2294 code_for_aarch64_reload_mov instead of explicit mode checks.
2295 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
2296 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
2297 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
2298 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
2299 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
2300 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
2301 (aarch64_atomic_load_op_code): Delete.
2302 (aarch64_emit_atomic_load_op): Likewise.
2303 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
2304 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
2305 instead of aarch64_emit_atomic_load_op.
2306 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
2307 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
2308 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
2309 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
2310 character before the pattern name.
2311 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
2312 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
2313 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
2314 (aarch64_frecps<mode>): Likewise.
2315 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
2316 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
2317 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
2318 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
2319 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
2321 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
2323 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
2324 Allow HFmode constants if TARGET_FP_F16INST.
2326 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
2329 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
2330 No longer check last store for clobber of address register.
2332 2018-08-02 Martin Liska <mliska@suse.cz>
2334 PR gcov-profile/86817
2335 * gcov.c (process_all_functions): New function.
2337 (process_file): Move functions processing to
2338 process_all_functions.
2340 2018-08-02 David Malcolm <dmalcolm@redhat.com>
2342 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
2343 "const" to the "gimple *" and "rtx_insn *" parameters.
2344 * dumpfile.h (dump_user_location_t::dump_user_location_t):
2346 (dump_location_t::dump_location_t): Likewise.
2348 2018-08-01 Martin Sebor <msebor@redhat.com>
2350 PR tree-optimization/86650
2351 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
2352 rather than a "gcall *". Directly pass the data of interest
2353 to percent_K_format, rather than building a temporary CALL_EXPR
2355 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
2356 (gimple_fold_builtin_strncat): Adjust.
2357 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
2358 gcall* argument with gimple*.
2359 * gimple-ssa-warn-restrict.c (check_call): Same.
2360 (wrestrict_dom_walker::before_dom_children): Same.
2361 (builtin_access::builtin_access): Same.
2362 (check_bounds_or_overlap): Same
2363 (maybe_diag_overlap): Same.
2364 (maybe_diag_offset_bounds): Same.
2365 * tree-diagnostic.c (default_tree_printer): Move usage of
2366 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
2368 * tree-pretty-print.c (percent_K_format): Add argument.
2369 * tree-pretty-print.h: Add argument.
2370 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
2371 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
2372 (maybe_diag_stxncpy_trunc): Same.
2373 (handle_builtin_stxncpy): Same.
2374 (handle_builtin_strcat): Same.
2376 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2378 * match.pd: Optimise pointer range checks.
2380 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2382 PR tree-optimization/86758
2383 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
2384 to remove pattern statements.
2386 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2388 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
2389 result of dfs_enumerate_from when constructing stmt_vec_infos,
2390 instead of additionally calling get_loop_body.
2392 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2394 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
2396 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
2397 When creating an iv, assert that the step is not known to be zero.
2398 (vect_setup_realignment): Update call accordingly.
2399 * tree-vect-stmts.c (vectorizable_store): Likewise.
2400 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
2402 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2404 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
2405 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
2406 (vectorizable_reduction): Likewise.
2407 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2408 (vect_detect_hybrid_slp_stmts): Likewise.
2409 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2411 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
2413 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
2414 (wide_int_set_zero_nonzero_bits): ...this.
2415 (zero_nonzero_bits_from_vr): Rename to...
2416 (vrp_set_zero_nonzero_bits): ...this.
2417 (extract_range_from_multiplicative_op_1): Abstract wide int
2419 (wide_int_range_multiplicative_op): ...here.
2420 (extract_range_from_binary_expr_1): Extract wide int binary
2421 operations into their own functions.
2422 (wide_int_range_lshift): New.
2423 (wide_int_range_can_optimize_bit_op): New.
2424 (wide_int_range_shift_undefined_p): New.
2425 (wide_int_range_bit_xor): New.
2426 (wide_int_range_bit_ior): New.
2427 (wide_int_range_bit_and): New.
2428 (wide_int_range_trunc_mod): New.
2429 (extract_range_into_wide_ints): New.
2430 (vrp_shift_undefined_p): New.
2431 (extract_range_from_multiplicative_op): New.
2432 (vrp_can_optimize_bit_op): New.
2433 * tree-vrp.h (value_range::dump): New.
2434 (wide_int_range_multiplicative_op): New.
2435 (wide_int_range_lshift):New.
2436 (wide_int_range_shift_undefined_p): New.
2437 (wide_int_range_bit_xor): New.
2438 (wide_int_range_bit_ior): New.
2439 (wide_int_range_bit_and): New.
2440 (wide_int_range_trunc_mod): New.
2441 (zero_nonzero_bits_from_bounds): Rename to...
2442 (wide_int_set_zero_nonzero_bits): ...this.
2443 (zero_nonzero_bits_from_vr): Rename to...
2444 (vrp_set_zero_nonzero_bits): ...this.
2445 (range_easy_mask_min_max): Rename to...
2446 (wide_int_range_can_optimize_bit_op): this.
2447 * vr-values.c (simplify_bit_ops_using_ranges): Rename
2448 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
2450 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2452 * tree-vectorizer.h (vect_orig_stmt): New function.
2453 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
2454 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
2455 (vect_create_epilog_for_reduction): Likewise.
2456 (vectorizable_live_operation): Likewise.
2457 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
2458 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
2459 * tree-vect-stmts.c (vectorizable_call): Likewise.
2460 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
2462 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2464 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
2466 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
2467 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
2468 (vect_transform_loop): Likewise.
2469 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
2471 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2473 * tree-vectorizer.h (vect_schedule_slp): Return void.
2474 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
2475 (vect_schedule_slp): Likewise.
2477 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2479 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
2481 (vect_transform_loop): Update calls accordingly. Schedule SLP
2482 instances before the main loop, if any exist.
2484 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2486 PR tree-optimization/86749
2487 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
2488 If the lhs is used in a COND_EXPR, check that it is being used
2489 as the "then" or "else" value.
2491 2018-08-01 Tom de Vries <tdevries@suse.de>
2494 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
2495 speculation_safe_value_not_needed.
2497 2018-08-01 Richard Biener <rguenther@suse.de>
2499 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
2502 2018-08-01 Martin Liska <mliska@suse.cz>
2504 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
2505 format how successful transformation is dumped.
2506 (gimple_mod_pow2_value_transform): Likewise.
2507 (gimple_mod_subtract_transform): Likewise.
2508 (gimple_stringops_transform): Likewise.
2510 2018-08-01 Martin Liska <mliska@suse.cz>
2513 * value-prof.c (interesting_stringop_to_profile_p):
2514 Simplify the code and add BUILT_IN_MEMMOVE.
2515 (gimple_stringops_transform): Likewise.
2517 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
2519 * config/aarch64/aarch64-simd.md
2520 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
2521 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
2522 use GPI iterator instead of SI mode.
2524 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
2526 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
2527 rs6000_speculation_barrier.
2528 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
2529 new barrier pattern name.
2531 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
2533 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
2534 (speculation_barrier): New insn.
2536 2018-08-01 Richard Biener <rguenther@suse.de>
2539 * graphite.h: Include isl/id.h and isl/space.h to allow build
2542 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
2545 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
2546 mode for COFF targets.
2547 * defaults.h (TARGET_COFF): Define.
2548 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
2549 TARGET_COFF): Define.
2550 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
2551 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
2552 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
2554 2018-07-31 Alexandre Oliva <oliva@adacore.com>
2556 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
2557 * gimple-streamer-out.c (output_bb): Save it.
2558 * lto-streamer-in.c (input_struct_function_base): Restore
2559 instance discriminator if available. Create map on demand.
2560 * lto-streamer-out.c (output_struct_function_base): Save it if
2562 * final.c (decl_to_instance_map): Document LTO strategy.
2564 2018-07-31 Alexandre Oliva <oliva@adacore.com>
2565 Olivier Hainque <hainque@adacore.com>
2567 * debug.h (decl_to_instance_map_t): New type.
2568 (decl_to_instance_map): Declare.
2569 (maybe_create_decl_to_instance_map): New inline function.
2570 * final.c (bb_discriminator, last_bb_discriminator): New statics,
2571 to track basic block discriminators.
2572 (final_start_function_1): Initialize them.
2573 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
2575 (decl_to_instance_map): New variable.
2576 (map_decl_to_instance, maybe_set_discriminator): New functions.
2577 (notice_source_line): Set discriminator.
2579 2018-07-31 Ian Lance Taylor <iant@golang.org>
2581 * targhooks.c (default_have_speculation_safe_value): Add
2584 2018-07-31 David Malcolm <dmalcolm@redhat.com>
2586 * dump-context.h: Include "pretty-print.h".
2587 (dump_context::refresh_dumps_are_enabled): New decl.
2588 (dump_context::emit_item): New decl.
2589 (class dump_context): Add fields "m_test_pp" and
2591 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
2592 (temp_dump_context::get_dumped_text): New decl.
2593 (class temp_dump_context): Add field "m_pp".
2594 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
2595 (dump_context::refresh_dumps_are_enabled): ...and add a test for
2597 (set_dump_file): Update for above change.
2598 (set_alt_dump_file): Likewise.
2599 (dump_loc): New overload, taking a pretty_printer *.
2600 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
2601 to any test pretty-printer.
2602 (make_item_for_dump_gimple_stmt): New function, adapted from
2603 optinfo::add_gimple_stmt.
2604 (dump_context::dump_gimple_stmt): Call it, and use the result,
2605 eliminating the direct usage of dump_file and alt_dump_file in
2606 favor of indirectly using them via emit_item.
2607 (make_item_for_dump_gimple_expr): New function, adapted from
2608 optinfo::add_gimple_expr.
2609 (dump_context::dump_gimple_expr): Call it, and use the result,
2610 eliminating the direct usage of dump_file and alt_dump_file in
2611 favor of indirectly using them via emit_item.
2612 (make_item_for_dump_generic_expr): New function, adapted from
2614 (dump_context::dump_generic_expr): Call it, and use the result,
2615 eliminating the direct usage of dump_file and alt_dump_file in
2616 favor of indirectly using them via emit_item.
2617 (make_item_for_dump_printf_va): New function, adapted from
2618 optinfo::add_printf_va.
2619 (make_item_for_dump_printf): New function.
2620 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
2621 and use the result, eliminating the direct usage of dump_file and
2622 alt_dump_file in favor of indirectly using them via emit_item.
2623 (make_item_for_dump_dec): New function.
2624 (dump_context::dump_dec): Call it, and use the result,
2625 eliminating the direct usage of dump_file and alt_dump_file in
2626 favor of indirectly using them via emit_item.
2627 (make_item_for_dump_symtab_node): New function, adapted from
2628 optinfo::add_symtab_node.
2629 (dump_context::dump_symtab_node): Call it, and use the result,
2630 eliminating the direct usage of dump_file and alt_dump_file in
2631 favor of indirectly using them via emit_item.
2632 (dump_context::begin_scope): Reimplement, avoiding direct usage
2633 of dump_file and alt_dump_file in favor of indirectly using them
2635 (dump_context::emit_item): New member function.
2636 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
2637 Set up test pretty-printer on the underlying context. Call
2638 refresh_dumps_are_enabled.
2639 (temp_dump_context::~temp_dump_context): Call
2640 refresh_dumps_are_enabled.
2641 (temp_dump_context::get_dumped_text): New member function.
2642 (selftest::verify_dumped_text): New function.
2643 (ASSERT_DUMPED_TEXT_EQ): New macro.
2644 (selftest::test_capture_of_dump_calls): Run all tests twice, with
2645 and then without optinfo enabled. Add uses of
2646 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
2647 * dumpfile.h: Update comment for the dump_* API.
2648 * optinfo-emit-json.cc
2649 (selftest::test_building_json_from_dump_calls): Update for new
2650 param for temp_dump_context ctor.
2651 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
2652 and "m_owned" field.
2653 (optinfo_item::~optinfo_item): Likewise.
2654 (optinfo::add_item): New member function.
2655 (optinfo::emit): Update comment.
2656 (optinfo::add_string): Delete.
2657 (optinfo::add_printf): Delete.
2658 (optinfo::add_printf_va): Delete.
2659 (optinfo::add_gimple_stmt): Delete.
2660 (optinfo::add_gimple_expr): Delete.
2661 (optinfo::add_tree): Delete.
2662 (optinfo::add_symtab_node): Delete.
2663 (optinfo::add_dec): Delete.
2664 * optinfo.h (class dump_context): New forward decl.
2665 (optinfo::add_item): New decl.
2666 (optinfo::add_string): Delete.
2667 (optinfo::add_printf): Delete.
2668 (optinfo::add_printf_va): Delete.
2669 (optinfo::add_gimple_stmt): Delete.
2670 (optinfo::add_gimple_expr): Delete.
2671 (optinfo::add_tree): Delete.
2672 (optinfo::add_symtab_node): Delete.
2673 (optinfo::add_dec): Delete.
2674 (optinfo::add_poly_int): Delete.
2675 (optinfo_item::optinfo_item): Remove "owned" param.
2676 (class optinfo_item): Remove field "m_owned".
2678 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2681 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
2682 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
2683 requested variable alignment.
2684 (expand_one_ssa_partition): Likewise.
2685 (expand_one_var): Likewise.
2687 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2689 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
2690 to speculation_safe_value_not_needed.
2692 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2694 * targhooks.h (speculation_safe_value_not_needed): New prototype.
2695 * targhooks.c (speculation_safe_value_not_needed): New function.
2696 * target.def (have_speculation_safe_value): Update documentation.
2697 * doc/tm.texi: Regenerated.
2699 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2701 * config/aarch64/iterators.md (ALLI_TI): New iterator.
2702 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
2704 (despeculate_copy<ALLI:mode>_insn): New insn.
2705 (despeculate_copyti_insn): New insn.
2706 (despeculate_simple<ALLI:mode>): New insn
2707 (despeculate_simpleti): New insn.
2708 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
2710 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
2711 aarch64_speculation_safe_value.
2712 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
2714 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2716 * config/aarch64/aarch64-speculation.cc: New file.
2717 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
2718 before pass_reorder_blocks.
2719 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
2721 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
2722 X14 and X15 when tracking speculation.
2723 * config/aarch64/aarch64.md (register name constants): Add
2724 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
2725 (unspec): Add UNSPEC_SPECULATION_TRACKER.
2726 (speculation_barrier): New insn attribute.
2727 (cmp<mode>): Allow SP in comparisons.
2728 (speculation_tracker): New insn.
2729 (speculation_barrier): Add speculation_barrier attribute.
2730 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
2731 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
2732 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
2734 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2736 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
2737 aarch64_track_speculation is true.
2738 (tb<optab><mode>1): Likewise.
2739 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
2740 generate CB[N]Z when tracking speculation.
2741 (aarch64_split_compare_and_swap): Likewise.
2742 (aarch64_split_atomic_op): Likewise.
2744 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2746 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
2748 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2750 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
2751 (speculation_barrier): New insn.
2753 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2755 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
2756 * config/arm/arm.md (speculation_barrier): New expand.
2757 (speculation_barrier_insn): New pattern.
2759 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2761 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
2762 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
2763 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
2764 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
2766 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
2767 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
2768 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
2769 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
2770 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
2771 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
2772 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
2773 * builtins.c (expand_speculation_safe_value): New function.
2774 (expand_builtin): Call it.
2775 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
2776 * doc/extend.texi: Document __builtin_speculation_safe_value.
2777 * doc/md.texi: Document "speculation_barrier" pattern.
2778 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
2779 TARGET_HAVE_SPECULATION_SAFE_VALUE.
2780 * doc/tm.texi: Regenerated.
2781 * target.def (have_speculation_safe_value, speculation_safe_value): New
2783 * targhooks.c (default_have_speculation_safe_value): New function.
2784 (default_speculation_safe_value): New function.
2785 * targhooks.h (default_have_speculation_safe_value): Add prototype.
2786 (default_speculation_safe_value): Add prototype.
2788 2018-07-31 David Malcolm <dmalcolm@redhat.com>
2790 * dump-context.h (dump_context::dump_loc): New decl.
2791 * dumpfile.c (dump_context::dump_loc): New member function.
2792 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
2793 and dump_gimple_stmt.
2794 (dump_context::dump_gimple_expr_loc): Likewise, using
2796 (dump_context::dump_generic_expr_loc): Likewise, using
2798 (dump_context::dump_printf_loc_va): Likewise, using
2800 (dump_context::begin_scope): Explicitly using the global function
2801 "dump_loc", rather than the member function.
2803 2018-07-31 Martin Sebor <msebor@redhat.com>
2805 PR tree-optimization/86741
2806 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
2808 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
2810 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
2811 depend on whether prefetch instructions will be emitted or not.
2812 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
2813 will be emitted or not.
2814 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
2815 (TARGET_SETMEM_PFD): New macros.
2817 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2819 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
2820 (NULL_STMT_VEC_INFO): Delete.
2821 (stmt_vec_info::operator*): Likewise.
2822 (stmt_vec_info::operator gimple *): Likewise.
2823 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
2824 of NULL_STMT_VEC_INFO.
2825 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2826 (vect_reassociating_reduction_p): Likewise.
2827 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
2828 (vectorizable_store): Likewise.
2829 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
2830 (vec_info::free_stmt_vec_infos): Likewise.
2832 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2834 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
2835 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
2837 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2839 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
2840 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
2841 (vec_info::free_stmt_vec_info): New private member functions.
2842 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
2843 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
2844 * tree-parloops.c (gather_scalar_reductions): Remove calls to
2845 set_stmt_vec_info_vec and free_stmt_vec_infos.
2846 * tree-vect-loop.c (_loop_vec_info): Remove call to
2847 set_stmt_vec_info_vec.
2848 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
2849 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
2850 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
2851 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
2852 (vec_info::free_stmt_vec_info): ...these new functions. Remove
2853 assignments in {vec_info::,}new_stmt_vec_info that are redundant
2854 with the clearing in the xcalloc.
2855 (stmt_vec_info_vec): Delete.
2856 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
2857 (vectorize_loops): Likewise.
2858 (vec_info::~vec_info): Remove argument from call to
2859 free_stmt_vec_infos.
2860 (vec_info::add_stmt): Remove vinfo argument from call to
2863 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2865 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
2866 rather than a gimple stmt.
2867 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
2868 information for pattern statements when passed the original
2869 statement; instead wait to be passed the pattern statement itself.
2870 Don't call set_vinfo_for_stmt here.
2871 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
2872 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
2873 stmt_vec_infos here.
2874 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
2875 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
2876 stmt_vec_infos entry.
2878 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2880 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
2881 * tree-vectorizer.c (vec_info::replace_stmt): New function.
2882 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
2883 * tree-vect-stmts.c (vectorizable_call): Likewise.
2884 (vectorizable_simd_clone_call): Likewise.
2886 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2888 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
2889 * tree-vectorizer.c (vec_info::remove_stmt): New function.
2890 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
2891 * tree-vect-loop.c (vect_transform_loop): Likewise.
2892 * tree-vect-slp.c (vect_schedule_slp): Likewise.
2893 * tree-vect-stmts.c (vect_remove_stores): Likewise.
2895 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2897 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
2898 (vect_dr_stmt): Delete.
2899 * tree-vectorizer.c (vec_info::lookup_dr): New function.
2900 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
2902 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
2903 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
2904 (vect_verify_datarefs_alignment, vect_peeling_supportable)
2905 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
2906 (vect_analyze_data_refs): Likewise.
2907 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
2909 (vect_find_same_alignment_drs): Likewise.
2910 (vect_slp_analyze_node_dependences): Update calls accordingly.
2911 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
2912 instead of DR_VECT_AUX.
2913 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
2914 of a vector data references. Use vec_info::lookup_dr instead of
2916 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
2917 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
2918 instead of DR_VECT_AUX.
2920 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2922 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
2924 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
2926 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2927 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2928 (vect_gen_prolog_loop_niters): Likewise.
2930 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2932 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
2933 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
2934 (vect_known_alignment_in_bytes, vect_dr_behavior)
2935 (vect_get_scalar_dr_size): Take references as dr_vec_infos
2936 instead of data_references. Update calls to other routines for
2937 which the same change has been made.
2938 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
2939 dr_vec_infos instead of stmt_vec_infos.
2940 (vect_analyze_data_ref_dependence): Update call accordingly.
2941 (vect_slp_analyze_data_ref_dependence)
2942 (vect_record_base_alignments): Use DR_VECT_AUX.
2943 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
2944 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
2945 (vector_alignment_reachable_p, vect_get_data_access_cost)
2946 (vect_peeling_supportable, vect_analyze_group_access_1)
2947 (vect_analyze_group_access, vect_analyze_data_ref_access)
2948 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
2949 (vect_compile_time_alias, vect_small_gap_p)
2950 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
2951 (vect_supportable_dr_alignment): Take references as dr_vec_infos
2952 instead of data_references. Update calls to other routines for
2953 which the same change has been made.
2954 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
2955 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
2956 (vect_slp_analyze_and_verify_node_alignment)
2957 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
2958 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
2959 (vect_setup_realignment): Use dr_vec_infos. Update calls after
2961 (_vect_peel_info::dr): Replace with...
2962 (_vect_peel_info::dr_info): ...this new field.
2963 (vect_peeling_hash_get_most_frequent)
2964 (vect_peeling_hash_choose_best_peeling): Update accordingly.
2965 (vect_peeling_hash_get_lowest_cost):
2966 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
2967 routines for which the same change has been made.
2968 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
2970 * tree-vect-loop-manip.c (get_misalign_in_elems)
2971 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
2973 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2974 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
2975 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
2976 (get_group_load_store_type, get_negative_load_store_type)
2977 (vect_get_data_ptr_increment, vectorizable_store)
2978 (vectorizable_load): Likewise.
2979 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
2980 Update calls to other routines for which the same change has been made.
2982 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2984 * tree-vectorizer.h (vec_info::move_dr): New member function.
2985 (dataref_aux): Rename to...
2986 (dr_vec_info): ...this and add "dr" and "stmt" fields.
2987 (_stmt_vec_info::dr_aux): Update accordingly.
2988 (_stmt_vec_info::data_ref_info): Delete.
2989 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
2990 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
2991 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
2992 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
2994 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
2995 (STMT_VINFO_DR_INFO): New macro.
2996 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
2997 (set_dr_misalignment): Update after rename of dataref_aux.
2998 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
2999 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
3000 initialization of STMT_VINFO_DATA_REF.
3001 * tree-vectorizer.c (vec_info::move_dr): New function.
3002 * tree-vect-patterns.c (vect_recog_bool_pattern)
3003 (vect_recog_mask_conversion_pattern)
3004 (vect_recog_gather_scatter_pattern): Use it.
3005 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
3006 the "dr" and "stmt" fields of dr_vec_info instead of
3007 STMT_VINFO_DATA_REF.
3009 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3011 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
3012 (is_pattern_stmt_p): Use it.
3013 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
3014 on pattern statements.
3016 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3018 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
3019 original stmt as a stmt_vec_info rather than a gimple stmt.
3020 (vect_pattern_recog_1): Take the statement directly as a
3021 stmt_vec_info, rather than via a gimple_stmt_iterator.
3022 Update call to vect_mark_pattern_stmts.
3023 (vect_pattern_recog): Update calls accordingly.
3025 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3027 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
3028 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
3029 a vect_def_type for the first argument.
3030 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
3031 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
3032 operand if it isn't defined by a vectorized statement.
3033 (vect_build_gather_load_calls): Remove the mask_dt argument and
3034 update calls to vect_get_vec_def_for_stmt_copy.
3035 (vectorizable_bswap): Likewise the dt argument.
3036 (vectorizable_call): Update calls to vectorizable_bswap and
3037 vect_get_vec_def_for_stmt_copy.
3038 (vectorizable_simd_clone_call, vectorizable_assignment)
3039 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
3040 (vectorizable_comparison): Update calls to
3041 vect_get_vec_def_for_stmt_copy.
3042 (vectorizable_store): Likewise. Remove now-unnecessary calls to
3044 (vect_get_loop_based_defs): Remove dt argument and update call
3045 to vect_get_vec_def_for_stmt_copy.
3046 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
3047 and vect_get_vec_def_for_stmt_copy.
3048 (vectorizable_load): Update calls to vect_build_gather_load_calls
3049 and vect_get_vec_def_for_stmt_copy.
3050 * tree-vect-loop.c (vect_create_epilog_for_reduction)
3051 (vectorizable_reduction, vectorizable_live_operation): Update calls
3052 to vect_get_vec_def_for_stmt_copy.
3054 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3056 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
3057 and gimple stmt arguments with a stmt_vec_info.
3058 (vect_record_base_alignments): Update calls accordingly.
3059 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
3060 and gimple stmt arguments with a stmt_vec_info.
3061 (vect_build_slp_tree_1): Remove vinfo argument and update call
3062 to vect_record_max_nunits.
3063 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
3064 and vect_record_max_nunits.
3066 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3068 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
3069 file and take a stmt_vec_info instead of a gimple stmt.
3070 (supportable_widening_operation, vect_finish_replace_stmt)
3071 (vect_finish_stmt_generation, vect_get_store_rhs)
3072 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
3073 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
3074 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
3075 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
3076 (vect_create_data_ref_ptr, bump_vector_ptr)
3077 (vect_permute_store_chain, vect_setup_realignment)
3078 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
3079 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
3080 (vectorizable_reduction, vectorizable_induction)
3081 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
3082 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
3083 than gimple stmts as arguments.
3084 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
3085 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
3086 (can_group_stmts_p, vect_check_gather_scatter)
3087 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3088 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
3089 (vect_permute_load_chain, vect_shift_permute_load_chain)
3090 (vect_transform_grouped_load)
3091 (vect_record_grouped_load_vectors): Likewise.
3092 * tree-vect-loop.c (vect_fixup_reduc_chain)
3093 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
3094 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
3095 (vectorizable_reduction, vectorizable_induction)
3096 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
3097 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
3098 (vect_get_load_store_mask): Likewise.
3099 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
3100 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
3101 * tree-vect-stmts.c (vect_mark_relevant)
3102 (is_simple_and_all_uses_invariant)
3103 (exist_non_indexing_operands_for_use_p, process_use)
3104 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
3105 (vect_get_vec_def_for_operand, vect_get_vec_defs)
3106 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
3107 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
3108 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
3109 (get_negative_load_store_type, get_load_store_type)
3110 (vect_check_load_store_mask, vect_check_store_rhs)
3111 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
3112 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3113 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3114 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3115 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
3116 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
3117 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
3118 (supportable_widening_operation): Likewise.
3120 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3122 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
3123 a stmt_vec_info instead of a gcall.
3124 (vect_check_gather_scatter): Update call accordingly.
3125 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
3127 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
3128 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
3129 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
3130 instead of a gimple stmt.
3131 (vect_transform_loop): Update calls accordingly.
3132 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
3133 stmt_vec_infos instead of gimple stmts.
3134 (vect_analyze_slp_instance): Update use accordingly.
3135 * tree-vect-stmts.c (read_vector_array, write_vector_array)
3136 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
3137 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
3138 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
3139 (vect_gen_widened_results_half, vect_get_loop_based_defs)
3140 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
3141 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
3142 down to subroutines.
3144 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3146 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
3147 of the worklist from a vector of gimple stmts to a vector of
3149 * tree-vect-stmts.c (vect_mark_relevant, process_use)
3150 (vect_mark_stmts_to_be_vectorized): Likewise
3152 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3154 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
3155 statement before passing it to vect_analyze_stmt.
3156 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
3157 the chain of phi vector definitions. Track the exit phi via its
3159 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
3160 STMT_VINFO_REDUC_DEF.
3161 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
3162 stmt_vec_infos to handle the statement chains.
3163 (vect_get_slp_defs): Record the first statement in the node
3164 using a stmt_vec_info.
3165 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
3166 statements here and pass their stmt_vec_info down to subroutines.
3167 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
3168 down to vect_finish_stmt_generation.
3169 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
3170 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
3171 stmt_vec_infos to subroutines.
3172 (vect_remove_stores): Use stmt_vec_infos to handle the statement
3175 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3177 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
3178 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
3179 (vect_permute_store_chain, vect_setup_realignment)
3180 (vect_permute_load_chain, vect_shift_permute_load_chain)
3181 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
3182 stmts internally, and when passing values to other vectorizer routines.
3183 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
3184 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
3185 (vect_analyze_loop_operations, get_initial_def_for_reduction)
3186 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
3187 (vectorizable_reduction, vectorizable_induction)
3188 (vectorizable_live_operation, vect_transform_loop_stmt)
3189 (vect_transform_loop): Likewise.
3190 * tree-vect-patterns.c (vect_reassociating_reduction_p)
3191 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
3192 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
3193 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3194 (vect_slp_analyze_node_operations_1): Likewise.
3195 * tree-vect-stmts.c (vect_mark_relevant, process_use)
3196 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
3197 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
3198 (vect_finish_stmt_generation_1, get_group_load_store_type)
3199 (get_load_store_type, vect_build_gather_load_calls)
3200 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3201 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3202 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3203 (vectorizable_store, vectorizable_load, vectorizable_condition)
3204 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
3205 (supportable_widening_operation): Likewise.
3206 (vect_get_vector_types_for_stmt): Likewise.
3207 * tree-vectorizer.h (vect_dr_behavior): Likewise.
3209 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3211 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
3212 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
3213 (vect_permute_store_chain, vect_permute_load_chain)
3214 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
3215 repeated stmt_vec_info lookups.
3216 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
3217 (vect_update_ivs_after_vectorizer): Likewise.
3218 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
3219 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
3220 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
3221 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3222 (vect_bb_slp_scalar_cost): Likewise.
3223 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
3225 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3227 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
3228 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
3229 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
3230 to get gassigns and gcalls, rather than operating on generc gimple
3232 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
3233 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
3234 (vectorizable_load, vect_analyze_stmt): Likewise.
3235 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
3237 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3239 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
3240 return stmt_vec_infos rather than gimple stmts. Do not accept
3242 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
3244 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3245 Update use of get_later_stmt.
3246 (vect_get_constant_vectors): Update call accordingly.
3247 (vect_schedule_slp_instance): Likewise
3248 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
3249 (vect_slp_analyze_instance_dependence): Likewise.
3250 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
3252 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3254 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
3255 (stmt_info_for_cost::stmt_info): ...this new field.
3256 (add_stmt_costs): Update accordingly.
3257 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
3258 (vect_get_known_peeling_cost): Likewise.
3259 (vect_estimate_min_profitable_iters): Likewise.
3260 * tree-vect-stmts.c (record_stmt_cost): Likewise.
3262 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3264 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
3265 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3266 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3268 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
3270 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3272 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
3273 a gimple stmt to a stmt_vec_info.
3274 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
3276 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3278 * tree-vectorizer.h (vec_info::grouped_stores): Change from
3279 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3280 (_loop_vec_info::reduction_chains): Likewise.
3281 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
3283 * tree-vect-slp.c (vect_analyze_slp): Likewise.
3285 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3287 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
3288 a gimple stmt to a stmt_vec_info.
3289 (_stmt_vec_info::next_element): Likewise.
3290 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
3291 (vect_slp_analyze_and_verify_node_alignment)
3292 (vect_analyze_group_access_1, vect_analyze_group_access)
3293 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
3294 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
3295 (vect_supportable_dr_alignment): Update accordingly.
3296 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
3297 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
3298 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
3299 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
3300 * tree-vect-slp.c (vect_build_slp_tree_1)
3301 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
3302 (vect_split_slp_store_group, vect_analyze_slp_instance)
3303 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
3304 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
3305 (get_group_load_store_type, get_load_store_type)
3306 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
3307 (vect_transform_stmt, vect_remove_stores): Likewise.
3309 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3311 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
3313 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
3314 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
3315 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
3316 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
3317 (vector_alignment_reachable_p, vect_get_data_access_cost)
3318 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
3319 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
3320 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3321 (vect_analyze_group_access_1, vect_analyze_group_access)
3322 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
3323 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
3324 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
3325 result of vect_dr_stmt and use the stmt_vec_info instead of
3326 the associated gimple stmt.
3327 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3328 (vect_gen_prolog_loop_niters): Likewise.
3329 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3331 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3333 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
3334 to a vec<stmt_vec_info>.
3335 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
3336 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
3338 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
3339 to a vec<stmt_vec_info>.
3340 (bst_traits::value_type, bst_traits::value_type): Likewise.
3341 (bst_traits::hash): Update accordingly.
3342 (vect_get_and_check_slp_defs): Change the stmts parameter from
3343 a vec<gimple *> to a vec<stmt_vec_info>.
3344 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
3345 (vect_build_slp_tree): Likewise.
3346 (vect_build_slp_tree_2): Likewise. Update uses of
3347 SLP_TREE_SCALAR_STMTS.
3348 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
3349 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
3350 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
3351 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
3352 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
3353 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
3354 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
3355 (vect_get_constant_vectors, vect_get_slp_defs)
3356 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
3357 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
3358 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
3359 instead of gimple stmts.
3360 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
3361 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
3362 (vect_slp_analyze_instance_dependence): Update uses of
3363 SLP_TREE_SCALAR_STMTS.
3364 (vect_slp_analyze_and_verify_node_alignment): Likewise.
3365 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
3366 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
3367 (get_initial_defs_for_reduction): Likewise.
3368 (vect_create_epilog_for_reduction): Likewise.
3369 (vectorize_fold_left_reduction): Likewise.
3370 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
3371 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
3372 (can_vectorize_live_stmts): Likewise.
3374 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3376 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
3377 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3378 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
3380 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
3382 (gather_scalar_reductions): Update after above interface changes.
3383 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
3384 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
3386 (vect_force_simple_reduction): Likewise.
3387 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
3388 LOOP_VINFO_REDUCTIONS.
3389 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3391 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3393 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
3394 a gimple stmt to a stmt_vec_info.
3395 * tree-vect-loop.c (vect_active_double_reduction_p)
3396 (vect_force_simple_reduction, vectorizable_reduction): Update
3399 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3401 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
3402 vec<gimple *> to a vec<stmt_vec_info>.
3403 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
3404 the reduction_phis argument from a vec<gimple *> to a
3406 (vectorizable_reduction): Likewise the phis local variable that
3407 is passed to vect_create_epilog_for_reduction. Update for new type
3408 of SLP_TREE_VEC_STMTS.
3409 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
3410 (vectorizable_live_operation): Likewise.
3411 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
3412 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
3414 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3416 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
3417 a gimple stmt to a stmt_vec_info.
3418 (vectorizable_condition, vectorizable_live_operation)
3419 (vectorizable_reduction, vectorizable_induction): Pass back the
3420 vectorized statement as a stmt_vec_info.
3421 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
3422 use of STMT_VINFO_VEC_STMT.
3423 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
3424 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
3425 as stmt_vec_infos rather than gimple stmts.
3426 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
3428 (vectorizable_live_operation): Likewise.
3429 (vectorizable_reduction, vectorizable_induction): Likewise,
3430 updating use of STMT_VINFO_VEC_STMT.
3431 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
3432 of STMT_VINFO_VEC_STMT.
3433 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
3434 (vectorizable_simd_clone_call, vectorizable_conversion)
3435 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3436 (vectorizable_store, vectorizable_load, vectorizable_condition)
3437 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
3438 from a gimple stmt to a stmt_vec_info.
3439 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
3440 pointer to a stmt_vec_info to the vectorizable_* routines.
3442 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3444 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
3445 a gimple stmt to a stmt_vec_info.
3446 (is_pattern_stmt_p): Update accordingly.
3447 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
3448 (vect_record_grouped_load_vectors): Likewise.
3449 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
3450 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
3451 (vect_model_reduction_cost): Likewise.
3452 (vect_create_epilog_for_reduction): Likewise.
3453 (vectorizable_reduction, vectorizable_induction): Likewise.
3454 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3455 Return the stmt_vec_info for the pattern statement.
3456 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
3457 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
3458 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
3459 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
3460 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
3461 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
3462 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
3463 (free_stmt_vec_info, vect_is_simple_use): Likewise.
3465 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3467 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
3468 (vect_finish_stmt_generation): Likewise.
3469 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3470 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
3471 (vect_build_gather_load_calls): Use the return value of the above
3472 functions instead of a separate call to vinfo_for_stmt. Use narrow
3473 scopes for the input gimple stmt and wider scopes for the associated
3474 stmt_vec_info. Use vec_info::lookup_def when setting these
3475 stmt_vec_infos from an SSA_NAME definition.
3476 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3477 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3478 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3479 (vectorizable_store, vectorizable_load, vectorizable_condition)
3480 (vectorizable_comparison): Likewise.
3481 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
3482 (vectorizable_reduction): Likewise.
3484 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3486 * tree-vectorizer.h (vect_is_simple_use): Add an optional
3487 stmt_vec_info * parameter before the optional gimple **.
3488 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3489 (process_use, vect_get_vec_def_for_operand_1): Update callers.
3490 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
3491 * tree-vect-loop.c (vectorizable_reduction): Likewise.
3492 (vectorizable_live_operation): Likewise.
3493 * tree-vect-patterns.c (type_conversion_p): Likewise.
3494 (vect_look_through_possible_promotion): Likewise.
3495 (vect_recog_rotate_pattern): Likewise.
3496 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3498 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3500 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
3501 a typedef to a wrapper class.
3502 (NULL_STMT_VEC_INFO): New macro.
3503 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
3504 (stmt_vec_info::operator*): New function.
3505 (stmt_vec_info::operator gimple *): Likewise.
3506 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
3507 (add_stmt_costs): Likewise.
3508 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
3509 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
3510 (vect_get_known_peeling_cost): Likewise.
3511 (vect_estimate_min_profitable_iters): Likewise.
3512 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3513 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
3514 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3515 (vectorizable_store, free_stmt_vec_infos): Likewise.
3516 (new_stmt_vec_info): Change return type of xcalloc to
3519 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3521 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
3522 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
3523 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
3524 a single_imm_use-based sequence.
3525 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
3527 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3529 * tree-vectorizer.h (vec_info::lookup_def): Declare.
3530 * tree-vectorizer.c (vec_info::lookup_def): New function.
3531 * tree-vect-patterns.c (vect_get_internal_def): Use it.
3532 (vect_widened_op_tree): Likewise.
3533 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3534 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
3535 (vectorizable_reduction): Likewise.
3536 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
3538 (vect_is_slp_reduction): Update calls accordingly. Use
3539 vec_info::lookup_def.
3540 (vect_is_simple_reduction): Likewise
3541 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
3543 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3545 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
3546 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
3547 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
3549 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
3550 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
3551 (vect_update_vf_for_slp, vect_analyze_loop_operations)
3552 (vect_is_slp_reduction, vectorizable_induction)
3553 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
3554 * tree-vect-patterns.c (vect_init_pattern_stmt):
3555 (vect_determine_min_output_precision_1, vect_determine_precisions)
3556 (vect_pattern_recog): Likewise.
3557 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
3558 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
3559 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
3560 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
3561 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
3562 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
3563 info field from a loop to a loop_vec_info.
3565 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3567 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
3568 (vec_info::add_stmt): Declare.
3569 * tree-vectorizer.c (vec_info::add_stmt): New function.
3570 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
3571 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
3572 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
3573 (vectorizable_induction): Likewise.
3574 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
3575 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3576 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
3577 (vectorizable_load): Likewise.
3578 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3579 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
3580 (vect_recog_gather_scatter_pattern): Likewise.
3581 (append_pattern_def_seq): Likewise. Remove a check that is
3582 performed by add_stmt itself.
3584 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3586 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
3587 which make_ssa_name was called with new_stmt before new_stmt
3590 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3592 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
3594 (vect_is_slp_reduction): ...here...
3595 (vect_is_simple_reduction): ...and here. Remove repetition of tests
3596 that are already known to be false.
3598 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3600 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
3601 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
3602 STMT_VINFO_NUM_SLP_USES when it's true.
3603 (vect_free_slp_instance): Add a final_p parameter and pass it to
3605 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
3606 (vect_analyze_slp_instance): Likewise.
3607 (vect_slp_analyze_operations): Likewise.
3608 (vect_slp_analyze_bb_1): Likewise.
3609 * tree-vectorizer.c (vec_info): Likewise.
3610 * tree-vect-loop.c (vect_transform_loop): Likewise.
3612 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3614 * tree-vect-loop.c (vectorizable_reduction): Assert that the
3615 function is not called for second and subsequent members of
3618 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3620 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
3621 cases for nested loops from here to ...
3622 (vect_create_epilog_for_reduction): ...here. Only call
3623 vect_is_simple_use for inner-loop reductions.
3625 2018-07-31 Martin Liska <mliska@suse.cz>
3627 PR gcov-profile/85338
3628 PR gcov-profile/85350
3629 PR gcov-profile/85372
3630 * profile.c (struct location_triplet): New.
3631 (struct location_triplet_hash): Likewise.
3632 (output_location): Do not output a BB that
3633 is already recorded for a line.
3634 (branch_prob): Use streamed_locations.
3636 2018-07-31 Martin Liska <mliska@suse.cz>
3638 PR gcov-profile/85370
3639 * coverage.c (coverage_begin_function): Do not mark target
3640 clones as artificial functions.
3642 2018-07-31 Martin Liska <mliska@suse.cz>
3644 PR gcov-profile/83813
3645 PR gcov-profile/84758
3646 PR gcov-profile/85217
3647 PR gcov-profile/85332
3648 * profile.c (branch_prob): Do not record GOTO expressions
3649 for GIMPLE statements which locations are already streamed.
3651 2018-07-31 Olivier Hainque <hainque@adacore.com>
3653 * gcc.c (handle_spec_function): Accept a soft_matched_part
3654 argument, as do_spec_1. Pass it down to ...
3655 (eval_spec_function): Accept a soft_matched_part argument,
3656 and pass it down to ...
3657 (do_spec_2): Accept a soft_matched_part argument, and pass
3658 it down to do_spec_1.
3659 (do_spec_1): Pass soft_matched_part to handle_spec_function.
3660 (handle_braces): Update call to handle_spec_function.
3661 (driver::set_up_specs): Update calls to do_spec_2.
3662 (compare_debug_dump_opt_spec_function): Likewise.
3663 (compare_debug_self_opt_spec_function): Likewise.
3665 2018-07-31 Olivier Hainque <hainque@adacore.com>
3667 * common.opt (nolibc): New option.
3668 * doc/invoke.texi (Link Options): Document it.
3669 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
3670 * config/alpha/linux.h: Likewise.
3671 * config/arc/elf.h: Likewise.
3672 * config/arm/uclinux-elf.h: Likewise.
3673 * config/arm/unknown-elf.h: Likewise.
3674 * config/avr/avrlibc.h: Likewise.
3675 * config/bfin/bfin.h: Likewise.
3676 * config/bfin/linux.h: Likewise.
3677 * config/bfin/uclinux.h: Likewise.
3678 * config/darwin.h: Likewise.
3679 * config/darwin10.h: Likewise.
3680 * config/darwin12.h: Likewise.
3681 * config/gnu-user.h: Likewise.
3682 * config/lm32/uclinux-elf.h: Likewise.
3683 * config/pa/pa-hpux11.h: Likewise.
3684 * config/pa/pa64-hpux.h: Likewise.
3685 * config/sparc/sparc.h: Likewise.
3687 2018-07-31 Olivier Hainque <hainque@adacore.com>
3689 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
3690 undefined variables.
3692 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
3695 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
3698 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
3700 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
3701 terminated string literal.
3703 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
3705 PR rtl-optimization/85160
3706 * combine.c (is_just_move): New function.
3707 (try_combine): Allow combining two instructions into two if neither of
3708 the original instructions was a move.
3710 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
3713 * doc/extend.texi (Global Register Variables): Discourage use of type
3715 (Local Register Variables): Likewise.
3717 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
3719 PR tree-optimization/86506
3720 * hwint.h (ceil_log2): Resync with hwint.c implementation.
3722 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
3725 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
3726 hard_regno, make sure no insn between `from` and `to` clobbers it.
3728 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
3729 Tom de Vries <tdevries@suse.de>
3731 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
3732 (PTX_DEFAULT_RUNTIME_DIM): ... this.
3733 (nvptx_goacc_validate_dims): Set default worker and gang dims to
3734 PTX_DEFAULT_RUNTIME_DIM.
3735 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
3737 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
3739 * config/pa/pa.c (pa_output_addr_vec): Align address table.
3740 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
3741 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
3743 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
3745 * config/rs6000/constraints.md (wG constraint): Delete, no longer
3747 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
3748 predicate to reflect toc fusion has been deleted.
3749 (toc_fusion_mem_raw): Delete, no longer used.
3750 (toc_fusion_mem_wrapped): Likewise.
3751 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
3753 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
3754 Delete, no longer used.
3755 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
3756 meant to be used for toc fusion.
3757 (rs6000_debug_print_mode): Delete toc fusion debugging.
3758 (rs6000_debug_reg_global): Likewise.
3759 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
3760 fusion and secondary reload support that were never used.
3761 (rs6000_option_override_internal): Delete TOC fusion, that was only
3762 partially defined, and it did not work unless you also used the
3764 (rs6000_legitimate_address_p): Delete TOC fusion support.
3765 (rs6000_opt_masks): Likewise.
3766 (fusion_wrap_memory_address): Delete function, no longer used.
3767 (fusion_split_address); Delete TOC fusion support.
3768 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
3769 longer used with toc fusion being deleted.
3770 (TARGET_TOC_FUSION_FP): Likewise.
3771 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
3773 (toc fusion spliter): Delete TOC fusion support.
3774 (toc_fusionload_<mode>): Likewise.
3775 (toc_fusionload_di): Likewise.
3776 (fusion_gpr_load_<mode>): Delete generator function, this insn no
3777 longer needs to be named. Rename predicate to delete TOC fusion.
3778 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
3779 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
3780 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
3781 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
3782 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
3784 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
3786 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
3787 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
3788 __int128 in built-in function prototypes.
3789 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
3790 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
3792 2018-07-27 Martin Sebor <msebor@redhat.com>
3794 PR tree-optimization/86696
3795 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
3796 types, including enums.
3797 (handle_char_store): Be prepared for the above function to fail.
3799 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
3801 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
3802 when optimization level is lower than 2 or optimize for size.
3804 2018-07-26 Martin Sebor <msebor@redhat.com>
3806 PR tree-optimization/86043
3807 PR tree-optimization/86042
3808 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
3809 (get_string_cst_length): Rename...
3810 (get_min_string_length): ...to this. Add argument.
3811 (handle_char_store): Extend to handle multi-character stores by
3813 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
3814 * tree.h (initializer_zerop): Add argument.
3816 2018-07-26 Jakub Jelinek <jakub@redhat.com>
3819 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
3820 declare target to variables if they have always,{to,from,tofrom} map
3823 2018-07-26 Martin Liska <mliska@suse.cz>
3826 * lto-wrapper.c: Add linker_output as prefix
3827 for ltrans_output_file.
3829 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
3831 PR rtl-optimization/85805
3832 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
3833 value for hard registers if that was written in the same mode.
3835 2018-07-26 Martin Liska <mliska@suse.cz>
3837 PR gcov-profile/86536
3838 * gcov.c (format_gcov): Use printf format %.*f directly
3839 and do not handle special values.
3841 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3843 * common/config/arc/arc-common.c (arc_option_optimization_table):
3844 Update default optimizations for size.
3846 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3848 * config/arc/arc.md (movsf_insn): Add short instruction selection.
3849 * config/arc/constraints.md (CfZ): New constraint.
3850 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
3851 (subsf3_fpu): Likewise.
3852 (cmpsf_fpu): Likewise.
3853 (cmpsf_fpu_uneq): Likewise.
3855 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3857 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
3859 (arc_is_uncached_mem_p): uncached applies to both the variable and
3862 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3864 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
3867 2018-07-25 David Malcolm <dmalcolm@redhat.com>
3869 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
3870 field "m_scopes" from vec to auto_vec.
3872 2018-07-25 Martin Liska <mliska@suse.cz>
3874 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
3877 2018-07-25 Richard Biener <rguenther@suse.de>
3880 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
3881 special wrt context_die late.
3882 (gen_subprogram_die): Re-use DIEs in local scope.
3884 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
3886 PR tree-optimization/86644
3887 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
3889 2018-07-25 Martin Liska <mliska@suse.cz>
3892 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
3893 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
3895 2018-07-25 Martin Liska <mliska@suse.cz>
3898 * params.def: Explain ASan abbreviation and provide
3899 a documentation link.
3901 2018-07-24 Martin Sebor <msebor@redhat.com>
3903 PR tree-optimization/86622
3904 PR tree-optimization/86532
3905 * builtins.h (string_length): Declare.
3906 * builtins.c (c_strlen): Correct handling of non-constant offsets.
3907 (check_access): Be prepared for non-constant length ranges.
3908 (string_length): Make extern.
3909 * expr.c (string_constant): Only handle the minor non-constant
3910 array index. Use string_constant to compute the length of
3911 a generic string constant.
3913 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
3915 PR tree-optimization/86618
3916 * tree-vect-stmts.c (vectorizable_call): Don't take the address
3917 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
3919 2018-07-24 David Malcolm <dmalcolm@redhat.com>
3921 PR tree-optimization/86636
3922 * json.cc (json::object::set): Fix comment. Add assertions.
3923 (json::array::append): Move here from json.h. Add comment and an
3925 (json::string::string): Likewise.
3926 * json.h (json::array::append): Move to json.cc.
3927 (json::string::string): Likewise.
3928 * optinfo-emit-json.cc
3929 (optrecord_json_writer::impl_location_to_json): Assert that we
3930 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
3931 wrapper around it. Expand the location once, rather than three
3933 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
3934 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
3936 (optrecord_json_writer::optinfo_to_json): Likewise, in four
3937 places. Fix some overlong lines.
3939 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
3941 * config/aarch64/aarch64-simd.md
3942 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
3943 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
3944 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
3945 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
3946 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
3947 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
3948 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
3949 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
3950 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
3952 2018-07-24 Jakub Jelinek <jakub@redhat.com>
3955 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
3956 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
3957 and abs_d == d, do the power of two handling if profitable.
3959 2018-07-24 Richard Biener <rguenther@suse.de>
3961 * match.pd: Add BIT_FIELD_REF canonicalizations.
3963 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
3966 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
3968 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
3970 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
3971 terminated STRING_CST object.
3973 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
3975 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
3977 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
3979 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
3980 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
3981 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
3982 the elements into a register.
3983 (rs6000_split_v4si_init_di_reg): Delete.
3984 (rs6000_split_v4si_init): Delete.
3985 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
3986 (vsx_init_v4si): Rewrite as a define_expand.
3988 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
3990 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
3991 zero_extend argument from memory): New.
3993 2018-07-22 Martin Sebor <msebor@redhat.com>
3996 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
3997 diagnosing calls with unknown arguments unless -Walloca-larger-than
3998 is restricted to less than PTRDIFF_MAX bytes.
4000 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
4002 * doc/gcov.texi (Invoking Gcov): Editorial changes.
4004 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4006 * pretty-print.c (text_info::set_location): Remove redundant
4007 "line_table" parameter from call to rich_location::set_range.
4009 2018-07-20 Martin Sebor <msebor@redhat.com>
4012 * builtins.c (expand_builtin_alloca): Adjust.
4013 * calls.c (alloc_max_size): Simplify.
4014 * cgraphunit.c (cgraph_node::expand): Adjust.
4015 * common.opt (larger_than_size, warn_frame_larger_than): Remove
4017 (frame_larger_than_size): Same.
4018 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
4019 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
4021 * doc/invoke.texi (GCC Command Options): Document option arguments.
4022 Explain byte-size arguments and suffixes.
4023 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
4024 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
4025 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
4026 * doc/options.texi (UInteger): Expand.
4027 (Host_Wide_Int, ByteSize): Document new properties.
4028 * final.c (final_start_function_1): Include sizes in an error message.
4029 * function.c (frame_offset_overflow): Same.
4030 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
4031 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
4032 Diagnose unbounded alloca calls only for limits of less than
4034 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
4035 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
4037 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
4038 only for limits of less than PTRDIFF_MAX.
4039 * langhooks-def.h (lhd_handle_option): Change function argument
4041 * langhooks.c (lhd_handle_option): Same.
4042 * langhooks.h (handle_option): Same.
4043 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
4045 (var_type, var_type_struct): Same.
4046 (var_set): Handle ByteSize flag.
4047 * optc-gen.awk: Add comments to output to ease debugging. Make
4048 use of HOST_WIDE_INT where appropriate.
4049 * opts-gen-save.awk: Use %lx to format unsigned long.
4050 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
4051 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
4052 arguments. Parse bytes-size suffixes.
4053 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
4054 (enum_value_to_arg): Same.
4055 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
4056 (handle_option): Adjust.
4057 (generate_option): Change function argument to HOST_WIDE_INT.
4058 (cmdline_handle_error): Adjust.
4059 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
4060 (set_option): Change function argument to HOST_WIDE_INT.
4061 (option_enabled): Handle cl_host_wide_int.
4062 (get_option_state): Handle CLVC_SIZE.
4063 (control_warning_option): Same.
4064 * opts.c (common_handle_option): Change function argument to
4065 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
4066 OPT_Wvla_larger_than_.
4067 * opts.h (enum cl_var_type): Add an enumerator.
4068 * stor-layout.c (layout_decl): Print a more meaningful warning.
4069 * toplev.c (output_stack_usage): Adjust.
4071 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
4073 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
4074 call to inline_expand_builtin_string_cmp.
4075 (expand_builtin_strcmp): Likewise.
4076 (expand_builtin_strncmp): Likewise.
4077 (inline_string_cmp): Delete the last parameter, change char_type_node
4078 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
4080 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
4081 the inlining expansion on target where the type of the call has same or
4082 narrower precision than unsigned char.
4084 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4086 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
4087 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
4088 * common.opt (fsave-optimization-record): New option.
4089 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
4090 * doc/invoke.texi (-fsave-optimization-record): New option.
4091 * dumpfile.c: Include "optinfo-emit-json.h".
4092 (struct kv_pair): Move to coretypes.h.
4093 (optgroup_options): Make non-static.
4094 (dump_context::end_scope): Call
4095 optimization_records_maybe_pop_dump_scope.
4096 * dumpfile.h (optgroup_options): New decl.
4097 * json.cc: New file.
4099 * optinfo-emit-json.cc: New file.
4100 * optinfo-emit-json.h: New file.
4101 * optinfo.cc: Include "optinfo-emit-json.h".
4102 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
4103 (optinfo_enabled_p): Check optimization_records_enabled_p.
4104 (optinfo_wants_inlining_info_p): Likewise.
4105 * optinfo.h: Update comment.
4106 * profile-count.c (profile_quality_as_string): New function.
4107 * profile-count.h (profile_quality_as_string): New decl.
4108 (profile_count::quality): New accessor.
4109 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
4110 and optinfo_emit_json_cc_tests.
4111 * selftest.h (selftest::json_cc_tests): New decl.
4112 (selftest::optinfo_emit_json_cc_tests): New decl.
4113 * toplev.c: Include "optinfo-emit-json.h".
4114 (compile_file): Call optimization_records_finish.
4115 (do_compile): Call optimization_records_start.
4116 * tree-ssa-live.c: Include optinfo.h.
4117 (remove_unused_scope_block_p): Retain inlining information if
4118 optinfo_wants_inlining_info_p returns true.
4120 2018-07-20 Richard Biener <rguenther@suse.de>
4123 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
4124 to cover -flto-partition=none.
4126 2018-07-20 Martin Liska <mliska@suse.cz>
4128 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
4129 (get_decl_source_range): Remove unused function.
4131 2018-07-20 Richard Biener <rguenther@suse.de>
4133 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
4134 (struct vn_phi_s): Likewise.
4135 (struct vn_reference_s): Likewise.
4136 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
4137 for searching the slot of an entry known to be in the hash itself.
4138 (vn_phi_hasher::equal): Likewise.
4139 (vn_reference_hasher::equal): Likewise.
4140 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
4142 (optimistic_info, current_info): Remove, keeping only valid_info.
4143 (vn_reference_lookup_1): Remove fallback lookup.
4144 (vn_reference_lookup_2): Likewise.
4145 (vn_nary_op_lookup_1): Likewise.
4146 (vn_phi_lookup): Likewise.
4147 (vn_nary_build_or_lookup_1): Make sure to not chain the built
4149 (vn_reference_insert): Adjust, chain the inserted hash element
4150 at last_inserted_ref.
4151 (vn_reference_insert_pieces): Likewise.
4152 (visit_reference_op_call): Likewise.
4153 (vn_nary_op_insert_into): Chain the inserted hash element at
4155 (vn_nary_op_insert_pieces): Adjust.
4156 (vn_nary_op_insert): Likewise.
4157 (vn_nary_op_insert_stmt): Likewise.
4158 (vn_phi_insert): Adjust, chain the inserted hash element at
4160 (process_scc): Remove clearing and copying the optimistic
4161 table. Instead remove elements inserted during an optimistic
4162 iteration from the single table we maintain.
4163 (init_scc_vn): Adjust.
4164 (free_scc_vn): Likewise.
4165 (sccvn_dom_walker::record_cond): Likewise.
4166 (sccvn_dom_walker::after_dom_children): Likewise.
4168 2018-07-19 Martin Sebor <msebor@redhat.com>
4170 PR tree-optimization/84047
4171 PR tree-optimization/83776
4172 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
4173 (check_array_bounds): Call it.
4175 2018-07-19 Martin Sebor <msebor@redhat.com>
4177 * align.h (align_flags): Use member initialization.
4179 2018-07-19 David Malcolm <dmalcolm@redhat.com>
4181 * Makefile.in (OBJS): Add optinfo.o.
4182 * coretypes.h (class symtab_node): New forward decl.
4183 (struct cgraph_node): New forward decl.
4184 (class varpool_node): New forward decl.
4185 * dump-context.h: New file.
4186 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
4188 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
4189 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
4190 (set_alt_dump_file): Likewise.
4191 (dump_context::~dump_context): New dtor.
4192 (dump_gimple_stmt): Move implementation to...
4193 (dump_context::dump_gimple_stmt): ...this new member function.
4194 Add the stmt to any pending optinfo, creating one if need be.
4195 (dump_gimple_stmt_loc): Move implementation to...
4196 (dump_context::dump_gimple_stmt_loc): ...this new member function.
4197 Start a new optinfo and add the stmt to it.
4198 (dump_gimple_expr): Move implementation to...
4199 (dump_context::dump_gimple_expr): ...this new member function.
4200 Add the stmt to any pending optinfo, creating one if need be.
4201 (dump_gimple_expr_loc): Move implementation to...
4202 (dump_context::dump_gimple_expr_loc): ...this new member function.
4203 Start a new optinfo and add the stmt to it.
4204 (dump_generic_expr): Move implementation to...
4205 (dump_context::dump_generic_expr): ...this new member function.
4206 Add the tree to any pending optinfo, creating one if need be.
4207 (dump_generic_expr_loc): Move implementation to...
4208 (dump_context::dump_generic_expr_loc): ...this new member
4209 function. Add the tree to any pending optinfo, creating one if
4211 (dump_printf): Move implementation to...
4212 (dump_context::dump_printf_va): ...this new member function. Add
4213 the text to any pending optinfo, creating one if need be.
4214 (dump_printf_loc): Move implementation to...
4215 (dump_context::dump_printf_loc_va): ...this new member function.
4216 Start a new optinfo and add the stmt to it.
4217 (dump_dec): Move implementation to...
4218 (dump_context::dump_dec): ...this new member function. Add the
4219 value to any pending optinfo, creating one if need be.
4220 (dump_context::dump_symtab_node): New member function.
4221 (dump_context::get_scope_depth): New member function.
4222 (dump_context::begin_scope): New member function.
4223 (dump_context::end_scope): New member function.
4224 (dump_context::ensure_pending_optinfo): New member function.
4225 (dump_context::begin_next_optinfo): New member function.
4226 (dump_context::end_any_optinfo): New member function.
4227 (dump_context::s_current): New global.
4228 (dump_context::s_default): New global.
4229 (dump_scope_depth): Delete global.
4230 (dumpfile_ensure_any_optinfo_are_flushed): New function.
4231 (dump_symtab_node): New function.
4232 (get_dump_scope_depth): Reimplement in terms of dump_context.
4233 (dump_begin_scope): Likewise.
4234 (dump_end_scope): Likewise.
4235 (selftest::temp_dump_context::temp_dump_context): New ctor.
4236 (selftest::temp_dump_context::~temp_dump_context): New dtor.
4237 (selftest::verify_item): New function.
4238 (ASSERT_IS_TEXT): New macro.
4239 (ASSERT_IS_TREE): New macro.
4240 (ASSERT_IS_GIMPLE): New macro.
4241 (selftest::test_capture_of_dump_calls): New test.
4242 (selftest::dumpfile_c_tests): Call it.
4243 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
4244 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
4245 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
4246 descriptive comment.
4247 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
4248 (dump_node, dump_bb): Move these unrelated decls.
4249 (class dump_manager): Add leading comment.
4250 * optinfo.cc: New file.
4251 * optinfo.h: New file.
4253 2018-07-19 Michael Collison <michael.collison@arm.com>
4254 Richard Henderson <rth@redhat.com>
4256 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
4257 (subti): Handle op1 zero.
4258 (subvti4, usub4ti4): New.
4259 (*sub<GPI>3_compare1_imm): New.
4260 (sub<GPI>3_carryinCV): New.
4261 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
4262 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
4264 2018-07-19 Michael Collison <michael.collison@arm.com>
4265 Richard Henderson <rth@redhat.com>
4267 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
4268 (addti3): Create simpler code if low part is already known to be 0.
4269 (addvti4, uaddvti4): New.
4270 (*add<GPI>3_compareC_cconly_imm): New.
4271 (*add<GPI>3_compareC_cconly): New.
4272 (*add<GPI>3_compareC_imm): New.
4273 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
4274 handle constants within this pattern..
4275 (*add<GPI>3_compareV_cconly_imm): New.
4276 (*add<GPI>3_compareV_cconly): New.
4277 (*add<GPI>3_compareV_imm): New.
4278 (add<GPI>3_compareV): New.
4279 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
4280 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
4281 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
4282 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
4283 with 'comparison' operator.
4284 (*add<GPI>3_compareV_cconly_imm): Ditto.
4285 (*add<GPI>3_compareV_cconly): Ditto.
4286 (*add<GPI>3_compareV_imm): Ditto.
4287 (add<GPI>3_compareV): Ditto.
4288 (add<mode>3_carryinC): Ditto.
4289 (*add<mode>3_carryinC_zero): Ditto.
4290 (*add<mode>3_carryinC): Ditto.
4291 (add<mode>3_carryinV): Ditto.
4292 (*add<mode>3_carryinV_zero): Ditto.
4293 (*add<mode>3_carryinV): Ditto.
4295 2018-07-19 Michael Collison <michael.collison@arm.com>
4296 Richard Henderson <rth@redhat.com>
4298 * config/aarch64/aarch64-modes.def (CC_V): New.
4299 * config/aarch64/aarch64-protos.h
4300 (aarch64_addti_scratch_regs): Declare
4301 (aarch64_subvti_scratch_regs): Declare.
4302 (aarch64_expand_subvti): Declare.
4303 (aarch64_gen_unlikely_cbranch): Declare
4304 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
4305 for signed overflow using CC_Vmode.
4306 (aarch64_get_condition_code_1): Handle CC_Vmode.
4307 (aarch64_gen_unlikely_cbranch): New function.
4308 (aarch64_addti_scratch_regs): New function.
4309 (aarch64_subvti_scratch_regs): New function.
4310 (aarch64_expand_subvti): New function.
4312 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
4314 * config/aarch64/aarch64-option-extensions.def: New entry for profile
4316 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
4317 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
4320 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
4323 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
4324 address check not strict.
4326 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
4328 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
4330 (store_pair_lanes<mode>): Likewise.
4331 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
4332 enum value 'ADDR_QUERY_LDP_STP_N'.
4333 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
4334 (aarch64_print_address_internal): Add declaration.
4335 (aarch64_print_ldpstp_address): Remove.
4336 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
4337 (aarch64_print_operand): Change printing of 'y'.
4338 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
4339 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
4340 'true' rather than '1'.
4341 * config/aarch64/constraints.md (Uml): Likewise.
4342 (Uml): Rename to Umn.
4345 2018-07-19 Richard Biener <rguenther@suse.de>
4347 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
4349 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
4350 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
4351 (vn_reference_hasher): Likewise.
4352 (struct vn_tables_s): Remove obstack and alloc-pool members.
4353 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
4354 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
4355 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
4356 (vn_reference_insert_pieces): Likewise.
4357 (alloc_vn_nary_op_noinit): Adjust.
4358 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
4359 (vn_phi_eq): Adjust.
4360 (shared_lookup_phiargs): Remove.
4361 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
4362 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
4363 (visit_reference_op_call): Likewise.
4364 (copy_nary, copy_phi, copy_reference): Remove.
4365 (process_scc): Rewind the obstack when iterating. Do not
4366 copy the elements to valid_info but just move them from one
4367 hashtable to the other.
4368 (allocate_vn_table): Adjust.
4369 (free_vn_table): Likewise.
4370 (init_scc_vn): Likewise.
4371 (free_scc_vn): Likewise.
4373 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
4376 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
4377 indirect_return as function type attribute.
4378 (ix86_attribute_table): Change indirect_return to function
4380 * doc/extend.texi: Update indirect_return attribute.
4382 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
4384 * wide-int.h (widest2_int): New.
4385 * gimple-fold.c (arith_overflowed_p): Use it.
4386 * tree.h (widest2_int_cst): New.
4387 * tree-vrp.c (wide_int_binop_overflow): Rename from
4388 vrp_int_const_binop.
4389 Rewrite to work on trees.
4390 (extract_range_from_multiplicative_op_1): Abstract code to...
4391 (wide_int_range_min_max): ...here.
4392 (wide_int_range_cross_product): ...and here.
4393 (extract_range_from_binary_expr_1): Abstract overflow code to...
4394 (wide_int_range_mult_wrapping): ...here.
4395 * tree-vrp.h (wide_int_range_cross_product): New.
4396 (wide_int_range_mult_wrapping): New.
4398 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
4399 Julia Koval <julia.koval@intel.com>
4401 * config/i386/x86-tune-costs.h (skylake_memcpy,
4402 skylake_memset): Replace rep_prefix with unrolling for size 512.
4404 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
4407 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
4408 comparision with EQ_EXPR in last stmt.
4410 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
4412 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
4413 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
4414 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
4415 previously known as "PowerPC AltiVec Built-in Functions". Move
4416 some material to new subsubsections "PowerPC AltiVec Built-in
4417 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
4419 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
4420 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
4421 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
4422 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
4424 2018-07-18 Richard Biener <rguenther@suse.de>
4426 PR tree-optimization/86557
4427 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
4430 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
4432 * config/s390/s390.c (s390_function_profiler): Generate CFI.
4434 2018-07-17 Jeff Law <law@redhat.com>
4436 * config/arm/arm.c (get_label_padding): Update for recent
4437 changes to label_to_alignment.
4439 PR tree-optimization/86010
4440 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
4442 * config/mips/mips.c (vr4130_align_insns): Update for recent
4443 changes to label_to_alignment.
4445 * config/frv/frv.c (frv_label_align): Update for recent changes
4446 to label_to_alignment.
4448 * config/nios2/nios2.c (nios2_label_align): Update for recent
4449 changes which dropped ALIGN_LABELS_LOG.
4451 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
4453 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
4454 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
4456 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
4458 * config/arc/arc.c (arc_label_align): Use align_labels instead of
4459 deprecated align_labels_log.
4461 2018-07-17 Richard Biener <rguenther@suse.de>
4464 * dwarf2out.c (init_sections_and_labels): Always generate
4465 a debug_line_str_section for early LTO debug.
4466 (dwarf2out_finish): Reset debug_line_str_hash output early.
4467 Bump counter for extra dwarf5 .debug_loc labels to not conflict
4469 (dwarf2out_early_finish): Output debug_line_str.
4471 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
4473 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
4474 index register on z196 or later.
4476 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
4478 * config/s390/s390.c (s390_default_align): Set default function
4480 (s390_override_options_after_change): Call s390_default align.
4481 (s390_option_override_internal): Call s390_default_align.
4482 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
4484 2018-07-17 Jakub Jelinek <jakub@redhat.com>
4487 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
4488 to _looptemp_ clauses, other than the first two.
4490 2018-07-17 Martin Liska <mliska@suse.cz>
4492 * opts.c: Do not enable OPT_falign_* for -Os.
4494 2018-07-17 Martin Liska <mliska@suse.cz>
4496 * align.h (MAX_CODE_ALIGN): New.
4497 (MAX_CODE_ALIGN_VALUE): New.
4498 * common/config/i386/i386-common.c (ix86_handle_option):
4499 (MAX_CODE_ALIGN): Moved to align.h.
4500 * final.c (MAX_CODE_ALIGN): Likewise.
4501 * opts.c (parse_and_check_align_values):
4502 (MAX_CODE_ALIGN): Likewise.
4503 (MAX_CODE_ALIGN_VALUE): Likewise.
4505 2018-07-17 Martin Liska <mliska@suse.cz>
4507 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
4508 in order to fulfil coding style.
4509 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
4510 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4511 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4512 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
4513 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
4514 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
4515 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
4516 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
4517 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4519 2018-07-17 Martin Liska <mliska@suse.cz>
4521 * align.h: New file.
4522 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
4524 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
4525 align_flags of label_to_alignment.
4526 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
4528 * config/m68k/m68k.c: Do not use removed align_labels_value and
4530 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
4531 (LOOP_ALIGN): Likewise.
4532 (LABEL_ALIGN): Likewise.
4533 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
4534 Remove not used macro.
4535 (rs6000_loop_align): Change return type to align_flags.
4536 (rs6000_loop_align_max_skip): Remove.
4537 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
4538 Change return type to align_flags.
4539 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
4540 Remove not used macro.
4541 (rs6000_loop_align): Change return type to align_flags.
4542 (rs6000_loop_align_max_skip): Remove.
4543 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
4544 * config/rx/rx-protos.h (rx_align_for_label): Make it
4546 * config/rx/rx.c (rx_align_for_label): Change return type
4548 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
4550 into align_flags class.
4551 (LABEL_ALIGN): Likewise.
4552 (LOOP_ALIGN): Likewise.
4553 * config/s390/s390.c (s390_label_align): Use align_flags
4555 (s390_asm_output_function_label): Likewise.
4556 * config/sh/sh.c (sh_override_options_after_change):
4557 Use align_flags class directly without macros.
4558 (find_barrier): Likewise.
4559 (barrier_align): Likewise.
4560 (sh_loop_align): Likewise.
4561 * config/spu/spu.c (spu_option_override):
4562 Use align_flags_tuple::get_value instead of removed macros.
4563 (spu_sched_init): Likewise.
4564 * config/spu/spu.h (GTY): Likewise.
4565 * config/visium/visium.c (visium_option_override):
4566 Set "8" as default secondary alignment.
4567 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
4568 in order to guarantee secondary alignment of 8.
4569 * coretypes.h: Include align.h header file.
4570 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
4571 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
4572 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
4573 * doc/tm.texi.in: Likewise.
4574 * final.c (struct label_alignment): Remove not used structure.
4575 (LABEL_ALIGN): Change type to align_flags.
4576 (LOOP_ALIGN): Likewise.
4577 (JUMP_ALIGN): Likewise.
4578 (default_loop_align_max_skip): Remove.
4579 (default_label_align_max_skip): Likewise.
4580 (default_jump_align_max_skip): Likewise.
4581 (default_label_align_after_barrier_max_skip):
4582 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
4583 (LABEL_TO_MAX_SKIP): Remove.
4584 (label_to_alignment): Return align_flags type instead of integer.
4585 (label_to_max_skip): Remove.
4586 (align_fuzz): Use align_flags type.
4587 (compute_alignments): Use align_flags type and use align_flags::max
4588 to combine multiple alignments.
4589 (grow_label_align): Grow vec instead of C array.
4590 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
4591 (shorten_branches): Use align_flags type and use align_flags::max
4592 to combine multiple alignments.
4593 (final_scan_insn_1): Remove usage of secondary alignment that comes
4594 from label alignment, but instead use proper secondary alignment
4595 which is computed in grow_label_align.
4596 * flags.h (struct align_flags_tuple): Move to align.h.
4597 (struct align_flags): Likewise.
4598 (state_align_loops): Rename to align_loops.
4599 (state_align_jumps): Rename to align_jumps.
4600 (state_align_labels): Rename to align_labels.
4601 (state_align_functions): Rename to align_functions.
4602 (align_loops_log): Remove.
4603 (align_jumps_log): Remove.
4604 (align_labels_log): Remove.
4605 (align_functions_log): Remove.
4606 (align_loops_max_skip): Remove.
4607 (align_jumps_max_skip): Remove.
4608 (align_labels_max_skip): Remove.
4609 (align_functions_max_skip): Remove.
4610 (align_loops_value): Remove.
4611 (align_jumps_value): Remove.
4612 (align_labels_value): Remove.
4613 (align_functions_value): Remove.
4614 * output.h (label_to_alignment): Change return type to align_flags.
4615 (label_to_max_skip): Remove.
4616 * target.def: Remove loop_align_max_skip, label_align_max_skip,
4617 jump_align_max_skip macros.
4618 * targhooks.h (default_loop_align_max_skip): Remove.
4619 (default_label_align_max_skip): Likewise.
4620 (default_jump_align_max_skip): Likewise.
4621 (default_label_align_after_barrier_max_skip): Remove.
4622 * toplev.c (read_log_maxskip): Use ::normalize function.
4623 (parse_N_M): Remove not used argument and also call ::normalize.
4624 (parse_alignment_opts): Do not pass unused arguments.
4625 * varasm.c (assemble_start_function): Use directly align_functions
4626 instead of removed macros.
4627 * system.h: Do not poison removed macros.
4629 2018-07-17 Jakub Jelinek <jakub@redhat.com>
4632 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
4633 and cond temporaries don't have reference type if iterator has
4634 pointer type. For init use &for_pre_body instead of pre_p if
4635 for_pre_body is non-empty.
4637 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
4639 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
4640 double-double modes to SFmode directly directly.
4641 (trunc<mode>sf2_fprs): Delete.
4643 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
4645 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
4646 for conversions between IFmode and the decimal floating point modes.
4647 (init_float128_ieee): Use the correct names for conversions between
4648 KFmode and the decimal floating point modes.
4650 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
4652 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
4653 for the conversions between TDmode and IFmode.
4654 (init_float128_ieee): Use more correct names for the conversions
4655 between TDmode and KFmode.
4657 2018-07-16 Jakub Jelinek <jakub@redhat.com>
4659 PR tree-optimization/86526
4660 * builtins.c (expand_builtin_memcmp): Formatting fixes.
4661 (inline_expand_builtin_string_cmp): Likewise.
4662 (inline_string_cmp): Likewise. Use c_readstr instead of
4663 builtin_memcpy_read_str. Add unit_mode temporary.
4665 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4668 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
4669 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
4671 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
4673 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
4674 Alphabetize prototypes of built-in functions, separating out
4675 built-in functions that are listed in this section but should be
4676 described elsewhere.
4678 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
4681 * expmed.c (emit_store_flag): Do not emit setcc followed by a
4682 conditional move when trapping comparison was split to a
4683 non-trapping one (and vice versa).
4685 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
4687 * config/s390/s390.c (s390_function_profiler): Generate nops
4688 instead of profiler call sequences.
4689 * config/s390/s390.opt: Add the new option.
4691 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
4693 * config/s390/s390.c (s390_function_profiler): Generate
4694 __mcount_loc section.
4695 * config/s390/s390.opt: Add the new option.
4697 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
4699 * common.opt: Add the new warning.
4700 * config/s390/s390.c (s390_function_profiler): Emit "brasl
4701 %r0,__fentry__" when -mfentry is specified.
4702 (s390_option_override_internal): Disallow -mfentry for 31-bit
4704 * config/s390/s390.opt: Add the new option.
4706 2018-07-16 Richard Biener <rguenther@suse.de>
4709 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
4710 for function-local FUNCTION_DECL and RESULT_DECL immediately.
4712 2018-07-16 Martin Liska <mliska@suse.cz>
4715 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
4718 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
4720 * config/arc/arcHS.md: Update ARCHS scheduling rules.
4722 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
4724 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
4726 * config/arc/arc-cpus.def (hs4x): New cpu.
4728 * config/arc/arc-tables.opt: Regenerate.
4729 * config/arc/arc.c (arc_sched_issue_rate): New function.
4730 (TARGET_SCHED_ISSUE_RATE): Define.
4731 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
4732 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
4734 (attr tune): Add ARCHS4x tune values.
4735 (attr tune_dspmpy): Define.
4736 (*tst): Correct instruction type.
4737 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
4738 * config/arc/arcHS4x.md: New file.
4739 * config/arc/fpu.md: Update instruction type attributes.
4740 * config/arc/t-multilib: Regenerate.
4742 2018-07-16 Tom de Vries <tdevries@suse.de>
4745 * var-tracking.c (vt_initialize): Fix pre_dec handling.
4747 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4749 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
4752 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
4754 PR tree-optimization/86514
4755 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
4756 conversion to a boolean type from a type with greater precision.
4758 2018-07-16 Tom de Vries <tdevries@suse.de>
4760 * var-tracking.c (vt_initialize): Print adjusted insn slim if
4761 dump_flags request TDF_SLIM.
4763 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
4765 * fold-const.c (int_const_binop_1): Abstract...
4766 (wide_int_binop): ...wide int code here.
4767 (poly_int_binop): ...poly int code here.
4768 Abstract the rest of int_const_binop_1 into int_const_binop.
4769 * fold-const.h (wide_int_binop): New.
4770 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
4771 Remove useless PLUS/MINUS_EXPR case.
4772 (zero_nonzero_bits_from_vr): Move wide int code...
4773 (zero_nonzero_bits_from_bounds): ...here.
4774 (extract_range_from_binary_expr_1): Move mask optimization code...
4775 (range_easy_mask_min_max): ...here.
4776 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
4777 (range_easy_mask_min_max): New.
4779 2018-07-15 Jeff Law <law@redhat.com>
4782 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
4785 2018-07-14 Jim Wilson <jimw@sifive.com>
4787 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
4789 2018-07-14 Paul Koning <ni1d@arrl.net>
4791 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
4793 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
4795 * lto-streamer-out.c (copy_function_or_variable): Dump info about
4798 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
4799 Steve Munroe <munroesj52@gmail.com>
4801 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
4802 (_mm_andnot_si128): Likewise.
4803 (_mm_or_si128): Likewise.
4804 (_mm_xor_si128): Likewise.
4806 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
4809 * builtins.c (expand_builtin_memcmp): Inline the calls first
4810 when result_eq is false.
4811 (expand_builtin_strcmp): Inline the calls first.
4812 (expand_builtin_strncmp): Likewise.
4813 (inline_string_cmp): New routine. Expand a string compare
4814 call by using a sequence of char comparison.
4815 (inline_expand_builtin_string_cmp): New routine. Inline expansion
4816 a call to str(n)cmp/memcmp.
4817 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
4819 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
4821 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
4823 * config/arm/driver-arm.c: Include arm-native.h.
4824 (host_detect_local_cpu): Use auto-generated data tables.
4825 (vendors, arm_cpu_table): Delete. Move part information to ...
4826 * config/arm/arm-cpus.in: ... here.
4827 * config/arm/parsecpu.awk (gen_native): New function.
4828 (vendor, part): New CPU fields.
4829 (END): Add support for building the native CPU detection tables.
4830 * config/arm/t-arm (arm-native.h): Add build rule.
4831 (driver-arm.o): Add dependency on arm-native.h.
4833 2018-07-13 Richard Biener <rguenther@suse.de>
4836 * match.pd (addr1 - addr2): Allow either of the operand to
4839 2018-07-13 Tom de Vries <tdevries@suse.de>
4841 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
4844 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
4846 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
4847 arrays instead of numbered variables.
4849 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
4851 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
4852 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
4854 2018-07-13 Richard Biener <rguenther@suse.de>
4857 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
4858 instead of get_context_die.
4860 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
4861 Richard Biener <rguenther@suse.de>
4864 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
4865 that the loop latch destination where phi is defined.
4867 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
4869 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
4870 (riscv_expand_epilogue): Add assertion to check interrupt mode.
4871 (riscv_set_current_function): Extract getting interrupt type to new
4873 (riscv_get_interrupt_type): New function.
4874 (riscv_merge_decl_attributes): New function, checking interrupt type is
4876 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
4878 2018-07-12 Paul Koning <ni1d@arrl.net>
4880 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
4883 2018-07-12 Paul Koning <ni1d@arrl.net>
4885 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
4886 zero reference, add doloop_end instead.
4887 * doc/md.texi (decrement_and_branch_until_zero): Remove.
4888 (Looping patterns): Remove decrement_and_branch_until_zero. Add
4889 detail for doloop_end.
4891 2018-07-12 Martin Sebor <msebor@redhat.com>
4894 * attribs.c (decl_attributes): Reject conflicting attributes before
4895 calling attribute handlers.
4897 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
4899 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
4901 (gcc::dump_manager::get_dump_file_name): likewise.
4902 (dump_begin): Likewise.
4903 * dumpfile.h (dump_begin): Update prototype.
4904 (gcc::dump_manager::get_dump_file_name,
4905 gcc::dump_manager::get_dump_file_name): Update prototype.
4907 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4909 * internal-fn.h (vectorizable_internal_fn_p): New function.
4910 * tree-vect-slp.c (compatible_calls_p): Likewise.
4911 (vect_build_slp_tree_1): Remove nops argument. Handle calls
4912 to internal functions.
4913 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
4915 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4917 * fold-const.h (inverse_conditions_p): Declare.
4918 * fold-const.c (inverse_conditions_p): New function.
4919 * match.pd: Use inverse_conditions_p. Add folds of view_converts
4920 that test the inverse condition of a conditional internal function.
4921 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
4922 * internal-fn.c (internal_fn_mask_index): Handle conditional
4924 (vectorized_internal_fn_supported_p): New function.
4925 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
4926 (any_pred_load_store): Replace with...
4927 (need_to_predicate): ...this new variable.
4928 (redundant_ssa_names): New variable.
4929 (ifcvt_can_use_mask_load_store): Move initial checks to...
4930 (ifcvt_can_predicate): ...this new function. Handle tree codes
4931 for which a conditional internal function exists.
4932 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
4933 instead of ifcvt_can_use_mask_load_store. Update after variable
4935 (predicate_load_or_store): New function, split out from
4936 predicate_mem_writes.
4937 (check_redundant_cond_expr): New function.
4938 (value_available_p): Likewise.
4939 (predicate_rhs_code): Likewise.
4940 (predicate_mem_writes): Rename to...
4941 (predicate_statements): ...this. Use predicate_load_or_store
4942 and predicate_rhs_code.
4943 (combine_blocks, tree_if_conversion): Update after above name changes.
4944 (ifcvt_local_dce): Handle redundant_ssa_names.
4945 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
4946 general conditional functions.
4947 * tree-vect-stmts.c (vectorizable_call): Likewise.
4949 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4950 Alan Hayward <alan.hayward@arm.com>
4951 David Sherwood <david.sherwood@arm.com>
4953 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
4954 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
4955 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
4956 plus and minus and convert them into IFN_COND_FMA-based sequences.
4957 (convert_mult_to_fma): Handle conditional plus and minus.
4959 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4961 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
4962 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
4963 (cond_fnms_optab): New optabs.
4964 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
4966 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
4967 * internal-fn.h (get_conditional_internal_fn): Declare.
4968 (get_unconditional_internal_fn): Likewise.
4969 * internal-fn.c (cond_ternary_direct): New macro.
4970 (expand_cond_ternary_optab_fn): Likewise.
4971 (direct_cond_ternary_optab_supported_p): Likewise.
4972 (FOR_EACH_COND_FN_PAIR): Likewise.
4973 (get_conditional_internal_fn): New function.
4974 (get_unconditional_internal_fn): Likewise.
4975 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
4976 (gimple_match_op::gimple_match_op): Add a new overload for 5
4978 (gimple_match_op::set_op): Likewise.
4979 (gimple_resimplify5): Declare.
4980 * genmatch.c (decision_tree::gen): Generate simplifications for
4982 * gimple-match-head.c (gimple_simplify): Define an overload for
4983 5 operands. Handle calls with 5 arguments in the top-level overload.
4984 (convert_conditional_op): Handle conversions from unconditional
4985 internal functions to conditional ones.
4986 (gimple_resimplify5): New function.
4987 (build_call_internal): Pass a fifth operand.
4988 (maybe_push_res_to_seq): Likewise.
4989 (try_conditional_simplification): Try converting conditional
4990 internal functions to unconditional internal functions.
4991 Handle 3-operand unconditional forms.
4992 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
4993 Define ternary equivalents of the current rules for binary conditional
4995 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
4997 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
4998 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
4999 (optab): Handle them.
5000 (SVE_COND_FP_TERNARY): New int iterator.
5001 (sve_fmla_op, sve_fmad_op): New int attributes.
5002 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
5003 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
5004 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
5006 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5008 * target.def (preferred_else_value): New target hook.
5009 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
5010 * doc/tm.texi: Regenerate.
5011 * targhooks.h (default_preferred_else_value): Declare.
5012 * targhooks.c (default_preferred_else_value): New function.
5013 * internal-fn.h (conditional_internal_fn_code): Declare.
5014 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
5015 (get_conditional_internal_fn): Use it.
5016 (conditional_internal_fn_code): New function.
5017 * gimple-match.h (gimple_match_cond): New struct.
5018 (gimple_match_op): Add a cond member function.
5019 (gimple_match_op::gimple_match_op): Update all forms to take a
5021 * genmatch.c (expr::gen_transform): Use the same condition as res_op
5022 for the suboperation, but don't specify a particular else_value.
5023 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
5024 (visit_nary_op, visit_reference_op_load): Pass
5025 gimple_match_cond::UNCOND to the gimple_match_op constructor.
5026 * gimple-match-head.c: Include tree-eh.h
5027 (convert_conditional_op): New function.
5028 (maybe_resimplify_conditional_op): Likewise.
5029 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
5030 (gimple_resimplify2): Likewise.
5031 (gimple_resimplify3): Likewise.
5032 (gimple_resimplify4): Likewise.
5033 (maybe_push_res_to_seq): Return null for conditional operations.
5034 (try_conditional_simplification): New function.
5035 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
5037 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
5039 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
5041 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
5043 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
5045 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
5047 (hash_tree): Do not hash DECL_FCONTEXT
5048 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
5049 Do not stream DECL_FCONTEXT.
5050 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
5051 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
5053 2018-07-12 Richard Biener <rguenther@suse.de>
5056 * dwarf2out.c (gen_block_die): Only output blocks when they have
5057 at least one !DECL_IGNORED_P variable.
5059 2018-07-12 Richard Biener <rguenther@suse.de>
5062 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
5063 Remove -mieee-fp handling.
5065 2018-07-12 Richard Biener <rguenther@suse.de>
5067 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
5068 left-over from last patch.
5070 2018-07-12 Jakub Jelinek <jakub@redhat.com>
5072 PR tree-optimization/86492
5073 * gimple-ssa-store-merging.c
5074 (imm_store_chain_info::coalesce_immediate_stores): Call
5075 check_no_overlap even for the merge_overlapping case. Formatting fix.
5077 2018-07-12 Richard Biener <rguenther@suse.de>
5080 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
5081 move possibly trapping operations into the conditional.
5083 2018-07-12 Richard Biener <rguenther@suse.de>
5085 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
5086 (vn_lookup_simplify_result): Remove recursion limit applied
5088 (vn_nary_build_or_lookup_1): Adjust.
5089 (try_to_simplify): Likewise.
5090 * gimple-match-head.c (gimple_resimplify1): Instead apply one
5092 (gimple_resimplify2): Likewise.
5093 (gimple_resimplify3): Likewise.
5094 (gimple_resimplify4): Likewise.
5096 2018-07-11 Jakub Jelinek <jakub@redhat.com>
5098 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
5099 Use __mmask64 type instead of __mmask8 for __M argument.
5100 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
5101 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
5103 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
5104 __mmask16 for __M argument.
5105 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
5106 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
5107 to __mmask16 instead of __mmask8.
5108 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
5109 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
5110 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
5111 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
5112 instead of __mmask16 for __U argument.
5113 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
5114 __mmask16 instead of __mmask8 for __U argument.
5115 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
5117 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
5119 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
5121 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
5123 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
5125 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
5127 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
5129 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
5131 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
5133 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
5135 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
5136 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
5137 return type as well as __M argument type and all casts from __mmask8
5139 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
5140 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
5141 return type as well as __M argument type and all casts from __mmask8
5143 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
5144 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
5145 return type as well as __M argument type and all casts from __mmask8
5147 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
5148 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
5149 return type as well as __M argument type and all casts from __mmask8
5151 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
5152 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
5155 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
5157 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
5158 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
5161 2018-07-11 Paul Koning <ni1d@arrl.net>
5163 * doc/md.texi (define_subst): Document how multiple occurrences of
5164 the same argument in the replacement pattern are handled.
5166 2018-07-11 Paul Koning <ni1d@arrl.net>
5168 * doc/extend.texi (Common Variable Attributes): Move "mode" into
5170 (Common Type Attributes): Add "mode" attribute.
5172 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
5174 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
5175 stream DECL_ORIGINAL_TYPE.
5176 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
5177 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
5178 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
5179 Do not walk original type.
5180 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
5182 (write_ts_decl_non_common_tree_pointers): Do not stream
5184 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
5185 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
5187 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
5189 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
5190 thread twice from the same starting edge.
5192 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
5194 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
5195 * gimple.c (gimple_call_nonnull_result_p): ...here...
5196 (gimple_call_nonnull_arg): ...and here.
5197 * gimple.h (gimple_call_nonnull_result_p): New.
5198 (gimple_call_nonnull_arg): New.
5200 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
5202 * config/arm/arm-cpus.in: Move information from fpu field of each
5203 cpu definition to the isa field.
5204 * config/arm/parsecpu.awk (fpu): Delete match rule.
5205 (gen_comm_data): Don't add bits from the CPU's FPU entry.
5207 2018-07-11 Richard Biener <rguenther@suse.de>
5210 * dwarf2out.c (init_sections_and_labels): Use
5211 output_asm_line_debug_info consistently.
5212 (dwarf2out_early_finish): Likewise.
5213 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
5216 2018-07-11 Richard Biener <rguenther@suse.de>
5218 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
5219 Rework father_bb setting in a way to avoid propagating constants
5220 multiple times on a loop body.
5222 2018-07-10 Mark Wielaard <mark@klomp.org>
5225 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
5227 2018-07-10 Richard Biener <rguenther@suse.de>
5229 * hash-map.h (hash_map::iterator::operator*): Return
5230 references to key and value.
5232 2018-07-10 Jakub Jelinek <jakub@redhat.com>
5235 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
5236 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
5237 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
5238 (gimplify_omp_for): For composite loops, move outer
5239 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
5240 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
5241 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
5242 TREE_LIST for both the original class iterator and the "last" helper
5243 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
5244 loop, remember has_decl_expr from outer composite loops for the
5245 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
5247 2018-07-09 Martin Sebor <msebor@redhat.com>
5251 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
5252 accessing implicitly initialized array elements.
5253 * expr.c (string_constant): Handle string initializers of
5254 character arrays within aggregates.
5255 * gimple-fold.c (fold_array_ctor_reference): Add argument.
5256 Store element offset. As a special case, handle zero size.
5257 (fold_nonarray_ctor_reference): Same.
5258 (fold_ctor_reference): Add argument. Store subobject offset.
5259 * gimple-fold.h (fold_ctor_reference): Add argument.
5261 2018-07-09 Paul Koning <ni1d@arrl.net>
5263 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
5264 (pdp11_insn_cost): New function.
5265 (pdp11_md_asm_adjust): New function.
5266 (TARGET_INVALID_WITHIN_DOLOOP): Define.
5267 (pdp11_rtx_costs): Update to match machine better.
5268 (output_addr_const_pdp11): Correct format mismatch warnings.
5269 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
5270 * config/pdp11/pdp11.md: General change to add base_cost and/or
5271 length attributes for use by new pdp11_insn_cost function.
5272 (MIN_BRANCH): Correct definition.
5274 (doloop_end): Use standard pattern name for looping pattern.
5275 (doloop_end_nocc): New.
5276 (movsf): Add another constraint alternative.
5277 (zero_extendqihi2): Add constraint alternatives for not in place
5279 (zero_extendhisi2): Remove.
5280 (shift patterns): Add CC handling variants.
5284 (define_peephole2): New peephole to recognize mov that sets CC for
5287 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5289 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
5290 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
5293 2018-07-09 Jakub Jelinek <jakub@redhat.com>
5296 * real.c (real_nextafter): Return true if result is denormal.
5298 2018-07-09 Martin Liska <mliska@suse.cz>
5300 * common.opt: Add back wrongly removed attribute.
5302 2018-07-09 Richard Biener <rguenther@suse.de>
5305 * dwarf2out.c (gen_block_die): For an early generated DIE
5306 always output high/low PC attributes.
5308 2018-07-09 Tom de Vries <tdevries@suse.de>
5310 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
5311 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
5312 onto VAR_DECL with abstract origin.
5314 2018-07-07 Jim Wilson <jimw@sifive.com>
5316 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
5318 2018-07-07 Tom de Vries <tdevries@suse.de>
5320 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
5322 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
5324 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
5326 (combine_bound): Use wide-int overflow calculation instead of
5328 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
5330 * fold-const.c (int_const_binop_2): Same.
5331 (extract_muldiv_1): Same.
5332 (fold_div_compare): Same.
5333 (fold_abs_const): Same.
5335 * poly-int.h (add): Same.
5339 * predict.c (predict_iv_comparison): Same.
5340 * profile-count.c (slow_safe_scale_64bit): Same.
5341 * simplify-rtx.c (simplify_const_binary_operation): Same.
5342 * tree-chrec.c (tree_fold_binomial): Same.
5343 * tree-data-ref.c (split_constant_offset_1): Same.
5344 * tree-if-conv.c (idx_within_array_bound): Same.
5345 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
5346 * tree-ssa-phiopt.c (minmax_replacement): Same.
5347 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
5348 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
5349 * vr-values.c (vr_values::adjust_range_with_scev): Same.
5350 * wide-int.cc (wi::add_large): Same.
5351 (wi::mul_internal): Same.
5352 (wi::sub_large): Same.
5353 (wi::divmod_internal): Same.
5354 * wide-int.h: Change overflow type to overflow_type for neg, add,
5355 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
5356 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
5357 mul_internal, divmod_internal.
5358 (overflow_type): New enum.
5359 (accumulate_overflow): New.
5361 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
5363 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
5364 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
5366 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
5368 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
5369 argument is checked for zero before entering loop, avoid checking again.
5371 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
5373 * gimplify.h (generic_expr_could_trap_p): Set as global function.
5374 * gimplify.h (generic_expr_could_trap_p): Likwise.
5375 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
5377 2018-07-06 Jakub Jelinek <jakub@redhat.com>
5379 PR tree-optimization/86401
5380 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
5381 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
5382 (fold_bit_and_mask): ... here. New helper function for match.pd.
5383 * fold-const.h (fold_bit_and_mask): Declare.
5384 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
5386 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
5389 * target.def (translate_mode_attribute): New hook.
5390 * targhooks.h (default_translate_mode_attribute): Declare.
5391 * targhooks.c (default_translate_mode_attribute): New function.
5392 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
5393 * doc/tm.texi: Regenerate.
5394 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
5395 (rs6000_translate_mode_attribute): New function.
5397 2018-07-06 Paul Koning <ni1d@arrl.net>
5399 * doc/md.texi (define_split): Document DONE and FAIL.
5400 (define_peephole2): Ditto.
5402 2018-07-05 Jeff Law <law@redhat.com>
5404 PR tree-optimization/86010
5405 * tree-ssa-dse.c (compute_trims): More aggressively trim at
5406 both the head and tail of mem* and str* calls.
5408 2018-07-05 Jim Wilson <jimw@sifive.com>
5410 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
5412 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
5414 * config/aarch64/aarch64-simd.md: correct flags text for
5415 MIN_EXPR replacement.
5417 2018-07-05 James Clarke <jrtc27@jrtc27.com>
5419 * configure: Regenerated.
5421 2018-07-05 Carl Love <cel@us.ibm.com>
5423 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
5424 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
5425 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
5426 VSX_BUILTIN_DOUBLEL_V4SF.
5428 2018-07-05 Martin Sebor <msebor@redhat.com>
5431 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
5432 than its domain to compute its the upper bound of a char array.
5434 2018-07-05 Nathan Sidwell <nathan@acm.org>
5436 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
5437 * doc/cpp.texi: Update comment.
5438 * doc/tm.texi: Rebuilt.
5439 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
5440 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
5441 * doc/extend.texi (Backwards Compatibility): Clarify it is system
5442 headers affected by extern "C".
5443 * system.h: Poison NO_IMPLICIT_EXTERN_C.
5444 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
5445 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
5446 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
5447 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
5448 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
5449 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
5450 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
5451 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
5452 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
5453 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
5454 config/sparc/sp64-elf.h, config/spu/spu.h,
5455 config/stormy16/stormy16.h, config/v850/v850.h,
5456 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
5457 define NO_IMPLICIT_EXTERN_C.
5458 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
5460 2018-07-05 Tamar Christina <tamar.christina@arm.com>
5463 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
5464 instead of GET_MODE_SIZE when comparing Units.
5466 2018-07-05 Tamar Christina <tamar.christina@arm.com>
5469 * rtlanal.c (set_noop_p): Constrain on mode change,
5470 include hard-reg-set.h
5472 2018-07-05 Tamar Christina <tamar.christina@arm.com>
5474 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
5476 2018-07-05 Jakub Jelinek <jakub@redhat.com>
5479 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
5482 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
5484 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
5486 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
5489 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
5491 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
5493 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
5496 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
5498 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
5500 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
5501 neg_*_op* variables.
5503 2018-07-04 Martin Liska <mliska@suse.cz>
5505 * tree-switch-conversion.c: Define
5506 max_ratio_for_speed and max_ratio_for_size constants.
5508 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
5509 Martin Liska <mliska@suse.cz>
5514 * common.opt: Rename align options with 'str_' prefix.
5515 * common/config/i386/i386-common.c (set_malign_value): New
5517 (ix86_handle_option): Use it to set -falign-* options/
5518 * config/aarch64/aarch64-protos.h (struct tune_params): Change
5519 type from int to string.
5520 * config/aarch64/aarch64.c: Update default values from int
5522 * config/alpha/alpha.c (alpha_override_options_after_change):
5524 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
5525 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5526 max skip conditionally.
5527 * config/i386/freebsd.h (SUBALIGN_LOG): New.
5528 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5529 max skip conditionally.
5530 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5531 max skip conditionally.
5532 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
5533 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5534 max skip conditionally.
5535 * config/i386/i386.c (struct ptt): Change type from int to
5537 (ix86_default_align): Set default values.
5538 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
5539 max skip conditionally.
5540 * config/i386/iamcu.h (SUBALIGN_LOG): New.
5541 (ASM_OUTPUT_MAX_SKIP_ALIGN):
5542 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
5543 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5544 max skip conditionally.
5545 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
5546 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
5547 * config/i386/x86-64.h (SUBALIGN_LOG): New.
5548 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5549 max skip conditionally.
5550 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5551 * config/ia64/ia64.c (ia64_option_override): Set default values
5552 for alignment options.
5553 * config/m68k/m68k.c: Handle new str_align_* options.
5554 * config/mips/mips.c (mips_set_compression_mode): Change
5556 (mips_option_override): Set default values for options.
5557 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
5559 * config/rs6000/rs6000.c (rs6000_option_override_internal):
5561 * config/rx/rx.c (rx_option_override): Likewise.
5562 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
5563 (LABEL_ALIGN): Use align_labels_log.
5564 (LOOP_ALIGN): Use align_loops_align.
5565 * config/s390/s390.c (s390_asm_output_function_label): Use new
5567 * config/sh/sh.c (sh_override_options_after_change):
5568 Change type of constants.
5569 * config/spu/spu.c (spu_sched_init): Likewise.
5570 * config/sparc/sparc.c (sparc_option_override): Set default
5572 * config/visium/visium.c (visium_option_override): Likewise.
5573 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
5574 emit p2align format with last argument if it's not needed.
5575 * doc/invoke.texi: Document extended format of -falign-*.
5576 * final.c: Use align_labels alignment.
5577 * flags.h (struct target_flag_state): Change type to use
5579 (struct align_flags_tuple): New.
5580 (struct align_flags): Likewise.
5581 (align_loops_log): Redefine macro to use new types.
5582 (align_loops_max_skip): Redefine macro to use new types.
5583 (align_jumps_log): Redefine macro to use new types.
5584 (align_jumps_max_skip): Redefine macro to use new types.
5585 (align_labels_log): Redefine macro to use new types.
5586 (align_labels_max_skip): Redefine macro to use new types.
5587 (align_functions_log): Redefine macro to use new types.
5588 (align_loops): Redefine macro to use new types.
5589 (align_jumps): Redefine macro to use new types.
5590 (align_labels): Redefine macro to use new types.
5591 (align_functions): Redefine macro to use new types.
5592 (align_functions_max_skip): Redefine macro to use new types.
5593 (align_loops_value): New macro.
5594 (align_jumps_value): New macro.
5595 (align_labels_value): New macro.
5596 (align_functions_value): New macro.
5597 * function.c (invoke_set_current_function_hook): Propagate
5598 alignment values from flags to global variables default in
5600 * ipa-icf.c (sem_function::equals_wpa): Use
5601 cl_optimization_option_eq instead of memcmp.
5602 * lto-streamer.h (cl_optimization_stream_out): Support streaming
5604 (cl_optimization_stream_in): Likewise.
5605 * optc-save-gen.awk: Support strings in cl_optimization.
5606 * opth-gen.awk: Likewise.
5607 * opts.c (finish_options): Remove error checking of invalid
5609 (MAX_CODE_ALIGN): Remove.
5610 (MAX_CODE_ALIGN_VALUE): Likewise.
5611 (parse_and_check_align_values): New function.
5612 (check_alignment_argument): Likewise.
5613 (common_handle_option): Use check_alignment_argument.
5614 * opts.h (parse_and_check_align_values): Declare.
5615 * toplev.c (init_alignments): Remove.
5616 (read_log_maxskip): New.
5617 (parse_N_M): Likewise.
5618 (parse_alignment_opts): Likewise.
5619 (backend_init_target): Remove usage of init_alignments.
5620 * toplev.h (parse_alignment_opts): Declare.
5621 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
5623 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
5624 * tree.c (cl_option_hasher::equal): New.
5625 * varasm.c: Use new global macros.
5627 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
5629 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
5630 Use a simpler align directive also if MAXSKIP = ALIGN-1.
5631 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5632 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5633 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5634 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5635 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
5636 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
5637 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
5638 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5639 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5640 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5641 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5643 2018-07-04 Martin Liska <mliska@suse.cz>
5644 Jonathan Wakely <jwakely@redhat.com>
5646 * coverage.c: Use correct type.
5647 * doc/invoke.texi: Language correction.
5649 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
5652 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
5653 ENDBRANCH for non-tail call which may return via indirect branch.
5654 * doc/extend.texi: Document indirect_return attribute.
5656 2018-07-03 Martin Sebor <msebor@redhat.com>
5658 PR tree-optimization/86274
5659 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
5661 (format_floating): Correct handling of infinities and NaNs.
5663 2018-07-03 Martin Sebor <msebor@redhat.com>
5665 * print-tree.c (print_real_cst): New function.
5666 (print_node_brief): Call it.
5667 (print_node): Ditto.
5669 2018-07-03 Jeff Law <law@redhat.com>
5671 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
5672 into a single pattern.
5674 * config/h8300/h8300.md (ors code_iterator): New.
5675 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
5676 a single pattern and single splitter.
5677 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
5678 (iorqi3_1, xorqi3_1): Likewise.
5679 (iorqi3, xorqi3 expanders): Similarly.
5681 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
5682 (movmd_internal) into a single pattern using the P mode iterator.
5683 (movmd splitters): Similarly.
5684 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
5685 (movsd splitters): Similarly.
5687 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
5688 ADDB, ADDW and ADDL into a single ADD attribute which selects the
5689 right table based on the size of the operand.
5690 * config/h8300/h8300.md (length_table): Corresponding changes. All
5691 references to "addb", "addw" and "addl" changed to "add".
5692 (btst patterns): Merge two variants into a single pattern.
5693 (tstqi, tsthi): Likewise.
5694 (addhi3_incdec, addsi3_incdec): Likewise.
5695 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
5696 (mulhi3, mulsi3): Likewise.
5697 (udivhi3, udivsi3): Likewise.
5698 (divhi3, divsi3): Likewise.
5699 (andorqi3, andorhi3, andorsi3): Likewise.
5701 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
5704 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
5705 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
5707 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5709 PR tree-optimization/85694
5710 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
5711 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
5713 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
5714 (<u>avg<mode>3_ceil): New patterns.
5716 2018-07-03 David Malcolm <dmalcolm@redhat.com>
5718 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
5719 scan-tree-dump directive.
5720 * gcc.dg/vect/slp-perm-2.c: Likewise.
5721 * gcc.dg/vect/slp-perm-3.c: Likewise.
5722 * gcc.dg/vect/slp-perm-5.c: Likewise.
5723 * gcc.dg/vect/slp-perm-6.c: Likewise.
5724 * gcc.dg/vect/slp-perm-7.c: Likewise.
5725 * gcc.dg/vect/slp-perm-8.c: Likewise.
5727 2018-07-03 Marek Polacek <polacek@redhat.com>
5730 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
5732 2018-07-03 Richard Biener <rguenther@suse.de>
5735 * tree-ssa-structalias.c (find_func_clobbers): Properly
5736 handle indirect calls.
5738 2018-07-03 Jeff Law <law@redhat.com>
5740 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
5741 (shifts): New code iterator.
5742 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
5743 expander. Fix HImode handling on H8/SX.
5744 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
5745 (subqi3, subhi3, subsi3 expanders): Likewise.
5746 (andqi3, andhi3, andsi3 expanders): Likewise.
5747 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
5748 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
5749 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
5750 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
5751 (zero_extendqihi2, zero_extendqisi2): Likewise.
5752 (extendqihi2, extendqisi2): Likewise.
5753 (rotlqi3, rotlhi3, rotlsi3): Likewise.
5754 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
5755 (rotlqi3_1, rotlhi3_1): Likewise.
5756 (logicalhi3_sn, logicalsi3_sn): Likewise.
5757 (logicalhi3, logicalsi3): Likewise.
5759 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5761 * tree-vect-patterns.c (vect_recog_rotate_pattern)
5762 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
5763 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
5764 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
5765 type to append_pattern_def_seq instead of creating a stmt_vec_info
5767 (build_mask_conversion): Likewise. Remove vinfo argument.
5768 (vect_add_conversion_to_patterm): Likewise, renaming to...
5769 (vect_add_conversion_to_pattern): ...this.
5770 (vect_recog_mask_conversion_pattern): Update call to
5771 build_mask_conversion. Pass the vector type to
5772 append_pattern_def_seq here too.
5773 (vect_recog_gather_scatter_pattern): Update call to
5774 vect_add_conversion_to_pattern.
5776 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5778 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
5779 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5780 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
5781 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
5782 STMT_VINFO_PATTERN_DEF_SEQ to null here.
5783 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
5784 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
5785 append_pattern_def_seq instead of new_pattern_def_seq.
5786 (vect_recog_divmod_pattern): Do both of the above.
5787 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
5790 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5792 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
5793 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
5794 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
5795 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
5796 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
5797 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
5798 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
5799 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
5800 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
5801 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
5802 parameter with a single stmt_vec_info.
5803 (vect_recog_func_ptr): Likewise.
5804 (vect_recog_gather_scatter_pattern): Likewise, folding in...
5805 (vect_try_gather_scatter_pattern): ...this.
5806 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
5807 the stmt_vec_info of the statement to be matched. Don't clear
5808 STMT_VINFO_RELATED_STMT.
5809 (vect_pattern_recog): Update call accordingly.
5811 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5813 PR tree-optimization/85694
5814 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
5815 (uavgM3_ceil): Document new optabs.
5816 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
5817 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
5819 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
5820 (savg_ceil_optab): New optabs.
5821 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
5822 (vect_vect_recog_func_ptrs): Add it.
5823 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
5824 constant directly from the associated lhs.
5826 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5828 * tree-vect-patterns.c (vect_split_statement): New function.
5829 (vect_convert_input): Use it to try to split an existing cast.
5831 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5833 * poly-int.h (print_hex): New function.
5834 * dumpfile.h (dump_dec, dump_hex): Declare.
5835 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
5836 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
5837 min_input_precision, operation_precision and operation_sign.
5838 * tree-vect-patterns.c (vect_get_range_info): New function.
5839 (vect_same_loop_or_bb_p, vect_single_imm_use)
5840 (vect_operation_fits_smaller_type): Delete.
5841 (vect_look_through_possible_promotion): Add an optional
5842 single_use_p parameter.
5843 (vect_recog_over_widening_pattern): Rewrite to use new
5844 stmt_vec_info infomration. Handle one operation at a time.
5845 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
5846 (vect_truncatable_operation_p, vect_set_operation_type)
5847 (vect_set_min_input_precision): New functions.
5848 (vect_determine_min_output_precision_1): Likewise.
5849 (vect_determine_min_output_precision): Likewise.
5850 (vect_determine_precisions_from_range): Likewise.
5851 (vect_determine_precisions_from_users): Likewise.
5852 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
5853 (vect_vect_recog_func_ptrs): Put over_widening first.
5855 (vect_pattern_recog): Call vect_determine_precisions.
5857 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5859 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
5860 statements that have been replaced by further pattern statements.
5861 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
5863 2018-07-03 Richard Biener <rguenther@suse.de>
5865 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
5866 always set *dt. Dump vectype in vectype overload.
5867 * dumpfile.h (dump_gimple_expr): New function.
5868 (dump_gimple_expr_loc): Likewise.
5869 * dumpfile.c (dump_gimple_expr): New function.
5870 (dump_gimple_expr_loc): Likewise.
5872 2018-07-02 Jeff Law <law@redhat.com>
5874 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
5875 the H8/300, H8/300H and H8/S variants into a single pattern.
5876 (movhi_h8300, movqi_h8300hs): Similarly.
5877 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
5878 (QHI mode iterator): New.
5880 * config/h8300/h8300.md: Remove trailing whitespace.
5882 2018-07-02 Jim Wilson <jimw@sifive.com>
5884 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
5885 instead of emit_insn for interrupt returns.
5886 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
5887 (riscv_sret, riscv_uret): Likewise.
5889 2018-07-02 David Malcolm <dmalcolm@redhat.com>
5891 * pretty-print.c (selftest::test_pp_format): Move save and restore
5892 of quotes to class auto_fix_quotes, and add an instance.
5893 * selftest.c: Include "intl.h".
5894 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
5895 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
5896 * selftest.h (selftest::auto_fix_quotes): New class.
5898 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
5900 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
5901 (aarch64_sve_prepare_conditional_op): Remove.
5902 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
5903 Allow aarch64_simd_reg_or_zero as select operand; remove
5904 the aarch64_sve_prepare_conditional_op call.
5905 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
5906 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
5907 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
5908 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
5909 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
5910 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
5911 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
5912 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
5913 and a splitters to match all of the *_any patterns.
5914 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
5916 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
5917 (SVE_COND_FP_BINARY_REV): Remove.
5918 (sve_int_op_rev, sve_fp_op_rev): New.
5919 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
5920 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
5921 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
5922 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
5923 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
5924 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
5925 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
5926 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
5927 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
5929 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
5930 Remove match_dup 1 from the inner unspec.
5931 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
5933 * config/aarch64/aarch64.md (movprfx): New attr.
5934 (length): Default movprfx to 8.
5935 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
5936 (*madd<SVE_I>, *msub<SVE_I): Likewise.
5937 (*<su>mul<SVE_I>3_highpart): Likewise.
5938 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
5939 (*v<ASHIFT><SVE_I>3): Likewise.
5940 (*<su><MAXMIN><SVE_I>3): Likewise.
5941 (*<su><MAXMIN><SVE_F>3): Likewise.
5942 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
5943 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
5944 (*div<SVE_F>4): Likewise.
5946 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
5948 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
5951 2018-07-02 Richard Biener <rguenther@suse.de>
5953 PR tree-optimization/86363
5954 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
5955 memset argument refers to a non-variable address.
5957 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
5959 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
5960 {PLUS,MINUS}_EXPR code to...
5961 (adjust_symbolic_bound): ...here,
5962 (combine_bound): ...here,
5963 (set_value_range_with_overflow): ...and here.
5965 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
5967 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
5969 (extract_range_from_abs_expr): ...here.
5971 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
5973 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
5974 -fno-omit-frame-pointer when not optimizing.
5976 2018-07-02 Martin Liska <mliska@suse.cz>
5979 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
5980 (propagate_nothrow): Likewise.
5982 2018-07-02 Martin Liska <mliska@suse.cz>
5985 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
5987 2018-07-02 David Malcolm <dmalcolm@redhat.com>
5989 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
5990 function in r262149, changing "loc" param from source_location to
5991 const dump_location_t &.
5992 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
5993 declaration, as above.
5995 2018-07-01 Paul Koning <ni1d@arrl.net>
5997 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
5998 -munit-asm, -mgnu-asm, -mdec-asm.
5999 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
6000 (pdp11_output_labelref): New.
6001 (pdp11_output_def): New.
6002 (pdp11_output_addr_vec_elt): New.
6003 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
6004 %# and %@ format codes.
6005 (pdp11_option_override): New.
6006 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
6007 (pdp11_output_ident): New.
6008 (pdp11_asm_named_section): New.
6009 (pdp11_asm_init_sections): New.
6010 (pdp11_file_start): New.
6011 (pdp11_file_end): New.
6012 (output_ascii): Use .ascii/.asciz for -mdec-asm.
6013 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
6014 %o, like %c but octal.
6015 (pdp11_option_override): New.
6016 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
6018 (DATA_SECTION_ASM_OP): Ditto.
6019 (READONLY_DATA_SECTION_ASM_OP): New.
6020 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
6021 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
6022 (ASM_OUTPUT_LABELREF): Ditto.
6023 (ASM_OUTPUT_DEF): Ditto.
6024 (ASM_OUTPUT_EXTERNAL): New.
6025 (ASM_OUTPUT_SOURCE_FILENAME): New.
6026 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
6027 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
6028 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
6029 %# and %@ format codes.
6030 * config/pdp11/pdp11.opt (mgnu-asm): New.
6031 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
6032 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
6033 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
6035 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
6037 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
6038 dereferencing path[] beyond its length.
6040 (debug_all_paths): New.
6041 (rewire_first_differing_edge): New.
6042 (adjust_paths_after_duplication): New.
6043 (duplicate_thread_path): Call adjust_paths_after_duplication.
6045 (thread_through_all_blocks): Add new argument to
6046 duplicate_thread_path.
6048 2018-06-30 Jim Wilson <jimw@sifive.com>
6050 * config/riscv/predicates.md (p2m1_shift_operand): New.
6051 (high_mask_shift_operand): New.
6052 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
6053 pattern using p2m1_shift_operand.
6054 (lshsi3_zero_extend_3+2): New combiner pattern using
6055 high_mask_shift_operand.
6057 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6059 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
6061 (vect_recog_rotate_pattern): ...here.
6062 (vect_convert_input): Try to insert casts of invariants in the
6064 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
6065 preheader to be empty.
6067 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6069 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
6070 vector type. If given, install it in the new statement's
6072 (vect_element_precision): New function.
6073 (vect_unpromoted_value): New struct.
6074 (vect_unpromoted_value::vect_unpromoted_value): New function.
6075 (vect_unpromoted_value::set_op): Likewise.
6076 (vect_look_through_possible_promotion): Likewise.
6077 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
6078 (vect_widened_op_tree, vect_convert_input): Likewise.
6079 (vect_convert_inputs, vect_convert_output): Likewise.
6080 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
6081 to handle the optional cast of the multiplication result and
6082 vect_widened_op_tree to detect the widened multiplication itself.
6083 Do not require the input and output of promotion casts to have
6084 the same sign, but base the signedness of the operation on the
6085 input rather than the result. If the pattern includes two
6086 promotions, check that those promotions have the same sign.
6087 Do not restrict the MULT_EXPR handling to a double-width result;
6088 handle quadruple-width results and wider. Use vect_convert_inputs
6089 to convert the inputs to the common type.
6090 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
6091 to handle the optional cast of the ABS result. Also allow a sign
6092 change or a sign extension between the ABS and MINUS.
6093 Use vect_widened_op_tree to detect the widened subtraction and use
6094 vect_convert_inputs to convert the inputs to the common type.
6095 (vect_handle_widen_op_by_const): Delete.
6096 (vect_recog_widen_op_pattern): New function.
6097 (vect_recog_widen_mult_pattern): Use it.
6098 (vect_recog_widen_shift_pattern): Likewise.
6099 (vect_recog_widen_sum_pattern): Use
6100 vect_look_through_possible_promotion to handle the promoted
6103 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6105 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
6106 the containing gimple_seq *.
6107 * gimple-iterator.h (gsi_for_stmt): Declare it.
6108 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
6109 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
6110 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6111 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6112 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
6114 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
6116 (vect_mark_pattern_stmts): ...here. Handle cases in which the
6117 statement being replaced is part of an existing pattern
6118 definition sequence, inserting the new pattern statements before
6120 (vect_pattern_recog_1): Don't return a bool. If the statement
6121 is already part of a pattern, instead apply pattern matching
6122 to the pattern definition statements. Don't clear the
6123 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
6124 (vect_pattern_recog): Don't break after the first match;
6125 continue processing the pattern definition statements instead.
6126 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
6128 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6130 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
6131 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6132 (vect_recog_widen_sum_pattern): Use it.
6134 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6136 * tree-vect-loop.c (vectorizable_reduction): Assert that the
6137 phi is not a pattern statement and has not been replaced by
6138 a pattern statement.
6139 * tree-vect-patterns.c (type_conversion_p): Don't check
6140 STMT_VINFO_IN_PATTERN_P.
6141 (vect_recog_vector_vector_shift_pattern): Likewise.
6142 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
6143 the pattern statement rather than the original statement; check
6144 directly for a WIDEN_MULT_EXPR here.
6145 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
6146 vect_is_simple_use to return the pattern statement rather
6147 than the original statement; use is_pattern_stmt_p to check
6148 for such a pattern statement.
6149 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
6150 to return the pattern statement rather than the original statement;
6151 don't do the same transformation here.
6152 (vect_is_simple_use): If the defining statement has been replaced
6153 by a pattern statement, return the pattern statement instead.
6154 Remove the corresponding (local) transformation from the vectype
6157 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6159 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
6160 end and default to null.
6161 * tree-vect-loop.c (vect_create_epilog_for_reduction)
6162 (vectorizable_reduction): Update calls accordingly, dropping the
6163 gimple ** argument if the passed-back statement isn't needed.
6164 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
6165 (vect_recog_rotate_pattern): Likewise.
6166 (vect_recog_mask_conversion_pattern): Likewise.
6167 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6168 (vect_mask_constant_operand_p): Likewise.
6169 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
6170 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
6171 (get_group_load_store_type, get_load_store_type): Likewise.
6172 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
6173 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
6174 (vectorizable_conversion, vectorizable_assignment): Likewise.
6175 (vectorizable_shift, vectorizable_operation): Likewise.
6176 (vectorizable_store, vect_is_simple_cond): Likewise.
6177 (vectorizable_condition, vectorizable_comparison): Likewise.
6178 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
6179 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
6180 and move it to the end. Cope with null def_stmt_outs.
6182 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
6184 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
6186 2018-06-29 Jeff Law <law@redhat.com>
6188 * config/v850/v850.c (v850_legitimate_address_p): Handle large
6189 displacements for TARGET_V850E2V3 and newer.
6190 (TARGET_LRA_P): Remove. Defaults to LRA now.
6191 * config/v850/v850.md (sign23byte_load): Remove.
6192 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
6193 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
6195 2018-06-29 Martin Liska <mliska@suse.cz>
6198 * coverage.c (coverage_init): Mangle full path name.
6199 * doc/invoke.texi: Document the change.
6200 * gcov-io.c (mangle_path): New.
6201 * gcov-io.h (mangle_path): Likewise.
6202 * gcov.c (mangle_name): Use mangle_path for path mangling.
6204 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6206 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
6207 if starting source register is not even.
6209 2018-06-29 Martin Liska <mliska@suse.cz>
6211 PR tree-optimization/86263
6212 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
6213 Make edge redirection.
6215 2018-06-29 David Malcolm <dmalcolm@redhat.com>
6217 * dumpfile.c (dump_loc): Add indentation based on scope depth.
6218 (dump_scope_depth): New variable.
6219 (get_dump_scope_depth): New function.
6220 (dump_begin_scope): New function.
6221 (dump_end_scope): New function.
6222 * dumpfile.h (get_dump_scope_depth): New declaration.
6223 (dump_begin_scope): New declaration.
6224 (dump_end_scope): New declaration.
6225 (class auto_dump_scope): New class.
6226 (AUTO_DUMP_SCOPE): New macro.
6227 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
6230 2018-06-29 Richard Biener <rguenther@suse.de>
6232 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
6233 compute_all_dependences succeeds.
6234 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
6235 exceed --param loop-max-datarefs-for-datadeps.
6237 2018-06-29 Jakub Jelinek <jakub@redhat.com>
6239 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
6241 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
6244 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
6245 alternative 0 in preferred_for_speed attribute.
6247 2018-06-28 Paul Koning <ni1d@arrl.net>
6249 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
6250 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
6251 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
6252 * config/pdp11/pdp11.md: Correct "length" attribute calculation
6253 for shift insn patterns.
6255 2018-06-28 David Malcolm <dmalcolm@redhat.com>
6257 * cgraph.c (cgraph_node::get_body): Replace assignments to
6258 "dump_file" with calls to set_dump_file.
6259 * dumpfile.c (alt_dump_file): Make static, and group with...
6260 (alt_flags): ...this definition.
6261 (dumps_are_enabled): New variable.
6262 (refresh_dumps_are_enabled): New function.
6263 (set_dump_file): New function.
6264 (set_alt_dump_file): New function.
6265 (gcc::dump_manager::dump_start): Replace assignments to
6266 "dump_file" and "alt_dump_file" with calls to set_dump_file and
6268 (gcc::dump_manager::dump_finish): Likewise.
6269 * dumpfile.h (alt_dump_file): Delete decl.
6270 (dumps_are_enabled): New variable decl.
6271 (set_dump_file): New function decl.
6272 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
6274 * tree-nested.c (lower_nested_functions): Replace assignments to
6275 "dump_file" with calls to set_dump_file.
6277 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
6279 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
6280 goto_locus of each outgoing edge of each basic block.
6282 2018-06-28 Richard Biener <rguenther@suse.de>
6284 * dwarf2out.c (decl_scope_table): Remove.
6285 (push_decl_scope): Likewise.
6286 (pop_decl_scope): Likewise.
6287 (gen_type_die_for_member): Do not call push/pop_decl_scope.
6288 (gen_struct_or_union_type_die): Likewise.
6289 (gen_tagged_type_die): Likewise.
6290 (dwarf2out_init): Do not initialize decl_scope_table.
6291 (dwarf2out_c_finalize): Do not free it.
6293 2018-06-28 Richard Biener <rguenther@suse.de>
6295 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
6296 deciding whether to not re-use a DIE.
6298 2018-06-28 Richard Biener <rguenther@suse.de>
6300 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
6301 DW_AT_abstract_origin attribute.
6303 2018-06-28 Martin Liska <mliska@suse.cz>
6305 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
6306 Use newly introduced constants.
6307 * tree-switch-conversion.h (struct jump_table_cluster):
6308 Define max_ratio_for_size and max_ratio_for_speed.
6310 2018-06-28 Martin Liska <mliska@suse.cz>
6312 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6313 Add new checking assert to catch invalid state.
6314 (jump_table_cluster::can_be_handled): Handle single case
6316 (jump_table_cluster::is_beneficial): Bail out for such case.
6317 (bit_test_cluster::find_bit_tests):
6318 Add new checking assert to catch invalid state.
6319 (bit_test_cluster::can_be_handled): Handle single case
6321 (bit_test_cluster::is_beneficial): Bail out for such case.
6322 (switch_decision_tree::analyze_switch_statement):
6325 2018-06-28 Martin Liska <mliska@suse.cz>
6327 * common.opt: Introduce -completion option.
6328 * gcc.c (driver_handle_option): Handle it.
6329 (driver::main): Print completions if completion
6331 * opt-suggestions.c (option_proposer::get_completions):
6333 (option_proposer::suggest_completion): Likewise.
6334 (option_proposer::find_param_completions): Likewise.
6335 (verify_autocompletions): Likewise.
6336 (test_completion_valid_options): Likewise.
6337 (test_completion_valid_params): Likewise.
6338 (in_completion_p): Likewise.
6339 (empty_completion_p): Likewise.
6340 (test_completion_partial_match): Likewise.
6341 (test_completion_garbage): Likewise.
6342 (opt_proposer_c_tests): Likewise.
6343 * opt-suggestions.h: Declare new functions.
6344 * opts.c (common_handle_option): Handle OPT__completion_.
6345 * selftest-run-tests.c (selftest::run_tests): Add
6346 opt_proposer_c_tests.
6347 * selftest.c (assert_str_startswith): New.
6348 * selftest.h (assert_str_startswith): Likewise.
6349 (opt_proposer_c_tests): New.
6350 (ASSERT_STR_STARTSWITH): Likewise.
6352 2018-06-28 Martin Liska <mliska@suse.cz>
6354 * Makefile.in: Add opt-suggestions.o.
6355 * gcc-main.c: Include opt-suggestions.h.
6356 * gcc.c (driver::driver): Likewise.
6357 (driver::~driver): Remove m_option_suggestions.
6358 (driver::build_option_suggestions): Moved to option_proposer.
6359 (driver::suggest_option): Likewise.
6360 (driver::handle_unrecognized_options): Use option_proposer.
6361 * gcc.h (class driver): Add new memver m_option_proposer.
6362 * opt-suggestions.c: New file.
6363 * opt-suggestions.h: New file.
6365 2018-06-28 Martin Liska <mliska@suse.cz>
6367 * vec.h (class auto_string_vec): New (moved from auto_argvec).
6368 (auto_string_vec::~auto_string_vec): Likewise.
6370 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
6372 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
6373 prevent_decl_creation_for_types fields up and add reset_location field.
6374 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
6375 statement if id->reset_location is true.
6376 (copy_edges_for_bb): Do not set goto_locus on the new edges if
6377 id->reset_location is true.
6378 (copy_phis_for_bb): Force input_location on the arguments if
6379 id->reset_location is true.
6380 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
6381 is set on the function to be inlined.
6383 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
6385 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
6387 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
6389 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
6390 registers for Pmode.
6391 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
6392 hard registers for the clobbered pseudo.
6394 2018-06-27 Paul Koning <ni1d@arrl.net>
6396 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6397 mutually exclusive options.
6398 * config/pdp11/constraints.md (h): New constraint.
6399 (O): Update definition to match shift code generation.
6400 (D): New constraint.
6401 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
6403 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
6405 (output_jump): Change arguments.
6406 (pdp11_fixed_cc_regs): New function.
6407 (pdp11_cc_mode): Ditto.
6408 (pdp11_expand_shift): Ditto.
6409 (pdp11_assemble_shift): Ditto.
6410 (pdp11_small_shift): Ditto.
6411 (pdp11_branch_cost): Remove.
6412 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
6414 (pdp11_register_move_cost): Update for CC registers.
6415 (pdp11_rtx_costs): Add case for LSHIFTRT.
6416 (pdp11_output_jump): Add CCNZ mode conditional branches.
6417 (notice_update_cc_on_set): Remove.
6418 (pdp11_cc_mode): New function.
6419 (simple_memory_operand): Correct pre/post decrement case.
6420 (no_side_effect_operand): New function.
6421 (pdp11_regno_reg_class): Add CC_REGS class.
6422 (pdp11_fixed_cc_regs): New function.
6423 (pdp11_small_shift): New function.
6424 (pdp11_expand_shift): New function to expand shift insns.
6425 (pdp11_assemble_shift): New function to output shifts.
6426 (pdp11_branch_cost): Remove.
6427 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
6428 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
6429 (WCHAR_TYPE): Ditto.
6430 (PTRDIFF_TYPE): Ditto.
6431 (ADJUST_INSN_LENGTH): New macro.
6432 (FIXED_REGISTERS): Add CC registers.
6433 (CALL_USED_REGISTERS): Ditto.
6435 (REG_CLASS_NAMES): Ditto.
6436 (REG_CLASS_CONTENTS): Ditto.
6437 (SELECT_CC_MODE): Use new function.
6438 (TARGET_FLAGS_REGNUM): New macro.
6439 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
6440 (cc0_reg_rtx): Remove.
6441 (CC_STATUS_MDEP): Remove.
6442 (CC_STATUS_MDEFP_INIT): Remove.
6443 (CC_IN_FPU): Remove.
6444 (NOTICE_UPDATE_CC): Remove.
6445 (REGISTER_NAMES): Add CC registers.
6446 (BRANCH_COST): Change to constant 1.
6447 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
6449 * config/pdp11/pdp11.opt (mbcopy): Remove.
6450 (mbcopy-builtin): Remove.
6451 (mbranch-cheap): Remove.
6452 (mbranch-expensive): Remove.
6453 * config/pdp11/predicates.md (expand_shift_operand): Update to
6454 match shift code generation.
6455 (ccnz_operator): New predicate.
6456 * doc/invoke.texi (PDP-11 Options): Remove deleted options
6457 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
6458 Remove non-existent option -mabshi, -mno-abshi. Document mutually
6460 * doc/md.texi (PDP-11): Document new D and h constraints. Update
6461 description of O constraint.
6463 2018-06-27 Jeff Law <law@redhat.com>
6464 Austin Law <austinklaw@gmail.com>
6466 * config/v850/v850.md (addsi3_set_flags): New pattern.
6467 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
6468 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
6469 (zero_extendhisi2_v850_set_flags): Likewise.
6470 (zero_extendqisi2_v850_set_flags): Likewise.
6471 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
6472 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
6473 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
6475 * config/v850/v850-protos.h (notice_update_cc): Remove.
6476 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
6477 (v850_print_operand): Handle 'D' and "d".
6478 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
6479 Add handling of arithmetic/logical operations compared against zero.
6480 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
6481 Do not look at v850_compare_op, instead get mode from last argument.
6482 (v850_gen_compare): Remove
6483 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
6484 after reload for prologue insns.
6485 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
6487 (construct_save_jarl): Likewise.
6488 (TARGET_FLAGS_REGNUM): Define.
6489 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
6490 (NOTICE_UPDATE_CC): Remove.
6491 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
6492 than cc0. Conditionalize on reload_completed.
6493 (cmpsi_insn, setfcc_insn): Likewise.
6494 (tst1 splitter): Turn into define_and_split which sets the flags
6496 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
6497 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
6498 (cstoresf4, cstoredf4): Clobber the flags.
6499 (cmpsi, cmpsf, cmpdf): Remove expanders.
6500 (setf_insn): Remove pattern.
6501 (addsi3): Turn into define_and_split which clobbers the flags after
6502 reload and a suitable pattern (addsi3_clobber_flags) for use after
6504 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
6505 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
6506 (ashrsi3, ashrsi3_v850e2): Likewise.
6507 (bins): Clobber the flags.
6508 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
6509 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
6510 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
6511 (call_value_internal_short, call_value_internal_long): Likewise.
6512 (callt_save_interrupt, callt_return_interrupt): Likewise.
6513 (save_interrupt, return_interrupt): Likewise.
6514 (callt_save_all_interrupt, save_all_interrupt): Likewise.
6515 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
6516 (restore_all_interrupt, _restore_all_interrupt): Likewise.
6517 (All FP comparisons): Only allow after reload has completed.
6519 (divh, divhu): Tweak output template.
6520 (branch_z_normal, branch_z_invert): Remove
6521 (branch_nz_normal, branch_nz_invert): Likewise.
6522 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
6524 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
6525 * config/v850/v850.c (notice_update_cc): Remove.
6526 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
6527 (CC_NO_CARRY): Likewise.
6528 (NOTICE_UPDATE_CC): Define to nothing.
6529 * config/v850/v850.md: Remove block comment on cc0 handling
6530 Remove "cc" attribute from all patterns. Remove cc_status handling
6531 from all patterns. Minor formatting fixes.
6533 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6535 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
6536 (cortex-a76.cortex-a55): Likewise.
6537 * config/aarch64/aarch64-tune.md: Regenerate.
6538 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
6539 cortex-a76.cortex-a55.
6541 2018-06-27 Jeff Law <law@redhat.com>
6543 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
6544 (MULTILIB_DIRNAMES): Similarly.
6546 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
6548 * gimple.h (gimple_return_retbnd): Delete.
6549 (gimple_return_set_retbnd): Likewise.
6550 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
6551 gimple_return_set_retbnd.
6552 * gimple-pretty-print.c (dump_gimple_return): Remove call to
6553 gimple_return_retbnd and adjust.
6554 * tree-inline.h (struct copy_body_data): Remove retbnd field.
6555 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
6556 Explicitly return NULL in a couple more cases. Move assertion
6557 on debug statements and remove unreachable code.
6558 (reset_debug_binding): Do not test id->retbnd.
6559 (expand_call_inline): Do not set it.
6561 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6563 * configure.ac: Add --disable-gcov option.
6564 * configure: Regenerate.
6565 * Makefile.in: Honour @enable_gcov@.
6566 * doc/install.texi: Document --disable-gcov.
6568 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6570 * config/arm/arm-cpus.in (cortex-a76): New entry.
6571 (cortex-a76.cortex-a55): Likewise.
6572 * config/arm/arm-tables.opt: Regenerate.
6573 * config/arm/arm-tune.md: Likewise.
6574 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
6575 * doc/invoke.texi (ARM Options): Document cortex-a76 and
6576 cortex-a76.cortex-a55.
6578 2018-06-27 Tamar Christina <tamar.christina@arm.com>
6581 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
6583 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
6585 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
6587 (EPILOGUE_USES): Likewise.
6589 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
6591 * tree-inline.c (remap_location): New function extracted from...
6592 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
6593 (copy_phis_for_bb): ...here. Call remap_location.
6594 (copy_cfg_body): Adjust call to copy_edges_for_bb.
6596 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
6598 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
6599 unaligned vsx for 16B memset.
6601 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
6604 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
6605 ieee128_float_type_node to long_double_type_node unless
6606 TARGET_LONG_DOUBLE_128 is set.
6608 2018-06-26 David Malcolm <dmalcolm@redhat.com>
6610 * cfgloop.c (get_loop_location): Convert return type from
6611 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
6612 by implicit construction from rtx_insn *, and using
6613 dump_user_location_t::from_function_decl for the fallback case.
6614 * cfgloop.h (get_loop_location): Convert return type from
6615 location_t to dump_user_location_t.
6616 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
6617 dump_printf_loc to pass in a dump_location_t rather than a
6618 location_t, via the gimple stmt.
6619 * coverage.c (get_coverage_counts): Update calls to
6620 dump_printf_loc to pass in dump_location_t rather than a
6622 * doc/optinfo.texi (Dump types): Convert example of
6623 dump_printf_loc from taking "locus" to taking "insn". Update
6624 description of the "_loc" calls to cover dump_location_t.
6625 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
6627 (dump_user_location_t::dump_user_location_t): New constructors,
6628 from gimple *stmt and rtx_insn *.
6629 (dump_user_location_t::from_function_decl): New function.
6630 (dump_loc): Make static.
6631 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
6632 const dump_location_t &.
6633 (dump_generic_expr_loc): Delete.
6634 (dump_printf_loc): Convert param "loc" from location_t to
6635 const dump_location_t &.
6636 (selftest::test_impl_location): New function.
6637 (selftest::dumpfile_c_tests): New function.
6638 * dumpfile.h: Include "profile-count.h".
6639 (class dump_user_location_t): New class.
6640 (struct dump_impl_location_t): New struct.
6641 (class dump_location_t): New class.
6642 (dump_printf_loc): Convert 2nd param from source_location to
6643 const dump_location_t &.
6644 (dump_generic_expr_loc): Delete.
6645 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
6646 const dump_location_t &.
6647 * gimple-fold.c (fold_gimple_assign): Update call to
6648 dump_printf_loc to pass in a dump_location_t rather than a
6649 location_t, via the gimple stmt.
6650 (gimple_fold_call): Likewise.
6651 * gimple-loop-interchange.cc
6652 (loop_cand::analyze_iloop_reduction_var): Update for change to
6653 check_reduction_path.
6654 (tree_loop_interchange::interchange): Update for change to
6656 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
6657 change in return-type of find_loop_location.
6658 (graphite_regenerate_ast_isl): Likewise.
6659 * graphite-optimize-isl.c (optimize_isl): Likewise.
6660 * graphite.c (graphite_transform_loops): Likewise.
6661 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
6662 pass in a dump_location_t rather than a location_t, via the
6664 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6665 * ipa.c (walk_polymorphic_call_targets): Likewise.
6666 * loop-unroll.c (report_unroll): Convert "locus" param from
6667 location_t to dump_location_t.
6668 (decide_unrolling): Update for change to get_loop_location's
6670 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
6671 location_t to dump_user_location_t.
6672 (grid_find_single_omp_among_assignments_1): Updates calls to
6673 dump_printf_loc to pass in a dump_location_t rather than a
6674 location_t, via the gimple stmt.
6675 (grid_parallel_clauses_gridifiable): Convert "tloc" from
6676 location_t to dump_location_t. Updates calls to dump_printf_loc
6677 to pass in a dump_location_t rather than a location_t, via the
6679 (grid_inner_loop_gridifiable_p): Likewise.
6680 (grid_dist_follows_simple_pattern): Likewise.
6681 (grid_gfor_follows_tiling_pattern): Likewise.
6682 (grid_target_follows_gridifiable_pattern): Likewise.
6683 (grid_attempt_target_gridification): Convert initialization
6684 of local "grid" from memset to zero-initialization; FIXME: does
6685 this require C++11? Update call to dump_printf_loc to pass in a
6686 optinfo_location rather than a location_t, via the gimple stmt.
6687 * profile.c (read_profile_edge_counts): Updates call to
6688 dump_printf_loc to pass in a dump_location_t rather than a
6690 (compute_branch_probabilities): Likewise.
6691 * selftest-run-tests.c (selftest::run_tests): Call
6693 * selftest.h (dumpfile_c_tests): New decl.
6694 * tree-loop-distribution.c (pass_loop_distribution::execute):
6695 Update for change in return type of find_loop_location.
6696 * tree-parloops.c (parallelize_loops): Likewise.
6697 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
6698 "locus" from location_t to dump_user_location_t.
6699 (canonicalize_loop_induction_variables): Likewise.
6700 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
6701 for change in return type of find_loop_location.
6702 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
6703 to dump_printf_loc to pass in a dump_location_t rather than a
6704 location_t, via the stmt.
6705 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
6707 * tree-vect-loop-manip.c (find_loop_location): Convert return
6708 type from source_location to dump_user_location_t.
6709 (vect_do_peeling): Update for above change.
6710 (vect_loop_versioning): Update for change in type of
6712 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
6713 from location_t to dump_user_location_t.
6714 (vect_estimate_min_profitable_iters): Update for change in type
6716 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
6717 location_t to dump_location_t.
6718 (vect_slp_bb): Update for change in type of vect_location.
6719 * tree-vectorizer.c (vect_location): Convert from source_location
6720 to dump_user_location_t.
6721 (try_vectorize_loop_1): Update for change in vect_location's type.
6722 (vectorize_loops): Likewise.
6723 (increase_alignment): Likewise.
6724 * tree-vectorizer.h (vect_location): Convert from source_location
6725 to dump_user_location_t.
6726 (find_loop_location): Convert return type from source_location to
6727 dump_user_location_t.
6728 (check_reduction_path): Convert 1st param from location_t to
6729 dump_user_location_t.
6730 * value-prof.c (check_counter): Update call to dump_printf_loc to
6731 pass in a dump_user_location_t rather than a location_t; update
6732 call to error_at for change in type of "locus".
6733 (check_ic_target): Update call to dump_printf_loc to
6734 pass in a dump_user_location_t rather than a location_t, via the
6737 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
6739 * config/s390/s390.h (enum processor_flags): Do not use
6740 default tune parameter when -march was specified.
6742 2018-06-26 Jakub Jelinek <jakub@redhat.com>
6745 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
6746 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
6749 2018-06-26 Richard Biener <rguenther@suse.de>
6751 PR tree-optimization/86287
6753 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
6754 (vect_analyze_loop): Initialize n_stmts.
6756 2018-06-26 Richard Biener <rguenther@suse.de>
6759 * fold-const.c (fold_convertible_p): Pointer extension
6762 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
6765 * dwarf2out.c (loc_list_has_views): Adjust comments.
6766 (dw_loc_list): Split single cross-partition range with
6769 2018-06-25 Jeff Law <law@redhat.com>
6771 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
6772 on -mbig-switch by default.
6774 * config/v850/predicates.md (const_float_1_operand): Fix match_code
6776 (const_float_0_operand): Remove unused predicate.
6777 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
6778 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
6779 (recipsf2): New expander. Original pattern now called
6781 (recipdf2, recipdf2_insn): Similarly.
6782 (rsqrtsf2, rsqrtsf2_insn): Similarly
6783 (rsqrtdf2, rsqrtdf2_insn): Similarly
6785 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
6787 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
6788 Simplify logic for FreeBSD (twice).
6790 2018-06-25 Martin Sebor <msebor@redhat.com>
6792 PR tree-optimization/86204
6793 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
6794 a strnlen result if it's less than the length of the string.
6796 2018-06-25 Martin Sebor <msebor@redhat.com>
6798 PR tree-optimization/85700
6799 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
6800 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
6801 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
6803 2018-06-25 Martin Sebor <msebor@redhat.com>
6805 * doc/extend.texi (Zero-length arrays): Update and clarify.
6807 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
6809 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
6810 added IEEE/IBM long double multilib support on PowerPC little
6811 endian Linux systems.
6812 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
6813 (MULTILIB_DEFAULTS): Likewise.
6814 * config/rs6000/rs6000.c (rs6000_option_override_internal):
6816 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
6817 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
6818 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
6820 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
6823 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
6824 (REORDER_45): Likewise.
6826 2018-06-25 Jeff Law <law@redhat.com>
6828 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
6829 dividend to 32 bits. Adjust length.
6830 (udivmodhi4): Cleanup output template. Fix length.
6832 2018-06-25 Carl Love <cel@us.ibm.com>
6834 * config/rs6000/vsx.md: Change word selector to prefered location.
6836 2018-06-25 Richard Biener <rguenther@suse.de>
6838 PR tree-optimization/86304
6839 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
6840 epilogue-if-converted loops as well.
6842 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
6844 * lto-section-out.c (lto_begin_section): Do not print section
6845 name for noaddr and unnumbered dumps.
6847 2018-06-25 Richard Biener <rguenther@suse.de>
6849 * tree-vectorizer.h (struct vec_info_shared): New structure
6850 with parts split out from struct vec_info and loop_nest from
6851 struct _loop_vec_info.
6852 (struct vec_info): Adjust accordingly.
6853 (struct _loop_vec_info): Likewise.
6854 (LOOP_VINFO_LOOP_NEST): Adjust.
6855 (LOOP_VINFO_DATAREFS): Likewise.
6856 (LOOP_VINFO_DDRS): Likewise.
6857 (struct _bb_vec_info): Likewise.
6858 (BB_VINFO_DATAREFS): Likewise.
6859 (BB_VINFO_DDRS): Likewise.
6860 (struct _stmt_vec_info): Add dr_aux member.
6861 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
6862 (DR_MISALIGNMENT_UNINITIALIZED): New.
6863 (set_dr_misalignment): Adjust.
6864 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
6865 (vect_analyze_loop): Adjust prototype.
6866 (vect_analyze_loop_form): Likewise.
6867 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
6868 Compute dependences lazily.
6869 (vect_record_base_alignments): Use shared datarefs/ddrs.
6870 (vect_verify_datarefs_alignment): Likewise.
6871 (vect_analyze_data_refs_alignment): Likewise.
6872 (vect_analyze_data_ref_accesses): Likewise.
6873 (vect_analyze_data_refs): Likewise.
6874 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
6875 constructor parameter for shared part.
6876 (vect_analyze_loop_form): Pass in shared part and adjust.
6877 (vect_analyze_loop_2): Pass in storage for the number of
6878 stmts. Move loop nest finding to the caller. Compute
6880 (vect_analyze_loop): Pass in shared part.
6881 (vect_transform_loop): Verify shared datarefs are unchanged.
6882 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
6883 constructor parameter for shared part.
6884 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
6885 (vect_slp_bb): Verify shared datarefs are unchanged before
6887 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
6889 (new_stmt_vec_info): Initialize DR_AUX misalignment to
6890 DR_MISALIGNMENT_UNINITIALIZED.
6891 * tree-vectorizer.c (vec_info::vec_info): Add constructor
6892 parameter for shared part.
6893 (vec_info::~vec_info): Adjust.
6894 (vec_info_shared::vec_info_shared): New.
6895 (vec_info_shared::~vec_info_shared): Likewise.
6896 (vec_info_shared::save_datarefs): Likewise.
6897 (vec_info_shared::check_datarefs): Likewise.
6898 (try_vectorize_loop_1): Construct shared part live for analyses
6899 of a single loop for multiple vector sizes.
6900 * tree-parloops.c (gather_scalar_reductions): Adjust.
6902 2018-06-25 Richard Biener <rguenther@suse.de>
6904 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
6905 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
6906 (vect_analyze_data_refs): Remove similar code from here and
6907 simplify accordingly.
6909 2018-06-25 Richard Biener <rguenther@suse.de>
6911 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
6912 for reverse storage order accesses rather than asserting
6913 they cannot happen here.
6915 2018-06-25 Tom de Vries <tdevries@suse.de>
6918 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
6919 Use data16 instead of .byte for insn prefix.
6921 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
6924 * parser.c (make_char_string_pack): Pass this literal chars
6925 through cpp_interpret_string.
6926 (cp_parser_userdef_numeric_literal): Check the result of
6927 make_char_string_pack.
6929 2018-06-24 Maya Rashish <coypu@sdf.org>
6931 * ginclude/stddef.h: Simplify conditions around avoiding
6932 re-definition of __size_t.
6934 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
6936 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
6937 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
6939 2018-06-22 Maya Rashish <coypu@sdf.org>
6941 * doc/invoke.texi (mno-fancy-math-387): Update for changes
6942 made to OpenBSD and NetBSD through the years.
6944 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
6946 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
6947 behavior of vec_pack (vector double, vector double) to match
6948 behavior of vec_float2 (vector double, vector double).
6950 2018-06-22 Olivier Hainque <hainque@adacore.com>
6952 * gimplify.c (gimplify_function_tree): Prevent creation
6953 of a trampoline for the address of the current function
6954 passed to entry/exit instrumentation hooks.
6956 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
6959 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
6962 2018-06-22 Martin Liska <mliska@suse.cz>
6964 PR tree-optimization/86263
6965 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6966 Bail out if is_enabled is false.
6967 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
6969 (jump_table_cluster::is_enabled): New function.
6971 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
6973 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
6974 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
6975 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
6976 (lto_input_ts_binfo_tree_pointers): Likewise.
6977 * tree-streamer-out.c (streamer_write_tree_bitfields,
6978 write_ts_binfo_tree_pointers): Likewise.
6979 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
6981 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
6983 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
6985 2018-06-22 Martin Liska <mliska@suse.cz>
6987 * symbol-summary.h (get): Make it pure and inline move
6988 functionality from ::get function.
6989 (get): Remove and inline into ::get and ::get_create.
6990 (get_create): Move code from ::get function.
6992 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6995 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
6996 -x assembler-with-cpp.
6998 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7000 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
7001 _FILE_OFFSET_BITS=64 for C++.
7003 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
7005 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
7006 conversion insn that shows up when pr85657-3.c is compiled using
7007 IEEE 128-bit long double.
7008 (neg<mode>2_internal): Use the correct mode to check whether the
7009 mode is IBM extended.
7010 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
7011 multiply and divide external functions from being created more
7014 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7016 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
7018 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
7019 the edge can be forwarded.
7020 (cfg_layout_merge_blocks): Likewise.
7022 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7024 * except.c (finish_eh_generation): Commit edge insertions only after
7025 the EH edges have been redirected from post-landing to landing pads.
7027 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7029 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
7030 create_tmp_var_for to create the FRAME decl.
7031 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
7033 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7035 * tree-inline.c (copy_edges_for_bb): Minor tweak.
7036 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
7037 debug statement when resetting its value.
7038 (expand_call_inline): Copy the locus of the call onto the assignment
7039 of the return value, if any. Use local variable in more cases.
7041 2018-06-21 Martin Liska <mliska@suse.cz>
7043 * ipa-pure-const.c (propagate_nothrow): Use
7044 funct_state_summaries->get.
7045 (dump_malloc_lattice): Likewise.
7046 (propagate_malloc): Likewise.
7048 2018-06-21 Richard Biener <rguenther@suse.de>
7050 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
7051 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
7052 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
7054 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
7055 BLOCK_ABSTRACT_ORIGIN unconditionally.
7057 2018-06-21 David Malcolm <dmalcolm@redhat.com>
7059 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
7061 * ipa-reference.c (ipa_reference_c_finalize): Delete
7062 ipa_ref_opt_sum_summaries and set it to NULL.
7064 2018-06-21 Tom de Vries <tdevries@suse.de>
7066 PR tree-optimization/85859
7067 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
7068 test with comment from bb_no_side_effects_p.
7070 2018-06-21 Richard Biener <rguenther@suse.de>
7072 PR tree-optimization/86232
7073 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
7074 max for constant niter.
7076 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
7078 * config/aarch64/aarch64-simd.md
7079 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
7081 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
7083 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
7084 Make opernads of the unspec commutative.
7086 2018-06-21 Richard Biener <rguenther@suse.de>
7088 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
7089 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
7090 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
7091 (vect_analyze_data_ref_dependence): Re-order checks to deal with
7093 (vect_record_base_alignments): Do not record base alignment
7094 for gathers or scatters.
7095 (vect_compute_data_ref_alignment): Drop return value that is always
7096 true. Bail out early for gathers or scatters.
7097 (vect_enhance_data_refs_alignment): Bail out early for gathers
7099 (vect_find_same_alignment_drs): Likewise.
7100 (vect_analyze_data_refs_alignment): Remove dead code.
7101 (vect_slp_analyze_and_verify_node_alignment): Likewise.
7102 (vect_analyze_data_refs): For possible gathers or scatters do
7103 not create an alternate DR, just check their possible validity
7104 and mark them. Adjust DECL_NONALIASED handling to not rely
7106 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
7107 update inits of gathers or scatters.
7108 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
7109 Also copy gather/scatter flag to pattern vinfo.
7111 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
7113 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7114 behavior of vec_packsu (vector unsigned long long, vector unsigned
7115 long long) to match behavior of vec_packs with same signature.
7117 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
7118 Thomas Schwinge <thomas@codesourcery.com>
7119 Cesar Philippidis <cesar@codesourcery.com>
7121 * gimplify.c (gimplify_scan_omp_clauses): Add support for
7122 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7123 (gimplify_adjust_omp_clauses): Likewise.
7124 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
7125 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
7126 (gimplify_omp_target_update): Update handling of acc update and
7128 * omp-low.c (install_var_field): Remove unused parameter
7129 base_pointers_restrict.
7130 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
7131 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
7133 (omp_target_base_pointers_restrict_p): Delete.
7134 (scan_omp_target): Update call to scan_sharing_clauses.
7135 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
7137 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
7138 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7139 (convert_local_omp_clauses): Likewise.
7140 * tree-pretty-print.c (dump_omp_clause): Likewise.
7141 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
7143 (omp_clause_code_name): Likewise.
7145 2018-06-20 Jakub Jelinek <jakub@redhat.com>
7148 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
7151 PR tree-optimization/86231
7152 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
7153 anti-range don't overwrite *vr0min before using it to compute *vr0max.
7155 2018-06-20 Tom de Vries <tdevries@suse.de>
7157 PR tree-optimization/86097
7158 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
7159 iv type if signedness of iv type is not the same as that of *nit.
7161 2018-06-20 Jakub Jelinek <jakub@redhat.com>
7163 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
7164 EDGE_EH edges, verify they are all EDGE_EH.
7166 2018-06-20 Maya Rashish <coypu@sdf.org>
7168 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
7170 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7172 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
7173 * config/aarch64/aarch64.c (xgene1_tunings): Add
7174 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
7175 (aarch64_mode_valid_for_sched_fusion_p):
7176 Allow 16-byte modes.
7177 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
7178 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
7180 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
7182 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
7183 * config/aarch64/iterators.md (VQ2): New mode iterator.
7185 2018-06-20 Martin Liska <mliska@suse.cz>
7187 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7188 Change default ratio from 10 to 8.
7190 2018-06-20 Martin Liska <mliska@suse.cz>
7192 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7194 (bit_test_cluster::find_bit_tests): Likewise.
7195 (switch_decision_tree::analyze_switch_statement): Find clusters.
7196 * tree-switch-conversion.h (struct jump_table_cluster): Document
7199 2018-06-20 Martin Liska <mliska@suse.cz>
7201 * tree-switch-conversion.c (switch_conversion::collect):
7202 Record m_uniq property.
7203 (switch_conversion::expand): Bail out for special conditions.
7204 (group_cluster::~group_cluster): New.
7205 (group_cluster::group_cluster): Likewise.
7206 (group_cluster::dump): Likewise.
7207 (jump_table_cluster::emit): New.
7208 (switch_decision_tree::fix_phi_operands_for_edges): New.
7209 (struct case_node): Remove struct.
7210 (jump_table_cluster::can_be_handled): New.
7211 (case_values_threshold): Moved to header.
7212 (reset_out_edges_aux): Likewise.
7213 (jump_table_cluster::is_beneficial): New.
7214 (bit_test_cluster::can_be_handled): Likewise.
7215 (add_case_node): Remove.
7216 (bit_test_cluster::is_beneficial): New.
7217 (case_bit_test::cmp): New.
7218 (bit_test_cluster::emit): New.
7219 (expand_switch_as_decision_tree_p): Remove.
7220 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
7221 (fix_phi_operands_for_edge): Likewise.
7222 (switch_decision_tree::analyze_switch_statement): New.
7223 (compute_cases_per_edge): Move ...
7224 (switch_decision_tree::compute_cases_per_edge): ... here.
7225 (try_switch_expansion): Likewise.
7226 (switch_decision_tree::try_switch_expansion): Likewise.
7227 (record_phi_operand_mapping): Likewise.
7228 (switch_decision_tree::record_phi_operand_mapping): Likewise.
7229 (emit_case_decision_tree): Likewise.
7230 (switch_decision_tree::emit): Likewise.
7231 (balance_case_nodes): Likewise.
7232 (switch_decision_tree::balance_case_nodes): Likewise.
7233 (dump_case_nodes): Likewise.
7234 (switch_decision_tree::dump_case_nodes): Likewise.
7235 (emit_jump): Likewise.
7236 (switch_decision_tree::emit_jump): Likewise.
7237 (emit_cmp_and_jump_insns): Likewise.
7238 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
7239 (emit_case_nodes): Likewise.
7240 (switch_decision_tree::emit_case_nodes): Likewise.
7241 (conditional_probability): Remove.
7242 * tree-switch-conversion.h (enum cluster_type): New.
7244 (struct cluster): Likewise.
7245 (cluster::cluster): Likewise.
7246 (struct simple_cluster): Likewise.
7247 (simple_cluster::simple_cluster): Likewise.
7248 (struct group_cluster): Likewise.
7249 (struct jump_table_cluster): Likewise.
7250 (struct bit_test_cluster): Likewise.
7251 (struct min_cluster_item): Likewise.
7252 (struct case_tree_node): Likewise.
7253 (case_tree_node::case_tree_node): Likewise.
7254 (jump_table_cluster::case_values_threshold): Likewise.
7255 (struct case_bit_test): Likewise.
7256 (struct switch_decision_tree): Likewise.
7257 (struct switch_conversion): Likewise.
7258 (switch_decision_tree::reset_out_edges_aux): Likewise.
7260 2018-06-20 Martin Liska <mliska@suse.cz>
7262 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
7263 (hoist_edge_and_branch_if_true): Likewise.
7264 (expand_switch_using_bit_tests_p): Likewise.
7265 (struct case_bit_test): Likewise.
7266 (case_bit_test_cmp): Likewise.
7267 (emit_case_bit_tests): Likewise.
7268 (switch_conversion::switch_conversion): New class.
7269 (struct switch_conv_info): Remove old struct.
7270 (collect_switch_conv_info): More to ...
7271 (switch_conversion::collect): ... this.
7272 (check_range): Likewise.
7273 (switch_conversion::check_range): Likewise.
7274 (check_all_empty_except_final): Likewise.
7275 (switch_conversion::check_all_empty_except_final): Likewise.
7276 (check_final_bb): Likewise.
7277 (switch_conversion::check_final_bb): Likewise.
7278 (create_temp_arrays): Likewise.
7279 (switch_conversion::create_temp_arrays): Likewise.
7280 (free_temp_arrays): Likewise.
7281 (gather_default_values): Likewise.
7282 (switch_conversion::gather_default_values): Likewise.
7283 (build_constructors): Likewise.
7284 (switch_conversion::build_constructors): Likewise.
7285 (constructor_contains_same_values_p): Likewise.
7286 (switch_conversion::contains_same_values_p): Likewise.
7287 (array_value_type): Likewise.
7288 (switch_conversion::array_value_type): Likewise.
7289 (build_one_array): Likewise.
7290 (switch_conversion::build_one_array): Likewise.
7291 (build_arrays): Likewise.
7292 (switch_conversion::build_arrays): Likewise.
7293 (gen_def_assigns): Likewise.
7294 (switch_conversion::gen_def_assigns): Likewise.
7295 (prune_bbs): Likewise.
7296 (switch_conversion::prune_bbs): Likewise.
7297 (fix_phi_nodes): Likewise.
7298 (switch_conversion::fix_phi_nodes): Likewise.
7299 (gen_inbound_check): Likewise.
7300 (switch_conversion::gen_inbound_check): Likewise.
7301 (process_switch): Use the newly created class.
7302 (switch_conversion::expand): New.
7303 (switch_conversion::~switch_conversion): New.
7304 * tree-switch-conversion.h: New file.
7306 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7308 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
7309 tree-vect-patterns.c.
7310 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
7311 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
7312 (vect_recog_sad_pattern): Likewise.
7313 (vect_recog_widen_sum_pattern): Likewise.
7314 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
7315 (vect_recog_widen_shift_pattern): Remove the type_in argument.
7316 (vect_recog_rotate_pattern): Likewise.
7317 (vect_recog_mult_pattern): Likewise.
7318 (vect_recog_vector_vector_shift_pattern): Likewise.
7319 (vect_recog_divmod_pattern): Likewise.
7320 (vect_recog_mixed_size_cond_pattern): Likewise.
7321 (vect_recog_bool_pattern): Likewise.
7322 (vect_recog_mask_conversion_pattern): Likewise.
7323 (vect_try_gather_scatter_pattern): Likewise.
7324 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
7325 (vect_recog_over_widening_pattern): Likewise.
7326 (vect_recog_gather_scatter_pattern): Likewise.
7327 (vect_recog_func_ptr): Move from tree-vectorizer.h
7328 (vect_vect_recog_func_ptrs): Move further down the file.
7329 (vect_recog_func): Likewise. Remove the third argument.
7330 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
7331 (vect_pattern_recog_1): Expect the pattern function to do any
7332 necessary target tests. Also expect it to provide a vector type.
7333 Remove the type_in handling.
7335 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7337 * tree-vect-patterns.c (vect_pattern_detected): New function.
7338 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
7339 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
7340 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
7341 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
7342 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
7343 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
7344 (vect_recog_mask_conversion_pattern)
7345 (vect_try_gather_scatter_pattern): Likewise.
7347 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7349 * tree-vect-patterns.c (vect_get_internal_def): New function.
7350 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7351 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
7352 (search_type_for_mask_1): Use it.
7354 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7356 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
7357 redundant WIDEN_SUM_EXPR handling.
7358 (vect_recog_sad_pattern): Likewise.
7360 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7362 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
7363 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
7364 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
7365 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
7366 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
7368 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7370 * tree-vect-stmts.c (vectorizable_call): Make sure that we
7371 use the stmt_vec_info of the original bb statement for the
7372 new zero assignment, even if the call is part of a pattern.
7374 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7376 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
7377 that the sequence is attached to the original statement rather
7378 than the pattern statement.
7379 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
7380 PATTERN_DEF_SEQ from the original statement rather than
7381 the main pattern statement.
7382 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
7383 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
7384 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
7386 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7388 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
7389 definition statements before the early exit for statements that aren't
7391 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
7393 (vect_transform_loop): ...here. Process pattern definition
7394 statements without first checking whether the main pattern
7395 statement is live or relevant.
7397 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
7399 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
7400 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
7402 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
7404 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
7405 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
7406 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
7407 (expand_block_compare): Change select_block_compare_mode call.
7408 (expand_strncmp_align_check): Use new functions, fix comment.
7409 (emit_final_str_compare_gpr): New function.
7410 (expand_strn_compare): Refactor and clean up code.
7411 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
7413 2018-06-19 Tony Reix <tony.reix@atos.com>
7414 Damien Bergamini <damien.bergamini@atos.com>
7415 David Edelsohn <dje.gcc@gmail.com>
7417 * collect2.c (static_obj): New variable.
7418 (static_libs): New variable.
7419 (is_in_list): Uncomment declaration.
7420 (main): Track AIX libraries linked statically.
7421 (is_in_list): Uncomment definition.
7422 (scan_prog_file): Don't add AIX shared libraries initializer
7423 to constructor list if linking statically.
7425 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
7427 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
7429 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
7431 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
7433 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
7436 2018-06-19 Martin Liska <mliska@suse.cz>
7438 * config/i386/i386.c (ix86_can_inline_p): Do not use
7439 ipa_fn_summaries::get_create.
7440 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
7442 (devirtualization_time_bonus): Likewise.
7443 (ipcp_propagate_stage): Likewise.
7444 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
7445 (edge_set_predicate): Likewise.
7446 (evaluate_conditions_for_known_args): Likewise.
7447 (evaluate_properties_for_edge): Likewise.
7448 (ipa_call_summary::reset): Tranform to ...
7449 (ipa_call_summary::~ipa_call_summary): ... this.
7450 (ipa_fn_summary::reset): Transform to ...
7451 (ipa_fn_summary::~ipa_fn_summary): ... this.
7452 (ipa_fn_summary_t::remove): Rename to ...
7453 (ipa_fn_summary_t::remove_callees): ... this.
7454 (ipa_fn_summary_t::duplicate): Use placement new
7455 instead of memory copy.
7456 (ipa_call_summary_t::duplicate): Likewise.
7457 (ipa_call_summary_t::remove): Remove.
7458 (dump_ipa_call_summary): Change get_create to get.
7459 (ipa_dump_fn_summary): Dump only when summary exists.
7460 (analyze_function_body): Use symbol_summary::get instead
7462 (compute_fn_summary): Likewise.
7463 (estimate_edge_devirt_benefit): Likewise.
7464 (estimate_edge_size_and_time): Likewise.
7465 (inline_update_callee_summaries): Likewise.
7466 (remap_edge_change_prob): Likewise.
7467 (remap_edge_summaries): Likewise.
7468 (ipa_merge_fn_summary_after_inlining): Likewise.
7469 (write_ipa_call_summary): Likewise.
7470 (ipa_fn_summary_write): Likewise.
7471 (ipa_free_fn_summary): Likewise.
7472 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
7473 (struct ipa_call_summary): Likewise.
7474 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
7476 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
7477 (estimate_size_after_inlining): Likewise.
7478 (estimate_growth): Likewise.
7479 (growth_likely_positive): Likewise.
7480 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
7481 (inline_call): Likewise.
7482 * ipa-inline.c (caller_growth_limits): Likewise.
7483 (can_inline_edge_p): Likewise.
7484 (can_inline_edge_by_limits_p): Likewise.
7485 (compute_uninlined_call_time): Likewise.
7486 (compute_inlined_call_time): Likewise.
7487 (want_inline_small_function_p): Likewise.
7488 (edge_badness): Likewise.
7489 (update_caller_keys): Likewise.
7490 (update_callee_keys): Likewise.
7491 (inline_small_functions): Likewise.
7492 (inline_to_all_callers_1): Likewise.
7493 (dump_overall_stats): Likewise.
7494 (early_inline_small_functions): Likewise.
7495 (early_inliner): Likewise.
7496 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
7497 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7498 * ipa-pure-const.c (malloc_candidate_p): Likewise.
7499 * ipa-split.c (execute_split_functions): Likewise.
7500 * symbol-summary.h: Likewise.
7501 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
7503 2018-06-19 Richard Biener <rguenther@suse.de>
7505 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
7506 (vectorize_loops): ... here. Fix dbgcnt handling.
7507 (try_vectorize_loop): Wrap try_vectorize_loop_1.
7509 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
7512 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
7513 ieee128 argument takes up only one (vector) register, not two (floating
7516 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
7518 * gimplify.c (gimplify_init_constructor): Really never clear for an
7519 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
7521 2018-06-19 Richard Biener <rguenther@suse.de>
7523 PR tree-optimization/86179
7524 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
7525 after failed recognition.
7527 2018-06-18 Martin Sebor <msebor@redhat.com>
7530 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
7531 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
7532 Handle integer subtraction.
7533 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
7534 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
7536 2018-06-18 David Malcolm <dmalcolm@redhat.com>
7538 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
7539 param from rtx to rtx_insn *.
7540 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
7542 (frv_ifcvt_modify_insn): Likwise.
7543 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
7544 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
7545 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
7546 as_a <rtx_insn *> cast to local "unprotected_region" once
7547 it's been established that it's not NULL or pc_rtx.
7548 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
7549 param "sethi" from rtx to rtx_insn *.
7550 (nds32_group_float_insns): Likewise for param "insn".
7551 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
7553 (vax_output_int_subtract): Likewise.
7554 * config/vax/vax.c (vax_output_int_add): Likewise for param
7556 (vax_output_int_subtract): Likewise.
7557 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
7558 (emit_pattern_after): Likewise for param "after".
7559 (emit_insn_after): Likewise.
7560 (emit_jump_insn_after): Likewise.
7561 (emit_call_insn_after): Likewise.
7562 (emit_debug_insn_after): Likewise.
7563 (emit_pattern_before): Likewise for param "before".
7564 (emit_insn_before): Likewise.
7565 (emit_jump_insn_before): Likewise.
7566 * final.c (get_insn_template): Likewise for param "insn", removing
7568 * output.h (get_insn_template): Likewise for 2nd param.
7569 * rtl.h (emit_insn_before): Likewise.
7570 (emit_jump_insn_before): Likewise.
7571 (emit_debug_insn_before_noloc): Likewise.
7572 (emit_insn_after): Likewise.
7573 (emit_jump_insn_after): Likewise.
7574 (emit_call_insn_after): Likewise.
7575 (emit_debug_insn_after): Likewise.
7576 (set_insn_deleted): Likewise for param.
7578 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
7581 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
7582 floating point modes, so that IFmode is numerically greater than
7583 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
7584 to declare the ordering. This prevents IFmode from being
7585 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
7586 machine. Include rs6000-modes.h to share the fractional values
7587 between genmodes* and the rest of the compiler.
7591 * config/rs6000/rs6000-modes.h: New file.
7592 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
7593 meaning of rs6000_long_double_size so that 126..128 selects an
7594 appropriate 128-bit floating point type.
7595 (rs6000_option_override_internal): Likewise.
7596 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
7597 (TARGET_LONG_DOUBLE_128): Change the meaning of
7598 rs6000_long_double_size so that 126..128 selects an appropriate
7599 128-bit floating point type.
7600 (LONG_DOUBLE_TYPE_SIZE): Update comment.
7601 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
7602 source and destination to match the standard usage.
7603 (truncifkf2): Likewise.
7604 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
7605 ISA 2.07 to use an explicit clobber, instead of passing in a
7607 (copysign<mode>3_soft): Likewise.
7609 2018-06-18 David Malcolm <dmalcolm@redhat.com>
7611 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
7612 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
7613 (vect_slp_analyze_instance_dependence): Likewise.
7614 (vect_enhance_data_refs_alignment): Likewise.
7615 (vect_analyze_data_refs_alignment): Likewise.
7616 (vect_slp_analyze_and_verify_instance_alignment
7617 (vect_analyze_data_ref_accesses): Likewise.
7618 (vect_prune_runtime_alias_test_list): Likewise.
7619 (vect_analyze_data_refs): Likewise.
7620 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
7621 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
7622 (vect_analyze_scalar_cycles_1): Likewise.
7623 (vect_get_loop_niters): Likewise.
7624 (vect_analyze_loop_form_1): Likewise.
7625 (vect_update_vf_for_slp): Likewise.
7626 (vect_analyze_loop_operations): Likewise.
7627 (vect_analyze_loop): Likewise.
7628 (vectorizable_induction): Likewise.
7629 (vect_transform_loop): Likewise.
7630 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
7631 * tree-vect-slp.c (vect_analyze_slp): Likewise.
7632 (vect_make_slp_decision): Likewise.
7633 (vect_detect_hybrid_slp): Likewise.
7634 (vect_slp_analyze_operations): Likewise.
7635 (vect_slp_bb): Likewise.
7636 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
7637 (vectorizable_bswap): Likewise.
7638 (vectorizable_call): Likewise.
7639 (vectorizable_simd_clone_call): Likewise.
7640 (vectorizable_conversion): Likewise.
7641 (vectorizable_assignment): Likewise.
7642 (vectorizable_shift): Likewise.
7643 (vectorizable_operation): Likewise.
7644 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
7646 2018-06-18 Martin Sebor <msebor@redhat.com>
7648 PR tree-optimization/81384
7649 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
7650 * builtins.c (expand_builtin_strnlen): New function.
7651 (expand_builtin): Call it.
7652 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
7653 * builtins.def (BUILT_IN_STRNLEN): New.
7654 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
7655 Warn for bounds in excess of maximum object size.
7656 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
7657 single-value ranges. Handle strnlen.
7658 (handle_builtin_strlen): Handle strnlen.
7659 (strlen_check_and_optimize_stmt): Same.
7660 * doc/extend.texi (Other Builtins): Document strnlen.
7662 2018-06-18 Maya Rashish <coypu@sdf.org>
7664 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
7665 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
7666 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
7668 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
7670 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
7672 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7674 * tree.c (escaped_string::escape): Replace cast to char * by
7675 const_cast<char *> (unescaped).
7677 2018-06-18 Nick Clifton <nickc@redhat.com>
7680 * tree.c (escaped_string): New class. Converts an unescaped
7681 string into its escaped equivalent.
7682 (warn_deprecated_use): Use the new class to convert the
7683 deprecation message, if present.
7684 (test_escaped_strings): New self test.
7685 (test_c_tests): Add test_escaped_strings.
7686 * doc/extend.texi (deprecated): Add a note that the
7687 deprecation message is affected by the -fmessage-length
7688 option, and that control characters will be escaped.
7689 (#pragma GCC error): Document this pragma.
7690 (#pragma GCC warning): Likewise.
7691 * doc/invoke.texi (-fmessage-length): Document this option's
7692 effect on the #warning and #error preprocessor directives and
7693 the deprecated attribute.
7695 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
7697 * tree.c (decl_value_expr_lookup): Revert latest change.
7698 (decl_value_expr_insert): Likewise.
7700 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
7702 * gimplify.c (nonlocal_vlas): Delete.
7703 (nonlocal_vla_vars): Likewise.
7704 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
7706 (gimplify_body): Do not create and destroy nonlocal_vlas.
7707 * tree-nested.c: Include diagnostic.h.
7708 (use_pointer_in_frame): Tweak.
7709 (lookup_field_for_decl): Add assertion and declare the transformation.
7710 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
7711 internal error when the reference is in a wrong context. Do not
7712 create a debug decl by default.
7713 (note_nonlocal_block_vlas): Delete.
7714 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
7715 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
7716 create a debug decl by default.
7717 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
7718 call is in a wrong context.
7719 (fixup_vla_decls): New function.
7720 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
7721 debug variables were created.
7722 * tree.c (decl_value_expr_lookup): Add checking assertion.
7723 (decl_value_expr_insert): Likewise.
7725 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
7728 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
7729 * tree-scalar-evolution.c (interpret_expr): Likewise.
7730 (expression_expensive_p): Likewise.
7731 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
7732 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
7733 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
7734 (ssa_defined_by_minus_one_stmt_p): New.
7736 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
7739 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
7740 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
7741 * dojump.c (do_jump): Likewise.
7742 * expr.c (expand_expr_real_2): Check operand type's sign.
7743 * fold-const.c (const_unop): Handle ABSU_EXPR.
7744 (fold_abs_const): Likewise.
7745 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
7746 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
7747 (strip_sign_op_1): Likesise.
7748 * match.pd: Add new pattern to generate ABSU_EXPR.
7749 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
7750 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
7751 * tree-eh.c (operation_could_trap_helper_p): Likewise.
7752 * tree-inline.c (estimate_operator_cost): Likewise.
7753 * tree-pretty-print.c (dump_generic_node): Likewise.
7754 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
7755 * tree.def (ABSU_EXPR): New.
7757 2018-06-16 Jakub Jelinek <jakub@redhat.com>
7760 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
7761 documented as preserved for backward compatibility only.
7762 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
7764 PR rtl-optimization/86108
7765 * bb-reorder.c (create_forwarder_block): Renamed to ...
7766 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
7767 jump from new landing pad to the second part.
7768 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
7771 2018-06-15 Jakub Jelinek <jakub@redhat.com>
7774 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
7775 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
7776 Only call store_expr for halves if the mode is the same.
7779 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
7780 Fix up comment formatting.
7782 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
7784 * typed-splay-tree.h (typed_splay_tree::remove): New function.
7785 (typed_splay_tree::closure,
7786 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
7787 (typed_splay_tree::typed_splay_tree,
7788 typed_splay_tree::operator =): Declared private.
7789 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
7790 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
7791 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
7792 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
7793 typed_splay_tree::splay_tree_splay,
7794 typed_splay_tree::splay_tree_foreach_helper,
7795 typed_splay_tree::splay_tree_insert,
7796 typed_splay_tree::splay_tree_remove,
7797 typed_splay_tree::splay_tree_lookup,
7798 typed_splay_tree::splay_tree_predecessor,
7799 typed_splay_tree::splay_tree_successor,
7800 typed_splay_tree::splay_tree_min,
7801 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
7802 (typed_splay_tree::root, typed_splay_tree::comp,
7803 typed_splay_tree::delete_key,
7804 typed_splay_tree::delete_value): New data members.
7805 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
7806 typed_splay_tree::remove.
7808 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
7810 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
7811 -mginv and -mno-ginv to the assembler.
7812 * config/mips/mips.opt (-mcrc): New option.
7814 * doc/invoke.text (-mcrc): Document.
7817 2018-06-15 Nick Clifton <nickc@redhat.com>
7820 * tree.c (escaped_string): New class. Converts an unescaped
7821 string into its escaped equivalent.
7822 (warn_deprecated_use): Use the new class to convert the
7823 deprecation message, if present.
7824 (test_escaped_strings): New self test.
7825 (test_c_tests): Add test_escaped_strings.
7826 * doc/extend.texi (deprecated): Add a note that the
7827 deprecation message is affected by the -fmessage-length
7828 option, and that control characters will be escaped.
7829 (#pragma GCC error): Document this pragma.
7830 (#pragma GCC warning): Likewise.
7831 * doc/invoke.texi (-fmessage-length): Document this option's
7832 effect on the #warning and #error preprocessor directives and
7833 the deprecated attribute.
7835 2018-06-15 Richard Biener <rguenther@suse.de>
7837 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
7838 here, also noting vector size used.
7839 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
7840 size used in MSG_OPTIMIZED_LOCATIONS dump.
7841 (pass_slp_vectorize::execute): Adjust.
7843 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
7846 * config/arc/arc.c (arc_return_address_register): Fix
7849 2018-06-15 Richard Biener <rguenther@suse.de>
7852 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
7853 leave useless conversion stripping to force_gimple_operand_gsi.
7854 (gimplify_build2): Likewise.
7855 (gimplify_build1): Likewise.
7857 2018-06-15 Richard Biener <rguenther@suse.de>
7860 * tree-cfg.c (move_stmt_op): unshare invariant addresses
7861 before adjusting their block.
7863 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
7865 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
7866 multilibs for *-*-rtems*.
7867 * config/riscv/t-rtems: New file.
7869 2018-06-14 Jakub Jelinek <jakub@redhat.com>
7872 * match.pd ((A +- CST1) +- CST2): Punt if last resort
7873 unsigned_type_for returns NULL.
7876 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
7877 subregs of multi-word pseudos unless the float mode has word size.
7879 2018-06-14 Richard Biener <rguenther@suse.de>
7882 * tree-vect-generic.c (build_word_mode_vector_type): Remove
7883 duplicate and harmful type_hash_canon.
7884 * tree.c (type_hash_canon): Assert we didn't find ourselves.
7886 2018-06-14 Richard Biener <rguenther@suse.de>
7889 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
7892 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
7894 * config/rtems.h (STDINT_LONG32): Define.
7896 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
7897 Prachi Godbole <prachi.godbole@imgtec.com>
7899 * config/mips/mips-cpus.def: Define P6600.
7900 * config/mips/mips-tables.opt: Regenerate.
7901 * config/mips/mips.c (mips_ucbranch_type): New enum.
7902 (mips_rtx_cost_data): Add support for P6600.
7903 (mips_issue_rate): Likewise.
7904 (mips_multipass_dfa_lookahead): Likewise.
7905 (mips_avoid_hazard): Likewise.
7906 (mips_reorg_process_insns): Likewise.
7907 (mips_classify_branch_p6600): New function.
7908 * config/mips/mips.h (TUNE_P6600): New define.
7909 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
7910 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
7911 * config/mips/mips.md: Include p6600.md.
7912 (processor): Add p6600.
7913 * config/mips/p6600.md: New file.
7914 * doc/invoke.texi: Add p6600 to supported architectures.
7916 2018-06-13 Martin Sebor <msebor@redhat.com>
7918 PR tree-optimization/86114
7919 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
7921 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
7923 2018-06-13 Richard Biener <rguenther@suse.de>
7925 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
7926 Properly set vector type of the intermediate stmt.
7927 * tree-vect-stmts.c (vectorizable_operation): The destination
7928 var always has vectype_out type.
7930 2018-06-13 Jeff Law <law@redhat.com>
7932 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
7933 integer 0 for argument to print_rtl_with_bb.
7934 (rl78_reorg): Likewise.
7936 2018-06-13 David Malcolm <dmalcolm@redhat.com>
7938 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
7939 from rtx to rtx_insn *.
7940 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
7942 (add_sched_insns_for_speculation): Likewise for local "target",
7943 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
7944 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
7945 from rtx_insn ** to rtx_code_label **.
7946 (reorg_emit_nops): Likewise.
7947 (c6x_reorg): Likewise for local "call_labels".
7948 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
7950 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
7951 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
7952 the loops over LABEL_REFS.
7953 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
7955 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
7956 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
7957 (split_branches): Strengthen local "olabel" from rtx to
7958 rtx_insn *, adding a safe_as_a cast.
7959 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
7961 (add_insn_after): Likewise for first two params.
7962 (add_insn_before): Likewise.
7963 (remove_insn): Likewise for param.
7964 (emit_pattern_before_noloc): Likewise for second and third params.
7965 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
7966 (emit_call_insn_before_noloc): Likewise.
7967 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
7969 (emit_barrier_before): Likewise.
7970 (emit_label_before): Strengthen "label" param from "rtx" to
7971 "rtx_code_label *". Strengthen "before" param from "rtx" to
7973 (emit_insn_after_1): Strengthen "after" param from "rtx" to
7975 (emit_pattern_after_noloc): Likewise.
7976 (emit_insn_after_noloc): Likewise.
7977 (emit_jump_insn_after_noloc): Likewise.
7978 (emit_call_insn_after_noloc): Likewise.
7979 (emit_debug_insn_after_noloc): Likewise.
7980 (emit_barrier_after): Likewise.
7981 (emit_label_after): Likewise for both params.
7982 (emit_pattern_after_setloc): Likewise for "after" param. Convert
7983 "loc" param from "int" to "location_t".
7984 (emit_insn_after_setloc): Likewise.
7985 (emit_jump_insn_after_setloc): Likewise.
7986 (emit_call_insn_after_setloc): Likewise.
7987 (emit_debug_insn_after_setloc): Likewise.
7988 (emit_pattern_before_setloc): Likewise for "before" param. Convert
7989 "loc" param from "int" to "location_t".
7990 (emit_pattern_before): Convert NULL_RTX to NULL.
7991 (emit_insn_before_setloc): Convert "loc" param from "int" to
7993 (emit_jump_insn_before_setloc): Likewise.
7994 (emit_call_insn_before_setloc): Likewise.
7995 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
7996 rtx_insn *. Convert "loc" param from "int" to "location_t".
7997 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
7998 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
7999 Convert 3rd param from "int" to "location_t".
8000 (emit_barrier_before, emit_barrier_after, next_real_insn):
8001 Strengthen param from rtx to rtx_insn *.
8002 (emit_label_before): Strengthen 1st param from "rtx" to
8003 "rtx_code_label *". Strengthen 2nd param from "rtx" to
8005 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
8006 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
8007 Strengthen 2nd param from "rtx" to "rtx_insn *".
8008 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
8009 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
8010 Likewise. Convert 3rd param from "int" to "location_t".
8011 (emit_label_after): Strengthen 1st param from "rtx" to
8013 (next_real_insn, remove_insn): Strengthen param from "rtx" to
8015 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
8016 from "rtx" to "rtx_insn *".
8018 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
8020 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
8021 bodies streamed in with -Q.
8022 * dumpfile.c (dump_files): Add lto-stream-out dump file.
8023 * dumpfile.h (tree_dump_index): Add lto_stream_out.
8024 * gimple-streamer-out.c: Include gimple-pretty-print.h
8025 (output_bb): Dump stmts streamed.
8026 * lto-section-out.c: Include print-tree.h
8027 (lto_begin_section): Dump sections created.
8028 (lto_output_decl_index): Dump decl encoded.
8029 * lto-streamer-out.c: Include print-tree.h
8030 (create_output_block): Dump output block created.
8031 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
8032 (output_function): Dump function output.
8033 (output_constructor): Dump constructor streamed.
8034 (write_global_stream): Output indexes encoded.
8035 (produce_asm_for_decls): Dump streams encoded.
8036 * lto-streamer.c (streamer_dump_file): New global var.
8037 * lto-streamer.h (streamer_dump_file): Declare.
8038 * passes.c (ipa_write_summaries): Initialize streamer dump.
8039 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
8042 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
8045 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
8046 offsets for register save directives. Emit a second batch of save
8047 directives, if need be, when the function accesses prior frames.
8049 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8051 * config/arc/fpu.md (fmasf4): Force operand to register.
8052 (fnmasf4): Likewise.
8054 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8056 * config/arc/arc-protos.h (arc_pad_return): Remove.
8057 * config/arc/arc.c (machine_function): Remove force_short_suffix
8059 (arc_print_operand): Adjust printing of '&'.
8060 (arc_verify_short): Remove conditional printing of short suffix.
8061 (arc_final_prescan_insn): Remove reference to size_reason.
8062 (pad_return): New function.
8063 (arc_reorg): Call pad_return.
8064 (arc_pad_return): Remove.
8065 (arc_init_machine_status): Remove reference to force_short_suffix.
8066 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
8067 (attr length): When attribute iscompact is true force to 2
8068 regardless; in the case of maybe check if we want to force the
8069 instruction to have 4 bytes length.
8070 (nopv): Change it to generate 4 byte long nop as well.
8071 (blockage): New pattern.
8072 (simple_return): Remove call to arc_pad_return.
8073 (p_return_i): Likewise.
8075 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8077 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
8079 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8081 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
8084 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8086 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
8087 for ARC700 and ARCv2.
8089 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
8092 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
8093 operands[2] instead of operands[1].
8096 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
8098 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
8099 case, check whether the outer register overlaps an unallocatable
8100 register, not just whether it fits the required class.
8102 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
8104 * poly-int.h (can_div_trunc_p): Add new overload in which all values
8106 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
8107 (memrefs_conflict_p): Likewise.
8108 (init_alias_analysis): Likewise.
8109 * cfgexpand.c (expand_debug_expr): Likewise.
8110 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
8111 * cse.c (fold_rtx): Likewise.
8112 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
8113 * expr.c (emit_block_move_hints): Likewise.
8114 (clear_storage_hints, push_block, emit_push_insn): Likewise.
8115 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
8116 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
8117 (emit_group_store): Likewise.
8118 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
8119 to read the PRE/POST_MODIFY increment.
8120 * calls.c (store_one_arg): Use strip_offset.
8121 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
8123 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
8125 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
8126 (simplify_binary_operation_1): Extend CONST_INT handling to
8128 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
8129 than a HOST_WIDE_INT.
8130 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
8132 (adjust_mems, add_stores): Update accodingly.
8133 (vt_canonicalize_addr): Track polynomial offsets.
8134 (emit_note_insn_var_location): Likewise.
8135 (vt_add_function_parameter): Likewise.
8136 (vt_initialize): Likewise.
8138 2018-06-12 Jeff Law <law@redhat.com>
8140 * config.gcc (alpha*-*-freebsd*): Remove.
8141 * config/alpha/freebsd.h: Remove.
8143 2018-06-12 David Malcolm <dmalcolm@redhat.com>
8146 * spellcheck-tree.c (levenshtein_distance): Rename to...
8147 (get_edit_distance): ...this, and update for underlying renaming.
8148 * spellcheck-tree.h (levenshtein_distance): Rename to...
8149 (get_edit_distance): ...this.
8150 * spellcheck.c (levenshtein_distance): Rename to...
8151 (get_edit_distance): ...this. Convert from Levenshtein distance
8152 to Damerau-Levenshtein distance by supporting transpositions of
8153 adjacent characters. Rename "v1" to "v_next" and "v0" to
8155 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
8156 (selftest::test_edit_distance_unit_test_oneway): ...this, and
8157 update for underlying renaming.
8158 (selftest::levenshtein_distance_unit_test): Rename to...
8159 (selftest::test_get_edit_distance_unit): ...this, and update for
8160 underlying renaming.
8161 (selftest::test_find_closest_string): Add example from PR 69968
8162 where transposition helps
8163 (selftest::test_metric_conditions): Update for renaming.
8164 (selftest::test_metric_conditions): Likewise.
8165 (selftest::spellcheck_c_tests): Likewise.
8166 * spellcheck.h (levenshtein_distance): Rename both overloads to...
8167 (get_edit_distance): ...this.
8168 (best_match::consider): Update for renaming.
8170 2018-06-12 Martin Sebor <msebor@redhat.com>
8172 PR tree-optimization/85259
8173 * builtins.c (compute_objsize): Handle constant offsets.
8174 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
8175 true iff a warning has been issued.
8176 * gimple.h (gimple_nonartificial_location): New function.
8177 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
8178 gimple_nonartificial_location and handle -Wno-system-headers.
8179 (handle_builtin_stxncpy): Same.
8181 2018-06-12 Martin Sebor <msebor@redhat.com>
8184 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
8186 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
8188 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
8189 BUILTIN_VEC_XST entries for pointer to double and long long.
8191 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
8194 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
8196 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
8199 2018-06-12 Martin Liska <mliska@suse.cz>
8201 * doc/options.texi: Document IntegerRange.
8203 2018-06-12 Martin Liska <mliska@suse.cz>
8205 * config/i386/i386.opt: Make MPX-related options as Deprecated.
8206 * opt-functions.awk: Handle Deprecated flag.
8207 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
8209 (read_cmdline_option): Report warning for a deprecated option.
8210 * opts.h (struct cl_option): Add new field cl_deprecated.
8211 (CL_ERR_DEPRECATED): New.
8213 2018-06-12 Martin Liska <mliska@suse.cz>
8215 * doc/options.texi: Document Deprecated option flag.
8217 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8219 * config/arc/arc-arch.h (arc_extras): New enum.
8220 (arc_cpu_t):Add field extra.
8221 (arc_cpu_types): Consider the extras.
8222 * config/arc/arc-cpus.def: Add extras info.
8223 * config/arc/arc-opts.h (processor_type): Consider extra field.
8224 * config/arc/arc.c (arc_override_options): Handle extra field.
8226 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8228 * config/arc/arc-arch.h: Update ARC_OPTX macro.
8229 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
8231 * config/arc/arc.c (arc_init): Update pic warning.
8232 (irq_range): Update irq range parsing warnings.
8233 (arc_override_options): Update various warning messages.
8234 (arc_handle_aux_attribute): Likewise.
8236 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
8238 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
8240 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8242 * doc/sourcebuild.texi: Document usage of line number 0 in verify
8243 compiler messages directives.
8245 2018-06-12 Matthew Fortune <mfortune@gmail.com>
8247 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
8248 * config/mips/mips-tables.opt: Regenerate.
8249 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
8251 * doc/invoke.texi: Document -march=i6500.
8253 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
8255 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
8256 (i6400_gpmul): Add cpu_unit.
8257 (i6400_gpdiv): Likewise.
8258 (i6400_msa_add_d): Update reservations.
8259 (i6400_msa_int_add) Likewise.
8260 (i6400_msa_short_logic3) Likewise.
8261 (i6400_msa_short_logic2) Likewise.
8262 (i6400_msa_short_logic) Likewise.
8263 (i6400_msa_move) Likewise.
8264 (i6400_msa_cmp) Likewise.
8265 (i6400_msa_short_float2) Likewise.
8266 (i6400_msa_div_d) Likewise.
8267 (i6400_msa_long_logic1) Likewise.
8268 (i6400_msa_long_logic2) Likewise.
8269 (i6400_msa_mult) Likewise.
8270 (i6400_msa_long_float2) Likewise.
8271 (i6400_msa_long_float4) Likewise.
8272 (i6400_msa_long_float5) Likewise.
8273 (i6400_msa_long_float8) Likewise.
8274 (i6400_fpu_fadd): Include frint type.
8275 (i6400_fpu_store): New define_insn_reservation.
8276 (i6400_fpu_load): Likewise.
8277 (i6400_fpu_move): Likewise.
8278 (i6400_fpu_fcmp): Likewise.
8279 (i6400_fpu_fmadd): Likewise.
8280 (i6400_int_mult): Include imul3nc type and update reservation.
8281 (i6400_int_div): Include idiv3 type and update reservation.
8282 (i6400_int_load): Update to check type not move_type.
8283 (i6400_int_store): Likewise.
8284 (i6400_int_prefetch): Set zero latency.
8286 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
8288 * gcc.c: Document new %@{...} sequence.
8289 (LINK_COMMAND_SPEC): Use it for the -L switches.
8290 (cpp_unique_options): Use it for the -I switches.
8291 (at_file_argbuf): New global variable.
8292 (in_at_file): Likewise.
8293 (alloc_args): Create at_file_argbuf.
8294 (clear_args): Truncate at_file_argbuf.
8295 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
8296 (open_at_file): New function.
8297 (close_at_file): Likewise.
8298 (create_at_file): Delete.
8299 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
8302 (validate_switches_from_spec): Deal with %@{...} sequence.
8303 (validate_switches): Likewise.
8304 (driver::finalize): Call clear_args.
8306 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
8308 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
8310 2018-06-11 Martin Sebor <msebor@redhat.com>
8312 * doc/invoke.texi (-Wall): List -Wc++17-compat.
8313 (Wno-class-memaccess): Add @opindex.
8314 (Wno-templates, Wno-multiple-inheritance): Same.
8315 (Wno-virtual-inheritance, Wno-namespaces): Same.
8316 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
8317 (Wno-format-overflow, Wno-format-truncation): Same.
8318 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
8319 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
8320 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
8321 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
8322 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
8323 (Wno-misspelled-isr): Same.
8325 2018-06-11 Martin Sebor <msebor@redhat.com>
8327 * PR tree-optimization/86083
8328 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
8330 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
8332 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
8334 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
8337 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
8338 on the correct operand.
8339 (*movdi_internal64): Ditto.
8341 2018-06-11 Martin Liska <mliska@suse.cz>
8343 PR tree-optimization/86089
8344 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
8346 2018-06-11 Julia Koval <julia.koval@intel.com>
8348 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
8349 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
8350 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
8352 2018-06-11 Olivier Hainque <hainque@adacore.com>
8354 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
8355 for Ada with strict dwarf2.
8357 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
8360 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
8363 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
8365 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
8367 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
8369 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
8372 2018-06-08 Martin Liska <mliska@suse.cz>
8374 * tree-cfg.h (debug_function): Fix argument type to match
8377 2018-06-08 Martin Liska <mliska@suse.cz>
8379 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
8380 Remove usage of MPX-related (and removed) fields.
8381 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
8383 2018-06-08 David Malcolm <dmalcolm@redhat.com>
8385 * cfg.c (debug): Use TDF_NONE rather than 0.
8386 * cfghooks.c (debug): Likewise.
8387 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
8388 (struct dump_option_value_info): Convert to...
8389 (struct kv_pair): ...this template type.
8390 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
8392 (optinfo_verbosity_options): Likewise.
8393 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
8395 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
8396 than int for "optgroup_flags" param.
8397 (dump_generic_expr_loc): Use dump_flags_t rather than int for
8399 (dump_dec): Likewise.
8400 (dump_finish): Use TDF_NONE rather than 0.
8401 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
8402 rather than int for "optgroup_flags" param. Use TDF_NONE rather
8403 than 0. Update for change to option_ptr.
8404 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
8405 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
8406 0. Update for changes to optinfo_verbosity_options and
8408 (opt_info_switch_p): Convert optgroup_flags from int to
8410 (dump_basic_block): Use dump_flags_t rather than int
8411 for "dump_kind" param.
8412 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
8413 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
8414 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
8415 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
8416 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
8417 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
8418 TDF_NONE): Convert from macros to...
8419 (enum dump_flag): ...this new enum.
8420 (dump_flags_t): Update to use enum.
8421 (operator|, operator&, operator~, operator|=, operator&=):
8422 Implement for dump_flags_t.
8423 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
8424 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
8425 Convert from macros to...
8426 (enum optgroup_flag): ...this new enum.
8427 (optgroup_flags_t): New typedef.
8428 (operator|, operator|=): Implement for optgroup_flags_t.
8429 (struct dump_file_info): Convert field "alt_flags" to
8430 dump_flags_t. Convert field "optgroup_flags" to
8432 (dump_basic_block): Use dump_flags_t rather than int for param.
8433 (dump_generic_expr_loc): Likewise.
8434 (dump_dec): Likewise.
8435 (dump_register): Convert param "optgroup_flags" to
8437 (opt_info_enable_passes): Likewise.
8438 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
8440 * gimple-pretty-print.c (debug): Likewise.
8441 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
8442 (merged_store_group::apply_stores): Likewise.
8443 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
8444 * gimple.c (verify_gimple_pp): Likewise.
8445 * graphite-poly.c (print_pbb_body): Likewise.
8446 * passes.c (pass_manager::register_one_dump_file): Convert
8447 local "optgroup_flags" to optgroup_flags_t.
8448 * print-tree.c (print_node): Use TDF_NONE rather than 0.
8450 (debug_body): Likewise.
8451 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
8452 to optgroup_flags_t.
8453 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
8455 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
8456 (convert_mult_to_fma): Likewise.
8457 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
8458 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
8459 * tree-vect-data-refs.c (dump_lower_bound): Convert param
8460 "dump_kind" to dump_flags_t.
8462 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
8464 * config/rs6000/rs6000.c (min, max): Delete.
8466 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
8468 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
8469 -mabi=spe and -mabi=no-spe.
8471 2018-06-08 Martin Liska <mliska@suse.cz>
8473 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
8474 where we expect an existing summary.
8476 2018-06-08 Martin Liska <mliska@suse.cz>
8478 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
8479 * ipa-inline.h (estimate_edge_growth): Likewise.
8481 2018-06-08 Martin Liska <mliska@suse.cz>
8483 * cgraph.c (function_version_hasher::hash): Use
8484 cgraph_node::get_uid ().
8485 (function_version_hasher::equal):
8486 * cgraph.h (cgraph_node::get_uid): New method.
8487 * ipa-inline.c (update_caller_keys): Use
8488 cgraph_node::get_uid ().
8489 (update_callee_keys): Likewise.
8490 * ipa-utils.c (searchc): Likewise.
8491 (ipa_reduced_postorder): Likewise.
8492 * lto-cgraph.c (input_node): Likewise.
8493 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
8494 * symbol-summary.h (symtab_insertion): Likewise.
8495 (symtab_removal): Likewise.
8496 (symtab_duplication): Likewise.
8497 * tree-pretty-print.c (dump_function_header): Likewise.
8498 * tree-sra.c (convert_callers_for_node): Likewise.
8500 2018-06-08 Martin Liska <mliska@suse.cz>
8502 * cgraph.c (symbol_table::create_edge): Always assign a new
8504 (symbol_table::free_edge): Do not recycle numbers.
8505 * cgraph.h (cgraph_edge::get): New method.
8506 * symbol-summary.h (symtab_removal): Use it.
8507 (symtab_duplication): Likewise.
8508 (call_summary::hashable_uid): Remove.
8510 2018-06-08 Martin Liska <mliska@suse.cz>
8512 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
8513 (initialize_growth_caches): Remove.
8514 (free_growth_caches): Likewise.
8515 (do_estimate_edge_time): Use edge_growth_cache.
8516 (do_estimate_edge_size): Likewise.
8517 (do_estimate_edge_hints): Likewise.
8518 * ipa-inline.c (reset_edge_caches): Likewise.
8519 (recursive_inlining): Likewise.
8520 (inline_small_functions): Likewise.
8521 * ipa-inline.h (initialize_growth_caches): Remove.
8522 (estimate_edge_size): Likewise.
8523 (estimate_edge_time): Likewise.
8524 (estimate_edge_hints): Likewise.
8525 (reset_edge_growth_cache): Likewise.
8526 * symbol-summary.h (call_summary::remove): New method.
8528 2018-06-08 Martin Liska <mliska@suse.cz>
8530 * ipa-cp.c (class edge_clone_summary): New summary.
8531 (grow_edge_clone_vectors): Remove.
8532 (ipcp_edge_duplication_hook): Remove.
8533 (class edge_clone_summary_t): New call_summary class.
8534 (ipcp_edge_removal_hook): Remove.
8535 (edge_clone_summary_t::duplicate): New function.
8536 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
8537 (create_specialized_node): Likewise.
8538 (ipcp_driver): Initialize edge_clone_summaries and do not
8541 2018-06-08 Martin Liska <mliska@suse.cz>
8543 * symbol-summary.h (get): New function.
8544 (call_summary::m_initialize_when_cloning): New class member.
8546 2018-06-08 Martin Liska <mliska@suse.cz>
8548 * cgraph.c (cgraph_node::remove): Do not recycle uid.
8549 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
8550 (symbol_table::allocate_cgraph_symbol): Do not set uid.
8551 * passes.c (uid_hash_t): Record removed_nodes by their uids.
8552 (remove_cgraph_node_from_order): Use the removed_nodes set.
8553 (do_per_function_toporder): Likwise.
8554 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
8555 instead of summary_uid.
8556 (symtab_removal): Likewise.
8557 (symtab_duplication): Likewise.
8559 2018-06-08 Martin Liska <mliska@suse.cz>
8561 * ipa-cp.c (ipcp_store_bits_results): Use
8562 ipcp_transformation_sum.
8563 (ipcp_store_vr_results): Likewise.
8564 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
8566 (ipcp_transformation_initialize): ... this.
8567 (ipa_set_node_agg_value_chain):
8568 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
8569 (write_ipcp_transformation_info): Likewise.
8570 (read_ipcp_transformation_info): Likewise.
8571 (ipcp_update_bits): Likewise.
8572 (ipcp_update_vr): Likewise.
8573 (ipcp_transform_function): Likewise.
8574 * ipa-prop.h: Rename ipcp_transformation_summary to
8575 ipcp_transformation.
8576 (class ipcp_transformation_t): New function summary.
8577 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
8578 (ipa_get_agg_replacements_for_node): Likewise.
8580 2018-06-08 Martin Liska <mliska@suse.cz>
8582 * ipa-pure-const.c (struct funct_state_d): Do it class instead
8584 (class funct_state_summary_t): New function_summary class.
8585 (has_function_state): Remove.
8586 (get_function_state): Likewise.
8587 (set_function_state): Likewise.
8588 (add_new_function): Likewise.
8589 (funct_state_summary_t::insert): New function.
8590 (duplicate_node_data): Remove.
8591 (remove_node_data): Remove.
8592 (funct_state_summary_t::duplicate): New function.
8593 (register_hooks): Create new funct_state_summaries.
8594 (pure_const_generate_summary): Use it.
8595 (pure_const_write_summary): Likewise.
8596 (pure_const_read_summary): Likewise.
8597 (propagate_pure_const): Likewise.
8598 (propagate_nothrow): Likewise.
8599 (dump_malloc_lattice): Likewise.
8600 (propagate_malloc): Likewise.
8601 (execute): Do not register hooks, just remove summary
8603 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
8606 2018-06-08 Martin Liska <mliska@suse.cz>
8608 * ipa-reference.c (remove_node_data): Remove.
8609 (duplicate_node_data): Likewise.
8610 (class ipa_ref_var_info_summary_t): New class.
8611 (class ipa_ref_opt_summary_t): Likewise.
8612 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
8613 (get_reference_optimization_summary): Use
8614 ipa_ref_opt_sum_summaries.
8615 (set_reference_vars_info): Remove.
8616 (set_reference_optimization_summary): Likewise.
8617 (ipa_init): Create summaries.
8618 (init_function_info): Use function summary.
8619 (ipa_ref_opt_summary_t::duplicate): New function.
8620 (ipa_ref_opt_summary_t::remove): New function.
8621 (get_read_write_all_from_node): Fix GNU coding style.
8622 (propagate): Use function summary.
8623 (write_node_summary_p): Fix GNU coding style.
8624 (stream_out_bitmap): Likewise.
8625 (ipa_reference_read_optimization_summary): Use function summary.
8626 (ipa_reference_c_finalize): Do not release hooks.
8628 2018-06-08 Martin Liska <mliska@suse.cz>
8630 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
8631 (analyze_function_body): Extract multiple calls of get_create.
8632 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
8633 * ipa-inline.c (recursive_inlining): Use ::get method.
8634 * ipa-inline.h (estimate_edge_growth): Likewise.
8636 2018-06-08 Martin Liska <mliska@suse.cz>
8638 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
8640 (hsa_function_summary::hsa_function_summary): Use the new enum
8642 (hsa_gpu_implementation_p): Use hsa_summaries::get.
8643 * hsa-gen.c (hsa_get_host_function): Likewise.
8644 (get_brig_function_name): Likewise.
8645 * ipa-hsa.c (process_hsa_functions): Likewise.
8646 (ipa_hsa_write_summary): Likewise.
8647 * symbol-summary.h (symtab_duplication): Use ::get function/
8648 (get): New function.
8650 2018-06-08 Martin Liska <mliska@suse.cz>
8652 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
8654 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
8655 (hsa_register_kernel): Likewise.
8656 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
8657 * hsa-gen.c (hsa_get_host_function): Likewise.
8658 (get_brig_function_name): Likewise.
8659 (generate_hsa): Likewise.
8660 (pass_gen_hsail::execute): Likewise.
8661 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
8662 (devirtualization_time_bonus): Likewise.
8663 (ipcp_propagate_stage): Likewise.
8664 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
8665 (edge_set_predicate): Likewise.
8666 (evaluate_conditions_for_known_args): Likewise.
8667 (evaluate_properties_for_edge): Likewise.
8668 (ipa_fn_summary::reset): Likewise.
8669 (ipa_fn_summary_t::duplicate): Likewise.
8670 (dump_ipa_call_summary): Likewise.
8671 (ipa_dump_fn_summary): Likewise.
8672 (analyze_function_body): Likewise.
8673 (compute_fn_summary): Likewise.
8674 (estimate_edge_devirt_benefit): Likewise.
8675 (estimate_edge_size_and_time): Likewise.
8676 (estimate_calls_size_and_time): Likewise.
8677 (estimate_node_size_and_time): Likewise.
8678 (inline_update_callee_summaries): Likewise.
8679 (remap_edge_change_prob): Likewise.
8680 (remap_edge_summaries): Likewise.
8681 (ipa_merge_fn_summary_after_inlining): Likewise.
8682 (ipa_update_overall_fn_summary): Likewise.
8683 (read_ipa_call_summary): Likewise.
8684 (inline_read_section): Likewise.
8685 (write_ipa_call_summary): Likewise.
8686 (ipa_fn_summary_write): Likewise.
8687 (ipa_free_fn_summary): Likewise.
8688 * ipa-hsa.c (process_hsa_functions): Likewise.
8689 (ipa_hsa_write_summary): Likewise.
8690 (ipa_hsa_read_section): Likewise.
8691 * ipa-icf.c (sem_function::merge): Likewise.
8692 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
8693 (do_estimate_edge_time): Likewise.
8694 (estimate_size_after_inlining): Likewise.
8695 (estimate_growth): Likewise.
8696 (growth_likely_positive): Likewise.
8697 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
8698 (inline_call): Likewise.
8699 * ipa-inline.c (caller_growth_limits): Likewise.
8700 (can_inline_edge_p): Likewise.
8701 (can_inline_edge_by_limits_p): Likewise.
8702 (compute_uninlined_call_time): Likewise.
8703 (compute_inlined_call_time): Likewise.
8704 (want_inline_small_function_p): Likewise.
8705 (edge_badness): Likewise.
8706 (update_caller_keys): Likewise.
8707 (update_callee_keys): Likewise.
8708 (recursive_inlining): Likewise.
8709 (inline_small_functions): Likewise.
8710 (inline_to_all_callers_1): Likewise.
8711 (dump_overall_stats): Likewise.
8712 (early_inline_small_functions): Likewise.
8713 (early_inliner): Likewise.
8714 * ipa-inline.h (estimate_edge_growth): Likewise.
8715 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
8716 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8717 * ipa-prop.h (IPA_NODE_REF): Likewise.
8718 (IPA_EDGE_REF): Likewise.
8719 * ipa-pure-const.c (malloc_candidate_p): Likewise.
8720 (propagate_malloc): Likewise.
8721 * ipa-split.c (execute_split_functions): Likewise.
8722 * symbol-summary.h: Rename get to get_create.
8724 (get_create): Likewise.
8725 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
8727 2018-06-08 Martin Liska <mliska@suse.cz>
8729 * symbol-summary.h (release): Move definition out of class
8731 (symtab_removal): Likewise.
8732 (symtab_duplication): Likewise.
8734 2018-06-08 Martin Liska <mliska@suse.cz>
8736 * symbol-summary.h (function_summary): Move constructor
8737 implementation out of class declaration.
8738 (release): Likewise.
8739 (symtab_insertion): Likewise.
8740 (symtab_removal): Likewise.
8741 (symtab_duplication): Likewise.
8744 2018-06-08 Martin Liska <mliska@suse.cz>
8746 * Makefile.in: Remove support for MPX (macros, related functions,
8747 fields in cgraph_node, ...).
8748 * builtin-types.def (BT_BND): Likewise.
8749 (BT_FN_BND_CONST_PTR): Likewise.
8750 (BT_FN_CONST_PTR_BND): Likewise.
8751 (BT_FN_VOID_PTR_BND): Likewise.
8752 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
8753 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
8754 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
8755 (expand_builtin_mempcpy_with_bounds): Likewise.
8756 (expand_builtin_memset_with_bounds): Likewise.
8757 (expand_builtin_memset_args): Likewise.
8758 (std_expand_builtin_va_start): Likewise.
8759 (expand_builtin): Likewise.
8760 (expand_builtin_with_bounds): Likewise.
8761 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
8762 (DEF_LIB_BUILTIN_CHKP): Likewise.
8763 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
8764 (DEF_CHKP_BUILTIN): Likewise.
8765 (BUILT_IN_MEMCPY): Likewise.
8766 (BUILT_IN_MEMMOVE): Likewise.
8767 (BUILT_IN_MEMPCPY): Likewise.
8768 (BUILT_IN_MEMSET): Likewise.
8769 (BUILT_IN_STPCPY): Likewise.
8770 (BUILT_IN_STRCAT): Likewise.
8771 (BUILT_IN_STRCHR): Likewise.
8772 (BUILT_IN_STRCPY): Likewise.
8773 (BUILT_IN_STRLEN): Likewise.
8774 (BUILT_IN_MEMCPY_CHK): Likewise.
8775 (BUILT_IN_MEMMOVE_CHK): Likewise.
8776 (BUILT_IN_MEMPCPY_CHK): Likewise.
8777 (BUILT_IN_MEMSET_CHK): Likewise.
8778 (BUILT_IN_STPCPY_CHK): Likewise.
8779 (BUILT_IN_STRCAT_CHK): Likewise.
8780 (BUILT_IN_STRCPY_CHK): Likewise.
8781 * calls.c (store_bounds): Likewise.
8782 (emit_call_1): Likewise.
8783 (special_function_p): Likewise.
8784 (maybe_warn_nonstring_arg): Likewise.
8785 (initialize_argument_information): Likewise.
8786 (finalize_must_preallocate): Likewise.
8787 (compute_argument_addresses): Likewise.
8788 (expand_call): Likewise.
8789 * cfgexpand.c (expand_call_stmt): Likewise.
8790 (expand_return): Likewise.
8791 (expand_gimple_stmt_1): Likewise.
8792 (pass_expand::execute): Likewise.
8793 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
8794 (cgraph_node::remove): Likewise.
8795 (cgraph_node::dump): Likewise.
8796 (cgraph_node::verify_node): Likewise.
8797 * cgraph.h (chkp_function_instrumented_p): Likewise.
8798 (symtab_node::get_alias_target): Likewise.
8799 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
8800 (cgraph_local_p): Likewise.
8801 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
8802 (cgraph_edge::rebuild_references): Likewise.
8803 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
8804 (walk_polymorphic_call_targets): Likewise.
8805 (cgraph_node::expand_thunk): Likewise.
8806 (symbol_table::output_weakrefs): Likewise.
8807 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
8808 (ix86_handle_option): Likewise.
8809 * config/i386/constraints.md: Likewise.
8810 * config/i386/i386-builtin-types.def (BND): Likewise.
8814 * config/i386/i386-builtin.def (BDESC_END): Likewise.
8815 (BDESC_FIRST): Likewise.
8817 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
8818 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
8819 * config/i386/i386.c (enum reg_class): Likewise.
8820 (ix86_target_string): Likewise.
8821 (ix86_option_override_internal): Likewise.
8822 (ix86_conditional_register_usage): Likewise.
8823 (ix86_valid_target_attribute_inner_p): Likewise.
8824 (ix86_set_indirect_branch_type): Likewise.
8825 (ix86_set_current_function): Likewise.
8826 (ix86_function_arg_regno_p): Likewise.
8827 (init_cumulative_args): Likewise.
8828 (ix86_function_arg_advance): Likewise.
8829 (ix86_function_arg): Likewise.
8830 (ix86_pass_by_reference): Likewise.
8831 (ix86_function_value_regno_p): Likewise.
8832 (ix86_function_value_1): Likewise.
8833 (ix86_function_value_bounds): Likewise.
8834 (ix86_return_in_memory): Likewise.
8835 (ix86_setup_incoming_vararg_bounds): Likewise.
8836 (ix86_va_start): Likewise.
8837 (indirect_thunk_need_prefix): Likewise.
8838 (print_reg): Likewise.
8839 (ix86_print_operand): Likewise.
8840 (ix86_expand_call): Likewise.
8841 (ix86_output_function_return): Likewise.
8842 (reg_encoded_number): Likewise.
8843 (BDESC_VERIFYS): Likewise.
8844 (ix86_init_mpx_builtins): Likewise.
8845 (ix86_init_builtins): Likewise.
8846 (ix86_emit_cmove): Likewise.
8847 (ix86_emit_move_max): Likewise.
8848 (ix86_expand_builtin): Likewise.
8849 (ix86_builtin_mpx_function): Likewise.
8850 (ix86_get_arg_address_for_bt): Likewise.
8851 (ix86_load_bounds): Likewise.
8852 (ix86_store_bounds): Likewise.
8853 (ix86_load_returned_bounds): Likewise.
8854 (ix86_store_returned_bounds): Likewise.
8855 (ix86_class_likely_spilled_p): Likewise.
8856 (ix86_hard_regno_mode_ok): Likewise.
8857 (x86_order_regs_for_local_alloc): Likewise.
8858 (ix86_mitigate_rop): Likewise.
8859 (ix86_bnd_prefixed_insn_p): Likewise.
8860 (ix86_mpx_bound_mode): Likewise.
8861 (ix86_make_bounds_constant): Likewise.
8862 (ix86_initialize_bounds): Likewise.
8863 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
8864 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
8865 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
8866 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
8867 (TARGET_CHKP_BOUND_MODE): Likewise.
8868 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
8869 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
8870 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
8871 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
8872 * config/i386/i386.h (TARGET_MPX): Likewise.
8873 (TARGET_MPX_P): Likewise.
8874 (VALID_BND_REG_MODE): Likewise.
8875 (FIRST_BND_REG): Likewise.
8876 (LAST_BND_REG): Likewise.
8877 (enum reg_class): Likewise.
8878 (BND_REG_P): Likewise.
8879 (BND_REGNO_P): Likewise.
8880 (BNDmode): Likewise.
8881 (ADJUST_INSN_LENGTH): Likewise.
8882 * config/i386/i386.md: Likewise.
8883 * config/i386/i386.opt: Likewise.
8884 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
8885 (defined): Likewise.
8886 (LINK_MPX): Likewise.
8887 (MPX_SPEC): Likewise.
8888 (LIBMPX_SPEC): Likewise.
8889 (LIBMPXWRAPPERS_SPEC): Likewise.
8890 (CHKP_SPEC): Likewise.
8891 * config/i386/predicates.md: Likewise.
8892 * dbxout.c (dbxout_type): Likewise.
8893 * doc/extend.texi: Likewise.
8894 * doc/invoke.texi: Likewise.
8895 * doc/md.texi: Likewise.
8896 * doc/tm.texi: Likewise.
8897 * doc/tm.texi.in: Likewise.
8898 * dwarf2out.c (is_base_type): Likewise.
8899 (gen_formal_types_die): Likewise.
8900 (gen_subprogram_die): Likewise.
8901 (gen_type_die_with_usage): Likewise.
8902 (gen_decl_die): Likewise.
8903 (dwarf2out_late_global_decl): Likewise.
8904 * expr.c (expand_assignment): Likewise.
8905 (emit_storent_insn): Likewise.
8906 (store_expr_with_bounds): Likewise.
8907 (store_expr): Likewise.
8908 (expand_expr_real_1): Likewise.
8909 * expr.h (store_expr_with_bounds): Likewise.
8910 * function.c (use_register_for_decl): Likewise.
8911 (struct bounds_parm_data): Likewise.
8912 (assign_parms_augmented_arg_list): Likewise.
8913 (assign_parm_find_entry_rtl): Likewise.
8914 (assign_parm_is_stack_parm): Likewise.
8915 (assign_parm_load_bounds): Likewise.
8916 (assign_bounds): Likewise.
8917 (assign_parms): Likewise.
8918 (expand_function_start): Likewise.
8919 * gcc.c (CHKP_SPEC): Likewise.
8920 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
8921 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
8922 (wrestrict_dom_walker::check_call): Likewise.
8923 * gimple.c (gimple_build_call_from_tree): Likewise.
8924 * gimple.h (enum gf_mask): Likewise.
8925 (gimple_call_with_bounds_p): Likewise.
8926 (gimple_call_set_with_bounds): Likewise.
8927 * gimplify.c (gimplify_init_constructor): Likewise.
8928 * ipa-cp.c (initialize_node_lattices): Likewise.
8929 (propagate_constants_across_call): Likewise.
8930 (find_more_scalar_values_for_callers_subset): Likewise.
8931 * ipa-hsa.c (process_hsa_functions): Likewise.
8932 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
8933 * ipa-icf.c (sem_function::merge): Likewise.
8934 * ipa-inline.c (early_inliner): Likewise.
8935 * ipa-pure-const.c (warn_function_noreturn): Likewise.
8936 (warn_function_cold): Likewise.
8937 (propagate_pure_const): Likewise.
8938 * ipa-ref.h (enum GTY): Likewise.
8939 * ipa-split.c (find_retbnd): Likewise.
8940 (consider_split): Likewise.
8941 (split_function): Likewise.
8942 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
8943 * ipa.c (walk_polymorphic_call_targets): Likewise.
8944 (symbol_table::remove_unreachable_nodes): Likewise.
8945 (process_references): Likewise.
8946 (cgraph_build_static_cdtor_1): Likewise.
8947 * lto-cgraph.c (lto_output_node): Likewise.
8948 (output_refs): Likewise.
8949 (compute_ltrans_boundary): Likewise.
8950 (input_overwrite_node): Likewise.
8951 (input_node): Likewise.
8952 (input_cgraph_1): Likewise.
8953 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
8954 * passes.c (pass_manager::execute_early_local_passes): Likewise.
8955 (class pass_chkp_instrumentation_passes): Likewise.
8956 (make_pass_chkp_instrumentation_passes): Likewise.
8957 * passes.def: Likewise.
8958 * rtl.h (struct GTY): Likewise.
8959 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
8960 * stor-layout.c (layout_type): Likewise.
8961 * symtab.c: Likewise.
8962 * target.def: Likewise.
8963 * targhooks.c (default_chkp_bound_type): Likewise.
8964 (default_chkp_bound_mode): Likewise.
8965 (default_builtin_chkp_function): Likewise.
8966 (default_chkp_function_value_bounds): Likewise.
8967 (default_chkp_make_bounds_constant): Likewise.
8968 (default_chkp_initialize_bounds): Likewise.
8969 * targhooks.h (default_chkp_bound_type): Likewise.
8970 (default_chkp_bound_mode): Likewise.
8971 (default_builtin_chkp_function): Likewise.
8972 (default_chkp_function_value_bounds): Likewise.
8973 (default_chkp_make_bounds_constant): Likewise.
8974 (default_chkp_initialize_bounds): Likewise.
8975 * toplev.c (compile_file): Likewise.
8976 (process_options): Likewise.
8977 * tree-core.h (DEF_BUILTIN): Likewise.
8978 (DEF_BUILTIN_CHKP): Likewise.
8979 * tree-inline.c (declare_return_variable): Likewise.
8980 (remap_gimple_stmt): Likewise.
8981 (copy_bb): Likewise.
8982 (initialize_inlined_parameters): Likewise.
8983 (expand_call_inline): Likewise.
8984 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
8985 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
8986 (make_pass_ipa_chkp_produce_thunks): Likewise.
8987 (make_pass_chkp): Likewise.
8988 (make_pass_chkp_opt): Likewise.
8989 (make_pass_chkp_instrumentation_passes): Likewise.
8990 * tree-pretty-print.c (dump_generic_node): Likewise.
8991 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
8992 * tree-ssa-dce.c (propagate_necessity): Likewise.
8993 (eliminate_unnecessary_stmts): Likewise.
8994 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
8995 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
8996 * tree-ssa-sccvn.h: Likewise.
8997 * tree-ssa-strlen.c (get_string_length): Likewise.
8998 (valid_builtin_call): Likewise.
8999 (adjust_last_stmt): Likewise.
9000 (handle_builtin_strchr): Likewise.
9001 (handle_builtin_strcpy): Likewise.
9002 (handle_builtin_stxncpy): Likewise.
9003 (handle_builtin_memcpy): Likewise.
9004 (handle_builtin_strcat): Likewise.
9005 (strlen_check_and_optimize_stmt): Likewise.
9006 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
9007 * tree-streamer-in.c: Likewise.
9008 * tree-streamer.c (record_common_node): Likewise.
9009 * tree.c (tree_code_size): Likewise.
9010 (wide_int_to_tree_1): Likewise.
9011 (type_contains_placeholder_1): Likewise.
9012 (build_common_tree_nodes): Likewise.
9013 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
9014 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
9015 (POINTER_BOUNDS_P): Likewise.
9016 (BOUNDED_TYPE_P): Likewise.
9017 (BOUNDED_P): Likewise.
9018 (CALL_WITH_BOUNDS_P): Likewise.
9019 (pointer_bounds_type_node): Likewise.
9020 * value-prof.c (gimple_ic): Likewise.
9021 * var-tracking.c (vt_add_function_parameters): Likewise.
9022 * varasm.c (make_decl_rtl): Likewise.
9023 (assemble_start_function): Likewise.
9024 (output_constant): Likewise.
9025 (maybe_assemble_visibility): Likewise.
9026 * varpool.c (ctor_for_folding): Likewise.
9027 * chkp-builtins.def: Remove.
9028 * ipa-chkp.c: Remove.
9029 * ipa-chkp.h: Remove.
9030 * rtl-chkp.c: Remove.
9031 * rtl-chkp.h: Remove.
9032 * tree-chkp-opt.c: Remove.
9033 * tree-chkp.c: Remove.
9034 * tree-chkp.h: Remove.
9036 2018-06-07 Carl Love <cel@us.ibm.com>
9038 * config/rs6000/vsx.md (vextract_fp_from_shorth,
9039 vextract_fp_from_shortl): Add BE support.
9041 2018-06-07 Paul Koning <ni1d@arrl.net>
9043 * compare-elim.c (try_merge_compare): Don't merge compare if
9044 address contains a side effect.
9045 (try_eliminate_compare): Likewise.
9047 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
9049 * config.gcc: Support "tremont".
9050 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
9051 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9053 * config/i386/i386.c (m_TREMONT): Define.
9054 (processor_target_table): Add "tremont".
9055 (PTA_TREMONT): Define.
9056 (ix86_lea_outperforms): Add TARGET_TREMONT.
9057 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
9058 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
9059 and M_INTEL_GOLDMONT_PLUS.
9060 (fold_builtin_cpu): Add "tremont".
9061 (ix86_add_stmt_cost): Add TARGET_TREMONT.
9062 (ix86_option_override_internal): Add "tremont".
9063 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
9064 (processor_type): Add PROCESSOR_TREMONT.
9065 * config/i386/x86-tune.def: Add m_TREMONT.
9066 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
9068 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9070 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
9071 symbol defined for msp430i* devices to be lower case.
9073 2018-06-07 Richard Biener <rguenther@suse.de>
9075 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
9076 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
9077 Properly wrap signed arithmetic if overflow wraps.
9079 2018-06-07 Jakub Jelinek <jakub@redhat.com>
9081 PR tree-optimization/69615
9082 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
9083 of a cast from a same precision integral SSA_NAME in a bb dominated
9084 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
9085 cast to utype if rhs2 has already a compatible type.
9087 2018-06-07 Richard Biener <rguenther@suse.de>
9089 PR tree-optimization/85935
9090 * graphite-scop-detection.c (find_params_in_bb): Analyze
9091 condition operands with respect to the correct loop. Assert
9092 the analysis doesn't fail.
9094 2018-06-04 Carl Love <cel@us.ibm.com>
9096 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
9097 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
9098 as it is slightly cheaper.
9099 (first_match_or_eos_index_<mode>):
9100 Calculate index using natural element order.
9101 (first_match_index_<mode>):
9102 Calculate index using natural element order.
9103 (first_match_or_eos_index_<mode>):
9104 Calculate index using natural order.
9105 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
9106 for BE and LE modes.
9107 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
9108 P9V_BUILTIN_VCLZLSBB_V16QI.
9109 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
9112 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
9114 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
9115 indentation and line wrap for many prototypes. Add missing
9116 @smallexample directives around block of prototypes for vec_xl and
9119 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
9121 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
9122 track if we pass or return IEEE 128-bit floating point.
9123 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
9124 C++ mangling that is compatible with GCC 8.1.
9125 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
9126 (init_cumulative_args): Note if we pass or return IEEE 128-bit
9127 floating point types.
9128 (rs6000_function_arg_advance_1): Likewise.
9129 (rs6000_mangle_type): Optionally generate mangled names that match
9130 what GCC 8.1 generated for IEEE 128-bit floating point types.
9131 (rs6000_globalize_decl_name): If we have an external function that
9132 passes or returns IEEE 128-bit types, generate a weak reference
9133 from the mangled name used in GCC 8.1 to the current mangled
9135 (rs6000_init_builtins): Make __ibm128 use the long double type if
9136 long double is IBM extended double. Make __float128 use the long
9137 double type if long double is IEEE 128-bit.
9140 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
9141 macro for __ibm128 built-in functions.
9142 (PACK_IF): Add __ibm128 pack/unpack functions.
9143 (UNPACK_IF): Likewise.
9144 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
9145 enable long double built-in functions if long double is IEEE
9146 128-bit floating point.
9147 (rs6000_invalid_builtin): Update long double built-in function
9149 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
9150 functions, adjust the built-in function to use the long double
9151 built-in function if __ibm128 and long double are the same type.
9152 * doc/extend.texi (PowerPC builtins): Update documention for
9153 __builtin_{,un}pack_longdouble. Add documentation for
9154 __builtin_{,un}pack_ibm128.
9156 2018-06-06 Jim Wilson <jimw@sifive.com>
9158 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
9159 (struct machine_function): New field interrupt_mode.
9160 (riscv_handle_type_attribute): New function. Add forward declaration.
9161 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
9162 (riscv_expand_epilogue): Check interrupt_mode field.
9163 (riscv_set_current_function): Check interrupt attribute args and
9164 set interrupt_mode field.
9165 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
9166 (riscv_sret, riscv_uret): New.
9167 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
9168 new arguments to interrupt attribute.
9170 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
9173 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
9174 Don't handle -mcpu=power8 if -mpower9-vector is also used.
9176 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
9178 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
9179 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
9180 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
9181 several redundant entries.
9183 2018-06-06 David Malcolm <dmalcolm@redhat.com>
9185 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
9186 type from "rtx" to "rtx_insn *".
9187 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
9188 for local "call_insn", removing cast.
9189 (ix86_expand_call): Likewise, introducing a "call_insn" local.
9191 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
9193 PR tree-optimization/86066
9194 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
9195 for BIT_INSERT_EXPR stores.
9197 2018-06-06 Richard Biener <rguenther@suse.de>
9199 PR tree-optimization/86062
9200 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
9201 component refs ontop
9202 of to be offsetted base.
9204 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9206 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
9207 to be static and remove check on interrupt attribute name.
9209 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
9211 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
9212 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
9214 2018-06-05 Steve Ellcey <sellcey@cavium.com>
9217 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
9219 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
9220 Remove second argument, change how error is called.
9221 (aarch64_layout_arg): Remove second argument from
9222 aarch64_err_no_fpadvsimd call.
9223 (aarch64_init_cumulative_args): Ditto.
9224 (aarch64_gimplify_va_arg_expr): Ditto.
9225 * config/aarch64/aarch64.md (mov<mode>): Ditto.
9227 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
9229 * config/i386/i386.md (simple_return_indirect_internal): New expander.
9230 (*simple_return_indirect_internal<mode>): Rename from
9231 simple_return_indirect_internal. Use W mode iterator.
9232 (rstorssp): New expander.
9233 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
9234 (clrssbsy): New expander.
9235 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
9237 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
9239 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
9241 (cmse_check_pointed_object): Likewise.
9243 2018-06-05 Martin Liska <mliska@suse.cz>
9245 PR gcov-profile/47618
9246 * doc/invoke.texi: Document how -fprofile-dir format
9249 2018-06-05 Richard Biener <rguenther@suse.de>
9251 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
9252 removal pretend DOM info isn't available so we do not update
9253 it and only remove edges, not dominated blocks. Actually free
9254 DOM info in case we removed something. Remove unreachable blocks.
9255 (mfb_keep_latches): Work with either DOM info or marked backedges.
9256 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
9257 first. Mark backedges if DOM info isn't available.
9258 (Re-)compute DOM info after cleanup_control_flow_pre.
9260 2018-06-05 Richard Biener <rguenther@suse.de>
9262 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
9263 (locus_discrim_hasher::hash): Adjust.
9264 (locus_discrim_hasher::equal): Likewise.
9265 (next_discriminator_for_locus): Work on line directly.
9266 (same_line_p): Pass in expanded locus1 as well.
9267 (assign_discriminators): Avoid redundant location expansions.
9269 2018-06-05 Richard Biener <rguenther@suse.de>
9271 PR tree-optimization/86046
9272 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
9273 if required after clearing TREE_ADDRESSABLE.
9275 2018-06-05 Richard Biener <rguenther@suse.de>
9277 PR tree-optimization/86047
9278 * tree-ssa-loop.c (for_each_index): Glob handling of all
9279 decls and constants and really handle all of them.
9281 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9284 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
9285 qualifier_void_pointer and qualifier_const_void_pointer.
9286 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
9287 (arm_init_builtins): Handle the above.
9288 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
9289 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
9290 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
9293 2018-06-05 Martin Liska <mliska@suse.cz>
9295 * auto-profile.c (read_autofdo_file): Do not use
9296 gcov_ctr_summary struct.
9297 (afdo_callsite_hot_enough_for_early_inline): Likewise.
9298 * coverage.c (struct counts_entry): Likewise.
9299 (read_counts_file): Read just single summary entry.
9300 (get_coverage_counts): Use gcov_summary struct.
9301 * coverage.h (get_coverage_counts): Likewise.
9302 * gcov-dump.c (dump_working_sets): Likewise.
9303 (tag_summary): Dump just single summary.
9304 * gcov-io.c (gcov_write_summary): Write just histogram
9306 (gcov_read_summary): Read just single summary.
9307 (compute_working_sets): Use gcov_summary struct.
9308 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
9309 of GCOV_COUNTERS_SUMMABLE.
9310 (GCOV_COUNTERS_SUMMABLE): Remove.
9311 (GCOV_FIRST_VALUE_COUNTER): Replace with
9312 GCOV_COUNTER_V_INTERVAL.
9313 (struct gcov_ctr_summary): Remove.
9314 (struct gcov_summary): Directly use fields of former
9316 (compute_working_sets): Use gcov_summary struct.
9317 * gcov.c (read_count_file): Do not use ctrs fields.
9318 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
9320 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
9322 * profile.c: Likewise.
9323 * profile.h: Likewise.
9325 2018-06-05 Martin Liska <mliska@suse.cz>
9327 PR gcov-profile/84846
9328 * gcov.c (output_lines): Print working directory only
9329 in intermediate format.
9331 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
9333 * config/s390/s390-builtin-types.def: Add void function type.
9334 * config/s390/s390-builtins.def: Use the function type for the
9337 2018-06-04 Jim Wilson <jimw@sifive.com>
9339 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
9341 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
9342 and maybe_eh_return. Change regno to unsigned int. Use new args to
9343 handle EH_RETURN_DATA_REGNO registers properly.
9344 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
9345 (riscv_expand_epilogue): Update comment. Change argument name and
9346 type. Update code to use new name and type. Pass new args to
9347 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
9349 * config/riscv/riscv.md (NORMAL_RETURN): New.
9350 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
9351 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
9352 (eh_return): Call gen_eh_return_internal and emit barrier.
9353 (eh_return_internal): Call riscv_expand_epilogue.
9355 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
9357 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
9358 bit_insertion field and declare can_be_merged_into method.
9359 (merged_store_group::can_be_merged_into): New method.
9360 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
9361 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
9362 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
9364 2018-06-04 Richard Biener <rguenther@suse.de>
9366 PR tree-optimization/85955
9367 * builtins.c (fold_builtin_sincos): Convert pointers to
9368 destination to appropriate type before dereferencing.
9370 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
9372 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
9374 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
9376 * expr.c (expand_expr_real_1): Force the operand into memory if
9377 its TYPE_MODE is BLKmode and if there is no integer mode for
9378 the number of bits being extracted.
9380 2018-06-04 Jakub Jelinek <jakub@redhat.com>
9384 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
9385 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
9387 2018-06-04 Richard Biener <rguenther@suse.de>
9389 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
9390 (cleanup_tree_cfg_noloop): ... single caller. Do
9391 start_recording_case_labels later.
9393 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
9395 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
9396 to _IMMINTRIN_H_INCLUDED.
9397 * config/i386/pconfigintrin.h: Ditto.
9398 * config/i386/waitpkgintrin.h: Ditto.
9399 * config/i386/immintrin.h: Add includes for sgxintrin.h,
9400 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
9401 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
9402 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
9403 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
9404 waitpkgintrin.h and cldemoteintrin.h.
9406 2018-06-04 Richard Biener <rguenther@suse.de>
9408 PR tree-optimization/86038
9409 * tracer.c (find_best_successor): Check probability for
9410 being initialized, bail out if not.
9412 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
9415 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
9416 of bits to ignore when comparing architectures.
9418 2018-06-04 Jakub Jelinek <jakub@redhat.com>
9420 PR tree-optimization/69615
9421 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
9422 maximum or minimum of the type, try to merge it also as if
9423 range1 is + [-, x - 1] or + [x + 1, -].
9426 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
9428 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
9430 PR tree-optimization/86034
9431 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
9432 the unsigned bitfield type in a bit insertion sequence if it does not
9433 have a larger precision than the bitfield size.
9434 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
9436 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
9438 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
9440 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
9442 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
9443 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
9444 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
9445 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
9447 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
9449 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
9450 Disable -fdelete-null-pointer-checks for ELF toolchain.
9452 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
9453 Kito Cheng <kito.cheng@gmail.com>
9455 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
9456 (nds32le-*-*, nds32be-*-*): Integrate checking process.
9457 (nds32*-*-*): Add glibc and uclibc conditions.
9458 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
9459 (TARGET_EXCEPT_UNWIND_INFO): Define.
9460 * config/nds32/elf.h: New file.
9461 * config/nds32/linux.h: New file.
9462 * config/nds32/nds32-elf.opt: New file.
9463 * config/nds32/nds32-linux.opt: New file.
9464 * config/nds32/nds32-fp-as-gp.c
9465 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
9466 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
9468 (nds32_asm_file_end): Ditto.
9469 (nds32_print_operand): Ditto.
9470 (nds32_insert_attributes): Ditto.
9471 (nds32_init_libfuncs): New function.
9472 (TARGET_HAVE_TLS): Define.
9473 (TARGET_INIT_LIBFUNCS): Define.
9474 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
9476 (TARGET_ELF): Apply different mcmodel setting.
9477 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
9478 been migrated into elf.h and linux.h files.
9479 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
9480 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
9481 (mcmodel): The content has been migrated into nds32-elf.opt and
9482 nds32-linux.opt files.
9483 * config/nds32/t-elf: New file.
9484 * config/nds32/t-linux: New file.
9486 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
9487 Shiva Chen <shiva0217@gmail.com>
9489 * config/nds32/constants.md (unspec_volatile_element): Add
9490 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
9491 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
9493 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
9494 (make_pass_nds32_fp_as_gp): Declare.
9495 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
9497 (nds32_asm_function_end_prologue): Remove unused asm output.
9498 (nds32_asm_function_begin_epilogue): Remove unused asm output.
9499 (nds32_asm_file_start): Output necessary fp_as_gp information.
9500 (nds32_option_override): Adjust register usage.
9501 (nds32_expand_prologue): Consider fp_as_gp situation.
9502 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
9503 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
9506 (simple_return): Ditto.
9507 (omit_fp_begin): Output special directive for fp_as_gp.
9508 (omit_fp_end): Output special directive for fp_as_gp.
9509 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
9510 mforbid-fp-as-gp): New options.
9512 2018-06-01 Mark Wielaard <mark@klomp.org>
9514 * dwarf2out.c (dwarf2out_finish): Remove generation of
9515 DW_AT_loclists_base.
9517 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
9519 * gimple-ssa-store-merging.c: Include gimple-fold.h.
9520 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
9521 (struct merged_store_group): Add bit_insertion field.
9522 (dump_char_array): Use standard hexadecimal format.
9523 (merged_store_group::merged_store_group): Set bit_insertion to false.
9524 (merged_store_group::apply_stores): Use optimal buffer size. Deal
9525 with BIT_INSERT_EXPR stores. Move up code updating the mask and
9526 also print the mask in the dump file.
9527 (pass_store_merging::gate): Minor tweak.
9528 (imm_store_chain_info::coalesce_immediate): Fix wrong association
9529 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
9530 stores with INTEGER_CST stores.
9531 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
9532 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
9533 and use it throughout. Generate bit insertion sequences if need be.
9534 (pass_store_merging::process_store): Remove redundant condition.
9535 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
9537 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
9539 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
9540 the 128-bit floating point types. Fix function comment.
9542 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9544 * config/aarch64/aarch64-simd.md
9545 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
9547 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
9550 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
9552 PR tree-optimization/85989
9553 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
9555 (backprop::intersect_uses): Check it when deciding whether this
9556 is a backedge reference.
9557 (backprop::process_block): Add each phi to m_visited_phis
9558 after visiting it, then clear it at the end.
9560 2018-06-01 Richard Biener <rguenther@suse.de>
9562 * tree-vectorizer.h (vect_dr_stmt): New function.
9563 (vect_get_load_cost): Adjust.
9564 (vect_get_store_cost): Likewise.
9565 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
9566 Use vect_dr_stmt instead of DR_SMTT.
9567 (vect_record_base_alignments): Likewise.
9568 (vect_calculate_target_alignment): Likewise.
9569 (vect_compute_data_ref_alignment): Likewise and make static.
9570 (vect_update_misalignment_for_peel): Likewise.
9571 (vect_verify_datarefs_alignment): Likewise.
9572 (vector_alignment_reachable_p): Likewise.
9573 (vect_get_data_access_cost): Likewise. Pass down
9574 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
9575 (vect_get_peeling_costs_all_drs): Likewise.
9576 (vect_peeling_hash_get_lowest_cost): Likewise.
9577 (vect_enhance_data_refs_alignment): Likewise.
9578 (vect_find_same_alignment_drs): Likewise.
9579 (vect_analyze_data_refs_alignment): Likewise.
9580 (vect_analyze_group_access_1): Likewise.
9581 (vect_analyze_group_access): Likewise.
9582 (vect_analyze_data_ref_access): Likewise.
9583 (vect_analyze_data_ref_accesses): Likewise.
9584 (vect_vfa_segment_size): Likewise.
9585 (vect_small_gap_p): Likewise.
9586 (vectorizable_with_step_bound_p): Likewise.
9587 (vect_prune_runtime_alias_test_list): Likewise.
9588 (vect_analyze_data_refs): Likewise.
9589 (vect_supportable_dr_alignment): Likewise.
9590 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
9591 (vect_gen_prolog_loop_niters): Likewise.
9592 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
9593 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
9595 (vect_recog_mask_conversion_pattern): Likewise.
9596 (vect_try_gather_scatter_pattern): Likewise.
9597 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
9598 to vect_get_store_cost.
9599 (vect_get_store_cost): Get stmt_info instead of DR.
9600 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
9601 (vect_get_load_cost): Get stmt_info instead of DR.
9603 2018-06-01 Richard Biener <rguenther@suse.de>
9606 * gimple-fold.c (var_decl_component_p): Also allow offsetted
9607 vars wrapped in MEM_REFs.
9609 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
9611 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
9612 Fix subreg tests so that we only return a choice between
9613 GENERAL_REGS and FP_REGS if the original classes included both.
9615 2018-06-01 Richard Biener <rguenther@suse.de>
9618 * tree-ssa-structalias.c (get_function_part_constraint):
9619 Handle NULL fi->decl.
9620 (find_func_aliases_for_call): Properly handle indirect
9621 fi from direct call.
9622 (find_func_clobbers): Likewise.
9623 (ipa_pta_execute): Likewise.
9624 (create_variable_info_for): For functions that are ifunc_resolver
9625 resolve to a varinfo that contains the result of the resolver call.
9626 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
9629 2018-05-31 Michael Collison <michael.collison@arm.com>
9631 * config/aarch64/aarch64.md:
9632 (*fix_to_zero_extenddfdi2): New pattern.
9633 * gcc.target/aarch64/fix_extend1.c: New testcase.
9635 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
9639 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
9640 and BUILT_IN_STRNCMP_EQ.
9641 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
9642 BUILT_IN_STRNCMP_EQ.
9643 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
9644 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
9645 (gimple_fold_builtin): Likewise.
9646 * tree-ssa-strlen.c (compute_string_length): New function.
9647 (determine_min_obsize): New function.
9648 (handle_builtin_string_cmp): New function to handle calls to
9649 string compare functions.
9650 (strlen_optimize_stmt): Add handling to builtin string compare
9652 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
9653 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
9654 * tree.c (build_common_builtin_nodes): Add new defines of
9655 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
9657 2018-05-31 Jakub Jelinek <jakub@redhat.com>
9660 * bb-reorder.c (pass_partition_blocks::gate): Return false for
9661 functions with naked attribute.
9663 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
9665 * config/i386/sse.md (avx_vec_concat<mode>):
9666 Substitute concat_tg_mode mode attribute with xtg_mode.
9667 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
9668 (concat_tg_mode): Remove mode attribute.
9670 2018-05-31 Martin Sebor <msebor@redhat.com>
9673 * calls.c (alloc_max_size): Correct a logic error/typo.
9674 Treat excessive arguments as infinite. Warn for invalid arguments.
9675 * doc/invoke.texi (-Walloc-size-larger-than): Update.
9677 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
9680 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
9681 and movx for Haswell.
9683 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
9684 Cesar Philippidis <cesar@codesourcery.com>
9687 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
9688 when emitting error on private/firstprivate reductions.
9689 * omp-low.c (lower_omp_target): Avoid reference-type processing
9690 on pointers for firstprivate clause.
9692 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
9694 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
9697 * config/aarch64/aarch64-simd.md
9698 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
9699 (aarch64_ld1_x3_<mode>): Likewise
9700 (aarch64_st1x2<VALLDIF:mode>): Likewise
9701 (aarch64_st1_x2_<mode>): Likewise
9702 (aarch64_st1x3<VALLDIF:mode>): Likewise
9703 (aarch64_st1_x3_<mode>): Likewise
9704 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
9705 (vld1_s8_x3): Likewise.
9706 (vld1_u16_x3): Likewise.
9707 (vld1_s16_x3): Likewise.
9708 (vld1_u32_x3): Likewise.
9709 (vld1_s32_x3): Likewise.
9710 (vld1_u64_x3): Likewise.
9711 (vld1_s64_x3): Likewise.
9712 (vld1_f16_x3): Likewise.
9713 (vld1_f32_x3): Likewise.
9714 (vld1_f64_x3): Likewise.
9715 (vld1_p8_x3): Likewise.
9716 (vld1_p16_x3): Likewise.
9717 (vld1_p64_x3): Likewise.
9718 (vld1q_u8_x3): Likewise.
9719 (vld1q_s8_x3): Likewise.
9720 (vld1q_u16_x3): Likewise.
9721 (vld1q_s16_x3): Likewise.
9722 (vld1q_u32_x3): Likewise.
9723 (vld1q_s32_x3): Likewise.
9724 (vld1q_u64_x3): Likewise.
9725 (vld1q_s64_x3): Likewise.
9726 (vld1q_f16_x3): Likewise.
9727 (vld1q_f32_x3): Likewise.
9728 (vld1q_f64_x3): Likewise.
9729 (vld1q_p8_x3): Likewise.
9730 (vld1q_p16_x3): Likewise.
9731 (vld1q_p64_x3): Likewise.
9732 (vst1_s64_x2): Likewise.
9733 (vst1_u64_x2): Likewise.
9734 (vst1_f64_x2): Likewise.
9735 (vst1_s8_x2): Likewise.
9736 (vst1_p8_x2): Likewise.
9737 (vst1_s16_x2): Likewise.
9738 (vst1_p16_x2): Likewise.
9739 (vst1_s32_x2): Likewise.
9740 (vst1_u8_x2): Likewise.
9741 (vst1_u16_x2): Likewise.
9742 (vst1_u32_x2): Likewise.
9743 (vst1_f16_x2): Likewise.
9744 (vst1_f32_x2): Likewise.
9745 (vst1_p64_x2): Likewise.
9746 (vst1q_s8_x2): Likewise.
9747 (vst1q_p8_x2): Likewise.
9748 (vst1q_s16_x2): Likewise.
9749 (vst1q_p16_x2): Likewise.
9750 (vst1q_s32_x2): Likewise.
9751 (vst1q_s64_x2): Likewise.
9752 (vst1q_u8_x2): Likewise.
9753 (vst1q_u16_x2): Likewise.
9754 (vst1q_u32_x2): Likewise.
9755 (vst1q_u64_x2): Likewise.
9756 (vst1q_f16_x2): Likewise.
9757 (vst1q_f32_x2): Likewise.
9758 (vst1q_f64_x2): Likewise.
9759 (vst1q_p64_x2): Likewise.
9760 (vst1_s64_x3): Likewise.
9761 (vst1_u64_x3): Likewise.
9762 (vst1_f64_x3): Likewise.
9763 (vst1_s8_x3): Likewise.
9764 (vst1_p8_x3): Likewise.
9765 (vst1_s16_x3): Likewise.
9766 (vst1_p16_x3): Likewise.
9767 (vst1_s32_x3): Likewise.
9768 (vst1_u8_x3): Likewise.
9769 (vst1_u16_x3): Likewise.
9770 (vst1_u32_x3): Likewise.
9771 (vst1_f16_x3): Likewise.
9772 (vst1_f32_x3): Likewise.
9773 (vst1_p64_x3): Likewise.
9774 (vst1q_s8_x3): Likewise.
9775 (vst1q_p8_x3): Likewise.
9776 (vst1q_s16_x3): Likewise.
9777 (vst1q_p16_x3): Likewise.
9778 (vst1q_s32_x3): Likewise.
9779 (vst1q_s64_x3): Likewise.
9780 (vst1q_u8_x3): Likewise.
9781 (vst1q_u16_x3): Likewise.
9782 (vst1q_u32_x3): Likewise.
9783 (vst1q_u64_x3): Likewise.
9784 (vst1q_f16_x3): Likewise.
9785 (vst1q_f32_x3): Likewise.
9786 (vst1q_f64_x3): Likewise.
9787 (vst1q_p64_x3): Likewise.
9789 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9791 * config/msp430/msp430.c (msp430_output_labelref): Prepend
9792 user_label_prefix to name.
9794 * tree-core.h: Update comment about the format of NAME string
9795 passed to handler in attribute_spec.
9797 * config/msp430/msp430.md: Remove erroneous subreg expression from
9798 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
9799 zero_extend{q,h}isi2.
9801 2018-05-30 Borislav Petkov <bp@suse.de>
9803 * doc/extend.texi: Document some architecture specific
9804 constraints and sort entries.
9806 2018-05-30 Martin Sebor <msebor@redhat.com>
9809 * builtins.c (expand_builtin_stpcpy_1): New function.
9810 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
9811 only if the former succeeds.
9813 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
9815 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
9818 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9820 * doc/invoke.texi (-flinker-output): Document
9822 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9824 * passes.c (ipa_write_summaries): Only modify statements if body
9826 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
9827 incrementally linking.
9828 (ipa_passes): Likewise.
9829 * lto-cgraph.c (lto_output_node): When incrementally linking do not
9830 pass down resolution info.
9831 * common.opt (flag_incremental_link): Update info.
9832 * gcc.c (plugin specs): Turn flinker-output=* to
9833 -plugin-opt=-linker-output-known
9834 * toplev.c (compile_file): Also cut compilation when doing incremental
9836 * flag-types. (enum lto_partition_model): Add
9837 LTO_LINKER_OUTPUT_NOLTOREL.
9838 (invoke.texi): Add -flinker-output docs.
9839 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
9840 link same way as WPA; do not stream in dead initializers.
9842 * dwarf2out.c (dwarf2out_die_ref_for_decl,
9843 darf2out_register_external_decl): Support incremental link.
9845 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9847 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
9849 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9851 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
9852 it down to simple_object_copy_lto_debug_sections.
9853 (run_gcc): Determine incremental LTO link time and configure
9854 lto1 into non-wpa mode, disable renaming of debug sections.
9856 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
9858 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
9859 descriptions of various incorrectly documented functions.
9861 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
9864 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9865 address check not strict.
9867 2018-05-30 Richard Biener <rguenther@suse.de>
9869 PR tree-optimization/85964
9870 * tracer.c (better_p): Drop initialized count check, we only
9871 call the function with initialized counts now.
9872 (find_best_successor): Do find a best edge if one
9873 has uninitialized count.
9874 (find_best_predecessor): Likewise. Do BB frequency check only
9875 if count is initialized.
9877 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
9879 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
9880 (aarch64_ldrstr_offset_compare): New.
9881 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
9882 load/store orderings.
9883 (aarch64_gen_adjusted_ldpstp): Likewise.
9885 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
9887 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
9888 Check for subset of GENERAL_REGS and FP_REGS.
9889 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
9892 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
9894 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
9895 and wi::to_poly_offset. Add the current offset and then check
9896 whether the sum fits, rather than using an unchecked addition of
9897 a checked term. Check for a shwi rather than a uhwi.
9898 * expr.c (get_bit_range): Use tree_to_poly_uint64.
9899 (store_constructor): Use poly_int_tree_p.
9900 (expand_expr_real_1): Likewise.
9901 * function.c (assign_temp): Likewise.
9902 * fold-const.c (const_binop): Use poly_int_tree_p and
9904 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
9906 * ipa-icf-gimple.c (func_checker::compare_operand): Use
9907 to_poly_offset for MEM offsets.
9908 * ipa-icf.c (sem_variable::equals): Likewise.
9909 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
9910 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
9911 wi::to_poly_offset for BIT_FIELD_REF offsets.
9912 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
9914 * var-tracking.c (emit_note_insn_var_location): Use
9915 tree_to_poly_uint64.
9917 2018-05-29 Jim Wilson <jimw@sifive.com>
9919 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
9921 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
9924 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
9925 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
9927 (sse4_1_round<mode>2): Use nonimmediate_operand
9928 for operand 1 predicate.
9930 2018-05-29 Martin Sebor <msebor@redhat.com>
9931 Richard Biener <rguenther@suse.de>
9934 * calls.c (get_size_range): Call determine_value_range instead
9935 of get_value_range..
9936 * tree-vrp.h (determine_value_range): Declared new function.
9937 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
9939 2018-05-29 Richard Biener <rguenther@suse.de>
9941 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
9942 sure to use non-pattern stmts for get_earlier_stmt arguments.
9943 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
9944 called on pattern stmts.
9945 (get_later_stmt): Likewise.
9947 2018-05-29 Martin Liska <mliska@suse.cz>
9949 PR gcov-profile/85759
9950 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
9953 2018-05-29 Jakub Jelinek <jakub@redhat.com>
9955 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
9957 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
9961 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
9962 VEC_PACK_FLOAT_EXPR): New tree codes.
9963 * tree-pretty-print.c (op_code_prio): Handle
9964 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
9965 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
9966 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
9967 * tree-inline.c (estimate_operator_cost): Likewise.
9968 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
9969 * fold-const.c (const_binop): Likewise.
9970 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
9971 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
9972 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
9973 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
9974 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
9975 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
9976 * expr.c (expand_expr_real_2): Likewise.
9977 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
9978 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
9979 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
9981 * optabs.c (expand_widen_pattern_expr): For
9982 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
9983 sign from result type rather than operand's type.
9984 (expand_binop_directly): For vec_packu_float_optab and
9985 vec_packs_float_optab allow result type to be different from operand's
9987 * optabs-tree.c (optab_for_tree_code): Handle
9988 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
9989 VEC_PACK_FLOAT_EXPR. Formatting fixes.
9990 * tree-vect-generic.c (expand_vector_operations_1): Handle
9991 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
9992 VEC_PACK_FLOAT_EXPR.
9993 * tree-vect-stmts.c (supportable_widening_operation): Handle
9995 (supportable_narrowing_operation): Handle FLOAT_EXPR.
9996 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
9997 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
9998 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
9999 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
10001 (vec_pack<floatprefix>_float_<mode>): New expander.
10002 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
10004 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
10005 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
10006 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
10007 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
10008 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
10010 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
10011 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
10012 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10013 VEC_PACK_FLOAT_EXPR): Document.
10015 2018-05-29 Richard Biener <rguenther@suse.de>
10017 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
10019 (stmt_vec_info_vec): Make pointer.
10020 (init_stmt_vec_info_vec): Remove.
10021 (free_stmt_vec_info_vec): Likewise.
10022 (set_stmt_vec_info_vec): New function.
10023 (free_stmt_vec_infos): Likewise.
10024 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
10025 (set_vinfo_for_stmt): Likewise.
10026 (get_earlier_stmt): Likewise.
10027 (get_later_stmt): Likewise.
10028 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
10029 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
10030 (vec_info::~vec_info): Free stmt_vec_infos.
10031 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
10032 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
10033 (pass_slp_vectorize::execute): Likewise.
10034 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
10035 (free_stmt_vec_info_vec): Likewise.
10036 (set_stmt_vec_info_vec): New function.
10037 (free_stmt_vec_infos): Likewise.
10038 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
10039 the global stmt_vec_info_vec.
10040 * tree-parloops.c (gather_scalar_reductions): Use
10041 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
10044 2018-05-29 Richard Biener <rguenther@suse.de>
10046 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
10048 2018-05-29 Martin Liska <mliska@suse.cz>
10049 David Malcolm <dmalcolm@redhat.com>
10051 * vec.c (test_reverse): New.
10052 (vec_c_tests): Add new test.
10053 * vec.h (vl_ptr>::reverse): New function.
10055 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
10057 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
10059 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
10062 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
10064 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
10066 2018-05-28 Richard Biener <rguenther@suse.de>
10068 PR tree-optimization/85933
10069 * tree-vect-data-refs.c (vect_record_base_alignments): Only
10070 look at stmts marked as vectorizable.
10072 2018-05-28 Richard Biener <rguenther@suse.de>
10074 PR tree-optimization/85934
10075 * tree-vect-generic.c (expand_vector_operations_1): Hoist
10076 vector boolean check before scalar optimization.
10078 2018-05-28 Jakub Jelinek <jakub@redhat.com>
10080 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
10083 2018-05-28 Mark Wielaard <mark@klomp.org>
10085 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
10086 if it is an expression containing a minus sign.
10088 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
10090 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
10092 2018-05-27 Paul Koning <ni1d@arrl.net>
10094 * config/pdp11/pdp11.md (truncsihi2): Remove.
10096 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
10097 Chung-Ju Wu <jasonwucj@gmail.com>
10099 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
10101 (unaligned_store_dw): Ditto.
10102 * config/nds32/nds32-memory-manipulation.c
10103 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
10104 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
10105 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
10106 (emit_setmem_word_loop): Rename to ...
10107 (emit_setmem_doubleword_loop): ... this.
10108 (nds32_gen_dup_4_byte_to_word_value): New function.
10109 (nds32_gen_dup_8_byte_to_double_word_value): New function.
10110 (nds32_expand_setmem_loop): Refine implementation.
10111 (nds32_expand_setmem_loop_v3m): Ditto.
10112 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
10115 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
10117 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
10119 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
10121 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
10122 (nds32_init_machine_status): Initialize machine->attr_naked_p and
10123 machine->attr_no_prologue_p.
10124 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
10125 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
10126 (nds32_expand_epilogue): Consider attr_naked_p.
10127 (nds32_expand_epilogue_v3pop): Likewise.
10128 (nds32_can_use_return_insn): Likewise.
10129 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
10130 attr_no_prologue_p fields.
10131 * config/nds32/nds32.opt (mret-in-naked-func): New option.
10133 2018-05-27 Jakub Jelinek <jakub@redhat.com>
10136 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
10138 * config/i386/sse.md
10139 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
10141 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
10143 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
10145 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
10147 (*<floatsuffix>floatv2div2sf2): Rename to ...
10148 (*float<floatunssuffix>v2div2sf2): ... this.
10149 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
10150 (float<floatunssuffix>v2div2sf2_mask): ... this.
10151 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
10152 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
10153 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
10155 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
10157 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
10159 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
10161 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
10163 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
10165 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
10166 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
10167 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
10168 gen_ufix_truncv8dfv8si2.
10169 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
10170 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
10171 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
10172 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
10173 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
10174 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
10175 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
10176 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
10178 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
10182 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
10184 2018-05-25 Jim Wilson <jimw@sifive.com>
10186 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
10187 * config/riscv/riscv.c (struct machine_function): Add
10188 interrupt_handler_p and attribute_checked_p fields.
10189 (riscv_attribute_table): Add interrupt.
10190 (riscv_interrupt_type_p): New.
10191 (riscv_save_reg_p): Save extra regs for interrupt handler.
10192 (riscv_use_save_libcall): Return false for interrupt handler.
10193 (riscv_first_stack_step): Add forward declaration.
10194 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
10195 for interrupt handler with large frame. Use it for saved reg list.
10196 (riscv_expand_prologue): Move flag_stack_usage_info support to
10197 eliminate duplication.
10198 (riscv_expand_epilogue): Generate mret for interrupt handler.
10199 (riscv_epilogue_uses): New.
10200 (riscv_can_use_return_insn): Return false for interrupt handler.
10201 (riscv_function_ok_for_sibcall): Likewise.
10202 (riscv_set_current_function): Add interrupt handler support.
10203 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
10204 * config/riscv/riscv.md (UNSPECV_MRET): New.
10206 (riscv_frflags, riscv_fsflags): Use tab after opcode.
10208 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
10210 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
10212 PR tree-optimization/85712
10213 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
10214 this candidate has already been replaced in-situ by a copy.
10216 2018-05-25 Jason Merrill <jason@redhat.com>
10218 PR c++/80485 - inline function non-zero address.
10219 * symtab.c (nonzero_address): Check DECL_COMDAT.
10221 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
10224 * config/alpha/alpha.md (ashlsi3): New insn pattern.
10225 (*ashlsi_se): Rename from *ashldi_se. Define as sign
10226 extension of SImode operation. Use const123_operand predicate.
10227 (*saddsi_1): Remove.
10228 (*saddl_se_1): Ditto.
10229 (*ssubsi_1): Ditto.
10230 (*ssubl_se_1): Ditto.
10231 * config/alpha/predicates.md (const123_operand): New predicate.
10232 * config/alpha/constraints.md (P): Use IN_RANGE.
10234 2018-05-25 Richard Biener <rguenther@suse.de>
10236 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
10238 (ref_maybe_used_by_stmt_p): Likewise.
10239 (stmt_may_clobber_ref_p): Likewise.
10240 (stmt_may_clobber_ref_p_1): Likewise.
10241 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
10243 (ref_maybe_used_by_stmt_p): Likewise.
10244 (stmt_may_clobber_ref_p): Likewise.
10245 (stmt_may_clobber_ref_p_1): Likewise.
10246 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
10247 the alias oracle to disambiguate DRs with stmts DR analysis
10249 (vect_analyze_data_refs): Do not give up on not analyzable
10250 DRs for BB vectorization. Remove code truncating the dataref
10253 2018-05-25 Jakub Jelinek <jakub@redhat.com>
10256 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10257 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
10258 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
10260 2018-05-25 Richard Biener <rguenther@suse.de>
10262 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
10263 function, combining stmt data ref gathering and fatal analysis
10265 (vect_analyze_data_refs): Remove now redudnant code and simplify.
10266 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
10267 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
10268 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
10269 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
10271 2018-05-25 Bin Cheng <bin.cheng@arm.com>
10273 PR tree-optimization/85720
10274 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
10275 SCC if all partitions are builtins.
10276 (version_loop_by_alias_check): New parameter. Generate cancelable
10277 runtime alias check if all partitions are builtins.
10278 (distribute_loop): Update call to above function.
10280 2018-05-25 Bin Cheng <bin.cheng@arm.com>
10282 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
10283 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
10284 (parm_default_def_partition_arg): Ditto.
10285 (set_parm_default_def_partition): Ditto.
10286 (get_parm_default_def_partitions): Ditto and make it static.
10287 (get_undefined_value_partitions): Ditto and make it static.
10288 (remove_ssa_form): Refactor call to init_var_map here.
10289 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
10290 computation for loop region.
10291 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
10292 (register_default_def): Delete.
10293 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
10294 (parm_default_def_partition_arg): Ditto.
10295 (set_parm_default_def_partition): Ditto.
10296 (get_parm_default_def_partitions): Ditto and make it static.
10297 (get_undefined_value_partitions): Ditto and make it static.
10298 (coalesce_with_default, coalesce_with_default): Update comment.
10299 (create_coalesce_list_for_region): New func factored out from
10300 create_outofssa_var_map.
10301 (populate_coalesce_list_for_outofssa): New func factored out from
10302 create_outofssa_var_map and coalesce_ssa_name.
10303 (create_outofssa_var_map): Delete.
10304 (coalesce_ssa_name): Refactor to support live range computation.
10305 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
10306 (get_parm_default_def_partitions): Delete.
10307 (get_undefined_value_partitions): Ditto.
10308 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
10309 computation for loop region.
10310 (new_tree_live_info, loe_visit_block): Ditto.
10311 (live_worklist, set_var_live_on_entry): Ditto.
10312 (calculate_live_on_exit, verify_live_on_entry): Ditto.
10313 * tree-ssa-live.h (struct _var_map): New fields.
10314 (init_var_map): Change decl.
10315 (region_contains_p): New.
10317 2018-05-25 Bin Cheng <bin.cheng@arm.com>
10319 * tree-ssa-live.h (live_merge_and_clear): Delete.
10321 2018-05-25 Richard Biener <rguenther@suse.de>
10324 * tree-dump.c (dequeue_and_dump): Remove access to removed
10325 operand 2 of a SWITCH_EXPR.
10327 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10329 * doc/sourcebuild.texi (vect_double_cond_arith): Include
10330 multiplication and division.
10331 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
10332 (cond_udiv@var{m}, cond_umod@var{m}): Document.
10333 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
10334 (cond_udiv_optab, cond_umod_optab): New optabs.
10335 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
10336 (IFN_COND_RDIV): New internal functions.
10337 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
10338 TRUNC_MOD_EXPR and RDIV_EXPR.
10339 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
10340 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
10342 (SVE_INT_BINARY): Include mult.
10343 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
10344 (optab, sve_int_op): Handle mult.
10345 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
10347 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
10348 for SVE_INT_BINARY_SD.
10350 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10352 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
10353 (optab, sve_int_op): Handle div and udiv.
10354 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
10355 for SVE_INT_BINARY_SD.
10356 (*<optab><mode>3): New insn for the same.
10358 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10360 * tree-vect-patterns.c: Include predict.h.
10361 (vect_recog_divmod_pattern): Restrict check for division support
10362 to when optimizing for size.
10364 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10366 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
10367 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
10368 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
10369 (gimple_match_op::set_op): Likewise.
10370 (gimple_resimplify4): Declare.
10371 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
10372 (expr::gen_transform): Likewise.
10373 (decision_tree::gen): Generate a simplification routine for 4 operands.
10374 * gimple-match-head.c (gimple_simplify): Add an overload for
10375 4 operands. In the top-level function, handle up to 4 call
10376 arguments and call gimple_resimplify4.
10377 (gimple_resimplify4): New function.
10378 (build_call_internal): Pass a fourth operand.
10379 (maybe_push_to_seq): Likewise.
10380 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
10381 Fold VEC_COND_EXPRs of an operation and a default value into
10382 an IFN_COND_* function if possible.
10383 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
10385 (SVE_COND_FP_BINARY): Include them.
10386 (optab, sve_fp_op): Handle them.
10387 (SVE_INT_BINARY_REV): New code iterator.
10388 (SVE_COND_FP_BINARY_REV): New int iterator.
10389 (commutative): New int attribute.
10390 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
10392 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
10394 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
10395 (*cond_<optab><mode>): New patterns for reversed operands.
10397 2018-05-25 Richard Biener <rguenther@suse.de>
10399 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
10400 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
10401 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
10402 (STMT_VINFO_GROUPED_ACCESS): Adjust.
10403 * tree-vect-data-refs.c (everywhere): Adjust users.
10404 * tree-vect-loop.c (everywhere): Likewise.
10405 * tree-vect-slp.c (everywhere): Likewise.
10406 * tree-vect-stmts.c (everywhere): Likewise.
10407 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
10409 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10411 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
10413 (gcc_cv_as_section_exclude): ... this.
10414 Try Solaris as #exclude syntax.
10415 * configure: Regenerate.
10416 * config.in: Regenerate.
10417 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
10419 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
10420 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
10422 * varasm.c (default_elf_asm_named_section): Don't check if
10423 HAVE_GAS_SECTION_EXCLUDE is defined.
10425 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10427 * doc/md.texi: Update the documentation of the cond_* optabs
10428 to mention the new final operand. Fix GET_MODE_NUNITS call.
10429 Describe the scalar case too.
10430 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
10431 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
10433 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
10434 (get_conditional_internal_fn): Update comment.
10435 * tree-vect-loop.c (vectorizable_reduction): Pass the original
10436 accumulator value as a final argument to conditional functions.
10437 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
10438 a define_expand and add an "else" operand. Assert for now that
10439 the else operand is equal to operand 2. Use SVE_INT_BINARY and
10440 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
10441 (*cond_<optab><mode>): New patterns.
10442 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
10443 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
10444 (UNSPEC_COND_EOR): Delete.
10445 (optab): Remove associated mappings.
10446 (SVE_INT_BINARY): New code iterator.
10447 (sve_int_op): Remove int attribute and add "minus" to the code
10449 (SVE_COND_INT_OP): Delete.
10450 (SVE_COND_FP_OP): Rename to...
10451 (SVE_COND_FP_BINARY): ...this.
10453 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10455 * optabs.c (can_reuse_operands_p): New function.
10456 (maybe_legitimize_operands): Try to reuse the results for
10459 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
10461 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
10462 Add {q} suffix to insn mnemonic.
10464 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10466 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
10467 (msp430_warn_func_return): New.
10469 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
10471 * fold-const.c (tree_nonzero_bits): New function.
10472 * fold-const.h (tree_nonzero_bits): Likewise.
10473 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
10474 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
10476 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
10480 * varasm.c (assemble_alias): Check ifunc_resolver only on
10483 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
10486 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
10487 when memory input operand is handled.
10489 2018-05-24 Luis Machado <luis.machado@linaro.org>
10491 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
10493 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
10495 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
10497 * match.pd: Delay FMA folds until after vectorization.
10499 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
10502 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10503 address check not strict.
10505 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
10507 * gimple-match.h (gimple_match_op): New class.
10508 (mprts_hook): Replace parameters with a gimple_match_op *.
10509 (maybe_build_generic_op): Likewise.
10510 (gimple_simplified_result_is_gimple_val): Replace parameters with
10511 a const gimple_match_op *.
10512 (gimple_simplify): Replace code_helper * and tree * parameters with
10513 a gimple_match_op * parameter.
10514 (gimple_resimplify1): Replace code_helper *, tree and tree *
10515 parameters with a gimple_match_op * parameter.
10516 (gimple_resimplify2): Likewise.
10517 (gimple_resimplify3): Likewise.
10518 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
10519 parameters with a gimple_match_op * parameter.
10520 * gimple-match-head.c (gimple_simplify): Change prototypes of
10521 auto-generated functions to take a gimple_match_op * instead of
10522 separate code_helper * and tree * parameters. Make the same
10523 change in the top-level overload and update calls to the
10524 gimple_resimplify routines. Update calls to the auto-generated
10525 functions and to maybe_push_res_to_seq in the publicly-facing
10526 operation-specific gimple_simplify overloads.
10527 (gimple_match_op::MAX_NUM_OPS): Define.
10528 (gimple_resimplify1): Replace rcode and ops with a single res_op
10529 parameter. Update call to gimple_simplify.
10530 (gimple_resimplify2): Likewise.
10531 (gimple_resimplify3): Likewise.
10532 (mprts_hook): Replace parameters with a gimple_match_op *.
10533 (maybe_build_generic_op): Likewise.
10534 (build_call_internal): Replace type, nargs and ops with
10535 a gimple_match_op *.
10536 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
10537 with a single gimple_match_op *. Update calls to mprts_hook,
10538 build_call_internal and gimple_simplified_result_is_gimple_val.
10539 Factor out code that is common to the tree_code and combined_fn cases.
10540 * genmatch.c (expr::gen_transform): Replace tem_code and
10541 tem_ops with a gimple_match_op called tem_op. Update calls
10542 to the gimple_resimplify functions and maybe_push_res_to_seq.
10543 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
10544 res_ops. Update call to the gimple_resimplify functions.
10545 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
10546 (decision_tree::gen): Make the functions take a gimple_match_op *
10547 called res_op instead of separate res_code and res_ops parameters.
10548 Update call accordingly.
10549 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
10550 and ops with a single res_op parameter. Update calls to
10551 maybe_build_generic_op and maybe_push_res_to_seq.
10552 (fold_stmt_1): Update calls to gimple_simplify and
10553 replace_stmt_with_simplification.
10554 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
10555 and gimple_simplified_result_is_gimple_val.
10556 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
10558 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
10559 with a gimple_match_op *.
10560 (vn_nary_build_or_lookup): Likewise. Update call to
10561 vn_nary_build_or_lookup_1.
10562 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
10563 gimple_match_op *. Update calls to the gimple_resimplify routines
10564 and to gimple_simplified_result_is_gimple_val.
10565 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
10566 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
10567 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
10568 (visit_nary_op): Likewise.
10569 (visit_reference_op_load): Likewise.
10571 2018-05-23 Luis Machado <luis.machado@linaro.org>
10573 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
10574 modifier for printing the step amount.
10576 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
10579 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
10582 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
10584 * doc/sourcebuild.texi (Endianness): New subsubsection.
10586 2018-05-23 Luis Machado <luis.machado@linaro.org>
10588 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10589 <prefetch_dynamic_strides>: New const bool field.
10590 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10591 prefetch_dynamic_strides.
10592 (exynosm1_prefetch_tune): Likewise.
10593 (thunderxt88_prefetch_tune): Likewise.
10594 (thunderx_prefetch_tune): Likewise.
10595 (thunderx2t99_prefetch_tune): Likewise.
10596 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
10598 (aarch64_override_options_internal): Update to set
10599 PARAM_PREFETCH_DYNAMIC_STRIDES.
10600 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10601 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10602 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10603 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10604 prefetch-dynamic-strides setting.
10606 2018-05-23 Luis Machado <luis.machado@linaro.org>
10608 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10609 <minimum_stride>: New const int field.
10610 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10611 minimum_stride field defaulting to -1.
10612 (exynosm1_prefetch_tune): Likewise.
10613 (thunderxt88_prefetch_tune): Likewise.
10614 (thunderx_prefetch_tune): Likewise.
10615 (thunderx2t99_prefetch_tune): Likewise.
10616 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
10617 <default_opt_level>: Set to 3.
10618 (aarch64_override_options_internal): Update to set
10619 PARAM_PREFETCH_MINIMUM_STRIDE.
10620 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10621 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10622 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10623 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10624 stride is constant and is below the minimum stride threshold.
10626 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10628 * config/arm/arm-cpus.in (mode26): Delete.
10629 (armv4): Delete mode26 reference.
10630 * config/arm/arm.c (arm_configure_build_target): Delete use of
10633 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
10635 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
10637 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
10638 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
10640 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
10641 (floatunsdidf2): Ditto.
10643 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
10645 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
10646 (fixuns_trunc<mode>si2_avx512f): Ditto.
10647 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
10648 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
10649 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
10651 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
10653 PR rtl-optimization/79985
10654 * df-scan.c (df_insn_refs_collect): Remove special case for
10655 global registers and asm statements.
10657 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
10659 * extend.texi (Global Register Variables): Rewrite the bullet list.
10660 Note that the register is available for allocation. Note that access
10661 via inline asm must use constraints. Add note about async-signal
10662 handlers. Remove paragraph about automagic register selection.
10664 2018-05-23 Richard Biener <rguenther@suse.de>
10666 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
10667 of fixed offset from memset VN.
10669 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
10671 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
10672 first_interp field.
10673 (alloc_cand_and_find_basis): Initialize first_interp field.
10674 (slsr_process_mul): Modify first_interp field.
10675 (slsr_process_add): Likewise.
10676 (slsr_process_cast): Modify first_interp field for each new
10678 (slsr_process_copy): Likewise.
10679 (dump_candidate): Dump first_interp field.
10680 (replace_mult_candidate): Process all interpretations, not just
10682 (replace_rhs_if_not_dup): Likewise.
10683 (replace_one_candidate): Likewise.
10685 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
10687 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
10689 (aarch64_needs_frame_chain): New function.
10690 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
10692 2018-05-23 Sudakshina Das <sudi.das@arm.com>
10695 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
10696 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
10697 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
10698 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
10699 as true for strict-align.
10700 (aarch64_can_inline_p): Perform checks even when callee has no
10701 attributes to check for strict alignment.
10702 * doc/extend.texi (AArch64 Function Attributes): Document
10704 * doc/invoke.texi: (AArch64 Options): Likewise.
10706 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
10708 PR tree-optimization/85853
10709 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
10710 the handling of the root of the node to...
10711 (vect_slp_analyze_node_operations_1): ...this new function,
10712 and run the whole thing with the child nodes' def types
10713 set according to their SLP node's def type.
10715 2018-05-23 Richard Biener <rguenther@suse.de>
10717 PR middle-end/85874
10718 * tree-data-ref.c (create_runtime_alias_checks): Defer
10719 and ignore overflow warnings.
10721 2018-05-23 Yury Gribov <tetra2005@gmail.com>
10723 PR tree-optimization/85822
10724 * tree-vrp.c (is_masked_range_test): Fix handling of negative
10727 2018-05-23 Richard Biener <rguenther@suse.de>
10729 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
10730 memset constants via native_interpret_expr.
10732 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
10735 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
10737 (cgraph_node::create_alias): Likewise.
10738 (cgraph_node::get_availability): Check ifunc_resolver instead
10739 of looking up ifunc attribute.
10740 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
10741 * varasm.c (do_assemble_alias): Likewise.
10742 (assemble_alias): Likewise.
10743 (default_binds_local_p_3): Likewise.
10744 * cgraph.h (cgraph_node): Add ifunc_resolver.
10745 (cgraph_node::only_called_directly_or_aliased_p): Return false
10746 for IFUNC resolver.
10747 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
10749 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
10750 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
10751 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
10752 instead of looking up ifunc attribute.
10754 2018-05-22 Luis Machado <luis.machado@linaro.org>
10756 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
10758 2018-05-22 Martin Sebor <msebor@redhat.com>
10760 PR middle-end/85359
10761 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
10762 only when expasion succeeds.
10763 (expand_builtin_strcmp): Same.
10764 (expand_builtin_strncmp): Same.
10766 2018-05-22 Martin Sebor <msebor@redhat.com>
10768 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
10770 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
10771 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10773 * config/aarch64/aarch64-ldpstp.md: Replace uses of
10774 aarch64_mem_pair_operand with memory_operand and delete operand swapping
10776 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
10777 Add check for legitimate_address.
10778 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
10779 (aarch64_swap_ldrstr_operands): New.
10780 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
10783 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
10784 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10786 * config/aarch64/aarch64.md: New patterns to generate stp
10788 (store_pair_sw, store_pair_dw): New patterns to generate stp for
10789 single words and double words.
10790 (load_pair_sw, load_pair_dw): Likewise.
10791 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
10793 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
10795 * config/aarch64/aarch64-ldpstp.md: Modify peephole
10796 for different mode ldpstp and add peephole for merged zero stores.
10797 Likewise for loads.
10798 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
10800 (aarch64_gen_store_pair): Rename calls to match new patterns.
10801 (aarch64_gen_load_pair): Rename calls to match new patterns.
10802 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
10803 (load_pair<DREG:mode><DREG2:mode>): ... This.
10804 (store_pair<mode>): Rename to...
10805 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
10806 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
10807 New mode iterators.
10808 (V_INT_EQUIV): Handle SImode.
10809 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
10812 2018-05-22 Martin Sebor <msebor@redhat.com>
10815 * calls.c (maybe_warn_nonstring_arg): Use string length to set
10816 or ajust the presumed bound on an operation to avoid unnecessary
10819 2018-05-22 Martin Sebor <msebor@redhat.com>
10821 PR tree-optimization/85826
10822 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
10823 assuming that a DECL necesarily has a constant size.
10825 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
10827 PR middle-end/85862
10828 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
10830 2018-05-22 Richard Biener <rguenther@suse.de>
10832 PR tree-optimization/85834
10833 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
10834 non-constant and non-zero memset arguments.
10836 2018-05-22 Martin Liska <mliska@suse.cz>
10839 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
10841 2018-05-22 Richard Biener <rguenther@suse.de>
10843 PR tree-optimization/85863
10844 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
10845 comparisons when vectype is specified.
10846 (vectorizable_condition): Do not specify vectype for
10847 vect_is_simple_cond when SLP vectorizing.
10849 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
10852 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
10853 define __ibm128 as long double.
10854 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
10855 as a distinct type when IEEE 128-bit support is enabled.
10856 (init_float128_ieee): Fix up conversions between IFmode and IEEE
10857 128-bit types to use the correct functions.
10858 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
10859 convert between 128-bit floating point types that have different
10860 modes but the same representation, instead of using gen_lowpart to
10862 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
10864 (IFKF_reg): New attributes to give the register constraints for
10866 (extend<mode>tf2_internal): New insns to mark an explicit
10867 conversion between 128-bit floating point types that have a
10868 different mode but share the same representation.
10870 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
10872 PR tree-optimization/85814
10873 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
10874 a null return from get_strinfo when unsharing the next
10875 strinfo in the chain.
10877 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
10880 * varasm.c (weak_finish): Clean up weak_decls.
10882 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10884 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
10885 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
10886 UNSPEC_UADALP values.
10887 * config/aarch64/iterators.md (ABAL): New int iterator.
10890 (sur): Add mappings for the above.
10891 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
10893 (aarch64_<sur>abal<mode>_4): Likewise.
10894 (aarch64_<sur>adalp<mode>_3): Likewise.
10895 (<sur>sadv16qi): New define_expand.
10897 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
10899 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
10900 (*movdf_internal): Ditto.
10901 (*rcpsf2_sse): Ditto.
10902 (*rsqrtsf2_sse): Ditto.
10903 (*sqrt<mode>2_sse): Ditto.
10905 2018-05-21 Tamar Christina <tamar.christina@arm.com>
10907 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
10909 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
10910 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
10911 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
10912 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
10914 * config/aarch64/arm_neon.h: Likewise.
10915 * config/aarch64/iterators.md (VQ_I): New.
10917 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
10919 * config.gcc: Add arc/t-multilib-linux to tmake_file for
10921 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
10924 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
10926 * config/nds32/constraints.md (S): New constraint.
10927 * config/nds32/nds32.md (call_internal): Use constraint S.
10928 (call_value_internal): Likewise.
10929 (sibcall_internal): Likewise.
10930 (sibcall_value_internal): Likewise.
10932 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
10933 Chung-Ju Wu <jasonwucj@gmail.com>
10935 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
10936 into consideration.
10938 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
10939 Chung-Ju Wu <jasonwucj@gmail.com>
10941 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
10942 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
10943 (nds32_rtx_costs_impl): Simplify.
10944 (nds32_address_cost_impl): Simplify.
10945 (nds32_init_rtx_costs): New function.
10946 (nds32_rtx_costs_speed_prefer): Likewise.
10947 (nds32_rtx_costs_size_prefer): Likewise.
10948 (nds32_address_cost_speed_prefer): Likewise.
10949 (nds32_address_cost_speed_fwprop): Likewise.
10950 (nds32_address_cost_size_prefer): Likewise.
10951 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
10952 * config/nds32/nds32.c (nds32_option_override): Use
10953 nds32_init_rtx_costs function.
10955 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
10957 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
10958 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
10959 (TARGET_PIPELINE_N8): Likewise.
10960 (TARGET_PIPELINE_N10): Likewise.
10961 (TARGET_PIPELINE_N13): Likewise.
10962 (TARGET_PIPELINE_GRAYWOLF): Likewise.
10964 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
10966 * config/nds32/nds32-fpu.md: Update copyright year.
10968 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10970 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
10972 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10974 * config/nds32/nds32.c
10975 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
10976 * config/nds32/nds32.opt (minline-asm-r15): New option.
10978 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10980 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
10982 * config/nds32/nds32.md (abssi2): New pattern.
10984 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
10986 * config/i386/i386.md (rex64namesuffix): New mode attribute.
10987 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
10988 Merge insn pattern from sse_cvtsi2ss<round_name> and
10989 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
10990 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
10991 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
10992 using SWI48 mode iterator.
10993 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
10994 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
10995 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
10996 pattern from sse_cvttss2si<round_saeonly_name>
10997 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
10998 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
10999 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
11000 using SWI48 mode iterator.
11001 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
11002 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
11003 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
11004 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
11005 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
11006 using SWI48 mode iterator.
11007 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
11008 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
11009 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
11010 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
11011 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
11012 SWI48 mode iterator.
11013 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
11014 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
11015 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
11016 pattern from sse_cvttsd2si<round_saeonly_name>
11017 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
11019 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11021 * config/nds32/nds32-md-auxiliary.c
11022 (nds32_valid_smw_lwm_base_p): Refine.
11023 (nds32_output_smw_single_word): Refine.
11024 (nds32_output_smw_double_word): New.
11025 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
11027 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11029 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
11030 (nds32_output_stack_pop): Refine.
11031 (nds32_expand_unaligned_load): Refine.
11032 (nds32_expand_unaligned_store): Refine.
11034 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11035 Chung-Ju Wu <jasonwucj@gmail.com>
11037 * config/nds32/constants.md: Add TP_REGNUM constant.
11038 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
11039 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
11041 * config/nds32/nds32-doubleword.md: Consider flag_pic.
11042 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
11043 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
11044 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
11045 and PIC code generation.
11046 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
11048 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
11050 * config/nds32/nds32.md: Support TLS and PIC.
11051 * config/nds32/nds32.c: Support TLS and PIC.
11052 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
11053 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
11056 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11058 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
11059 mode with E_ prefix.
11061 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11062 Chung-Ju Wu <jasonwucj@gmail.com>
11064 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
11065 * config/nds32/nds32-md-auxiliary.c
11066 (symbolic_reference_mentioned_p): New.
11067 (nds32_legitimize_ict_address): New.
11068 (nds32_expand_ict_move): New.
11069 (nds32_indirect_call_referenced_p): New.
11070 (nds32_symbol_binds_local_p): Delete.
11071 (nds32_long_call_p): Modify.
11072 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
11073 * config/nds32/nds32-protos.h
11074 (symbolic_reference_mentioned_p): Declare.
11075 (nds32_legitimize_ict_address): Declare.
11076 (nds32_expand_ict_move): Declare.
11077 (nds32_indirect_call_referenced_p): Declare.
11078 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
11079 (nds32_relax_group): Use nds32_ict_const_p as condition.
11080 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
11081 (nds32_asm_file_start): Output ict_model directive in asm code.
11082 (nds32_legitimate_address_p): Consider indirect call.
11083 (nds32_print_operand): Consider indirect call.
11084 (nds32_print_operand_address): Consider indirect call.
11085 (nds32_insert_attributes): Handle "indirect_call" attribute.
11086 (TARGET_LEGITIMATE_ADDRESS_P): Define.
11087 (TARGET_LEGITIMATE_CONSTANT_P): Define.
11088 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
11089 (TARGET_DELEGITIMIZE_ADDRESS): Define.
11090 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
11091 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
11092 (TARGET_ICT_MODEL_SMALL): Define.
11093 (TARGET_ICT_MODEL_LARGE): Define.
11094 * config/nds32/nds32.md (movsi): Consider ict model.
11095 (call, call_value): Consider ict model.
11096 (sibcall, sibcall_value): Consider ict model.
11097 * config/nds32/nds32.opt (mict-model): New option.
11098 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
11101 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
11102 Monk Chiang <sh.chiang04@gmail.com>
11103 Jim Wilson <jimw@sifive.com>
11105 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
11106 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
11107 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
11108 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
11109 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
11110 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
11111 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
11112 compute save_libcall_adjustment properly.
11113 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
11114 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
11115 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
11116 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
11117 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
11118 (ABI_SPEC): Handle mabi=ilp32e.
11119 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
11120 (RVE): Add RVE mask.
11121 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
11122 <-march>: Add rv32e as an example.
11124 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
11127 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
11128 (intra_create_variable_infos): Handle C++ constructors.
11130 2018-05-18 Martin Liska <mliska@suse.cz>
11132 * passes.def: Remove a redundant pass.
11134 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
11137 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
11139 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11141 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
11143 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
11145 (armv2, armv2a, armv3, armv3m): Delete architectures.
11146 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
11147 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
11148 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
11150 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
11151 (*mulsidi3adddi): Likewise.
11152 (mulsidi3): Likewise.
11153 (*mulsidi3_nov6): Likewise.
11154 (umulsidi3): Likewise.
11155 (umulsidi3_nov6): Likewise.
11156 (umaddsidi4): Likewise.
11157 (*umulsidi3adddi): Likewise.
11158 (smulsi3_highpart): Likewise.
11159 (*smulsi3_highpart_nov6): Likewise.
11160 (umulsi3_highpart): Likewise.
11161 (*umulsi3_highpart_nov6): Likewise.
11162 * config/arm/arm.h (arm_arch3m): Delete.
11163 * config/arm/arm.c (arm_arch3m): Delete.
11164 (arm_option_override_internal): Update armv3-related comment.
11165 (arm_configure_build_target): Delete use of isa_bit_mode32.
11166 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
11167 (arm_rtx_costs_internal): Delete check of arm_arch3m.
11168 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
11169 (mulsa3): Likewise.
11170 (mulusa3): Likewise.
11171 * config/arm/arm-protos.h (arm_arch3m): Delete.
11172 * config/arm/arm-tables.opt: Regenerate.
11173 * config/arm/arm-tune.md: Likewise.
11174 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
11175 deleted architectures.
11177 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11179 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
11180 (armv5t, armv5te): New features.
11181 (ARMv5, ARMv5e): Delete fgroups.
11182 (ARMv5t, ARMv5te): Adjust for above changes.
11183 (ARMv6m): Likewise.
11184 (armv5, armv5e): Delete arches.
11185 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
11187 (*call_reg_arm): Likewise.
11188 (*call_value_reg_armv5): Likewise.
11189 (*call_value_reg_arm): Likewise.
11190 (*call_symbol): Likewise.
11191 (*call_value_symbol): Likewise.
11192 (*sibcall_insn): Likewise.
11193 (*sibcall_value_insn): Likewise.
11194 (clzsi2): Likewise.
11195 (prefetch): Likewise.
11196 (define_split and define_peephole2 dependent on arm_arch5):
11198 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
11200 (TARGET_ARM_QBIT): Likewise.
11201 (TARGET_DSP_MULTIPLY): Likewise.
11202 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
11203 (arm_arch5, arm_arch5e): Delete.
11204 (arm_arch5t, arm_arch5te): Declare.
11205 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
11206 (arm_arch5t): Declare.
11207 (arm_option_reconfigure_globals): Update for the above.
11208 (arm_options_perform_arch_sanity_checks): Update comment, replace
11209 use of arm_arch5 with arm_arch5t.
11210 (use_return_insn): Likewise.
11211 (arm_emit_call_insn): Likewise.
11212 (output_return_instruction): Likewise.
11213 (arm_final_prescan_insn): Likewise.
11214 (arm_coproc_builtin_available): Likewise.
11215 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
11216 arm_arch5e with arm_arch5t and arm_arch5te.
11217 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
11218 (arm_arch5t, arm_arch5te): Declare.
11219 * config/arm/arm-tables.opt: Regenerate.
11220 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
11221 * config/arm/t-multilib: Likewise.
11222 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
11223 instead of arm_arch5.
11224 (*call_reg_thumb1): Likewise.
11225 (*call_value_reg_thumb1_v5): Likewise.
11226 (*call_value_reg_thumb1): Likewise.
11227 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
11229 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
11231 2018-05-18 Martin Liska <mliska@suse.cz>
11233 PR gcov-profile/84846
11234 * doc/gcov.texi: Document -t option of gcov tool.
11236 2018-05-18 Martin Liska <mliska@suse.cz>
11238 PR gcov-profile/84846
11239 * gcov.c (print_usage): Add new -t option.
11240 (process_args): Handle the option.
11241 (generate_results): Use stdout as output when requested by
11244 2018-05-18 Martin Liska <mliska@suse.cz>
11246 PR gcov-profile/84846
11247 * coverage.c (coverage_init): Write PWD to .gcno file.
11248 * doc/gcov.texi: Document how working directory is printed.
11249 * gcov-dump.c (dump_gcov_file): Print PWD.
11250 * gcov.c (output_intermediate_file): Likewise.
11251 (read_graph_file): Read PWD string.
11252 (output_lines): Print PWD.
11254 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11256 PR middle-end/85817
11257 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
11258 for retval and return false if all args to phi are zero.
11260 2018-05-18 Richard Biener <rguenther@suse.de>
11262 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
11264 (evrp_dom_walker::before_dom_children): Call it.
11266 2018-05-18 Richard Biener <rguenther@suse.de>
11268 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
11269 results when processing array refs with variable index.
11271 2018-05-18 Toon Moene <toon@moene.org>
11273 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
11274 directly after that of -floop-interchange. Indicate that both
11275 options are enabled by default when specifying -O3.
11277 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11279 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
11280 iterator. Delete separate integer-mode vec_set<mode> expander.
11281 (aarch64_simd_vec_setv2di): Delete.
11282 (vec_setv2di): Delete.
11283 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
11284 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
11285 the "w, r" alternative.
11287 2018-05-18 Martin Liska <mliska@suse.cz>
11289 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
11290 * tree-pass.h (make_pass_lower_switch_O0): New function.
11291 * tree-switch-conversion.c (node_has_low_bound): Remove.
11292 (node_has_high_bound): Likewise.
11293 (node_is_bounded): Likewise.
11294 (class pass_lower_switch): Make it a template type and create
11296 (pass_lower_switch::execute): Add template argument.
11297 (make_pass_lower_switch): New function.
11298 (make_pass_lower_switch_O0): New function.
11299 (do_jump_if_equal): Remove.
11300 (emit_case_nodes): Simplify to just handle all 3 cases and leave
11301 all the hard work to tree optimization passes.
11303 2018-05-18 Martin Liska <mliska@suse.cz>
11305 * dbgcnt.c (limit_low): Renamed from limit.
11306 (limit_high): New variable.
11307 (dbg_cnt_is_enabled): Check for upper limit.
11308 (dbg_cnt): Adjust dumping.
11309 (dbg_cnt_set_limit_by_index): Add new argument for high
11311 (dbg_cnt_set_limit_by_name): Likewise.
11312 (dbg_cnt_process_single_pair): Parse new format.
11313 (dbg_cnt_process_opt): Use strtok.
11314 (dbg_cnt_list_all_counters): Remove 'value' and add
11316 * doc/invoke.texi: Document changes.
11318 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
11320 * doc/sourcebuild.texi (scalar_all_fma): Document.
11321 * tree.def (FMA_EXPR): Delete.
11322 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
11323 * internal-fn.c (ternary_direct): New macro.
11324 (expand_ternary_optab_fn): Likewise.
11325 (direct_ternary_optab_supported_p): Likewise.
11326 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
11327 * builtins.c (fold_builtin_fma): Delete.
11328 (fold_builtin_3): Don't call it.
11329 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
11330 * expr.c (expand_expr_real_2): Likewise.
11331 * fold-const.c (operand_equal_p): Likewise.
11332 (fold_ternary_loc): Likewise.
11333 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
11334 * gimple.c (DEFTREECODE): Likewise.
11335 * gimplify.c (gimplify_expr): Likewise.
11336 * optabs-tree.c (optab_for_tree_code): Likewise.
11337 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
11338 * tree-eh.c (operation_could_trap_p): Likewise.
11339 (stmt_could_throw_1_p): Likewise.
11340 * tree-inline.c (estimate_operator_cost): Likewise.
11341 * tree-pretty-print.c (dump_generic_node): Likewise.
11342 (op_code_prio): Likewise.
11343 * tree-ssa-loop-im.c (stmt_cost): Likewise.
11344 * tree-ssa-operands.c (get_expr_operands): Likewise.
11345 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
11346 * fold-const-call.h (fold_fma): Delete.
11347 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
11348 CFN_FNMA and CFN_FNMS.
11349 (fold_fma): Delete.
11350 * genmatch.c (combined_fn): New enum.
11351 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
11352 (commutative_op): New function.
11353 (commutate): Use it. Handle more than 2 operands.
11354 (dt_operand::gen_gimple_expr): Use commutative_op.
11355 (parser::parse_expr): Allow :c to be used with non-binary
11356 operators if the commutative operand is known.
11357 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
11358 CFN_FMS, CFN_FNMA and CFN_FNMS.
11359 (backprop::process_assign_use): Remove FMA_EXPR handling.
11360 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
11361 (gen_hsa_fma): New function.
11362 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
11363 IFN_FNMA and IFN_FNMS.
11364 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
11365 * gimple-fold.h (follow_all_ssa_edges): Declare.
11366 * gimple-fold.c (follow_all_ssa_edges): New function.
11367 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
11368 gimple_build interface and use follow_all_ssa_edges to fold the result.
11369 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
11370 instead of checking for optabs directly.
11371 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
11372 rather than FMA_EXPRs.
11373 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
11374 call to IFN_FMA instead of an FMA_EXPR.
11376 2018-05-17 Jim Wilson <jimw@sifive.com>
11378 * expr.c (do_tablejump): When converting index to Pmode, if we have a
11379 sign extended promoted subreg, and the range does not have the sign bit
11380 set, then do a sign extend.
11382 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
11383 test, check for sign extended subreg and/or constant operands, and
11384 do a sign extend in that case.
11386 2018-05-17 Steve Ellcey <sellcey@cavium.com>
11388 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
11389 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
11391 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
11392 Change logics_shift_reg to logics_shift_imm.
11393 (thunderx2t99_fp_loadpair_basic): Delete.
11394 (thunderx2t99_fp_storepair_basic): Delete.
11395 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
11396 (thunderx2t99_asimd_polynomial): Delete.
11397 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
11398 and neon_fp_mul_d_scalar_q.
11399 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
11400 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
11401 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
11402 (thunderx2t99_asimd_lut): Add missing tbl types.
11403 (thunderx2t99_asimd_ext): Delete.
11404 (thunderx2t99_asimd_load1_1_mult): Delete.
11405 (thunderx2t99_asimd_load1_2_mult): Delete.
11406 (thunderx2t99_asimd_load1_ldp): New.
11407 (thunderx2t99_asimd_load1): New.
11408 (thunderx2t99_asimd_load2): Add missing *load2* types.
11409 (thunderx2t99_asimd_load3): New.
11410 (thunderx2t99_asimd_load4): New.
11411 (thunderx2t99_asimd_store1_1_mult): Delete.
11412 (thunderx2t99_asimd_store1_2_mult): Delete.
11413 (thunderx2t99_asimd_store2_mult): Delete.
11414 (thunderx2t99_asimd_store2_onelane): Delete.
11415 (thunderx2t99_asimd_store_stp): New.
11416 (thunderx2t99_asimd_store1): New.
11417 (thunderx2t99_asimd_store2): New.
11418 (thunderx2t99_asimd_store3): New.
11419 (thunderx2t99_asimd_store4): New.
11421 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
11423 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
11424 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
11426 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
11427 Segher Boessenkool <segher@kernel.crashing.org>
11430 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
11433 2018-05-17 Richard Biener <rguenther@suse.de>
11435 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
11436 for pruning loop and prune defs feeding only already visited PHIs.
11438 2018-05-17 Richard Biener <rguenther@suse.de>
11440 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
11442 2018-05-17 Bin Cheng <bin.cheng@arm.com>
11443 Richard Biener <rguenther@suse.de>
11445 PR tree-optimization/85793
11446 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
11447 for VMAT_ELEMENTWISE.
11449 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
11451 * internal-fn.h (lookup_internal_fn): Declare
11452 * internal-fn.c (lookup_internal_fn): New function.
11453 * gimple.c (gimple_build_call_from_tree): Handle calls to
11454 internal functions.
11455 * gimple-pretty-print.c (dump_gimple_call): Print "." before
11456 internal function names.
11457 * tree-pretty-print.c (dump_generic_node): Likewise.
11458 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
11460 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
11462 * gimple-fold.h (gimple_build): Make the function forms take
11463 combined_fn rather than built_in_function.
11464 (gimple_simplify): Likewise.
11465 * gimple-match-head.c (gimple_simplify): Likewise.
11466 * gimple-fold.c (gimple_build): Likewise.
11467 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
11468 rather than gimple_build_call_internal.
11469 (get_initial_defs_for_reduction): Likewise.
11470 (vect_create_epilog_for_reduction): Likewise.
11471 (vectorizable_live_operation): Likewise.
11473 2018-05-17 Martin Liska <mliska@suse.cz>
11475 * gimple-ssa-sprintf.c (format_directive): Do not use
11476 space in between 'G_' and '('.
11478 2018-05-17 Jakub Jelinek <jakub@redhat.com>
11481 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
11482 even if the mask is not all ones.
11485 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
11487 (ix86_gimple_fold_builtin): Likewise.
11490 * config/i386/i386.c: Include tree-vector-builder.h.
11491 (ix86_vector_shift_count): New function.
11492 (ix86_fold_builtin): Fold shift builtins by scalar count.
11493 (ix86_gimple_fold_builtin): Likewise.
11495 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
11496 _mm512_setzero): New intrinsics.
11498 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
11499 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11501 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
11502 code generation for cases where splatting a value is not useful.
11503 * simplify-rtx.c (simplify_ternary_operation): Simplify
11504 vec_merge across a vec_duplicate and a paradoxical subreg forming
11505 a vector mode to a vec_concat.
11507 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
11509 * config.gcc: Support "goldmont-plus".
11510 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
11512 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11513 PROCESSOR_GOLDMONT_PLUS.
11514 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
11515 (processor_target_table): Add "goldmont-plus".
11516 (PTA_GOLDMONT_PLUS): Define.
11517 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
11518 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
11519 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
11520 (fold_builtin_cpu): Add "goldmont-plus".
11521 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
11522 (ix86_option_override_internal): Add "goldmont-plus".
11523 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
11524 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
11525 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
11526 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
11528 2018-05-17 Richard Biener <rguenther@suse.de>
11530 PR tree-optimization/85757
11531 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
11532 remove defs that only feed that PHI from further processing.
11534 2018-05-16 Jim Wilson <jimw@sifive.com>
11536 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
11538 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
11540 2018-05-16 Mark Wielaard <mark@klomp.org>
11542 * dwarf2out.c (count_index_strings): New function.
11543 (output_indirect_strings): Call count_index_strings and generate
11544 header for dwarf_version >= 5.
11546 2018-05-16 Mark Wielaard <mark@klomp.org>
11548 * dwarf2out.c (dwarf_FORM): New function.
11549 (set_indirect_string): Use dwarf_FORM.
11550 (reset_indirect_string): Likewise.
11551 (size_of_die): Likewise.
11552 (value_format): Likewise.
11553 (output_die): Likewise.
11554 (add_skeleton_AT_string): Likewise.
11555 (output_macinfo_op): Likewise.
11556 (index_string): Likewise.
11557 (output_index_string_offset): Likewise.
11558 (output_index_string): Likewise.
11559 (count_index_strings): Likewise.
11561 2018-05-16 Carl Love <cel@us.ibm.com>
11563 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
11564 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
11566 2018-05-16 Martin Jambor <mjambor@suse.cz>
11568 * ipa-prop.c (ipa_free_all_edge_args): Remove.
11569 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
11571 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
11573 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
11574 (fnma<mode>4): Likewise.
11575 (fms<mode>4): Likewise.
11576 (fnms<mode>4): Likewise.
11577 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
11578 (aarch64_fnma<mode>4): Likewise.
11579 (aarch64_fms<mode>4): Likewise.
11580 (aarch64_fnms<mode>4): Likewise.
11581 (aarch64_fnmadd<mode>4): Likewise.
11583 2018-05-16 Jason Merrill <jason@redhat.com>
11585 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
11587 2018-05-16 Richard Biener <rguenther@suse.de>
11589 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
11590 (dump_stmt_cost): Declare.
11591 (add_stmt_cost): Dump cost we add.
11592 (add_stmt_costs): New function.
11593 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
11594 No longer exported.
11595 (vect_analyze_stmt): Adjust prototype.
11596 (vectorizable_condition): Likewise.
11597 (vectorizable_live_operation): Likewise.
11598 (vectorizable_reduction): Likewise.
11599 (vectorizable_induction): Likewise.
11600 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
11601 cost vector to pass to vectorizable_ and record afterwards.
11602 (vect_model_reduction_cost): Take cost vector argument and adjust.
11603 (vect_model_induction_cost): Likewise.
11604 (vectorizable_reduction): Likewise.
11605 (vectorizable_induction): Likewise.
11606 (vectorizable_live_operation): Likewise.
11607 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
11608 SLP_TREE_NUMBER_OF_VEC_STMTS.
11609 (vect_analyze_slp_cost_1): Remove.
11610 (vect_analyze_slp_cost): Likewise.
11611 (vect_slp_analyze_node_operations): Take visited args and
11612 a target cost vector. Avoid processing already visited stmt sets.
11613 (vect_slp_analyze_operations): Use a local cost vector to gather
11614 costs and register those of non-discarded instances.
11615 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
11616 (vect_schedule_slp_instance): Remove copying of
11617 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
11619 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
11620 adding cost. Record cost entry location.
11621 (vect_prologue_cost_for_slp_op): Function to compute cost of
11622 a constant or invariant generated for SLP vect in the prologue,
11623 split out from vect_analyze_slp_cost_1.
11624 (vect_model_simple_cost): Make static. Adjust for SLP costing.
11625 (vect_model_promotion_demotion_cost): Likewise.
11626 (vect_model_store_cost): Likewise, make static.
11627 (vect_model_load_cost): Likewise.
11628 (vectorizable_bswap): Add cost vector arg and adjust.
11629 (vectorizable_call): Likewise.
11630 (vectorizable_simd_clone_call): Likewise.
11631 (vectorizable_conversion): Likewise.
11632 (vectorizable_assignment): Likewise.
11633 (vectorizable_shift): Likewise.
11634 (vectorizable_operation): Likewise.
11635 (vectorizable_store): Likewise.
11636 (vectorizable_load): Likewise.
11637 (vectorizable_condition): Likewise.
11638 (vectorizable_comparison): Likewise.
11639 (can_vectorize_live_stmts): Likewise.
11640 (vect_analyze_stmt): Likewise.
11641 (vect_transform_stmt): Adjust calls to vectorizable_*.
11642 * tree-vectorizer.c: Include gimple-pretty-print.h.
11643 (dump_stmt_cost): New function.
11645 2018-05-16 Richard Biener <rguenther@suse.de>
11647 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
11648 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
11649 * tree-ssa-dse.c: Include tree-ssa-loop.h.
11650 (check_name): New callback.
11651 (dse_classify_store): Track cycles via a visited bitmap of PHI
11652 defs and simplify handling of in-loop and across loop dead stores
11653 and properly fail for loop-variant refs. Handle byte-tracking with
11654 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
11657 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
11659 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
11660 (vect_get_mask_type_for_stmt): Likewise.
11661 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
11663 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
11664 to determine the statement's vector type and the vector type that
11665 should be used for calculating nunits. Deal with cases in which
11666 the type has to be deferred.
11667 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
11668 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
11669 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
11670 (vect_determine_vf_for_stmt): New functions, split out from...
11671 (vect_determine_vectorization_factor): ...here.
11672 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
11673 (vect_get_mask_type_for_stmt): New functions, split out from
11674 vect_determine_vectorization_factor.
11676 2018-05-16 Richard Biener <rguenther@suse.de>
11678 * tree-cfg.c (verify_gimple_assign_ternary): Properly
11679 verify the [VEC_]COND_EXPR embedded comparison.
11681 2018-05-15 Martin Sebor <msebor@redhat.com>
11683 PR tree-optimization/85753
11684 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
11685 RECORD_TYPE in addition to ARRAY_TYPE.
11687 2018-05-15 Martin Sebor <msebor@redhat.com>
11689 PR middle-end/85643
11690 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
11692 2018-05-15 Richard Biener <rguenther@suse.de>
11694 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
11695 add by_clobber_p one. Change algorithm to collect all defs
11696 representing uses we need to walk and try reducing them to
11697 a single one before failing.
11698 (dse_dom_walker::dse_optimize_stmt): Adjust.
11700 2018-05-13 Mark Wielaard <mark@klomp.org>
11702 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
11703 (size_of_loc_descr): Likewise.
11704 (output_loc_operands): Likewise.
11705 (output_loc_operands_raw): Likewise.
11706 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
11707 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
11708 (hash_loc_operands): Likewise.
11709 (compare_loc_operands): Likewise.
11711 2018-05-14 Mark Wielaard <mark@klomp.org>
11713 * dwarf2out.c (count_index_addrs): New function.
11714 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
11716 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11718 PR tree-optimization/83648
11719 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
11720 return value as malloc candidate.
11722 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11725 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
11726 param as true in call to suggest_attribute.
11728 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
11730 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
11731 -mreadonly-in-sdata.
11733 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11735 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
11737 (aarch64_crypto_aesd_fused): Likewise.
11739 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
11741 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
11742 (movsi_aarch64): Likewise.
11743 (load_pairsi): Likewise.
11744 (load_pairdi): Likewise.
11745 (store_pairsi): Likewise.
11746 (store_pairdi): Likewise.
11747 (load_pairsf): Likewise.
11748 (load_pairdf): Likewise.
11749 (store_pairsf): Likewise.
11750 (store_pairdf): Likewise.
11751 (zero_extend): Likewise.
11752 (trunc): Swap alternatives.
11753 (fcvt_target): Add '?' to prefer w over r.
11755 2018-05-14 Jakub Jelinek <jakub@redhat.com>
11758 * config/i386/i386.md: Disallow non-commutative arithmetics in
11759 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
11760 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
11761 in the peephole2 before it.
11763 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
11765 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
11766 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
11767 (ix86_handle_option): Handle -mcldemote.
11768 * config.gcc: New header.
11769 * config/i386/cldemoteintrin.h: New file.
11770 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
11771 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
11773 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11774 OPTION_MASK_ISA_CLDEMOTE.
11775 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
11776 (ix86_valid_target_attribute_inner_p): Ditto.
11777 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
11778 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
11779 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
11780 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
11781 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
11783 * config/i386/i386.opt: Add -mcldemote.
11784 * config/i386/x86intrin.h: New header.
11785 * doc/invoke.texi: Add -mcldemote.
11787 2018-05-14 Richard Biener <rguenther@suse.de>
11789 * doc/match-and-simplify.texi: Adjust :s documentation.
11791 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
11793 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
11794 intended memcpy size.
11795 (REORDER_45): Likewise.
11797 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
11799 * sort.cc: New file.
11800 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
11801 * vec.c (qsort_chk): Use gcc_qsort.
11802 * Makefile.in (OBJS-libcommon): Add sort.o.
11803 (build/sort.o): New target. Use it...
11804 (BUILD_RTL): ... here, and...
11805 (build/gencfn-macros): ... here, and...
11806 (build/genmatch): ... here.
11808 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
11809 Chung-Ju Wu <jasonwucj@gmail.com>
11811 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
11812 * config/nds32/nds32-graywolf.md: New file.
11813 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
11814 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
11816 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
11817 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
11818 * config/nds32/nds32.md (pipeline_model): Add graywolf.
11819 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
11820 * config/nds32/pipelines.md: Include n15 settings.
11822 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
11823 Chung-Ju Wu <jasonwucj@gmail.com>
11825 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
11826 * config/nds32/nds32-n13.md: New file.
11827 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
11828 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
11830 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
11831 * config/nds32/nds32.md (pipeline_model): Add n13.
11832 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
11833 * config/nds32/pipelines.md: Include n13 settings.
11835 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
11836 Chung-Ju Wu <jasonwucj@gmail.com>
11838 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
11839 * config/nds32/nds32-n10.md: New file.
11840 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
11841 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
11843 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
11844 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
11845 * config/nds32/nds32.md (pipeline_model): Add n10.
11846 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
11847 * config/nds32/pipelines.md: Include n10 settings.
11849 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
11850 Kito Cheng <kito.cheng@gmail.com>
11851 Chung-Ju Wu <jasonwucj@gmail.com>
11853 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
11854 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11855 Add enum values for DSP extension instructions.
11856 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
11858 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
11859 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
11860 New code iterators.
11861 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
11862 * config/nds32/nds32-dspext.md: New file for DSP implementation.
11863 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
11864 * config/nds32/nds32-intrinsic.md: Likewise.
11865 * config/nds32/nds32_intrinsic.h: Likewise.
11866 * config/nds32/nds32-md-auxiliary.c: Likewise.
11867 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
11868 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
11869 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
11870 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
11871 * config/nds32/nds32-protos.h: New declarations for DSP extension.
11872 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
11873 TYPE_DMAC in switch statement.
11874 * config/nds32/nds32.c: New checking and implementation for DSP
11875 extension instructions.
11876 * config/nds32/nds32.h: Likewise.
11877 * config/nds32/nds32.md: Likewise.
11878 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
11879 * config/nds32/predicates.md: Implement new predicates for DSP
11882 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
11884 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
11885 Reformat alternatives and attributes so it is easier to identify
11886 which constraints/attributes go with which instruction.
11887 (mov<mode>_hardfloat32, FMOVE64): Likewise.
11888 (mov<mode>_softfloat32, FMOVE64): Likewise.
11889 (mov<mode>_hardfloat64, FMOVE64): Likewise.
11890 (mov<mode>_softfloat64, FMOVE64): Likewise.
11892 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
11894 * doc/extend.texi (PowerPC Built-in Functions): Rename this
11896 (Basic PowerPC Built-in Functions): The new name of the
11897 subsection previously known as "PowerPC Built-in Functions".
11898 (Basic PowerPC Built-in Functions Available on all Configurations):
11900 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
11901 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
11902 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
11903 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
11905 2018-05-11 Martin Jambor <mjambor@suse.cz>
11908 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
11911 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
11914 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
11916 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
11918 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
11919 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
11920 (ix86_handle_option): Handle -mwaitpkg.
11921 * config.gcc: New header.
11922 * config/i386/cpuid.h (bit_WAITPKG): New bit.
11923 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
11924 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
11926 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11927 OPTION_MASK_ISA_WAITPKG.
11928 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
11929 (ix86_option_override_internal): Add PTA_WAITPKG.
11930 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
11931 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
11932 IX86_BUILTIN_TPAUSE.
11933 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
11934 __builtin_ia32_umwait and __builtin_ia32_tpause.
11935 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
11936 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
11937 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
11938 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
11939 UNSPECV_TPAUSE): New.
11940 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
11941 * config/i386/i386.opt: Add -mwaitpkg.
11942 * config/i386/waitpkgintrin.h: New file.
11943 * config/i386/x86intrin.h: New header.
11944 * doc/invoke.texi: Add -mwaitpkg.
11946 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
11949 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
11951 (cortex-m0): Use armv6s-m isa.
11952 (cortex-m0plus): Likewise.
11953 (cortex-m1): Likewise.
11954 (cortex-m0.small-multiply): Likewise.
11955 (cortex-m0plus.small-multiply): Likewise.
11956 (cortex-m1.small-multiply): Likewise.
11958 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
11959 Jakub Jelinek <jakub@redhat.com>
11961 PR tree-optimization/85692
11962 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
11963 source permute as well.
11965 2018-05-11 Martin Liska <mliska@suse.cz>
11968 * doc/extend.texi: Document LLVM style format for no_sanitize
11971 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
11973 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
11974 mode_supports_vsx_dform_quad to mode_supports_dq_form.
11975 (mode_supports_vsx_dform_quad): Likewise.
11976 (mode_supports_vmx_dform): Move these functions to be next to the
11977 other mode_supports functions.
11978 (mode_supports_dq_form): Likewise.
11979 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
11980 mode_supports_dq_form.
11981 (reg_offset_addressing_ok_p): Likewise.
11982 (offsettable_ok_by_alignment): Likewise.
11983 (rs6000_legitimate_offset_address_p): Likewise.
11984 (legitimate_lo_sum_address_p): Likewise.
11985 (rs6000_legitimize_address): Likewise.
11986 (rs6000_legitimize_reload_address): Likewise.
11987 (rs6000_secondary_reload_inner): Likewise.
11988 (rs6000_preferred_reload_class): Likewise.
11989 (rs6000_output_move_128bit): Likewise.
11991 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
11993 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
11994 Generate SImode target register for null target.
11995 <case IX86_BUILTIN_XGETBV>: Ditto.
11996 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
11997 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
11999 2018-05-10 Carl Love <cel@us.ibm.com>
12001 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12002 dcbtt and dcbtstt if operands[2] is 0.
12004 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
12007 * config/i386/sse.md (usadv64qi): New expander.
12009 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
12011 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
12012 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
12013 -maltivec=be support.
12014 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
12015 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
12016 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
12017 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
12018 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
12019 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
12020 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
12021 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
12022 altivec_vsumsws): Adjust.
12023 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
12024 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
12025 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
12027 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
12028 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
12029 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
12030 (altivec_lve<VI_char>x): Delete expand.
12031 (*altivec_lve<VI_char>x_internal): Rename to...
12032 (altivec_lve<VI_char>x): ... this.
12033 (altivec_lvxl_<mode>): Delete expand.
12034 (*altivec_lvxl_<mode>_internal): Rename to ...
12035 (altivec_lvxl_<mode>): ... this.
12036 (altivec_stvxl_<mode>): Delete expand.
12037 (*altivec_stvxl_<mode>_internal): Rename to ...
12038 (altivec_stvxl_<mode>): ... this.
12039 (altivec_stve<VI_char>x): Delete expand.
12040 (*altivec_stve<VI_char>x_internal): Rename to ...
12041 (altivec_stve<VI_char>x): ... this.
12042 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
12043 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
12044 reduc_plus_scal_<mode>): Adjust.
12045 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
12047 (rs6000_cpu_cpp_builtins): Adjust.
12048 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
12049 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
12050 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
12051 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
12052 -maltivec=be support.
12053 (rs6000_split_vec_extract_var): Adjust.
12054 (rs6000_split_v4si_init): Adjust.
12055 (swap_selector_for_mode): Delete.
12056 (altivec_expand_lvx_be, altivec_expand_stvx_be,
12057 altivec_expand_stvex_be): Delete.
12058 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
12059 -maltivec=be support.
12060 (rs6000_gimple_fold_builtin): Ditto.
12061 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
12063 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
12064 (TARGET_DIRECT_MOVE_64BIT): Adjust.
12065 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
12066 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
12067 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
12068 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
12069 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
12070 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
12071 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
12072 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
12073 anonymous split): Adjust.
12074 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
12075 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
12077 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
12079 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
12080 when --with-gxx-include-dir is also specified.
12081 * configure: Regenerate.
12083 2018-05-09 Jim Wilson <jimw@sifive.com>
12086 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
12087 * config/riscv/t-withmultilib: New.
12088 * config/riscv/withmultilib.h: New.
12089 * doc/install.texi: Document RISC-V --with-multilib-list support.
12091 2018-05-09 Richard Biener <rguenther@suse.de>
12093 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
12095 (vect_bb_vectorization_profitable_p): Adjust. Compute
12096 actual scalar cost using the cost vector and the add_stmt_cost
12099 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12101 PR rtl-optimization/85645
12102 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
12103 in the REG_CFA_REGISTER note for LR, don't leave it empty.
12105 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12107 PR rtl-optimization/85645
12108 * shrink-wrap.c (spread_components): Return a boolean saying if
12109 anything was changed.
12110 (try_shrink_wrapping_separate): Iterate spread_components until
12111 nothing changes anymore.
12113 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12115 PR rtl-optimization/85645
12116 * regrename.c (build_def_use): Also kill the chains that include the
12117 destination of a REG_CFA_REGISTER note.
12119 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12121 PR rtl-optimization/85645
12122 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
12123 insn that has a REG_CFA_REGISTER note.
12125 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
12127 * cfgexpand.c (expand_clobber): New function.
12128 (expand_gimple_stmt_1): Use it.
12129 * tree-vect-stmts.c (vect_clobber_variable): New function,
12131 (vectorizable_simd_clone_call): ...here.
12132 (vectorizable_store): Emit a clobber either side of an
12133 IFN_STORE_LANES sequence.
12134 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
12136 2018-05-09 Tom de Vries <tom@codesourcery.com>
12139 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
12140 (define_insn "trap_if_false"): Add exit after trap.
12142 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
12144 PR rtl-optimization/85638
12145 * bb-reorder.c: Include common/common-target.h.
12146 (create_forwarder_block): New function extracted from...
12147 (fix_up_crossing_landing_pad): ...here. Rename into...
12148 (dw2_fix_up_crossing_landing_pad): ...this.
12149 (sjlj_fix_up_crossing_landing_pad): New function.
12150 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
12151 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
12152 from both partitions and exit the loop after one iteration.
12154 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
12157 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12159 (Basic PowerPC Built-in Functions): The new name of the
12160 subsection previously known as "PowerPC Built-in Functions".
12161 (Basic PowerPC Built-in Functions Available on all Configurations):
12163 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
12165 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
12167 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
12169 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
12172 2018-05-08 Jim Wilson <jimw@sifive.com>
12174 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
12175 (LD_EMUL_SUFFIX): New.
12176 (LINK_SPEC): Use it.
12178 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
12180 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12182 (Basic PowerPC Built-in Functions): The new name of the
12183 subsection previously known as "PowerPC Built-in Functions".
12184 (Basic PowerPC Built-in Functions Available on all Configurations):
12186 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
12188 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
12190 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
12192 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
12195 2018-05-08 Jakub Jelinek <jakub@redhat.com>
12198 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
12199 after cmpelim optimization.
12201 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
12203 * config.gcc: Support "goldmont".
12204 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
12205 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12206 PROCESSOR_GOLDMONT.
12207 * config/i386/i386.c (m_GOLDMONT): Define.
12208 (processor_target_table): Add "goldmont".
12209 (PTA_GOLDMONT): Define.
12210 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
12211 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
12212 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
12213 (fold_builtin_cpu): Add "goldmont".
12214 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
12215 (ix86_option_override_internal): Add "goldmont".
12216 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
12217 (processor_type): Add PROCESSOR_GOLDMONT.
12218 * config/i386/i386.md: Add CPU "glm".
12219 * config/i386/glm.md: New file.
12220 * config/i386/x86-tune.def: Add m_GOLDMONT.
12221 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
12223 2018-05-08 Jakub Jelinek <jakub@redhat.com>
12226 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
12228 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
12229 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
12230 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
12233 * config/i386/i386.c (ix86_fold_builtin): Handle
12234 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
12237 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
12238 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
12240 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
12243 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
12244 (check_arch): Likewise.
12245 (check_fpu): Return the result rather than printing it.
12246 (end arch): Fix operator precedence.
12247 (end cpu): Likewise.
12248 (END): Print the result from check_fpu.
12250 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
12251 Alan Hayward <alan.hayward@arm.com>
12252 David Sherwood <david.sherwood@arm.com>
12254 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
12255 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
12256 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
12257 (*fcmuo<mode>_and): New patterns.
12259 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
12261 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
12262 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
12263 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
12264 (cmp_op, sve_imm_con): New code attributes.
12265 (SVE_COND_INT_CMP, imm_con): Delete.
12266 (cmp_op): Remove above unspecs from int attribute.
12267 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
12269 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
12270 comparison-specific unspecs.
12271 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
12272 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
12273 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
12274 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
12275 (*vec_fcm<cmp_op><mode>): Rename to...
12276 (*fcm<cmp_op><mode>): ...this and adjust likewise.
12277 (*vec_fcmuo<mode>): Rename to...
12278 (*fcmuo<mode>): ...this and adjust likewise.
12279 (*pred_fcm<cmp_op><mode>): New pattern.
12280 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
12281 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
12283 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
12285 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
12286 (aarch64_emit_sve_predicated_cond): New function.
12287 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
12288 (aarch64_emit_unspec_cond_or): Replace with...
12289 (aarch64_emit_sve_or_conds): ...this new function. Use
12290 aarch64_emit_sve_ptrue_op for the individual comparisons and
12291 aarch64_emit_binop to OR them together.
12292 (aarch64_emit_inverted_unspec_cond): Replace with...
12293 (aarch64_emit_sve_inverted_cond): ...this new function. Use
12294 aarch64_emit_sve_ptrue_op for the comparison and
12295 aarch64_emit_unop to invert the result.
12296 (aarch64_expand_sve_vec_cmp_float): Update after the above
12297 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
12299 2018-05-07 Nathan Sidwell <nathan@acm.org>
12301 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
12302 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
12303 (Backwards Compatibility): Likewise.
12305 2018-05-07 Luis Machado <luis.machado@linaro.org>
12309 2018-05-07 Luis Machado <luis.machado@linaro.org>
12311 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12312 <prefetch_dynamic_strides>: New const bool field.
12313 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12314 prefetch_dynamic_strides.
12315 (exynosm1_prefetch_tune): Likewise.
12316 (thunderxt88_prefetch_tune): Likewise.
12317 (thunderx_prefetch_tune): Likewise.
12318 (thunderx2t99_prefetch_tune): Likewise.
12319 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
12321 (aarch64_override_options_internal): Update to set
12322 PARAM_PREFETCH_DYNAMIC_STRIDES.
12323 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12324 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12325 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12326 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12327 prefetch-dynamic-strides setting.
12329 2018-05-07 Luis Machado <luis.machado@linaro.org>
12331 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12332 <minimum_stride>: New const int field.
12333 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12334 minimum_stride field.
12335 (exynosm1_prefetch_tune): Likewise.
12336 (thunderxt88_prefetch_tune): Likewise.
12337 (thunderx_prefetch_tune): Likewise.
12338 (thunderx2t99_prefetch_tune): Likewise.
12339 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
12340 (aarch64_override_options_internal): Update to set
12341 PARAM_PREFETCH_MINIMUM_STRIDE.
12342 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12343 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12344 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12345 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12346 stride is constant and is below the minimum stride threshold.
12348 2018-05-07 Luis Machado <luis.machado@linaro.org>
12350 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
12353 2018-05-07 Luis Machado <luis.machado@linaro.org>
12355 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12356 <prefetch_dynamic_strides>: New const bool field.
12357 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12358 prefetch_dynamic_strides.
12359 (exynosm1_prefetch_tune): Likewise.
12360 (thunderxt88_prefetch_tune): Likewise.
12361 (thunderx_prefetch_tune): Likewise.
12362 (thunderx2t99_prefetch_tune): Likewise.
12363 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
12365 (aarch64_override_options_internal): Update to set
12366 PARAM_PREFETCH_DYNAMIC_STRIDES.
12367 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12368 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12369 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12370 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12371 prefetch-dynamic-strides setting.
12373 2018-05-07 Luis Machado <luis.machado@linaro.org>
12375 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12376 <minimum_stride>: New const int field.
12377 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12378 minimum_stride field.
12379 (exynosm1_prefetch_tune): Likewise.
12380 (thunderxt88_prefetch_tune): Likewise.
12381 (thunderx_prefetch_tune): Likewise.
12382 (thunderx2t99_prefetch_tune): Likewise.
12383 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
12384 (aarch64_override_options_internal): Update to set
12385 PARAM_PREFETCH_MINIMUM_STRIDE.
12386 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12387 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12388 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12389 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12390 stride is constant and is below the minimum stride threshold.
12392 2018-05-06 Jakub Jelinek <jakub@redhat.com>
12395 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
12396 the type is addressable. Don't force op into register if it has
12399 2018-05-05 Roland McGrath <mcgrathr@google.com>
12402 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
12403 any section for which we don't know a specific type it should have,
12404 regardless of name. Previously this was done only for the exact
12405 names ".init_array", ".fini_array", and ".preinit_array".
12406 (default_elf_asm_named_section): Add comment about
12407 relationship with default_section_type_flags and SECTION_NOTYPE.
12408 (get_section): Don't consider it a type conflict if one side has
12409 SECTION_NOTYPE and the other doesn't, as long as neither has the
12410 SECTION_BSS et al used in the default_section_type_flags logic.
12412 2018-05-05 Tom de Vries <tom@codesourcery.com>
12415 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
12416 (workaround_barsyncs): New function.
12417 (nvptx_reorg): Use workaround_barsyncs.
12418 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
12419 (define_expand "nvptx_membar_cta"): New define_expand.
12420 (define_insn "*nvptx_membar_cta"): New insn.
12422 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
12424 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
12425 To improve optimization opportunities.
12426 * builtin-types.def: The new needed builtin types for the above.
12428 2018-05-04 Richard Biener <rguenther@suse.de>
12430 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
12431 * gimple-ssa-store-merging.c
12432 (imm_store_chain_info::output_merged_store): Remove redundant create,
12433 release split_store vector contents on failure.
12434 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
12435 scalar stmt vector on cache hit.
12437 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
12439 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
12441 * config.gcc (powerpc-xilinx-eabi*): Remove.
12442 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
12444 (fusion_addis_mem_combo_load): Ditto.
12445 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
12447 (rs6000_cpu_cpp_builtins): Ditto.
12448 * config/rs6000/rs6000-linux.c
12449 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
12450 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
12451 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
12453 (rs6000_setup_reg_addr_masks): Ditto.
12454 (rs6000_init_hard_regno_mode_ok): Ditto.
12455 (rs6000_option_override_internal): Ditto.
12456 (legitimate_lo_sum_address_p): Ditto.
12457 (rs6000_legitimize_address): Ditto.
12458 (rs6000_legitimize_reload_address): Ditto.
12459 (rs6000_legitimate_address_p): Ditto.
12460 (abi_v4_pass_in_fpr): Ditto.
12461 (setup_incoming_varargs): Ditto.
12462 (rs6000_gimplify_va_arg): Ditto.
12463 (rs6000_split_multireg_move): Ditto.
12464 (rs6000_savres_strategy): Ditto.
12465 (rs6000_emit_prologue_components): Ditto.
12466 (rs6000_emit_epilogue_components): Ditto.
12467 (rs6000_emit_prologue): Ditto.
12468 (rs6000_emit_epilogue): Ditto.
12469 (rs6000_elf_file_end): Ditto.
12470 (rs6000_function_value): Ditto.
12471 (rs6000_libcall_value): Ditto.
12472 * config/rs6000/rs6000.h: Ditto.
12473 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
12474 (TARGET_MINMAX): ... this. New.
12475 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
12476 * config/rs6000/rs6000.md: Remove Xilinx FP support.
12477 (*movsi_internal1_single): Delete.
12478 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
12479 mfpu=, mxilinx-fpu): Delete.
12480 * config/rs6000/singlefp.h: Delete.
12481 * config/rs6000/sysv4.h: Remove Xilinx FP support.
12482 * config/rs6000/t-rs6000: Ditto.
12483 * config/rs6000/t-xilinx: Delete.
12484 * config/rs6000/titan.md: Adjust for fp_type removal.
12485 * config/rs6000/vsx.md: Remove Xilinx FP support.
12486 (VStype_simple): Delete.
12487 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
12488 * config/rs6000/xfpu.h: Delete.
12489 * config/rs6000/xfpu.md: Delete.
12490 * config/rs6000/xilinx.h: Delete.
12491 * config/rs6000/xilinx.opt: Delete.
12492 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
12493 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
12495 2018-05-04 Tom de Vries <tom@codesourcery.com>
12498 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
12501 2018-05-04 Richard Biener <rguenther@suse.de>
12503 PR middle-end/85627
12504 * tree-complex.c (update_complex_assignment): We are always in SSA form.
12505 (expand_complex_div_wide): Likewise.
12506 (expand_complex_operations_1): Likewise.
12507 (expand_complex_libcall): Preserve EH info of the original stmt.
12508 (tree_lower_complex): Handle removed blocks.
12509 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
12510 on complex multiplication and division libcall builtins.
12512 2018-05-04 Richard Biener <rguenther@suse.de>
12514 PR middle-end/85574
12515 * fold-const.c (negate_expr_p): Restrict negation of operand
12516 zero of a division to when we know that can happen without
12518 (fold_negate_expr_1): Likewise.
12520 2018-05-04 Jakub Jelinek <jakub@redhat.com>
12523 * real.h (real_nextafter): Declare.
12524 * real.c (real_nextafter): New function.
12525 * fold-const-call.c (fold_const_nextafter): New function.
12526 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
12527 CASE_CFN_NEXTTOWARD.
12528 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
12529 even when arg1_mode is different from arg0_mode.
12531 2018-05-03 Nathan Sidwell <nathan@acm.org>
12533 * doc/extend.texi (Deprecated Features): Remove
12534 -ffriend-injection.
12535 (Backwards Compatibility): Likewise.
12536 * doc/invoke.texi (C++ Language Options): Likewise.
12537 (C++ Dialect Options): Likewise.
12539 2018-05-03 Jakub Jelinek <jakub@redhat.com>
12542 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
12543 _mm512_mask_mullox_epi64): New intrinsics.
12545 2018-05-03 Tom de Vries <tom@codesourcery.com>
12548 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12549 dump files): Add offload-tree.
12551 2018-05-03 Richard Biener <rguenther@suse.de>
12553 PR tree-optimization/85615
12554 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
12555 to loops not nested in BBs loop father to avoid creating multi-entry
12558 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12560 PR tree-optimization/70291
12561 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
12562 arguments. Change return type to tree. Emit libcall as a new
12563 statement rather than replacing existing one when inplace_p is true.
12564 (expand_complex_multiplication_components): New function.
12565 (expand_complex_multiplication): Expand floating-point complex
12566 multiplication using the above.
12567 (expand_complex_division): Rename inner_type parameter to type.
12568 Update expand_complex_libcall call-site.
12569 (expand_complex_operations_1): Update expand_complex_multiplication
12570 and expand_complex_division call-sites.
12572 2018-05-02 Jakub Jelinek <jakub@redhat.com>
12575 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
12576 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
12577 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
12578 the highest significant bit of the shift count mask is clear. In
12579 check whether and[sq]i3 is needed verify that all significant bits
12580 of the shift count other than the highest are set.
12582 2018-05-02 Tom de Vries <tom@codesourcery.com>
12585 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
12586 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
12587 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
12588 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
12589 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
12590 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
12591 __builtin_goacc_parlevel_size.
12593 2018-05-02 Richard Biener <rguenther@suse.de>
12595 PR tree-optimization/85597
12596 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
12597 do not use split vect_get_vec_defs call but call vect_get_slp_defs
12600 2018-05-02 Tom de Vries <tom@codesourcery.com>
12603 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12604 dump files): Add ltrans-tree.
12606 2018-05-02 Tom de Vries <tom@codesourcery.com>
12609 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12610 dump files): Add wpa-ipa.
12612 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
12614 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
12615 powerpc*-*-linux*paired* target.
12616 * config/rs6000/750cl.h: Delete.
12617 * config/rs6000/paired.h: Delete.
12618 * config/rs6000/paired.md: Delete.
12619 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
12621 * config/rs6000/rs6000-builtin.def: Remove paired float support.
12622 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
12623 comment. Remove paired float support.
12624 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
12625 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
12627 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
12628 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
12630 * config/rs6000/rs6000.c: Remove paired float support.
12631 (paired_expand_vector_init, paired_expand_vector_move,
12632 paired_emit_vector_compare, paired_emit_vector_cond_expr,
12633 (paired_expand_lv_builtin, paired_expand_stv_builtin,
12634 paired_expand_builtin, paired_expand_predicate_builtin,
12635 paired_init_builtins): Delete.
12636 * config/rs6000/rs6000.h: Remove paired float support.
12637 * config/rs6000/rs6000.md: Remove paired float support.
12638 (move_from_CR_ov_bit): Delete.
12639 * config/rs6000/rs6000.opt (mpaired): Delete.
12640 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
12641 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
12643 2018-05-02 Richard Biener <rguenther@suse.de>
12645 PR middle-end/85567
12646 * gimplify.c (gimplify_save_expr): When in SSA form allow
12647 SAVE_EXPRs to compute to SSA vars.
12649 2018-05-02 Jakub Jelinek <jakub@redhat.com>
12652 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
12653 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
12654 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
12655 clobber operands[2], instead use a new pseudo. Formatting fixes.
12657 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
12659 PR tree-optimization/85586
12660 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
12661 exit early for statements in the same group if the accesses are
12664 2018-05-02 Tom de Vries <tom@codesourcery.com>
12667 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
12670 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
12672 PR tree-optimization/85143
12673 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
12675 2018-05-01 Tom de Vries <tom@codesourcery.com>
12678 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
12679 not found" error message.
12681 2018-05-01 Tom de Vries <tom@codesourcery.com>
12684 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
12685 * vec.c (test_ordered_remove_if): New function.
12686 (vec_c_tests): Call test_ordered_remove_if.
12687 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
12688 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
12689 * tree-vect-patterns.c (vect_pattern_recog_1): Use
12690 VEC_ORDERED_REMOVE_IF.
12692 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12694 PR tree-optimization/82665
12695 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
12696 pointer subtraction where arguments come from a memchr call.
12698 2018-05-01 Jakub Jelinek <jakub@redhat.com>
12700 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
12701 --push-state --as-needed and --pop-state instead of --as-needed and
12702 --no-as-needed if ld supports it.
12703 * configure: Regenerated.
12706 * doc/install.texi2html: Replace _002d with - and _002a with * in
12707 generated html files using sed.
12709 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12712 * gcc-rich-location.c (blank_line_before_p): New function.
12713 (use_new_line): New function.
12714 (gcc_rich_location::add_fixit_insert_formatted): New function.
12715 * gcc-rich-location.h
12716 (gcc_rich_location::add_fixit_insert_formatted): New function.
12718 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12720 * selftest.c (assert_streq): Rename "expected" and "actual" to
12721 "val1" and "val2". Extend NULL-handling to cover both inputs
12722 symmetrically, while still requiring both to be non-NULL for a pass.
12723 * selftest.h (assert_streq): Rename "expected" and "actual" to
12725 (ASSERT_EQ): Likewise.
12726 (ASSERT_EQ_AT): Likewise.
12727 (ASSERT_KNOWN_EQ): Likewise.
12728 (ASSERT_KNOWN_EQ_AT): Likewise.
12729 (ASSERT_NE): Likewise.
12730 (ASSERT_MAYBE_NE): Likewise.
12731 (ASSERT_MAYBE_NE_AT): Likewise.
12732 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
12733 the assertion to pass.
12734 (ASSERT_STREQ_AT): Likewise.
12736 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
12738 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
12739 interaction with -pie.
12741 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12743 * selftest.h: Fix alphabetization of per-source-file selftest
12746 2018-04-30 Jason Merrill <jason@redhat.com>
12748 PR c++/61982 - dead stores to destroyed objects.
12749 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
12752 2018-04-30 Jason Merrill <jason@redhat.com>
12754 * tree.c (build_clobber): New.
12755 * tree.h: Declare it.
12756 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
12758 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12760 * diagnostic-show-locus.c (layout::layout): Update for
12761 location_get_source_line returning a char_span.
12762 (struct char_span): Move to input.h.
12763 (struct correction): Update for fields in char_span becoming
12765 (struct source_line): Update for location_get_source_line
12766 returning a char_span.
12767 (layout::print_line): Likewise.
12768 * edit-context.c (edited_file::print_content): Likewise.
12769 (edited_file::print_diff_hunk): Likewise.
12770 (edited_file::print_run_of_changed_lines): Likewise.
12771 (edited_file::get_num_lines): Likewise.
12772 (edited_line::edited_line): Likewise.
12773 * final.c (asm_show_source): Likewise.
12774 * input.c (location_get_source_line): Convert return type
12775 from const char * to char_span, losing the final "line_len"
12777 (dump_location_info): Update for the above.
12778 (get_substring_ranges_for_loc): Likewise. Use a char_span
12779 when handling the literal within the line.
12780 (test_reading_source_line): Update for location_get_source_line
12781 returning a char_span.
12782 * input.h (class char_span): Move here from
12783 diagnostic-show-locus.c, converting from a struct to a class.
12784 Make data members private.
12785 (char_span::operator bool): New.
12786 (char_span::length): New.
12787 (char_span::get_buffer): New.
12788 (char_span::operator[]): New.
12789 (char_span::subspan): Make const.
12790 (char_span::xstrdup): New.
12791 (location_get_source_line): Convert return type from const char *
12792 to char_span, losing the final "line_size" param.
12794 2018-04-30 Jan Hubicka <jh@suse.cz>
12796 * lto-wrapper.c (ltrans_priorities): New static var.
12797 (cmp_priority): New.
12798 (run_gcc): Read priorities and if doing parallel build order
12799 the Makefile by them.
12801 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12803 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
12805 2018-04-30 Richard Biener <rguenther@suse.de>
12807 * tree-cfg.c (verify_address): Remove base argument, add
12808 flag whether to check TREE_ADDRESSABLE and do that.
12809 (verify_expr): Remove.
12810 (verify_types_in_gimple_reference): Add pieces from verify_expr.
12811 (verify_gimple_assign_single): Likewise.
12812 (verify_gimple_switch): Likewise.
12813 (verify_expr_location_1): Dereference tp once. Add (disabled)
12814 piece from verify_expr.
12815 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
12817 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
12819 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
12821 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
12823 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
12824 (small_data_pattern): Likewise.
12825 (arc_rewrite_small_data): Likewise.
12826 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
12827 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
12828 (get_symbol_alignment): New function.
12829 (legitimate_small_data_address_p): Likewise.
12830 (legitimate_scaled_address): Update, call
12831 legitimate_small_data_address_p.
12832 (output_sdata): New static variable.
12833 (arc_print_operand): Update how we handle small data operands.
12834 (arc_print_operand_address): Likewise.
12835 (arc_legitimate_address_p): Update, use
12836 legitimate_small_data_address_p.
12837 (arc_rewrite_small_data_p): Remove.
12838 (arc_rewrite_small_data_1): Likewise.
12839 (arc_rewrite_small_data): Likewise.
12840 (small_data_pattern): Likewise.
12841 (compact_sda_memory_operand): Update to use
12842 legitimate_small_data_address_p and get_symbol_alignment.
12843 (prepare_move_operands): Don't rewite sdata pattern.
12844 (prepare_extend_operands): Remove.
12845 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
12847 (zero_extendqisi2): Likewise.
12848 (zero_extendhisi2): Likewise.
12849 (extendqihi2): Likewise.
12850 (extendqisi2): Likewise.
12851 (extendhisi2): Likewise.
12852 (addsi3): Likewise.
12853 (subsi3): Likewise.
12854 (andsi3): Likewise.
12855 * config/arc/constraints.md (Usd): Change it to memory constraint.
12857 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
12859 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
12860 as source of std instructions.
12861 * config/arc/arc.md (movsi_insn): Update pattern predicate to
12862 allow 6-bit constants as source for store instructions.
12863 (movdi_insn): Update instruction pattern to allow 6-bit constants
12864 as source for store instructions.
12866 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
12868 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
12870 2018-04-30 Nathan Sidwell <nathan@acm.org>
12871 Sandra Loosemore <sandra@codesourcery.com>
12873 * dumpfile.c (dump_open): Allow '-' for stdout.
12874 * doc/invoke.texi (Developer Options): Document dump filename
12875 determination early. Document stdin/stdout selection.
12877 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
12879 Microblaze Target: PIC data text relative
12881 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
12882 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
12884 * config/microblaze/microblaze.h (microblaze_constant_address_p):
12885 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
12886 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
12887 New addressing mode for data-text relative position indepenedent code.
12888 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
12889 'ADDRESS_SYMBOLIC_TXT_REL'.
12890 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
12891 (microblaze_legitimate_pic_operand): Exclude function calls from
12892 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
12893 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
12895 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
12896 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
12897 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
12898 for 'address + offset'.
12899 (microblaze_expand_prologue): Add new function prologue call for
12901 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
12902 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
12903 table in case of TARGET_PIC_DATA_TEXT_REL.
12904 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
12905 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
12906 Add new macros 'UNSPEC_TEXT',
12907 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
12908 + exclude function calls from 'UNSPEC_PLT' in case of data text
12910 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
12911 new target hook for generating address diff vector tables in case of
12913 * doc/tm.texi : Regenerate.
12914 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
12915 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
12916 of addr diff vector generation.
12917 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
12918 target hook definition.
12919 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
12920 Add default function for generate_pic_addr_diff_vec -> flag_pic.
12921 * doc/invoke.texi (Add new pic option): Add new microblaze pic
12922 option for data text relative.
12924 2018-04-30 Richard Biener <rguenther@suse.de>
12926 * tree-chrec.h (evolution_function_is_constant_p): Remove
12928 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
12930 2018-04-30 Richard Biener <rguenther@suse.de>
12933 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
12935 2018-04-30 Richard Biener <rguenther@suse.de>
12937 PR tree-optimization/28364
12938 PR tree-optimization/85275
12939 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
12940 copying first exit test.
12942 2018-04-28 Mark Wielaard <mark@klomp.org>
12944 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
12945 dwarf_version >= 5.
12946 (dwarf_AT): Handle DW_AT_addr_base.
12947 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
12949 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
12952 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
12953 (*ashl<dwi>3_doubleword_mask_1): Ditto.
12954 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
12955 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
12957 2018-04-28 Richard Biener <rguenther@suse.de>
12959 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
12960 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
12961 to reflect use. Only add interesting stmts.
12963 2018-04-27 Martin Jambor <mjambor@suse.cz>
12966 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
12967 the jump function allows for passing through aggregate values.
12969 2018-04-27 David Malcolm <dmalcolm@redhat.com>
12971 * input.h (in_system_header_at): Convert from macro to inline
12973 (from_macro_expansion_at): Likewise.
12974 (from_macro_definition_at): Likewise.
12976 2018-04-27 Jeff Law <law@redhat.com>
12978 * config.gcc: Mark tile* targets as deprecated/obsolete.
12980 2018-04-27 Richard Biener <rguenther@suse.de>
12982 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
12985 2018-04-27 Richard Biener <rguenther@suse.de>
12987 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
12989 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
12991 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
12992 with Yd constraint. Set "preferred_for_speed" attribute from
12993 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
12994 with Yd constraint.
12995 (*movdi_internal): Ditto.
12996 (movti_interunit splitters): Remove
12997 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
12998 (movdi_interunit splitters): Ditto.
12999 * config/i386/constraints.md (Ye): Remove.
13000 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
13002 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13005 * config/aarch64/constraints.md (Usg): Limit to 31.
13006 (Usj): Limit to 63.
13008 2018-04-27 Jakub Jelinek <jakub@redhat.com>
13010 PR tree-optimization/85529
13011 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
13012 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
13013 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
13014 zero extension or masking of the MSB bit.
13015 (optimize_range_tests): Add FIRST_BB argument, pass it through
13016 to optimize_range_tests_var_bound.
13017 (maybe_optimize_range_tests, reassociate_bb): Adjust
13018 optimize_range_tests callers.
13020 2018-04-26 Richard Biener <rguenther@suse.de>
13021 Jakub Jelinek <jakub@redhat.com>
13023 * cgraph.h (symbol_table): Just declare debug method here.
13024 * symtab.c (symbol_table::debug): Define.
13026 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
13028 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
13030 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
13032 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
13033 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
13034 (*movdi_internal): Substitute Yi and Yj constraint with x
13035 and Ym and Yn constraint with y constraint. Update "isa"
13036 attribute and set "preferred_for_speed" attribute from
13037 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
13038 (*movsi_internal): Ditto.
13039 (*movdf_internal): Ditto.
13040 (*movsf_internal): Ditto.
13041 (*zero_extendsidi2): Ditto.
13042 * config/i386/sse.md (vec_set<mode>_0): Ditto.
13043 (sse2_loadld): Ditto.
13044 (*vec_extract<ssevecmodelower>_0): Ditto.
13045 (*vec_extractv4si_0_zext_sse4): Ditto.
13046 (vec_concatv2di): Ditto.
13047 (*vec_dup<mode>): Ditto.
13048 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
13049 * config/i386/constraints.md (Yi): Remove.
13054 2018-04-26 Nathan Sidwell <nathan@acm.org>
13056 * dumpfile.c (dump_open): New.
13057 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
13058 (dump_finish): Detect stdio/stderr by value not name.
13060 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
13062 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
13064 2018-04-26 Tom de Vries <tom@codesourcery.com>
13067 * config/nvptx/nvptx.c (verify_neutering_jumps)
13068 (verify_neutering_labels): New function
13069 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
13071 2018-04-26 Tom de Vries <tom@codesourcery.com>
13074 * config/nvptx/nvptx.c (needs_neutering_p): New function.
13075 (nvptx_single): Use needs_neutering_p to skip over insns that do not
13078 2018-04-26 Richard Biener <rguenther@suse.de>
13079 Tom de Vries <tom@codesourcery.com>
13082 * lto-streamer-out.c (output_function): Fixup loops if required to match
13083 discovery done in the reader.
13085 2018-04-26 Richard Biener <rguenther@suse.de>
13087 PR tree-optimization/85116
13088 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
13089 have a loop exit from the single latch predecessor. Remove
13090 case of header with just condition.
13091 (ch_base::copy_headers): Exclude infinite loops from any
13093 (pass_ch::execute): Record exits.
13095 2018-04-26 Richard Biener <rguenther@suse.de>
13097 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
13098 prologue cost vector and pass it to vect_get_load_cost.
13099 (vect_get_peeling_costs_all_drs): Likewise.
13100 (vect_peeling_hash_get_lowest_cost): Likewise.
13101 (vect_enhance_data_refs_alignment): Likewise.
13103 2018-04-26 Richard Biener <rguenther@suse.de>
13105 PR middle-end/85450
13106 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
13107 checking of integer<->pointer conversions.
13108 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
13109 sign-/zero-extending pointer types.
13110 (expand_omp_for_static_chunk): Likewise.
13112 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
13113 Jean Lee <xiaoyur347@gmail.com>
13115 * config/mips/mips.c (mips_asan_shadow_offset): New function.
13116 (TARGET_ASAN_SHADOW_OFFSET): Define.
13117 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
13118 true for -fsanitize=address.
13120 2018-04-25 Mark Wielaard <mark@klomp.org>
13122 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
13125 2018-04-25 Jakub Jelinek <jakub@redhat.com>
13127 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
13128 than "alu", remove explicit "memory" and "imm_disp" attributes.
13129 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
13131 PR middle-end/85414
13132 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
13133 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
13134 gen_lowpart_no_emit.
13136 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
13139 * config/i386/i386.c (ix86_expand_builtin): Change memory
13140 operand to XI, extend p0 to Pmode.
13141 * config/i386/i386.md: Change unspec volatile and operand
13142 1 mode to XI, change operand 0 mode to P.
13144 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13146 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
13147 GET_MODE_MASK before any checking.
13148 (nds32_can_use_bset_p): Likewise.
13149 (nds32_can_use_btgl_p): Likewise.
13151 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13153 * config/nds32/nds32-doubleword.md: New define_split pattern for
13154 illegal register number.
13156 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13158 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
13160 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13162 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
13164 2018-04-25 Richard Biener <rguenther@suse.de>
13166 * lto-streamer.h (LTO_major_version): Bump to 8.
13168 2018-04-25 Jakub Jelinek <jakub@redhat.com>
13170 * BASE-VER: Set to 9.0.0.
13172 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
13174 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
13175 in __abskf2 and __powikf2.
13177 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13180 * config/aarch64/constraints.md (Usg, Usj): New constraints.
13181 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
13182 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
13183 Use the above on operand 2. Reindent.
13184 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
13186 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
13189 * common/config/i386/i386-common.c (ix86_handle_option): Don't
13191 * config/i386/i386.opt (mcet): Removed.
13192 * doc/install.texi: Remove -mcet documentation.
13193 * doc/invoke.texi: Likewise.
13195 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
13198 * doc/install.texi: Remove -mcet from bootstrap-cet.
13200 2018-04-24 Jakub Jelinek <jakub@redhat.com>
13203 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
13204 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
13208 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
13209 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
13210 containing a CONST_VECTOR.
13212 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
13214 * doc/install.texi: Update newlib dependency for nvptx.
13216 2018-04-24 Jakub Jelinek <jakub@redhat.com>
13219 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
13220 instead of INTVAL when shifting x left.
13222 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
13224 PR tree-optimization/85478
13225 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
13226 vect_grouped_store_supported for single element vectors.
13228 2018-04-24 Richard Biener <rguenther@suse.de>
13231 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
13232 load cost increase to the case of non-constant step.
13234 2018-04-24 Jakub Jelinek <jakub@redhat.com>
13237 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
13238 destination if any_malformed_asm.
13240 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
13242 PR middle-end/85496
13243 * expr.c (store_field): In the bitfield case, if the value comes from
13244 a function call and is returned in registers by means of a PARALLEL,
13245 do not change the mode of the temporary unless BLKmode and VOIDmode.
13247 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
13249 PR rtl-optimization/85423
13250 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
13251 dependencies to debug insns when the previous insn is non-debug.
13253 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
13255 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
13256 enums into a single definition.
13257 (fls): Fix predicates and printing.
13260 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
13262 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
13263 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
13264 and short u6 immediate.
13265 (check_if_valid_sleep_operand): Remove.
13266 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
13268 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13270 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
13271 flag_always_save_lp condition.
13272 * config/nds32/nds32.opt (malways-save-lp): New option.
13274 2018-04-22 Shiva Chen <shiva0217@gmail.com>
13276 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
13277 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
13278 * config/nds32/nds32.h
13279 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
13280 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
13282 2018-04-22 Shiva Chen <shiva0217@gmail.com>
13284 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
13285 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
13287 2018-04-22 Shiva Chen <shiva0217@gmail.com>
13288 Chung-Ju Wu <jasonwucj@gmail.com>
13290 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
13292 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
13293 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
13295 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13297 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
13299 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13301 * config/nds32/nds32-protos.h (nds32_data_alignment,
13302 nds32_local_alignment): Declare.
13303 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
13304 nds32_local_alignment): New functions.
13305 (TARGET_CONSTANT_ALIGNMENT): Define.
13306 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
13308 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13310 * config/nds32/nds32.c
13311 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
13312 (TARGET_MODES_TIEABLE_P): Likewise.
13314 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13316 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
13317 level Ofast and Og.
13319 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
13320 Chung-Ju Wu <jasonwucj@gmail.com>
13322 * config/nds32/constants.md (unspec_volatile_element): Add enum values
13323 for unaligned access.
13324 * config/nds32/nds32-intrinsic.c: Implementation of expanding
13326 * config/nds32/nds32-intrinsic.md: Likewise.
13327 * config/nds32/nds32_intrinsic.h: Likewise.
13328 * config/nds32/nds32.h (nds32_builtins): Likewise.
13329 * config/nds32/nds32.opt (munaligned-access): New option.
13330 * config/nds32/nds32.c (nds32_asm_file_start): Display
13331 flag_unaligned_access status.
13333 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
13335 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
13336 -mno-relax is present.
13337 * config/riscv/linux.h (LINK_SPEC): Ditto.
13339 2018-04-20 Martin Sebor <msebor@redhat.com>
13342 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
13344 (gimple_fold_builtin_stxcpy_chk): Same.
13345 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
13347 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
13350 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
13351 __powikf2 when long double is IEEE 128-bit.
13353 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
13355 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
13356 step to make sure stack always aligned.
13358 2018-04-20 Carl Love <cel@us.ibm.com>
13361 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
13362 size check for arg0.
13364 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
13365 Tom de Vries <tom@codesourcery.com>
13368 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
13369 Emit insns for calls too.
13370 (nvptx_find_par): Always look for worker-level predecessor insn.
13371 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
13373 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
13374 (nvptx_process_pars): Propagate frames for calls.
13376 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
13379 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
13381 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
13382 (ix86_handle_option): Don't handle OPT_mibt.
13383 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
13385 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
13387 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
13388 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
13389 (ix86_target_macros): Define __CET__ with flag_cf_protection
13390 for -fcf-protection.
13391 * config/i386/i386.c (isa2_opts): Remove -mibt.
13392 * config/i386/i386.h (TARGET_IBT): Removed.
13393 (TARGET_IBT_P): Likewise.
13394 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
13395 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
13396 * config/i386/i386.opt (mcet): Update help message.
13397 (mshstk): Likewise.
13399 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
13400 -mcet as an alias for -mshstk.
13402 2018-04-20 Richard Biener <rguenther@suse.de>
13404 PR middle-end/85475
13405 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
13406 complexity by forcing a single use of the multiply operand.
13408 2018-04-20 Martin Jambor <mjambor@suse.cz>
13411 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
13412 recursion dependency to only apply to non-clones.
13414 2018-04-20 Martin Jambor <mjambor@suse.cz>
13417 * ipa-cp.c (create_specialized_node): Check that clones of
13418 self-recursive edges exist during IPA-CP.
13420 2018-04-19 Toon Moene <toon@moene.org>
13422 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
13425 2018-04-19 Jakub Jelinek <jakub@redhat.com>
13427 PR tree-optimization/85467
13428 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
13429 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
13430 VECTOR_CST element to type.
13432 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
13435 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
13436 * config/i386/i386.md (builtin_setjmp_setup): Removed.
13437 (builtin_longjmp): Likewise.
13438 (save_stack_nonlocal): New pattern.
13439 (restore_stack_nonlocal): Likewise.
13441 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
13444 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
13445 Replace ASM_OUTPUT_LABEL with fprintf.
13447 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
13450 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
13451 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
13452 * config/i386/i386-c.c (ix86_target_macros_internal): Also
13453 define __IBT__ and __SHSTK__ for -fcf-protection.
13454 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
13456 (ix86_trampoline_init): Likewise.
13457 (x86_output_mi_thunk): Likewise.
13458 (ix86_notrack_prefixed_insn_p): Likewise.
13459 (ix86_option_override_internal): Don't disallow -fcf-protection.
13460 * config/i386/i386.md (rdssp<mode>): Also enable for
13462 (incssp<mode>): Likewise.
13463 (nop_endbr): Likewise.
13464 * config/i386/i386.opt (mcet): Change help message to built-in
13467 (mshstk): Likewise.
13468 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
13469 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
13470 enable CET built-in functions.
13472 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
13474 * common/config/i386/i386-common.c
13475 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
13476 OPTION_MASK_ISA_MOVDIRI_UNSET,
13477 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
13478 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
13479 * config.gcc (movdirintrin.h): New header.
13480 * config/i386/cpuid.h (bit_MOVDIRI,
13481 bit_MOVDIR64B): New bits.
13482 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
13484 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
13485 (VOID, PVOID, PCVOID)): New function types.
13486 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
13487 __builtin_ia32_directstoreu_u64,
13488 __builtin_ia32_movdir64b): New builtins.
13489 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
13490 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
13492 (ix86_valid_target_attribute_inner_p): Ditto.
13493 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
13494 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
13495 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
13496 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
13497 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
13498 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
13499 (movdiri<mode>, movdir64b_<mode>): New.
13500 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
13501 * config/i386/immintrin.h: Include movdirintrin.h.
13502 * config/i386/movdirintrin.h: New file.
13503 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
13505 2018-04-19 Richard Biener <rguenther@suse.de>
13507 PR middle-end/85455
13508 * cfg.c (clear_bb_flags): When loop state says we have
13509 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
13511 2018-04-19 Richard Biener <rguenther@suse.de>
13513 PR tree-optimization/84737
13514 * tree-vect-data-refs.c (vect_copy_ref_info): New function
13515 copying restrict info.
13516 (vect_setup_realignment): Use it.
13517 * tree-vectorizer.h (vect_copy_ref_info): Declare.
13518 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
13519 the first DR to all generated stores.
13520 (vectorizable_load): Likewise for loads.
13522 2018-04-19 Jakub Jelinek <jakub@redhat.com>
13524 PR tree-optimization/85446
13525 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
13526 the integral and pointer types to have the same precision.
13528 * doc/install.texi: Document --disable-cet being the default and
13531 2018-04-18 Martin Liska <mliska@suse.cz>
13533 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
13536 2018-04-18 Martin Liska <mliska@suse.cz>
13539 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
13542 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
13543 arguments if they are comparable.
13545 2018-04-18 Martin Liska <mliska@suse.cz>
13548 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
13551 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
13554 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
13557 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
13558 ENDBR after calling __morestack.
13560 2018-04-18 David Malcolm <dmalcolm@redhat.com>
13563 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
13564 by using gcc_base_ver to generate a gcc_driver_version, and use
13565 it when generating GCC_DRIVER_NAME.
13566 * configure: Regenerate.
13568 2018-04-18 Jakub Jelinek <jakub@redhat.com>
13571 * config.gcc: Obsolete powerpc*-*-*spe*.
13573 2018-04-17 Jakub Jelinek <jakub@redhat.com>
13576 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
13577 (stabstr_D): Change type of unum from unsigned int to
13578 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
13581 2018-04-17 Jim Wilson <jimw@sifive.com>
13584 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
13585 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
13586 Set arg_pointer_offset after using pretend_args_size.
13588 2018-04-17 Jakub Jelinek <jakub@redhat.com>
13590 PR rtl-optimization/85431
13591 * dse.c (record_store): Ignore zero width stores.
13594 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
13595 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
13596 __builtin_stack_restore rather than after it.
13597 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
13598 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
13599 argument instead of virtual_dynamic_stack_rtx.
13601 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
13603 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
13605 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
13606 Add note to error message to explain internal mapping of overloaded
13607 built-in function name to non-overloaded built-in function name.
13608 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
13611 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
13614 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
13615 where the inputs overlap with the output.
13617 2018-04-17 Jakub Jelinek <jakub@redhat.com>
13619 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
13620 (=v, v) alternative and explicit "memory" attribute.
13621 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
13622 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
13624 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
13625 "sselog1" type instead of "sselog".
13626 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
13627 "sselog". Remove explicit "memory" attribute.
13628 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
13629 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
13631 (vec_extract_hi_v32hi): Merge all alternatives into one, use
13632 "sselog1" type instead of "sselog". Remove explicit "memory"
13634 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
13635 use "sselog1" type instead of "sselog". Remove explicit "memory"
13637 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
13638 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
13640 (vec_extract_hi_v64qi): Merge all alternatives into one, use
13641 "sselog1" type instead of "sselog". Remove explicit "memory"
13643 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
13644 use "sselog1" type instead of "sselog". Remove explicit "memory"
13648 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
13650 PR middle-end/85414
13651 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
13654 2018-04-17 Martin Jambor <mjambor@suse.cz>
13657 * ipa-cp.c (create_specialized_node): Call
13658 expand_all_artificial_thunks if necessary.
13660 2018-04-17 Martin Liska <mliska@suse.cz>
13663 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
13664 in message, remote space in between '_G' and '('.
13666 2018-04-17 Jakub Jelinek <jakub@redhat.com>
13669 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
13670 avx512f_vmcmp<mode>3<round_saeonly_name>,
13671 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
13672 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
13673 avx512f_rndscale<mode><round_saeonly_name>,
13674 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
13675 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
13676 Use %<iptr>2 instead of %2 for -masm=intel.
13677 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
13678 avx512f_vcvttss2usi<round_saeonly_name>,
13679 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
13681 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
13682 avx512f_vcvttsd2usi<round_saeonly_name>,
13683 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
13684 Use %q1 instead of %1 for -masm=intel.
13685 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
13686 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
13687 of %3 for -masm=intel.
13688 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
13690 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
13692 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
13694 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
13695 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
13697 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
13699 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
13700 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
13701 %g1 and one with %0 and %1.
13702 (avx512er_vmrcp28<mode><round_saeonly_name>,
13703 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
13704 %1 for -masm=intel.
13705 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
13706 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
13707 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
13708 of %0 and %{%4%} for -masm=intel.
13709 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
13710 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
13711 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
13712 order of %0 and %{%5%}%{z%} for -masm=intel.
13714 2018-04-17 Jan Hubicka <jh@suse.cz>
13717 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
13719 2018-04-17 Martin Liska <mliska@suse.cz>
13722 * multiple_target.c (create_dispatcher_calls): Set apostrophes
13723 for target_clone error message. Make default implementation
13724 clone to be a local declaration.
13725 (separate_attrs): Add new argument and check for an empty
13727 (expand_target_clones): Handle it.
13728 (ipa_target_clone): Make redirection just for target_clones
13731 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
13732 Tom de Vries <tom@codesourcery.com>
13734 PR middle-end/84955
13735 * omp-expand.c (expand_oacc_for): Add dummy false branch for
13736 tiled basic blocks without omp continue statements.
13738 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
13741 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
13742 vec_extract expression as having side effects to make sure it gets
13745 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
13748 * config/i386/i386.c (get_builtin_code_for_version): Check
13751 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
13754 * config.gcc: Support "skylake".
13755 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13757 * config/i386/i386.c (m_SKYLAKE): Define.
13758 (processor_target_table): Add "skylake".
13759 (ix86_option_override_internal): Add "skylake".
13760 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
13761 PROCESSOR_CANNONLAKE.
13762 (get_builtin_code_for_version): Fix priority for
13763 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
13764 PROCESSOR_SKYLAKE-AVX512.
13765 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
13766 (processor_type): Add PROCESSOR_SKYLAKE.
13768 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
13769 Jason Merrill <jason@redhat.com>
13772 * convert.c (convert_to_integer_1): Use direct recursion for
13773 enumeral types and types with a precision less than the number
13774 of bits in their mode.
13776 2018-04-16 Julia Koval <julia.koval@intel.com>
13779 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
13780 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
13782 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
13785 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
13786 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
13787 and -mno-direct-move.
13789 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
13792 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
13793 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
13794 Ensure negative shifts result in {0}.
13796 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
13798 PR rtl-optimization/79916
13799 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
13800 regs (if any) to define how to gnerate SD moves when LRA is in
13803 2018-04-13 Jakub Jelinek <jakub@redhat.com>
13805 PR rtl-optimization/85393
13806 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
13807 * except.c (expand_dw2_landing_pad_for_region): Make static.
13808 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
13809 a label and unconditional jump to old_bb, rather than
13810 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
13813 PR rtl-optimization/85376
13814 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
13815 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
13816 instead of a specific value.
13818 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
13819 Bin Cheng <bin.cheng@arm.com>
13821 PR tree-optimization/82965
13822 PR tree-optimization/83991
13823 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
13824 by_profile_only parameter.
13825 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
13826 information if the loop was predicted to iterate too many times.
13827 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
13829 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
13832 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
13835 2018-04-13 Martin Liska <mliska@suse.cz>
13836 Jakub Jelinek <jakub@redhat.com>
13838 PR middle-end/81657
13839 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
13840 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
13841 * builtins.c (expand_builtin_memory_copy_args): Use
13842 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
13843 handle dest_addr == pc_rtx.
13845 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
13848 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
13849 asked to not generate direct moves.
13850 (fix_trunc<mode>si2_stfiwx): Similar.
13851 (fix_trunc<mode>si2_internal): Similar.
13853 2018-04-12 Jakub Jelinek <jakub@redhat.com>
13856 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
13857 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
13858 lookup if dest in some wider mode is known to be const0_rtx and
13859 if so, record permanent equivalence for it to be ZERO_EXTEND of
13860 the narrower mode destination.
13862 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
13864 * lto-streamer-out.c (output_function): Revert 259346.
13865 * omp-expand.c (expand_oacc_for): Likewise.
13867 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
13869 PR rtl-optimization/85354
13870 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
13871 * sel-sched.c (sel_global_init): ... here.
13873 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
13876 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
13877 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
13878 mode for PE-COFF targets.
13879 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
13880 (i386_pe_asm_lto_end): Likewise.
13881 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
13882 (TARGET_ASM_LTO_END): Likewise.
13883 * config/i386/winnt.c (saved_debug_info_level): New static variable.
13884 (i386_pe_asm_lto_start): New function.
13885 (i386_pe_asm_lto_end): Likewise.
13887 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
13888 Richard Biener <rguenther@suse.de>
13890 PR middle-end/84955
13891 * lto-streamer-out.c (output_function): Fix CFG loop state before
13893 * omp-expand.c (expand_oacc_for): Handle calls to internal
13894 functions like regular functions.
13896 2018-04-12 Richard Biener <rguenther@suse.de>
13899 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
13900 for the early LTO debug to properly generate references to it
13901 during DIE emission. Do not re-use that for the skeleton for
13903 (dwarf2out_early_finish): Likewise.
13905 2018-04-12 Jakub Jelinek <jakub@redhat.com>
13908 * config/i386/sse.md
13909 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
13910 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
13911 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
13912 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
13913 and output is a reg, avoid creating invalid lowpart subreg, but
13914 instead split into a 512-bit move. Don't split if not AVX512VL,
13915 input is xmm16+ reg and output is a mem.
13916 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
13917 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
13918 xmm16+ reg and output is a mem.
13920 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
13922 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
13923 also for flag_dwarf2_cfi_asm.
13925 2018-04-12 Jakub Jelinek <jakub@redhat.com>
13927 PR rtl-optimization/85342
13928 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
13929 a bool scalar var inside of the loop instead. Don't try to update
13930 recog_data.operand after failed apply_change_group.
13932 2018-04-12 Tom de Vries <tom@codesourcery.com>
13935 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
13936 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
13937 array with flexible array member as array without given dimension.
13938 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
13939 argument for undefined param to true.
13941 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
13944 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
13945 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
13946 from PowerPC section.
13947 * config/rs6000/sysv4.opt (mcall-): Improve help text.
13948 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
13949 help text that is too long.
13950 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
13951 help text that is too long.
13952 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
13953 help text that is too long.
13955 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
13957 * config/alpha/alpha.md (stack_probe_internal): Rename
13958 from "probe_stack". Update all callers.
13960 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
13962 PR rtl-optimization/84566
13963 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
13964 sched_macro_fuse_insns.
13966 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
13969 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
13970 (compute_block_dependences): ... from here.
13972 2018-04-11 Jakub Jelinek <jakub@redhat.com>
13974 PR tree-optimization/85331
13975 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
13976 from int to HOST_WIDE_INT.
13978 2018-04-11 Martin Jambor <mjambor@suse.cz>
13981 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
13982 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
13983 not the same as the source val.
13984 (cgraph_edge_brings_value_p): New parameter.
13985 (gather_edges_for_value): Pass destination value to
13986 cgraph_edge_brings_value_p.
13987 (perhaps_add_new_callers): Likewise.
13988 (get_info_about_necessary_edges): Likewise and exclude values brought
13989 only by self-recursive edges.
13990 (create_specialized_node): Redirect only clones of self-calling edges.
13991 (+self_recursive_pass_through_p): New function.
13992 (find_more_scalar_values_for_callers_subset): Use it.
13993 (find_aggregate_values_for_callers_subset): Likewise.
13994 (known_aggs_to_agg_replacement_list): Removed.
13995 (decide_whether_version_node): Re-calculate known constants for all
13996 remaining context clones.
13998 2018-04-11 Richard Biener <rguenther@suse.de>
14001 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
14002 from early DWARF output.
14003 (dwarf2out_early_finish): Output line info unconditionally into
14004 early DWARF and add reference to it.
14006 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14009 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
14010 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
14011 other than V2DFmode using iptr mode attribute.
14012 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
14014 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14016 PR rtl-optimization/84659
14017 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
14019 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14022 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
14024 (output_loc_list): Pass address of a dummy size variable even in the
14025 locview handling loop.
14026 (index_location_lists): Add comment on why skip_loc_list_entry can't
14029 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
14032 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
14035 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
14038 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14039 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
14040 and -mstring-compare-inline-limit.
14042 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14045 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
14046 for stack clash protection in a register whenever we need it to be in
14049 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14051 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
14052 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
14054 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14057 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
14059 (mlong-double-): Ditto.
14060 * config/rs6000/sysv4.opt (msdata=): Ditto.
14061 (mtls-size=): Ditto.
14063 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
14065 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
14066 erroneous entries for
14067 "vector int vec_ldl (int, long int *)", and
14068 "vector unsigned int vec_ldl (int, unsigned long int *)".
14069 Add comments and entries for
14070 "vector bool char vec_ldl (int, bool char *)",
14071 "vector bool short vec_ldl (int, bool short *)",
14072 "vector bool int vec_ldl (int, bool int *)",
14073 "vector bool long long vec_ldl (int, bool long long *)",
14074 "vector pixel vec_ldl (int, pixel *)",
14075 "vector long long vec_ldl (int, long long *)",
14076 "vector unsigned long long vec_ldl (int, unsigned long long *)".
14077 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
14078 type tree bool_long_long_type_node and correct definition of
14079 bool_V2DI_type_node to make reference to this new type tree.
14080 (rs6000_mangle_type): Replace erroneous reference to
14081 bool_long_type_node with bool_long_long_type_node.
14082 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
14083 comments to emphasize sign distinctions for char and int types and
14084 replace RS6000_BTI_bool_long constant with
14085 RS6000_BTI_bool_long_long constant. Also add comment to restrict
14086 use of RS6000_BTI_pixel.
14087 (bool_long_type_node): Remove this macro definition.
14088 (bool_long_long_type_node): New macro definition
14090 2018-04-10 Jakub Jelinek <jakub@redhat.com>
14092 PR rtl-optimization/85300
14093 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
14094 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
14095 simplify_unary_operation fails.
14097 2018-04-10 Martin Liska <mliska@suse.cz>
14099 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
14100 cgraph_edge and ipa_ref.
14102 2018-04-10 Jakub Jelinek <jakub@redhat.com>
14106 * config/i386/sse.md
14107 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
14108 computation of the VEC_MERGE selector from mask.
14109 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
14110 Fix decoding of the VEC_MERGE selector into mask.
14112 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
14114 PR tree-optimization/85286
14115 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
14117 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
14119 * final.c (final_1): Set insn_last_address as well as
14120 insn_current_address.
14122 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14125 * explow.c (emit_stack_probe): Call validize_mem on memory location
14126 before passing it to gen_probe_stack. Create address operand and
14127 legitimize it for the probe_stack_address case.
14129 2018-04-09 Jan Hubicka <jh@suse.cz>
14132 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
14133 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
14134 * tree.c (free_lang_data_in_type): Fix handling of binfos;
14136 (free_lang_data): Rebuild type inheritance graph.
14138 2018-04-09 Martin Sebor <msebor@redhat.com>
14140 * invoke.texi (-finline-small-functions): Mention other optimization
14142 (-findirect-inlining, -fpartial-inlining): Same.
14143 (-finline-functions-called-once): Same.
14144 (-freorder-blocks-and-partition): Same.
14146 2018-04-09 Jan Hubicka <jh@suse.cz>
14149 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
14150 jumps; choose last target that matches the criteria (i.e.
14151 no partition changes for non-crossing jumps).
14152 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
14153 support for redirecting crossing jumps to non-crossing.
14155 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
14157 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
14158 also for naked functions.
14160 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
14162 * config/arc/arc.md (add_shift): New pattern.
14163 (add_shift2): Likewise.
14164 (sub_shift): Likewise.
14165 (sub_shift_cmp0_noout): Likewise.
14166 (compare_si_ashiftsi): Likewise.
14167 (xbfu_cmp0_noout): New combine pattern.
14168 (xbfu_cmp0"): Likewise.
14169 (movsi_set_cc_insn): Place the predicable variant first.
14170 (commutative_binary_cmp0_noout): Remove clobber.
14171 (commutative_binary_cmp0): New pattern.
14172 (noncommutative_binary_cmp0): Likewise.
14173 (noncommutative_binary_cmp0_noout): Likewise.
14174 (noncommutative_binary_comparison_result_used): Removed.
14175 (rsub_cmp0): New pattern.
14176 (rsub_cmp0_noout): Likewise.
14177 (extzvsi): Changed, keep only meaningful variants.
14178 (SQH, SEZ): New iterators.
14179 (SQH_postfix): New mode attribute.
14180 (SEZ_prefix): New code attribute.
14181 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
14182 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
14183 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
14184 of numerical value.
14185 (noncommutative_operator): Check the availability of barrel
14188 2018-04-09 Richard Biener <rguenther@suse.de>
14190 PR tree-optimization/85284
14191 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
14192 Only use the niter constraining form of simple_iv when the exit
14193 is always executed.
14195 2018-04-09 Tom de Vries <tom@codesourcery.com>
14198 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
14199 (define_expand "*memory_barrier"): New define_expand.
14200 (define_insn "memory_barrier"): New insn.
14202 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14204 PR rtl-optimization/80463
14205 PR rtl-optimization/83972
14206 PR rtl-optimization/83480
14208 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
14209 correct producer for the insn.
14210 (tidy_control_flow): Fixup seqnos in case of debug insns.
14212 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14214 PR rtl-optimization/83913
14216 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
14217 different sched-times when merging exprs.
14219 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14221 PR rtl-optimization/83962
14223 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
14224 tidy_fallthru_edge and tidy_control_flow.
14226 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14228 PR rtl-optimization/83530
14230 * sel-sched.c (force_next_insn): New global variable.
14231 (remove_insn_for_debug): When force_next_insn is true, also leave only
14232 next insn in the ready list.
14233 (sel_sched_region): When the region wasn't scheduled, make another pass
14234 over it with force_next_insn set to 1.
14236 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
14238 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
14240 * config/nds32/constants.md (unspec_volatile_element): Add enum values
14241 for interrupt control.
14242 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
14243 functions for interrupt control.
14244 * config/nds32/nds32-intrinsic.md: Likewise.
14245 * config/nds32/nds32_intrinsic.h: Likewise.
14246 * config/nds32/nds32.h (nds32_builtins): Likewise.
14248 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
14250 * config/nds32/nds32.c (nds32_init_machine_status,
14251 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
14252 strict_aligned_p field.
14253 (nds32_expand_to_rtl_hook): New function.
14254 (TARGET_EXPAND_TO_RTL_HOOK): Define.
14255 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
14257 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14258 Chung-Ju Wu <jasonwucj@gmail.com>
14260 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
14261 * config/nds32/nds32-n7.md: New file.
14262 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
14263 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
14265 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
14266 * config/nds32/nds32.md (pipeline_model): Add n7.
14267 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
14268 * config/nds32/pipelines.md: Include n7 settings.
14270 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14271 Chung-Ju Wu <jasonwucj@gmail.com>
14273 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
14274 * config/nds32/nds32-e8.md: New file.
14275 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
14276 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
14278 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
14279 * config/nds32/nds32.md (pipeline_model): Add e8.
14280 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
14281 * config/nds32/pipelines.md: Include e8 settings.
14283 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14284 Chung-Ju Wu <jasonwucj@gmail.com>
14286 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
14287 * config/nds32/nds32-n8.md: New file.
14288 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
14289 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
14291 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
14292 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
14293 * config/nds32/nds32.md (pipeline_model): Add n8.
14294 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
14295 * config/nds32/pipelines.md: Include n8 settings.
14297 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14298 Chung-Ju Wu <jasonwucj@gmail.com>
14300 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
14301 * config/nds32/nds32-n9-2r1w.md: New file.
14302 * config/nds32/nds32-n9-3r2w.md: New file.
14303 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
14304 nds32_register_ports): New or modify for cpu n9.
14305 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
14307 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
14308 * config/nds32/nds32-utils.c: New file.
14309 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
14310 TARGET_MUL_SLOW): Define.
14311 * config/nds32/nds32.md (pipeline_model): New attribute.
14312 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
14313 New options that support cpu n9.
14314 * config/nds32/pipelines.md: Include n9 settings.
14315 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
14317 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
14319 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
14320 information if necessary.
14321 (output_cond_branch_compare_zero): Likewise.
14322 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
14323 (nds32_target_alignment): Refine for alignment.
14324 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
14325 (FUNCTION_BOUNDARY): Modify.
14326 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
14328 * config/nds32/nds32.opt (malways-align, malign-functions): New.
14330 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
14332 * config/nds32/constants.md (unspec_volatile_element): Add values for
14333 TLB operation and data prefetch.
14334 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
14335 functions for TLB operation and data prefetch.
14336 * config/nds32/nds32-intrinsic.md: Likewise.
14337 * config/nds32/nds32_intrinsic.h: Likewise.
14338 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
14339 (nds32_print_operand): Likewise.
14340 * config/nds32/nds32.h (nds32_builtins): Likewise.
14342 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
14343 Andrew Pinski <pinsika@gcc.gnu.org>
14345 PR middle-end/82976
14346 * match.pd: Use constant_boolean_node of correct type instead of
14347 boolean_true_node or boolean_false_node for simplifying
14348 pointer comparisons to zero.
14350 2018-04-07 Jakub Jelinek <jakub@redhat.com>
14352 PR tree-optimization/80021
14353 * tree.c (verify_type_variant): Make error call in verify_variant_match
14354 translatable and remove final full stop.
14356 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14358 * config/nds32/constants.md (unspec_volatile_element): Add
14359 UNSPEC_VOLATILE_EH_RETURN.
14360 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
14361 nds32_output_stack_pop): Support dwarf exception handling process.
14362 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
14363 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
14364 exception handling process.
14365 (nds32_compute_stack_frame): Likewise.
14366 (nds32_return_addr_rtx): Likewise.
14367 (nds32_initial_elimination_offset): Likewise.
14368 (nds32_expand_prologue): Likewise.
14369 (nds32_expand_epilogue): Likewise.
14370 (nds32_dynamic_chain_address): New function.
14371 * config/nds32/nds32.h (machine_function): Add fields for dwarf
14372 exception handling.
14373 (DYNAMIC_CHAIN_ADDRESS): Define.
14374 (EH_RETURN_DATA_REGNO): Define.
14375 (EH_RETURN_STACKADJ_RTX): Define.
14376 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
14377 patterns for dwarf exception handling.
14379 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14381 * config/nds32/nds32.h: Clean up obsolete macros.
14383 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14385 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
14386 Add enum values for particular instructions.
14387 * config/nds32/nds32-intrinsic.c: Implementation of expanding
14388 particular intrinsic functions.
14389 * config/nds32/nds32-intrinsic.md: Likewise.
14390 * config/nds32/nds32_intrinsic.h: Likewise.
14391 * config/nds32/nds32.h (nds32_builtins): Likewise.
14392 * config/nds32/nds32.md (type): Add pbsad and pbsada.
14393 (btst, ave): New patterns for particular instructions.
14395 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14397 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
14398 Add enum values for atomic load/store and memory sync.
14399 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
14401 * config/nds32/nds32-intrinsic.md: Likewise.
14402 * config/nds32/nds32_intrinsic.h: Likewise.
14403 * config/nds32/nds32.h (nds32_builtins): Likewise.
14405 2018-04-07 Jakub Jelinek <jakub@redhat.com>
14407 PR tree-optimization/85257
14408 * fold-const.c (native_encode_vector): If not all elts could fit
14409 and off is -1, return 0 rather than offset.
14410 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
14411 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
14412 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
14413 adjust buffer in native_interpret_expr call.
14415 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14417 * config/nds32/constants.md (unspec_volatile_element): Add cache
14418 control enum values.
14419 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
14420 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
14421 * config/nds32/nds32.c (nds32_cctl_names): New.
14422 (nds32_print_operand): Handle cache control register names.
14423 * config/nds32/nds32.h (nds32_builtins): New enum values.
14424 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
14426 * config/nds32/nds32.md (type): Add mmu.
14427 * config/nds32/pipelines.md (simple_insn): Add mmu.
14429 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14431 * config/nds32/nds32.md (type): Remove call.
14432 * config/nds32/pipelines.md (simple_insn): Likewise.
14434 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14436 * config/nds32/constants.md (unspec_volatile_element): Add
14437 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
14438 UNSPEC_VOLATILE_FMFCFG.
14439 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
14440 description for fmfcfg and fmfcsr.
14441 (bdesc_1arg): Add fmtcsr.
14442 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
14443 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
14444 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
14445 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
14446 unspec_fmfcfg): New patterns.
14447 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
14448 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
14449 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
14450 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
14451 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
14452 __nds32__fmfcfg): Define.
14454 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14456 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
14457 intrinsic register names.
14458 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
14459 intrinsic register enum values and macros.
14461 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14463 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
14464 for load/store addressing form.
14465 (nds32_print_operand_address): Likewise.
14467 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
14470 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
14471 based on LABEL_REF. Remove useless assertion.
14472 (pic_address_needs_scratch): Fix formatting.
14473 (sparc_legitimize_pic_address): Minor tweaks.
14474 (sparc_delegitimize_address): Adjust assertion accordingly.
14475 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
14476 into symbolic_operand.
14477 (movsi_high_pic_label_ref): Likewise.
14478 (movsi_lo_sum_pic_label_ref): Likewise.
14479 (movdi_pic_label_ref): Likewise.
14480 (movdi_high_pic_label_ref): Likewise.
14481 (movdi_lo_sum_pic_label_ref): Likewise.
14483 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
14485 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
14486 custom LIB_SPEC setup.
14488 2018-04-06 Ruslan Bukin <br@bsdpad.com>
14489 Kito Cheng <kito.cheng@gmail.com>
14491 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
14492 * config/riscv/freebsd.h: New.
14494 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
14496 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
14497 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
14500 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
14501 Kito Cheng <kito.cheng@gmail.com>
14503 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
14504 nds32_output_call, nds32_symbol_binds_local_p): New functions.
14505 * config/nds32/nds32-protos.h (nds32_output_call,
14506 nds32_output_return): Declare.
14507 * config/nds32/nds32.md: Refine all the call and return patterns.
14509 2018-04-06 Jakub Jelinek <jakub@redhat.com>
14512 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
14513 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
14515 PR rtl-optimization/84872
14516 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
14517 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
14518 EDGE_CROSSING edge.
14520 2018-04-06 Tamar Christina <tamar.christina@arm.com>
14522 * expr.c (copy_blkmode_to_reg): Revert 254862.
14523 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
14525 2018-04-06 Richard Biener <rguenther@suse.de>
14527 PR middle-end/85244
14528 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
14529 after seeing a component reference with an adjacent field. Treat
14530 refs to arrays at struct end of external decls similar to
14531 refs to unconstrained commons.
14533 2018-04-06 Jakub Jelinek <jakub@redhat.com>
14536 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
14537 look through SAVE_EXPRs with non-side-effects argument. Adjust
14539 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
14542 2018-04-06 Richard Biener <rguenther@suse.de>
14544 PR middle-end/85180
14545 * alias.c (find_base_term): New wrapper around find_base_term
14546 unwinding CSELIB_VAL_PTR changes.
14547 (find_base_term): Do not restore CSELIB_VAL_PTR during the
14550 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14552 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
14554 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
14555 constant definitions.
14556 ("nop"): lr 0,0 -> nopr r0
14557 ("nop_lr0", "nop_lr1"): New insn definitions.
14559 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
14561 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
14562 NDS32_V3PUSH_AVAILABLE_P macro.
14564 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
14565 Chung-Ju Wu <jasonwucj@gmail.com>
14567 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
14568 (nds32*-*-*): Add float and fpu_config into supported_defaults.
14569 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
14570 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
14571 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
14572 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
14573 * config/nds32/constraints.md: New constraints and checking for hard
14574 float configuration.
14575 * config/nds32/iterators.md: New mode iterator and attribute for hard
14576 float configuration.
14577 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
14579 * config/nds32/nds32-fpu.md: New file.
14580 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
14581 deal with hard float code generation.
14582 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
14584 (abi_type, float_reg_number): New enum type.
14585 * config/nds32/nds32-predicates.c: New predicates for hard float.
14586 * config/nds32/nds32-protos.h: Declare functions for hard float.
14587 * config/nds32/nds32.c: Implementation for hard float configuration.
14588 * config/nds32/nds32.h: Definitions for hard float configuration.
14589 * config/nds32/nds32.md: Include hard float machine description and
14590 modify patterns for hard float configuration.
14591 * config/nds32/nds32.opt: New options for hard float configuration.
14592 * config/nds32/predicates.md: New predicates for hard float
14595 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
14597 * common/config/nds32/nds32-common.c
14598 (nds32_option_optimization_table): Enable -mreleax-hint by default.
14600 2018-04-05 Jakub Jelinek <jakub@redhat.com>
14602 PR middle-end/85195
14603 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
14604 CONSTRUCTOR_ELT (ctor, ...)->value.
14606 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
14609 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
14611 2018-04-05 Tom de Vries <tom@codesourcery.com>
14614 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
14617 2018-04-05 Shiva Chen <shiva0217@gmail.com>
14618 Kito Cheng <kito.cheng@gmail.com>
14620 * config/nds32/constraints.md (U33): Fine-tune checking condition.
14621 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
14622 * config/nds32/nds32.h (nds32_16bit_address_type): Add
14623 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
14625 2018-04-05 Shiva Chen <shiva0217@gmail.com>
14626 Kito Cheng <kito.cheng@gmail.com>
14628 * config/nds32/constraints.md (Ufe): New memory constraint.
14629 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
14630 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
14631 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
14633 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
14634 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
14636 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14638 * config/nds32/nds32.md: Use optimize_size in the condition for
14639 alu-shift instructions.
14641 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14643 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
14645 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14647 * config/nds32/nds32.md (negsi2): Refine pattern.
14649 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
14650 Chung-Ju Wu <jasonwucj@gmail.com>
14652 * config/nds32/iterators.md (shift_rotate): New code iterator.
14653 (shift): New code attribute.
14654 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
14655 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
14656 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
14657 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
14658 bit-wise operations.
14659 (andsi3, *andsi3): Ditto.
14660 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
14661 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
14662 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
14663 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
14664 nds32_ior_operand, nds32_xor_operand): New predicates.
14666 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14668 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
14669 (addsi3, subsi3): ... this.
14671 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14673 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
14675 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14677 * config/nds32/nds32.md: Adjust indention.
14679 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
14681 * config/nds32/nds32.md (feature): New attribute.
14683 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14685 * config/nds32/nds32.md (subtype): New attribute.
14687 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
14690 * config/arm/arm-builtins.c (arm_expand_builtin): Change
14691 expansion to perform a bitwise AND of the argument followed by a
14692 boolean negation of the result.
14694 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
14696 PR rtl-optimization/84878
14697 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
14698 the basic block. Assert the use reference is not artificial and that
14699 it has an associated insn.
14701 2018-04-04 Michael Matz <matz@suse.de>
14703 * builtins.c (compute_objsize): Pass correct operand
14704 to array_at_struct_end_p.
14706 2018-04-04 Richard Biener <rguenther@suse.de>
14709 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
14710 from contexts for DINFO_LEVEL_TERSE and below.
14712 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
14714 * config/nds32/nds32-doubleword.md (move_<mode>): Require
14715 resiter_operand condition.
14716 * config/nds32/nds32.md (*move<mode>): Ditto.
14718 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
14719 Monk Chiang <sh.chiang04@gmail.com>
14721 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
14723 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14725 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
14727 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14728 Kito Cheng <kito.cheng@gmail.com>
14730 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
14731 nds32_cond_code_str, output_cond_branch,
14732 output_cond_branch_compare_zero, nds32_expand_cbranch,
14733 nds32_expand_cstore, nds32_expand_movcc,
14734 nds32_output_cbranchsi4_equality_zero,
14735 nds32_output_cbranchsi4_equality_reg,
14736 nds32_output_cbranchsi4_equality_reg_or_const_int,
14737 nds32_output_cbranchsi4_greater_less_zero: New functions.
14738 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
14739 nds32_expand_cstore, nds32_expand_movcc,
14740 nds32_output_cbranchsi4_equality_zero,
14741 nds32_output_cbranchsi4_equality_reg,
14742 nds32_output_cbranchsi4_equality_reg_or_const_int,
14743 nds32_output_cbranchsi4_greater_less_zero): Declare.
14744 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
14745 nds32_rimm11s_operand): New predicates.
14746 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
14747 * config/nds32/nds32.md: Rewrite all the branch and conditional move
14750 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
14752 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
14753 * config/nds32/nds32.md: Ditto.
14754 * config/nds32/pipelines.md: Ditto.
14756 2018-04-04 Richard Biener <rguenther@suse.de>
14758 PR tree-optimization/85168
14759 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
14760 propagating abnormals.
14762 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14764 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
14766 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14767 Kito Cheng <kito.cheng@gmail.com>
14769 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
14770 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
14771 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
14772 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
14773 * config/nds32/nds32.md (sibcall_internal): New.
14774 (sibcall_register): Remove.
14775 (sibcall_immediate): Remove.
14776 (sibcall_value_internal): New.
14777 (sibcall_value_register): Remove.
14778 (sibcall_value_immediate): Remove.
14779 * config/nds32/predicates.md (nds32_general_register_operand): New.
14780 (nds32_call_address_operand): New.
14782 2018-04-03 Jakub Jelinek <jakub@redhat.com>
14784 PR rtl-optimization/85167
14785 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
14786 bb_defs if *split_p, instead preinitialize it to NULL.
14788 PR tree-optimization/85156
14789 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
14790 evaluating the argument multiple times.
14792 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
14794 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
14796 (_mm_cvtpd_ps): Likewise.
14797 (_mm_cvttpd_epi32): Likewise.
14798 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
14799 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
14800 vector, pixel, and bool following altivec.h include.
14802 2018-04-03 Martin Sebor <msebor@redhat.com>
14804 * doc/extend.texi (Common Function Attributes): Clarify.
14805 (const attribute): Likewise.
14806 (pure attribute): Likewise.
14808 2018-04-03 Jakub Jelinek <jakub@redhat.com>
14811 * config/i386/i386.c (ix86_expand_vector_set): Use
14812 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
14814 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
14816 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
14817 instructions when changing rounding bits to preserve precision bits
14818 in the x87 control word.
14820 2018-04-03 Martin Liska <mliska@suse.cz>
14822 PR tree-optimization/82491
14823 * rtl.h (strip_offset_and_add): Replace += suboffset with
14824 poly_uint64 () + suboffset.
14826 2018-03-29 Martin Liska <mliska@suse.cz>
14827 Martin Jambor <mjambor@suse.cz>
14830 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
14831 param_type is not an integral or pointer type.
14833 2018-04-03 Richard Biener <rguenther@suse.de>
14835 * sese.h (recompute_all_dominators): Remove.
14837 2018-04-02 Martin Sebor <msebor@redhat.com>
14839 * doc/invoke.texi (-Wrestrict): Fix typos.
14841 2018-04-02 Jim Wilson <jimw@sifive.com>
14843 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
14844 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
14845 (<optab>di3, <optab>si3_extend): Likewise.
14846 (<optab>si3_mask, <optab>si3_mask_1): New.
14847 (<optab>di3_mask, <optab>di3_mask_1): New.
14848 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
14849 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
14850 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
14852 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
14854 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
14857 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
14859 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
14860 (nds32_canonicalize_comparison): New function.
14862 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
14863 Kito Cheng <kito.cheng@gmail.com>
14864 Kuan-Lin Chen <kuanlinchentw@gmail.com>
14866 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
14867 * config/nds32/constants.md (unspec_volatile_element): Add
14868 UNSPEC_VOLATILE_RELAX_GROUP.
14869 * config/nds32/nds32-relax-opt.c: New file.
14870 * config/nds32/nds32-predicates.c
14871 (nds32_symbol_load_store_p): New function.
14872 * config/nds32/nds32-protos.h
14873 (nds32_symbol_load_store_p): Declare function.
14874 (make_pass_nds32_relax_opt): Declare new rtl pass function.
14875 * config/nds32/nds32.c
14876 (nds32_register_pass): New function to register pass.
14877 (nds32_register_passes): New function to register passes.
14878 * config/nds32/nds32.md (relax_group): New pattern.
14879 * config/nds32/nds32.opt (mrelax-hint): New option.
14880 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
14882 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
14884 * config/nds32/t-nds32: Modify files dependency.
14886 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
14888 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
14889 (PROFILE_HOOK): Define its implementation.
14891 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
14893 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
14894 type and 32-bit size.
14896 2018-04-01 Jakub Jelinek <jakub@redhat.com>
14898 PR middle-end/85090
14899 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
14900 (V_128_256): New mode iterator.
14901 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
14902 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
14903 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
14905 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
14906 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
14908 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
14911 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
14912 NaN inputs correctly.
14914 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
14917 * config/rs6000/vsx.md (??r): New mode attribute.
14918 (*vsx_mov<mode>_64bit): Use it.
14919 (*vsx_mov<mode>_32bit): Likewise.
14921 2018-03-30 Martin Sebor <msebor@redhat.com>
14923 PR tree-optimization/84818
14924 * builtins.c (check_access): Use warning_n.
14926 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
14929 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
14931 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
14934 2018-03-30 Julia Koval <julia.koval@intel.com>
14937 * x86-tune.def (movx, partial_reg_dependency): Enable for
14940 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
14942 PR inline-asm/84985
14943 * lra-constraints.c (process_alt_operands): Move setting
14944 this_alternative_matches below.
14946 2018-03-29 Martin Liska <mliska@suse.cz>
14949 * doc/invoke.texi: Document how LTO works with debug info.
14950 Describe auto-load support of binutils. Mention 'x86-64'
14951 as valid option value of -march option.
14953 2018-03-29 Jakub Jelinek <jakub@redhat.com>
14955 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
14958 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
14959 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
14960 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
14963 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
14966 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
14967 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
14968 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
14969 for RS6000_BTM_POWERPC64.
14970 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
14971 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
14972 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
14975 (DIVDEU): Likewise.
14977 2018-03-28 Carl Love <cel@us.ibm.com>
14980 2017-09-27 Carl Love <cel@us.ibm.com>
14982 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
14983 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
14984 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
14987 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14989 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
14990 instead of __vector bool.
14991 (_mm_max_pu8): Likewise.
14992 (_mm_min_pi16): Likewise.
14994 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
14997 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
14998 (DIVWEUO): Likewise.
14999 (DIVDEO): Likewise.
15000 (DIVDEUO): Likewise.
15001 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
15002 DIVWEUO and DIVDEUO.
15003 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
15004 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
15005 (div_extend): Likewise.
15006 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
15008 (__builtin_divweuo): Likewise.
15009 (__builtin_divdeo): Likewise.
15010 (__builtin_divdeuo): Likewise.
15012 2018-03-28 Jakub Jelinek <jakub@redhat.com>
15015 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
15016 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
15018 PR tree-optimization/82004
15019 * gimple-match-head.c (optimize_pow_to_exp): New function.
15020 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
15021 Don't fold to exp if optimize_pow_to_exp is false.
15023 2018-03-28 Martin Liska <mliska@suse.cz>
15026 * calls.c (initialize_argument_information): Fix trailing space.
15027 * common.opt: Fix typo and provide better explanation for
15028 -fsanitize-coverage option.
15029 * config/i386/i386.opt: Fix typo.
15031 2018-03-28 Jakub Jelinek <jakub@redhat.com>
15032 Martin Liska <mliska@suse.cz>
15035 * gimplify.c (asan_poison_variable): Don't do the check for
15036 gimplify_omp_ctxp here.
15037 (gimplify_decl_expr): Do it here.
15038 (gimplify_target_expr): Likewise.
15040 2018-03-28 Martin Liska <mliska@suse.cz>
15043 * config/i386/i386.c (ix86_function_arg_advance): Do not call
15044 chkp_type_bounds_count if MPX is not enabled.
15046 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
15048 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
15050 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
15053 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
15054 function to create the function decl for complex long double
15055 multiply and divide for -mabi=ieeelongdouble.
15056 (init_float128_ieee): Call it.
15058 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
15061 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
15062 -fcf-protection=branch -mibt.
15063 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
15065 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
15068 * config/arm/arm.c (arm_valid_symbolic_address): Handle
15069 arm_word_relocations.
15071 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
15074 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
15075 extern array declarations.
15077 2018-03-27 Richard Biener <rguenther@suse.de>
15079 PR middle-end/84067
15080 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
15081 explicit single_use checks.
15083 2018-03-27 Richard Biener <rguenther@suse.de>
15085 PR tree-optimization/85082
15086 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
15089 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
15091 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
15092 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
15093 Turn on fasynchronous-unwind-tables and funwind-tables.
15095 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
15098 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
15099 (*bmi_blsr_<mode>_ccz): Ditto.
15101 2018-03-26 Tom de Vries <tom@codesourcery.com>
15103 PR tree-optimization/85063
15104 * omp-general.c (offloading_function_p): New function. Factor out
15106 * omp-offload.c (pass_omp_target_link::gate): ... here.
15107 * omp-general.h (offloading_function_p): Declare.
15108 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
15109 with attribute omp declare target for offloading functions.
15111 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
15113 PR tree-optimization/84005
15114 * tree-data-ref.h (get_base_for_alignment): Declare.
15115 * tree-data-ref.c (get_base_for_alignment_1): New function.
15116 (get_base_for_alignment): Likewise.
15117 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
15118 get_base_for_alignment to find a suitable base object, instead
15119 of always using drb->base_address.
15121 2018-03-23 Jakub Jelinek <jakub@redhat.com>
15123 PR inline-asm/85022
15124 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
15125 known size by default.
15127 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
15129 PR inline-asm/85030
15130 * lra-constraints.c (process_alt_operands): Don't match BLKmode
15131 and non BLKmode operands.
15133 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15136 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
15137 Clean up attributes.
15139 2018-03-23 Richard Biener <rguenther@suse.de>
15142 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
15143 we are going to emit early debug for LTO.
15145 2018-03-23 Jakub Jelinek <jakub@redhat.com>
15147 PR inline-asm/85034
15148 * function.c (match_asm_constraints_1): Don't optimize if input
15149 doesn't satisfy general_operand predicate for output's mode.
15151 PR inline-asm/85022
15152 * alias.c (write_dependence_p): Don't require for x_canonicalized
15153 non-VOIDmode if x has VOIDmode.
15156 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
15157 just don't try to optimize it rather than assert it never happens.
15159 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
15161 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
15162 macro expansions for definition of ST_INTERNAL_<mode> and
15163 LD_INTERNAL_<mode> builtins.
15164 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
15166 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
15168 (altivec_expand_st_builtin): Likewise.
15169 (altivec_expand_builtin): Remove calls to deleted functions.
15170 (rs6000_address_for_altivec): Delete this function.
15171 * config/rs6000/vector.md: Remove expands for
15172 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
15174 2018-03-22 Sudakshina Das <sudi.das@arm.com>
15177 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
15178 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
15179 re-computing once computed.
15180 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
15181 (arm_init_machine_status): Initialize
15182 machine->static_chain_stack_bytes.
15184 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
15187 * doc/extend.texi: Add four new prototypes for vec_ld.
15188 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
15189 definitions for more logical presentation.
15190 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
15191 entries for V1TI variants of __builtin_altivec_ld builtin.
15192 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
15193 handling of V1TI variant of LVX icode pattern.
15194 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
15195 (rs6000_gimple_fold_builtin): Likewise.
15196 (altivec_init_builtins): Add code to define
15197 __builtin_altivec_lvx_v1ti function.
15199 2018-03-22 Jakub Jelinek <jakub@redhat.com>
15201 PR inline-asm/84941
15202 * function.c (match_asm_constraints_1): Don't do the optimization
15203 if input isn't a REG, SUBREG, MEM or constant.
15205 2018-03-22 Tom de Vries <tom@codesourcery.com>
15207 PR tree-optimization/84956
15208 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
15209 bb_has_abnormal_pred.
15211 2018-03-22 Jakub Jelinek <jakub@redhat.com>
15214 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
15215 DECL_INITIAL (decl) to decl at the end.
15216 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
15217 adjust the comment.
15219 2018-03-21 Joseph Myers <joseph@codesourcery.com>
15221 * doc/extend.texi (__builtin_tgmath): Document when complex
15222 integer types are treated as _Complex _Float64.
15224 2018-03-21 Tom de Vries <tom@codesourcery.com>
15226 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
15228 2018-03-21 Jakub Jelinek <jakub@redhat.com>
15230 PR tree-optimization/84960
15231 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
15232 if it is ENTRY block, move them into single succ of ENTRY in that case.
15234 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
15236 PR tree-optimization/84811
15237 * poly-int.h (poly_span_traits): Remove the T3 parameter and
15238 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
15239 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
15240 (known_subrange_p): Update accordingly. Cast each value involved
15241 in the size comparison, rather than casting the result of the
15244 2018-03-21 Jakub Jelinek <jakub@redhat.com>
15246 PR tree-optimization/84982
15247 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
15248 by flipping the least significant bit rather than all bits from
15249 bitpos to bitpos + bitsize - 1.
15251 2018-03-21 Nathan Sidwell <nathan@acm.org>
15253 * doc/extend.texi (Deprecated Features): Remove mention of
15254 long-deleted deprecations.
15256 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15259 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
15260 * configure: Regenerate.
15262 2018-03-21 Tom de Vries <tom@codesourcery.com>
15264 PR tree-optimization/83126
15265 * tree-parloops.c (num_phis): New function.
15266 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
15268 2018-03-21 Nathan Sidwell <nathan@acm.org>
15270 * doc/extend.texi (Deprecated Features): Update deprecated flags,
15271 mention anon-struct/union members and trailing attributes.
15273 2018-03-21 Bin Cheng <bin.cheng@arm.com>
15275 PR tree-optimization/84969
15276 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
15277 builtin memset partitions if they set different rhs values.
15279 2018-03-21 Jakub Jelinek <jakub@redhat.com>
15281 PR rtl-optimization/84989
15282 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
15283 VEC_DUPLICATE with scalar result mode.
15285 2018-03-21 Martin Liska <mliska@suse.cz>
15288 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
15289 not intended return statement.
15291 2018-03-21 Martin Liska <mliska@suse.cz>
15294 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
15295 (chkp_find_bound_slots_1): Limit number of iterations.
15297 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
15300 * Minor grammar fixes for x86 options.
15302 2018-03-20 Jakub Jelinek <jakub@redhat.com>
15305 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
15306 holding REG_CFA_RESTORE notes, instead turn them into a USE.
15308 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
15311 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
15312 (altivec_lvx_<mode>_1op): Likewise.
15313 (altivec_stvx_<mode>_2op): Likewise.
15314 (altivec_stvx_<mode>_1op): Likewise.
15315 (altivec_lvx_<VM2:mode>): New define_expand.
15316 (altivec_stvx_<VM2:mode>): Likewise.
15317 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
15318 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
15319 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
15320 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
15321 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
15322 (rs6000_gen_lvx): Likewise.
15323 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
15324 (altivec_expand_stv_builtin): Likewise.
15325 (altivec_expand_builtin): Likewise.
15326 * config/rs6000/vector.md: Likewise.
15328 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15331 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
15334 2018-03-20 Richard Biener <rguenther@suse.de>
15337 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
15338 sign-conversions as zero, fall back to standard scalar_stmt
15341 2018-03-20 Martin Liska <mliska@suse.cz>
15344 * predict.c (rebuild_frequencies): Handle case when we have
15345 PROFILE_ABSENT, but flag_guess_branch_prob is false.
15347 2018-03-20 Jakub Jelinek <jakub@redhat.com>
15350 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
15351 flag_section_anchors.
15352 * varasm.c (use_blocks_for_decl_p): Remove hack for
15353 dw2_force_const_mem.
15356 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
15358 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
15359 be created, use lowpart_subreg of operands[0] rather than operands[0]
15361 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
15362 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
15363 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
15364 and n constraint instead of aarch64_shift_imm_di and Usd.
15365 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
15366 (*aarch64_<optab>_reg_minus<mode>3): ... this.
15368 2018-03-20 Sudakshina Das <sudi.das@arm.com>
15371 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
15372 to favor GPR over NEON registers.
15373 (<shift>di3_neon): Likewise.
15375 2018-03-20 Tom de Vries <tom@codesourcery.com>
15378 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
15379 (nvptx_process_pars): Emit bar.sync asap and alap.
15381 2018-03-20 Tom de Vries <tom@codesourcery.com>
15384 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
15385 seen_label if seen_label is already set.
15387 2018-03-20 Jakub Jelinek <jakub@redhat.com>
15390 * config/i386/i386.c (fold_builtin_cpu): For features above 31
15391 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
15392 Use 1U instead of 1. Formatting fixes.
15395 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
15396 instead of TREE_TYPE (s1) for the return value.
15398 2018-03-19 Jakub Jelinek <jakub@redhat.com>
15400 PR tree-optimization/84946
15401 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
15402 bitsize + bitsize in poly_uint64 rather than poly_int64.
15405 * dwarf2asm.c: Include fold-const.c.
15406 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
15407 of decl rather than decl itself.
15409 PR rtl-optimization/84643
15410 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
15412 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
15415 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
15416 calling assemble_variable.
15418 2018-03-19 Sudakshina Das <sudi.das@arm.com>
15421 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
15422 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
15424 2018-03-19 Jim Wilson <jimw@sifive.com>
15427 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
15428 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
15429 (riscv_first_stack_step): Likewise.
15430 (riscv_option_override): Use STACK_BOUNDARY instead of
15431 MIN_STACK_BOUNDARY.
15432 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
15433 MIN_STACK_BOUNDARY.
15434 (BIGGEST_ALIGNMENT): Set to 128.
15435 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
15436 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
15439 2018-03-19 Richard Biener <rguenther@suse.de>
15441 PR tree-optimization/84933
15442 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
15443 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
15445 2018-03-19 Richard Biener <rguenther@suse.de>
15447 PR tree-optimization/84859
15448 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
15449 (cond_if_else_store_replacement): Perform sinking operation on
15450 single-store BBs regardless of MAX_STORES_TO_SINK setting.
15451 Generalize what a BB with a single eligible store is.
15453 2018-03-19 Richard Biener <rguenther@suse.de>
15455 PR tree-optimization/84929
15456 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
15457 chrec_is_positive against non-chrec arg.
15459 2018-03-19 Tamar Christina <tamar.christina@arm.com>
15462 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
15464 2018-03-18 Martin Liska <mliska@suse.cz>
15466 PR rtl-optimization/84635
15467 * regrename.c (build_def_use): Use matches_mode only when
15470 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
15472 PR tree-optimization/84913
15473 * tree-vect-loop.c (vectorizable_reduction): Don't try to
15474 vectorize chains of COND_EXPRs.
15476 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
15478 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
15480 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
15482 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
15484 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
15486 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
15488 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
15489 Kito Cheng <kito.cheng@gmail.com>
15491 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
15492 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
15493 (nds32_adjust_reg_alloc_order): New function.
15494 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
15496 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
15498 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
15499 nds32_print_operand, nds32_print_operand_address): Use
15500 HOST_WIDE_INT_PRINT_DEC instead.
15502 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
15504 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
15506 2018-03-17 Jakub Jelinek <jakub@redhat.com>
15509 * config/i386/i386.c (initial_ix86_tune_features,
15510 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
15511 unsigned long long.
15512 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
15513 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
15514 rather than 1u << ix86_tune. Formatting fix.
15515 (ix86_option_override_internal): Change ix86_arch_mask from
15516 unsigned int to unsigned HOST_WIDE_INT, initialize to
15517 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
15518 (ix86_function_specific_restore): Likewise.
15520 2018-03-16 Jakub Jelinek <jakub@redhat.com>
15523 * postreload.c (reload_combine_recognize_pattern): Perform
15524 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
15525 truncate_int_for_mode the result for the destination's mode.
15528 * hsa-gen.c (mem_type_for_type): Fix comment typo.
15529 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
15531 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
15534 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
15537 * lra-assigns.c (lra_split_hard_reg_for): Don't use
15538 regno_allocno_class_array and sorted_pseudos.
15539 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
15540 insns where regno is used.
15542 2018-03-16 Martin Liska <mliska@suse.cz>
15545 * multiple_target.c (create_dispatcher_calls): Redirect
15546 reference in the symbol table.
15548 2018-03-16 Martin Liska <mliska@suse.cz>
15551 * multiple_target.c (create_dispatcher_calls): Redirect also
15554 2018-03-16 Jakub Jelinek <jakub@redhat.com>
15558 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
15559 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
15560 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
15562 2018-03-16 Julia Koval <julia.koval@intel.com>
15564 * doc/invoke.texi (Skylake Server): Add CLWB.
15565 Cannonlake): Remove CLWB.
15567 2018-03-16 Jakub Jelinek <jakub@redhat.com>
15569 PR tree-optimization/84841
15570 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
15572 (FLOAT_ONE_CONST_TYPE): Define.
15573 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
15574 (sort_by_operand_rank): Put entries with higher constant_type last
15575 rather than first to match comments.
15577 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
15579 * config/nios2/nios2.md (movsi_internal): Fix thinko in
15582 2018-03-15 Jakub Jelinek <jakub@redhat.com>
15585 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
15586 check and use address of target always.
15588 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
15591 * config/i386/i386.c (indirect_thunk_needed): Update comments.
15592 (indirect_thunk_bnd_needed): Likewise.
15593 (indirect_thunks_used): Likewise.
15594 (indirect_thunks_bnd_used): Likewise.
15595 (indirect_return_needed): New.
15596 (indirect_return_bnd_needed): Likewise.
15597 (output_indirect_thunk_function): Add a bool argument for
15599 (output_indirect_thunk_function): Don't generate alias for
15600 function return thunk.
15601 (ix86_code_end): Call output_indirect_thunk_function to generate
15602 function return thunks.
15603 (ix86_output_function_return): Set indirect_return_bnd_needed
15604 and indirect_return_needed instead of indirect_thunk_bnd_needed
15605 and indirect_thunk_needed.
15607 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
15609 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
15610 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
15611 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
15613 2018-03-15 David Malcolm <dmalcolm@redhat.com>
15614 Paul Hua <paul.hua.gm@gmail.com>
15617 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
15619 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
15621 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
15622 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
15623 resp. SFmode cases.
15625 2018-03-15 Tamar Christina <tamar.christina@arm.com>
15628 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
15629 instead of GET_MODE_SIZE when comparing Units.
15631 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
15634 * varasm.c (hash_section): Return an unchangeble hash value
15635 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
15636 Return !aarch64_can_use_per_function_literal_pools_p ().
15638 2018-03-15 Jakub Jelinek <jakub@redhat.com>
15641 * optabs.c (emit_conditional_move): Pass address of cmode's copy
15642 rather than address of cmode as last argument to prepare_cmp_insn.
15644 2018-03-15 Julia Koval <julia.koval@intel.com>
15646 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
15647 F_AVX512VNNI, F_AVX512BITALG): New.
15649 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
15652 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
15653 insn for floating-point loads and stores.
15655 2018-03-14 Carl Love <cel@us.ibm.com>
15657 * config/rs6000/rs6000-c.c: Add macro definitions for
15658 ALTIVEC_BUILTIN_VEC_PERMXOR.
15659 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
15660 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
15661 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
15662 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
15664 * config/doc/extend.texi: Add prototypes for vec_permxor.
15666 2018-03-14 David Malcolm <dmalcolm@redhat.com>
15669 * diagnostic-show-locus.c (class layout_point): Convert m_line
15670 from int to linenum_type.
15671 (line_span::comparator): Use linenum "compare" function when
15672 comparing line numbers.
15673 (test_line_span): New function.
15674 (layout_range::contains_point): Convert param "row" from int to
15676 (layout_range::intersects_line_p): Likewise.
15677 (layout::will_show_line_p): Likewise.
15678 (layout::print_source_line): Likewise.
15679 (layout::should_print_annotation_line_p): Likewise.
15680 (layout::print_annotation_line): Likewise.
15681 (layout::print_leading_fixits): Likewise.
15682 (layout::annotation_line_showed_range_p): Likewise.
15683 (struct line_corrections): Likewise for field m_row.
15684 (line_corrections::line_corrections): Likewise for param "row".
15685 (layout::print_trailing_fixits): Likewise.
15686 (layout::get_state_at_point): Likewise.
15687 (layout::get_x_bound_for_row): Likewise.
15688 (layout::print_line): Likewise.
15689 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
15690 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
15691 * input.c (selftest::test_linenum_comparisons): New function.
15692 (selftest::input_c_tests): Call it.
15693 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
15694 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
15695 * selftest.h (ASSERT_GT): New macro.
15696 (ASSERT_GT_AT): New macro.
15697 (ASSERT_LT): New macro.
15698 (ASSERT_LT_AT): New macro.
15700 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
15702 PR rtl-optimization/84780
15703 * combine.c (distribute_links): Don't make a link based on pc_rtx.
15705 2018-03-14 Martin Liska <mliska@suse.cz>
15707 * tree.c (record_node_allocation_statistics): Use
15708 get_stats_node_kind.
15709 (get_stats_node_kind): New function extracted from
15710 record_node_allocation_statistics.
15711 (free_node): Use get_stats_node_kind.
15713 2018-03-14 Richard Biener <rguenther@suse.de>
15715 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
15716 that the value-set of ANTIC_IN doesn't grow.
15719 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
15721 (BB_VISITED_WITH_VISITED_SUCCS): New define.
15722 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
15724 2018-03-14 Julia Koval <julia.koval@intel.com>
15726 * config.gcc (icelake-client, icelake-server): New.
15728 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
15729 (initial_ix86_arch_features): Ditto.
15730 (PTA_SKYLAKE): Add SGX.
15731 (PTA_ICELAKE): Remove.
15732 (PTA_ICELAKE_CLIENT): New.
15733 (PTA_ICELAKE_SERVER): New.
15734 (ix86_option_override_internal): Split up icelake on icelake client and
15736 (get_builtin_code_for_version): Ditto.
15737 (fold_builtin_cpu): Ditto.
15738 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
15739 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
15740 * config/i386/i386.h (processor_type): Ditto.
15741 * doc/invoke.texi: Ditto.
15743 2018-03-14 Jakub Jelinek <jakub@redhat.com>
15746 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
15747 INTEGER_CST offset, add it together with bitpos / 8 and
15748 sign extend based on POINTER_SIZE.
15752 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
15755 * config/i386/constraints.md (Yc): New register constraint.
15756 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
15757 Use Yc constraint for alternative 2 of operand 0. Remove
15758 preferred_for_speed attribute.
15760 2018-03-14 Richard Biener <rguenther@suse.de>
15762 PR tree-optimization/84830
15763 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
15764 with the old one to avoid oscillations.
15766 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
15769 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
15771 (assign_by_spills): Return a flag of reload assignment failure.
15772 Do not process the reload assignment failures. Do not spill other
15773 reload pseudos if they has the same reg class. Update n if
15775 (lra_assign): Add a return arg. Set up from the result of
15776 assign_by_spills call.
15777 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15778 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
15779 usage_insns if it is not NULL.
15780 (spill_hard_reg_in_range): New function.
15781 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15782 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15783 function prototypes.
15784 (lra_assign): Change prototype.
15785 * lra.c (lra): Add code to deal with fails by splitting hard reg
15788 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
15790 * config/riscv/riscv.opt (mrelax): New option.
15791 * config/riscv/riscv.c (riscv_file_start): Emit ".option
15792 "norelax" when riscv_mrelax is disabled.
15793 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
15795 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15798 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
15799 reassociation for int modes.
15801 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
15803 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
15804 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
15806 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
15807 * config/aarch64/aarch64-sve.md
15808 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
15809 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
15810 (*extend<mode><Vwide>2): Rename to...
15811 (aarch64_sve_extend<mode><Vwide>2): ...this.
15812 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
15813 renaming the old pattern to...
15814 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
15816 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
15817 define_expand, renaming the old pattern to...
15818 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
15819 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
15820 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
15821 account when deciding which SVE instruction the optab should use.
15822 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
15824 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
15826 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
15827 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
15828 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
15829 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
15830 (tlsdesc_small_<mode>): Turn a define_expand and use
15831 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
15832 (tlsdesc_small_advsimd_<mode>): ...this.
15833 (tlsdesc_small_sve_<mode>): New pattern.
15835 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
15837 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
15838 (UNSPEC_UMUL_HIGHPART): New constants.
15839 (MUL_HIGHPART): New int iteraor.
15840 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
15841 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
15843 (*<su>mul<mode>3_highpart): New define_insn.
15845 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
15848 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
15851 2018-03-13 Martin Liska <mliska@suse.cz>
15854 * (sem_item_optimizer::sem_item_optimizer): Initialize new
15856 (sem_item_optimizer::~sem_item_optimizer): Release it.
15857 (sem_item_optimizer::merge_classes): Register variable aliases.
15858 (sem_item_optimizer::fixup_pt_set): New function.
15859 (sem_item_optimizer::fixup_points_to_sets): Likewise.
15860 * ipa-icf.h: Declare new variables and functions.
15862 2018-03-13 Jakub Jelinek <jakub@redhat.com>
15864 PR middle-end/84834
15865 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
15866 integer_pow2p@2 and test integer_pow2p in condition.
15867 (A < 0 ? C : 0): Similarly for @1.
15869 PR middle-end/84831
15870 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
15871 characters starting at p contain '\0' character, don't look beyond
15875 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
15876 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
15879 * reg-stack.c (change_stack): Change update_end var from int to
15880 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
15881 also call set_block_for_insn on the newly added insns and rescan.
15884 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
15885 on the last operand.
15888 * tree.c (stabilize_reference_1): Return save_expr (e) for
15889 STATEMENT_LIST even if it doesn't have side-effects.
15891 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
15893 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
15895 2018-03-12 Renlin Li <renlin.li@arm.com>
15897 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
15898 aarch64_output_scalar_simd_mov_immediate.
15900 2018-03-12 Martin Sebor <msebor@redhat.com>
15902 PR tree-optimization/83456
15903 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
15904 for perfectly overlapping calls to memcpy.
15905 (gimple_fold_builtin_memory_chk): Same.
15906 (gimple_fold_builtin_strcpy): Handle no-warning.
15907 (gimple_fold_builtin_stxcpy_chk): Same.
15908 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
15910 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
15912 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
15913 parameter. Use it for SFmode.
15914 (rs6000_function_arg_advance_1): Adjust.
15915 (rs6000_function_arg): Adjust.
15916 (rs6000_gimplify_va_arg): Pass false for that new parameter.
15918 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
15920 PR rtl-optimization/84169
15921 PR rtl-optimization/84780
15922 * combine.c (can_combine_p): Check for a 2-insn combination whether
15923 the destination register is used between the two insns, too.
15925 2018-03-12 Richard Biener <rguenther@suse.de>
15927 PR tree-optimization/84803
15928 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
15929 for refs DR analysis didn't process.
15931 2018-03-12 Richard Biener <rguenther@suse.de>
15933 PR tree-optimization/84777
15934 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
15935 force-vectorize loops ignore whether we are optimizing for size.
15937 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
15939 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
15940 (TARGET_MD_ASM_ADJUST): Define.
15942 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
15943 Kito Cheng <kito.cheng@gmail.com>
15944 Chung-Ju Wu <jasonwucj@gmail.com>
15946 * config/nds32/nds32.c (nds32_compute_stack_frame,
15947 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
15948 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
15949 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
15950 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
15951 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
15952 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
15953 * config/nds32/nds32.md (prologue, epilogue): Use macro
15954 NDS32_V3PUSH_AVAILABLE_P to do checking.
15956 2018-03-11 Jakub Jelinek <jakub@redhat.com>
15959 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
15960 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
15961 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
15962 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
15963 addition of most attributes on !orig_type_die or the attribute not
15964 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
15966 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
15967 Chung-Ju Wu <jasonwucj@gmail.com>
15969 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
15970 __NDS32_VH__ macro.
15971 * config/nds32/nds32.opt (mvh): New option.
15973 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
15974 Chung-Ju Wu <jasonwucj@gmail.com>
15976 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
15978 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
15979 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
15982 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
15983 Chung-Ju Wu <jasonwucj@gmail.com>
15985 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
15987 * config/nds32/nds32-multiple.md (strlensi): New pattern.
15988 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
15990 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
15991 Kito Cheng <kito.cheng@gmail.com>
15992 Chung-Ju Wu <jasonwucj@gmail.com>
15994 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
15995 UNSPEC_FFMISM and UNSPEC_FLMISM.
15996 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
15997 for ffb, ffmism and flmism.
15998 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
15999 (unspec_ffmism): Ditto.
16000 (unspec_flmism): Ditto.
16001 (nds32_expand_builtin_impl): Check if string extension is available.
16002 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
16003 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
16005 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
16008 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
16011 * lra-assigns.c (assign_by_spills): Return a flag of reload
16012 assignment failure. Do not process the reload assignment
16013 failures. Do not spill other reload pseudos if they has the same
16015 (lra_assign): Add a return arg. Set up from the result of
16016 assign_by_spills call.
16017 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16018 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16019 usage_insns if it is not NULL.
16020 (spill_hard_reg_in_range): New function.
16021 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16022 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16023 function prototypes.
16024 (lra_assign): Change prototype.
16025 * lra.c (lra): Add code to deal with fails by splitting hard reg
16028 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
16031 * config/i386/i386.opt: Replace Enforcment with Enforcement.
16033 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
16036 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
16037 (dw_val_node): Add val_symbolic_view.
16038 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
16039 (symview_upper_bound): New.
16040 (new_line_info_table): Initialize symviews_since_reset.
16041 (dwarf2out_source_line): Count symviews_since_reset and set
16042 symview_upper_bound.
16043 (dw_val_equal_p): Handle symview.
16044 (add_AT_symview): New.
16045 (print_dw_val): Handle symview.
16046 (attr_checksum, attr_checksum_ordered): Likewise.
16047 (same_dw_val_p, size_of_die): Likewise.
16048 (value_format, output_die): Likewise.
16049 (add_high_low_attributes): Use add_AT_symview for entry_view.
16050 (dwarf2out_finish): Reset symview_upper_bound, clear
16053 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
16056 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
16057 Add strict argument and use it.
16058 (rs6000_split_multireg_move): Update for new strict argument.
16059 (mem_operand_gpr): Disallow all non-offsettable addresses.
16060 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
16062 2018-03-09 Jakub Jelinek <jakub@redhat.com>
16065 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
16066 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
16067 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
16070 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
16071 decl, use remap_type if we want to use the type.
16073 2018-03-09 Martin Sebor <msebor@redhat.com>
16075 PR tree-optimization/84526
16076 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16078 (builtin_access::generic_overlap): Be prepared to handle non-array
16081 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
16083 PR rtl-optimization/84682
16084 * lra-constraints.c (process_address_1): Check is_address flag
16085 for address constraints.
16086 (process_alt_operands): Likewise.
16087 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
16088 preprocess_constraints.
16089 * recog.h (preprocess_constraints): Add oploc parameter.
16091 * recog.c (preprocess_constraints): Test address_operand for
16092 CT_ADDRESS constraints.
16094 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
16097 * lra-assigns.c (assign_by_spills): Return a flag of reload
16098 assignment failure. Do not process the reload assignment
16099 failures. Do not spill other reload pseudos if they has the same
16101 (lra_assign): Add a return arg. Set up from the result of
16102 assign_by_spills call.
16103 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16104 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16105 usage_insns if it is not NULL.
16106 (spill_hard_reg_in_range): New function.
16107 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16108 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16109 function prototypes.
16110 (lra_assign): Change prototype.
16111 * lra.c (lra): Add code to deal with fails by splitting hard reg
16114 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16117 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
16118 Accept complain bool parameter. Only emit errors if it is true.
16119 (arm_parse_cpu_option_name): Likewise.
16120 (arm_target_thumb_only): Adjust callers of the above.
16121 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
16122 prototype to take a default true bool parameter.
16123 (arm_parse_arch_option_name): Likewise.
16125 2018-03-09 David Malcolm <dmalcolm@redhat.com>
16126 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
16130 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
16131 * configure: Regenerate.
16132 * configure.ac ("linker --version-script option"): New.
16133 ("linker soname option"): New.
16135 2018-03-09 Richard Biener <rguenther@suse.de>
16137 PR tree-optimization/84775
16138 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
16139 immediate uses of predicate stmts and mark them modified.
16142 PR tree-optimization/84178
16143 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
16145 (version_loop_for_if_conversion): Delay update_ssa call.
16146 (tree_if_conversion): Delay update_ssa until after predicate
16149 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
16152 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
16153 when the function accesses prior frames.
16155 2018-03-08 Jakub Jelinek <jakub@redhat.com>
16158 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
16159 gen_llsym, otherwise call maybe_gen_llsym.
16161 PR inline-asm/84742
16162 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
16163 has ',' character inside of it.
16165 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16168 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
16169 as clobbering CC_REGNUM.
16171 2018-03-08 Richard Biener <rguenther@suse.de>
16173 PR middle-end/84552
16174 * tree-scalar-evolution.c: Include tree-into-ssa.h.
16175 (follow_copies_to_constant): Do not follow SSA names registered
16178 2018-03-08 Richard Biener <rguenther@suse.de>
16180 PR tree-optimization/84178
16181 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
16183 (version_loop_for_if_conversion): Delay update_ssa call.
16184 (tree_if_conversion): Delay update_ssa until after predicate
16187 2018-03-08 David Malcolm <dmalcolm@redhat.com>
16189 PR tree-optimization/84178
16190 * tree-if-conv.c (release_bb_predicate): Remove the
16191 the assertion that the stmts have NULL use_ops.
16192 Discard the statements, asserting that they haven't
16193 yet been added to a BB.
16195 2018-03-08 Richard Biener <rguenther@suse.de>
16197 PR tree-optimization/84746
16198 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
16199 (phi_translate): Pass in destination ANTIC_OUT set.
16200 (phi_translate_1): Likewise. For a simplified result lookup
16201 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
16202 (phi_translate_set): Adjust.
16203 (do_pre_regular_insertion): Likewise.
16204 (do_pre_partial_partial_insertion): Likewise.
16206 2018-03-08 Martin Liska <mliska@suse.cz>
16208 PR gcov-profile/84735
16209 * doc/gcov.texi: Document usage of profile files.
16210 * gcov-io.h: Document changes in the format.
16212 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
16216 * dwarf2out.c (struct dw_line_info_table): Update comments for
16218 (FORCE_RESET_NEXT_VIEW): New.
16219 (FORCE_RESETTING_VIEW_P): New.
16220 (RESETTING_VIEW_P): Check for -1 too.
16221 (ZERO_VIEW_P): Likewise.
16222 (new_line_info_table): Force-reset next view.
16223 (dwarf2out_begin_function): Likewise.
16224 (dwarf2out_source_line): Simplify zero_view_p initialization.
16225 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
16226 view directly. Omit view when omitting .loc at line 0.
16228 2018-03-08 Jakub Jelinek <jakub@redhat.com>
16230 PR tree-optimization/84740
16231 * tree-switch-conversion.c (process_switch): Call build_constructors
16232 only if info.phi_count is non-zero.
16234 PR tree-optimization/84739
16235 * tree-tailcall.c (find_tail_calls): Check call arguments against
16236 DECL_ARGUMENTS (current_function_decl) rather than
16237 DECL_ARGUMENTS (func) when checking for tail recursion.
16239 2018-03-07 Jakub Jelinek <jakub@redhat.com>
16241 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
16242 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
16243 Volker Reichelt's entry and add entries for people that perform
16244 GCC fuzzy testing and report numerous bugs.
16246 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
16249 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
16250 readonly data in sdata, if that is disabled.
16251 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
16252 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
16253 -mreadonly-in-sdata option.
16255 2018-03-07 Martin Sebor <msebor@redhat.com>
16257 PR tree-optimization/84468
16258 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
16259 basic block when looking for nul assignment.
16261 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
16264 * except.h (output_function_exception_table): Adjust prototype.
16265 * except.c (output_function_exception_table): Remove FNNAME parameter
16266 and add SECTION parameter. Ouput one part of the table at a time.
16267 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
16268 the first part of the exception table and emit unwind directives.
16269 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
16270 (i386_pe_seh_cold_init): Likewise.
16271 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
16272 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
16273 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
16274 (ix86_output_call_insn): Emit a nop in one more case for SEH.
16275 * config/i386/winnt.c: Include except.h.
16276 (struct seh_frame_state): Add reg_offset, after_prologue and
16277 in_cold_section fields.
16278 (i386_pe_seh_end_prologue): Set seh->after_prologue.
16279 (i386_pe_seh_cold_init): New function.
16280 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
16281 to seh->in_cold_section.
16282 (seh_emit_push): Record the offset of the push.
16283 (seh_emit_save): Record the offet of the save.
16284 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
16285 Test seh->after_prologue to disregard the epilogue.
16286 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
16287 (i386_pe_end_cold_function): New function.
16289 2018-03-07 Jakub Jelinek <jakub@redhat.com>
16292 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
16293 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
16296 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
16298 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
16299 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
16301 PR middle-end/84723
16302 * multiple_target.c: Include tree-inline.h and intl.h.
16303 (expand_target_clones): Diagnose and fail if node->definition and
16304 !tree_versionable_function_p (node->decl).
16306 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
16308 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
16310 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
16311 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
16312 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
16314 2018-03-06 Jakub Jelinek <jakub@redhat.com>
16317 * combine.c (try_combine): Use reg_or_subregno instead of handling
16318 just paradoxical SUBREGs and REGs.
16320 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
16322 * config/arc/arc.c (arc_finalize_pic): Remove function.
16323 (arc_must_save_register): We use single base PIC register, remove
16324 checks to save/restore the PIC register.
16325 (arc_expand_prologue): Likewise.
16326 * config/arc/arc-protos.h (arc_set_default_type_attributes):
16328 (arc_verify_short): Likewise.
16329 (arc_attr_type): Likewise.
16330 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
16331 (walk_stores): Likewise.
16332 (arc_address_cost): Make it static.
16333 (arc_verify_short): Likewise.
16334 (branch_dest): Likewise.
16335 (arc_attr_type): Likewise.
16336 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
16337 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
16338 (arc_final_prescan_insn): Remove inserting the nops due to
16339 hardware hazards. It is done in reorg step.
16340 (insn_length_variant_t): Remove.
16341 (insn_length_parameters_t): Likewise.
16342 (arc_insn_length_parameters): Likewise.
16343 (arc_get_insn_variants): Likewise.
16344 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
16346 2018-03-06 Jakub Jelinek <jakub@redhat.com>
16348 PR inline-asm/84683
16349 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
16352 PR tree-optimization/84687
16353 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
16355 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
16357 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16359 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
16360 Rename to ppc_speculation_barrier.
16361 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
16362 __builtin_ppc_speculation_barrier.
16364 2018-03-05 Jakub Jelinek <jakub@redhat.com>
16367 * combine.c (combine_simplify_rtx): Don't try to simplify if
16368 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
16371 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
16373 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
16374 to 32 bytes when compiling for POWER9.
16376 2018-03-05 Jakub Jelinek <jakub@redhat.com>
16379 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
16380 regparm >= 3 with no arg reg available also for calls with
16381 flag_force_indirect_call. Pass decl to ix86_function_regparm.
16384 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
16386 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
16388 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
16391 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
16393 2018-03-05 Richard Biener <rguenther@suse.de>
16395 PR tree-optimization/84486
16396 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
16397 When inserting a __builtin_assume_aligned call set the LHS
16398 SSA name alignment info accordingly.
16400 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
16402 PR tree-optimization/84114
16403 * config/aarch64/aarch64.c (aarch64_reassociation_width)
16404 Avoid reassociation of FLOAT_MODE addition.
16406 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
16408 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
16409 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
16410 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
16411 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
16412 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
16413 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
16414 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
16416 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
16417 __builtin_ia32_wbinvd): New builtins.
16418 (SPECIAL_ARGS2): New.
16419 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
16420 (SPECIAL_ARGS2): New.
16421 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
16422 (ix86_valid_target_attribute_inner_p): Ditto.
16423 (ix86_init_mmx_sse_builtins): Add special_args2.
16424 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
16425 TARGET_WBNOINVD_P): New.
16426 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
16427 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
16428 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
16429 * config/i386/immintrin.h (_wbinvd): New intrinsic.
16430 * config/i386/pconfigintrin.h: New file.
16431 * config/i386/wbnoinvdintrin.h: Ditto.
16432 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
16434 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
16436 2018-03-05 Richard Biener <rguenther@suse.de>
16438 PR tree-optimization/84670
16439 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16441 (BB_VISITED_WITH_VISITED_SUCCS): New define.
16442 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16443 (compute_antic_aux): Only assert the number of values in ANTIC_IN
16444 doesn't grow if all successors (recursively) were visited at least
16447 2018-03-05 Richard Biener <rguenther@suse.de>
16449 PR tree-optimization/84650
16450 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
16451 if executed in the loop pipeline.
16453 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
16455 * doc/configfiles.texi (Configuration Files): Move info about
16456 conditionalizing $target-protos.h to...
16457 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
16458 differs from $target-protos.h.
16460 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
16461 Chung-Ju Wu <jasonwucj@gmail.com>
16463 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
16464 * config/nds32/nds32-multiple.md (setmemsi): Define.
16465 * config/nds32/nds32-memory-manipulation.c
16466 (nds32_gen_dup_4_byte_to_word_value): New.
16467 (emit_setmem_word_loop): New.
16468 (emit_setmem_byte_loop): New.
16469 (nds32_expand_setmem_loop): New.
16470 (nds32_expand_setmem_loop_v3m): New.
16471 (nds32_expand_setmem_unroll): New.
16472 (nds32_expand_setmem): New.
16474 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
16475 Chung-Ju Wu <jasonwucj@gmail.com>
16477 * config/nds32/nds32-memory-manipulation.c
16478 (nds32_emit_load_store): New.
16479 (nds32_emit_post_inc_load_store): New.
16480 (nds32_emit_mem_move): New.
16481 (nds32_emit_mem_move_block): New.
16482 (nds32_expand_movmemsi_loop_unknown_size): New.
16483 (nds32_expand_movmemsi_loop_known_size): New.
16484 (nds32_expand_movmemsi_loop): New.
16485 (nds32_expand_movmemsi_unroll): New.
16486 (nds32_expand_movmemqi): Rename ...
16487 (nds32_expand_movmemsi): ... to this.
16488 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
16489 (movmemsi): ... to this.
16490 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
16491 (nds32_expand_movmemsi): ... to this.
16493 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
16494 Monk Chiang <sh.chiang04@gmail.com>
16495 Chung-Ju Wu <jasonwucj@gmail.com>
16497 * config/nds32/nds32-protos.h
16498 (nds32_expand_load_multiple): New arguments.
16499 (nds32_expand_store_multiple): Ditto.
16500 (nds32_valid_multiple_load_store): Rename ...
16501 (nds32_valid_multiple_load_store_p): ... to this.
16502 * config/nds32/nds32-memory-manipulation.c
16503 (nds32_expand_load_multiple): Refine implementation.
16504 (nds32_expand_store_multiple): Ditto.
16505 * config/nds32/nds32-multiple.md
16506 (load_multiple): Update nds32_expand_load_multiple interface.
16507 (store_multiple): Update nds32_expand_store_multiple interface.
16508 * config/nds32/nds32-predicates.c
16509 (nds32_valid_multiple_load_store): Rename ...
16510 (nds32_valid_multiple_load_store_p): ... to this and refine
16512 * config/nds32/predicates.md
16513 (nds32_load_multiple_and_update_address_operation): New predicate.
16514 (nds32_store_multiple_and_update_address_operation): New predicate.
16516 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
16517 Chung-Ju Wu <jasonwucj@gmail.com>
16519 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
16520 (combo): New attribute.
16521 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
16523 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
16525 * config/nds32/nds32.opt: Change -mcmodel= default value.
16527 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
16528 Monk Chiang <sh.chiang04@gmail.com>
16529 Chung-Ju Wu <jasonwucj@gmail.com>
16531 * config/nds32/constants.md (unspec_element): New enum.
16532 * config/nds32/constraints.md (Umw): New constraint.
16533 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
16534 * config/nds32/nds32-intrinsic.md: Likewise.
16535 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
16536 (nds32_valid_smw_lwm_base_p): New.
16537 (nds32_output_smw_single_word): New.
16538 (nds32_output_lmw_single_word): New.
16539 (nds32_expand_unaligned_load): New.
16540 (nds32_expand_unaligned_store): New.
16541 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
16542 (nds32_output_smw_single_word): Declare.
16543 (nds32_output_lmw_single_word): Declare.
16544 (nds32_expand_unaligned_load): Declare.
16545 (nds32_expand_unaligned_store): Declare.
16546 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
16547 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
16548 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
16549 NDS32_BUILTIN_UASTORE_DW.
16550 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
16553 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
16554 Kito Cheng <kito.cheng@gmail.com>
16555 Chung-Ju Wu <jasonwucj@gmail.com>
16557 * config/nds32/nds32-intrinsic.c
16558 (nds32_expand_builtin_null_ftype_reg): Delete.
16559 (nds32_expand_builtin_reg_ftype_imm): Ditto.
16560 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
16561 (nds32_read_argument): New.
16562 (nds32_legitimize_target): Ditto.
16563 (nds32_legitimize_argument): Ditto.
16564 (nds32_check_constant_argument): Ditto.
16565 (nds32_expand_unop_builtin): Ditto.
16566 (nds32_expand_unopimm_builtin): Ditto.
16567 (nds32_expand_binop_builtin): Ditto.
16568 (nds32_builtin_decl_impl): Ditto.
16569 (builtin_description): Ditto.
16570 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
16571 (nds32_init_builtins_impl): Ditto.
16572 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
16573 (nds32_builtin_decl): New.
16574 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
16575 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
16577 2018-03-02 Jeff Law <law@redhat.com>
16579 * reorg.c (stop_search_p): Handle DEBUG_INSN.
16580 (redundant_insn, fill_simple_delay_slots): Likewise.
16581 (fill_slots_from_thread): Likewise.
16582 * resource.c (mark_referenced_resources): Likewise.
16583 (mark_set_resources, find_dead_or_set_registers): Likewise.
16585 2018-03-02 Jakub Jelinek <jakub@redhat.com>
16587 * substring-locations.h (format_warning_va): Formatting fix for
16588 ATTRIBUTE_GCC_DIAG.
16589 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
16591 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
16592 * substring-locations.c: Include intl.h.
16593 (format_warning_va): Turned into small wrapper around
16594 format_warning_n_va, renamed to ...
16595 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
16596 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
16598 (format_warning_at_substring_n): New function.
16599 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
16600 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
16601 format_warning_at_substring with just a shorter name instead of
16602 const function pointer.
16603 (fmtwarn_n): New function.
16604 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
16605 appropriate, get rid of all the fmtstr temporaries, move conditionals
16606 with G_() wrapped string literals directly into fmtwarn arguments,
16607 cast dir.len to (int), formatting fixes.
16609 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
16611 * doc/invoke.texi: Remove "Cilk Plus" references.
16613 2018-03-02 Jakub Jelinek <jakub@redhat.com>
16614 Richard Biener <rguenther@suse.de>
16617 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
16618 for error or warning attributes if CALL_FROM_THUNK_P is set.
16621 2018-03-02 Jakub Jelinek <jakub@redhat.com>
16624 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
16625 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
16628 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
16629 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
16631 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
16632 instead of -1U in last predictors element's probability member.
16634 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
16637 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
16638 arguments if they are comparable.
16640 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
16642 PR tree-optimization/84634
16643 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
16644 masks and masked_loop_p with a single loop_masks, making sure it's
16645 null for bb vectorization.
16647 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
16649 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
16650 (vect_analyze_data_ref_access): Use loop->safe_len rather than
16651 loop->force_vectorize to check whether there is no alias.
16653 2018-03-02 Jakub Jelinek <jakub@redhat.com>
16656 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
16658 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
16660 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
16661 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
16662 instead of a loop around prev_real_insn.
16663 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
16666 PR inline-asm/84625
16667 * config/i386/i386.c (ix86_print_operand): Use conditional
16668 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
16671 2018-03-02 Richard Biener <rguenther@suse.de>
16673 PR tree-optimization/84427
16674 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
16675 (bitmap_set_subtract_values): Rewrite to handle multiple
16678 (prune_clobbered_mems): Likewise.
16679 (phi_translate): Take edge instead of pred/phiblock.
16680 (phi_translate_1): Likewise.
16681 (phi_translate_set): Likewise. Insert all translated
16682 exprs for a value into the set, keeping possibly multiple
16683 expressions per value.
16684 (compute_antic_aux): Adjust for phi_translate changes.
16685 When intersecting union the expressions and prune those
16686 not in the final value set, keeping possibly multiple
16687 expressions per value. Do not use value-insertion
16688 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
16689 all expressions. Add verification that the value-sets
16690 only shrink during iteration.
16691 (compute_partial_antic_aux): Adjust for the phi_translate changes.
16692 (do_pre_regular_insertion): Likewise.
16693 (do_pre_partial_partial_insertion): Likewise.
16695 2018-03-02 Richard Biener <rguenther@suse.de>
16698 * config/darwin.c (saved_debug_info_level): New static global.
16699 (darwin_asm_lto_start): Disable debug info generation for LTO out.
16700 (darwin_asm_lto_end): Restore debug info generation settings.
16702 2018-03-01 Martin Liska <mliska@suse.cz>
16705 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
16706 volatile arguments.
16708 2018-03-01 Richard Biener <rguenther@suse.de>
16711 * dwarf2out.c (gen_variable_die): Properly handle late VLA
16712 type annotation with LTO when debug was disabled at compile-time.
16714 2018-03-01 Matthew Fortune <mfortune@gmail.com>
16716 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
16718 (mips_final_postscan_insn): Likewise.
16720 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
16722 PR rtl-optimization/84528
16723 * alias.c (init_alias_target): Add commentary.
16724 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
16725 a unique base value if the frame pointer is not eliminated
16726 to the stack pointer.
16728 2018-03-01 Tom de Vries <tom@codesourcery.com>
16730 PR rtl-optimization/83327
16731 * lra-int.h (hard_regs_spilled_into): Declare.
16732 * lra.c (hard_regs_spilled_into): Define.
16733 (init_reg_info): Init hard_regs_spilled_into.
16734 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
16735 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
16736 (process_bb_lives): Handle hard_regs_spilled_into.
16737 (lra_create_live_ranges_1): Before doing liveness propagation, clear
16738 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
16740 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
16742 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
16743 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
16744 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
16745 * config/rs6000/aix72.h: New file.
16747 2018-02-28 Jakub Jelinek <jakub@redhat.com>
16749 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
16750 instead of warning_at with conditional singular and plural messages
16754 * stor-layout.c (update_alignment_for_field): For
16755 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
16756 && !DECL_PACKED (field), do the alignment update, just use
16757 only desired_align instead of MAX (type_align, desired_align)
16759 (place_field): Don't do known_align < desired_align handling
16760 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
16761 is non-NULL, instead do it after rli->prev_field handling and
16762 only if not within a bitfield word. For DECL_PACKED (field)
16763 use type_align of BITS_PER_UNIT.
16765 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
16767 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
16768 superfluous parentheses and trailing spaces.
16770 2018-02-28 Richard Biener <rguenther@suse.de>
16772 PR tree-optimization/84584
16773 * graphite-scop-detection.c (scop_detection::add_scop): Discard
16774 SCoPs with fake exit edge.
16776 2018-02-28 Martin Liska <mliska@suse.cz>
16779 * timevar.c (timer::print): Fix format to properly print 100%
16782 2018-02-28 Richard Biener <rguenther@suse.de>
16784 PR middle-end/84607
16785 * genmatch.c (capture_info::walk_match): Do not mark
16786 captured expressions without operands as expr_p given
16787 they act more like predicates and should be subject to
16788 "lost tail" side-effect preserving.
16790 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
16792 PR rtl-optimization/81611
16793 * auto-inc-dec.c (attempt_change): Move dead note from
16794 mem_insn if it's the next use of regno
16795 (find_address): Take address use of reg holding
16796 non-incremented value. Add parm to limit search to the named
16798 (merge_in_block): Attempt to use a mem insn that is the next
16799 use of the original regno.
16801 2018-02-27 Martin Sebor <msebor@redhat.com>
16804 * doc/invoke.texi (-Wmissing-attributes): New option.
16805 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
16807 2018-02-27 Martin Sebor <msebor@redhat.com>
16809 PR translation/84207
16810 * diagnostic-core.h (warning_n, error_n, inform_n): Change
16811 n argument to unsigned HOST_WIDE_INT.
16812 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
16813 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
16814 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
16815 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
16817 2018-02-27 Richard Biener <rguenther@suse.de>
16819 PR tree-optimization/84512
16820 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
16821 Do not use the estimate returned from record_stmt_cost for
16822 the scalar iteration cost but sum properly using add_stmt_cost.
16824 2018-02-27 Richard Biener <rguenther@suse.de>
16826 PR tree-optimization/84466
16827 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
16828 Adjust last change to less strictly validate use operands.
16830 2018-02-27 Martin Liska <mliska@suse.cz>
16832 PR gcov-profile/84548
16833 * gcov.c (process_file): Allow partial overlap and consider it
16834 also as group functions.
16835 (output_lines): Properly calculate range of lines for a group.
16837 2018-02-27 Martin Liska <mliska@suse.cz>
16839 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
16840 'ggc' suffixes. Change first column width.
16841 (timer::print): Fix formatting of the column.
16843 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
16845 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
16846 preserve inline entry blocks for the sake of debug inline
16847 entry point markers alone.
16848 (remove_unused_locals): Suggest in comments a better place to
16849 force the preservation of inline entry blocks that are
16850 otherwise unused, but do not preserve them.
16852 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
16854 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
16856 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
16859 * config/i386/constraints.md (Bs): Replace
16860 ix86_indirect_branch_register with
16861 TARGET_INDIRECT_BRANCH_REGISTER.
16863 * config/i386/i386.md (indirect_jump): Likewise.
16864 (tablejump): Likewise.
16865 (*sibcall_memory): Likewise.
16866 (*sibcall_value_memory): Likewise.
16867 Peepholes of indirect call and jump via memory: Likewise.
16868 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
16869 (*sibcall_value_GOT_32): Likewise.
16870 * config/i386/predicates.md (indirect_branch_operand): Likewise.
16871 (GOT_memory_operand): Likewise.
16872 (call_insn_operand): Likewise.
16873 (sibcall_insn_operand): Likewise.
16874 (GOT32_symbol_operand): Likewise.
16875 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
16877 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
16879 PR rtl-optimization/83496
16880 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
16881 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
16882 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
16883 redundant insn, if any.
16884 (relax_delay_slots): Likewise.
16885 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
16887 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
16889 PR tree-optimization/83965
16890 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
16891 that grouped statements are part of a reduction chain. Return
16892 true if the statement is not marked as a reduction itself but
16893 is part of a group.
16894 (vect_recog_dot_prod_pattern): Don't check whether the statement
16895 is part of a group here.
16896 (vect_recog_sad_pattern): Likewise.
16897 (vect_recog_widen_sum_pattern): Likewise.
16899 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
16902 * final.c (rest_of_clean_state): Also look for calls inside sequences.
16904 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
16907 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
16909 (ix86_output_indirect_function_return): New prototype.
16910 (ix86_split_simple_return_pop_internal): Likewise.
16911 * config/i386/i386.c (indirect_return_via_cx): New.
16912 (indirect_return_via_cx_bnd): Likewise.
16913 (indirect_thunk_name): Handle return va CX_REG.
16914 (output_indirect_thunk_function): Create alias for
16915 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
16916 (ix86_output_indirect_jmp): Remove the bool argument.
16917 (ix86_output_indirect_function_return): New function.
16918 (ix86_split_simple_return_pop_internal): Likewise.
16919 * config/i386/i386.md (*indirect_jump): Don't pass false
16920 to ix86_output_indirect_jmp.
16921 (*tablejump_1): Likewise.
16922 (simple_return_pop_internal): Change it to define_insn_and_split.
16923 Call ix86_split_simple_return_pop_internal to split it for
16924 -mfunction-return=.
16925 (simple_return_indirect_internal): Call
16926 ix86_output_indirect_function_return instead of
16927 ix86_output_indirect_jmp.
16929 2018-02-26 Jakub Jelinek <jakub@redhat.com>
16932 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
16933 memset and value initialization afterwards.
16935 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
16937 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
16939 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16942 * common/config/aarch64/aarch64-common.c
16943 (aarch_option_optimization_table[]): Switch
16944 off fomit-frame-pointer
16946 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
16947 Chung-Ju Wu <jasonwucj@gmail.com>
16949 * config/nds32/nds32-multiple.md (load_multiple): Disallow
16951 (store_multiple): Ditto.
16953 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
16955 * config.gcc: Add --with-cpu support for nds32 target.
16956 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
16957 * config/nds32/nds32.opt: Add -mcpu= option.
16959 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
16961 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
16962 isel=yes): Warn for these deprecated options.
16964 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
16966 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
16967 ISA_2_5_MASKS_EMBEDDED.
16969 2018-02-23 Jakub Jelinek <jakub@redhat.com>
16971 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
16972 p->max as pointers rather than using iterative_hash_expr.
16974 2018-02-23 Carl Love <cel@us.ibm.com>
16976 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
16977 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
16979 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
16980 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
16981 P8V_BUILTIN_VEC_VUNSIGNED2.
16983 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
16986 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
16987 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
16989 * lra-constraints.c (curr_insn_transform): Set up
16990 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
16992 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
16993 * lra-eliminations.c (spill_pseudos): Ditto.
16994 (process_insn_for_elimination): Ditto.
16995 * lra-lives.c (reg_early_clobber_p): Use the new macros.
16996 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
16997 LRA_NON_CLOBBERED_ALT.
16999 2018-02-22 Martin Sebor <msebor@redhat.com>
17001 PR tree-optimization/84480
17002 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
17003 to maybe_diag_stxncpy_trunc. Call it.
17004 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
17005 from gimple_fold_builtin_strcpy. Print inlining stack.
17006 (handle_builtin_stxncpy): Print inlining stack.
17007 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
17009 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
17012 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
17013 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
17014 and -fcheck-pointer-bounds are used together.
17015 (indirect_thunk_prefix): New enum.
17016 (indirect_thunk_need_prefix): New function.
17017 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
17018 "_nt" instead of "_bnd" for NOTRACK prefix.
17019 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
17020 (output_indirect_thunk_function): Likewise.
17022 (ix86_code_end): Update output_indirect_thunk_function calls.
17023 (ix86_output_indirect_branch_via_reg): Replace
17024 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
17025 (ix86_output_indirect_branch_via_push): Likewise.
17026 (ix86_output_function_return): Likewise.
17027 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
17028 incompatible with -fcf-protection=branch and
17029 -fcheck-pointer-bounds.
17031 2018-02-22 Steve Ellcey <sellcey@cavium.com>
17034 * config/aarch64/aarch64.c (aarch64_print_address_internal):
17035 Change gcc_assert call to output_operand_lossage.
17037 2018-02-22 Steve Ellcey <sellcey@cavium.com>
17039 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
17041 2018-02-22 DJ Delorie <dj@redhat.com>
17042 Sebastian Perta <sebastian.perta@renesas.com>
17043 Oleg Endo <olegendo@gcc.gnu.org>
17045 * config/rx/rx.c (rx_rtx_costs): New function.
17046 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
17048 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
17050 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
17052 2018-02-22 Martin Liska <mliska@suse.cz>
17055 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
17056 Add "native" as a possible value.
17058 2018-02-22 Martin Liska <mliska@suse.cz>
17061 * config/i386/i386.c (ix86_option_override_internal):
17062 Add "native" as a possible value for -march and -mtune.
17064 2018-02-22 Jakub Jelinek <jakub@redhat.com>
17067 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
17068 to all type variants.
17070 PR tree-optimization/84503
17071 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
17072 width as info->bitpos + info->bitsize - start.
17073 (merged_store_group::merge_overlapping): Simplify width computation.
17074 (check_no_overlap): New function.
17075 (imm_store_chain_info::try_coalesce_bswap): Compute expected
17076 start + width and last_order of the group, fail if check_no_overlap
17078 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
17079 to group if check_no_overlap fails.
17081 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
17083 * config/rs6000/altivec.md: Delete contraint arguments to
17084 define_expand, define_split, and define_peephole2, and in
17085 define_insn_and_split if always unused.
17086 * config/rs6000/darwin.md: Ditto.
17087 * config/rs6000/dfp.md: Ditto.
17088 * config/rs6000/rs6000.md: Ditto.
17089 * config/rs6000/sync.md: Ditto.
17090 * config/rs6000/vector.md: Ditto.
17091 * config/rs6000/vsx.md: Ditto.
17093 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
17095 * config/rs6000/altivec.md: Write output control strings as braced
17096 blocks instead of double-quoted strings.
17097 * config/rs6000/darwin.md: Ditto.
17098 * config/rs6000/rs6000.md: Ditto.
17099 * config/rs6000/vector.md: Ditto.
17100 * config/rs6000/vsx.md: Ditto.
17102 2018-02-21 Jason Merrill <jason@redhat.com>
17104 PR c++/84314 - ICE with templates and fastcall attribute.
17105 * attribs.c (build_type_attribute_qual_variant): Remove assert.
17107 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
17109 * ipa-cp.c (determine_versionability): Fix comment typos.
17111 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
17114 * ipa-cp.c (determine_versionability): Do not version functions caling
17117 2018-02-21 Martin Liska <mliska@suse.cz>
17120 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
17121 Add "native" as a possible value.
17122 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
17123 the macro when native cpu detection is available.
17125 2018-02-21 Martin Liska <mliska@suse.cz>
17128 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
17129 Add "native" as a possible value.
17130 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
17131 when native cpu detection is available.
17133 2018-02-21 Jakub Jelinek <jakub@redhat.com>
17134 Martin Sebor <msebor@redhat.com>
17136 PR tree-optimization/84478
17137 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
17139 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
17140 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
17141 support which is conservatively correct, for 2 only stay conservative
17142 for maxlen. Formatting and comment capitalization fixes. Add STRICT
17143 argument to the 2 argument get_range_strlen, adjust 6 arg
17144 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
17146 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
17147 (gimple_fold_builtin_strlen): Pass true as last argument to
17150 2018-02-20 Martin Sebor <msebor@redhat.com>
17152 PR middle-end/84095
17153 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
17154 (builtin_memref::set_base_and_offset): Same. Handle inner references.
17155 (builtin_memref::builtin_memref): Factor out parts into
17156 set_base_and_offset and call it.
17158 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
17160 PR middle-end/84406
17161 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
17162 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
17163 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
17164 search at the associated MODE_INT.
17166 2018-02-20 Jeff Law <law@redhat.com>
17168 PR middle-end/82123
17169 PR tree-optimization/81592
17170 PR middle-end/79257
17171 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
17172 for range data rather than using global data.
17173 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
17174 range data rather than using global data.
17175 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
17176 pass it to children as needed.
17177 (struct directive::fmtresult): Similarly.
17178 (struct directive::set_width): Similarly.
17179 (struct directive::set_precision): Similarly.
17180 (format_integer, format_directive, parse_directive): Similarly.
17181 (format_none): Accept unnamed vr_values parameter.
17182 (format_percent, format_floating, format_character): Similarly.
17183 (format_string, format_plain): Similarly.
17184 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
17185 the EVRP range analyzer for range data rather than using global data.
17186 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
17187 gimple-ssa-evrp-analyze.h
17188 (class sprintf_dom_walker): Add after_dom_children member function.
17189 Add evrp_range_analyzer member.
17190 (sprintf_dom_walker::before_dom_children): Call into the EVRP
17191 range analyzer as needed.
17192 (sprintf_dom_walker::after_dom_children): New member function.
17193 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
17195 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
17196 (evrp_range_analyzer::pop_to_marker): Likewise.
17198 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
17200 PR tree-optimization/84419
17201 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
17202 with the required type if its current type is compatible but
17205 2018-02-20 Jakub Jelinek <jakub@redhat.com>
17207 PR middle-end/82004
17208 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
17209 after vectorization.
17211 2018-02-20 Martin Liska <mliska@suse.cz>
17214 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
17215 possible values if we don't have a hint.
17217 2018-02-20 Martin Liska <mliska@suse.cz>
17221 * final.c (shorten_branches): Build align_tab array with one
17223 * opts.c (finish_options): Add alignment option limit check.
17224 (MAX_CODE_ALIGN): Likewise.
17225 (MAX_CODE_ALIGN_VALUE): Likewise.
17226 * doc/invoke.texi: Document maximum allowed option value for
17227 all -falign-* options.
17229 2018-02-19 Jakub Jelinek <jakub@redhat.com>
17232 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
17233 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
17234 * var-tracking.c (emit_note_insn_var_location): Remove all references
17235 to NOTE_INSN_CALL_ARG_LOCATION.
17236 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
17237 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
17238 Use copy_rtx_if_shared.
17239 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
17240 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
17241 (dwarf2out_var_location): Remove handling of
17242 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
17244 * final.c (final_scan_insn): Remove all references to
17245 NOTE_INSN_CALL_ARG_LOCATION.
17246 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
17247 before dumping final insns.
17248 * except.c (emit_note_eh_region_end): Remove all references to
17249 NOTE_INSN_CALL_ARG_LOCATION.
17250 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
17251 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
17252 * config/arc/arc.c (hwloop_optimize): Likewise.
17253 * config/arm/arm.c (create_fix_barrier): Likewise.
17254 * config/s390/s390.c (s390_chunkify_start): Likewise.
17255 * config/sh/sh.c (find_barrier): Likewise.
17256 * config/i386/i386.c (rest_of_insert_endbranch,
17257 ix86_seh_fixup_eh_fallthru): Likewise.
17258 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
17259 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
17260 * config/frv/frv.c (frv_function_prologue): Likewise.
17261 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
17263 (note_outside_basic_block_p): Remove all references to
17264 NOTE_INSN_CALL_ARG_LOCATION.
17265 * gengtype.c (adjust_field_rtx_def): Likewise.
17266 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
17268 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
17269 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
17272 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
17275 PR tree-optimization/84452
17276 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
17277 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
17280 2018-02-19 Martin Liska <mliska@suse.cz>
17283 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
17285 2018-02-19 Martin Liska <mliska@suse.cz>
17286 Richard Sandiford <richard.sandiford@linaro.org>
17288 PR tree-optimization/82491
17289 * gimple-fold.c (get_base_constructor): Make earlier bail out
17292 2018-02-19 Carl Love <cel@us.ibm.com>
17294 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
17295 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
17297 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
17298 P8V_BUILTIN_VEC_NEG.
17300 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
17302 * config/rl78/rl78.md (movdf): New define expand.
17304 2018-02-19 Martin Liska <mliska@suse.cz>
17307 * doc/invoke.texi: Fix typo.
17308 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
17310 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
17312 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
17313 handle rs6000_single_float and rs6000_double_float specially for
17316 2018-02-16 Jeff Law <law@redhat.com>
17318 * config/rx/rx.c (add_pop_cfi_notes): New function.;
17319 (pop_regs): Use it.
17321 2018-02-16 Jakub Jelinek <jakub@redhat.com>
17324 * ipa-inline.c (inline_small_functions): Fix a typo.
17326 2018-02-16 Nathan Sidwell <nathan@acm.org>
17328 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
17330 2018-02-16 Carl Love <cel@us.ibm.com>
17332 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
17333 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
17334 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
17335 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
17336 expansion to P8V_BUILTIN_VEC_FLOAT2.
17338 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
17340 PR rtl-optimization/70023
17341 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
17342 src_regno into account.
17344 2018-02-16 Carl Love <cel@us.ibm.com>
17346 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
17347 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
17348 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
17349 * config/rs6000/rs6000.c: Remove case statements for
17350 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
17351 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
17352 and P9V_BUILTIN_VEC_VINSERT4B.
17353 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
17354 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
17355 * config/rs6000/vsx.md:
17356 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
17359 2018-02-16 Carl Love <cel@us.ibm.com>
17361 * config/rs6000/altivec.h: Add builtin names vec_extract4b
17363 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
17365 * config/rs6000/rs6000-c.c: Add the definitions for
17366 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
17367 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
17368 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
17369 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
17370 definition for insert4b and define insn *insert3b_internal.
17371 * doc/extend.texi: Add documentation for vec_extract4b.
17373 2018-02-16 Nathan Sidwell <nathan@acm.org>
17375 * doc/extend.texi (Backwards Compatibility): Mention friend
17376 injection. Note for-scope is deprecated.
17377 * doc/invoke.texi (-ffriend-injection): Deprecate.
17379 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
17381 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
17382 that moved to I2, also allow destinations that are a paradoxical
17383 subreg (instead of a normal reg).
17385 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
17388 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
17391 2018-02-16 Richard Biener <rguenther@suse.de>
17393 PR tree-optimization/84037
17394 PR tree-optimization/84016
17396 * config/i386/i386.c (ix86_builtin_vectorization_cost):
17397 Adjust vec_construct for the fact we need additional higher latency
17398 128bit inserts for AVX256 and AVX512 vector builds.
17399 (ix86_add_stmt_cost): Scale vector construction cost for
17402 2018-02-16 Richard Biener <rguenther@suse.de>
17404 PR tree-optimization/84417
17405 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
17406 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
17407 (non_rewritable_lvalue_p): Likewise, use poly-ints.
17409 2018-02-16 Martin Liska <mliska@suse.cz>
17412 * internal-fn.def (ASAN_CHECK): Set proper flags.
17413 (ASAN_MARK): Likewise.
17415 2018-02-16 Julia Koval <julia.koval@intel.com>
17417 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
17418 from PTA_CANNONLAKE.
17420 2018-02-16 Jakub Jelinek <jakub@redhat.com>
17423 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
17424 Use ++iter rather than iter++ for std::list iterators.
17425 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
17426 defer deleting them until all nodes in the forest are processed. Do
17427 free even leaf nodes. Change to_process into auto_vec.
17430 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
17431 * vec.h (vec_default_construct): Use memset instead of placement new
17432 if BROKEN_VALUE_INITIALIZATION is defined.
17433 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
17434 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
17437 PR rtl-optimization/83723
17438 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
17439 * lra.c (lra_substitute_pseudo): Likewise. If true, use
17440 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
17442 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
17444 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
17446 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
17448 PR rtl-optimization/81443
17449 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
17450 from inner REGs to paradoxical SUBREGs.
17452 2018-02-16 Richard Biener <rguenther@suse.de>
17454 PR tree-optimization/84399
17455 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17456 For operands we can analyze at their definition make sure we can
17457 analyze them at each use as well.
17459 2018-02-16 Richard Biener <rguenther@suse.de>
17461 PR tree-optimization/84190
17462 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
17463 volatile accesses if the decl isn't volatile.
17465 2018-02-15 Jason Merrill <jason@redhat.com>
17467 PR c++/84314 - ICE with templates and fastcall attribute.
17468 * attribs.c (build_type_attribute_qual_variant): Don't clobber
17469 TYPE_CANONICAL on an existing type.
17471 2018-02-15 Jakub Jelinek <jakub@redhat.com>
17473 PR tree-optimization/84383
17474 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
17475 dstoff nor call operand_equal_p if dstbase is NULL.
17477 PR tree-optimization/84334
17478 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
17479 also a CONSTANT_CLASS_P, punt.
17481 2018-02-14 Jim Wilson <jimw@sifive.com>
17483 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
17484 first SMALL_OPERAND check. New local min_second_step. Move assert
17485 to where locals are set. Add TARGET_RVC support.
17486 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
17488 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
17490 * doc/invoke.texi: Correct -Wformat-overflow code sample.
17492 2018-02-14 Martin Sebor <msebor@redhat.com>
17494 PR tree-optimization/83698
17495 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
17496 arrays constrain the offset range to their bounds.
17497 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
17498 (builtin_access::overlap): Avoid setting the size of overlap if it's
17500 (maybe_diag_overlap): Also consider arrays when deciding what values
17501 of offsets to include in diagnostics.
17503 2018-02-14 Martin Sebor <msebor@redhat.com>
17506 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
17507 that correspond to the kind of a declaration.
17509 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
17512 * config/pa/pa.md: Load address of PIC label using the linkage table
17513 if the label is nonlocal.
17515 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
17517 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
17518 warning message if user requests -maltivec=be.
17519 * doc/invoke.texi: Document deprecation of -maltivec=be.
17521 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
17524 * config/rs6000/rs6000-c.c: Update definitions for
17525 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
17526 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
17528 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
17531 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
17532 add _get_ssp intrinsics. Remove argument from
17533 __builtin_ia32_rdssp[d|q].
17534 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
17535 * config/i386/i386-builtin.def: Remove argument from
17536 __builtin_ia32_rdssp[d|q].
17537 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
17538 ix86_expand_special_args_builtin for _rdssp[d|q].
17539 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
17540 Clear register before usage.
17541 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
17542 Add documentation for new _get_ssp and _inc_ssp intrinsics.
17544 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
17546 PR tree-optimization/84357
17547 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
17548 operand 1 of an ARRAY_REF too.
17550 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
17553 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
17554 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
17556 (set_of_reg): New struct.
17557 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
17558 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
17559 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
17561 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
17562 Split into bitclr, bitset, bitinvert patterns if appropriate.
17563 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
17564 use rx_fuse_in_memory_bitop.
17565 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
17566 to named insn, correct maximum insn length.
17568 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
17571 * machmode.def: Define a complex mode for PARTIAL_INT.
17572 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
17574 * doc/rtl.texi: Document CSPImode.
17575 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
17577 (msp430_hard_regno_nregs_with_padding): Likewise.
17579 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
17582 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
17584 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
17586 PR rtl-optimization/84169
17587 * combine.c (try_combine): New variable split_i2i3. Set it to true if
17588 we generated a parallel as new i3 and we split that to new i2 and i3
17589 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
17590 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
17591 those to i2, not i1. Partially rewrite this scan code.
17593 2018-02-13 Jakub Jelinek <jakub@redhat.com>
17596 * stor-layout.c (place_field): For variable length fields, adjust
17597 offset_align afterwards not just based on the field's alignment,
17598 but also on the size.
17600 PR middle-end/84309
17601 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
17602 of exps and logs in the use_exp2 case.
17604 2018-02-13 Jeff Law <law@redhat.com>
17606 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
17607 entry for "vector".
17609 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
17612 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
17616 * common.opt (gas-loc-support, gas-locview-support): New.
17617 (ginline-points, ginternal-reset-location-views): New.
17618 * doc/invoke.texi: Document them. Use @itemx where intended.
17619 (gvariable-location-views): Adjust.
17620 * target.def (reset_location_view): New.
17621 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
17622 (TARGET_RESET_LOCATION_VIEW): New.
17623 * doc/tm.texi: Rebuilt.
17624 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
17625 (dwarf2out_default_as_locview_support): New.
17626 (output_asm_line_debug_info): Use option variables.
17627 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
17628 (output_loc_list): Likewise.
17629 (add_high_low_attributes): Check option variables.
17630 Don't output entry view attribute in strict mode.
17631 (gen_inlined_subroutine_die): Check option variables.
17632 (dwarf2out_inline_entry): Likewise.
17633 (init_sections_and_labels): Likewise.
17634 (dwarf2out_early_finish): Likewise.
17635 (maybe_reset_location_view): New, from...
17636 (dwarf2out_var_location): ... here. Call it.
17637 * debug.h (dwarf2out_default_as_loc_support): Declare.
17638 (dwarf2out_default_as_locview_support): Declare.
17639 * hooks.c (hook_int_rtx_insn_0): New.
17640 * hooks.h (hook_int_rtx_insn_0): Declare.
17641 * toplev.c (process_options): Take -gas-loc-support and
17642 -gas-locview-support from dwarf2out. Enable
17643 -gvariable-location-views by default only with locview
17644 assembler support. Enable -ginternal-reset-location-views by
17645 default only if the target defines the corresponding hook.
17646 Enable -ginline-points by default if location views are
17647 enabled; force it disabled if statement frontiers are
17649 * tree-inline.c (expand_call_inline): Check option variables.
17650 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
17652 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
17654 PR tree-optimization/84321
17655 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
17656 handling. Also check whether the anti-range contains any values
17657 that satisfy the mask; switch to a VR_RANGE if not.
17659 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
17662 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
17664 2018-02-13 Martin Jambor <mjambor@suse.cz>
17667 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
17668 of call statements, also set location of a load to a temporary.
17670 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
17672 * config/rl78/rl78.c (add_vector_labels): New function.
17673 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
17674 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
17675 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
17676 which checks that no arguments are passed.
17677 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
17678 * doc/extend.texi: Documentation for the new attribute.
17680 2018-02-13 Andreas Schwab <schwab@suse.de>
17682 * config/riscv/linux.h (CPP_SPEC): Define.
17684 2018-02-13 Jakub Jelinek <jakub@redhat.com>
17687 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
17688 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
17689 OPTION_MASK_ISA_AES as first argument to def_builtin_const
17690 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
17691 instead of OPTION_MASK_ISA_PCLMUL as first argument to
17692 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
17693 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
17694 temporarily for AES and PCLMUL builtins.
17696 PR tree-optimization/84339
17697 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
17698 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
17701 PR middle-end/84309
17702 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
17703 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
17704 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
17706 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
17708 * omp-simd-clone.h: New file.
17709 * omp-simd-clone.c: Include omp-simd-clone.h.
17710 (expand_simd_clones): No longer static.
17711 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
17712 cgraph.h and omp-simd-clone.h.
17713 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
17714 (vect_recog_widen_shift_pattern): Formatting fix.
17715 (vect_pattern_recog_1): Don't check optab for calls.
17718 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
17719 operands[2] into a REG before using gen_lowpart on it.
17721 2018-02-12 Jeff Law <law@redhat.com>
17724 * config/sh/sh.c (find_barrier): Consider a sibling call
17727 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
17728 successfully back substituting a reg.
17730 2018-02-12 Richard Biener <rguenther@suse.de>
17732 PR tree-optimization/84037
17733 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
17734 parameter, move visited init to caller.
17735 (vect_slp_analyze_operations): Separate cost from validity
17736 check, initialize visited once for all instances.
17737 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
17739 * tree-vect-stmts.c (vect_model_simple_cost): Make early
17741 (vect_model_promotion_demotion_cost): Likewise.
17742 (vectorizable_bswap): Guard cost modeling with !slp_node
17743 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
17745 (vectorizable_call): Likewise.
17746 (vectorizable_conversion): Likewise.
17747 (vectorizable_assignment): Likewise.
17748 (vectorizable_shift): Likewise.
17749 (vectorizable_operation): Likewise.
17750 (vectorizable_store): Likewise.
17751 (vectorizable_load): Likewise.
17752 (vectorizable_condition): Likewise.
17753 (vectorizable_comparison): Likewise.
17755 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
17758 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
17759 (ASAN_MARK): Fix fnspec to account for return value, change pointer
17760 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
17762 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
17764 PR middle-end/83665
17765 * params.def (inline-min-speedup): Increase from 8 to 15.
17766 (max-inline-insns-auto): Decrease from 40 to 30.
17767 * ipa-split.c (consider_split): Add some buffer for function to
17768 be considered inlining candidate.
17769 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
17772 2018-02-12 Richard Biener <rguenther@suse.de>
17774 PR tree-optimization/84037
17775 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
17776 matched stmts if we cannot swap the non-matched ones.
17778 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
17780 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
17781 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
17782 _mm_maskz_scalef_round_ss): New intrinsics.
17783 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
17784 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
17785 __builtin_ia32_scalefss_round): Remove.
17786 (__builtin_ia32_scalefsd_mask_round,
17787 __builtin_ia32_scalefss_mask_round): New intrinsics.
17788 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
17789 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
17790 ((match_operand:VF_128 2 "<round_nimm_predicate>"
17791 "<round_constraint>")): Changed to ...
17792 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
17793 "<round_scalar_constraint>")): ... this.
17794 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
17795 %0, %1, %2<round_op3>}"): Changed to ...
17796 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
17797 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
17798 %2<round_scalar_mask_op3>}"): ... this.
17799 * config/i386/subst.md (round_scalar_nimm_predicate): New.
17801 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
17803 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
17804 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
17805 (_mm_maskz_sqrt_round_ss): New intrinsics.
17806 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
17807 (__builtin_ia32_sqrtsd_mask_round)
17808 (__builtin_ia32_sqrtss_mask_round): New builtins.
17809 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
17810 (__builtin_ia32_sqrtss_round): Remove.
17811 (__builtin_ia32_sqrtsd_mask_round)
17812 (__builtin_ia32_sqrtss_mask_round): New builtins.
17813 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
17814 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
17815 ((match_operand:VF_128 1 "vector_operand"
17816 "xBm,<round_constraint>")): Changed to ...
17817 ((match_operand:VF_128 1 "vector_operand"
17818 "xBm,<round_scalar_constraint>")): ... this.
17819 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
17820 %0, %2, %<iptr>1<round_op3>}): Changed to ...
17821 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
17822 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
17823 %<iptr>1<round_scalar_mask_op3>}): ... this.
17824 ((set_attr "prefix" "<round_prefix>")): Changed to ...
17825 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
17827 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
17830 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
17831 Cast vec_cmpeq result to correct type.
17832 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
17833 Cast vec_cmpgt result to correct type.
17835 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
17837 * final.c (final_scan_insn_1): Renamed from...
17838 (final_scan_insn): ... this. New wrapper, to recover
17839 seen from the outermost call in recursive ones.
17840 * config/sparc/sparc.c (output_return): Drop seen from call.
17841 (output_sibcall): Likewise.
17842 * config/visium/visium.c (output_branch): Likewise.
17844 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
17846 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
17849 2018-02-10 Alan Modra <amodra@gmail.com>
17852 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
17853 Specify LR as an input.
17855 2018-02-10 Jakub Jelinek <jakub@redhat.com>
17858 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
17859 remove_member_access_dummy_vars): New functions.
17860 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
17861 lower_omp_1, execute_lower_omp): Use them.
17863 PR rtl-optimization/84308
17864 * shrink-wrap.c (spread_components): Release todo vector.
17866 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
17868 PR rtl-optimization/57193
17869 * ira-color.c (struct allocno_color_data): Add member
17870 conflict_allocno_hard_prefs.
17871 (update_conflict_allocno_hard_prefs): New.
17872 (bucket_allocno_compare_func): Add a preference based on
17873 conflict_allocno_hard_prefs.
17874 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
17875 (color_allocnos): Remove a dead code. Initiate
17876 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
17878 2018-02-09 Jakub Jelinek <jakub@redhat.com>
17881 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
17882 constraint from =wa to wa. Avoid a subreg on the output operand,
17883 instead use a pseudo and subreg it in a move.
17884 (p9_xxbrd_<mode>): Changed to ...
17885 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
17886 (p9_xxbrd_v2df): New expander.
17887 (p9_xxbrw_<mode>): Changed to ...
17888 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
17889 (p9_xxbrw_v4sf): New expander.
17891 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
17893 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
17895 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
17898 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
17899 multiply in 32-bit mode.
17900 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
17901 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
17904 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
17906 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
17907 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
17908 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
17909 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
17911 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
17914 * dwarf2out.c (is_trivial_indirect_ref): New function.
17915 (dwarf2out_late_global_decl): Do not generate a location
17916 attribute for variables that have a non-trivial DECL_VALUE_EXPR
17917 and that are not defined in the current unit.
17919 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
17921 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
17922 instead of a libcall for UNORDERED.
17924 2018-02-09 Tamar Christina <tamar.christina@arm.com>
17927 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
17928 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
17930 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17933 * config/s390/s390.c (s390_set_current_function): Invoke
17934 s390_indirect_branch_settings also if fndecl didn't change.
17936 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
17938 * config/rs6000/rs6000.md (blockage): Set length to zero.
17940 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
17942 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
17944 2018-02-09 Jakub Jelinek <jakub@redhat.com>
17947 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
17948 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
17952 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
17953 PARALLEL incoming that failed vt_get_decl_and_offset check.
17955 PR middle-end/84237
17956 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
17957 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
17959 (get_variable_section): For decls in named .bss* sections pass true as
17960 second argument to bss_initializer_p.
17962 2018-02-09 Marek Polacek <polacek@redhat.com>
17963 Jakub Jelinek <jakub@redhat.com>
17966 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
17967 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
17968 Sync some changes from cxx_fold_indirect_ref.
17970 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
17972 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
17974 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
17975 (BLOCK_INLINE_ENTRY_LABEL): New.
17976 (dwarf2out_var_location): Disregard inline entry markers.
17977 (inline_entry_data): New struct.
17978 (inline_entry_data_hasher): New hashtable type.
17979 (inline_entry_data_hasher::hash): New.
17980 (inline_entry_data_hasher::equal): New.
17981 (inline_entry_data_table): New variable.
17982 (add_high_low_attributes): Add DW_AT_entry_pc and
17983 DW_AT_GNU_entry_view attributes if a pending entry is found
17984 in inline_entry_data_table. Add old entry_pc attribute only
17985 if debug nonbinding markers are disabled.
17986 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
17987 markers are enabled.
17988 (block_within_block_p, dwarf2out_inline_entry): New.
17989 (dwarf2out_finish): Check that no entries remained in
17990 inline_entry_data_table.
17991 * final.c (reemit_insn_block_notes): Handle inline entry notes.
17992 (final_scan_insn, notice_source_line): Likewise.
17993 (rest_of_clean_state): Skip inline entry markers.
17994 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
17996 * gimple.c (gimple_build_debug_inline_entry): New.
17997 * gimple.h (enum gimple_debug_subcode): Add
17998 GIMPLE_DEBUG_INLINE_ENTRY.
17999 (gimple_build_debug_inline_entry): Declare.
18000 (gimple_debug_inline_entry_p): New.
18001 (gimple_debug_nonbind_marker_p): Adjust.
18002 * insn-notes.def (INLINE_ENTRY): New.
18003 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
18004 inline entry marker notes.
18005 (print_insn): Likewise.
18006 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
18007 (INSN_DEBUG_MARKER_KIND): Likewise.
18008 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
18009 * tree-inline.c (expand_call_inline): Build and insert
18010 debug_inline_entry stmt.
18011 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
18012 inline entry blocks early, if nonbind markers are enabled.
18013 (dump_scope_block): Dump fragment info.
18014 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
18015 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
18016 (gimple_build_debug_inline_entry): New.
18017 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
18018 Enable/disable inline entry points too.
18019 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
18020 (DEBUG_INSN): Describe inline entry markers.
18022 * common.opt (gvariable-location-views): New.
18023 (gvariable-location-views=incompat5): New.
18024 * config.in: Rebuilt.
18025 * configure: Rebuilt.
18026 * configure.ac: Test assembler for view support.
18027 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
18028 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
18029 * dwarf2out.c (var_loc_view): New typedef.
18030 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
18031 (dwarf2out_locviews_in_attribute): New.
18032 (dwarf2out_locviews_in_loclist): New.
18033 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
18034 (enum dw_line_info_opcode): Add LI_adv_address.
18035 (struct dw_line_info_table): Add view.
18036 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
18037 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
18038 (zero_view_p): New variable.
18039 (ZERO_VIEW_P): New macro.
18040 (output_asm_line_debug_info): New.
18041 (struct var_loc_node): Add view.
18042 (add_AT_view_list, AT_loc_list): New.
18043 (add_var_loc_to_decl): Add view param. Test it against last.
18044 (new_loc_list): Add view params. Record them.
18045 (AT_loc_list_ptr): Handle loc and view lists.
18046 (view_list_to_loc_list_val_node): New.
18047 (print_dw_val): Handle dw_val_class_view_list.
18048 (size_of_die): Likewise.
18049 (value_format): Likewise.
18050 (loc_list_has_views): New.
18051 (gen_llsym): Set vl_symbol too.
18052 (maybe_gen_llsym, skip_loc_list_entry): New.
18053 (dwarf2out_maybe_output_loclist_view_pair): New.
18054 (output_loc_list): Output view list or entries too.
18055 (output_view_list_offset): New.
18056 (output_die): Handle dw_val_class_view_list.
18057 (output_dwarf_version): New.
18058 (output_compilation_unit_header): Use it.
18059 (output_skeleton_debug_sections): Likewise.
18060 (output_rnglists, output_line_info): Likewise.
18061 (output_pubnames, output_aranges): Update version comments.
18062 (output_one_line_info_table): Output view numbers in asm comments.
18063 (dw_loc_list): Determine current endview, pass it to new_loc_list.
18064 Call maybe_gen_llsym.
18065 (loc_list_from_tree_1): Adjust.
18066 (add_AT_location_description): Create view list attribute if
18067 needed, check it's absent otherwise.
18068 (convert_cfa_to_fb_loc_list): Adjust.
18069 (maybe_emit_file): Call output_asm_line_debug_info for test.
18070 (dwarf2out_var_location): Reset views as needed. Precompute
18071 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
18072 attribute. Set view.
18073 (new_line_info_table): Reset next view.
18074 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
18075 (dwarf2out_source_line): Likewise. Output view resets and labels to
18076 the assembler, or select appropriate line info opcodes.
18077 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
18078 (optimize_string_length): Catch it. Adjust.
18079 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
18080 dw_val_class_view_list, and remove it if no longer needed.
18081 (hash_loc_list): Hash view numbers.
18082 (loc_list_hasher::equal): Compare them.
18083 (optimize_location_lists): Check whether a view list symbol is
18084 needed, and whether the locview attribute is present, and
18085 whether they match. Remove the locview attribute if no longer
18087 (index_location_lists): Call skip_loc_list_entry for test.
18088 (dwarf2out_finish): Call output_asm_line_debug_info for test.
18089 Use output_dwarf_version.
18090 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
18091 (struct dw_val_node): Add val_view_list.
18092 * final.c (SEEN_NEXT_VIEW): New.
18093 (set_next_view_needed): New.
18094 (clear_next_view_needed): New.
18095 (maybe_output_next_view): New.
18096 (final_start_function): Rename to...
18097 (final_start_function_1): ... this. Take pointer to FIRST,
18098 add SEEN parameter. Emit param bindings in the initial view.
18099 (final_start_function): Reintroduce SEEN-less interface.
18100 (final): Rename to...
18101 (final_1): ... this. Take SEEN parameter. Output final pending
18102 next view at the end.
18103 (final): Reintroduce seen-less interface.
18104 (final_scan_insn): Output pending next view before switching
18105 sections or ending a block. Mark the next view as needed when
18106 outputting variable locations. Notify debug backend of section
18107 changes, and of location view changes.
18108 (rest_of_handle_final): Adjust.
18109 * toplev.c (process_options): Autodetect value for debug variable
18110 location views option. Warn on incompat5 without -gdwarf-5.
18111 * doc/invoke.texi (gvariable-location-views): New.
18112 (gvariable-location-views=incompat5): New.
18113 (gno-variable-location-views): New.
18115 2018-02-08 David Malcolm <dmalcolm@redhat.com>
18117 PR tree-optimization/84136
18118 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
18119 that the result of find_edge is non-NULL.
18121 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
18124 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
18125 storing integer register in SImode. Fix cost of 256 and 512
18126 byte aligned SSE register store.
18128 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
18130 * config/i386/i386.c (ix86_multiplication_cost): Fix
18131 multiplication cost for TARGET_AVX512DQ.
18133 2018-02-08 Marek Polacek <polacek@redhat.com>
18135 PR tree-optimization/84238
18136 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
18139 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18141 PR tree-optimization/84265
18142 * tree-vect-stmts.c (vectorizable_store): Don't treat
18143 VMAT_CONTIGUOUS accesses as grouped.
18144 (vectorizable_load): Likewise.
18146 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18148 PR tree-optimization/81635
18149 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
18150 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
18151 (test_round_for_mask): New functions.
18152 (wide_int_cc_tests): Call test_round_for_mask.
18153 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
18154 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
18155 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
18156 range returned by get_range_info.
18158 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
18161 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
18162 * symtab.c: Include builtins.h
18163 (symtab_node::output_to_lto_symbol_table_p): Move here
18164 from lto-streamer-out.c:output_symbol_p.
18165 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
18166 (output_symbol_p): Move all logic to symtab.c
18167 (produce_symtab): Update.
18169 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18171 * config/s390/s390-opts.h (enum indirect_branch): Define.
18172 * config/s390/s390-protos.h (s390_return_addr_from_memory)
18173 (s390_indirect_branch_via_thunk)
18174 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
18175 (enum s390_indirect_branch_type): Define.
18176 * config/s390/s390.c (struct s390_frame_layout, struct
18177 machine_function): Remove.
18178 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
18179 (indirect_branch_table_label_no, indirect_branch_table_name):
18181 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
18182 (enum s390_indirect_branch_option): Define.
18183 (s390_return_addr_from_memory): New function.
18184 (s390_handle_string_attribute): New function.
18185 (s390_attribute_table): Add new attribute handler.
18186 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
18187 (s390_indirect_branch_via_thunk): New function.
18188 (s390_indirect_branch_via_inline_thunk): New function.
18189 (s390_function_ok_for_sibcall): When jumping via thunk disallow
18190 sibling call optimization for non z10 compiles.
18191 (s390_emit_call): Force indirect branch target to be a single
18192 register. Add r1 clobber for non-z10 compiles.
18193 (s390_emit_epilogue): Emit return jump via return_use expander.
18194 (s390_reorg): Handle JUMP_INSNs as execute targets.
18195 (s390_option_override_internal): Perform validity checks for the
18196 new command line options.
18197 (s390_indirect_branch_attrvalue): New function.
18198 (s390_indirect_branch_settings): New function.
18199 (s390_set_current_function): Invoke s390_indirect_branch_settings.
18200 (s390_output_indirect_thunk_function): New function.
18201 (s390_code_end): Implement target hook.
18202 (s390_case_values_threshold): Implement target hook.
18203 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
18205 * config/s390/s390.h (struct s390_frame_layout)
18206 (struct machine_function): Move here from s390.c.
18207 (TARGET_INDIRECT_BRANCH_NOBP_RET)
18208 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
18209 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
18210 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
18211 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
18212 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
18213 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
18214 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
18215 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
18216 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
18217 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
18218 (mnemonic attribute): Add values which aren't recognized
18220 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
18221 pattern for branch conversion. Fix mnemonic attribute.
18222 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
18223 indirect branch via thunk if requested.
18224 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
18225 ("*indirect_jump"): Disable for branch conversion using out of
18227 ("indirect_jump_via_thunk<mode>_z10")
18228 ("indirect_jump_via_thunk<mode>")
18229 ("indirect_jump_via_inlinethunk<mode>_z10")
18230 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
18231 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
18232 ("casesi_jump_via_inlinethunk<mode>_z10")
18233 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
18234 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
18235 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
18236 ("*indirect2_jump"): Disable for branch conversion.
18237 ("casesi_jump"): Turn into expander and expand patterns for branch
18239 ("return_use"): New expander.
18240 ("*return"): Emit return via thunk and rename it to ...
18241 ("*return<mode>"): ... this one.
18242 * config/s390/s390.opt: Add new options and and enum for the
18245 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18247 * lra-constraints.c (match_reload): Unconditionally use
18248 gen_lowpart_SUBREG, rather than selecting between that
18249 and equivalent gen_rtx_SUBREG code.
18251 2018-02-08 Richard Biener <rguenther@suse.de>
18253 PR tree-optimization/84233
18254 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
18255 changed flag instead of boguously re-using phi_inserted.
18257 2018-02-08 Martin Jambor <mjambor@suse.cz>
18259 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
18260 static local variables.
18262 2018-02-08 Richard Biener <rguenther@suse.de>
18264 PR tree-optimization/84278
18265 * tree-vect-stmts.c (vectorizable_store): When looking for
18266 smaller vector types to perform grouped strided loads/stores
18267 make sure the mode is supported by the target.
18268 (vectorizable_load): Likewise.
18270 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
18272 * config/aarch64/aarch64.c (aarch64_components_for_bb):
18273 Increase LDP/STP opportunities by adding adjacent callee-saves.
18275 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
18277 PR rtl-optimization/84068
18278 PR rtl-optimization/83459
18279 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
18281 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
18283 PR tree-optimization/84224
18284 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
18285 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
18286 non-zero arguments.
18288 2018-02-07 Iain Sandoe <iain@codesourcery.com>
18291 * config/rs6000/altivec.md (*restore_world): Remove LR use.
18292 * config/rs6000/predicates.md (restore_world_operation): Adjust op
18293 count, remove one USE.
18295 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
18297 * doc/install.texi (Configuration): Document the
18298 --with-long-double-format={ibm,ieee} PowerPC configuration
18302 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
18303 Convert from define_expand to be define_insn_and_split. Rework
18304 float/double/_Float128 conversions to QI/HI/SImode to work with
18305 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
18306 conversions to QI/HImode types did a store and then a load to
18307 truncate the value. For conversions to VSX registers, don't split
18308 the insn, instead emit the code directly. Use the code iterator
18309 any_fix to combine signed and unsigned conversions.
18310 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
18311 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
18312 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
18313 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
18314 (fix_<mode>di2_hw): Likewise.
18315 (fixuns_<mode>di2_hw): Likewise.
18316 (fix_<mode>si2_hw): Likewise.
18317 (fixuns_<mode>si2_hw): Likewise.
18318 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
18319 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
18320 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
18321 fix<uns>_trunc<SFDF:mode>si2_p8.
18322 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
18323 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
18324 (fix<uns>_<mode>_mem): Likewise.
18325 (fctiw<u>z_<mode>_mem): Likewise.
18326 (fix<uns>_<mode>_mem): Likewise.
18327 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
18328 the register allocator from doing a direct move to the GPRs to do
18329 a store, and instead use the ISA 3.0 store byte/half-word from
18330 vector register instruction. For IEEE 128-bit floating point,
18331 also optimize stores of 32-bit ints.
18332 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
18334 2018-02-07 Alan Hayward <alan.hayward@arm.com>
18336 * genextract.c (push_pathstr_operand): New function to support
18338 (walk_rtx): Call push_pathstr_operand.
18339 (print_path): Support [a-zA-Z].
18341 2018-02-07 Richard Biener <rguenther@suse.de>
18343 PR tree-optimization/84037
18344 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
18345 (cse_and_gimplify_to_preheader): Declare.
18346 (vect_get_place_in_interleaving_chain): Likewise.
18347 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18349 (_loop_vec_info::~_loop_vec_info): Delete it.
18350 (cse_and_gimplify_to_preheader): New function.
18351 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
18352 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
18353 (vectorizable_load): Likewise. For grouped stores always base
18354 the IV on the first element.
18355 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
18356 condition before gimplifying.
18358 2018-02-07 Jakub Jelinek <jakub@redhat.com>
18360 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
18361 *DIV_EXPR and *MOD_EXPR.
18363 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
18366 * config/i386/i386.c (ix86_option_override_internal): Mask out
18367 the CF_SET bit when checking -fcf-protection.
18369 2018-02-07 Tom de Vries <tom@codesourcery.com>
18372 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
18375 2018-02-07 Richard Biener <rguenther@suse.de>
18377 PR tree-optimization/84204
18378 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
18381 PR tree-optimization/84205
18382 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
18383 special-case isl_ast_op_zdiv_r.
18385 PR tree-optimization/84223
18386 * graphite-scop-detection.c (gather_bbs::before_dom_children):
18387 Only add conditions from within the region.
18388 (gather_bbs::after_dom_children): Adjust.
18390 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
18393 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
18394 * config/avr/avr.md: Only post-reload split REG-REG moves if
18395 either register is GENERAL_REG_P.
18397 2018-02-07 Jakub Jelinek <jakub@redhat.com>
18399 PR tree-optimization/84235
18400 * tree-ssa-scopedtables.c
18401 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
18402 if the subtraction is performed in floating point type where NaNs are
18403 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
18404 build 1. Formatting fix.
18406 2018-02-06 Jakub Jelinek <jakub@redhat.com>
18409 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
18410 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
18411 and skip it regardless of bb boundaries. Use CALL_P macro,
18412 don't test INSN_P (insn) together with CALL_P or JUMP_P check
18413 unnecessarily, formatting fix.
18415 2018-02-06 Michael Collison <michael.collison@arm.com>
18417 * config/arm/thumb2.md:
18418 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
18419 (*thumb_mov_notscc): Ditto.
18421 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
18424 * config/rs6000/rs6000.md (su code attribute): Use "u" for
18425 unsigned_fix, not "s".
18427 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18429 * configure.ac (gcc_fn_eh_frame_ro): New function.
18430 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
18431 correct .eh_frame permissions.
18432 * configure: Regenerate.
18434 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
18436 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
18437 irrelevant options.
18439 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18441 * config/rs6000/rs6000.c (rs6000_option_override_internal):
18442 Display warning message for -mno-speculate-indirect-jumps.
18444 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
18446 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
18448 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
18450 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
18452 PR tree-optimization/84225
18453 * tree-eh.c (find_trapping_overflow): Only call
18454 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
18456 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18459 * config/i386/i386.c: Reimplement the check of possible options
18460 -mibt/-mshstk conbination. Change error messages.
18461 * doc/invoke.texi: Fix a typo: remove extra '='.
18463 2018-02-06 Marek Polacek <polacek@redhat.com>
18465 PR tree-optimization/84228
18466 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
18468 2018-02-06 Tamar Christina <tamar.christina@arm.com>
18471 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
18472 emitted arch directives.
18473 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
18474 __ARM_FEATURE_COPROC before changing architectures.
18476 2018-02-06 Richard Biener <rguenther@suse.de>
18478 * config/i386/i386.c (print_reg): Fix typo.
18479 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
18481 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
18483 * configure: Regenerate.
18485 2018-02-05 Martin Sebor <msebor@redhat.com>
18487 PR tree-optimization/83369
18488 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
18491 2018-02-05 Martin Liska <mliska@suse.cz>
18493 * doc/invoke.texi: Cherry-pick upstream r323995.
18495 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
18497 * ira.c (ira_init_register_move_cost): Adjust comment.
18499 2018-02-05 Martin Liska <mliska@suse.cz>
18501 PR gcov-profile/84137
18502 * doc/gcov.texi: Fix typo in documentation.
18504 2018-02-05 Martin Liska <mliska@suse.cz>
18506 PR gcov-profile/83879
18507 * doc/gcov.texi: Document necessity of --dynamic-list-data when
18508 using dlopen functionality.
18510 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
18512 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
18513 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
18514 _mm_maskz_range_ss, _mm_mask_range_round_ss,
18515 _mm_maskz_range_round_ss): New intrinsics.
18516 (__builtin_ia32_rangesd128_round)
18517 (__builtin_ia32_rangess128_round): Remove.
18518 (__builtin_ia32_rangesd128_mask_round,
18519 __builtin_ia32_rangess128_mask_round): New builtins.
18520 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
18521 __builtin_ia32_rangess128_round): Remove.
18522 (__builtin_ia32_rangesd128_mask_round,
18523 __builtin_ia32_rangess128_mask_round): New builtins.
18524 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
18525 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
18526 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
18527 "<round_saeonly_constraint>")): Changed to ...
18528 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
18529 "<round_saeonly_scalar_constraint>")): ... this.
18530 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
18531 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
18532 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
18533 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
18534 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
18536 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
18538 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
18540 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
18541 Remove all values except native, 8540 and 8548.
18543 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
18545 * config/i386/i386.c (ix86_output_function_return): Pass
18546 INVALID_REGNUM, instead of -1, as invalid register number to
18547 indirect_thunk_name and output_indirect_thunk.
18549 2018-02-02 Julia Koval <julia.koval@intel.com>
18551 * config.gcc: Add -march=icelake.
18552 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
18553 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
18554 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
18555 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
18556 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
18557 (processor_target_table): Add icelake.
18558 (ix86_option_override_internal): Handle new PTAs.
18559 (get_builtin_code_for_version): Handle icelake.
18560 (M_INTEL_COREI7_ICELAKE): New.
18561 (fold_builtin_cpu): Handle icelake.
18562 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
18563 * doc/invoke.texi: Add -march=icelake.
18565 2018-02-02 Julia Koval <julia.koval@intel.com>
18567 * config/i386/i386.c (ix86_option_override_internal): Change flags type
18568 to wide_int_bitmask.
18569 * wide-int-bitmask.h: New.
18571 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18574 * config/i386/i386.md: Replace Pmode with word_mode in
18575 builtin_setjmp_setup and builtin_longjmp to support x32.
18577 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
18581 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
18583 (rs6000_supported_cpu_names): New static variable.
18584 (linux_cpu_translation_table): Likewise.
18585 (elf_platform) <cpu>: Define new static variable and use it.
18586 Translate kernel AT_PLATFORM name to canonical name if needed.
18587 Error if platform name is unknown.
18589 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
18592 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
18594 2018-02-01 Jeff Law <law@redhat.com>
18597 * config/i386/i386.c (release_scratch_register_on_entry): Add new
18598 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
18599 the scratch if RELEASE_VIA_POP is false.
18600 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
18601 If we have to save a temporary register, decrement SIZE appropriately.
18602 Pass new arguments to release_scratch_register_on_entry.
18603 (ix86_adjust_stack_and_probe): Likewise.
18604 (ix86_emit_probe_stack_range): Pass new arguments to
18605 release_scratch_register_on_entry.
18607 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
18609 PR rtl-optimization/84157
18610 * combine.c (change_zero_ext): Use REG_P predicate in
18611 front of HARD_REGISTER_P predicate.
18613 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
18615 * config/avr/avr.c (avr_option_override): Move disabling of
18616 -fdelete-null-pointer-checks to...
18617 * common/config/avr/avr-common.c (avr_option_optimization_table):
18620 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18622 PR tree-optimization/81635
18623 * tree-data-ref.c (split_constant_offset_1): For types that
18624 wrap on overflow, try to use range info to prove that wrapping
18627 2018-02-01 Renlin Li <renlin.li@arm.com>
18630 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
18631 TAILCALL_ADDR_REGS.
18632 (aarch64_register_move_cost): Likewise.
18633 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
18634 TAILCALL_ADDR_REGS.
18635 (REG_CLASS_NAMES): Likewise.
18636 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
18637 TAILCALL_ADDR_REGS. Remove IP registers.
18638 * config/aarch64/aarch64.md (Ucs): Update register constraint.
18640 2018-02-01 Richard Biener <rguenther@suse.de>
18642 * domwalk.h (dom_walker::dom_walker): Add additional constructor
18643 for specifying RPO order and allow NULL for that.
18644 * domwalk.c (dom_walker::dom_walker): Likewise.
18645 (dom_walker::walk): Handle NULL RPO order.
18646 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
18648 (rewrite_update_dom_walker): Likewise.
18649 (mark_def_dom_walker): Likewise.
18651 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18653 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
18654 (aarch64_maybe_expand_sve_subreg_move): Declare.
18655 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
18656 * config/aarch64/predicates.md (aarch64_any_register_operand): New
18658 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
18659 that are semantically a reverse operation.
18660 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
18661 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
18662 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
18664 (aarch64_can_change_mode_class): For big-endian, forbid changes
18665 between two SVE modes if they have different element sizes.
18667 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18669 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
18670 the TImode handling for big-endian targets.
18672 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18674 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
18675 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
18677 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
18678 Remove BSWAP handing for big-endian targets and use the form of
18679 LD1RQ appropariate for the mode.
18681 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18683 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
18684 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
18685 duplicated element.
18687 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18690 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
18691 check for operands that need to go through aarch64_sve_reload_be.
18693 2018-02-01 Jakub Jelinek <jakub@redhat.com>
18695 PR tree-optimization/81661
18696 PR tree-optimization/84117
18697 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
18698 * tree-eh.c: Include gimplify.h.
18699 (find_trapping_overflow, replace_trapping_overflow,
18700 rewrite_to_non_trapping_overflow): New functions.
18701 * tree-vect-loop.c: Include tree-eh.h.
18702 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
18703 * tree-data-ref.c: Include tree-eh.h.
18704 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
18706 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
18708 PR rtl-optimization/84123
18709 * combine.c (change_zero_ext): Check if hard register satisfies
18710 can_change_dest_mode before calling gen_lowpart_SUBREG.
18712 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
18715 * ira.c (ira_init_register_move_cost): Remove assert.
18717 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
18719 PR rtl-optimization/84071
18720 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
18721 * doc/tm.texi: Regenerate.
18723 2018-01-31 Richard Biener <rguenther@suse.de>
18725 PR tree-optimization/84132
18726 * tree-data-ref.c (analyze_miv_subscript): Properly
18727 check whether evolution_function_is_affine_multivariate_p
18728 before calling gcd_of_steps_may_divide_p.
18730 2018-01-31 Julia Koval <julia.koval@intel.com>
18733 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
18734 * config/i386/i386.md (rdpid_rex64) New.
18735 (rdpid): Make 32bit only.
18737 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
18740 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
18741 an IDENTIFIER_NODE for FUNCTION_TYPE's.
18743 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
18746 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
18748 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
18750 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
18752 PR rtl-optimization/84071
18753 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
18754 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
18756 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
18758 * config/arc/arc.c (arc_handle_aux_attribute): New function.
18759 (arc_attribute_table): Add 'aux' attribute.
18760 (arc_in_small_data_p): Consider aux like variables.
18761 (arc_is_aux_reg_p): New function.
18762 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
18763 (arc_get_aux_arg): New function.
18764 (prepare_move_operands): Handle aux-register access.
18765 (arc_handle_aux_attribute): New function.
18766 * doc/extend.texi (ARC Variable attributes): Add subsection.
18768 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
18770 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
18771 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
18772 (arc_attribute_table): Add 'uncached' attribute.
18773 (arc_print_operand): Print '.di' flag for uncached memory
18775 (arc_in_small_data_p): Do not consider for small data the uncached
18777 (arc_is_uncached_mem_p): New function.
18778 * config/arc/predicates.md (compact_store_memory_operand): Check
18779 for uncached memory accesses.
18780 (nonvol_nonimm_operand): Likewise.
18781 * doc/extend.texi (ARC Type Attribute): New subsection.
18783 2018-01-31 Jakub Jelinek <jakub@redhat.com>
18786 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
18787 falign-loops=): Add Optimization flag.
18789 2018-01-30 Jeff Law <law@redhat.com>
18792 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
18793 INT_REGISTERS_SAVED. Check it prior to calling
18794 get_scratch_register_on_entry.
18795 (ix86_adjust_stack_and_probe): Similarly.
18796 (ix86_emit_probe_stack_range): Similarly.
18797 (ix86_expand_prologue): Corresponding changes.
18799 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18802 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
18803 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
18805 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
18808 * lra-constraints.c (curr_insn_transform): Process AND in the
18811 2018-01-30 Jakub Jelinek <jakub@redhat.com>
18813 PR rtl-optimization/83986
18814 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
18815 dependence against last_pending_memory_flush in addition to
18816 pending_jump_insns.
18818 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
18820 PR tree-optimization/81611
18821 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
18824 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18827 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
18830 2018-01-30 Richard Biener <rguenther@suse.de>
18831 Jakub Jelinek <jakub@redhat.com>
18833 PR tree-optimization/84111
18834 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
18835 inner loops added during recursion, as they don't have up-to-date
18838 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
18841 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
18842 (can_inline_edge_by_limits_p): ... here.
18843 (can_early_inline_edge_p, check_callers,
18844 update_caller_keys, update_callee_keys, recursive_inlining,
18845 add_new_edges_to_heap, speculation_useful_p,
18846 inline_small_functions,
18847 inline_small_functions, flatten_function,
18848 inline_to_all_callers_1): Update.
18850 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
18852 * profile-count.c (profile_count::combine_with_ipa_count): Handle
18855 2018-01-30 Richard Biener <rguenther@suse.de>
18857 PR tree-optimization/83008
18858 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
18859 invariant and constant vector uses in stmts when they need
18860 more than one stmt.
18862 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18865 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
18866 * configure: Regenerate.
18868 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
18870 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
18872 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
18873 Use gen_rtx_REG rather than gen_lowpart.
18875 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
18877 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
18878 rather than 0 when creating partial subregs.
18880 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
18882 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
18885 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
18888 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
18889 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
18890 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
18891 flags. This restores the settings used before the 2017-07-24.
18892 Turning off pre increment/decrement/modify allows IVOPTS to
18893 optimize DF/SF loops where the index is an int.
18895 2018-01-29 Richard Biener <rguenther@suse.de>
18896 Kelvin Nilsen <kelvin@gcc.gnu.org>
18899 * tree-vect-stmts.c (vectorizable_call): Don't call
18900 targetm.vectorize_builtin_md_vectorized_function if callee is
18903 2018-01-22 Carl Love <cel@us.ibm.com>
18905 * doc/extend.tex: Fix typo in second arg in
18906 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
18908 2018-01-29 Richard Biener <rguenther@suse.de>
18910 PR tree-optimization/84086
18911 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
18912 (flush_ssaname_freelist): When SSA names were released reset
18913 the SCEV hash table.
18915 2018-01-29 Richard Biener <rguenther@suse.de>
18917 PR tree-optimization/84057
18918 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
18919 removed paths when removing edges.
18921 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
18923 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
18924 -mfunction-return=@var{choice}.
18926 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
18928 PR diagnostic/84034
18929 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
18930 Handle CR like TAB.
18931 (layout::print_source_line): Likewise.
18932 (test_get_line_width_without_trailing_whitespace): Add test cases.
18934 2018-01-27 Jakub Jelinek <jakub@redhat.com>
18936 PR middle-end/84040
18937 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
18940 2018-01-26 Jim Wilson <jimw@sifive.com>
18942 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
18944 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
18947 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18949 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
18950 and CMP + SUB-immediate -> SUBS.
18952 2018-01-26 Martin Sebor <msebor@redhat.com>
18954 PR tree-optimization/83896
18955 * tree-ssa-strlen.c (get_string_len): Rename...
18956 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
18957 Avoid assuming length is constant.
18958 (handle_char_store): Use HOST_WIDE_INT for string length.
18960 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
18963 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
18964 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
18966 2018-01-26 Richard Biener <rguenther@suse.de>
18968 PR rtl-optimization/84003
18969 * dse.c (record_store): Only record redundant stores when
18970 the earlier store aliases at least all accesses the later one does.
18972 2018-01-26 Jakub Jelinek <jakub@redhat.com>
18974 PR rtl-optimization/83985
18975 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
18976 REG_CFA_RESTORE insns.
18977 (delete_unmarked_insns): Don't ignore separate shrink wrapping
18978 REG_CFA_RESTORE insns here.
18981 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
18982 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
18984 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18986 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
18987 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
18988 (arc_init): Likewise.
18989 (arc_override_options): Likewise.
18990 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
18992 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
18994 * config/arc/arc.h (TARGET_DBNZ): Define.
18995 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
18996 properly set the tune attribute.
18997 (dbnz): Use TARGET_DBNZ guard.
18998 * config/arc/arc.opt (mtune): Add core3 option.
19000 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19002 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
19003 recognize new pic like addresses.
19004 (arc_delegitimize_address): Clean up.
19006 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19008 * config/arc/arc-arches.def: Option mrf16 valid for all
19010 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
19011 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
19012 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
19013 * config/arc/arc-tables.opt: Regenerate.
19014 * config/arc/arc.c (arc_conditional_register_usage): Handle
19015 reduced register file case.
19016 (arc_file_start): Set must have build attributes.
19017 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
19018 mrf16 option value.
19019 * config/arc/arc.opt (mrf16): Add new option.
19020 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
19021 * config/arc/genmultilib.awk: Handle new mrf16 option.
19022 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
19023 * config/arc/t-multilib: Regenerate.
19024 * doc/invoke.texi (ARC Options): Document mrf16 option.
19026 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19028 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
19029 * config/arc/arc.c (arc_handle_secure_attribute): New function.
19030 (arc_attribute_table): Add 'secure_call' attribute.
19031 (arc_print_operand): Print secure call operand.
19032 (arc_function_ok_for_sibcall): Don't optimize tail calls when
19034 (arc_is_secure_call_p): New function. * config/arc/arc.md
19035 (call_i): Add support for sjli instruction.
19036 (call_value_i): Likewise.
19037 * config/arc/constraints.md (Csc): New constraint.
19039 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19040 John Eric Martin <John.Martin@emmicro-us.com>
19042 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
19043 * config/arc/arc.c (_arc_jli_section): New struct.
19044 (arc_jli_section): New type.
19045 (rc_jli_sections): New static variable.
19046 (arc_handle_jli_attribute): New function.
19047 (arc_attribute_table): Add jli_always and jli_fixed attribute.
19048 (arc_file_end): New function.
19049 (TARGET_ASM_FILE_END): Define.
19050 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
19051 (arc_add_jli_section): New function.
19052 (jli_call_scan): Likewise.
19053 (arc_reorg): Call jli_call_scan.
19054 (arc_output_addsi): Remove 'S' from printing asm operand.
19055 (arc_is_jli_call_p): New function.
19056 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
19058 (movhi_insn): Likewise.
19059 (movsi_insn): Likewise.
19060 (movsi_set_cc_insn): Likewise.
19061 (loadqi_update): Likewise.
19062 (load_zeroextendqisi_update): Likewise.
19063 (load_signextendqisi_update): Likewise.
19064 (loadhi_update): Likewise.
19065 (load_zeroextendhisi_update): Likewise.
19066 (load_signextendhisi_update): Likewise.
19067 (loadsi_update): Likewise.
19068 (loadsf_update): Likewise.
19069 (movsicc_insn): Likewise.
19070 (bset_insn): Likewise.
19071 (bxor_insn): Likewise.
19072 (bclr_insn): Likewise.
19073 (bmsk_insn): Likewise.
19074 (bicsi3_insn): Likewise.
19075 (cmpsi_cc_c_insn): Likewise.
19076 (movsi_ne): Likewise.
19077 (movsi_cond_exec): Likewise.
19078 (clrsbsi2): Likewise.
19079 (norm_f): Likewise.
19089 (call_i): Remove 'S' asm letter, add jli instruction.
19090 (call_value_i): Likewise.
19091 * config/arc/arc.op (mjli-always): New option.
19092 * config/arc/constraints.md (Cji): New constraint.
19093 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
19095 (subsf3_fpx): Likewise.
19096 (mulsf3_fpx): Likewise.
19097 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
19099 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
19100 function attrbutes.
19101 * doc/invoke.texi (ARC): Document mjli-always option.
19103 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
19105 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
19106 avoid addition with 0 and use incw and decw where possible.
19108 2018-01-26 Richard Biener <rguenther@suse.de>
19110 PR tree-optimization/81082
19111 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
19112 association if it requires casting to unsigned.
19113 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
19114 from fold_plusminus_mult_expr to catch important cases late when
19115 range info is available.
19117 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19119 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
19120 * configure.ac (hidden_linkonce): New test.
19121 * configure: Regenerate.
19122 * config.in: Regenerate.
19124 2018-01-26 Julia Koval <julia.koval@intel.com>
19126 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
19127 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
19128 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
19129 _mm_mask_bitshuffle_epi64_mask): Fix type.
19130 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
19131 USI_FTYPE_V4DI_V4DI_USI): Remove.
19132 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
19133 __builtin_ia32_vpshufbitqmb256_mask,
19134 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
19135 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
19136 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
19138 2018-01-26 Alan Modra <amodra@gmail.com>
19141 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
19142 UNSPEC_VBPERMQ. Sort other unspecs.
19144 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
19146 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
19148 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
19150 PR middle-end/83055
19151 * predict.c (drop_profile): Do not push/pop cfun; update also
19153 (handle_missing_profiles): Fix logic looking for zero profiles.
19155 2018-01-25 Jakub Jelinek <jakub@redhat.com>
19157 PR middle-end/83977
19158 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
19159 on functions with #pragma omp declare simd or functions with simd
19161 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
19162 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
19163 Remove trailing \n from warning_at calls.
19165 2018-01-25 Tom de Vries <tom@codesourcery.com>
19168 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
19169 for neutered workers.
19171 2018-01-24 Joseph Myers <joseph@codesourcery.com>
19174 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
19175 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
19177 2018-01-24 Jeff Law <law@redhat.com>
19180 * i386.c (get_probe_interval): Move to earlier point.
19181 (ix86_compute_frame_layout): If -fstack-clash-protection and
19182 the frame is larger than the probe interval, then use pushes
19183 to save registers rather than reg->mem moves.
19184 (ix86_expand_prologue): Remove conditional for int_registers_saved
19187 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
19190 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
19191 min/max for never referenced object.
19193 2018-01-24 Jakub Jelinek <jakub@redhat.com>
19195 PR middle-end/83977
19196 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
19198 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
19199 attributes from DECL_ATTRIBUTES (decl) without affecting
19200 DECL_ATTRIBUTES (current_function_decl).
19201 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
19202 functions with non-NULL DECL_ABSTRACT_ORIGIN.
19204 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
19206 PR tree-optimization/83979
19207 * fold-const.c (fold_comparison): Use constant_boolean_node
19208 instead of boolean_{true,false}_node.
19210 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
19212 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
19215 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19217 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19218 Simplify the clause that sets the length attribute.
19219 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19220 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
19221 clause that sets the length attribute.
19222 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19224 2018-01-24 Tom de Vries <tom@codesourcery.com>
19227 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
19228 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
19229 Add strict parameter.
19230 (prevent_branch_around_nothing): Insert dummy insn between branch to
19231 label and label with no ptx insn inbetween.
19232 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
19234 2018-01-24 Tom de Vries <tom@codesourcery.com>
19237 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
19238 for neutered threads in warp.
19239 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
19241 2018-01-24 Richard Biener <rguenther@suse.de>
19243 PR tree-optimization/83176
19244 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
19247 2018-01-24 Richard Biener <rguenther@suse.de>
19249 PR tree-optimization/82819
19250 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
19251 code generating pluses that are no-ops in the target precision.
19253 2018-01-24 Richard Biener <rguenther@suse.de>
19255 PR middle-end/84000
19256 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
19258 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
19260 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
19261 to merge probabilities.
19262 * predict.c (probably_never_executed): Also mark as cold functions
19263 with global 0 profile and guessed local profile.
19264 * profile-count.c (profile_probability::combine_with_count): New
19266 * profile-count.h (profile_probability::operator*,
19267 profile_probability::operator*=, profile_probability::operator/,
19268 profile_probability::operator/=): Reduce precision to adjusted
19269 and set value to guessed on contradictory divisions.
19270 (profile_probability::combine_with_freq): Remove.
19271 (profile_probability::combine_wiht_count): Declare.
19272 (profile_count::force_nonzero):: Set to adjusted.
19273 (profile_count::probability_in):: Set quality to adjusted.
19274 * tree-ssa-tail-merge.c (replace_block_by): Use
19275 combine_with_count.
19277 2018-01-23 Andrew Waterman <andrew@sifive.com>
19278 Jim Wilson <jimw@sifive.com>
19280 * config/riscv/riscv.c (riscv_stack_boundary): New.
19281 (riscv_option_override): Set riscv_stack_boundary. Handle
19282 riscv_preferred_stack_boundary_arg.
19283 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
19284 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
19285 (STACK_BOUNDARY): Set to riscv_stack_boundary.
19286 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
19287 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
19288 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
19290 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
19293 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
19294 of struct ix86_frame.
19295 (ix86_expand_epilogue): Likewise. Add a local variable for
19296 the reg_save_offset field in struct ix86_frame.
19298 2018-01-23 Bin Cheng <bin.cheng@arm.com>
19300 PR tree-optimization/82604
19301 * tree-loop-distribution.c (enum partition_kind): New enum item
19302 PKIND_PARTIAL_MEMSET.
19303 (partition_builtin_p): Support above new enum item.
19304 (generate_code_for_partition): Ditto.
19305 (compute_access_range): Differentiate cases that equality can be
19306 proven at all loops, the innermost loops or no loops.
19307 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
19308 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
19309 (finalize_partitions, distribute_loop): Don't fuse partition of
19310 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
19311 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
19312 parloop is enabled.
19314 2018-01-23 Martin Liska <mliska@suse.cz>
19316 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
19317 order to ignore the predictor.
19318 (PRED_POLYMORPHIC_CALL): Likewise.
19319 (PRED_RECURSIVE_CALL): Likewise.
19321 2018-01-23 Martin Liska <mliska@suse.cz>
19323 * tree-profile.c (tree_profiling): Print function header to
19324 aware reader which function we are working on.
19325 * value-prof.c (gimple_find_values_to_profile): Do not print
19326 not interesting value histograms.
19328 2018-01-23 Martin Liska <mliska@suse.cz>
19330 * profile-count.h (enum profile_quality): Add
19331 profile_uninitialized as the first value. Do not number values
19332 as they are zero based.
19333 (profile_count::verify): Update sanity check.
19334 (profile_probability::verify): Likewise.
19336 2018-01-23 Nathan Sidwell <nathan@acm.org>
19338 * doc/invoke.texi (ffor-scope): Deprecate.
19340 2018-01-23 David Malcolm <dmalcolm@redhat.com>
19342 PR tree-optimization/83510
19343 * domwalk.c (set_all_edges_as_executable): New function.
19344 (dom_walker::dom_walker): Convert bool param
19345 "skip_unreachable_blocks" to enum reachability. Move setup of
19346 edge flags to set_all_edges_as_executable and only do it when
19347 reachability is REACHABLE_BLOCKS.
19348 * domwalk.h (enum dom_walker::reachability): New enum.
19349 (dom_walker::dom_walker): Convert bool param
19350 "skip_unreachable_blocks" to enum reachability.
19351 (set_all_edges_as_executable): New decl.
19352 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
19353 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
19355 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
19356 but converting true to REACHABLE_BLOCKS.
19357 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
19359 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
19360 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
19361 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
19363 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
19364 if check_all_array_refs will be called.
19366 2018-01-23 David Malcolm <dmalcolm@redhat.com>
19368 * tree.c (selftest::test_location_wrappers): Add more test
19371 2018-01-23 David Malcolm <dmalcolm@redhat.com>
19373 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
19374 (selftest::test_bit_in_range): Likewise.
19376 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
19379 * doc/sourcebuild.texi (vect_float): Say that the selector
19380 only describes the situation when -funsafe-math-optimizations is on.
19381 (vect_float_strict): Document.
19383 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
19385 PR tree-optimization/83965
19386 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
19387 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
19388 instead of checking only for a reduction.
19389 (vect_recog_widen_sum_pattern): Likewise.
19391 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
19393 * predict.c (probably_never_executed): Only use precise profile info.
19394 (compute_function_frequency): Skip after inlining hack since we now
19395 have quality checking.
19397 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
19399 * profile-count.h (profile_probability::very_unlikely,
19400 profile_probability::unlikely, profile_probability::even): Set
19401 precision to guessed.
19403 2018-01-23 Richard Biener <rguenther@suse.de>
19405 PR tree-optimization/83963
19406 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
19407 Properly terminate dominator walk when crossing the exit edge not
19408 when visiting its source block.
19410 2018-01-23 Jakub Jelinek <jakub@redhat.com>
19413 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
19414 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
19416 2018-01-22 Jakub Jelinek <jakub@redhat.com>
19418 PR tree-optimization/83957
19419 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
19420 semicolon after for body surrounded by braces.
19422 PR tree-optimization/83081
19423 * profile-count.h (profile_probability::split): New method.
19424 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
19425 Use profile_probability::split.
19426 (do_compare_rtx_and_jump): Fix adjustment of probabilities
19427 when splitting a single conditional jump into 2.
19429 2018-01-22 David Malcolm <dmalcolm@redhat.com>
19431 PR tree-optimization/69452
19432 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
19435 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19437 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
19438 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
19439 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
19441 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19443 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
19445 * config/rl78/rl78.md (movdi): New define_expand.
19446 * config/rl78/rl78.c (rl78_split_movdi): New function.
19448 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
19451 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
19453 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
19454 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
19455 128-bit to produce an UNSPEC move to get the double word with the
19456 signbit and then a shift directly to do signbit.
19457 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
19458 implementation with a new version that just does either a direct
19459 move or a regular move. Move memory interface to separate insns.
19460 Move insns so they are next to the expander.
19461 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
19462 with signbit move. Split big and little endian case.
19463 (signbit<mode>2_dm_mem_le): Likewise.
19464 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
19465 (signbit<mode>2_dm2): Likewise.
19467 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19469 * config/rl78/rl78.md (anddi3): New define_expand.
19471 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19473 * config/rl78/rl78.md (umindi3): New define_expand.
19475 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19477 * config/rl78/rl78.md (smindi3): New define_expand.
19479 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19481 * config/rl78/rl78.md (smaxdi3): New define_expand.
19483 2018-01-22 Carl Love <cel@us.ibm.com>
19485 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
19486 LVX_V1TI): Add macro expansion.
19487 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
19488 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
19489 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
19490 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
19491 Change check to determine if the instruction is a byte reversing
19492 entry. Fix typo in comment.
19493 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
19494 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
19495 Add def_builtin calls for new builtins.
19496 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
19497 Add define_insn expansion.
19499 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19501 * config/rl78/rl78.md (umaxdi3): New define_expand.
19503 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19505 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
19506 for non-QImode registers.
19508 2018-01-22 Richard Biener <rguenther@suse.de>
19510 PR tree-optimization/83963
19511 * graphite-scop-detection.c (scop_detection::get_sese): Delay
19512 including the loop exit block.
19513 (scop_detection::merge_sese): Likewise.
19514 (scop_detection::add_scop): Do it here instead.
19516 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19518 * doc/sourcebuild.texi (arm_softfloat): Document.
19520 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
19523 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
19524 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
19525 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
19527 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19528 David Edelsohn <dje.gcc@gmail.com>
19531 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19532 Change "crset eq" to "crset 2".
19533 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19534 (*call_indirect_aix<mode>_nospec): Likewise.
19535 (*call_value_indirect_aix<mode>_nospec): Likewise.
19536 (*call_indirect_elfv2<mode>_nospec): Likewise.
19537 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
19538 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
19539 change assembly output from . to $.
19540 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19541 (indirect_jump<mode>_nospec): Change assembly output from . to $.
19542 (*tablejump<mode>_internal1_nospec): Likewise.
19544 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
19547 * config/sh/sh_optimize_sett_clrt.cc:
19548 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
19550 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
19552 PR tree-optimization/83940
19553 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
19554 offset_dt to vect_constant_def rather than vect_unknown_def_type.
19555 (vect_check_load_store_mask): Add a mask_dt_out parameter and
19556 use it to pass back the definition type.
19557 (vect_check_store_rhs): Likewise rhs_dt_out.
19558 (vect_build_gather_load_calls): Add a mask_dt argument and use
19559 it instead of a call to vect_is_simple_use.
19560 (vectorizable_store): Update calls to vect_check_load_store_mask
19561 and vect_check_store_rhs. Use the dt returned by the latter instead
19562 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
19563 instead of calls to vect_is_simple_use. Pass the scalar rather
19564 than the vector operand to vect_is_simple_use when handling
19565 second and subsequent copies of an rhs value.
19566 (vectorizable_load): Update calls to vect_check_load_store_mask
19567 and vect_build_gather_load_calls. Use the cached mask_dt and
19568 gs_info.offset_dt instead of calls to vect_is_simple_use.
19570 2018-01-20 Jakub Jelinek <jakub@redhat.com>
19572 PR middle-end/83945
19573 * tree-emutls.c: Include gimplify.h.
19574 (lower_emutls_2): New function.
19575 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
19576 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
19577 it before further processing.
19580 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
19581 UINTVAL (trueop1) instead of INTVAL (op1).
19583 2018-01-19 Jakub Jelinek <jakub@redhat.com>
19587 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
19588 INCOMING_FRAME_SP_OFFSET if not defined.
19589 (scan_trace): Add ENTRY argument. If true and
19590 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
19591 emit a note to adjust the CFA offset.
19592 (create_cfi_notes): Adjust scan_trace callers.
19593 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
19594 INCOMING_FRAME_SP_OFFSET in the CIE.
19595 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
19596 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
19598 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
19599 * doc/tm.texi: Regenerated.
19601 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19603 PR rtl-optimization/83147
19604 * lra-constraints.c (remove_inheritance_pseudos): Use
19605 lra_substitute_pseudo_within_insn.
19607 2018-01-19 Tom de Vries <tom@codesourcery.com>
19608 Cesar Philippidis <cesar@codesourcery.com>
19611 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
19613 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
19616 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
19617 spaces for function labels.
19619 2018-01-19 Martin Liska <mliska@suse.cz>
19621 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
19622 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
19623 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
19624 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
19625 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
19626 (PRED_CONST_RETURN): Change from 69 to 65.
19627 (PRED_NULL_RETURN): Change from 91 to 71.
19628 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
19629 (PRED_LOOP_GUARD): Change from 66 to 73.
19631 2018-01-19 Martin Liska <mliska@suse.cz>
19633 * predict.c (predict_insn_def): Add new assert.
19634 (struct branch_predictor): Change type to signed integer.
19635 (test_prediction_value_range): Amend test to cover
19636 PROB_UNINITIALIZED.
19637 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
19638 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
19639 (PRED_LOOP_ITERATIONS_MAX): Likewise.
19640 (PRED_LOOP_IV_COMPARE): Likewise.
19641 * predict.h (PROB_UNINITIALIZED): Define new constant.
19643 2018-01-19 Martin Liska <mliska@suse.cz>
19645 * predict.c (dump_prediction): Add new format for
19646 analyze_brprob.py script which is enabled with -details
19648 * profile-count.h (precise_p): New function.
19650 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
19652 PR tree-optimization/83922
19653 * tree-vect-loop.c (vect_verify_full_masking): Return false if
19654 there are no statements that need masking.
19655 (vect_active_double_reduction_p): New function.
19656 (vect_analyze_loop_operations): Use it when handling phis that
19657 are not in the loop header.
19659 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
19661 PR tree-optimization/83914
19662 * tree-vect-loop.c (vectorizable_induction): Don't convert
19663 init_expr or apply the peeling adjustment for inductions
19664 that are nested within the vectorized loop.
19666 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19668 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
19671 2018-01-18 Jakub Jelinek <jakub@redhat.com>
19675 * function.h (gimplify_parameters): Add gimple_seq * argument.
19676 * function.c: Include gimple.h and options.h.
19677 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
19678 for the added local temporaries if needed.
19679 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
19680 if there are any parameter cleanups, wrap whole body into a
19681 try/finally with the cleanups.
19683 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
19686 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
19687 Use GET_MODE_CLASS for scalar floating point.
19689 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
19693 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
19694 Fix call of call_cgraph_insertion_hooks.
19696 2018-01-18 Martin Sebor <msebor@redhat.com>
19698 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
19700 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
19703 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
19706 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
19709 * common.opt: (-ffile-prefix-map): New option.
19710 * opts.c (common_handle_option): Defer it.
19711 * opts-global.c (handle_common_deferred_options): Handle it.
19712 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
19713 * file-prefix-map.h: New file.
19714 (remap_debug_filename, add_debug_prefix_map): ...here.
19715 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
19716 * final.c (debug_prefix_map, add_debug_prefix_map
19717 remap_debug_filename): Move to...
19718 * file-prefix-map.c: New file.
19719 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
19720 generalize, get rid of alloca(), use strrchr() instead of strchr().
19721 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
19722 Implement in terms of add_prefix_map().
19723 (remap_macro_filename, remap_debug_filename): Implement in term of
19725 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
19726 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
19727 * dbxout.c: Include file-prefix-map.h.
19728 * varasm.c: Likewise.
19729 * vmsdbgout.c: Likewise.
19730 * xcoffout.c: Likewise.
19731 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
19732 * doc/cppopts.texi (-fmacro-prefix-map): Document.
19733 * doc/invoke.texi (-ffile-prefix-map): Document.
19734 (-fdebug-prefix-map): Update description.
19736 2018-01-18 Martin Liska <mliska@suse.cz>
19738 * config/i386/i386.c (indirect_thunk_name): Document that also
19740 (output_indirect_thunk): Document why both instructions
19741 (pause and lfence) are generated.
19743 2018-01-18 Richard Biener <rguenther@suse.de>
19745 PR tree-optimization/83887
19746 * graphite-scop-detection.c
19747 (scop_detection::get_nearest_dom_with_single_entry): Remove.
19748 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
19749 (scop_detection::merge_sese): Re-implement with a flood-fill
19750 algorithm that properly finds a SESE region if it exists.
19752 2018-01-18 Jakub Jelinek <jakub@redhat.com>
19755 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
19756 pointer_diff optimizations use view_convert instead of convert.
19758 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19760 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19761 Generate different code for -mno-speculate-indirect-jumps.
19762 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19763 (*call_indirect_aix<mode>): Disable for
19764 -mno-speculate-indirect-jumps.
19765 (*call_indirect_aix<mode>_nospec): New define_insn.
19766 (*call_value_indirect_aix<mode>): Disable for
19767 -mno-speculate-indirect-jumps.
19768 (*call_value_indirect_aix<mode>_nospec): New define_insn.
19769 (*sibcall_nonlocal_sysv<mode>): Generate different code for
19770 -mno-speculate-indirect-jumps.
19771 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19773 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
19775 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
19776 long double type, set the flags for noting the default long double
19777 type, even if we don't pass or return a long double type.
19779 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
19782 * ipa-inline.c (flatten_function): Do not overwrite final inlining
19785 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
19787 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
19788 support for merge[hl].
19789 (fold_mergehl_helper): New helper function.
19790 (tree-vector-builder.h): New #include for tree_vector_builder usage.
19791 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
19792 (altivec_vmrglw_direct): Add xxmrglw insn.
19794 2018-01-17 Andrew Waterman <andrew@sifive.com>
19796 * config/riscv/riscv.c (riscv_conditional_register_usage): If
19797 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
19799 2018-01-17 David Malcolm <dmalcolm@redhat.com>
19802 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
19803 call the lto_location_cache before reading the
19804 DECL_SOURCE_LOCATION of the types.
19806 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
19807 Richard Sandiford <richard.sandiford@linaro.org>
19809 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
19810 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
19811 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
19812 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
19813 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
19815 * config/aarch64/constraints.md (aarch64_movti_operand):
19817 * config/aarch64/predicates.md (Uti): Add new constraint.
19819 2018-01-17 Carl Love <cel@us.ibm.com>
19821 * config/rs6000/vsx.md (define_expand xl_len_r,
19822 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
19823 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
19825 (define_expand, define_insn): Move the shift left from the
19826 define_insn to the define_expand for lxvl and stxvl instructions.
19827 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
19828 and XL_LEN_R definitions to PURE.
19830 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
19832 * config/i386/i386.c (indirect_thunk_name): Declare regno
19833 as unsigned int. Compare regno with INVALID_REGNUM.
19834 (output_indirect_thunk): Ditto.
19835 (output_indirect_thunk_function): Ditto.
19836 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
19837 in the call to output_indirect_thunk_function.
19839 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
19841 PR middle-end/83884
19842 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
19843 rather than the size of inner_type to determine the stack slot size
19844 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
19846 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
19849 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
19852 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
19854 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
19855 endian Linux systems to optionally enable multilibs for selecting
19856 the long double type if the user configured an explicit type.
19857 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
19858 have no long double multilibs if not defined.
19859 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
19860 warn if the user used -mabi={ieee,ibm}longdouble and we built
19861 multilibs for long double.
19862 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
19863 appropriate multilib option.
19864 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
19866 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
19867 for building long double multilibs.
19868 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
19870 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
19872 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
19875 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
19877 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
19880 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
19883 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
19886 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
19888 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
19889 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
19891 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
19893 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
19894 different rtl trees depending on TARGET_64BIT.
19895 (rs6000_gen_lvx): Likewise.
19897 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
19899 * config/visium/visium.md (nop): Tweak comment.
19900 (hazard_nop): Likewise.
19902 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19904 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
19905 -mspeculate-indirect-jumps.
19906 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
19907 for -mno-speculate-indirect-jumps.
19908 (*call_indirect_elfv2<mode>_nospec): New define_insn.
19909 (*call_value_indirect_elfv2<mode>): Disable for
19910 -mno-speculate-indirect-jumps.
19911 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
19912 (indirect_jump): Emit different RTL for
19913 -mno-speculate-indirect-jumps.
19914 (*indirect_jump<mode>): Disable for
19915 -mno-speculate-indirect-jumps.
19916 (*indirect_jump<mode>_nospec): New define_insn.
19917 (tablejump): Emit different RTL for
19918 -mno-speculate-indirect-jumps.
19919 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
19920 (tablejumpsi_nospec): New define_expand.
19921 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
19922 (tablejumpdi_nospec): New define_expand.
19923 (*tablejump<mode>_internal1): Disable for
19924 -mno-speculate-indirect-jumps.
19925 (*tablejump<mode>_internal1_nospec): New define_insn.
19926 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
19929 2018-01-16 Artyom Skrobov tyomitch@gmail.com
19931 * caller-save.c (insert_save): Drop unnecessary parameter. All
19934 2018-01-16 Jakub Jelinek <jakub@redhat.com>
19935 Richard Biener <rguenth@suse.de>
19938 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
19939 return early, inline manually is_gimple_sizepos. Make sure if we
19940 call gimplify_expr we don't end up with a gimple constant.
19941 * tree.c (variably_modified_type_p): Don't return true for
19942 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
19943 * gimplify.h (is_gimple_sizepos): Remove.
19945 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19947 PR tree-optimization/83857
19948 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
19949 vectorizable_live_operation for pure SLP statements.
19950 (vectorizable_live_operation): Handle PHIs.
19952 2018-01-16 Richard Biener <rguenther@suse.de>
19954 PR tree-optimization/83867
19955 * tree-vect-stmts.c (vect_transform_stmt): Precompute
19956 nested_in_vect_loop_p since the scalar stmt may get invalidated.
19958 2018-01-16 Jakub Jelinek <jakub@redhat.com>
19961 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
19962 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
19963 If off is not INTEGER_CST, issue a may not be aligned warning
19964 rather than isn't aligned. Use isn%'t rather than isn't.
19965 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
19967 <case MULT_EXPR>: Improve the case when bottom and one of the
19968 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
19969 operand, in that case check if the other operand is multiple of
19970 bottom divided by the INTEGER_CST operand.
19972 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19975 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
19976 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
19977 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
19978 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
19979 * config/pa/pa.c (pa_function_arg_advance): Likewise.
19980 (pa_function_arg, pa_arg_partial_bytes): Likewise.
19981 (pa_function_arg_size): New function.
19983 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19985 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
19986 in a separate statement.
19988 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19990 PR tree-optimization/83847
19991 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
19992 group gathers and scatters.
19994 2018-01-16 Jakub Jelinek <jakub@redhat.com>
19996 PR rtl-optimization/86620
19997 * params.def (max-sched-ready-insns): Bump minimum value to 1.
19999 PR rtl-optimization/83213
20000 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
20001 to last if both are JUMP_INSNs.
20003 PR tree-optimization/83843
20004 * gimple-ssa-store-merging.c
20005 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
20006 store_immediate_info for bswap/nop orig_stores.
20008 2018-01-15 Andrew Waterman <andrew@sifive.com>
20010 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
20012 <UDIV>: Increase cost if !TARGET_DIV.
20014 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
20016 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
20017 (define_attr "cr_logical_3op"): New.
20018 (cceq_ior_compare): Adjust.
20019 (cceq_ior_compare_complement): Adjust.
20020 (*cceq_rev_compare): Adjust.
20021 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
20022 (is_cracked_insn): Adjust.
20023 (insn_must_be_first_in_group): Adjust.
20024 * config/rs6000/40x.md: Adjust.
20025 * config/rs6000/440.md: Adjust.
20026 * config/rs6000/476.md: Adjust.
20027 * config/rs6000/601.md: Adjust.
20028 * config/rs6000/603.md: Adjust.
20029 * config/rs6000/6xx.md: Adjust.
20030 * config/rs6000/7450.md: Adjust.
20031 * config/rs6000/7xx.md: Adjust.
20032 * config/rs6000/8540.md: Adjust.
20033 * config/rs6000/cell.md: Adjust.
20034 * config/rs6000/e300c2c3.md: Adjust.
20035 * config/rs6000/e500mc.md: Adjust.
20036 * config/rs6000/e500mc64.md: Adjust.
20037 * config/rs6000/e5500.md: Adjust.
20038 * config/rs6000/e6500.md: Adjust.
20039 * config/rs6000/mpc.md: Adjust.
20040 * config/rs6000/power4.md: Adjust.
20041 * config/rs6000/power5.md: Adjust.
20042 * config/rs6000/power6.md: Adjust.
20043 * config/rs6000/power7.md: Adjust.
20044 * config/rs6000/power8.md: Adjust.
20045 * config/rs6000/power9.md: Adjust.
20046 * config/rs6000/rs64.md: Adjust.
20047 * config/rs6000/titan.md: Adjust.
20049 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20051 * config/i386/predicates.md (indirect_branch_operand): Rewrite
20052 ix86_indirect_branch_register logic.
20054 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20056 * config/i386/constraints.md (Bs): Update
20057 ix86_indirect_branch_register check. Don't check
20058 ix86_indirect_branch_register with GOT_memory_operand.
20060 * config/i386/predicates.md (GOT_memory_operand): Don't check
20061 ix86_indirect_branch_register here.
20062 (GOT32_symbol_operand): Likewise.
20064 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20066 * config/i386/predicates.md (constant_call_address_operand):
20067 Rewrite ix86_indirect_branch_register logic.
20068 (sibcall_insn_operand): Likewise.
20070 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20072 * config/i386/constraints.md (Bs): Replace
20073 ix86_indirect_branch_thunk_register with
20074 ix86_indirect_branch_register.
20076 * config/i386/i386.md (indirect_jump): Likewise.
20077 (tablejump): Likewise.
20078 (*sibcall_memory): Likewise.
20079 (*sibcall_value_memory): Likewise.
20080 Peepholes of indirect call and jump via memory: Likewise.
20081 * config/i386/i386.opt: Likewise.
20082 * config/i386/predicates.md (indirect_branch_operand): Likewise.
20083 (GOT_memory_operand): Likewise.
20084 (call_insn_operand): Likewise.
20085 (sibcall_insn_operand): Likewise.
20086 (GOT32_symbol_operand): Likewise.
20088 2018-01-15 Jakub Jelinek <jakub@redhat.com>
20090 PR middle-end/83837
20091 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
20092 type rather than type addr's type points to.
20093 (expand_omp_atomic_mutex): Likewise.
20094 (expand_omp_atomic): Likewise.
20096 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20099 * config/i386/i386.c (output_indirect_thunk_function): Use
20100 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
20101 for __x86_return_thunk.
20103 2018-01-15 Richard Biener <rguenther@suse.de>
20105 PR middle-end/83850
20106 * expmed.c (extract_bit_field_1): Fix typo.
20108 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20111 * config/arm/iterators.md (VF): New mode iterator.
20112 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
20113 Remove integer-related logic from pattern.
20114 (neon_vabd<mode>_3): Likewise.
20116 2018-01-15 Jakub Jelinek <jakub@redhat.com>
20118 PR middle-end/82694
20119 * common.opt (fstrict-overflow): No longer an alias.
20120 (fwrapv-pointer): New option.
20121 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
20122 also for pointer types based on flag_wrapv_pointer.
20123 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
20124 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
20125 opts->x_flag_wrapv got set.
20126 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
20127 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
20128 POINTER_TYPE_OVERFLOW_UNDEFINED.
20129 * match.pd: Likewise in address comparison pattern.
20130 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
20132 2018-01-15 Richard Biener <rguenther@suse.de>
20135 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
20136 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
20137 Reset type names to their identifier if their TYPE_DECL doesn't
20138 have linkage (and thus is used for ODR and devirt).
20139 (save_debug_info_for_decl): Remove.
20140 (save_debug_info_for_type): Likewise.
20141 (add_tree_to_fld_list): Adjust.
20142 * tree-pretty-print.c (dump_generic_node): Make dumping of
20143 type names more robust.
20145 2018-01-15 Richard Biener <rguenther@suse.de>
20147 * BASE-VER: Bump to 8.0.1.
20149 2018-01-14 Martin Sebor <msebor@redhat.com>
20152 * builtins.c (check_access): Avoid warning when the no-warning bit
20155 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
20157 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
20158 * ira-color (allocno_hard_regs_compare): Likewise.
20160 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
20163 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
20164 Use .pushsection/.popsection.
20166 2018-01-14 Martin Sebor <msebor@redhat.com>
20169 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
20171 2018-01-14 Jakub Jelinek <jakub@redhat.com>
20173 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
20174 entry from extra_headers.
20175 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
20176 extra_headers, make the list bitwise identical to the i?86-*-* one.
20178 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20180 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
20181 -mcmodel=large with -mindirect-branch=thunk,
20182 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
20183 -mfunction-return=thunk-extern.
20184 * doc/invoke.texi: Document -mcmodel=large is incompatible with
20185 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
20186 -mfunction-return=thunk and -mfunction-return=thunk-extern.
20188 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20190 * config/i386/i386.c (print_reg): Print the name of the full
20191 integer register without '%'.
20192 (ix86_print_operand): Handle 'V'.
20193 * doc/extend.texi: Document 'V' modifier.
20195 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20197 * config/i386/constraints.md (Bs): Disallow memory operand for
20198 -mindirect-branch-register.
20200 * config/i386/predicates.md (indirect_branch_operand): Likewise.
20201 (GOT_memory_operand): Likewise.
20202 (call_insn_operand): Likewise.
20203 (sibcall_insn_operand): Likewise.
20204 (GOT32_symbol_operand): Likewise.
20205 * config/i386/i386.md (indirect_jump): Call convert_memory_address
20206 for -mindirect-branch-register.
20207 (tablejump): Likewise.
20208 (*sibcall_memory): Likewise.
20209 (*sibcall_value_memory): Likewise.
20210 Disallow peepholes of indirect call and jump via memory for
20211 -mindirect-branch-register.
20212 (*call_pop): Replace m with Bw.
20213 (*call_value_pop): Likewise.
20214 (*sibcall_pop_memory): Replace m with Bs.
20215 * config/i386/i386.opt (mindirect-branch-register): New option.
20216 * doc/invoke.texi: Document -mindirect-branch-register option.
20218 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20220 * config/i386/i386-protos.h (ix86_output_function_return): New.
20221 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
20222 set function_return_type.
20223 (indirect_thunk_name): Add ret_p to indicate thunk for function
20225 (output_indirect_thunk_function): Pass false to
20226 indirect_thunk_name.
20227 (ix86_output_indirect_branch_via_reg): Likewise.
20228 (ix86_output_indirect_branch_via_push): Likewise.
20229 (output_indirect_thunk_function): Create alias for function
20230 return thunk if regno < 0.
20231 (ix86_output_function_return): New function.
20232 (ix86_handle_fndecl_attribute): Handle function_return.
20233 (ix86_attribute_table): Add function_return.
20234 * config/i386/i386.h (machine_function): Add
20235 function_return_type.
20236 * config/i386/i386.md (simple_return_internal): Use
20237 ix86_output_function_return.
20238 (simple_return_internal_long): Likewise.
20239 * config/i386/i386.opt (mfunction-return=): New option.
20240 (indirect_branch): Mention -mfunction-return=.
20241 * doc/extend.texi: Document function_return function attribute.
20242 * doc/invoke.texi: Document -mfunction-return= option.
20244 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20246 * config/i386/i386-opts.h (indirect_branch): New.
20247 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
20248 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
20249 with local indirect jump when converting indirect call and jump.
20250 (ix86_set_indirect_branch_type): New.
20251 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
20252 (indirectlabelno): New.
20253 (indirect_thunk_needed): Likewise.
20254 (indirect_thunk_bnd_needed): Likewise.
20255 (indirect_thunks_used): Likewise.
20256 (indirect_thunks_bnd_used): Likewise.
20257 (INDIRECT_LABEL): Likewise.
20258 (indirect_thunk_name): Likewise.
20259 (output_indirect_thunk): Likewise.
20260 (output_indirect_thunk_function): Likewise.
20261 (ix86_output_indirect_branch_via_reg): Likewise.
20262 (ix86_output_indirect_branch_via_push): Likewise.
20263 (ix86_output_indirect_branch): Likewise.
20264 (ix86_output_indirect_jmp): Likewise.
20265 (ix86_code_end): Call output_indirect_thunk_function if needed.
20266 (ix86_output_call_insn): Call ix86_output_indirect_branch if
20268 (ix86_handle_fndecl_attribute): Handle indirect_branch.
20269 (ix86_attribute_table): Add indirect_branch.
20270 * config/i386/i386.h (machine_function): Add indirect_branch_type
20271 and has_local_indirect_jump.
20272 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
20274 (tablejump): Likewise.
20275 (*indirect_jump): Use ix86_output_indirect_jmp.
20276 (*tablejump_1): Likewise.
20277 (simple_return_indirect_internal): Likewise.
20278 * config/i386/i386.opt (mindirect-branch=): New option.
20279 (indirect_branch): New.
20282 (thunk-inline): Likewise.
20283 (thunk-extern): Likewise.
20284 * doc/extend.texi: Document indirect_branch function attribute.
20285 * doc/invoke.texi: Document -mindirect-branch= option.
20287 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
20290 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
20292 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
20294 * ipa-inline.c (want_inline_small_function_p): Return false if
20295 inlining has already failed with CIF_FINAL_ERROR.
20296 (update_caller_keys): Call want_inline_small_function_p before
20298 (update_callee_keys): Likewise.
20300 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
20302 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
20304 (rs6000_quadword_masked_address_p): Likewise.
20305 (quad_aligned_load_p): Likewise.
20306 (quad_aligned_store_p): Likewise.
20307 (const_load_sequence_p): Add comment to describe the outer-most loop.
20308 (mimic_memory_attributes_and_flags): New function.
20309 (rs6000_gen_stvx): Likewise.
20310 (replace_swapped_aligned_store): Likewise.
20311 (rs6000_gen_lvx): Likewise.
20312 (replace_swapped_aligned_load): Likewise.
20313 (replace_swapped_load_constant): Capitalize argument name in
20314 comment describing this function.
20315 (rs6000_analyze_swaps): Add a third pass to search for vector loads
20316 and stores that access quad-word aligned addresses and replace
20317 with stvx or lvx instructions when appropriate.
20318 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
20319 New function prototype.
20320 (rs6000_quadword_masked_address_p): Likewise.
20321 (rs6000_gen_lvx): Likewise.
20322 (rs6000_gen_stvx): Likewise.
20323 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
20324 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
20325 when memory address is aligned.
20326 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
20327 this split to select lvx instruction when memory address is aligned.
20328 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
20329 instruction when memory address is aligned.
20330 (*vsx_le_perm_load_v16qi): Likewise.
20331 (four unnamed splitters): Modify to select the stvx instruction
20332 when memory is aligned.
20334 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
20336 * predict.c (determine_unlikely_bbs): Handle correctly BBs
20337 which appears in the queue multiple times.
20339 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20340 Alan Hayward <alan.hayward@arm.com>
20341 David Sherwood <david.sherwood@arm.com>
20343 * tree-vectorizer.h (vec_lower_bound): New structure.
20344 (_loop_vec_info): Add check_nonzero and lower_bounds.
20345 (LOOP_VINFO_CHECK_NONZERO): New macro.
20346 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
20347 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
20348 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
20349 fields. Make seg_len the distance travelled, not including the
20351 (dr_direction_indicator): Declare.
20352 (dr_zero_step_indicator): Likewise.
20353 (dr_known_forward_stride_p): Likewise.
20354 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
20356 (runtime_alias_check_p): Allow runtime alias checks with
20358 (operator ==): Compare access_size and align.
20359 (prune_runtime_alias_test_list): Rework for new distinction between
20360 the access_size and seg_len.
20361 (create_intersect_range_checks_index): Likewise. Cope with polynomial
20363 (get_segment_min_max): New function.
20364 (create_intersect_range_checks): Use it.
20365 (dr_step_indicator): New function.
20366 (dr_direction_indicator): Likewise.
20367 (dr_zero_step_indicator): Likewise.
20368 (dr_known_forward_stride_p): Likewise.
20369 * tree-loop-distribution.c (data_ref_segment_size): Return
20370 DR_STEP * (niters - 1).
20371 (compute_alias_check_pairs): Update call to the dr_with_seg_len
20373 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
20374 (vect_preserves_scalar_order_p): New function, split out from...
20375 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
20376 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
20377 (vect_vfa_access_size): New function.
20378 (vect_vfa_align): Likewise.
20379 (vect_compile_time_alias): Take access_size_a and access_b arguments.
20380 (dump_lower_bound): New function.
20381 (vect_check_lower_bound): Likewise.
20382 (vect_small_gap_p): Likewise.
20383 (vectorizable_with_step_bound_p): Likewise.
20384 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
20385 depencies if the vectorization factor is 1. Convert the checks
20386 for nonzero steps into checks on the bounds of DR_STEP. Try using
20387 a bunds check for variable steps if the minimum required step is
20388 relatively small. Update calls to the dr_with_seg_len
20389 constructor and to vect_compile_time_alias.
20390 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
20392 (vect_loop_versioning): Call it.
20393 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
20395 (vect_estimate_min_profitable_iters): Account for any bounds checks.
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 * doc/sourcebuild.texi (vect_scatter_store): Document.
20402 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
20404 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
20406 * genopinit.c (main): Add supports_vec_scatter_store and
20407 supports_vec_scatter_store_cached to target_optabs.
20408 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
20409 IFN_MASK_SCATTER_STORE.
20410 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
20412 * internal-fn.h (internal_store_fn_p): Declare.
20413 (internal_fn_stored_value_index): Likewise.
20414 * internal-fn.c (scatter_store_direct): New macro.
20415 (expand_scatter_store_optab_fn): New function.
20416 (direct_scatter_store_optab_supported_p): New macro.
20417 (internal_store_fn_p): New function.
20418 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
20419 IFN_MASK_SCATTER_STORE.
20420 (internal_fn_mask_index): Likewise.
20421 (internal_fn_stored_value_index): New function.
20422 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
20423 for scatter stores.
20424 * optabs-query.h (supports_vec_scatter_store_p): Declare.
20425 * optabs-query.c (supports_vec_scatter_store_p): New function.
20426 * tree-vectorizer.h (vect_get_store_rhs): Declare.
20427 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
20428 true for scatter stores.
20429 (vect_gather_scatter_fn_p): Handle scatter stores too.
20430 (vect_check_gather_scatter): Consider using scatter stores if
20431 supports_vec_scatter_store_p.
20432 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
20433 scatter stores too.
20434 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
20435 internal_fn_stored_value_index.
20436 (check_load_store_masking): Handle scatter stores too.
20437 (vect_get_store_rhs): Make public.
20438 (vectorizable_call): Use internal_store_fn_p.
20439 (vectorizable_store): Handle scatter store internal functions.
20440 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
20441 when deciding whether the end of the group has been reached.
20442 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
20443 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
20444 (mask_scatter_store<mode>): New insns.
20446 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20447 Alan Hayward <alan.hayward@arm.com>
20448 David Sherwood <david.sherwood@arm.com>
20450 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
20451 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
20452 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
20454 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
20455 Use vect_truncate_gather_scatter_offset if we can't treat the
20456 operation as a normal gather load or scatter store.
20457 (get_group_load_store_type): Take the gather_scatter_info
20458 as argument. Try using a gather load or scatter store for
20459 single-element groups.
20460 (get_load_store_type): Update calls to get_group_load_store_type
20461 and vect_use_strided_gather_scatters_p.
20463 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20464 Alan Hayward <alan.hayward@arm.com>
20465 David Sherwood <david.sherwood@arm.com>
20467 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
20468 optional tree argument.
20469 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
20471 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
20472 but continue to use the current value as a fallback.
20473 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
20474 to compare the updates.
20475 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
20476 (get_load_store_type): Use it when handling a strided access.
20477 (vect_get_strided_load_store_ops): New function.
20478 (vect_get_data_ptr_increment): Likewise.
20479 (vectorizable_load): Handle strided gather loads. Always pass
20480 a step to vect_create_data_ref_ptr and bump_vector_ptr.
20482 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20483 Alan Hayward <alan.hayward@arm.com>
20484 David Sherwood <david.sherwood@arm.com>
20486 * doc/md.texi (gather_load@var{m}): Document.
20487 (mask_gather_load@var{m}): Likewise.
20488 * genopinit.c (main): Add supports_vec_gather_load and
20489 supports_vec_gather_load_cached to target_optabs.
20490 * optabs-tree.c (init_tree_optimization_optabs): Use
20491 ggc_cleared_alloc to allocate target_optabs.
20492 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
20493 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
20495 * internal-fn.h (internal_load_fn_p): Declare.
20496 (internal_gather_scatter_fn_p): Likewise.
20497 (internal_fn_mask_index): Likewise.
20498 (internal_gather_scatter_fn_supported_p): Likewise.
20499 * internal-fn.c (gather_load_direct): New macro.
20500 (expand_gather_load_optab_fn): New function.
20501 (direct_gather_load_optab_supported_p): New macro.
20502 (direct_internal_fn_optab): New function.
20503 (internal_load_fn_p): Likewise.
20504 (internal_gather_scatter_fn_p): Likewise.
20505 (internal_fn_mask_index): Likewise.
20506 (internal_gather_scatter_fn_supported_p): Likewise.
20507 * optabs-query.c (supports_at_least_one_mode_p): New function.
20508 (supports_vec_gather_load_p): Likewise.
20509 * optabs-query.h (supports_vec_gather_load_p): Declare.
20510 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
20511 and memory_type field.
20512 (NUM_PATTERNS): Bump to 15.
20513 * tree-vect-data-refs.c: Include internal-fn.h.
20514 (vect_gather_scatter_fn_p): New function.
20515 (vect_describe_gather_scatter_call): Likewise.
20516 (vect_check_gather_scatter): Try using internal functions for
20517 gather loads. Recognize existing calls to a gather load function.
20518 (vect_analyze_data_refs): Consider using gather loads if
20519 supports_vec_gather_load_p.
20520 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
20521 (vect_get_gather_scatter_offset_type): Likewise.
20522 (vect_convert_mask_for_vectype): Likewise.
20523 (vect_add_conversion_to_patterm): Likewise.
20524 (vect_try_gather_scatter_pattern): Likewise.
20525 (vect_recog_gather_scatter_pattern): New pattern recognizer.
20526 (vect_vect_recog_func_ptrs): Add it.
20527 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
20528 internal_fn_mask_index and internal_gather_scatter_fn_p.
20529 (check_load_store_masking): Take the gather_scatter_info as an
20530 argument and handle gather loads.
20531 (vect_get_gather_scatter_ops): New function.
20532 (vectorizable_call): Check internal_load_fn_p.
20533 (vectorizable_load): Likewise. Handle gather load internal
20535 (vectorizable_store): Update call to check_load_store_masking.
20536 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
20537 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
20538 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
20539 (aarch64_gather_scale_operand_d): New predicates.
20540 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
20541 (mask_gather_load<mode>): New insns.
20543 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20544 Alan Hayward <alan.hayward@arm.com>
20545 David Sherwood <david.sherwood@arm.com>
20547 * optabs.def (fold_left_plus_optab): New optab.
20548 * doc/md.texi (fold_left_plus_@var{m}): Document.
20549 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
20550 * internal-fn.c (fold_left_direct): Define.
20551 (expand_fold_left_optab_fn): Likewise.
20552 (direct_fold_left_optab_supported_p): Likewise.
20553 * fold-const-call.c (fold_const_fold_left): New function.
20554 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
20555 * tree-parloops.c (valid_reduction_p): New function.
20556 (gather_scalar_reductions): Use it.
20557 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
20558 (vect_finish_replace_stmt): Declare.
20559 * tree-vect-loop.c (fold_left_reduction_fn): New function.
20560 (needs_fold_left_reduction_p): New function, split out from...
20561 (vect_is_simple_reduction): ...here. Accept reductions that
20562 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
20563 (vect_force_simple_reduction): Also store the reduction type in
20564 the assignment's STMT_VINFO_REDUC_TYPE.
20565 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
20566 (merge_with_identity): New function.
20567 (vect_expand_fold_left): Likewise.
20568 (vectorize_fold_left_reduction): Likewise.
20569 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
20570 scalar phi in place for it. Check for target support and reject
20571 cases that would reassociate the operation. Defer the transform
20572 phase to vectorize_fold_left_reduction.
20573 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
20574 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
20575 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
20577 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20579 * tree-if-conv.c (predicate_mem_writes): Remove redundant
20580 call to ifc_temp_var.
20582 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20583 Alan Hayward <alan.hayward@arm.com>
20584 David Sherwood <david.sherwood@arm.com>
20586 * target.def (legitimize_address_displacement): Take the original
20587 offset as a poly_int.
20588 * targhooks.h (default_legitimize_address_displacement): Update
20590 * targhooks.c (default_legitimize_address_displacement): Likewise.
20591 * doc/tm.texi: Regenerate.
20592 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
20593 as an argument, moving assert of ad->disp == ad->disp_term to...
20594 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
20595 Try calling targetm.legitimize_address_displacement before expanding
20596 the address rather than afterwards, and adjust for the new interface.
20597 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
20598 Match the new hook interface. Handle SVE addresses.
20599 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
20600 new hook interface.
20602 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20604 * Makefile.in (OBJS): Add early-remat.o.
20605 * target.def (select_early_remat_modes): New hook.
20606 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
20607 * doc/tm.texi: Regenerate.
20608 * targhooks.h (default_select_early_remat_modes): Declare.
20609 * targhooks.c (default_select_early_remat_modes): New function.
20610 * timevar.def (TV_EARLY_REMAT): New timevar.
20611 * passes.def (pass_early_remat): New pass.
20612 * tree-pass.h (make_pass_early_remat): Declare.
20613 * early-remat.c: New file.
20614 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
20616 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
20618 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20619 Alan Hayward <alan.hayward@arm.com>
20620 David Sherwood <david.sherwood@arm.com>
20622 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
20623 vfm1 with a bound_epilog parameter.
20624 (vect_do_peeling): Update calls accordingly, and move the prologue
20625 call earlier in the function. Treat the base bound_epilog as 0 for
20626 fully-masked loops and retain vf - 1 for other loops. Add 1 to
20627 this base when peeling for gaps.
20628 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
20629 with fully-masked loops.
20630 (vect_estimate_min_profitable_iters): Handle the single peeled
20631 iteration in that case.
20633 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20634 Alan Hayward <alan.hayward@arm.com>
20635 David Sherwood <david.sherwood@arm.com>
20637 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
20638 single-element interleaving even if the size is not a power of 2.
20639 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
20640 accesses for single-element interleaving if the group size is
20643 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20644 Alan Hayward <alan.hayward@arm.com>
20645 David Sherwood <david.sherwood@arm.com>
20647 * doc/md.texi (fold_extract_last_@var{m}): Document.
20648 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
20649 * optabs.def (fold_extract_last_optab): New optab.
20650 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
20651 * internal-fn.c (fold_extract_direct): New macro.
20652 (expand_fold_extract_optab_fn): Likewise.
20653 (direct_fold_extract_optab_supported_p): Likewise.
20654 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
20655 * tree-vect-loop.c (vect_model_reduction_cost): Handle
20656 EXTRACT_LAST_REDUCTION.
20657 (get_initial_def_for_reduction): Do not create an initial vector
20658 for EXTRACT_LAST_REDUCTION reductions.
20659 (vectorizable_reduction): Leave the scalar phi in place for
20660 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
20661 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
20662 epilogue code for EXTRACT_LAST_REDUCTION and defer the
20663 transform phase to vectorizable_condition.
20664 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
20666 (vect_finish_stmt_generation): ...here.
20667 (vect_finish_replace_stmt): New function.
20668 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
20669 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
20671 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
20673 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20674 Alan Hayward <alan.hayward@arm.com>
20675 David Sherwood <david.sherwood@arm.com>
20677 * doc/md.texi (extract_last_@var{m}): Document.
20678 * optabs.def (extract_last_optab): New optab.
20679 * internal-fn.def (EXTRACT_LAST): New internal function.
20680 * internal-fn.c (cond_unary_direct): New macro.
20681 (expand_cond_unary_optab_fn): Likewise.
20682 (direct_cond_unary_optab_supported_p): Likewise.
20683 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
20684 loops using EXTRACT_LAST.
20685 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
20686 (extract_last_<mode>): ...this optab.
20687 (vec_extract<mode><Vel>): Update accordingly.
20689 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20690 Alan Hayward <alan.hayward@arm.com>
20691 David Sherwood <david.sherwood@arm.com>
20693 * target.def (empty_mask_is_expensive): New hook.
20694 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
20695 * doc/tm.texi: Regenerate.
20696 * targhooks.h (default_empty_mask_is_expensive): Declare.
20697 * targhooks.c (default_empty_mask_is_expensive): New function.
20698 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
20699 if the target says that empty masks are expensive.
20700 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
20702 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
20704 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20705 Alan Hayward <alan.hayward@arm.com>
20706 David Sherwood <david.sherwood@arm.com>
20708 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
20709 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
20710 (vect_use_loop_mask_for_alignment_p): New function.
20711 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
20712 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
20713 niters_skip argument. Make sure that the first niters_skip elements
20714 of the first iteration are inactive.
20715 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
20716 Update call to vect_set_loop_masks_directly.
20717 (get_misalign_in_elems): New function, split out from...
20718 (vect_gen_prolog_loop_niters): ...here.
20719 (vect_update_init_of_dr): Take a code argument that specifies whether
20720 the adjustment should be added or subtracted.
20721 (vect_update_init_of_drs): Likewise.
20722 (vect_prepare_for_masked_peels): New function.
20723 (vect_do_peeling): Skip prologue peeling if we're using a mask
20724 instead. Update call to vect_update_inits_of_drs.
20725 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
20727 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
20728 alignment. Do not include the number of peeled iterations in
20729 the minimum threshold in that case.
20730 (vectorizable_induction): Adjust the start value down by
20731 LOOP_VINFO_MASK_SKIP_NITERS iterations.
20732 (vect_transform_loop): Call vect_prepare_for_masked_peels.
20733 Take the number of skipped iterations into account when calculating
20735 * tree-vect-stmts.c (vect_gen_while_not): New function.
20737 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20738 Alan Hayward <alan.hayward@arm.com>
20739 David Sherwood <david.sherwood@arm.com>
20741 * doc/sourcebuild.texi (vect_fully_masked): Document.
20742 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
20743 default value to 0.
20744 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
20746 (vect_analyze_loop_2): ...here. Don't check the vectorization
20747 factor against the number of loop iterations if the loop is
20750 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20751 Alan Hayward <alan.hayward@arm.com>
20752 David Sherwood <david.sherwood@arm.com>
20754 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
20755 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
20756 (dump_groups): Update accordingly.
20757 (iv_use::mem_type): New member variable.
20758 (address_p): New function.
20759 (record_use): Add a mem_type argument and initialize the new
20761 (record_group_use): Add a mem_type argument. Use address_p.
20762 Remove obsolete null checks of base_object. Update call to record_use.
20763 (find_interesting_uses_op): Update call to record_group_use.
20764 (find_interesting_uses_cond): Likewise.
20765 (find_interesting_uses_address): Likewise.
20766 (get_mem_type_for_internal_fn): New function.
20767 (find_address_like_use): Likewise.
20768 (find_interesting_uses_stmt): Try find_address_like_use before
20769 calling find_interesting_uses_op.
20770 (addr_offset_valid_p): Use the iv mem_type field as the type
20771 of the addressed memory.
20772 (add_autoinc_candidates): Likewise.
20773 (get_address_cost): Likewise.
20774 (split_small_address_groups_p): Use address_p.
20775 (split_address_groups): Likewise.
20776 (add_iv_candidate_for_use): Likewise.
20777 (autoinc_possible_for_pair): Likewise.
20778 (rewrite_groups): Likewise.
20779 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
20780 (determine_group_iv_cost): Update after split of USE_ADDRESS.
20781 (get_alias_ptr_type_for_ptr_address): New function.
20782 (rewrite_use_address): Rewrite address uses in calls that were
20783 identified by find_address_like_use.
20785 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20786 Alan Hayward <alan.hayward@arm.com>
20787 David Sherwood <david.sherwood@arm.com>
20789 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
20791 * gimple-expr.h (is_gimple_addressable: Likewise.
20792 * gimple-expr.c (is_gimple_address): Likewise.
20793 * internal-fn.c (expand_call_mem_ref): New function.
20794 (expand_mask_load_optab_fn): Use it.
20795 (expand_mask_store_optab_fn): Likewise.
20797 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20798 Alan Hayward <alan.hayward@arm.com>
20799 David Sherwood <david.sherwood@arm.com>
20801 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
20802 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
20803 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
20804 (cond_umax@var{mode}): Document.
20805 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
20806 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
20807 (cond_umin_optab, cond_umax_optab): New optabs.
20808 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
20809 (COND_IOR, COND_XOR): New internal functions.
20810 * internal-fn.h (get_conditional_internal_fn): Declare.
20811 * internal-fn.c (cond_binary_direct): New macro.
20812 (expand_cond_binary_optab_fn): Likewise.
20813 (direct_cond_binary_optab_supported_p): Likewise.
20814 (get_conditional_internal_fn): New function.
20815 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
20816 Cope with reduction statements that are vectorized as calls rather
20818 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
20819 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
20820 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
20821 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
20822 (UNSPEC_COND_EOR): New unspecs.
20823 (optab): Add mappings for them.
20824 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
20825 (sve_int_op, sve_fp_op): New int attributes.
20827 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20828 Alan Hayward <alan.hayward@arm.com>
20829 David Sherwood <david.sherwood@arm.com>
20831 * optabs.def (while_ult_optab): New optab.
20832 * doc/md.texi (while_ult@var{m}@var{n}): Document.
20833 * internal-fn.def (WHILE_ULT): New internal function.
20834 * internal-fn.h (direct_internal_fn_supported_p): New override
20835 that takes two types as argument.
20836 * internal-fn.c (while_direct): New macro.
20837 (expand_while_optab_fn): New function.
20838 (convert_optab_supported_p): Likewise.
20839 (direct_while_optab_supported_p): New macro.
20840 * wide-int.h (wi::udiv_ceil): New function.
20841 * tree-vectorizer.h (rgroup_masks): New structure.
20842 (vec_loop_masks): New typedef.
20843 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
20844 and fully_masked_p.
20845 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
20846 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
20847 (vect_max_vf): New function.
20848 (slpeel_make_loop_iterate_ntimes): Delete.
20849 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
20850 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
20851 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
20852 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
20853 internal-fn.h, stor-layout.h and optabs-query.h.
20854 (vect_set_loop_mask): New function.
20855 (add_preheader_seq): Likewise.
20856 (add_header_seq): Likewise.
20857 (interleave_supported_p): Likewise.
20858 (vect_maybe_permute_loop_masks): Likewise.
20859 (vect_set_loop_masks_directly): Likewise.
20860 (vect_set_loop_condition_masked): Likewise.
20861 (vect_set_loop_condition_unmasked): New function, split out from
20862 slpeel_make_loop_iterate_ntimes.
20863 (slpeel_make_loop_iterate_ntimes): Rename to..
20864 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
20865 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
20866 (vect_do_peeling): Update call accordingly.
20867 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
20869 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
20870 mask_compare_type, can_fully_mask_p and fully_masked_p.
20871 (release_vec_loop_masks): New function.
20872 (_loop_vec_info): Use it to free the loop masks.
20873 (can_produce_all_loop_masks_p): New function.
20874 (vect_get_max_nscalars_per_iter): Likewise.
20875 (vect_verify_full_masking): Likewise.
20876 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
20877 retries, and free the mask rgroups before retrying. Check loop-wide
20878 reasons for disallowing fully-masked loops. Make the final decision
20879 about whether use a fully-masked loop or not.
20880 (vect_estimate_min_profitable_iters): Do not assume that peeling
20881 for the number of iterations will be needed for fully-masked loops.
20882 (vectorizable_reduction): Disable fully-masked loops.
20883 (vectorizable_live_operation): Likewise.
20884 (vect_halve_mask_nunits): New function.
20885 (vect_double_mask_nunits): Likewise.
20886 (vect_record_loop_mask): Likewise.
20887 (vect_get_loop_mask): Likewise.
20888 (vect_transform_loop): Handle the case in which the final loop
20889 iteration might handle a partial vector. Call vect_set_loop_condition
20890 instead of slpeel_make_loop_iterate_ntimes.
20891 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
20892 (check_load_store_masking): New function.
20893 (prepare_load_store_mask): Likewise.
20894 (vectorizable_store): Handle fully-masked loops.
20895 (vectorizable_load): Likewise.
20896 (supportable_widening_operation): Use vect_halve_mask_nunits for
20898 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
20899 (vect_gen_while): New function.
20900 * config/aarch64/aarch64.md (umax<mode>3): New expander.
20901 (aarch64_uqdec<mode>): New insn.
20903 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20904 Alan Hayward <alan.hayward@arm.com>
20905 David Sherwood <david.sherwood@arm.com>
20907 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
20908 (reduc_xor_scal_optab): New optabs.
20909 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
20910 (reduc_xor_scal_@var{m}): Document.
20911 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
20912 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
20913 internal functions.
20914 * fold-const-call.c (fold_const_call): Handle them.
20915 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
20916 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
20917 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
20918 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
20919 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
20920 (UNSPEC_XORV): New unspecs.
20921 (optab): Add entries for them.
20922 (BITWISEV): New int iterator.
20923 (bit_reduc_op): New int attributes.
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_shl_insert_@var{m}): New optab.
20930 * internal-fn.def (VEC_SHL_INSERT): New internal function.
20931 * optabs.def (vec_shl_insert_optab): New optab.
20932 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
20933 (duplicate_and_interleave): Likewise.
20934 * tree-vect-loop.c: Include internal-fn.h.
20935 (neutral_op_for_slp_reduction): New function, split out from
20936 get_initial_defs_for_reduction.
20937 (get_initial_def_for_reduction): Handle option 2 for variable-length
20938 vectors by loading the neutral value into a vector and then shifting
20939 the initial value into element 0.
20940 (get_initial_defs_for_reduction): Replace the code argument with
20941 the neutral value calculated by neutral_op_for_slp_reduction.
20942 Use gimple_build_vector for constant-length vectors.
20943 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
20944 but the first group_size elements have a neutral value.
20945 Use duplicate_and_interleave otherwise.
20946 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
20947 Update call to get_initial_defs_for_reduction. Handle SLP
20948 reductions for variable-length vectors by creating one vector
20949 result for each scalar result, with the elements associated
20950 with other scalar results stubbed out with the neutral value.
20951 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
20952 Require IFN_VEC_SHL_INSERT for double reductions on
20953 variable-length vectors, or SLP reductions that have
20954 a neutral value. Require can_duplicate_and_interleave_p
20955 support for variable-length unchained SLP reductions if there
20956 is no neutral value, such as for MIN/MAX reductions. Also require
20957 the number of vector elements to be a multiple of the number of
20958 SLP statements when doing variable-length unchained SLP reductions.
20959 Update call to vect_create_epilog_for_reduction.
20960 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
20961 and remove initial values.
20962 (duplicate_and_interleave): Make public.
20963 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
20964 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
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 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
20971 (can_duplicate_and_interleave_p): New function.
20972 (vect_get_and_check_slp_defs): Take the vector of statements
20973 rather than just the current one. Remove excess parentheses.
20974 Restriction rejectinon of vect_constant_def and vect_external_def
20975 for variable-length vectors to boolean types, or types for which
20976 can_duplicate_and_interleave_p is false.
20977 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
20978 (duplicate_and_interleave): New function.
20979 (vect_get_constant_vectors): Use gimple_build_vector for
20980 constant-length vectors and suitable variable-length constant
20981 vectors. Use duplicate_and_interleave for other variable-length
20982 vectors. Don't defer the update when inserting new statements.
20984 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20985 Alan Hayward <alan.hayward@arm.com>
20986 David Sherwood <david.sherwood@arm.com>
20988 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
20989 min_profitable_iters doesn't go negative.
20991 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20992 Alan Hayward <alan.hayward@arm.com>
20993 David Sherwood <david.sherwood@arm.com>
20995 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
20996 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
20997 * optabs.def (vec_mask_load_lanes_optab): New optab.
20998 (vec_mask_store_lanes_optab): Likewise.
20999 * internal-fn.def (MASK_LOAD_LANES): New internal function.
21000 (MASK_STORE_LANES): Likewise.
21001 * internal-fn.c (mask_load_lanes_direct): New macro.
21002 (mask_store_lanes_direct): Likewise.
21003 (expand_mask_load_optab_fn): Handle masked operations.
21004 (expand_mask_load_lanes_optab_fn): New macro.
21005 (expand_mask_store_optab_fn): Handle masked operations.
21006 (expand_mask_store_lanes_optab_fn): New macro.
21007 (direct_mask_load_lanes_optab_supported_p): Likewise.
21008 (direct_mask_store_lanes_optab_supported_p): Likewise.
21009 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
21011 (vect_load_lanes_supported): Likewise.
21012 * tree-vect-data-refs.c (strip_conversion): New function.
21013 (can_group_stmts_p): Likewise.
21014 (vect_analyze_data_ref_accesses): Use it instead of checking
21015 for a pair of assignments.
21016 (vect_store_lanes_supported): Take a masked_p parameter.
21017 (vect_load_lanes_supported): Likewise.
21018 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
21019 vect_store_lanes_supported and vect_load_lanes_supported.
21020 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
21021 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
21022 parameter. Don't allow gaps for masked accesses.
21023 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
21024 and vect_load_lanes_supported.
21025 (get_load_store_type): Take a masked_p parameter and update
21026 call to get_group_load_store_type.
21027 (vectorizable_store): Update call to get_load_store_type.
21028 Handle IFN_MASK_STORE_LANES.
21029 (vectorizable_load): Update call to get_load_store_type.
21030 Handle IFN_MASK_LOAD_LANES.
21032 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21033 Alan Hayward <alan.hayward@arm.com>
21034 David Sherwood <david.sherwood@arm.com>
21036 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
21038 * config/aarch64/aarch64-protos.h
21039 (aarch64_sve_struct_memory_operand_p): Declare.
21040 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
21041 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
21042 (VPRED, vpred): Handle SVE structure modes.
21043 * config/aarch64/constraints.md (Utx): New constraint.
21044 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
21045 (aarch64_sve_struct_nonimmediate_operand): New predicates.
21046 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
21047 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
21048 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
21049 structure modes. Split into pieces after RA.
21050 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
21051 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
21053 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
21054 SVE structure modes.
21055 (aarch64_classify_address): Likewise.
21056 (sizetochar): Move earlier in file.
21057 (aarch64_print_operand): Handle SVE register lists.
21058 (aarch64_array_mode): New function.
21059 (aarch64_sve_struct_memory_operand_p): Likewise.
21060 (TARGET_ARRAY_MODE): Redefine.
21062 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21063 Alan Hayward <alan.hayward@arm.com>
21064 David Sherwood <david.sherwood@arm.com>
21066 * target.def (array_mode): New target hook.
21067 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
21068 * doc/tm.texi: Regenerate.
21069 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
21070 * hooks.c (hook_optmode_mode_uhwi_none): New function.
21071 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
21072 targetm.array_mode.
21073 * stor-layout.c (mode_for_array): Likewise. Support polynomial
21076 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21077 Alan Hayward <alan.hayward@arm.com>
21078 David Sherwood <david.sherwood@arm.com>
21080 * fold-const.c (fold_binary_loc): Check the argument types
21081 rather than the result type when testing for a vector operation.
21083 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21085 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
21086 * doc/tm.texi: Regenerate.
21088 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21089 Alan Hayward <alan.hayward@arm.com>
21090 David Sherwood <david.sherwood@arm.com>
21092 * doc/invoke.texi (-msve-vector-bits=): Document new option.
21093 (sve): Document new AArch64 extension.
21094 * doc/md.texi (w): Extend the description of the AArch64
21095 constraint to include SVE vectors.
21096 (Upl, Upa): Document new AArch64 predicate constraints.
21097 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
21099 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
21100 (msve-vector-bits=): New option.
21101 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
21102 SVE when these are disabled.
21103 (sve): New extension.
21104 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
21105 modes. Adjust their number of units based on aarch64_sve_vg.
21106 (MAX_BITSIZE_MODE_ANY_MODE): Define.
21107 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
21108 aarch64_addr_query_type.
21109 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
21110 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
21111 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
21112 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
21113 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
21114 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
21115 (aarch64_simd_imm_zero_p): Delete.
21116 (aarch64_check_zero_based_sve_index_immediate): Declare.
21117 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
21118 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
21119 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
21120 (aarch64_sve_float_mul_immediate_p): Likewise.
21121 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
21122 rather than an rtx.
21123 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
21124 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
21125 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
21126 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
21127 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
21128 (aarch64_regmode_natural_size): Likewise.
21129 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
21130 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
21132 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
21133 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
21134 for VG and the SVE predicate registers.
21135 (V_ALIASES): Add a "z"-prefixed alias.
21136 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
21137 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
21138 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
21139 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
21140 (REG_CLASS_NAMES): Add entries for them.
21141 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
21142 and the predicate registers.
21143 (aarch64_sve_vg): Declare.
21144 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
21145 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
21146 (REGMODE_NATURAL_SIZE): Define.
21147 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
21149 * config/aarch64/aarch64.c: Include cfgrtl.h.
21150 (simd_immediate_info): Add a constructor for series vectors,
21151 and an associated step field.
21152 (aarch64_sve_vg): New variable.
21153 (aarch64_dbx_register_number): Handle VG and the predicate registers.
21154 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
21155 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
21156 (VEC_ANY_DATA, VEC_STRUCT): New constants.
21157 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
21158 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
21159 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
21160 (aarch64_get_mask_mode): New functions.
21161 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
21162 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
21163 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
21164 predicate modes and predicate registers. Explicitly restrict
21165 GPRs to modes of 16 bytes or smaller. Only allow FP registers
21166 to store a vector mode if it is recognized by
21167 aarch64_classify_vector_mode.
21168 (aarch64_regmode_natural_size): New function.
21169 (aarch64_hard_regno_caller_save_mode): Return the original mode
21171 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
21172 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
21173 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
21174 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
21176 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
21177 does not overlap dest if the function is frame-related. Handle
21179 (aarch64_split_add_offset): New function.
21180 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
21181 them aarch64_add_offset.
21182 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
21183 and update call to aarch64_sub_sp.
21184 (aarch64_add_cfa_expression): New function.
21185 (aarch64_expand_prologue): Pass extra temporary registers to the
21186 functions above. Handle the case in which we need to emit new
21187 DW_CFA_expressions for registers that were originally saved
21188 relative to the stack pointer, but now have to be expressed
21189 relative to the frame pointer.
21190 (aarch64_output_mi_thunk): Pass extra temporary registers to the
21192 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
21193 IP0 and IP1 values for SVE frames.
21194 (aarch64_expand_vec_series): New function.
21195 (aarch64_expand_sve_widened_duplicate): Likewise.
21196 (aarch64_expand_sve_const_vector): Likewise.
21197 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
21198 Handle SVE constants. Use emit_move_insn to move a force_const_mem
21199 into the register, rather than emitting a SET directly.
21200 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
21201 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
21202 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
21203 (offset_9bit_signed_scaled_p): New functions.
21204 (aarch64_replicate_bitmask_imm): New function.
21205 (aarch64_bitmask_imm): Use it.
21206 (aarch64_cannot_force_const_mem): Reject expressions involving
21207 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
21208 (aarch64_classify_index): Handle SVE indices, by requiring
21209 a plain register index with a scale that matches the element size.
21210 (aarch64_classify_address): Handle SVE addresses. Assert that
21211 the mode of the address is VOIDmode or an integer mode.
21212 Update call to aarch64_classify_symbol.
21213 (aarch64_classify_symbolic_expression): Update call to
21214 aarch64_classify_symbol.
21215 (aarch64_const_vec_all_in_range_p): New function.
21216 (aarch64_print_vector_float_operand): Likewise.
21217 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
21218 "vN" for FP registers with SVE modes. Handle (const ...) vectors
21219 and the FP immediates 1.0 and 0.5.
21220 (aarch64_print_address_internal): Handle SVE addresses.
21221 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
21222 (aarch64_regno_regclass): Handle predicate registers.
21223 (aarch64_secondary_reload): Handle big-endian reloads of SVE
21225 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
21226 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
21227 (aarch64_convert_sve_vector_bits): New function.
21228 (aarch64_override_options): Use it to handle -msve-vector-bits=.
21229 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
21230 rather than an rtx.
21231 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
21232 Handle SVE vector and predicate modes. Accept VL-based constants
21233 that need only one temporary register, and VL offsets that require
21234 no temporary registers.
21235 (aarch64_conditional_register_usage): Mark the predicate registers
21236 as fixed if SVE isn't available.
21237 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
21238 Return true for SVE vector and predicate modes.
21239 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
21240 rather than an unsigned int. Handle SVE modes.
21241 (aarch64_preferred_simd_mode): Update call accordingly. Handle
21243 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
21245 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
21246 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
21247 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
21248 (aarch64_sve_float_mul_immediate_p): New functions.
21249 (aarch64_sve_valid_immediate): New function.
21250 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
21251 Explicitly reject structure modes. Check for INDEX constants.
21252 Handle PTRUE and PFALSE constants.
21253 (aarch64_check_zero_based_sve_index_immediate): New function.
21254 (aarch64_simd_imm_zero_p): Delete.
21255 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
21256 vector modes. Accept constants in the range of CNT[BHWD].
21257 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
21258 ask for an Advanced SIMD mode.
21259 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
21260 (aarch64_simd_vector_alignment): Handle SVE predicates.
21261 (aarch64_vectorize_preferred_vector_alignment): New function.
21262 (aarch64_simd_vector_alignment_reachable): Use it instead of
21264 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
21265 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
21267 (MAX_VECT_LEN): Delete.
21268 (expand_vec_perm_d): Add a vec_flags field.
21269 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
21270 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
21271 (aarch64_evpc_ext): Don't apply a big-endian lane correction
21273 (aarch64_evpc_rev): Rename to...
21274 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
21275 (aarch64_evpc_rev_global): New function.
21276 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
21277 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
21279 (aarch64_evpc_sve_tbl): New function.
21280 (aarch64_expand_vec_perm_const_1): Update after rename of
21281 aarch64_evpc_rev. Handle SVE permutes too, trying
21282 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
21283 than aarch64_evpc_tbl.
21284 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
21285 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
21286 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
21287 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
21288 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
21289 (aarch64_expand_sve_vcond): New functions.
21290 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
21291 of aarch64_vector_mode_p.
21292 (aarch64_dwarf_poly_indeterminate_value): New function.
21293 (aarch64_compute_pressure_classes): Likewise.
21294 (aarch64_can_change_mode_class): Likewise.
21295 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
21296 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
21297 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
21298 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
21299 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
21300 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
21301 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
21302 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
21304 (Dn, Dl, Dr): Accept const as well as const_vector.
21305 (Dz): Likewise. Compare against CONST0_RTX.
21306 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
21307 of "vector" where appropriate.
21308 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
21309 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
21310 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
21311 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
21312 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
21313 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
21314 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
21315 (v_int_equiv): Extend to SVE modes.
21316 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
21318 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
21319 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
21320 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
21321 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
21322 (SVE_COND_FP_CMP): New int iterators.
21323 (perm_hilo): Handle the new unpack unspecs.
21324 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
21326 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
21327 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
21328 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
21329 (aarch64_equality_operator, aarch64_constant_vector_operand)
21330 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
21331 (aarch64_sve_nonimmediate_operand): Likewise.
21332 (aarch64_sve_general_operand): Likewise.
21333 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
21334 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
21335 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
21336 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
21337 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
21338 (aarch64_sve_float_arith_immediate): Likewise.
21339 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
21340 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
21341 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
21342 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
21343 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
21344 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
21345 (aarch64_sve_float_arith_operand): Likewise.
21346 (aarch64_sve_float_arith_with_sub_operand): Likewise.
21347 (aarch64_sve_float_mul_operand): Likewise.
21348 (aarch64_sve_vec_perm_operand): Likewise.
21349 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
21350 (aarch64_mov_operand): Accept const_poly_int and const_vector.
21351 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
21352 as well as const_vector.
21353 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
21354 in file. Use CONST0_RTX and CONSTM1_RTX.
21355 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
21356 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
21357 Use aarch64_simd_imm_zero.
21358 * config/aarch64/aarch64-sve.md: New file.
21359 * config/aarch64/aarch64.md: Include it.
21360 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
21361 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
21362 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
21363 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
21364 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
21365 (sve): New attribute.
21366 (enabled): Disable instructions with the sve attribute unless
21368 (movqi, movhi): Pass CONST_POLY_INT operaneds through
21369 aarch64_expand_mov_immediate.
21370 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
21371 CNT[BHSD] immediates.
21372 (movti): Split CONST_POLY_INT moves into two halves.
21373 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
21374 Split additions that need a temporary here if the destination
21375 is the stack pointer.
21376 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
21377 (*add<mode>3_poly_1): New instruction.
21378 (set_clobber_cc): New expander.
21380 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21382 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
21383 parameter and use it instead of GET_MODE_SIZE (innermode). Use
21384 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
21385 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
21386 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
21387 Change innermode from fixed_mode_size to machine_mode.
21388 (simplify_subreg): Update call accordingly. Handle a constant-sized
21389 subreg of a variable-length CONST_VECTOR.
21391 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21392 Alan Hayward <alan.hayward@arm.com>
21393 David Sherwood <david.sherwood@arm.com>
21395 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
21396 (add_offset_to_base): New function, split out from...
21397 (create_mem_ref): ...here. When handling a scale other than 1,
21398 check first whether the address is valid without the offset.
21399 Add it into the base if so, leaving the index and scale as-is.
21401 2018-01-12 Jakub Jelinek <jakub@redhat.com>
21404 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
21405 fold_for_warn before checking if arg2 is INTEGER_CST.
21407 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
21409 * config/rs6000/predicates.md (load_multiple_operation): Delete.
21410 (store_multiple_operation): Delete.
21411 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
21412 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
21413 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
21414 guarded by TARGET_STRING.
21415 (rs6000_output_load_multiple): Delete.
21416 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
21417 OPTION_MASK_STRING / TARGET_STRING handling.
21418 (print_operand) <'N', 'O'>: Add comment that these are unused now.
21419 (const rs6000_opt_masks) <"string">: Change mask to 0.
21420 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
21421 (MASK_STRING): Delete.
21422 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
21424 (load_multiple): Delete.
21431 (store_multiple): Delete.
21438 (movmemsi_8reg): Delete.
21439 (corresponding unnamed define_insn): Delete.
21440 (movmemsi_6reg): Delete.
21441 (corresponding unnamed define_insn): Delete.
21442 (movmemsi_4reg): Delete.
21443 (corresponding unnamed define_insn): Delete.
21444 (movmemsi_2reg): Delete.
21445 (corresponding unnamed define_insn): Delete.
21446 (movmemsi_1reg): Delete.
21447 (corresponding unnamed define_insn): Delete.
21448 * config/rs6000/rs6000.opt (mno-string): New.
21449 (mstring): Replace by deprecation warning stub.
21450 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
21452 2018-01-12 Jakub Jelinek <jakub@redhat.com>
21454 * regrename.c (regrename_do_replace): If replacing the same
21455 reg multiple times, try to reuse last created gen_raw_REG.
21458 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
21459 main to workaround a bug in GDB.
21461 2018-01-12 Tom de Vries <tom@codesourcery.com>
21464 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
21466 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
21468 PR rtl-optimization/80481
21469 * ira-color.c (get_cap_member): New function.
21470 (allocnos_conflict_by_live_ranges_p): Use it.
21471 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
21472 (setup_slot_coalesced_allocno_live_ranges): Ditto.
21474 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
21477 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
21478 (*saddl_se_1): Ditto.
21479 (*ssubsi_1): Ditto.
21480 (*ssubl_se_1): Ditto.
21482 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
21484 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
21485 rather than wi::to_widest for DR_INITs.
21486 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
21487 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
21488 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
21490 (vect_analyze_group_access_1): Note that here.
21492 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
21494 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
21495 polynomial type sizes.
21497 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
21499 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
21500 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
21501 (gimple_add_tmp_var): Likewise.
21503 2018-01-12 Martin Liska <mliska@suse.cz>
21505 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
21506 (gimple_alloc_sizes): Likewise.
21507 (dump_gimple_statistics): Use PRIu64 in printf format.
21508 * gimple.h: Change uint64_t to int.
21510 2018-01-12 Martin Liska <mliska@suse.cz>
21512 * tree-core.h: Use uint64_t instead of int.
21513 * tree.c (tree_node_counts): Likewise.
21514 (tree_node_sizes): Likewise.
21515 (dump_tree_statistics): Use PRIu64 in printf format.
21517 2018-01-12 Martin Liska <mliska@suse.cz>
21519 * Makefile.in: As qsort_chk is implemented in vec.c, add
21520 vec.o to linkage of gencfn-macros.
21521 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
21522 passing the info to record_node_allocation_statistics.
21523 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
21525 * ggc-common.c (struct ggc_usage): Add operator== and use
21526 it in operator< and compare function.
21527 * mem-stats.h (struct mem_usage): Likewise.
21528 * vec.c (struct vec_usage): Remove operator< and compare
21529 function. Can be simply inherited.
21531 2018-01-12 Martin Jambor <mjambor@suse.cz>
21534 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
21535 * tree-ssa-math-opts.c: Include domwalk.h.
21536 (convert_mult_to_fma_1): New function.
21537 (fma_transformation_info): New type.
21538 (fma_deferring_state): Likewise.
21539 (cancel_fma_deferring): New function.
21540 (result_of_phi): Likewise.
21541 (last_fma_candidate_feeds_initial_phi): Likewise.
21542 (convert_mult_to_fma): Added deferring logic, split actual
21543 transformation to convert_mult_to_fma_1.
21544 (math_opts_dom_walker): New type.
21545 (math_opts_dom_walker::after_dom_children): New method, body moved
21546 here from pass_optimize_widening_mul::execute, added deferring logic
21548 (pass_optimize_widening_mul::execute): Moved most of code to
21549 math_opts_dom_walker::after_dom_children.
21550 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
21551 * config/i386/i386.c (ix86_option_override_internal): Added
21552 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
21554 2018-01-12 Richard Biener <rguenther@suse.de>
21557 * dwarf2out.c (gen_variable_die): Do not reset old_die for
21558 inline instance vars.
21560 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
21563 * config/rx/rx.c (rx_is_restricted_memory_address):
21564 Handle SUBREG case.
21566 2018-01-12 Richard Biener <rguenther@suse.de>
21568 PR tree-optimization/80846
21569 * target.def (split_reduction): New target hook.
21570 * targhooks.c (default_split_reduction): New function.
21571 * targhooks.h (default_split_reduction): Declare.
21572 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
21573 target requests first reduce vectors by combining low and high
21575 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
21576 (get_vectype_for_scalar_type_and_size): Export.
21577 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
21578 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
21579 * doc/tm.texi: Regenerate.
21580 * config/i386/i386.c (ix86_split_reduction): Implement
21581 TARGET_VECTORIZE_SPLIT_REDUCTION.
21583 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
21586 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
21587 in PIC mode except for TARGET_VXWORKS_RTP.
21588 * config/sparc/sparc.c: Include cfgrtl.h.
21589 (TARGET_INIT_PIC_REG): Define.
21590 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
21591 (sparc_pic_register_p): New predicate.
21592 (sparc_legitimate_address_p): Use it.
21593 (sparc_legitimize_pic_address): Likewise.
21594 (sparc_delegitimize_address): Likewise.
21595 (sparc_mode_dependent_address_p): Likewise.
21596 (gen_load_pcrel_sym): Remove 4th parameter.
21597 (load_got_register): Adjust call to above. Remove obsolete stuff.
21598 (sparc_expand_prologue): Do not call load_got_register here.
21599 (sparc_flat_expand_prologue): Likewise.
21600 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
21601 (sparc_use_pseudo_pic_reg): New function.
21602 (sparc_init_pic_reg): Likewise.
21603 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
21604 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
21606 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
21608 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
21609 Add item for branch_cost.
21611 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
21613 PR rtl-optimization/83565
21614 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
21615 not extend the result to a larger mode for rotate operations.
21616 (num_sign_bit_copies1): Likewise.
21618 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
21621 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
21623 Use values-Xc.o for -pedantic.
21624 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
21626 2018-01-12 Martin Liska <mliska@suse.cz>
21629 * ipa-devirt.c (final_warning_record::grow_type_warnings):
21631 (possible_polymorphic_call_targets): Use it.
21632 (ipa_devirt): Likewise.
21634 2018-01-12 Martin Liska <mliska@suse.cz>
21636 * profile-count.h (enum profile_quality): Use 0 as invalid
21637 enum value of profile_quality.
21639 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
21641 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
21642 -mext-string options.
21644 2018-01-12 Richard Biener <rguenther@suse.de>
21646 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
21647 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
21648 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
21650 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
21652 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
21654 * configure.ac (--with-long-double-format): Add support for the
21655 configuration option to change the default long double format on
21657 * config.gcc (powerpc*-linux*-*): Likewise.
21658 * configure: Regenerate.
21659 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
21660 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
21661 used without modification.
21663 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21665 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
21666 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
21667 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
21668 MISC_BUILTIN_SPEC_BARRIER.
21669 (rs6000_init_builtins): Likewise.
21670 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
21672 (speculation_barrier): New define_insn.
21673 * doc/extend.texi: Document __builtin_speculation_barrier.
21675 2018-01-11 Jakub Jelinek <jakub@redhat.com>
21678 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
21679 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
21680 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
21682 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
21683 integral modes instead of "ss" and "sd".
21684 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
21685 vectors with 32-bit and 64-bit elements.
21686 (vecdupssescalarmodesuffix): New mode attribute.
21687 (vec_dup<mode>): Use it.
21689 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
21692 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
21693 frame if argument is passed on stack.
21695 2018-01-11 Jakub Jelinek <jakub@redhat.com>
21698 * ree.c (combine_reaching_defs): Optimize also
21699 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
21700 reg2=any_extend(exp); reg1=reg2;, formatting fix.
21702 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
21704 PR middle-end/83189
21705 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
21707 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
21709 PR middle-end/83718
21710 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
21711 after they are computed.
21713 2018-01-11 Bin Cheng <bin.cheng@arm.com>
21715 PR tree-optimization/83695
21716 * gimple-loop-linterchange.cc
21717 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
21718 reset cached scev information after interchange.
21719 (pass_linterchange::execute): Remove call to scev_reset_htab.
21721 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21723 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
21724 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
21725 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
21726 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
21727 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
21728 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
21729 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
21730 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
21731 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
21732 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
21733 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
21734 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
21735 (V_lane_reg): Likewise.
21736 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
21738 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
21739 (vfmal_lane_low<mode>_intrinsic,
21740 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
21741 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
21742 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
21743 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
21744 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
21745 vfmsl_lane_high<mode>_intrinsic): New define_insns.
21747 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21749 * config/arm/arm-cpus.in (fp16fml): New feature.
21750 (ALL_SIMD): Add fp16fml.
21751 (armv8.2-a): Add fp16fml as an option.
21752 (armv8.3-a): Likewise.
21753 (armv8.4-a): Add fp16fml as part of fp16.
21754 * config/arm/arm.h (TARGET_FP16FML): Define.
21755 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
21757 * config/arm/arm-modes.def (V2HF): Define.
21758 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
21759 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
21760 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
21761 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
21762 vfmsl_low, vfmsl_high): New set of builtins.
21763 * config/arm/iterators.md (PLUSMINUS): New code iterator.
21764 (vfml_op): New code attribute.
21765 (VFMLHALVES): New int iterator.
21766 (VFML, VFMLSEL): New mode attributes.
21767 (V_reg): Define mapping for V2HF.
21768 (V_hi, V_lo): New mode attributes.
21769 (VF_constraint): Likewise.
21770 (vfml_half, vfml_half_selector): New int attributes.
21771 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
21773 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
21774 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
21776 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
21777 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
21778 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
21779 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
21781 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
21782 Document new effective target and option set.
21784 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21786 * config/arm/arm-cpus.in (armv8_4): New feature.
21787 (ARMv8_4a): New fgroup.
21788 (armv8.4-a): New arch.
21789 * config/arm/arm-tables.opt: Regenerate.
21790 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
21791 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
21792 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
21793 Add matching rules for -march=armv8.4-a and extensions.
21794 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
21796 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
21799 * config/rx/rx.md (BW): New mode attribute.
21800 (sync_lock_test_and_setsi): Add mode suffix to insn output.
21802 2018-01-11 Richard Biener <rguenther@suse.de>
21804 PR tree-optimization/83435
21805 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
21806 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
21807 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
21809 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21810 Alan Hayward <alan.hayward@arm.com>
21811 David Sherwood <david.sherwood@arm.com>
21813 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
21815 (aarch64_classify_address): Initialize it. Track polynomial offsets.
21816 (aarch64_print_address_internal): Use it to check for a zero offset.
21818 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21819 Alan Hayward <alan.hayward@arm.com>
21820 David Sherwood <david.sherwood@arm.com>
21822 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
21823 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
21824 Return a poly_int64 rather than a HOST_WIDE_INT.
21825 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
21826 rather than a HOST_WIDE_INT.
21827 * config/aarch64/aarch64.h (aarch64_frame): Protect with
21828 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
21829 hard_fp_offset, frame_size, initial_adjust, callee_offset and
21830 final_offset from HOST_WIDE_INT to poly_int64.
21831 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
21832 to_constant when getting the number of units in an Advanced SIMD
21834 (aarch64_builtin_vectorized_function): Check for a constant number
21836 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
21838 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
21839 attribute instead of GET_MODE_NUNITS.
21840 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
21841 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
21842 GET_MODE_SIZE for fixed-size registers.
21843 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
21844 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
21845 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
21846 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
21847 (aarch64_print_operand, aarch64_print_address_internal)
21848 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
21849 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
21850 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
21851 Handle polynomial GET_MODE_SIZE.
21852 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
21853 wider than SImode without modification.
21854 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
21855 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
21856 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
21857 passing and returning SVE modes.
21858 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
21859 rather than GEN_INT.
21860 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
21861 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
21862 (aarch64_allocate_and_probe_stack_space): Likewise.
21863 (aarch64_layout_frame): Cope with polynomial offsets.
21864 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
21865 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
21866 polynomial offsets.
21867 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
21868 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
21869 poly_int64 rather than a HOST_WIDE_INT.
21870 (aarch64_get_separate_components, aarch64_process_components)
21871 (aarch64_expand_prologue, aarch64_expand_epilogue)
21872 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
21873 (aarch64_anchor_offset): New function, split out from...
21874 (aarch64_legitimize_address): ...here.
21875 (aarch64_builtin_vectorization_cost): Handle polynomial
21876 TYPE_VECTOR_SUBPARTS.
21877 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
21879 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
21880 number of elements from the PARALLEL rather than the mode.
21881 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
21882 rather than GET_MODE_BITSIZE.
21883 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
21884 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
21885 (aarch64_expand_vec_perm_const_1): Handle polynomial
21886 d->perm.length () and d->perm elements.
21887 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
21888 Apply to_constant to d->perm elements.
21889 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
21890 polynomial CONST_VECTOR_NUNITS.
21891 (aarch64_move_pointer): Take amount as a poly_int64 rather
21893 (aarch64_progress_pointer): Avoid temporary variable.
21894 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
21895 the mode attribute instead of GET_MODE.
21897 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21898 Alan Hayward <alan.hayward@arm.com>
21899 David Sherwood <david.sherwood@arm.com>
21901 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
21902 x exists before using it.
21903 (aarch64_add_constant_internal): Rename to...
21904 (aarch64_add_offset_1): ...this. Replace regnum with separate
21905 src and dest rtxes. Handle the case in which they're different,
21906 including when the offset is zero. Replace scratchreg with an rtx.
21907 Use 2 additions if there is no spare register into which we can
21908 move a 16-bit constant.
21909 (aarch64_add_constant): Delete.
21910 (aarch64_add_offset): Replace reg with separate src and dest
21911 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
21912 Use aarch64_add_offset_1.
21913 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
21914 an rtx rather than an int. Take the delta as a poly_int64
21915 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
21916 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
21917 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
21918 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
21919 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
21920 and aarch64_add_sp.
21921 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
21922 aarch64_add_constant.
21924 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21926 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
21927 Use scalar_float_mode.
21929 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21931 * config/aarch64/aarch64-simd.md
21932 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
21933 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
21934 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
21935 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
21936 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
21937 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
21938 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
21939 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
21940 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
21941 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
21943 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21946 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
21947 targ_options->x_arm_arch_string is non NULL.
21949 2018-01-11 Tamar Christina <tamar.christina@arm.com>
21951 * config/aarch64/aarch64.h
21952 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
21954 2018-01-11 Sudakshina Das <sudi.das@arm.com>
21957 * expmed.c (emit_store_flag_force): Swap if const op0
21958 and change VOIDmode to mode of op0.
21960 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21962 PR rtl-optimization/83761
21963 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
21964 than bytes to mode_for_size.
21966 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
21968 PR middle-end/83189
21969 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
21970 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
21973 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
21975 PR middle-end/83575
21976 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
21977 when in layout mode.
21978 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
21979 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
21982 2018-01-10 Michael Collison <michael.collison@arm.com>
21984 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
21985 * config/aarch64/aarch64-option-extension.def: Add
21986 AARCH64_OPT_EXTENSION of 'fp16fml'.
21987 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21988 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
21989 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
21990 * config/aarch64/constraints.md (Ui7): New constraint.
21991 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
21992 (VFMLA_SEL_W): Ditto.
21995 (VFMLA16_LOW): New int iterator.
21996 (VFMLA16_HIGH): Ditto.
21997 (UNSPEC_FMLAL): New unspec.
21998 (UNSPEC_FMLSL): Ditto.
21999 (UNSPEC_FMLAL2): Ditto.
22000 (UNSPEC_FMLSL2): Ditto.
22001 (f16mac): New code attribute.
22002 * config/aarch64/aarch64-simd-builtins.def
22003 (aarch64_fmlal_lowv2sf): Ditto.
22004 (aarch64_fmlsl_lowv2sf): Ditto.
22005 (aarch64_fmlalq_lowv4sf): Ditto.
22006 (aarch64_fmlslq_lowv4sf): Ditto.
22007 (aarch64_fmlal_highv2sf): Ditto.
22008 (aarch64_fmlsl_highv2sf): Ditto.
22009 (aarch64_fmlalq_highv4sf): Ditto.
22010 (aarch64_fmlslq_highv4sf): Ditto.
22011 (aarch64_fmlal_lane_lowv2sf): Ditto.
22012 (aarch64_fmlsl_lane_lowv2sf): Ditto.
22013 (aarch64_fmlal_laneq_lowv2sf): Ditto.
22014 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
22015 (aarch64_fmlalq_lane_lowv4sf): Ditto.
22016 (aarch64_fmlsl_lane_lowv4sf): Ditto.
22017 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
22018 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
22019 (aarch64_fmlal_lane_highv2sf): Ditto.
22020 (aarch64_fmlsl_lane_highv2sf): Ditto.
22021 (aarch64_fmlal_laneq_highv2sf): Ditto.
22022 (aarch64_fmlsl_laneq_highv2sf): Ditto.
22023 (aarch64_fmlalq_lane_highv4sf): Ditto.
22024 (aarch64_fmlsl_lane_highv4sf): Ditto.
22025 (aarch64_fmlalq_laneq_highv4sf): Ditto.
22026 (aarch64_fmlsl_laneq_highv4sf): Ditto.
22027 * config/aarch64/aarch64-simd.md:
22028 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
22029 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22030 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
22031 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22032 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
22033 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
22034 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
22035 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
22036 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
22037 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
22038 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
22039 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
22040 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
22041 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
22042 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
22043 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
22044 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
22045 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
22046 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
22047 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
22048 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
22049 (vfmlsl_low_u32): Ditto.
22050 (vfmlalq_low_u32): Ditto.
22051 (vfmlslq_low_u32): Ditto.
22052 (vfmlal_high_u32): Ditto.
22053 (vfmlsl_high_u32): Ditto.
22054 (vfmlalq_high_u32): Ditto.
22055 (vfmlslq_high_u32): Ditto.
22056 (vfmlal_lane_low_u32): Ditto.
22057 (vfmlsl_lane_low_u32): Ditto.
22058 (vfmlal_laneq_low_u32): Ditto.
22059 (vfmlsl_laneq_low_u32): Ditto.
22060 (vfmlalq_lane_low_u32): Ditto.
22061 (vfmlslq_lane_low_u32): Ditto.
22062 (vfmlalq_laneq_low_u32): Ditto.
22063 (vfmlslq_laneq_low_u32): Ditto.
22064 (vfmlal_lane_high_u32): Ditto.
22065 (vfmlsl_lane_high_u32): Ditto.
22066 (vfmlal_laneq_high_u32): Ditto.
22067 (vfmlsl_laneq_high_u32): Ditto.
22068 (vfmlalq_lane_high_u32): Ditto.
22069 (vfmlslq_lane_high_u32): Ditto.
22070 (vfmlalq_laneq_high_u32): Ditto.
22071 (vfmlslq_laneq_high_u32): Ditto.
22072 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
22073 (AARCH64_FL_FOR_ARCH8_4): New.
22074 (AARCH64_ISA_F16FML): New ISA flag.
22075 (TARGET_F16FML): New feature flag for fp16fml.
22076 (doc/invoke.texi): Document new fp16fml option.
22078 2018-01-10 Michael Collison <michael.collison@arm.com>
22080 * config/aarch64/aarch64-builtins.c:
22081 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
22082 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22083 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
22084 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
22085 (AARCH64_ISA_SHA3): New ISA flag.
22086 (TARGET_SHA3): New feature flag for sha3.
22087 * config/aarch64/iterators.md (sha512_op): New int attribute.
22088 (CRYPTO_SHA512): New int iterator.
22089 (UNSPEC_SHA512H): New unspec.
22090 (UNSPEC_SHA512H2): Ditto.
22091 (UNSPEC_SHA512SU0): Ditto.
22092 (UNSPEC_SHA512SU1): Ditto.
22093 * config/aarch64/aarch64-simd-builtins.def
22094 (aarch64_crypto_sha512hqv2di): New builtin.
22095 (aarch64_crypto_sha512h2qv2di): Ditto.
22096 (aarch64_crypto_sha512su0qv2di): Ditto.
22097 (aarch64_crypto_sha512su1qv2di): Ditto.
22098 (aarch64_eor3qv8hi): Ditto.
22099 (aarch64_rax1qv2di): Ditto.
22100 (aarch64_xarqv2di): Ditto.
22101 (aarch64_bcaxqv8hi): Ditto.
22102 * config/aarch64/aarch64-simd.md:
22103 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
22104 (aarch64_crypto_sha512su0qv2di): Ditto.
22105 (aarch64_crypto_sha512su1qv2di): Ditto.
22106 (aarch64_eor3qv8hi): Ditto.
22107 (aarch64_rax1qv2di): Ditto.
22108 (aarch64_xarqv2di): Ditto.
22109 (aarch64_bcaxqv8hi): Ditto.
22110 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
22111 (vsha512h2q_u64): Ditto.
22112 (vsha512su0q_u64): Ditto.
22113 (vsha512su1q_u64): Ditto.
22114 (veor3q_u16): Ditto.
22115 (vrax1q_u64): Ditto.
22116 (vxarq_u64): Ditto.
22117 (vbcaxq_u16): Ditto.
22118 * config/arm/types.md (crypto_sha512): New type attribute.
22119 (crypto_sha3): Ditto.
22120 (doc/invoke.texi): Document new sha3 option.
22122 2018-01-10 Michael Collison <michael.collison@arm.com>
22124 * config/aarch64/aarch64-builtins.c:
22125 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
22126 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22127 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
22128 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
22129 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
22130 (AARCH64_ISA_SM4): New ISA flag.
22131 (TARGET_SM4): New feature flag for sm4.
22132 * config/aarch64/aarch64-simd-builtins.def
22133 (aarch64_sm3ss1qv4si): Ditto.
22134 (aarch64_sm3tt1aq4si): Ditto.
22135 (aarch64_sm3tt1bq4si): Ditto.
22136 (aarch64_sm3tt2aq4si): Ditto.
22137 (aarch64_sm3tt2bq4si): Ditto.
22138 (aarch64_sm3partw1qv4si): Ditto.
22139 (aarch64_sm3partw2qv4si): Ditto.
22140 (aarch64_sm4eqv4si): Ditto.
22141 (aarch64_sm4ekeyqv4si): Ditto.
22142 * config/aarch64/aarch64-simd.md:
22143 (aarch64_sm3ss1qv4si): Ditto.
22144 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
22145 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
22146 (aarch64_sm4eqv4si): Ditto.
22147 (aarch64_sm4ekeyqv4si): Ditto.
22148 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
22149 (sm3part_op): Ditto.
22150 (CRYPTO_SM3TT): Ditto.
22151 (CRYPTO_SM3PART): Ditto.
22152 (UNSPEC_SM3SS1): New unspec.
22153 (UNSPEC_SM3TT1A): Ditto.
22154 (UNSPEC_SM3TT1B): Ditto.
22155 (UNSPEC_SM3TT2A): Ditto.
22156 (UNSPEC_SM3TT2B): Ditto.
22157 (UNSPEC_SM3PARTW1): Ditto.
22158 (UNSPEC_SM3PARTW2): Ditto.
22159 (UNSPEC_SM4E): Ditto.
22160 (UNSPEC_SM4EKEY): Ditto.
22161 * config/aarch64/constraints.md (Ui2): New constraint.
22162 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
22163 * config/arm/types.md (crypto_sm3): New type attribute.
22164 (crypto_sm4): Ditto.
22165 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
22166 (vsm3tt1aq_u32): Ditto.
22167 (vsm3tt1bq_u32): Ditto.
22168 (vsm3tt2aq_u32): Ditto.
22169 (vsm3tt2bq_u32): Ditto.
22170 (vsm3partw1q_u32): Ditto.
22171 (vsm3partw2q_u32): Ditto.
22172 (vsm4eq_u32): Ditto.
22173 (vsm4ekeyq_u32): Ditto.
22174 (doc/invoke.texi): Document new sm4 option.
22176 2018-01-10 Michael Collison <michael.collison@arm.com>
22178 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
22179 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
22180 (AARCH64_FL_FOR_ARCH8_4): New.
22181 (AARCH64_FL_V8_4): New flag.
22182 (doc/invoke.texi): Document new armv8.4-a option.
22184 2018-01-10 Michael Collison <michael.collison@arm.com>
22186 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22187 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
22188 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
22189 * config/aarch64/aarch64-option-extension.def: Add
22190 AARCH64_OPT_EXTENSION of 'sha2'.
22191 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
22192 (crypto): Disable sha2 and aes if crypto disabled.
22193 (crypto): Enable aes and sha2 if enabled.
22194 (simd): Disable sha2 and aes if simd disabled.
22195 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
22197 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
22198 (TARGET_SHA2): New feature flag for sha2.
22199 (TARGET_AES): New feature flag for aes.
22200 * config/aarch64/aarch64-simd.md:
22201 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
22202 conditional on TARGET_AES.
22203 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
22204 (aarch64_crypto_sha1hsi): Make pattern conditional
22206 (aarch64_crypto_sha1hv4si): Ditto.
22207 (aarch64_be_crypto_sha1hv4si): Ditto.
22208 (aarch64_crypto_sha1su1v4si): Ditto.
22209 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
22210 (aarch64_crypto_sha1su0v4si): Ditto.
22211 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
22212 (aarch64_crypto_sha256su0v4si): Ditto.
22213 (aarch64_crypto_sha256su1v4si): Ditto.
22214 (doc/invoke.texi): Document new aes and sha2 options.
22216 2018-01-10 Martin Sebor <msebor@redhat.com>
22218 PR tree-optimization/83781
22219 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
22222 2018-01-11 Martin Sebor <msebor@gmail.com>
22223 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22225 PR tree-optimization/83501
22226 PR tree-optimization/81703
22228 * tree-ssa-strlen.c (get_string_cst): Rename...
22229 (get_string_len): ...to this. Handle global constants.
22230 (handle_char_store): Adjust.
22232 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
22233 Jim Wilson <jimw@sifive.com>
22235 * config/riscv/riscv-protos.h (riscv_output_return): New.
22236 * config/riscv/riscv.c (struct machine_function): New naked_p field.
22237 (riscv_attribute_table, riscv_output_return),
22238 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
22239 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
22240 (riscv_compute_frame_info): Only compute frame->mask if not a naked
22242 (riscv_expand_prologue): Add early return for naked function.
22243 (riscv_expand_epilogue): Likewise.
22244 (riscv_function_ok_for_sibcall): Return false for naked function.
22245 (riscv_set_current_function): New.
22246 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
22247 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
22248 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
22249 * doc/extend.texi (RISC-V Function Attributes): New.
22251 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
22253 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
22254 check for 128-bit long double before checking TCmode.
22255 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
22256 128-bit long doubles before checking TFmode or TCmode.
22257 (FLOAT128_IBM_P): Likewise.
22259 2018-01-10 Martin Sebor <msebor@redhat.com>
22261 PR tree-optimization/83671
22262 * builtins.c (c_strlen): Unconditionally return zero for the empty
22264 Use -Warray-bounds for warnings.
22265 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
22266 for non-constant array indices with COMPONENT_REF, arrays of
22267 arrays, and pointers to arrays.
22268 (gimple_fold_builtin_strlen): Determine and set length range for
22269 non-constant character arrays.
22271 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
22273 PR middle-end/81897
22274 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
22277 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
22279 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
22281 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
22284 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
22285 VECTOR_MEM_ALTIVEC_OR_VSX_P.
22286 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
22287 indexed_or_indirect_operand predicate.
22288 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
22289 (*vsx_le_perm_load_v8hi): Likewise.
22290 (*vsx_le_perm_load_v16qi): Likewise.
22291 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
22292 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
22293 (*vsx_le_perm_store_v8hi): Likewise.
22294 (*vsx_le_perm_store_v16qi): Likewise.
22295 (eight unnamed splitters): Likewise.
22297 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
22299 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
22300 * config/rs6000/emmintrin.h: Likewise.
22301 * config/rs6000/mmintrin.h: Likewise.
22302 * config/rs6000/xmmintrin.h: Likewise.
22304 2018-01-10 David Malcolm <dmalcolm@redhat.com>
22307 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
22309 * tree.c (tree_nop_conversion): Return true for location wrapper
22311 (maybe_wrap_with_location): New function.
22312 (selftest::check_strip_nops): New function.
22313 (selftest::test_location_wrappers): New function.
22314 (selftest::tree_c_tests): Call it.
22315 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
22316 (maybe_wrap_with_location): New decl.
22317 (EXPR_LOCATION_WRAPPER_P): New macro.
22318 (location_wrapper_p): New inline function.
22319 (tree_strip_any_location_wrapper): New inline function.
22321 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
22324 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
22325 stack_realign_offset for the largest alignment of stack slot
22327 (ix86_find_max_used_stack_alignment): New function.
22328 (ix86_finalize_stack_frame_flags): Use it. Set
22329 max_used_stack_alignment if we don't realign stack.
22330 * config/i386/i386.h (machine_function): Add
22331 max_used_stack_alignment.
22333 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
22335 * config/arm/arm.opt (-mbranch-cost): New option.
22336 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
22339 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
22342 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
22343 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
22345 2018-01-10 Richard Biener <rguenther@suse.de>
22348 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
22349 early out so it also covers the case where we have a non-NULL
22352 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
22354 PR tree-optimization/83753
22355 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
22356 for non-strided grouped accesses if the number of elements is 1.
22358 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22361 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
22362 * i386.h (TARGET_USE_GATHER): Define.
22363 * x86-tune.def (X86_TUNE_USE_GATHER): New.
22365 2018-01-10 Martin Liska <mliska@suse.cz>
22368 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
22369 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
22371 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
22372 CLEANUP_NO_PARTITIONING is not set.
22374 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
22376 * doc/rtl.texi: Remove documentation of (const ...) wrappers
22377 for vectors, as a partial revert of r254296.
22378 * rtl.h (const_vec_p): Delete.
22379 (const_vec_duplicate_p): Don't test for vector CONSTs.
22380 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
22381 * expmed.c (make_tree): Likewise.
22384 * common.md (E, F): Use CONSTANT_P instead of checking for
22386 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
22387 checking for CONST_VECTOR.
22389 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
22391 PR middle-end/83575
22392 * predict.c (force_edge_cold): Handle in more sane way edges
22393 with no prediction.
22395 2018-01-09 Carl Love <cel@us.ibm.com>
22397 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
22399 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
22400 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
22401 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
22402 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
22403 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
22404 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
22405 * config/rs6000/rs6000-protos.h: Add extern defition for
22406 rs6000_generate_float2_double_code.
22407 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
22409 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
22410 (float2_v2df): Add define_expand.
22412 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
22415 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
22416 op_mode in the force_to_mode call.
22418 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
22420 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
22421 instead of checking each element individually.
22422 (aarch64_evpc_uzp): Likewise.
22423 (aarch64_evpc_zip): Likewise.
22424 (aarch64_evpc_ext): Likewise.
22425 (aarch64_evpc_rev): Likewise.
22426 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
22427 instead of checking each element individually. Return true without
22429 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
22430 whether all selected elements come from the same input, instead of
22431 checking each element individually. Remove calls to gen_rtx_REG,
22432 start_sequence and end_sequence and instead assert that no rtl is
22435 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
22437 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
22438 order of HIGH and CONST checks.
22440 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
22442 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
22443 if the destination isn't an SSA_NAME.
22445 2018-01-09 Richard Biener <rguenther@suse.de>
22447 PR tree-optimization/83668
22448 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
22450 (canonicalize_loop_form): ... here, renamed from ...
22451 (canonicalize_loop_closed_ssa_form): ... this and amended to
22452 swap successor edges for loop exit blocks to make us use
22453 the RPO order we need for initial schedule generation.
22455 2018-01-09 Joseph Myers <joseph@codesourcery.com>
22457 PR tree-optimization/64811
22458 * match.pd: When optimizing comparisons with Inf, avoid
22459 introducing or losing exceptions from comparisons with NaN.
22461 2018-01-09 Martin Liska <mliska@suse.cz>
22464 * asan.c (shadow_mem_size): Add gcc_assert.
22466 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
22468 Don't save registers in main().
22471 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
22472 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
22473 * config/avr/avr.c (avr_set_current_function): Don't error if
22474 naked, OS_task or OS_main are specified at the same time.
22475 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
22477 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
22479 * common/config/avr/avr-common.c (avr_option_optimization_table):
22480 Switch on -mmain-is-OS_task for optimizing compilations.
22482 2018-01-09 Richard Biener <rguenther@suse.de>
22484 PR tree-optimization/83572
22485 * graphite.c: Include cfganal.h.
22486 (graphite_transform_loops): Connect infinite loops to exit
22487 and remove fake edges at the end.
22489 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
22491 * ipa-inline.c (edge_badness): Revert accidental checkin.
22493 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
22496 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
22497 symbols; not inline clones.
22499 2018-01-09 Jakub Jelinek <jakub@redhat.com>
22502 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
22503 hard registers. Formatting fixes.
22505 PR preprocessor/83722
22506 * gcc.c (try_generate_repro): Pass
22507 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
22508 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
22511 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
22512 Kito Cheng <kito.cheng@gmail.com>
22514 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
22515 (riscv_leaf_function_p): Delete.
22516 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
22518 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22520 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
22522 (do_ifelse): New function.
22523 (do_isel): New function.
22524 (do_sub3): New function.
22525 (do_add3): New function.
22526 (do_load_mask_compare): New function.
22527 (do_overlap_load_compare): New function.
22528 (expand_compare_loop): New function.
22529 (expand_block_compare): Call expand_compare_loop() when appropriate.
22530 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
22531 option description.
22532 (-mblock-compare-inline-loop-limit): New option.
22534 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22537 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
22538 Reverse order of second and third operands in first alternative.
22539 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
22540 of first and second elements in UNSPEC_VPERMR vector.
22541 (altivec_expand_vec_perm_le): Likewise.
22543 2018-01-08 Jeff Law <law@redhat.com>
22545 PR rtl-optimizatin/81308
22546 * tree-switch-conversion.c (cfg_altered): New file scoped static.
22547 (process_switch): If group_case_labels makes a change, then set
22549 (pass_convert_switch::execute): If a switch is converted, then
22550 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
22552 PR rtl-optimization/81308
22553 * recog.c (split_all_insns): Conditionally cleanup the CFG after
22556 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
22558 PR target/83663 - Revert r255946
22559 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
22560 generation for cases where splatting a value is not useful.
22561 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
22562 across a vec_duplicate and a paradoxical subreg forming a vector
22563 mode to a vec_concat.
22565 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22567 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
22568 -march=armv8.3-a variants.
22569 * config/arm/t-multilib: Likewise.
22570 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
22572 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22574 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
22576 (cceq_ior_compare_complement): Give it a name so I can use it, and
22577 change boolean_or_operator predicate to boolean_operator so it can
22578 be used to generate a crand.
22579 (eqne): New code iterator.
22580 (bd/bd_neg): New code_attrs.
22581 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
22582 a single define_insn.
22583 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
22584 decrement (bdnzt/bdnzf/bdzt/bdzf).
22585 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
22586 with the new names of the branch decrement patterns, and added the
22587 names of the branch decrement conditional patterns.
22589 2018-01-08 Richard Biener <rguenther@suse.de>
22591 PR tree-optimization/83563
22592 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
22595 2018-01-08 Richard Biener <rguenther@suse.de>
22597 PR middle-end/83713
22598 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
22600 2018-01-08 Richard Biener <rguenther@suse.de>
22602 PR tree-optimization/83685
22603 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
22604 references to abnormals.
22606 2018-01-08 Richard Biener <rguenther@suse.de>
22609 * dwarf2out.c (output_indirect_strings): Handle empty
22610 skeleton_debug_str_hash.
22611 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
22613 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
22615 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
22616 (emit_store_direct): Likewise.
22617 (arc_trampoline_adjust_address): Likewise.
22618 (arc_asm_trampoline_template): New function.
22619 (arc_initialize_trampoline): Use asm_trampoline_template.
22620 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
22621 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
22622 * config/arc/arc.md (flush_icache): Delete pattern.
22624 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
22626 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
22627 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
22630 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
22633 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
22634 by not USED_FOR_TARGET.
22635 (make_pass_resolve_sw_modes): Likewise.
22637 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
22639 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
22642 2018-01-08 Richard Biener <rguenther@suse.de>
22644 PR middle-end/83580
22645 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
22647 2018-01-08 Richard Biener <rguenther@suse.de>
22649 PR middle-end/83517
22650 * match.pd ((t * 2) / 2) -> t): Add missing :c.
22652 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
22654 PR middle-end/81897
22655 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
22656 basic blocks with a small number of successors.
22657 (convert_control_dep_chain_into_preds): Improve handling of
22659 (dump_predicates): Split apart into...
22660 (dump_pred_chain): ...here...
22661 (dump_pred_info): ...and here.
22662 (can_one_predicate_be_invalidated_p): Add debugging printfs.
22663 (can_chain_union_be_invalidated_p): Improve check for invalidation
22665 (uninit_uses_cannot_happen): Avoid unnecessary if
22666 convert_control_dep_chain_into_preds yielded nothing.
22668 2018-01-06 Martin Sebor <msebor@redhat.com>
22670 PR tree-optimization/83640
22671 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
22672 subtracting negative offset from size.
22673 (builtin_access::overlap): Adjust offset bounds of the access to fall
22674 within the size of the object if possible.
22676 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
22678 PR rtl-optimization/83699
22679 * expmed.c (extract_bit_field_1): Restrict the vector usage of
22680 extract_bit_field_as_subreg to cases in which the extracted
22681 value is also a vector.
22683 * lra-constraints.c (process_alt_operands): Test for the equivalence
22684 substitutions when detecting a possible reload cycle.
22686 2018-01-06 Jakub Jelinek <jakub@redhat.com>
22689 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
22690 by default if flag_selective_schedling{,2}. Formatting fixes.
22692 PR rtl-optimization/83682
22693 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
22694 if it has non-VECTOR_MODE element mode.
22695 (vec_duplicate_p): Likewise.
22697 PR middle-end/83694
22698 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
22699 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
22701 2018-01-05 Jakub Jelinek <jakub@redhat.com>
22704 * config/i386/i386-builtin.def
22705 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
22706 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
22707 Require also OPTION_MASK_ISA_AVX512F in addition to
22708 OPTION_MASK_ISA_GFNI.
22709 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
22710 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
22711 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
22712 to OPTION_MASK_ISA_GFNI.
22713 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
22714 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
22715 OPTION_MASK_ISA_AVX512BW.
22716 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
22717 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
22718 addition to OPTION_MASK_ISA_GFNI.
22719 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
22720 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
22721 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
22722 to OPTION_MASK_ISA_GFNI.
22723 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
22724 a requirement for all ISAs rather than any of them with a few
22726 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
22728 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
22729 bitmasks to be enabled with 3 exceptions, instead of requiring any
22730 enabled ISA with lots of exceptions.
22731 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
22732 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
22733 Change avx512bw in isa attribute to avx512f.
22734 * config/i386/sgxintrin.h: Add license boilerplate.
22735 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
22736 to __AVX512F__ and __AVX512VL to __AVX512VL__.
22737 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
22738 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
22740 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
22741 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
22742 temporarily sse2 rather than sse if not enabled already.
22745 * config/i386/sse.md (VI248_VLBW): Rename to ...
22746 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
22747 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
22748 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
22749 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
22750 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
22751 mode iterator instead of VI248_VLBW.
22753 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
22755 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
22756 (record_modified): Skip clobbers; add debug output.
22757 (param_change_prob): Use sreal frequencies.
22759 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
22761 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
22762 punt for user-aligned variables.
22764 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
22766 * tree-chrec.c (chrec_contains_symbols): Return true for
22769 2018-01-05 Sudakshina Das <sudi.das@arm.com>
22772 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
22773 of (x|y) == x for BICS pattern.
22775 2018-01-05 Jakub Jelinek <jakub@redhat.com>
22777 PR tree-optimization/83605
22778 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
22779 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
22782 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
22784 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
22785 * config/epiphany/rtems.h: New file.
22787 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22788 Uros Bizjak <ubizjak@gmail.com>
22791 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
22792 QIreg_operand instead of register_operand predicate.
22793 * config/i386/i386.c (ix86_rop_should_change_byte_p,
22794 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
22795 comments instead of -fmitigate[-_]rop.
22797 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22800 * cgraphunit.c (symbol_table::compile): Switch to text_section
22801 before calling assembly_start debug hook.
22802 * run-rtl-passes.c (run_rtl_passes): Likewise.
22805 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22807 * tree-vrp.c (extract_range_from_binary_expr_1): Check
22808 range_int_cst_p rather than !symbolic_range_p before calling
22809 extract_range_from_multiplicative_op_1.
22811 2018-01-04 Jeff Law <law@redhat.com>
22813 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
22814 redundant test in assertion.
22816 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22818 * doc/rtl.texi: Document machine_mode wrapper classes.
22820 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22822 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
22823 using tree_to_uhwi.
22825 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22827 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
22828 the VEC_PERM_EXPR fold to fail.
22830 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22833 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
22834 to switched_sections.
22836 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22839 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
22840 test for d.testing.
22842 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
22845 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
22846 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
22848 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22851 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
22852 is BLKmode and bitpos not zero or mode change is needed.
22854 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22857 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
22860 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
22863 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
22864 instead of MULT rtx. Update all corresponding splitters.
22865 (*saddl_se): Ditto.
22866 (*ssub<modesuffix>): Ditto.
22867 (*ssubl_se): Ditto.
22868 (*cmp_sadd_di): Update split patterns.
22869 (*cmp_sadd_si): Ditto.
22870 (*cmp_sadd_sidi): Ditto.
22871 (*cmp_ssub_di): Ditto.
22872 (*cmp_ssub_si): Ditto.
22873 (*cmp_ssub_sidi): Ditto.
22874 * config/alpha/predicates.md (const23_operand): New predicate.
22875 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
22876 Look for ASHIFT, not MULT inner operand.
22877 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
22879 2018-01-04 Martin Liska <mliska@suse.cz>
22881 PR gcov-profile/83669
22882 * gcov.c (output_intermediate_file): Add version to intermediate
22884 * doc/gcov.texi: Document new field 'version' in intermediate
22885 file format. Fix location of '-k' option of gcov command.
22887 2018-01-04 Martin Liska <mliska@suse.cz>
22890 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
22892 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22894 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
22896 2018-01-03 Martin Sebor <msebor@redhat.com>
22898 PR tree-optimization/83655
22899 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
22900 checking calls with invalid arguments.
22902 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22904 * tree-vect-stmts.c (vect_get_store_rhs): New function.
22905 (vectorizable_mask_load_store): Delete.
22906 (vectorizable_call): Return false for masked loads and stores.
22907 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
22908 instead of gimple_assign_rhs1.
22909 (vectorizable_load): Handle IFN_MASK_LOAD.
22910 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
22912 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22914 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
22916 (vectorizable_mask_load_store): ...here.
22917 (vectorizable_load): ...and here.
22919 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22921 * tree-vect-stmts.c (vect_build_all_ones_mask)
22922 (vect_build_zero_merge_argument): New functions, split out from...
22923 (vectorizable_load): ...here.
22925 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22927 * tree-vect-stmts.c (vect_check_store_rhs): New function,
22929 (vectorizable_mask_load_store): ...here.
22930 (vectorizable_store): ...and here.
22932 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22934 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
22936 (vectorizable_mask_load_store): ...here.
22938 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22940 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
22941 (vect_model_store_cost): Take a vec_load_store_type instead of a
22943 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
22944 (vect_model_store_cost): Take a vec_load_store_type instead of a
22946 (vectorizable_mask_load_store): Update accordingly.
22947 (vectorizable_store): Likewise.
22948 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
22950 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22952 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
22953 IFN_MASK_LOAD calls here rather than...
22954 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
22956 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22957 Alan Hayward <alan.hayward@arm.com>
22958 David Sherwood <david.sherwood@arm.com>
22960 * expmed.c (extract_bit_field_1): For vector extracts,
22961 fall back to extract_bit_field_as_subreg if vec_extract
22964 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22965 Alan Hayward <alan.hayward@arm.com>
22966 David Sherwood <david.sherwood@arm.com>
22968 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
22969 they are variable or constant sized.
22970 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
22971 slots for constant-sized data.
22973 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22974 Alan Hayward <alan.hayward@arm.com>
22975 David Sherwood <david.sherwood@arm.com>
22977 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
22978 handling COND_EXPRs with boolean comparisons, try to find a better
22979 basis for the mask type than the boolean itself.
22981 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22983 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
22984 is calculated and how it can be overridden.
22985 * genmodes.c (max_bitsize_mode_any_mode): New variable.
22986 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
22988 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
22991 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22992 Alan Hayward <alan.hayward@arm.com>
22993 David Sherwood <david.sherwood@arm.com>
22995 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
22996 Remove the mode argument.
22997 (aarch64_simd_valid_immediate): Remove the mode and inverse
22999 * config/aarch64/iterators.md (bitsize): New iterator.
23000 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
23001 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
23002 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
23003 aarch64_simd_valid_immediate.
23004 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
23005 (aarch64_reg_or_bic_imm): Likewise.
23006 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
23007 with an insn_type enum and msl with a modifier_type enum.
23008 Replace element_width with a scalar_mode. Change the shift
23009 to unsigned int. Add constructors for scalar_float_mode and
23010 scalar_int_mode elements.
23011 (aarch64_vect_float_const_representable_p): Delete.
23012 (aarch64_can_const_movi_rtx_p)
23013 (aarch64_simd_scalar_immediate_valid_for_move)
23014 (aarch64_simd_make_constant): Update call to
23015 aarch64_simd_valid_immediate.
23016 (aarch64_advsimd_valid_immediate_hs): New function.
23017 (aarch64_advsimd_valid_immediate): Likewise.
23018 (aarch64_simd_valid_immediate): Remove mode and inverse
23019 arguments. Rewrite to use the above. Use const_vec_duplicate_p
23020 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
23021 and aarch64_float_const_representable_p on the result.
23022 (aarch64_output_simd_mov_immediate): Remove mode argument.
23023 Update call to aarch64_simd_valid_immediate and use of
23024 simd_immediate_info.
23025 (aarch64_output_scalar_simd_mov_immediate): Update call
23028 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23029 Alan Hayward <alan.hayward@arm.com>
23030 David Sherwood <david.sherwood@arm.com>
23032 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
23033 (mode_nunits): Likewise CONST_MODE_NUNITS.
23034 * machmode.def (ADJUST_NUNITS): Document.
23035 * genmodes.c (mode_data::need_nunits_adj): New field.
23036 (blank_mode): Update accordingly.
23037 (adj_nunits): New variable.
23038 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
23040 (emit_mode_size_inline): Set need_bytesize_adj for all modes
23041 listed in adj_nunits.
23042 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
23043 listed in adj_nunits. Don't emit case statements for such modes.
23044 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
23045 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
23046 nothing if adj_nunits is nonnull.
23047 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
23048 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
23049 (emit_mode_fbit): Update use of print_maybe_const_decl.
23050 (emit_move_size): Likewise. Treat the array as non-const
23052 (emit_mode_adjustments): Handle adj_nunits.
23054 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23056 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
23057 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
23058 (VECTOR_MODES): Use it.
23059 (make_vector_modes): Take the prefix as an argument.
23061 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23062 Alan Hayward <alan.hayward@arm.com>
23063 David Sherwood <david.sherwood@arm.com>
23065 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
23066 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
23067 for MODE_VECTOR_BOOL.
23068 * machmode.def (VECTOR_BOOL_MODE): Document.
23069 * genmodes.c (VECTOR_BOOL_MODE): New macro.
23070 (make_vector_bool_mode): New function.
23071 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
23073 * lto-streamer-in.c (lto_input_mode_table): Likewise.
23074 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
23076 * stor-layout.c (int_mode_for_mode): Likewise.
23077 * tree.c (build_vector_type_for_mode): Likewise.
23078 * varasm.c (output_constant_pool_2): Likewise.
23079 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
23080 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
23081 for MODE_VECTOR_BOOL.
23082 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
23083 of mode class checks.
23084 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
23085 instead of a list of mode class checks.
23086 (expand_vector_scalar_condition): Likewise.
23087 (type_for_widest_vector_mode): Handle BImode as an inner mode.
23089 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23090 Alan Hayward <alan.hayward@arm.com>
23091 David Sherwood <david.sherwood@arm.com>
23093 * machmode.h (mode_size): Change from unsigned short to
23095 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
23096 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
23097 or if measurement_type is not polynomial.
23098 (fixed_size_mode::includes_p): Check for constant-sized modes.
23099 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
23100 return a poly_uint16 rather than an unsigned short.
23101 (emit_mode_size): Change the type of mode_size from unsigned short
23102 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
23103 (emit_mode_adjustments): Cope with polynomial vector sizes.
23104 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23106 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23108 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
23109 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
23110 * caller-save.c (setup_save_areas): Likewise.
23111 (replace_reg_with_saved_mem): Likewise.
23112 * calls.c (emit_library_call_value_1): Likewise.
23113 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
23114 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
23115 (gen_lowpart_for_combine): Likewise.
23116 * convert.c (convert_to_integer_1): Likewise.
23117 * cse.c (equiv_constant, cse_insn): Likewise.
23118 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
23119 (cselib_subst_to_values): Likewise.
23120 * dce.c (word_dce_process_block): Likewise.
23121 * df-problems.c (df_word_lr_mark_ref): Likewise.
23122 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
23123 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
23124 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
23125 (rtl_for_decl_location): Likewise.
23126 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
23127 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
23128 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
23129 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
23130 (expand_expr_real_1): Likewise.
23131 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
23132 (pad_below): Likewise.
23133 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
23134 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
23135 * ira.c (get_subreg_tracking_sizes): Likewise.
23136 * ira-build.c (ira_create_allocno_objects): Likewise.
23137 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
23138 (ira_sort_regnos_for_alter_reg): Likewise.
23139 * ira-costs.c (record_operand_costs): Likewise.
23140 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
23141 (resolve_simple_move): Likewise.
23142 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
23143 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
23144 (lra_constraints): Likewise.
23145 (CONST_POOL_OK_P): Reject variable-sized modes.
23146 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
23147 (add_pseudo_to_slot, lra_spill): Likewise.
23148 * omp-low.c (omp_clause_aligned_alignment): Likewise.
23149 * optabs-query.c (get_best_extraction_insn): Likewise.
23150 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
23151 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
23152 (expand_mult_highpart, valid_multiword_target_p): Likewise.
23153 * recog.c (offsettable_address_addr_space_p): Likewise.
23154 * regcprop.c (maybe_mode_change): Likewise.
23155 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
23156 * regrename.c (build_def_use): Likewise.
23157 * regstat.c (dump_reg_info): Likewise.
23158 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
23159 (find_reloads, find_reloads_subreg_address): Likewise.
23160 * reload1.c (eliminate_regs_1): Likewise.
23161 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
23162 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
23163 (simplify_binary_operation_1, simplify_subreg): Likewise.
23164 * targhooks.c (default_function_arg_padding): Likewise.
23165 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
23166 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
23167 (verify_gimple_assign_ternary): Likewise.
23168 * tree-inline.c (estimate_move_cost): Likewise.
23169 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23170 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
23171 (get_address_cost_ainc): Likewise.
23172 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
23173 (vect_supportable_dr_alignment): Likewise.
23174 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
23175 (vectorizable_reduction): Likewise.
23176 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
23177 (vectorizable_operation, vectorizable_load): Likewise.
23178 * tree.c (build_same_sized_truth_vector_type): Likewise.
23179 * valtrack.c (cleanup_auto_inc_dec): Likewise.
23180 * var-tracking.c (emit_note_insn_var_location): Likewise.
23181 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
23182 (ADDR_VEC_ALIGN): Likewise.
23184 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23185 Alan Hayward <alan.hayward@arm.com>
23186 David Sherwood <david.sherwood@arm.com>
23188 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
23190 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
23191 or if measurement_type is polynomial.
23192 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
23193 * combine.c (make_extraction): Likewise.
23194 * dse.c (find_shift_sequence): Likewise.
23195 * dwarf2out.c (mem_loc_descriptor): Likewise.
23196 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
23197 (extract_bit_field, extract_low_bits): Likewise.
23198 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
23199 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
23200 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
23201 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
23202 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
23203 * reload.c (find_reloads): Likewise.
23204 * reload1.c (alter_reg): Likewise.
23205 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
23206 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
23207 * tree-if-conv.c (predicate_mem_writes): Likewise.
23208 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
23209 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
23210 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
23211 * valtrack.c (dead_debug_insert_temp): Likewise.
23212 * varasm.c (mergeable_constant_section): Likewise.
23213 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
23215 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23216 Alan Hayward <alan.hayward@arm.com>
23217 David Sherwood <david.sherwood@arm.com>
23219 * expr.c (expand_assignment): Cope with polynomial mode sizes
23220 when assigning to a CONCAT.
23222 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23223 Alan Hayward <alan.hayward@arm.com>
23224 David Sherwood <david.sherwood@arm.com>
23226 * machmode.h (mode_precision): Change from unsigned short to
23228 (mode_to_precision): Return a poly_uint16 rather than an unsigned
23230 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
23231 or if measurement_type is not polynomial.
23232 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
23233 in which the mode is already known to be a scalar_int_mode.
23234 * genmodes.c (emit_mode_precision): Change the type of mode_precision
23235 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
23237 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23238 for GET_MODE_PRECISION.
23239 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23240 for GET_MODE_PRECISION.
23241 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
23243 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
23244 (expand_field_assignment, make_extraction): Likewise.
23245 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
23246 (get_last_value): Likewise.
23247 * convert.c (convert_to_integer_1): Likewise.
23248 * cse.c (cse_insn): Likewise.
23249 * expr.c (expand_expr_real_1): Likewise.
23250 * lra-constraints.c (simplify_operand_subreg): Likewise.
23251 * optabs-query.c (can_atomic_load_p): Likewise.
23252 * optabs.c (expand_atomic_load): Likewise.
23253 (expand_atomic_store): Likewise.
23254 * ree.c (combine_reaching_defs): Likewise.
23255 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
23256 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
23257 * tree.h (type_has_mode_precision_p): Likewise.
23258 * ubsan.c (instrument_si_overflow): Likewise.
23260 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23261 Alan Hayward <alan.hayward@arm.com>
23262 David Sherwood <david.sherwood@arm.com>
23264 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
23265 polynomial numbers of units.
23266 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
23267 (valid_vector_subparts_p): New function.
23268 (build_vector_type): Remove temporary shim and take the number
23269 of units as a poly_uint64 rather than an int.
23270 (build_opaque_vector_type): Take the number of units as a
23271 poly_uint64 rather than an int.
23272 * tree.c (build_vector_from_ctor): Handle polynomial
23273 TYPE_VECTOR_SUBPARTS.
23274 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
23275 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
23276 (build_vector_from_val): If the number of units is variable,
23277 use build_vec_duplicate_cst for constant operands and
23278 VEC_DUPLICATE_EXPR otherwise.
23279 (make_vector_type): Remove temporary is_constant ().
23280 (build_vector_type, build_opaque_vector_type): Take the number of
23281 units as a poly_uint64 rather than an int.
23282 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
23284 * cfgexpand.c (expand_debug_expr): Likewise.
23285 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
23286 (store_constructor, expand_expr_real_1): Likewise.
23287 (const_scalar_mask_from_tree): Likewise.
23288 * fold-const-call.c (fold_const_reduction): Likewise.
23289 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
23290 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
23291 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
23292 (fold_relational_const): Likewise.
23293 (native_interpret_vector): Likewise. Change the size from an
23294 int to an unsigned int.
23295 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
23296 TYPE_VECTOR_SUBPARTS.
23297 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
23298 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
23299 duplicating a non-constant operand into a variable-length vector.
23300 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
23301 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
23302 * ipa-icf.c (sem_variable::equals): Likewise.
23303 * match.pd: Likewise.
23304 * omp-simd-clone.c (simd_clone_subparts): Likewise.
23305 * print-tree.c (print_node): Likewise.
23306 * stor-layout.c (layout_type): Likewise.
23307 * targhooks.c (default_builtin_vectorization_cost): Likewise.
23308 * tree-cfg.c (verify_gimple_comparison): Likewise.
23309 (verify_gimple_assign_binary): Likewise.
23310 (verify_gimple_assign_ternary): Likewise.
23311 (verify_gimple_assign_single): Likewise.
23312 * tree-pretty-print.c (dump_generic_node): Likewise.
23313 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23314 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
23315 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
23316 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
23317 (vect_shift_permute_load_chain): Likewise.
23318 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
23319 (expand_vector_condition, optimize_vector_constructor): Likewise.
23320 (lower_vec_perm, get_compute_type): Likewise.
23321 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
23322 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
23323 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
23324 (vect_recog_mask_conversion_pattern): Likewise.
23325 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
23326 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
23327 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23328 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
23329 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
23330 (vectorizable_shift, vectorizable_operation, vectorizable_store)
23331 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
23332 (supportable_widening_operation): Likewise.
23333 (supportable_narrowing_operation): Likewise.
23334 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
23336 * varasm.c (output_constant): Likewise.
23338 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23339 Alan Hayward <alan.hayward@arm.com>
23340 David Sherwood <david.sherwood@arm.com>
23342 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
23343 so that both the length == 3 and length != 3 cases set up their
23344 own permute vectors. Add comments explaining why we know the
23345 number of elements is constant.
23346 (vect_permute_load_chain): Likewise.
23348 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23349 Alan Hayward <alan.hayward@arm.com>
23350 David Sherwood <david.sherwood@arm.com>
23352 * machmode.h (mode_nunits): Change from unsigned char to
23354 (ONLY_FIXED_SIZE_MODES): New macro.
23355 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
23356 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
23357 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
23359 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
23360 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
23361 or if measurement_type is not polynomial.
23362 * genmodes.c (ZERO_COEFFS): New macro.
23363 (emit_mode_nunits_inline): Make mode_nunits_inline return a
23365 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
23366 Use ZERO_COEFFS when emitting initializers.
23367 * data-streamer.h (bp_pack_poly_value): New function.
23368 (bp_unpack_poly_value): Likewise.
23369 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23370 for GET_MODE_NUNITS.
23371 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23372 for GET_MODE_NUNITS.
23373 * tree.c (make_vector_type): Remove temporary shim and make
23374 the real function take the number of units as a poly_uint64
23375 rather than an int.
23376 (build_vector_type_for_mode): Handle polynomial nunits.
23377 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
23378 * emit-rtl.c (const_vec_series_p_1): Likewise.
23379 (gen_rtx_CONST_VECTOR): Likewise.
23380 * fold-const.c (test_vec_duplicate_folding): Likewise.
23381 * genrecog.c (validate_pattern): Likewise.
23382 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
23383 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
23384 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
23385 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
23386 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
23387 * rtlanal.c (subreg_get_info): Likewise.
23388 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23389 (vect_grouped_load_supported): Likewise.
23390 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
23391 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
23392 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
23393 (simplify_const_unary_operation, simplify_binary_operation_1)
23394 (simplify_const_binary_operation, simplify_ternary_operation)
23395 (test_vector_ops_duplicate, test_vector_ops): Likewise.
23396 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
23397 instead of CONST_VECTOR_NUNITS.
23398 * varasm.c (output_constant_pool_2): Likewise.
23399 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
23400 explicit-encoded elements in the XVEC for variable-length vectors.
23402 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23404 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
23406 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23407 Alan Hayward <alan.hayward@arm.com>
23408 David Sherwood <david.sherwood@arm.com>
23410 * coretypes.h (fixed_size_mode): Declare.
23411 (fixed_size_mode_pod): New typedef.
23412 * builtins.h (target_builtins::x_apply_args_mode)
23413 (target_builtins::x_apply_result_mode): Change type to
23414 fixed_size_mode_pod.
23415 * builtins.c (apply_args_size, apply_result_size, result_vector)
23416 (expand_builtin_apply_args_1, expand_builtin_apply)
23417 (expand_builtin_return): Update accordingly.
23419 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23421 * cse.c (hash_rtx_cb): Hash only the encoded elements.
23422 * cselib.c (cselib_hash_rtx): Likewise.
23423 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
23424 CONST_VECTOR encoding.
23426 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23427 Jeff Law <law@redhat.com>
23430 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
23431 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
23432 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
23433 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
23436 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
23437 explicitly probe *sp in a noreturn function if there were any callee
23438 register saves or frame pointer is needed.
23440 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23443 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
23444 BLKmode for ternary, binary or unary expressions.
23447 * var-tracking.c (delete_vta_debug_insn): New inline function.
23448 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
23449 insns from get_insns () to NULL instead of each bb separately.
23450 Use delete_vta_debug_insn. No longer static.
23451 (vt_debug_insns_local, variable_tracking_main_1): Adjust
23452 delete_vta_debug_insns callers.
23453 * rtl.h (delete_vta_debug_insns): Declare.
23454 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
23455 instead of variable_tracking_main.
23457 2018-01-03 Martin Sebor <msebor@redhat.com>
23459 PR tree-optimization/83603
23460 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
23461 arguments past the endof the argument list in functions declared
23462 without a prototype.
23463 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
23464 Avoid checking when arguments are null.
23466 2018-01-03 Martin Sebor <msebor@redhat.com>
23469 * doc/extend.texi (attribute const): Fix a typo.
23470 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
23471 issuing -Wsuggest-attribute for void functions.
23473 2018-01-03 Martin Sebor <msebor@redhat.com>
23475 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
23476 offset_int::from instead of wide_int::to_shwi.
23477 (maybe_diag_overlap): Remove assertion.
23478 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
23479 * gimple-ssa-sprintf.c (format_directive): Same.
23480 (parse_directive): Same.
23481 (sprintf_dom_walker::compute_format_length): Same.
23482 (try_substitute_return_value): Same.
23484 2018-01-03 Jeff Law <law@redhat.com>
23486 PR middle-end/83654
23487 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
23488 non-constant residual for zero at runtime and avoid probing in
23489 that case. Reorganize code for trailing problem to mirror handling
23492 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23494 PR tree-optimization/83501
23495 * tree-ssa-strlen.c (get_string_cst): New.
23496 (handle_char_store): Call get_string_cst.
23498 2018-01-03 Martin Liska <mliska@suse.cz>
23500 PR tree-optimization/83593
23501 * tree-ssa-strlen.c: Include tree-cfg.h.
23502 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
23503 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
23504 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
23506 (strlen_dom_walker::before_dom_children): Call
23507 gimple_purge_dead_eh_edges. Dump tranformation with details
23509 (strlen_dom_walker::before_dom_children): Update call by adding
23510 new argument cleanup_eh.
23511 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
23513 2018-01-03 Martin Liska <mliska@suse.cz>
23516 * cif-code.def (VARIADIC_THUNK): New enum value.
23517 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
23520 2018-01-03 Jan Beulich <jbeulich@suse.com>
23522 * sse.md (mov<mode>_internal): Tighten condition for when to use
23523 vmovdqu<ssescalarsize> for TI and OI modes.
23525 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23527 Update copyright years.
23529 2018-01-03 Martin Liska <mliska@suse.cz>
23532 * ipa-visibility.c (function_and_variable_visibility): Skip
23533 functions with noipa attribure.
23535 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23537 * gcc.c (process_command): Update copyright notice dates.
23538 * gcov-dump.c (print_version): Ditto.
23539 * gcov.c (print_version): Ditto.
23540 * gcov-tool.c (print_version): Ditto.
23541 * gengtype.c (create_file): Ditto.
23542 * doc/cpp.texi: Bump @copying's copyright year.
23543 * doc/cppinternals.texi: Ditto.
23544 * doc/gcc.texi: Ditto.
23545 * doc/gccint.texi: Ditto.
23546 * doc/gcov.texi: Ditto.
23547 * doc/install.texi: Ditto.
23548 * doc/invoke.texi: Ditto.
23550 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23552 * vector-builder.h (vector_builder::m_full_nelts): Change from
23553 unsigned int to poly_uint64.
23554 (vector_builder::full_nelts): Update prototype accordingly.
23555 (vector_builder::new_vector): Likewise.
23556 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
23557 (vector_builder::operator ==): Likewise.
23558 (vector_builder::finalize): Likewise.
23559 * int-vector-builder.h (int_vector_builder::int_vector_builder):
23560 Take the number of elements as a poly_uint64 rather than an
23562 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
23563 from unsigned int to poly_uint64.
23564 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
23565 (vec_perm_indices::new_vector): Likewise.
23566 (vec_perm_indices::length): Likewise.
23567 (vec_perm_indices::nelts_per_input): Likewise.
23568 (vec_perm_indices::input_nelts): Likewise.
23569 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
23570 number of elements per input as a poly_uint64 rather than an
23571 unsigned int. Use the original encoding for variable-length
23572 vectors, rather than clamping each individual element.
23573 For the second and subsequent elements in each pattern,
23574 clamp the step and base before clamping their sum.
23575 (vec_perm_indices::series_p): Handle polynomial element counts.
23576 (vec_perm_indices::all_in_range_p): Likewise.
23577 (vec_perm_indices_to_tree): Likewise.
23578 (vec_perm_indices_to_rtx): Likewise.
23579 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
23580 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
23581 (tree_vector_builder::new_binary_operation): Handle polynomial
23582 element counts. Return false if we need to know the number
23583 of elements at compile time.
23584 * fold-const.c (fold_vec_perm): Punt if the number of elements
23585 isn't known at compile time.
23587 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23589 * vec-perm-indices.h (vec_perm_builder): Change element type
23590 from HOST_WIDE_INT to poly_int64.
23591 (vec_perm_indices::element_type): Update accordingly.
23592 (vec_perm_indices::clamp): Handle polynomial element_types.
23593 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
23594 (vec_perm_indices::all_in_range_p): Likewise.
23595 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
23597 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
23598 polynomial vec_perm_indices element types.
23599 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
23600 * fold-const.c (fold_vec_perm): Likewise.
23601 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
23602 * tree-vect-generic.c (lower_vec_perm): Likewise.
23603 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
23604 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
23605 element type to HOST_WIDE_INT.
23607 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23608 Alan Hayward <alan.hayward@arm.com>
23609 David Sherwood <david.sherwood@arm.com>
23611 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
23612 rather than an int. Use plus_constant.
23613 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
23614 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
23616 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23617 Alan Hayward <alan.hayward@arm.com>
23618 David Sherwood <david.sherwood@arm.com>
23620 * calls.c (emit_call_1, expand_call): Change struct_value_size from
23621 a HOST_WIDE_INT to a poly_int64.
23623 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23624 Alan Hayward <alan.hayward@arm.com>
23625 David Sherwood <david.sherwood@arm.com>
23627 * calls.c (load_register_parameters): Cope with polynomial
23628 mode sizes. Require a constant size for BLKmode parameters
23629 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
23630 forces a parameter to be padded at the lsb end in order to
23631 fill a complete number of words, require the parameter size
23632 to be ordered wrt UNITS_PER_WORD.
23634 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23635 Alan Hayward <alan.hayward@arm.com>
23636 David Sherwood <david.sherwood@arm.com>
23638 * reload1.c (spill_stack_slot_width): Change element type
23639 from unsigned int to poly_uint64_pod.
23640 (alter_reg): Treat mode sizes as polynomial.
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 * reload.c (complex_word_subreg_p): New function.
23647 (reload_inner_reg_of_subreg, push_reload): Use it.
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 * lra-constraints.c (process_alt_operands): Reject matched
23654 operands whose sizes aren't ordered.
23655 (match_reload): Refer to this check here.
23657 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23658 Alan Hayward <alan.hayward@arm.com>
23659 David Sherwood <david.sherwood@arm.com>
23661 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
23662 that the mode size is in the set {1, 2, 4, 8, 16}.
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 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
23669 Use plus_constant instead of gen_rtx_PLUS.
23671 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23672 Alan Hayward <alan.hayward@arm.com>
23673 David Sherwood <david.sherwood@arm.com>
23675 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
23676 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
23677 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
23678 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
23679 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
23680 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
23681 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
23682 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
23683 * config/i386/i386.c (ix86_push_rounding): ...this new function.
23684 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
23686 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
23687 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
23688 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
23689 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
23690 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
23691 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
23692 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
23693 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
23694 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
23695 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
23697 * expr.c (emit_move_resolve_push): Treat the input and result
23698 of PUSH_ROUNDING as a poly_int64.
23699 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
23700 (emit_push_insn): Likewise.
23701 * lra-eliminations.c (mark_not_eliminable): Likewise.
23702 * recog.c (push_operand): Likewise.
23703 * reload1.c (elimination_effects): Likewise.
23704 * rtlanal.c (nonzero_bits1): Likewise.
23705 * calls.c (store_one_arg): Likewise. Require the padding to be
23706 known at compile time.
23708 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23709 Alan Hayward <alan.hayward@arm.com>
23710 David Sherwood <david.sherwood@arm.com>
23712 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
23713 Use plus_constant instead of gen_rtx_PLUS.
23715 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23716 Alan Hayward <alan.hayward@arm.com>
23717 David Sherwood <david.sherwood@arm.com>
23719 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
23720 rather than an int.
23722 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23723 Alan Hayward <alan.hayward@arm.com>
23724 David Sherwood <david.sherwood@arm.com>
23726 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
23727 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
23728 via stack temporaries. Treat the mode size as polynomial too.
23730 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23731 Alan Hayward <alan.hayward@arm.com>
23732 David Sherwood <david.sherwood@arm.com>
23734 * expr.c (expand_expr_real_2): When handling conversions involving
23735 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
23736 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
23737 as a poly_uint64 too.
23739 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23740 Alan Hayward <alan.hayward@arm.com>
23741 David Sherwood <david.sherwood@arm.com>
23743 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
23745 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23746 Alan Hayward <alan.hayward@arm.com>
23747 David Sherwood <david.sherwood@arm.com>
23749 * combine.c (can_change_dest_mode): Handle polynomial
23750 REGMODE_NATURAL_SIZE.
23751 * expmed.c (store_bit_field_1): Likewise.
23752 * expr.c (store_constructor): Likewise.
23753 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
23754 and polynomial REGMODE_NATURAL_SIZE.
23755 (gen_lowpart_common): Likewise.
23756 * reginfo.c (record_subregs_of_mode): Likewise.
23757 * rtlanal.c (read_modify_subreg_p): Likewise.
23759 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23760 Alan Hayward <alan.hayward@arm.com>
23761 David Sherwood <david.sherwood@arm.com>
23763 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
23764 numbers of elements.
23766 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23767 Alan Hayward <alan.hayward@arm.com>
23768 David Sherwood <david.sherwood@arm.com>
23770 * match.pd: Cope with polynomial numbers of vector elements.
23772 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23773 Alan Hayward <alan.hayward@arm.com>
23774 David Sherwood <david.sherwood@arm.com>
23776 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
23777 in a POINTER_PLUS_EXPR.
23779 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23780 Alan Hayward <alan.hayward@arm.com>
23781 David Sherwood <david.sherwood@arm.com>
23783 * omp-simd-clone.c (simd_clone_subparts): New function.
23784 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
23785 (ipa_simd_modify_function_body): Likewise.
23787 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23788 Alan Hayward <alan.hayward@arm.com>
23789 David Sherwood <david.sherwood@arm.com>
23791 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
23792 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
23793 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
23794 (expand_vector_condition, vector_element): Likewise.
23795 (subparts_gt): New function.
23796 (get_compute_type): Use subparts_gt.
23797 (count_type_subparts): Delete.
23798 (expand_vector_operations_1): Use subparts_gt instead of
23799 count_type_subparts.
23801 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23802 Alan Hayward <alan.hayward@arm.com>
23803 David Sherwood <david.sherwood@arm.com>
23805 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
23806 (vect_compile_time_alias): ...this new function. Do the calculation
23807 on poly_ints rather than trees.
23808 (vect_prune_runtime_alias_test_list): Update call accordingly.
23810 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23811 Alan Hayward <alan.hayward@arm.com>
23812 David Sherwood <david.sherwood@arm.com>
23814 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
23816 (vect_schedule_slp_instance): Likewise.
23818 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23819 Alan Hayward <alan.hayward@arm.com>
23820 David Sherwood <david.sherwood@arm.com>
23822 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
23823 constant and extern definitions for variable-length vectors.
23824 (vect_get_constant_vectors): Note that the number of units
23825 is known to be constant.
23827 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23828 Alan Hayward <alan.hayward@arm.com>
23829 David Sherwood <david.sherwood@arm.com>
23831 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
23832 of units as polynomial. Choose between WIDE and NARROW based
23835 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23836 Alan Hayward <alan.hayward@arm.com>
23837 David Sherwood <david.sherwood@arm.com>
23839 * tree-vect-stmts.c (simd_clone_subparts): New function.
23840 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
23842 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23843 Alan Hayward <alan.hayward@arm.com>
23844 David Sherwood <david.sherwood@arm.com>
23846 * tree-vect-stmts.c (vectorizable_call): Treat the number of
23847 vectors as polynomial. Use build_index_vector for
23848 IFN_GOMP_SIMD_LANE.
23850 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23851 Alan Hayward <alan.hayward@arm.com>
23852 David Sherwood <david.sherwood@arm.com>
23854 * tree-vect-stmts.c (get_load_store_type): Treat the number of
23855 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
23856 for variable-length vectors.
23857 (vectorizable_mask_load_store): Treat the number of units as
23858 polynomial, asserting that it is constant if the condition has
23859 already been enforced.
23860 (vectorizable_store, vectorizable_load): Likewise.
23862 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23863 Alan Hayward <alan.hayward@arm.com>
23864 David Sherwood <david.sherwood@arm.com>
23866 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
23867 of units as polynomial. Punt if we can't tell at compile time
23868 which vector contains the final result.
23870 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23871 Alan Hayward <alan.hayward@arm.com>
23872 David Sherwood <david.sherwood@arm.com>
23874 * tree-vect-loop.c (vectorizable_induction): Treat the number
23875 of units as polynomial. Punt on SLP inductions. Use an integer
23876 VEC_SERIES_EXPR for variable-length integer reductions. Use a
23877 cast of such a series for variable-length floating-point
23880 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23881 Alan Hayward <alan.hayward@arm.com>
23882 David Sherwood <david.sherwood@arm.com>
23884 * tree.h (build_index_vector): Declare.
23885 * tree.c (build_index_vector): New function.
23886 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
23887 of units as polynomial, forcibly converting it to a constant if
23888 vectorizable_reduction has already enforced the condition.
23889 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
23890 to create a {1,2,3,...} vector.
23891 (vectorizable_reduction): Treat the number of units as polynomial.
23892 Choose vectype_in based on the largest scalar element size rather
23893 than the smallest number of units. Enforce the restrictions
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-vect-data-refs.c (vector_alignment_reachable_p): Treat the
23901 number of units as polynomial.
23903 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23904 Alan Hayward <alan.hayward@arm.com>
23905 David Sherwood <david.sherwood@arm.com>
23907 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
23908 * target.def (autovectorize_vector_sizes): Return the vector sizes
23909 by pointer, using vector_sizes rather than a bitmask.
23910 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
23911 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
23912 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
23914 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
23915 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
23916 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
23917 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
23918 * omp-general.c (omp_max_vf): Likewise.
23919 * omp-low.c (omp_clause_aligned_alignment): Likewise.
23920 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
23921 * tree-vect-loop.c (vect_analyze_loop): Likewise.
23922 * tree-vect-slp.c (vect_slp_bb): Likewise.
23923 * doc/tm.texi: Regenerate.
23924 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
23926 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
23927 the vector size as a poly_uint64 rather than an unsigned int.
23928 (current_vector_size): Change from an unsigned int to a poly_uint64.
23929 (get_vectype_for_scalar_type): Update accordingly.
23930 * tree.h (build_truth_vector_type): Take the size and number of
23931 units as a poly_uint64 rather than an unsigned int.
23932 (build_vector_type): Add a temporary overload that takes
23933 the number of units as a poly_uint64 rather than an unsigned int.
23934 * tree.c (make_vector_type): Likewise.
23935 (build_truth_vector_type): Take the number of units as a poly_uint64
23936 rather than an unsigned int.
23938 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23939 Alan Hayward <alan.hayward@arm.com>
23940 David Sherwood <david.sherwood@arm.com>
23942 * target.def (get_mask_mode): Take the number of units and length
23943 as poly_uint64s rather than unsigned ints.
23944 * targhooks.h (default_get_mask_mode): Update accordingly.
23945 * targhooks.c (default_get_mask_mode): Likewise.
23946 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
23947 * doc/tm.texi: Regenerate.
23949 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23950 Alan Hayward <alan.hayward@arm.com>
23951 David Sherwood <david.sherwood@arm.com>
23953 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
23954 * omp-general.c (omp_max_vf): Likewise.
23955 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
23956 (expand_omp_simd): Handle polynomial safelen.
23957 * omp-low.c (omplow_simd_context): Add a default constructor.
23958 (omplow_simd_context::max_vf): Change from int to poly_uint64.
23959 (lower_rec_simd_input_clauses): Update accordingly.
23960 (lower_rec_input_clauses): Likewise.
23962 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23963 Alan Hayward <alan.hayward@arm.com>
23964 David Sherwood <david.sherwood@arm.com>
23966 * tree-vectorizer.h (vect_nunits_for_cost): New function.
23967 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
23968 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
23969 (vect_analyze_slp_cost): Likewise.
23970 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
23971 (vect_model_load_cost): Likewise.
23973 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23974 Alan Hayward <alan.hayward@arm.com>
23975 David Sherwood <david.sherwood@arm.com>
23977 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
23978 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
23979 from an unsigned int * to a poly_uint64_pod *.
23980 (calculate_unrolling_factor): New function.
23981 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
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 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
23988 from an unsigned int to a poly_uint64.
23989 (_loop_vec_info::slp_unrolling_factor): Likewise.
23990 (_loop_vec_info::vectorization_factor): Change from an int
23992 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
23993 (vect_get_num_vectors): New function.
23994 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
23995 (vect_get_num_copies): Use vect_get_num_vectors.
23996 (vect_analyze_data_ref_dependences): Change max_vf from an int *
23997 to an unsigned int *.
23998 (vect_analyze_data_refs): Change min_vf from an int * to a
24000 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24001 than an unsigned HOST_WIDE_INT.
24002 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
24003 (vect_analyze_data_ref_dependence): Change max_vf from an int *
24004 to an unsigned int *.
24005 (vect_analyze_data_ref_dependences): Likewise.
24006 (vect_compute_data_ref_alignment): Handle polynomial vf.
24007 (vect_enhance_data_refs_alignment): Likewise.
24008 (vect_prune_runtime_alias_test_list): Likewise.
24009 (vect_shift_permute_load_chain): Likewise.
24010 (vect_supportable_dr_alignment): Likewise.
24011 (dependence_distance_ge_vf): Take the vectorization factor as a
24012 poly_uint64 rather than an unsigned HOST_WIDE_INT.
24013 (vect_analyze_data_refs): Change min_vf from an int * to a
24015 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
24016 vfm1 as a poly_uint64 rather than an int. Make the same change
24017 for the returned bound_scalar.
24018 (vect_gen_vector_loop_niters): Handle polynomial vf.
24019 (vect_do_peeling): Likewise. Update call to
24020 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
24021 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
24023 * tree-vect-loop.c (vect_determine_vectorization_factor)
24024 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
24025 (vect_get_known_peeling_cost): Likewise.
24026 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
24027 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
24028 (vect_transform_loop): Likewise. Use the lowest possible VF when
24029 updating the upper bounds of the loop.
24030 (vect_min_worthwhile_factor): Make static. Return an unsigned int
24031 rather than an int.
24032 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
24033 polynomial unroll factors.
24034 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
24035 (vect_make_slp_decision): Likewise.
24036 (vect_supported_load_permutation_p): Likewise, and polynomial
24038 (vect_analyze_slp_cost): Handle polynomial vf.
24039 (vect_slp_analyze_node_operations): Likewise.
24040 (vect_slp_analyze_bb_1): Likewise.
24041 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24042 than an unsigned HOST_WIDE_INT.
24043 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
24044 (vectorizable_load): Handle polynomial vf.
24045 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
24047 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
24049 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24050 Alan Hayward <alan.hayward@arm.com>
24051 David Sherwood <david.sherwood@arm.com>
24053 * match.pd: Handle bit operations involving three constants
24054 and try to fold one pair.
24056 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24058 * tree-vect-loop-manip.c: Include gimple-fold.h.
24059 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
24060 niters_maybe_zero parameters. Handle other cases besides a step of 1.
24061 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
24062 Add a path that uses a step of VF instead of 1, but disable it
24064 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
24065 and niters_no_overflow parameters. Update calls to
24066 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
24067 Create a new SSA name if the latter choses to use a ste other
24068 than zero, and return it via niters_vector_mult_vf_var.
24069 * tree-vect-loop.c (vect_transform_loop): Update calls to
24070 vect_do_peeling, vect_gen_vector_loop_niters and
24071 slpeel_make_loop_iterate_ntimes.
24072 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
24073 (vect_gen_vector_loop_niters): Update declarations after above changes.
24075 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
24077 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
24078 128-bit round to integer instructions.
24079 (ceil<mode>2): Likewise.
24080 (btrunc<mode>2): Likewise.
24081 (round<mode>2): Likewise.
24083 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24085 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
24086 unaligned VSX load/store on P8/P9.
24087 (expand_block_clear): Allow the use of unaligned VSX
24088 load/store on P8/P9.
24090 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24092 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
24094 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
24095 swap associated with both a load and a store.
24097 2018-01-02 Andrew Waterman <andrew@sifive.com>
24099 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
24100 * config/riscv/riscv.md (clear_cache): Use it.
24102 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
24104 * web.c: Remove out-of-date comment.
24106 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24108 * expr.c (fixup_args_size_notes): Check that any existing
24109 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
24110 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
24111 (emit_single_push_insn): ...here.
24113 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24115 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
24116 (const_vector_encoded_nelts): New function.
24117 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
24118 (const_vector_int_elt, const_vector_elt): Declare.
24119 * emit-rtl.c (const_vector_int_elt_1): New function.
24120 (const_vector_elt): Likewise.
24121 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
24122 of CONST_VECTOR_ELT.
24124 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24126 * expr.c: Include rtx-vector-builder.h.
24127 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
24128 directly on the tree encoding.
24129 (const_vector_from_tree): Likewise.
24130 * optabs.c: Include rtx-vector-builder.h.
24131 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
24132 sequence of "u" values.
24133 * vec-perm-indices.c: Include rtx-vector-builder.h.
24134 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
24135 directly on the vec_perm_indices encoding.
24137 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24139 * doc/rtl.texi (const_vector): Describe new encoding scheme.
24140 * Makefile.in (OBJS): Add rtx-vector-builder.o.
24141 * rtx-vector-builder.h: New file.
24142 * rtx-vector-builder.c: Likewise.
24143 * rtl.h (rtx_def::u2): Add a const_vector field.
24144 (CONST_VECTOR_NPATTERNS): New macro.
24145 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
24146 (CONST_VECTOR_DUPLICATE_P): Likewise.
24147 (CONST_VECTOR_STEPPED_P): Likewise.
24148 (CONST_VECTOR_ENCODED_ELT): Likewise.
24149 (const_vec_duplicate_p): Check for a duplicated vector encoding.
24150 (unwrap_const_vec_duplicate): Likewise.
24151 (const_vec_series_p): Check for a non-duplicated vector encoding.
24152 Say that the function only returns true for integer vectors.
24153 * emit-rtl.c: Include rtx-vector-builder.h.
24154 (gen_const_vec_duplicate_1): Delete.
24155 (gen_const_vector): Call gen_const_vec_duplicate instead of
24156 gen_const_vec_duplicate_1.
24157 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
24158 (gen_const_vec_duplicate): Use rtx_vector_builder.
24159 (gen_const_vec_series): Likewise.
24160 (gen_rtx_CONST_VECTOR): Likewise.
24161 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
24162 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
24163 Build a new vector rather than modifying a CONST_VECTOR in-place.
24164 (handle_special_swappables): Update call accordingly.
24165 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
24166 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
24167 Build a new vector rather than modifying a CONST_VECTOR in-place.
24168 (handle_special_swappables): Update call accordingly.
24170 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24172 * simplify-rtx.c (simplify_const_binary_operation): Use
24173 CONST_VECTOR_ELT instead of XVECEXP.
24175 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24177 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
24178 the selector elements to be different from the data elements
24179 if the selector is a VECTOR_CST.
24180 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
24181 ssizetype for the selector.
24183 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24185 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
24186 before testing each element individually.
24187 * tree-vect-generic.c (lower_vec_perm): Likewise.
24189 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24191 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
24192 * selftest-run-tests.c (selftest::run_tests): Call it.
24193 * vector-builder.h (vector_builder::operator ==): New function.
24194 (vector_builder::operator !=): Likewise.
24195 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
24196 (vec_perm_indices::all_from_input_p): New function.
24197 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24198 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
24199 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
24200 instead of reading the VECTOR_CST directly. Detect whether both
24201 vector inputs are the same before constructing the vec_perm_indices,
24202 and update the number of inputs argument accordingly. Use the
24203 utility functions added above. Only construct sel2 if we need to.
24205 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24207 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
24208 the broadcast of the low byte.
24209 (expand_mult_highpart): Use an explicit encoding for the permutes.
24210 * optabs-query.c (can_mult_highpart_p): Likewise.
24211 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
24212 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24213 (vectorizable_bswap): Likewise.
24214 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
24215 explicit encoding for the power-of-2 permutes.
24216 (vect_permute_store_chain): Likewise.
24217 (vect_grouped_load_supported): Likewise.
24218 (vect_permute_load_chain): Likewise.
24220 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24222 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
24223 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
24224 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
24225 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24226 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
24227 (vect_gen_perm_mask_any): Likewise.
24229 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24231 * int-vector-builder.h: New file.
24232 * vec-perm-indices.h: Include int-vector-builder.h.
24233 (vec_perm_indices): Redefine as an int_vector_builder.
24234 (auto_vec_perm_indices): Delete.
24235 (vec_perm_builder): Redefine as a stand-alone class.
24236 (vec_perm_indices::vec_perm_indices): New function.
24237 (vec_perm_indices::clamp): Likewise.
24238 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
24239 (vec_perm_indices::new_vector): New function.
24240 (vec_perm_indices::new_expanded_vector): Update for new
24241 vec_perm_indices class.
24242 (vec_perm_indices::rotate_inputs): New function.
24243 (vec_perm_indices::all_in_range_p): Operate directly on the
24244 encoded form, without computing elided elements.
24245 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
24246 encoding. Update for new vec_perm_indices class.
24247 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
24248 the given vec_perm_builder.
24249 (expand_vec_perm_var): Update vec_perm_builder constructor.
24250 (expand_mult_highpart): Use vec_perm_builder instead of
24251 auto_vec_perm_indices.
24252 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
24253 vec_perm_indices instead of auto_vec_perm_indices. Use a single
24254 or double series encoding as appropriate.
24255 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
24256 vec_perm_indices instead of auto_vec_perm_indices.
24257 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24258 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24259 (vect_permute_store_chain): Likewise.
24260 (vect_grouped_load_supported): Likewise.
24261 (vect_permute_load_chain): Likewise.
24262 (vect_shift_permute_load_chain): Likewise.
24263 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
24264 (vect_transform_slp_perm_load): Likewise.
24265 (vect_schedule_slp_instance): Likewise.
24266 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24267 (vectorizable_mask_load_store): Likewise.
24268 (vectorizable_bswap): Likewise.
24269 (vectorizable_store): Likewise.
24270 (vectorizable_load): Likewise.
24271 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
24272 vec_perm_indices instead of auto_vec_perm_indices. Use
24273 tree_to_vec_perm_builder to read the vector from a tree.
24274 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
24275 vec_perm_builder instead of a vec_perm_indices.
24276 (have_whole_vector_shift): Use vec_perm_builder and
24277 vec_perm_indices instead of auto_vec_perm_indices. Leave the
24278 truncation to calc_vec_perm_mask_for_shift.
24279 (vect_create_epilog_for_reduction): Likewise.
24280 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
24281 from auto_vec_perm_indices to vec_perm_indices.
24282 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
24283 instead of changing individual elements.
24284 (aarch64_vectorize_vec_perm_const): Use new_vector to install
24285 the vector in d.perm.
24286 * config/arm/arm.c (expand_vec_perm_d::perm): Change
24287 from auto_vec_perm_indices to vec_perm_indices.
24288 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
24289 instead of changing individual elements.
24290 (arm_vectorize_vec_perm_const): Use new_vector to install
24291 the vector in d.perm.
24292 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
24293 Update vec_perm_builder constructor.
24294 (rs6000_expand_interleave): Likewise.
24295 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
24296 (rs6000_expand_interleave): Likewise.
24298 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24300 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
24301 to qimode could truncate the indices.
24302 * optabs.c (expand_vec_perm_var): Likewise.
24304 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24306 * Makefile.in (OBJS): Add vec-perm-indices.o.
24307 * vec-perm-indices.h: New file.
24308 * vec-perm-indices.c: Likewise.
24309 * target.h (vec_perm_indices): Replace with a forward class
24311 (auto_vec_perm_indices): Move to vec-perm-indices.h.
24312 * optabs.h: Include vec-perm-indices.h.
24313 (expand_vec_perm): Delete.
24314 (selector_fits_mode_p, expand_vec_perm_var): Declare.
24315 (expand_vec_perm_const): Declare.
24316 * target.def (vec_perm_const_ok): Replace with...
24317 (vec_perm_const): ...this new hook.
24318 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
24319 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
24320 * doc/tm.texi: Regenerate.
24321 * optabs.def (vec_perm_const): Delete.
24322 * doc/md.texi (vec_perm_const): Likewise.
24323 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
24324 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
24325 expand_vec_perm for constant permutation vectors. Assert that
24326 the mode of variable permutation vectors is the integer equivalent
24327 of the mode that is being permuted.
24328 * optabs-query.h (selector_fits_mode_p): Declare.
24329 * optabs-query.c: Include vec-perm-indices.h.
24330 (selector_fits_mode_p): New function.
24331 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
24332 is defined, instead of checking whether the vec_perm_const_optab
24333 exists. Use targetm.vectorize.vec_perm_const instead of
24334 targetm.vectorize.vec_perm_const_ok. Check whether the indices
24335 fit in the vector mode before using a variable permute.
24336 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
24337 vec_perm_indices instead of an rtx.
24338 (expand_vec_perm): Replace with...
24339 (expand_vec_perm_const): ...this new function. Take the selector
24340 as a vec_perm_indices rather than an rtx. Also take the mode of
24341 the selector. Update call to shift_amt_for_vec_perm_mask.
24342 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
24343 Use vec_perm_indices::new_expanded_vector to expand the original
24344 selector into bytes. Check whether the indices fit in the vector
24345 mode before using a variable permute.
24346 (expand_vec_perm_var): Make global.
24347 (expand_mult_highpart): Use expand_vec_perm_const.
24348 * fold-const.c: Includes vec-perm-indices.h.
24349 * tree-ssa-forwprop.c: Likewise.
24350 * tree-vect-data-refs.c: Likewise.
24351 * tree-vect-generic.c: Likewise.
24352 * tree-vect-loop.c: Likewise.
24353 * tree-vect-slp.c: Likewise.
24354 * tree-vect-stmts.c: Likewise.
24355 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
24357 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
24358 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
24359 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
24360 (aarch64_vectorize_vec_perm_const): ...this new function.
24361 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24362 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24363 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
24364 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
24365 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24366 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24367 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
24369 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
24370 check for NEON modes.
24371 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
24372 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
24373 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
24374 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
24376 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
24377 the old VEC_PERM_CONST conditions.
24378 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
24379 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
24380 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
24381 (ia64_vectorize_vec_perm_const_ok): Merge into...
24382 (ia64_vectorize_vec_perm_const): ...this new function.
24383 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
24384 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
24385 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
24386 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
24387 * config/mips/mips.c (mips_expand_vec_perm_const)
24388 (mips_vectorize_vec_perm_const_ok): Merge into...
24389 (mips_vectorize_vec_perm_const): ...this new function.
24390 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
24391 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
24392 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
24393 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
24394 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
24395 (rs6000_expand_vec_perm_const): Delete.
24396 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
24398 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24399 (altivec_expand_vec_perm_const_le): Take each operand individually.
24400 Operate on constant selectors rather than rtxes.
24401 (altivec_expand_vec_perm_const): Likewise. Update call to
24402 altivec_expand_vec_perm_const_le.
24403 (rs6000_expand_vec_perm_const): Delete.
24404 (rs6000_vectorize_vec_perm_const_ok): Delete.
24405 (rs6000_vectorize_vec_perm_const): New function.
24406 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
24407 an element count and rtx array.
24408 (rs6000_expand_extract_even): Update call accordingly.
24409 (rs6000_expand_interleave): Likewise.
24410 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
24411 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
24412 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
24413 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
24414 (rs6000_expand_vec_perm_const): Delete.
24415 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24416 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24417 (altivec_expand_vec_perm_const_le): Take each operand individually.
24418 Operate on constant selectors rather than rtxes.
24419 (altivec_expand_vec_perm_const): Likewise. Update call to
24420 altivec_expand_vec_perm_const_le.
24421 (rs6000_expand_vec_perm_const): Delete.
24422 (rs6000_vectorize_vec_perm_const_ok): Delete.
24423 (rs6000_vectorize_vec_perm_const): New function. Remove stray
24424 reference to the SPE evmerge intructions.
24425 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
24426 an element count and rtx array.
24427 (rs6000_expand_extract_even): Update call accordingly.
24428 (rs6000_expand_interleave): Likewise.
24429 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
24430 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
24432 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24434 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24436 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
24437 vector mode and that that mode matches the mode of the data
24439 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
24440 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
24441 directly using expand_vec_perm_1 when forcing selectors into
24443 (expand_vec_perm_var): New function, split out from expand_vec_perm.
24445 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24447 * optabs-query.h (can_vec_perm_p): Delete.
24448 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
24449 * optabs-query.c (can_vec_perm_p): Split into...
24450 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
24451 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
24452 particular selector is valid.
24453 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24454 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24455 (vect_grouped_load_supported): Likewise.
24456 (vect_shift_permute_load_chain): Likewise.
24457 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
24458 (vect_transform_slp_perm_load): Likewise.
24459 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24460 (vectorizable_bswap): Likewise.
24461 (vect_gen_perm_mask_checked): Likewise.
24462 * fold-const.c (fold_ternary_loc): Likewise. Don't take
24463 implementations of variable permutation vectors into account
24464 when deciding which selector to use.
24465 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
24466 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
24467 with a false third argument.
24468 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
24469 to test whether the constant selector is valid and can_vec_perm_var_p
24470 to test whether a variable selector is valid.
24472 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24474 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
24475 * optabs-query.c (can_vec_perm_p): Likewise.
24476 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
24477 instead of vec_perm_indices.
24478 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
24479 (vect_gen_perm_mask_checked): Likewise,
24480 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
24481 (vect_gen_perm_mask_checked): Likewise,
24483 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24485 * optabs-query.h (qimode_for_vec_perm): Declare.
24486 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
24487 (qimode_for_vec_perm): ...this new function.
24488 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
24490 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24492 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
24493 does not have a conditional at the top.
24495 2018-01-02 Richard Biener <rguenther@suse.de>
24497 * ipa-inline.c (big_speedup_p): Fix expression.
24499 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
24502 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
24505 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
24509 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
24510 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
24511 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
24512 cond_taken_branch_cost 3->4.
24514 2018-01-01 Jakub Jelinek <jakub@redhat.com>
24516 PR tree-optimization/83581
24517 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
24518 TODO_cleanup_cfg if any changes have been made.
24520 PR middle-end/83608
24521 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
24522 convert_modes if target mode has the right side, but different mode
24525 PR middle-end/83609
24526 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
24527 last argument when extracting from CONCAT. If either from_real or
24528 from_imag is NULL, use expansion through memory. If result is not
24529 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
24530 the parts directly to inner mode, if even that fails, use expansion
24533 PR middle-end/83623
24534 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
24535 check for bswap in mode rather than HImode and use that in expand_unop
24538 Copyright (C) 2018 Free Software Foundation, Inc.
24540 Copying and distribution of this file, with or without modification,
24541 are permitted in any medium without royalty provided the copyright
24542 notice and this notice are preserved.