1 2018-08-28 David Malcolm <dmalcolm@redhat.com>
3 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
4 GCC_VERSION for usage of "__gcc_dump_printf__" format from
7 2018-08-28 Richard Biener <rguenther@suse.de>
9 PR tree-optimization/87124
10 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
11 constants before looking up avail.
13 2018-08-28 Jakub Jelinek <jakub@redhat.com>
16 * calls.c (maybe_warn_nonstring_arg): Punt early if
17 warn_stringop_overflow is zero. Don't call get_range_strlen
18 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
19 Swap comparison operands to have constants on rhs. Only use
20 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
23 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
25 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
26 use of tree_to_shwi. Remove duplicated test for the size being
27 a whole number of bytes.
29 2018-08-28 Richard Biener <rguenther@suse.de>
31 PR tree-optimization/87117
32 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
33 Handle removed stmt without LHS (GIMPLE_NOP).
35 2018-08-28 Richard Biener <rguenther@suse.de>
37 PR tree-optimization/87117
38 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
39 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
41 2018-08-28 Richard Biener <rguenther@suse.de>
43 PR tree-optimization/87117
44 * tree-ssa-pre.c (compute_avail): Do not make expressions
45 with predicated values available.
46 (get_expr_value_id): Assert we do not run into predicated value
49 2018-08-28 Richard Biener <rguenther@suse.de>
51 PR tree-optimization/87117
52 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
54 (get_expr_operands): Handle STRING_CST like other decls.
56 2018-08-28 Martin Liska <mliska@suse.cz>
58 * tree.h: Update documentation of fndecl_built_in_p
61 2018-08-27 Jeff Law <law@redhat.com>
63 PR tree-optimization/87110
64 * tree-ssa-dse.c (compute_trims): Handle non-constant
67 2018-08-27 Martin Sebor <msebor@redhat.com>
69 PR tree-optimization/86914
70 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
72 2018-08-27 Martin Sebor <msebor@redhat.com>
74 PR tree-optimization/87112
75 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
76 the type of the bound argument.
78 2018-08-27 Jeff Law <law@redhat.com>
80 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
81 type does not have a TYPE_SIZE_UNIT.
83 2018-08-27 Steve Ellcey <sellcey@cavium.com>
85 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
86 with include of backend.h.
88 2018-08-27 Richard Biener <rguenther@suse.de>
90 PR tree-optimization/86927
91 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
92 use const cond reduction code.
94 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
96 PR tree-optimization/85758
97 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
99 2018-08-27 David Malcolm <dmalcolm@redhat.com>
102 * diagnostic-show-locus.c (class layout_range): Update for
103 conversion of show_caret_p to a tri-state.
104 (layout_range::layout_range): Likewise.
105 (make_range): Likewise.
106 (layout::maybe_add_location_range): Likewise.
107 (layout::should_print_annotation_line_p): Don't show annotation
108 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
109 (layout::get_state_at_point): Update for conversion of
110 show_caret_p to a tri-state. Bail out early for
111 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
112 underlining or source colorization.
113 (gcc_rich_location::add_location_if_nearby): Update for conversion
114 of show_caret_p to a tri-state.
115 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
116 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
118 (selftest::test_one_liner_labels): Likewise.
119 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
120 conversion of show_caret_p to a tri-state.
121 * pretty-print.c (text_info::set_location): Likewise.
122 * pretty-print.h (text_info::set_location): Likewise.
123 * substring-locations.c (format_warning_n_va): Likewise.
124 * tree-diagnostic.c (default_tree_printer): Likewise.
125 * tree-pretty-print.c (newline_and_indent): Likewise.
127 2018-08-27 David Malcolm <dmalcolm@redhat.com>
130 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
131 line above for line-insertion fix-it hints.
132 (selftest::test_fixit_insert_containing_newline): Update the
133 expected results, and add a test with line-numbering enabled.
135 2018-08-27 Martin Liska <mliska@suse.cz>
138 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
139 params with DECL_HAS_VALUE_EXPR_P.
141 2018-08-27 Martin Liska <mliska@suse.cz>
143 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
144 selected expansion strategy.
146 2018-08-27 Martin Liska <mliska@suse.cz>
148 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
149 * builtins.c (is_builtin_fn): Likewise.
150 * attribs.c (diag_attr_exclusions): Use new function
151 fndecl_built_in_p and remove check for FUNCTION_DECL if
153 (builtin_mathfn_code): Likewise.
154 (fold_builtin_expect): Likewise.
155 (fold_call_expr): Likewise.
156 (fold_builtin_call_array): Likewise.
157 (fold_call_stmt): Likewise.
158 (set_builtin_user_assembler_name): Likewise.
159 (is_simple_builtin): Likewise.
160 * calls.c (gimple_alloca_call_p): Likewise.
161 (maybe_warn_nonstring_arg): Likewise.
162 * cfgexpand.c (expand_call_stmt): Likewise.
163 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
164 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
165 (cgraph_node::verify_node): Likewise.
166 * cgraphclones.c (build_function_decl_skip_args): Likewise.
167 (cgraph_node::create_clone): Likewise.
168 * config/arm/arm.c (arm_insert_attributes): Likewise.
169 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
170 * dse.c (scan_insn): Likewise.
171 * expr.c (expand_expr_real_1): Likewise.
172 * fold-const.c (operand_equal_p): Likewise.
173 (fold_binary_loc): Likewise.
174 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
175 * gimple-low.c (lower_stmt): Likewise.
176 * gimple-pretty-print.c (dump_gimple_call): Likewise.
177 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
178 * gimple.c (gimple_build_call_from_tree): Likewise.
179 (gimple_call_builtin_p): Likewise.
180 (gimple_call_combined_fn): Likewise.
181 * gimplify.c (gimplify_call_expr): Likewise.
182 (gimple_boolify): Likewise.
183 (gimplify_modify_expr): Likewise.
184 (gimplify_addr_expr): Likewise.
185 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
186 * ipa-cp.c (determine_versionability): Likewise.
187 * ipa-fnsummary.c (compute_fn_summary): Likewise.
188 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
189 * ipa-split.c (visit_bb): Likewise.
190 (split_function): Likewise.
191 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
192 * lto-cgraph.c (input_node): Likewise.
193 * lto-streamer-out.c (write_symbol): Likewise.
194 * omp-low.c (setjmp_or_longjmp_p): Likewise.
195 (lower_omp_1): Likewise.
196 * predict.c (strip_predict_hints): Likewise.
197 * print-tree.c (print_node): Likewise.
198 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
199 * trans-mem.c (is_tm_irrevocable): Likewise.
200 (is_tm_load): Likewise.
201 (is_tm_simple_load): Likewise.
202 (is_tm_store): Likewise.
203 (is_tm_simple_store): Likewise.
204 (is_tm_abort): Likewise.
205 (tm_region_init_1): Likewise.
206 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
207 * tree-cfg.c (verify_gimple_call): Likewise.
208 (move_stmt_r): Likewise.
209 (stmt_can_terminate_bb_p): Likewise.
210 * tree-eh.c (lower_eh_constructs_2): Likewise.
211 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
212 * tree-inline.c (remap_gimple_stmt): Likewise.
214 (estimate_num_insns): Likewise.
215 (fold_marked_statements): Likewise.
216 * tree-sra.c (scan_function): Likewise.
217 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
218 (optimize_stack_restore): Likewise.
219 (pass_fold_builtins::execute): Likewise.
220 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
221 (mark_all_reaching_defs_necessary_1): Likewise.
222 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
223 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
224 (pass_forwprop::execute): Likewise.
225 * tree-ssa-loop-im.c (stmt_cost): Likewise.
226 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
227 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
228 * tree-ssa-strlen.c (get_string_length): Likewise.
229 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
230 (find_func_aliases_for_call): Likewise.
231 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
232 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
233 * tree-tailcall.c (find_tail_calls): Likewise.
234 * tree.c (need_assembler_name_p): Likewise.
235 (free_lang_data_in_decl): Likewise.
236 (get_call_combined_fn): Likewise.
237 * ubsan.c (is_ubsan_builtin_p): Likewise.
238 * varasm.c (incorporeal_function_p): Likewise.
239 * tree.h (DECL_BUILT_IN): Remove and replace with
241 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
242 (fndecl_built_in_p): New.
244 2018-08-27 Martin Liska <mliska@suse.cz>
246 PR tree-optimization/86847
247 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
248 Dump also subtree probability.
249 (switch_decision_tree::do_jump_if_equal): New function.
250 (switch_decision_tree::emit_case_nodes): Handle special
251 situations in balanced tree that can be emitted much simpler.
252 Fix calculation of probabilities that happen in tree expansion.
253 * tree-switch-conversion.h (struct cluster): Add
255 (struct simple_cluster): Likewise.
256 (struct case_tree_node): Add new function has_child.
257 (do_jump_if_equal): New.
259 2018-08-27 Martin Liska <mliska@suse.cz>
261 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
262 Add new argument to bit_test_cluster constructor.
263 (bit_test_cluster::emit): Set bits really number of values
265 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
266 probability argument.
267 * tree-switch-conversion.h (struct bit_test_cluster):
268 Add m_handles_entire_switch.
270 2018-08-27 Martin Liska <mliska@suse.cz>
272 PR tree-optimization/86702
273 * tree-switch-conversion.c (jump_table_cluster::emit):
274 Make probabilities even for values in jump table
275 according to number of cases handled.
276 (switch_decision_tree::compute_cases_per_edge): Pass
277 argument to reset_out_edges_aux function.
278 (switch_decision_tree::analyze_switch_statement): Likewise.
279 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
282 2018-08-27 Martin Liska <mliska@suse.cz>
284 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
285 cfun argument explicitly.
286 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
287 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
288 function gimple_switch_default_bb.
289 (convert_switch_statements):
291 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
292 * stmt.c (label_to_block_fn): Use label_to_block and pass
293 cfun argument explicitly and use gimple_switch_label_bb.
294 (expand_case): Likewise.
295 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
296 cfun argument explicitly. Likewise.
297 (make_edges_bb): Likewise.
298 (make_cond_expr_edges): Likewise.
299 (get_cases_for_edge): Likewise.
300 (make_gimple_switch_edges): Likewise.
301 (label_to_block_fn): Likewise.
302 (label_to_block): Likewise.
303 (make_goto_expr_edges): Likewise.
304 (make_gimple_asm_edges): Likewise.
305 (main_block_label): Likewise.
306 (group_case_labels_stmt): Likewise.
307 (find_taken_edge_computed_goto): Likewise.
308 (find_taken_edge_switch_expr): Likewise.
309 (gimple_verify_flow_info): Likewise.
310 (gimple_redirect_edge_and_branch): Likewise.
311 (gimple_switch_label_bb): New function.
312 (gimple_switch_default_bb): Likewise.
313 (gimple_switch_edge): Likewise.
314 (gimple_switch_default_edge): Likewise.
315 * tree-cfg.h (label_to_block_fn): Remove and replace ...
316 (label_to_block): ... with this.
317 (gimple_switch_label_bb): New.
318 (gimple_switch_default_bb): Likewise.
319 (gimple_switch_edge): Likewise.
320 (gimple_switch_default_edge): Likewise.
321 * tree-cfgcleanup.c (convert_single_case_switch): Use
322 new gimple functions and pass new argument to label_to_block.
323 (cleanup_control_flow_bb):
324 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
325 cfun argument explicitly.
326 (make_eh_edges): Likewise.
327 (redirect_eh_dispatch_edge): Likewise.
328 (lower_resx): Likewise.
329 (lower_eh_dispatch): Likewise.
330 (maybe_remove_unreachable_handlers): Likewise.
331 (unsplit_eh): Likewise.
332 (cleanup_empty_eh): Likewise.
333 (verify_eh_edges): Likewise.
334 (verify_eh_dispatch_edge): Likewise.
335 * tree-ssa-dom.c (record_edge_info): Likewise.
336 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
337 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
338 (thread_through_normal_block): Likewise.
339 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
340 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
341 * tree-switch-conversion.c (switch_conversion::collect): Use new
343 (switch_conversion::check_final_bb): Likewise.
344 (switch_conversion::gather_default_values): Pass new argument
346 (switch_conversion::build_constructors): Likewise.
347 (switch_decision_tree::compute_cases_per_edge): Use new
348 gimple_switch_edge function.
349 (switch_decision_tree::analyze_switch_statement): Pass new argument
351 (switch_decision_tree::try_switch_expansion): Use
352 gimple_switch_default_edge.
353 * tree-vrp.c (find_switch_asserts): Pass new argument
355 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
356 (vr_values::simplify_switch_using_ranges): Likewise.
358 2018-08-27 Richard Biener <rguenther@suse.de>
360 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
361 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
363 * tree-ssa-sccvn.h (struct vn_pval): New structure.
364 (struct vn_nary_op_s): Add unwind_to member. Add
365 predicated_values flag and put result into a union together
366 with a linked list of vn_pval.
367 (struct vn_ssa_aux): Add name member to make maintaining
368 a map of SSA name to vn_ssa_aux possible. Remove no longer
369 needed info, dfsnum, low, visited, on_sccstack, use_processed
370 and range_info_anti_range_p members.
371 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
372 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
374 (vn_valueize): New global.
375 (vn_context_bb): Likewise.
376 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
377 VN_INFO_PTR_INFO): Remove.
378 * tree-ssa-sccvn.c: ... (rewrite)
379 (pass_fre::execute): For -O2+ initialize loops and run
380 RPO VN in optimistic mode (iterating). For -O1 and -Og
381 run RPO VN in non-optimistic mode.
382 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
383 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
384 * doc/invoke.texi (sccvn-max-scc-size): Remove.
385 (rpo-vn-max-loop-depth): Document.
386 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
387 when valuezing the VUSE signals we walked out of the region.
388 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
389 (phi_translate): Set VN context block to use for availability
391 (compute_avail): Likewise.
392 (pre_valueize): New function.
393 (pass_pre::execute): Adjust to the RPO VN API.
395 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
396 (propagate_constants_for_unrolling): Remove.
397 (tree_unroll_loops_completely): Perform value-numbering
398 on the unrolled bodies loop parent.
400 2018-08-27 Richard Biener <rguenther@suse.de>
402 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
403 for partial antic compute.
405 2018-08-27 Jakub Jelinek <jakub@redhat.com>
407 PR rtl-optimization/87065
408 * combine.c (simplify_if_then_else): Formatting fix.
409 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
411 (known_cond): Don't return const_true_rtx for vector modes. Use
412 CONST0_RTX instead of const0_rtx. Formatting fixes.
414 2018-08-27 Martin Liska <mliska@suse.cz>
416 PR gcov-profile/87069
417 * gcov.c (process_file): Record files already processed
418 and warn about a file being processed multiple times.
420 2018-08-27 Martin Liska <mliska@suse.cz>
423 * config/aarch64/aarch64.c (aarch64_override_options_internal):
424 Set default values for x_aarch64_*_string strings.
425 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
426 prefix. For -mabi do not print '=ABI' in help and use
427 <option_value> format for -msve-vector-bits and -moverride
430 2018-08-26 Jeff Law <law@redhat.com>
432 * config/mips/frame-header-opt.c: Include "backend.h" rather than
435 2018-08-26 Marek Polacek <polacek@redhat.com>
437 PR c++/87029, Implement -Wredundant-move.
438 * doc/invoke.texi: Document -Wredundant-move.
440 2018-08-25 Martin Sebor <msebor@redhat.com>
442 PR tree-optimization/87059
443 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
444 to the same type as the other.
445 * fold-const.c (fold_binary_loc): Assert expectation.
447 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
449 * config/darwin.c (machopic_legitimize_pic_address): Clean up
450 extraneous parentheses, dead code section and formatting.
452 2018-08-24 David Malcolm <dmalcolm@redhat.com>
455 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
456 wide enough for jumps in the line-numbering to be visible.
457 (layout::print_gap_in_line_numbering): New member function.
458 (layout::calculate_line_spans): When using line numbering, merge
459 line spans that are only 1 line apart.
460 (diagnostic_show_locus): When printing line numbers, show gaps in
461 line numbering directly, rather than printing headers.
462 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
463 line-numbering with multiple line spans.
464 (selftest::test_fixit_insert_containing_newline_2): Add test of
465 line-numbering, in which the spans are close enough to be merged.
467 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
469 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
470 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
471 * tree-vrp.c (range_is_nonnull): Remove.
472 (range_includes_zero_p): Accept value_range instead of min/max.
473 (extract_range_from_binary_expr_1): Do not early bail on
475 Use range_includes_zero_p instead of range_is_nonnull.
476 (extract_range_from_unary_expr): Use range_includes_zero_p instead
478 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
479 special case VR_ANTI_RANGE.
480 (vrp_finalize): Same.
481 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
483 (range_is_nonnull): Remove.
484 * vr-values.c (vrp_stmt_computes_nonzero): Use
485 range_includes_zero_p instead of range_is_nonnull.
486 (extract_range_basic): Pass value_range to range_includes_zero_p
487 instead of range_is_nonnull.
489 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
491 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
492 * emit-rtl.h (rtl_data): Remove return_bnd.
493 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
494 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
495 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
496 (POINTER_BOUNDS_MODE): Remove definition.
497 (make_pointer_bounds_mode): Remove.
498 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
499 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
500 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
501 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
502 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
503 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
504 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
506 * config/i386/i386-modes.def (BND32, BND64): Remove.
507 * config/i386/i386.c (dbx_register_map): Remove bound registers.
508 (dbx64_register_map): Ditto.
509 (svr4_dbx_register_map): Ditto.
510 (indirect_thunk_bnd_needed): Remove.
511 (indirect_thunks_bnd_used): Ditto.
512 (indirect_return_bnd_needed): Ditto.
513 (indirect_return_via_cx_bnd): Ditto.
514 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
515 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
516 (output_indirect_thunk): Ditto. Remove need_prefix argument.
517 (output_indirect_thunk_function): Remove handling of
518 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
519 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
520 (ix86_save_reg): Remove handling of crtl->return_bnd.
521 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
522 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
523 and UNSPEC_BNDLX_ADDR.
524 (ix86_output_indirect_branch_via_reg): Remove handling of
525 indirect_thunk_prefix_bnd.
526 (ix86_output_indirect_branch_via_push): Ditto.
527 (ix86_output_function_return): Ditto.
528 (ix86_output_indirect_function_return): Ditto.
529 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
530 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
531 (CALL_USED_REGISTERS): Ditto.
532 (REG_ALLOC_ORDER): Update for removal of bound registers.
533 (HI_REGISTER_NAMES): Ditto.
534 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
535 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
536 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
537 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
538 (FIRST_PSEUDO_REG): Update.
539 (BND): Remove mode iterator.
540 * config/i386/predicates.md (bnd_mem_operator): Remove.
542 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
544 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
547 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
549 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
550 the case in which the permute needs only a single element and
551 repeats for every vector of the result. Extend that case to
552 handle variable-length vectors.
553 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
555 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
558 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
559 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
561 2018-08-24 Richard Biener <rguenther@suse.de>
563 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
564 bb_flags_allocated members.
565 (auto_flag): New RAII class for allocating flags.
566 (auto_edge_flag): New RAII class for allocating edge flags.
567 (auto_bb_flag): New RAII class for allocating bb flags.
568 * cfgloop.c (verify_loop_structure): Allocate temporary edge
570 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
571 in favor of temporarily allocated BB flag.
572 * hsa-brig.c: Re-order includes.
573 * hsa-dump.c: Likewise.
574 * hsa-regalloc.c: Likewise.
575 * print-rtl.c: Likewise.
576 * profile-count.c: Likewise.
578 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
581 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
584 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
587 * wide-int-range.cc (wide_int_range_div): Do not ignore result
588 from wide_int_range_multiplicative_op.
590 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
592 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
595 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
597 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
600 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
602 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
603 full GENERIC expression used for replacement.
605 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
607 * tree-vrp.c (abs_extent_range): Remove.
608 (extract_range_into_wide_ints): Pass wide ints by reference.
609 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
610 Pass wide ints by reference in all calls to
611 extract_range_into_wide_ints.
612 * wide-int-range.cc (wide_int_range_div): New.
613 * wide-int-range.h (wide_int_range_div): New.
614 (wide_int_range_includes_zero_p): New.
615 (wide_int_range_zero_p): New.
617 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
619 * config/aarch64/aarch64.md (arches): New enum.
620 (arch): New enum attr.
621 (arch_enabled): New attr.
622 (enabled): Now uses arch_enabled only.
623 (simd, sve, fp16): Removed attribute.
624 (fp): Attr now defined in terms of 'arch'.
625 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
626 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
627 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
628 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
629 attributes into 'arch'.
630 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
631 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
632 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
633 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
634 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
635 'simd' attribute into 'arch'.
636 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
637 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
638 Convert use of 'fp' attribute to 'arch'.
639 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
640 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
642 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
643 (different modes) Merge 'fp' and 'simd' into 'arch'.
644 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
647 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
649 PR rtl-optimization/87026
650 * expmed.c (canonicalize_comparison): If we can no longer create
651 pseudoregisters, don't.
653 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
656 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
658 * config/arm/arm.c (speculation_barrier_libfunc): New static
660 (arm_init_libfuncs): Initialize it.
661 (arm_emit_speculation_barrier): New function.
662 * config/arm/arm.md (speculation_barrier): Call
663 arm_emit_speculation_barrier for architectures that do not have
665 (speculation_barrier_insn): Only match on Armv7 or later.
667 2018-08-23 Richard Biener <rguenther@suse.de>
670 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
673 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
675 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
676 of single-vector TBLs.
677 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
680 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
683 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
684 aarch64_evpc_tbl guard.
686 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
688 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
691 2018-08-22 Martin Sebor <msebor@redhat.com>
694 * tree-pretty-print.c (pretty_print_string): Add argument.
695 (dump_generic_node): Call to pretty_print_string with string size.
697 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
699 PR rtl-optimization/86771
700 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
701 of two SETs into those two SETs, one to be placed at i2, if that SETs
702 destination is modified between i2 and i3.
704 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
706 PR tree-optimization/86725
707 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
709 (vect_analyze_scalar_cycles_1): Check it.
711 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
713 PR tree-optimization/86725
714 * tree-vect-loop.c (vect_is_simple_reduction): When treating
715 an outer loop phi as a double reduction, make sure that the
716 single user of the phi result is an inner loop phi.
718 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
720 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
721 grouped stores with gaps to a strided group.
723 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
725 * tree-vect-stmts.c (get_group_load_store_type)
726 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
727 first statement in a group.
729 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
731 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
732 the sequence used in gcc/gcc.c.
734 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
737 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
740 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
742 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
743 Darwin10-specific unwinder-shim.
744 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
745 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
746 New to cater for Darwin10 Rosetta.
748 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
750 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
751 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
753 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
758 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
759 (dwarf2out_switch_text_section): Generate a local label for the
760 second function sub-section and apply it as the second FDE start
762 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
763 second sub-section start.
765 2018-08-22 Richard Biener <rguenther@suse.de>
767 PR tree-optimization/86988
768 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
770 2018-08-22 Richard Biener <rguenther@suse.de>
772 PR tree-optimization/86945
773 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
775 2018-08-22 Alexandre Oliva <oliva@adacore.com>
777 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
778 a comment about how uses of r2 for .sdata2 come about.
780 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
782 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
784 2018-08-21 Marek Polacek <polacek@redhat.com>
786 PR c++/86981, Implement -Wpessimizing-move.
787 * doc/invoke.texi: Document -Wpessimizing-move.
789 2018-08-21 Jan Hubicka <jh@suse.cz>
791 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
792 * tree.h (is_redundant_typedef): Remove.
793 * dwarf2out.c (is_redundant_typedef): Turn into static function.
795 2018-08-21 Jan Hubicka <jh@suse.cz>
797 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
800 2018-08-21 Tamar Christina <tamar.christina@arm.com>
802 * expmed.c (extract_low_bits): Reject invalid subregs early.
804 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
807 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
810 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
812 * config/vxworks.h: Guard vxworks_asm_out_constructor and
813 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
814 * config/vxworks.c: Likewise.
816 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
818 * config/vxworks.c: Set targetm.have_ctors_dtors
819 if HAVE_INITFINI_ARRAY_SUPPORT.
820 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
821 if HAVE_INITFINI_ARRAY_SUPPORT.
823 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
825 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
826 default search path for VxWorks < 7.
828 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
830 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
831 (get_format_string): Refer to c_getstr.
833 2018-08-21 Tom de Vries <tdevries@suse.de>
835 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
836 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
837 (debuginfo_early_stop): Declare.
838 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
839 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
840 (debuginfo_early_stop): New function.
841 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
842 and debuginfo_early_stop.
843 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
844 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
845 (general_init): Call debuginfo_early_init.
846 (finalize): Call debuginfo_fini.
847 (do_compile): Call debuginfo_init.
848 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
850 (@item -fdump-debug, @item -fdump-earlydebug): Add.
852 2018-08-21 Tom de Vries <tdevries@suse.de>
854 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
855 flag_dump_noaddr and flag_dump_unnumbered.
857 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
859 * wide-int-range.cc (wide_int_range_abs): New.
860 (wide_int_range_order_set): Rename from wide_int_range_min_max.
861 * wide-int-range.h (wide_int_range_abs): New.
862 (wide_int_range_min_max): New.
863 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
864 case to call wide_int_range_abs.
865 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
866 (extract_range_from_abs_expr): Delete.
868 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
871 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
872 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
875 2018-08-20 Nathan Sidwell <nathan@acm.org>
876 Jeff Law <law@redhat.com>
878 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
879 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
881 2018-08-20 David Malcolm <dmalcolm@redhat.com>
884 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
885 (decl_attributes): Likewise.
886 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
888 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
889 * diagnostic-core.h (class auto_diagnostic_group): New class.
890 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
891 (diagnostic_report_diagnostic): Handle the first diagnostics within
893 (emit_diagnostic): Add auto_diagnostic_group instance.
895 (inform_n): Likewise.
897 (warning_at): Likewise.
898 (warning_n): Likewise.
900 (permerror): Likewise.
903 (error_at): Likewise.
905 (fatal_error): Likewise.
906 (internal_error): Likewise.
907 (internal_error_no_backtrace): Likewise.
908 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
909 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
910 * diagnostic.h (struct diagnostic_context): Add fields
911 "diagnostic_group_nesting_depth",
912 "diagnostic_group_emission_count", "begin_group_cb",
914 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
915 Add auto_diagnostic_group instance(s).
916 (find_explicit_erroneous_behavior): Likewise.
917 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
918 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
919 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
920 (gimplify_va_arg_expr): Likewise.
921 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
922 (HSA_SORRY_AT): Likewise.
923 * ipa-devirt.c (compare_virtual_tables): Likewise.
924 (warn_odr): Likewise.
925 * multiple_target.c (expand_target_clones): Likewise.
926 * opts-common.c (cmdline_handle_error): Likewise.
927 * reginfo.c (globalize_reg): Likewise.
928 * substring-locations.c (format_warning_n_va): Likewise.
929 * tree-inline.c (expand_call_inline): Likewise.
930 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
931 * tree-ssa-loop-niter.c
932 (do_warn_aggressive_loop_optimizations): Likewise.
933 * tree-ssa-uninit.c (warn_uninit): Likewise.
934 * tree.c (warn_deprecated_use): Likewise.
936 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
939 * config/i386/i386.md (eh_return): Always update EH return
940 address in word_mode.
942 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
944 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
945 TARGET_SPLIT_COMPLEX_ARG is defined.
947 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
949 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
951 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
954 * expr.c (expand_assignment): Assert that bitpos is positive.
955 (store_field): Likewise
956 (expand_expr_real_1): Make sure that bitpos is positive.
957 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
960 2018-08-20 Nathan Sidwell <nathan@acm.org>
962 * Makefile.in (CPP_ID_DATA_H): Delete.
963 (CPP_INTERNAL_H): Don't add it.
964 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
965 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
967 2018-08-20 Richard Biener <rguenther@suse.de>
969 PR tree-optimization/78655
970 * tree-vrp.c (extract_range_from_binary_expr_1): Make
971 pointer + offset nonnull if either operand is nonnull work.
973 2018-08-20 Tom de Vries <tdevries@suse.de>
975 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
976 unless the referenced die describes the added property using
977 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
978 Otherwise, add a DW_AT_location to the referenced die.
980 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
983 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
984 register_operand when calling ix86_set_reg_reg_cost.
985 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
986 Set *total to 0 for operands that satisfy x86_64_immediate_operand
987 predicate and to 1 otherwise.
989 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
991 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
992 emit a diagnostic that it is not supported and reset the option.
993 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
994 supported and consume the option. (ASM_FINAL_SPEC): New.
996 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
998 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
1001 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
1003 C-SKY port: Documentation
1005 * doc/extend.texi (C-SKY Function Attributes): New section.
1006 * doc/invoke.texi (Option Summary): Add C-SKY options.
1007 (C-SKY Options): New section.
1008 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
1010 2018-08-17 Jojo <jijie_rong@c-sky.com>
1011 Huibin Wang <huibin_wang@c-sky.com>
1012 Sandra Loosemore <sandra@codesourcery.com>
1013 Chung-Lin Tang <cltang@codesourcery.com>
1015 C-SKY port: Backend implementation
1017 * config/csky/*: New.
1018 * common/config/csky/*: New.
1020 2018-08-17 Jojo <jijie_rong@c-sky.com>
1021 Huibin Wang <huibin_wang@c-sky.com>
1022 Sandra Loosemore <sandra@codesourcery.com>
1023 Chung-Lin Tang <cltang@codesourcery.com>
1024 Andrew Jenner <andrew@codesourcery.com>
1026 C-SKY port: Configury
1028 * config.gcc (csky-*-*): New.
1029 * configure.ac: Add csky to targets for dwarf2 debug_line support.
1030 * configure: Regenerated.
1032 2018-08-17 David Malcolm <dmalcolm@redhat.com>
1034 * dump-context.h: Include "dumpfile.h".
1035 (dump_context::dump_printf_va): Convert final param from va_list
1036 to va_list *. Convert from ATTRIBUTE_PRINTF to
1037 ATTRIBUTE_GCC_DUMP_PRINTF.
1038 (dump_context::dump_printf_loc_va): Likewise.
1039 * dumpfile.c: Include "stringpool.h".
1040 (make_item_for_dump_printf_va): Delete.
1041 (make_item_for_dump_printf): Delete.
1042 (class dump_pretty_printer): New class.
1043 (dump_pretty_printer::dump_pretty_printer): New ctor.
1044 (dump_pretty_printer::emit_items): New member function.
1045 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
1047 (dump_pretty_printer::emit_item): New member function.
1048 (dump_pretty_printer::stash_item): New member function.
1049 (dump_pretty_printer::format_decoder_cb): New member function.
1050 (dump_pretty_printer::decode_format): New member function.
1051 (dump_context::dump_printf_va): Reimplement in terms of
1052 dump_pretty_printer.
1053 (dump_context::dump_printf_loc_va): Convert final param from va_list
1055 (dump_context::begin_scope): Reimplement call to
1056 make_item_for_dump_printf.
1057 (dump_printf): Update for change to dump_printf_va.
1058 (dump_printf_loc): Likewise.
1059 (selftest::test_capture_of_dump_calls): Convert "stmt" from
1060 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
1061 with %T, %E, and %G.
1062 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
1063 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
1064 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
1065 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
1066 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
1067 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
1068 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
1069 within a dump_printf_loc call to "%wu".
1070 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
1071 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
1072 missing space after "=".
1073 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
1074 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
1075 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
1076 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
1077 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
1078 duplicate "vectorized" from message.
1080 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1082 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
1083 polyNxK_t element's TYPE_STRING_FLAG.
1085 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
1087 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
1088 (they were unnamed before). Fix comments.
1090 2018-08-17 Nathan Sidwell <nathan@acm.org>
1092 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
1094 2018-08-17 Richard Biener <rguenther@suse.de>
1096 PR tree-optimization/86841
1097 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
1099 2018-08-17 Martin Liska <mliska@suse.cz>
1101 * common.opt: Remove Warn, Init and Report for options with
1102 Ignore/Deprecated flag. Warning is done automatically for
1104 * config/i386/i386.opt: Likewise.
1105 * config/ia64/ia64.opt: Likewise.
1106 * config/rs6000/rs6000.opt: Likewise.
1107 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
1108 Remove usage of flag_check_pointer_bounds.
1109 * lto-wrapper.c (merge_and_complain): Do not handle
1110 OPT_fcheck_pointer_bounds.
1111 (append_compiler_options): Likewise.
1112 * opt-functions.awk: Do not handle Deprecated.
1113 * optc-gen.awk: Check that Var, Report and Init are not
1114 used for an option with Ignore/Deprecated flag.
1115 * opts-common.c (decode_cmdline_option): Do not report
1117 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
1119 * opts.h (struct cl_option): Remove cl_deprecated flag.
1120 (CL_ERR_DEPRECATED): Remove error enum value.
1122 2018-08-17 Richard Biener <rguenther@suse.de>
1125 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
1126 across a va-arg-pack using call adjust its return value accordingly.
1128 2018-08-16 Martin Sebor <msebor@redhat.com>
1130 PR tree-optimization/86853
1131 * gimple-ssa-sprintf.c (struct format_result): Rename member.
1132 (struct fmtresult): Add member and initialize it in ctors.
1133 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
1134 (format_string): Handle %S the same as %ls. Set MAYFAIL.
1135 (format_directive): Set POSUNDER4K when MAYFAIL is set.
1136 (parse_directive): Handle %C same as %c.
1137 (sprintf_dom_walker::compute_format_length): Adjust.
1138 (is_call_safe): Adjust.
1140 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1142 * builtins.c (c_strlen): Add new parameter eltsize. Use it
1143 for determining how to count the elements.
1144 * builtins.h (c_strlen): Adjust prototype.
1145 * expr.c (string_constant): Add new parameter mem_size.
1146 Set *mem_size appropriately.
1147 * expr.h (string_constant): Adjust protoype.
1148 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
1149 * gimple-fold.h (get_range_strlen): Adjust prototype.
1150 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
1151 (format_string): Call get_string_length with eltsize.
1153 2018-08-16 David Malcolm <dmalcolm@redhat.com>
1155 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
1156 to emit the span, rather than setting it as the prefix.
1158 2018-08-16 David Malcolm <dmalcolm@redhat.com>
1160 * diagnostic-show-locus.c (layout::start_annotation_line): Add
1161 "margin_char" parameter, defaulting to space. Use it in place
1162 of pp_space for the initial part of the margin.
1163 (layout::print_leading_fixits): Use '+' when filling the margin
1164 of line-insertion fix-it hints.
1166 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1168 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
1171 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1173 * config/rs6000/altivec.md: Don't set length attribute to the default
1175 * config/rs6000/darwin.md: Ditto.
1176 * config/rs6000/dfp.md: Ditto.
1177 * config/rs6000/htm.md: Ditto.
1178 * config/rs6000/rs6000.md: Ditto.
1179 * config/rs6000/sync.md: Ditto.
1180 * config/rs6000/vsx.md: Ditto.
1182 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1184 * config/rs6000/altivec.md: Don't set length attribute to the default
1185 value, for branch instructions.
1186 * config/rs6000/darwin.md: Ditto.
1187 * config/rs6000/rs6000.md: Ditto.
1189 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1191 * config/rs6000/rs6000.md (length): Always define as const_int 4.
1192 (unnamed conditional branch define_insn): Set length to 4 or 8
1193 depending on offset.
1194 (<bd>_<mode>): Similar, for alternative 0.
1195 (<bd>tf_<mode>): Ditto.
1197 2018-08-16 Tamar Christina <tamar.christina@arm.com>
1199 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
1201 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
1203 * doc/rtl.texi: Replace old RTX class names with new names.
1206 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
1208 * expmed.h (canonicalize_comparison): New declaration.
1209 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
1210 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
1211 * optabs.c (prepare_cmp_insn): Likewise.
1212 * rtl.h (unsigned_condition_p): New function which checks if a
1213 comparison operator is unsigned.
1215 2018-08-16 Nathan Sidwell <nathan@acm.org>
1217 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
1218 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
1220 2018-08-16 Tamar Christina <tamar.christina@arm.com>
1223 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
1224 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
1225 (mov<mov>): ..this and enable unconditionally.
1227 2018-08-16 Tamar Christina <tamar.christina@arm.com>
1229 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
1231 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
1233 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
1234 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
1235 "Common" with "Target".
1237 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
1239 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
1240 * doc/invoke.texi (mmitigate-rop): Remove.
1241 * config/i386/i386.c: Do not include "regrename.h".
1242 (ix86_rop_should_change_byte_p, reg_encoded_number)
1243 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
1245 (ix86_reorg): Remove call to ix86_mitigate_rop.
1246 * config/i386/i386.md (attr "modrm_class"): Remove.
1247 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
1248 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
1249 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
1251 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
1253 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
1254 allow folding of mergeh() and mergel() for the float and double types.
1255 (fold_mergehl_helper): Rework to handle building a permute tree
1258 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
1260 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
1263 2018-08-15 David Malcolm <dmalcolm@redhat.com>
1265 * common.opt (fdiagnostics-show-labels): New option.
1266 * diagnostic-show-locus.c (class layout_range): Add field
1268 (class layout): Add field "m_show_labels_p".
1269 (layout_range::layout_range): Add param "label" and use it to
1271 (make_range): Pass in NULL for new "label" param of layout_range's
1273 (layout::layout): Initialize m_show_labels_p.
1274 (layout::maybe_add_location_range): Pass in loc_range->m_label
1275 when constructing layout_range instances.
1276 (struct line_label): New struct.
1277 (layout::print_any_labels): New member function.
1278 (layout::print_line): Call it if label-printing is enabled.
1279 (selftest::test_one_liner_labels): New test.
1280 (selftest::test_diagnostic_show_locus_one_liner): Call it.
1281 * diagnostic.c (diagnostic_initialize): Initialize
1282 context->show_labels_p.
1283 * diagnostic.h (struct diagnostic_context): Add field
1285 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
1286 -fno-diagnostics-show-labels.
1287 * dwarf2out.c (gen_producer_string): Add
1288 OPT_fdiagnostics_show_labels to the ignored options.
1289 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
1291 (gcc_rich_location::maybe_add_expr): Likewise.
1292 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
1293 label" param, defaulting to NULL.
1294 (gcc_rich_location::add_expr): Add "label" param.
1295 (gcc_rich_location::maybe_add_expr): Likewise.
1296 (class text_range_label): New class.
1297 (class range_label_for_type_mismatch): New class.
1298 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
1299 of format_warning_va.
1300 (fmtwarn_n): Likewise for new params of format_warning_n_va.
1301 * lto-wrapper.c (merge_and_complain): Add
1302 OPT_fdiagnostics_show_labels to the "pick one setting" options.
1303 (append_compiler_options): Likewise to the dropped options.
1304 (append_diag_options): Likewise to the passed-on options.
1305 * opts.c (common_handle_option): Handle the new option.
1306 * selftest-diagnostic.c
1307 (test_diagnostic_context::test_diagnostic_context): Enable
1309 * substring-locations.c: Include "gcc-rich-location.h".
1310 (format_warning_n_va): Add "fmt_label" and "param_label" params
1311 and use them as appropriate.
1312 (format_warning_va): Add "fmt_label" and "param_label" params,
1313 passing them on to format_warning_n_va.
1314 (format_warning_at_substring): Likewise.
1315 (format_warning_at_substring_n): Likewise.
1316 * substring-locations.h (format_warning_va): Add "fmt_label" and
1317 "param_label" params.
1318 (format_warning_n_va): Likewise.
1319 (format_warning_at_substring): Likewise.
1320 (format_warning_at_substring_n): Likewise.
1321 * toplev.c (general_init): Initialize global_dc->show_labels_p.
1323 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
1326 * builtins.c (expand_builtin_memcmp): Do not expand the call
1327 when overflow is detected.
1329 2018-08-15 Martin Sebor <msebor@redhat.com>
1331 PR tree-optimization/71625
1332 * config/aarch64/aarch64-builtins.c
1333 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
1335 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
1337 * config/s390/s390.c (s390_reorg): Remove loop.
1339 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1342 (darwin_function_switched_text_sections): Delete.
1343 * gcc/config/darwin.h
1344 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
1346 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1349 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
1350 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
1351 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
1353 2018-08-15 Martin Liska <mliska@suse.cz>
1355 PR tree-optimization/86925
1356 * predict.c (expr_expected_value_1): When taking
1357 later predictor, assign also probability.
1358 Use fold_build2_initializer_loc in order to fold
1359 the expression in -frounding-math.
1361 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
1363 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
1365 (expand_vec_perm_1): Try the new method.
1367 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
1370 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
1371 Check whether lra_live_max_point is 0 before dividing.
1373 2018-08-14 Martin Sebor <msebor@redhat.com>
1375 PR tree-optimization/86650
1376 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
1377 (vrp_prop::check_mem_ref): Same.
1379 2018-08-13 Liu Hao <lh_mouse@126.com>
1381 * pretty-print.c (eat_esc_sequence): Swap the foreground and
1382 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
1383 and clear it thereafter, as it only works for DBCS.
1385 2018-08-13 Liu Hao <lh_mouse@126.com>
1387 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
1388 handle returned by _get_osf_handle().
1390 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
1392 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
1393 for folding vec_perm.
1395 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
1397 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
1398 Add support for gimple-folding of vec_pack() and vec_unpack()
1401 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
1403 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
1404 vec_xst variants to the list.
1405 (rs6000_gimple_fold_builtin): Add support for folding unaligned
1406 vector loads and stores.
1408 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
1410 * config.gcc (rs6000-ibm-aix4.x): Delete.
1411 (rs6000-ibm-aix5.1): Delete.
1412 (rs6000-ibm-aix5.2): Delete.
1413 (rs6000-ibm-aix5.3): Delete.
1414 * config/rs6000/aix43.h: Delete.
1415 * config/rs6000/aix51.h: Delete.
1416 * config/rs6000/aix52.h: Delete.
1417 * config/rs6000/t-aix43: Delete.
1419 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
1421 * config/s390/s390.c (s390_decompose_constant_pool_ref):
1423 (s390_decompose_address): Factor out constant pool ref
1426 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1428 * config/nds32/nds32-predicates.c
1429 (nds32_can_use_bclr_p): Change return type as bool.
1430 (nds32_can_use_bset_p): Ditto.
1431 (nds32_can_use_btgl_p): Ditto.
1432 (nds32_can_use_bitci_p): Ditto.
1433 * config/nds32/nds32-protos.h
1434 (nds32_can_use_bclr_p): Change declaration.
1435 (nds32_can_use_bset_p): Ditto.
1436 (nds32_can_use_btgl_p): Ditto.
1437 (nds32_can_use_bitci_p): Ditto.
1439 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1441 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
1442 Support -msched-prolog-epilog option.
1443 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
1445 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1447 * common/config/nds32/nds32-common.c
1448 (nds32_option_optimization_table): Enalbe -malways-align.
1450 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1452 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
1454 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
1455 OPT_misr_secure_ case.
1456 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
1457 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
1458 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
1460 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
1461 (nds32_isr_info): New field security_level.
1462 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
1463 * config/nds32/nds32.md (return_internal): Consider critical attribute.
1464 * config/nds32/nds32.opt (misr-secure): New option.
1465 * config/nds32/nds32_init.inc: New file.
1466 * config/nds32/nds32_isr.h: New file.
1468 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
1470 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
1471 Update comment for atomic instructions.
1472 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
1473 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
1475 (atomic_loaddi): Revise fence expansion to only emit fence prior to
1476 load for __ATOMIC_SEQ_CST model.
1477 (atomic_loaddi_1): Remove float register target.
1478 (atomic_storedi): Handle CONST_INT values.
1479 (atomic_storedi_1): Remove float register source. Add special case
1481 (memory_barrier): New expander and insn.
1483 2018-08-11 Jakub Jelinek <jakub@redhat.com>
1485 PR tree-optimization/86835
1486 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
1487 new_stmt after def_gsi, make sure to insert new_square_stmt after
1488 that stmt, not 2 stmts before it.
1490 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
1493 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
1496 2018-08-10 Martin Liska <mliska@suse.cz>
1499 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
1501 * builtins.c (expand_builtin_expect_with_probability):
1503 (expand_builtin_expect_with_probability): New function.
1504 (build_builtin_expect_predicate): Add new argumnet probability
1505 for BUILT_IN_EXPECT_WITH_PROBABILITY.
1506 (fold_builtin_expect):
1509 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
1510 * builtins.h (fold_builtin_expect): Set new argument.
1511 * doc/extend.texi: Document __builtin_expect_with_probability.
1512 * doc/invoke.texi: Likewise.
1513 * gimple-fold.c (gimple_fold_call): Pass new argument.
1514 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
1515 also BUILT_IN_EXPECT_WITH_PROBABILITY.
1516 * predict.c (get_predictor_value): New function.
1517 (expr_expected_value): Add new argument probability. Assume
1518 that predictor and probability are always non-null.
1519 (expr_expected_value_1): Likewise. For __builtin_expect and
1520 __builtin_expect_with_probability set probability. Handle
1521 combination in binary expressions.
1522 (tree_predict_by_opcode): Simplify code by simply calling
1523 get_predictor_value.
1524 (pass_strip_predict_hints::execute): Add handling of
1525 BUILT_IN_EXPECT_WITH_PROBABILITY.
1526 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
1528 * tree.h (DECL_BUILT_IN_P): New function.
1530 2018-08-10 Martin Liska <mliska@suse.cz>
1532 PR tree-optimization/85799
1533 * passes.def: Add argument for pass_strip_predict_hints.
1534 * predict.c (class pass_strip_predict_hints): Add new argument
1536 (strip_predictor_early): New function.
1537 (pass_strip_predict_hints::execute): Call the function to
1539 (strip_predict_hints): New function.
1540 * predict.def: Fix comment.
1542 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
1544 * Makefile.in: Clarify which tm.texi to copy over to assert the
1545 right to grant a GFDL license for all.
1547 2018-08-09 Jeff Law <law@redhat.com>
1549 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
1552 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
1554 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
1557 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
1559 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
1560 reductions for variable-length vectors.
1562 2018-08-09 David Malcolm <dmalcolm@redhat.com>
1565 * common.opt (fdiagnostics-show-line-numbers): New option.
1566 * diagnostic-show-locus.c (class layout): Add fields
1567 "m_show_line_numbers_p" and "m_linenum_width";
1568 (num_digits): New function.
1569 (test_num_digits): New function.
1570 (layout::layout): Initialize new fields. Update m_x_offset
1571 logic to handle any left margin.
1572 (layout::print_source_line): Print line number when requested.
1573 (layout::start_annotation_line): New member function.
1574 (layout::print_annotation_line): Call it.
1575 (layout::print_leading_fixits): Likewise.
1576 (layout::print_trailing_fixits): Likewise. Update calls to
1577 move_to_column for new parameter.
1578 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
1579 it to potentially call start_annotation_line.
1580 (layout::show_ruler): Call start_annotation_line.
1581 (selftest::test_line_numbers_multiline_range): New selftest.
1582 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
1583 and selftest::test_line_numbers_multiline_range.
1584 * diagnostic.c (diagnostic_initialize): Initialize
1585 show_line_numbers_p.
1586 * diagnostic.h (struct diagnostic_context): Add field
1587 "show_line_numbers_p".
1588 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
1589 -fno-diagnostics-show-line-numbers.
1590 * dwarf2out.c (gen_producer_string): Add
1591 OPT_fdiagnostics_show_line_numbers to the ignored options.
1592 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
1593 one setting" options.
1594 (append_compiler_options): Likewise to the dropped options.
1595 (append_diag_options): Likewise to the passed-on options.
1596 * opts.c (common_handle_option): Handle the new option.
1597 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
1599 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
1601 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
1602 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
1603 third argument of type "const signed char" to descriptions of
1604 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
1605 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
1606 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
1607 __builtin_bcdsub_ov functions.
1609 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
1611 PR tree-optimization/86858
1612 * tree-vect-loop.c (vect_is_simple_reduction): Restore
1613 flow_bb_inside_loop_p calls.
1615 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
1617 PR tree-optimization/86871
1618 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
1619 instead of gimple_assign_lhs.
1621 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
1624 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
1625 register constraint to operand 0.
1626 (add<mode>3_carryinC): Likewise.
1627 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
1629 2018-08-09 Martin Liska <mliska@suse.cz>
1632 * common.opt: Remove extra line.
1634 2018-08-09 Martin Liska <mliska@suse.cz>
1636 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
1637 at the end of a line, make first letter capital and end up
1638 a sentence with a dot.
1639 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
1640 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
1641 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
1642 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
1643 (PARAM_MAX_ISL_OPERATIONS): Likewise.
1644 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
1645 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
1646 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
1647 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
1648 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
1649 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
1650 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
1651 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
1652 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
1653 (PARAM_TREE_REASSOC_WIDTH): Likewise.
1654 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
1655 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
1656 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
1658 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
1661 * config/s390/s390.c (s390_option_override_internal): Reduce the
1662 stack-clash-protection-probe-interval param if it would be too big
1665 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
1668 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
1669 * config/m68k/m68k.c (handle_move_double): Don't call
1670 m68k_final_prescan_insn.
1671 (m68k_adjust_decorated_operand): Renamed from
1672 m68k_final_prescan_insn, remove first and third operand and
1674 (print_operand): Call it.
1675 (print_operand_address): Call it.
1677 2018-08-08 Nathan Sidwell <nathan@acm.org>
1679 * diagnostic.c (diagnostic_report_current_module): Use
1680 linemap_included_from & linemap_included_from_linemap.
1682 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
1684 * config/aarch64/aarch64-cores.def: Add phecda core.
1685 * config/aarch64/aarch64-tune.md: Regenerate.
1686 * doc/invoke.texi: Add phecda core.
1688 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
1691 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
1693 * config/s390/s390.md ("movti"): Add more alternatives for
1694 constant to GPR copies.
1696 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
1698 * config/s390/s390.c: Fix whitespace damage throughout the file.
1699 * config/s390/s390.h: Likewise.
1700 * config/s390/tpf.h: Likewise.
1702 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
1704 * config/s390/s390.c (s390_loadrelative_operand_p):
1705 Remove TARGET_CPU_ZARCH usages.
1706 (s390_rtx_costs): Likewise.
1707 (s390_legitimate_constant_p): Likewise.
1708 (s390_cannot_force_const_mem): Likewise.
1709 (legitimate_reload_constant_p): Likewise.
1710 (s390_preferred_reload_class): Likewise.
1711 (legitimize_pic_address): Likewise.
1712 (legitimize_tls_address): Likewise.
1713 (s390_split_branches): Removed.
1714 (s390_add_execute): Removed.
1715 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
1716 (s390_mainpool_start): Likewise.
1717 (s390_mainpool_finish): Likewise.
1718 (s390_mainpool_cancel): Removed.
1719 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
1720 (s390_chunkify_cancel): Likewise.
1721 (s390_return_addr_rtx): Likewise.
1722 (s390_register_info): Remove split_branches_pending_p uages.
1723 (s390_optimize_register_info): Likewise.
1724 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
1725 split_branches_pending_p usages.
1726 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
1727 (s390_load_got): Likewise.
1728 (s390_expand_split_stack_prologue): Likewise.
1729 (output_asm_nops): Likewise.
1730 (s390_function_profiler): Likewise.
1731 (s390_emit_call): Likewise.
1732 (s390_conditional_register_usage): Likewise.
1733 (s390_optimize_prologue): Likewise.
1734 (s390_reorg): Remove TARGET_CPU_ZARCH and
1735 split_branches_pending_p usages.
1736 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
1738 (s390_output_indirect_thunk_function): Likewise.
1739 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
1740 (TARGET_CPU_ZARCH_P): Removed.
1741 (struct machine_function): Remove split_branches_pending_p.
1742 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
1744 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
1746 * common/config/s390/s390-common.c (processor_flags_table):
1748 * config.gcc: Remove with_arch/with_tune support.
1749 * config/s390/2064.md: Remove cpu attribute comparisons.
1750 * config/s390/driver-native.c (s390_host_detect_local_cpu):
1752 * config/s390/linux.h (ASM_SPEC):
1753 Remove -march support.
1754 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
1755 Use a table to get an arch level.
1756 * config/s390/s390-opts.h (enum processor_type):
1758 * config/s390/s390.c
1759 (processor_table): Remove entries, add arch_level values.
1760 (s390_issue_rate): Remove cases.
1761 (s390_option_override): Adjust
1762 s390_option_override_internal() call.
1763 (s390_option_override_internal): Remove deprecation warning.
1764 (s390_valid_target_attribute_tree): Adjust
1765 s390_option_override_internal() call.
1766 * config/s390/s390.h (struct s390_processor):
1767 Share with s390-c.c, add arch_level field.
1768 * config/s390/s390.md:
1769 Remove occurrences in cpu attribute.
1770 * config/s390/s390.opt: Remove -march/-mtune support.
1771 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
1772 * doc/invoke.texi: Remove deprecation warning.
1774 2018-08-08 Luis Machado <luis.machado@linaro.org>
1776 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
1778 (qdf24xx_tunings): Set vector cost structure to
1779 qdf24xx_vector_cost.
1781 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
1782 <register_sextend>: Set to 3.
1784 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
1787 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
1788 * config/aarch64/aarch64-simd.md
1789 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
1790 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
1791 (aarch64_frecpx<mode>): ...this new pattern.
1792 * config/aarch64/aarch64-simd-builtins.def: Remove comment
1793 about aarch64_frecp<FRECP:frecp_suffix><mode>.
1795 2018-08-07 Martin Liska <mliska@suse.cz>
1798 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
1799 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
1800 * predict.def (PRED_MALLOC_NONNULL): New predictor.
1801 * doc/extend.texi: Document that malloc attribute adds
1804 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
1807 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1808 Define to speculation_safe_value_not_needed.
1810 2018-08-06 Jeff Law <law@redhat.com>
1812 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
1813 the vr_values instance to cprop_into_stmt.
1814 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
1815 (cprop_operand): Also query EVRP to determine if OP is a constant.
1817 2018-08-06 Nathan Sidwell <nathan@acm.org>
1819 * diagnostic.c (diagnostic_report_current_module): Reroll
1820 included-at loop. Translate text.
1822 2018-08-06 David Malcolm <dmalcolm@redhat.com>
1824 * function-tests.c (selftest::test_expansion_to_rtl): Call
1825 free_after_compilation.
1827 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1829 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
1831 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
1833 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
1834 loops with memory block operations from getting unrolled.
1836 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
1839 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1840 Define to speculation_safe_value_not_needed.
1842 2018-08-06 Jeff Law <law@redhat.com>
1844 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
1847 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1850 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
1851 with all enabled __intN types.
1853 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
1855 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1857 * alias.c (record_set): Check for clobber high.
1858 * cfgexpand.c (expand_gimple_stmt): Likewise.
1859 * combine-stack-adj.c (single_set_for_csa): Likewise.
1860 * combine.c (find_single_use_1): Likewise.
1861 (set_nonzero_bits_and_sign_copies): Likewise.
1862 (get_combine_src_dest): Likewise.
1863 (is_parallel_of_n_reg_sets): Likewise.
1864 (try_combine): Likewise.
1865 (record_dead_and_set_regs_1): Likewise.
1866 (reg_dead_at_p_1): Likewise.
1867 (reg_dead_at_p): Likewise.
1868 * dce.c (deletable_insn_p): Likewise.
1869 (mark_nonreg_stores_1): Likewise.
1870 (mark_nonreg_stores_2): Likewise.
1871 * df-scan.c (df_find_hard_reg_defs): Likewise.
1872 (df_uses_record): Likewise.
1873 (df_get_call_refs): Likewise.
1874 * dwarf2out.c (mem_loc_descriptor): Likewise.
1875 * haifa-sched.c (haifa_classify_rtx): Likewise.
1876 * ira-build.c (create_insn_allocnos): Likewise.
1877 * ira-costs.c (scan_one_insn): Likewise.
1878 * ira.c (equiv_init_movable_p): Likewise.
1879 (rtx_moveable_p): Likewise.
1880 (interesting_dest_for_shprep): Likewise.
1881 * jump.c (mark_jump_label_1): Likewise.
1882 * postreload-gcse.c (record_opr_changes): Likewise.
1883 * postreload.c (reload_cse_simplify): Likewise.
1884 (struct reg_use): Add source expr.
1885 (reload_combine): Check for clobber high.
1886 (reload_combine_note_use): Likewise.
1887 (reload_cse_move2add): Likewise.
1888 (move2add_note_store): Likewise.
1889 * print-rtl.c (print_pattern): Likewise.
1890 * recog.c (decode_asm_operands): Likewise.
1891 (store_data_bypass_p): Likewise.
1892 (if_test_bypass_p): Likewise.
1893 * regcprop.c (kill_clobbered_value): Likewise.
1894 (kill_set_value): Likewise.
1895 * reginfo.c (reg_scan_mark_refs): Likewise.
1896 * reload1.c (maybe_fix_stack_asms): Likewise.
1897 (eliminate_regs_1): Likewise.
1898 (elimination_effects): Likewise.
1899 (mark_not_eliminable): Likewise.
1900 (scan_paradoxical_subregs): Likewise.
1901 (forget_old_reloads_1): Likewise.
1902 * reorg.c (find_end_label): Likewise.
1903 (try_merge_delay_insns): Likewise.
1904 (redundant_insn): Likewise.
1905 (own_thread_p): Likewise.
1906 (fill_simple_delay_slots): Likewise.
1907 (fill_slots_from_thread): Likewise.
1908 (dbr_schedule): Likewise.
1909 * resource.c (update_live_status): Likewise.
1910 (mark_referenced_resources): Likewise.
1911 (mark_set_resources): Likewise.
1912 * rtl.c (copy_rtx): Likewise.
1913 * rtlanal.c (reg_referenced_p): Likewise.
1914 (single_set_2): Likewise.
1915 (noop_move_p): Likewise.
1916 (note_stores): Likewise.
1917 * sched-deps.c (sched_analyze_reg): Likewise.
1918 (sched_analyze_insn): Likewise.
1920 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1922 * cse.c (invalidate_reg): New function extracted from...
1923 (invalidate): ...here.
1924 (canonicalize_insn): Check for clobber high.
1925 (invalidate_from_clobbers): invalidate clobber highs.
1926 (invalidate_from_sets_and_clobbers): Likewise.
1927 (count_reg_usage): Check for clobber high.
1928 (insn_live_p): Likewise.
1929 * cselib.c (cselib_expand_value_rtx_1):Likewise.
1930 (cselib_invalidate_regno): Check for clobber in setter.
1931 (cselib_invalidate_rtx): Pass through setter.
1932 (cselib_invalidate_rtx_note_stores):
1933 (cselib_process_insn): Check for clobber high.
1934 * cselib.h (cselib_invalidate_rtx): Add operand.
1936 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1938 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
1939 (mark_not_eliminable): Likewise.
1940 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
1941 * lra-lives.c (process_bb_lives): Check for clobber high.
1942 * lra.c (new_insn_reg): Remember clobber highs.
1943 (collect_non_operand_hard_regs): Check for clobber high.
1944 (lra_set_insn_recog_data): Likewise.
1945 (add_regs_to_insn_regno_info): Likewise.
1946 (lra_update_insn_regno_info): Likewise.
1948 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1950 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
1951 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
1953 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1955 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
1956 (copy_insn_1): Likewise.
1957 (gen_hard_reg_clobber_high): New gen function.
1958 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
1959 * genemit.c (gen_exp): Likewise.
1960 (gen_emit_seq): Pass through info.
1961 (gen_insn): Check for CLOBBER_HIGH.
1962 (gen_expand): Pass through info.
1963 (gen_split): Likewise.
1964 (output_add_clobbers): Likewise.
1965 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
1966 (remove_clobbers): Likewise.
1967 * rtl.h (gen_hard_reg_clobber_high): New declaration.
1969 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1971 * doc/rtl.texi (clobber_high): Add.
1972 (parallel): Add in clobber high
1973 * rtl.c (rtl_check_failed_code3): Add function.
1974 * rtl.def (CLOBBER_HIGH): Add expression.
1975 * rtl.h (RTL_CHECKC3): Add macro.
1976 (rtl_check_failed_code3): Add declaration.
1977 (XC3EXP): Add macro.
1979 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
1982 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
1983 cfun->machine->max_used_stack_alignment if needed.
1985 2018-08-04 Martin Sebor <msebor@redhat.com>
1987 PR tree-optimization/86571
1988 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
1991 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
1994 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1997 2018-08-03 Jeff Law <law@redhat.com>
2000 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2001 Define to speculation_safe_value_not_needed.
2003 2018-08-03 David Malcolm <dmalcolm@redhat.com>
2005 * doc/gcov.texi (-x): Remove duplicate "to".
2006 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
2007 (-Wif-not-aligned): Remove duplicate "is".
2008 (-flto): Remove duplicate "the".
2009 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
2010 duplicate "v5.00.b".
2011 (MSP430 Options): Remove duplicate "and" from the description
2012 of "-mgprel-sec=regexp".
2013 (x86 Options): Remove duplicate copies of "vmldLog102" and
2014 vmlsLog104 from description of "-mveclibabi=type".
2016 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
2018 * internal-fn.h (first_commutative_argument): Declare.
2019 * internal-fn.c (first_commutative_argument): New function.
2020 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
2021 restrictions for pattern statements. Use first_commutative_argument
2022 to look for commutative operands in calls to internal functions.
2024 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
2026 * Makefile.in (wide-int-range.o): New.
2027 * tree-vrp.c: Move all the wide_int_* functions to...
2028 * wide-int-range.cc: ...here.
2029 * tree-vrp.h: Move all the wide_int_* prototypes to...
2030 * wide-int-range.h: ...here.
2032 2018-08-03 Tom de Vries <tdevries@suse.de>
2034 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
2036 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
2037 * except.c (output_function_exception_table): Do early exit if
2038 targetm_common.except_unwind_info (&global_options) == UI_NONE.
2040 2018-08-03 Martin Liska <mliska@suse.cz>
2042 * predict.c (dump_prediction): Change to 2 digits
2045 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
2047 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
2049 (falkor_am_1_gtov_gtov): ... a new insn reservation.
2051 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
2053 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
2054 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
2055 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
2056 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
2057 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
2059 2018-08-02 David Malcolm <dmalcolm@redhat.com>
2061 * diagnostic-show-locus.c (diagnostic_show_locus): Use
2062 pp_take_prefix when saving the existing prefix.
2063 * diagnostic.c (diagnostic_append_note): Likewise.
2064 * langhooks.c (lhd_print_error_function): Likewise.
2065 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
2066 param's type. Free the existing prefix.
2067 (pp_take_prefix): New function.
2068 (pretty_printer::pretty_printer): Drop the prefix parameter.
2069 Rename the length parameter to match the comment.
2070 (pretty_printer::~pretty_printer): Free the prefix.
2071 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
2073 (struct pretty_printer): Drop the "const" from "prefix" field's
2074 type and clarify memory management.
2075 (pp_set_prefix): Drop the "const" from the 2nd param.
2076 (pp_take_prefix): New decl.
2078 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
2080 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
2081 for word_mode_ok here instead of passing as argument.
2082 (expand_block_compare): Change select_block_compare_mode() call.
2083 (expand_strncmp_gpr_sequence): New function.
2084 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
2086 2018-08-02 Jeff Law <law@redhat.com>
2089 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2090 Define to speculation_safe_value_not_needed.
2093 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2094 Define to speculation_safe_value_not_needed.
2096 2018-08-02 Tom de Vries <tdevries@suse.de>
2099 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
2100 function. Return UI_TARGET unconditionally.
2101 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
2102 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
2104 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
2106 * genemit.c (print_overload_test): Fix typo.
2108 2018-08-02 Richard Biener <rguenther@suse.de>
2110 PR tree-optimization/86816
2111 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
2112 which checks for value availability before querying it.
2113 (gvn_uses_equal): Use it.
2114 (same_succ_hash): Likewise.
2115 (gimple_equal_p): Likewise.
2117 2018-08-02 Nick Clifton <nickc@redhat.com>
2120 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2121 Define to speculation_safe_value_not_needed.
2124 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2125 Define to speculation_safe_value_not_needed.
2128 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2129 Define to speculation_safe_value_not_needed.
2132 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2133 Define to speculation_safe_value_not_needed.
2136 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2137 Define to speculation_safe_value_not_needed.
2140 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2141 Define to speculation_safe_value_not_needed.
2144 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2145 Define to speculation_safe_value_not_needed.
2148 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2149 Define to speculation_safe_value_not_needed.
2152 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
2153 speculation_safe_value_not_needed.
2156 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
2157 to speculation_safe_value_not_needed.
2159 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
2161 * doc/md.texi: Expand the documentation of instruction names
2162 to mention port-local uses. Document '@' in pattern names.
2163 * read-md.h (overloaded_instance, overloaded_name): New structs.
2165 (md_reader::handle_overloaded_name): New member function.
2166 (md_reader::get_overloads): Likewise.
2167 (md_reader::m_first_overload): New member variable.
2168 (md_reader::m_next_overload_ptr): Likewise.
2169 (md_reader::m_overloads_htab): Likewise.
2170 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
2171 m_next_overload_ptr and m_overloads_htab.
2172 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
2173 (get_mode_token, get_code_token, get_int_token): New functions.
2174 (map_attr_string): Add an optional argument that passes back
2175 the associated iterator.
2176 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
2177 (md_reader::handle_overloaded_name, add_overload_instance): New
2179 (apply_iterators): Handle '@' names. Report an error if '@'
2180 is used without iterators.
2181 (initialize_iterators): Initialize the new iterator_group fields.
2182 * genopinit.c (handle_overloaded_code_for)
2183 (handle_overloaded_gen): New functions.
2184 (main): Use them to print declarations of maybe_code_for_* and
2185 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
2186 * genemit.c (print_overload_arguments, print_overload_test)
2187 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
2188 (main): Use it to print definitions of maybe_code_for_* and
2189 maybe_gen_* functions.
2190 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
2191 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
2192 instead of explicit mode checks.
2193 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
2194 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
2195 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
2196 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
2197 (aarch64_expand_compare_and_swap): Likewise
2198 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
2199 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
2200 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
2201 (aarch64_constant_pool_reload_icode): Delete.
2202 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
2203 instead of aarch64_constant_pool_reload_icode. Use
2204 code_for_aarch64_reload_mov instead of explicit mode checks.
2205 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
2206 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
2207 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
2208 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
2209 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
2210 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
2211 (aarch64_atomic_load_op_code): Delete.
2212 (aarch64_emit_atomic_load_op): Likewise.
2213 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
2214 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
2215 instead of aarch64_emit_atomic_load_op.
2216 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
2217 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
2218 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
2219 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
2220 character before the pattern name.
2221 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
2222 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
2223 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
2224 (aarch64_frecps<mode>): Likewise.
2225 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
2226 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
2227 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
2228 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
2229 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
2231 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
2233 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
2234 Allow HFmode constants if TARGET_FP_F16INST.
2236 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
2239 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
2240 No longer check last store for clobber of address register.
2242 2018-08-02 Martin Liska <mliska@suse.cz>
2244 PR gcov-profile/86817
2245 * gcov.c (process_all_functions): New function.
2247 (process_file): Move functions processing to
2248 process_all_functions.
2250 2018-08-02 David Malcolm <dmalcolm@redhat.com>
2252 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
2253 "const" to the "gimple *" and "rtx_insn *" parameters.
2254 * dumpfile.h (dump_user_location_t::dump_user_location_t):
2256 (dump_location_t::dump_location_t): Likewise.
2258 2018-08-01 Martin Sebor <msebor@redhat.com>
2260 PR tree-optimization/86650
2261 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
2262 rather than a "gcall *". Directly pass the data of interest
2263 to percent_K_format, rather than building a temporary CALL_EXPR
2265 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
2266 (gimple_fold_builtin_strncat): Adjust.
2267 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
2268 gcall* argument with gimple*.
2269 * gimple-ssa-warn-restrict.c (check_call): Same.
2270 (wrestrict_dom_walker::before_dom_children): Same.
2271 (builtin_access::builtin_access): Same.
2272 (check_bounds_or_overlap): Same
2273 (maybe_diag_overlap): Same.
2274 (maybe_diag_offset_bounds): Same.
2275 * tree-diagnostic.c (default_tree_printer): Move usage of
2276 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
2278 * tree-pretty-print.c (percent_K_format): Add argument.
2279 * tree-pretty-print.h: Add argument.
2280 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
2281 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
2282 (maybe_diag_stxncpy_trunc): Same.
2283 (handle_builtin_stxncpy): Same.
2284 (handle_builtin_strcat): Same.
2286 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2288 * match.pd: Optimise pointer range checks.
2290 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2292 PR tree-optimization/86758
2293 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
2294 to remove pattern statements.
2296 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2298 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
2299 result of dfs_enumerate_from when constructing stmt_vec_infos,
2300 instead of additionally calling get_loop_body.
2302 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2304 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
2306 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
2307 When creating an iv, assert that the step is not known to be zero.
2308 (vect_setup_realignment): Update call accordingly.
2309 * tree-vect-stmts.c (vectorizable_store): Likewise.
2310 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
2312 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2314 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
2315 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
2316 (vectorizable_reduction): Likewise.
2317 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2318 (vect_detect_hybrid_slp_stmts): Likewise.
2319 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2321 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
2323 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
2324 (wide_int_set_zero_nonzero_bits): ...this.
2325 (zero_nonzero_bits_from_vr): Rename to...
2326 (vrp_set_zero_nonzero_bits): ...this.
2327 (extract_range_from_multiplicative_op_1): Abstract wide int
2329 (wide_int_range_multiplicative_op): ...here.
2330 (extract_range_from_binary_expr_1): Extract wide int binary
2331 operations into their own functions.
2332 (wide_int_range_lshift): New.
2333 (wide_int_range_can_optimize_bit_op): New.
2334 (wide_int_range_shift_undefined_p): New.
2335 (wide_int_range_bit_xor): New.
2336 (wide_int_range_bit_ior): New.
2337 (wide_int_range_bit_and): New.
2338 (wide_int_range_trunc_mod): New.
2339 (extract_range_into_wide_ints): New.
2340 (vrp_shift_undefined_p): New.
2341 (extract_range_from_multiplicative_op): New.
2342 (vrp_can_optimize_bit_op): New.
2343 * tree-vrp.h (value_range::dump): New.
2344 (wide_int_range_multiplicative_op): New.
2345 (wide_int_range_lshift):New.
2346 (wide_int_range_shift_undefined_p): New.
2347 (wide_int_range_bit_xor): New.
2348 (wide_int_range_bit_ior): New.
2349 (wide_int_range_bit_and): New.
2350 (wide_int_range_trunc_mod): New.
2351 (zero_nonzero_bits_from_bounds): Rename to...
2352 (wide_int_set_zero_nonzero_bits): ...this.
2353 (zero_nonzero_bits_from_vr): Rename to...
2354 (vrp_set_zero_nonzero_bits): ...this.
2355 (range_easy_mask_min_max): Rename to...
2356 (wide_int_range_can_optimize_bit_op): this.
2357 * vr-values.c (simplify_bit_ops_using_ranges): Rename
2358 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
2360 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2362 * tree-vectorizer.h (vect_orig_stmt): New function.
2363 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
2364 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
2365 (vect_create_epilog_for_reduction): Likewise.
2366 (vectorizable_live_operation): Likewise.
2367 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
2368 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
2369 * tree-vect-stmts.c (vectorizable_call): Likewise.
2370 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
2372 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2374 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
2376 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
2377 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
2378 (vect_transform_loop): Likewise.
2379 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
2381 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2383 * tree-vectorizer.h (vect_schedule_slp): Return void.
2384 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
2385 (vect_schedule_slp): Likewise.
2387 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2389 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
2391 (vect_transform_loop): Update calls accordingly. Schedule SLP
2392 instances before the main loop, if any exist.
2394 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2396 PR tree-optimization/86749
2397 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
2398 If the lhs is used in a COND_EXPR, check that it is being used
2399 as the "then" or "else" value.
2401 2018-08-01 Tom de Vries <tdevries@suse.de>
2404 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
2405 speculation_safe_value_not_needed.
2407 2018-08-01 Richard Biener <rguenther@suse.de>
2409 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
2412 2018-08-01 Martin Liska <mliska@suse.cz>
2414 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
2415 format how successful transformation is dumped.
2416 (gimple_mod_pow2_value_transform): Likewise.
2417 (gimple_mod_subtract_transform): Likewise.
2418 (gimple_stringops_transform): Likewise.
2420 2018-08-01 Martin Liska <mliska@suse.cz>
2423 * value-prof.c (interesting_stringop_to_profile_p):
2424 Simplify the code and add BUILT_IN_MEMMOVE.
2425 (gimple_stringops_transform): Likewise.
2427 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
2429 * config/aarch64/aarch64-simd.md
2430 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
2431 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
2432 use GPI iterator instead of SI mode.
2434 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
2436 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
2437 rs6000_speculation_barrier.
2438 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
2439 new barrier pattern name.
2441 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
2443 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
2444 (speculation_barrier): New insn.
2446 2018-08-01 Richard Biener <rguenther@suse.de>
2449 * graphite.h: Include isl/id.h and isl/space.h to allow build
2452 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
2455 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
2456 mode for COFF targets.
2457 * defaults.h (TARGET_COFF): Define.
2458 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
2459 TARGET_COFF): Define.
2460 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
2461 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
2462 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
2464 2018-07-31 Alexandre Oliva <oliva@adacore.com>
2466 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
2467 * gimple-streamer-out.c (output_bb): Save it.
2468 * lto-streamer-in.c (input_struct_function_base): Restore
2469 instance discriminator if available. Create map on demand.
2470 * lto-streamer-out.c (output_struct_function_base): Save it if
2472 * final.c (decl_to_instance_map): Document LTO strategy.
2474 2018-07-31 Alexandre Oliva <oliva@adacore.com>
2475 Olivier Hainque <hainque@adacore.com>
2477 * debug.h (decl_to_instance_map_t): New type.
2478 (decl_to_instance_map): Declare.
2479 (maybe_create_decl_to_instance_map): New inline function.
2480 * final.c (bb_discriminator, last_bb_discriminator): New statics,
2481 to track basic block discriminators.
2482 (final_start_function_1): Initialize them.
2483 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
2485 (decl_to_instance_map): New variable.
2486 (map_decl_to_instance, maybe_set_discriminator): New functions.
2487 (notice_source_line): Set discriminator.
2489 2018-07-31 Ian Lance Taylor <iant@golang.org>
2491 * targhooks.c (default_have_speculation_safe_value): Add
2494 2018-07-31 David Malcolm <dmalcolm@redhat.com>
2496 * dump-context.h: Include "pretty-print.h".
2497 (dump_context::refresh_dumps_are_enabled): New decl.
2498 (dump_context::emit_item): New decl.
2499 (class dump_context): Add fields "m_test_pp" and
2501 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
2502 (temp_dump_context::get_dumped_text): New decl.
2503 (class temp_dump_context): Add field "m_pp".
2504 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
2505 (dump_context::refresh_dumps_are_enabled): ...and add a test for
2507 (set_dump_file): Update for above change.
2508 (set_alt_dump_file): Likewise.
2509 (dump_loc): New overload, taking a pretty_printer *.
2510 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
2511 to any test pretty-printer.
2512 (make_item_for_dump_gimple_stmt): New function, adapted from
2513 optinfo::add_gimple_stmt.
2514 (dump_context::dump_gimple_stmt): Call it, and use the result,
2515 eliminating the direct usage of dump_file and alt_dump_file in
2516 favor of indirectly using them via emit_item.
2517 (make_item_for_dump_gimple_expr): New function, adapted from
2518 optinfo::add_gimple_expr.
2519 (dump_context::dump_gimple_expr): Call it, and use the result,
2520 eliminating the direct usage of dump_file and alt_dump_file in
2521 favor of indirectly using them via emit_item.
2522 (make_item_for_dump_generic_expr): New function, adapted from
2524 (dump_context::dump_generic_expr): Call it, and use the result,
2525 eliminating the direct usage of dump_file and alt_dump_file in
2526 favor of indirectly using them via emit_item.
2527 (make_item_for_dump_printf_va): New function, adapted from
2528 optinfo::add_printf_va.
2529 (make_item_for_dump_printf): New function.
2530 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
2531 and use the result, eliminating the direct usage of dump_file and
2532 alt_dump_file in favor of indirectly using them via emit_item.
2533 (make_item_for_dump_dec): New function.
2534 (dump_context::dump_dec): Call it, and use the result,
2535 eliminating the direct usage of dump_file and alt_dump_file in
2536 favor of indirectly using them via emit_item.
2537 (make_item_for_dump_symtab_node): New function, adapted from
2538 optinfo::add_symtab_node.
2539 (dump_context::dump_symtab_node): Call it, and use the result,
2540 eliminating the direct usage of dump_file and alt_dump_file in
2541 favor of indirectly using them via emit_item.
2542 (dump_context::begin_scope): Reimplement, avoiding direct usage
2543 of dump_file and alt_dump_file in favor of indirectly using them
2545 (dump_context::emit_item): New member function.
2546 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
2547 Set up test pretty-printer on the underlying context. Call
2548 refresh_dumps_are_enabled.
2549 (temp_dump_context::~temp_dump_context): Call
2550 refresh_dumps_are_enabled.
2551 (temp_dump_context::get_dumped_text): New member function.
2552 (selftest::verify_dumped_text): New function.
2553 (ASSERT_DUMPED_TEXT_EQ): New macro.
2554 (selftest::test_capture_of_dump_calls): Run all tests twice, with
2555 and then without optinfo enabled. Add uses of
2556 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
2557 * dumpfile.h: Update comment for the dump_* API.
2558 * optinfo-emit-json.cc
2559 (selftest::test_building_json_from_dump_calls): Update for new
2560 param for temp_dump_context ctor.
2561 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
2562 and "m_owned" field.
2563 (optinfo_item::~optinfo_item): Likewise.
2564 (optinfo::add_item): New member function.
2565 (optinfo::emit): Update comment.
2566 (optinfo::add_string): Delete.
2567 (optinfo::add_printf): Delete.
2568 (optinfo::add_printf_va): Delete.
2569 (optinfo::add_gimple_stmt): Delete.
2570 (optinfo::add_gimple_expr): Delete.
2571 (optinfo::add_tree): Delete.
2572 (optinfo::add_symtab_node): Delete.
2573 (optinfo::add_dec): Delete.
2574 * optinfo.h (class dump_context): New forward decl.
2575 (optinfo::add_item): New decl.
2576 (optinfo::add_string): Delete.
2577 (optinfo::add_printf): Delete.
2578 (optinfo::add_printf_va): Delete.
2579 (optinfo::add_gimple_stmt): Delete.
2580 (optinfo::add_gimple_expr): Delete.
2581 (optinfo::add_tree): Delete.
2582 (optinfo::add_symtab_node): Delete.
2583 (optinfo::add_dec): Delete.
2584 (optinfo::add_poly_int): Delete.
2585 (optinfo_item::optinfo_item): Remove "owned" param.
2586 (class optinfo_item): Remove field "m_owned".
2588 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2591 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
2592 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
2593 requested variable alignment.
2594 (expand_one_ssa_partition): Likewise.
2595 (expand_one_var): Likewise.
2597 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2599 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
2600 to speculation_safe_value_not_needed.
2602 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2604 * targhooks.h (speculation_safe_value_not_needed): New prototype.
2605 * targhooks.c (speculation_safe_value_not_needed): New function.
2606 * target.def (have_speculation_safe_value): Update documentation.
2607 * doc/tm.texi: Regenerated.
2609 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2611 * config/aarch64/iterators.md (ALLI_TI): New iterator.
2612 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
2614 (despeculate_copy<ALLI:mode>_insn): New insn.
2615 (despeculate_copyti_insn): New insn.
2616 (despeculate_simple<ALLI:mode>): New insn
2617 (despeculate_simpleti): New insn.
2618 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
2620 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
2621 aarch64_speculation_safe_value.
2622 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
2624 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2626 * config/aarch64/aarch64-speculation.cc: New file.
2627 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
2628 before pass_reorder_blocks.
2629 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
2631 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
2632 X14 and X15 when tracking speculation.
2633 * config/aarch64/aarch64.md (register name constants): Add
2634 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
2635 (unspec): Add UNSPEC_SPECULATION_TRACKER.
2636 (speculation_barrier): New insn attribute.
2637 (cmp<mode>): Allow SP in comparisons.
2638 (speculation_tracker): New insn.
2639 (speculation_barrier): Add speculation_barrier attribute.
2640 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
2641 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
2642 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
2644 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2646 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
2647 aarch64_track_speculation is true.
2648 (tb<optab><mode>1): Likewise.
2649 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
2650 generate CB[N]Z when tracking speculation.
2651 (aarch64_split_compare_and_swap): Likewise.
2652 (aarch64_split_atomic_op): Likewise.
2654 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2656 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
2658 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2660 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
2661 (speculation_barrier): New insn.
2663 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2665 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
2666 * config/arm/arm.md (speculation_barrier): New expand.
2667 (speculation_barrier_insn): New pattern.
2669 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2671 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
2672 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
2673 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
2674 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
2676 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
2677 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
2678 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
2679 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
2680 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
2681 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
2682 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
2683 * builtins.c (expand_speculation_safe_value): New function.
2684 (expand_builtin): Call it.
2685 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
2686 * doc/extend.texi: Document __builtin_speculation_safe_value.
2687 * doc/md.texi: Document "speculation_barrier" pattern.
2688 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
2689 TARGET_HAVE_SPECULATION_SAFE_VALUE.
2690 * doc/tm.texi: Regenerated.
2691 * target.def (have_speculation_safe_value, speculation_safe_value): New
2693 * targhooks.c (default_have_speculation_safe_value): New function.
2694 (default_speculation_safe_value): New function.
2695 * targhooks.h (default_have_speculation_safe_value): Add prototype.
2696 (default_speculation_safe_value): Add prototype.
2698 2018-07-31 David Malcolm <dmalcolm@redhat.com>
2700 * dump-context.h (dump_context::dump_loc): New decl.
2701 * dumpfile.c (dump_context::dump_loc): New member function.
2702 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
2703 and dump_gimple_stmt.
2704 (dump_context::dump_gimple_expr_loc): Likewise, using
2706 (dump_context::dump_generic_expr_loc): Likewise, using
2708 (dump_context::dump_printf_loc_va): Likewise, using
2710 (dump_context::begin_scope): Explicitly using the global function
2711 "dump_loc", rather than the member function.
2713 2018-07-31 Martin Sebor <msebor@redhat.com>
2715 PR tree-optimization/86741
2716 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
2718 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
2720 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
2721 depend on whether prefetch instructions will be emitted or not.
2722 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
2723 will be emitted or not.
2724 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
2725 (TARGET_SETMEM_PFD): New macros.
2727 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2729 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
2730 (NULL_STMT_VEC_INFO): Delete.
2731 (stmt_vec_info::operator*): Likewise.
2732 (stmt_vec_info::operator gimple *): Likewise.
2733 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
2734 of NULL_STMT_VEC_INFO.
2735 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2736 (vect_reassociating_reduction_p): Likewise.
2737 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
2738 (vectorizable_store): Likewise.
2739 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
2740 (vec_info::free_stmt_vec_infos): Likewise.
2742 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2744 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
2745 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
2747 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2749 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
2750 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
2751 (vec_info::free_stmt_vec_info): New private member functions.
2752 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
2753 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
2754 * tree-parloops.c (gather_scalar_reductions): Remove calls to
2755 set_stmt_vec_info_vec and free_stmt_vec_infos.
2756 * tree-vect-loop.c (_loop_vec_info): Remove call to
2757 set_stmt_vec_info_vec.
2758 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
2759 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
2760 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
2761 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
2762 (vec_info::free_stmt_vec_info): ...these new functions. Remove
2763 assignments in {vec_info::,}new_stmt_vec_info that are redundant
2764 with the clearing in the xcalloc.
2765 (stmt_vec_info_vec): Delete.
2766 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
2767 (vectorize_loops): Likewise.
2768 (vec_info::~vec_info): Remove argument from call to
2769 free_stmt_vec_infos.
2770 (vec_info::add_stmt): Remove vinfo argument from call to
2773 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2775 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
2776 rather than a gimple stmt.
2777 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
2778 information for pattern statements when passed the original
2779 statement; instead wait to be passed the pattern statement itself.
2780 Don't call set_vinfo_for_stmt here.
2781 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
2782 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
2783 stmt_vec_infos here.
2784 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
2785 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
2786 stmt_vec_infos entry.
2788 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2790 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
2791 * tree-vectorizer.c (vec_info::replace_stmt): New function.
2792 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
2793 * tree-vect-stmts.c (vectorizable_call): Likewise.
2794 (vectorizable_simd_clone_call): Likewise.
2796 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2798 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
2799 * tree-vectorizer.c (vec_info::remove_stmt): New function.
2800 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
2801 * tree-vect-loop.c (vect_transform_loop): Likewise.
2802 * tree-vect-slp.c (vect_schedule_slp): Likewise.
2803 * tree-vect-stmts.c (vect_remove_stores): Likewise.
2805 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2807 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
2808 (vect_dr_stmt): Delete.
2809 * tree-vectorizer.c (vec_info::lookup_dr): New function.
2810 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
2812 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
2813 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
2814 (vect_verify_datarefs_alignment, vect_peeling_supportable)
2815 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
2816 (vect_analyze_data_refs): Likewise.
2817 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
2819 (vect_find_same_alignment_drs): Likewise.
2820 (vect_slp_analyze_node_dependences): Update calls accordingly.
2821 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
2822 instead of DR_VECT_AUX.
2823 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
2824 of a vector data references. Use vec_info::lookup_dr instead of
2826 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
2827 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
2828 instead of DR_VECT_AUX.
2830 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2832 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
2834 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
2836 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2837 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2838 (vect_gen_prolog_loop_niters): Likewise.
2840 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2842 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
2843 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
2844 (vect_known_alignment_in_bytes, vect_dr_behavior)
2845 (vect_get_scalar_dr_size): Take references as dr_vec_infos
2846 instead of data_references. Update calls to other routines for
2847 which the same change has been made.
2848 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
2849 dr_vec_infos instead of stmt_vec_infos.
2850 (vect_analyze_data_ref_dependence): Update call accordingly.
2851 (vect_slp_analyze_data_ref_dependence)
2852 (vect_record_base_alignments): Use DR_VECT_AUX.
2853 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
2854 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
2855 (vector_alignment_reachable_p, vect_get_data_access_cost)
2856 (vect_peeling_supportable, vect_analyze_group_access_1)
2857 (vect_analyze_group_access, vect_analyze_data_ref_access)
2858 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
2859 (vect_compile_time_alias, vect_small_gap_p)
2860 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
2861 (vect_supportable_dr_alignment): Take references as dr_vec_infos
2862 instead of data_references. Update calls to other routines for
2863 which the same change has been made.
2864 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
2865 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
2866 (vect_slp_analyze_and_verify_node_alignment)
2867 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
2868 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
2869 (vect_setup_realignment): Use dr_vec_infos. Update calls after
2871 (_vect_peel_info::dr): Replace with...
2872 (_vect_peel_info::dr_info): ...this new field.
2873 (vect_peeling_hash_get_most_frequent)
2874 (vect_peeling_hash_choose_best_peeling): Update accordingly.
2875 (vect_peeling_hash_get_lowest_cost):
2876 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
2877 routines for which the same change has been made.
2878 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
2880 * tree-vect-loop-manip.c (get_misalign_in_elems)
2881 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
2883 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2884 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
2885 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
2886 (get_group_load_store_type, get_negative_load_store_type)
2887 (vect_get_data_ptr_increment, vectorizable_store)
2888 (vectorizable_load): Likewise.
2889 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
2890 Update calls to other routines for which the same change has been made.
2892 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2894 * tree-vectorizer.h (vec_info::move_dr): New member function.
2895 (dataref_aux): Rename to...
2896 (dr_vec_info): ...this and add "dr" and "stmt" fields.
2897 (_stmt_vec_info::dr_aux): Update accordingly.
2898 (_stmt_vec_info::data_ref_info): Delete.
2899 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
2900 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
2901 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
2902 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
2904 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
2905 (STMT_VINFO_DR_INFO): New macro.
2906 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
2907 (set_dr_misalignment): Update after rename of dataref_aux.
2908 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
2909 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
2910 initialization of STMT_VINFO_DATA_REF.
2911 * tree-vectorizer.c (vec_info::move_dr): New function.
2912 * tree-vect-patterns.c (vect_recog_bool_pattern)
2913 (vect_recog_mask_conversion_pattern)
2914 (vect_recog_gather_scatter_pattern): Use it.
2915 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
2916 the "dr" and "stmt" fields of dr_vec_info instead of
2917 STMT_VINFO_DATA_REF.
2919 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2921 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
2922 (is_pattern_stmt_p): Use it.
2923 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
2924 on pattern statements.
2926 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2928 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
2929 original stmt as a stmt_vec_info rather than a gimple stmt.
2930 (vect_pattern_recog_1): Take the statement directly as a
2931 stmt_vec_info, rather than via a gimple_stmt_iterator.
2932 Update call to vect_mark_pattern_stmts.
2933 (vect_pattern_recog): Update calls accordingly.
2935 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2937 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
2938 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
2939 a vect_def_type for the first argument.
2940 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
2941 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
2942 operand if it isn't defined by a vectorized statement.
2943 (vect_build_gather_load_calls): Remove the mask_dt argument and
2944 update calls to vect_get_vec_def_for_stmt_copy.
2945 (vectorizable_bswap): Likewise the dt argument.
2946 (vectorizable_call): Update calls to vectorizable_bswap and
2947 vect_get_vec_def_for_stmt_copy.
2948 (vectorizable_simd_clone_call, vectorizable_assignment)
2949 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
2950 (vectorizable_comparison): Update calls to
2951 vect_get_vec_def_for_stmt_copy.
2952 (vectorizable_store): Likewise. Remove now-unnecessary calls to
2954 (vect_get_loop_based_defs): Remove dt argument and update call
2955 to vect_get_vec_def_for_stmt_copy.
2956 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
2957 and vect_get_vec_def_for_stmt_copy.
2958 (vectorizable_load): Update calls to vect_build_gather_load_calls
2959 and vect_get_vec_def_for_stmt_copy.
2960 * tree-vect-loop.c (vect_create_epilog_for_reduction)
2961 (vectorizable_reduction, vectorizable_live_operation): Update calls
2962 to vect_get_vec_def_for_stmt_copy.
2964 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2966 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
2967 and gimple stmt arguments with a stmt_vec_info.
2968 (vect_record_base_alignments): Update calls accordingly.
2969 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
2970 and gimple stmt arguments with a stmt_vec_info.
2971 (vect_build_slp_tree_1): Remove vinfo argument and update call
2972 to vect_record_max_nunits.
2973 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
2974 and vect_record_max_nunits.
2976 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2978 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
2979 file and take a stmt_vec_info instead of a gimple stmt.
2980 (supportable_widening_operation, vect_finish_replace_stmt)
2981 (vect_finish_stmt_generation, vect_get_store_rhs)
2982 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
2983 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
2984 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
2985 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
2986 (vect_create_data_ref_ptr, bump_vector_ptr)
2987 (vect_permute_store_chain, vect_setup_realignment)
2988 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
2989 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
2990 (vectorizable_reduction, vectorizable_induction)
2991 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
2992 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
2993 than gimple stmts as arguments.
2994 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
2995 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
2996 (can_group_stmts_p, vect_check_gather_scatter)
2997 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
2998 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
2999 (vect_permute_load_chain, vect_shift_permute_load_chain)
3000 (vect_transform_grouped_load)
3001 (vect_record_grouped_load_vectors): Likewise.
3002 * tree-vect-loop.c (vect_fixup_reduc_chain)
3003 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
3004 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
3005 (vectorizable_reduction, vectorizable_induction)
3006 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
3007 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
3008 (vect_get_load_store_mask): Likewise.
3009 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
3010 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
3011 * tree-vect-stmts.c (vect_mark_relevant)
3012 (is_simple_and_all_uses_invariant)
3013 (exist_non_indexing_operands_for_use_p, process_use)
3014 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
3015 (vect_get_vec_def_for_operand, vect_get_vec_defs)
3016 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
3017 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
3018 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
3019 (get_negative_load_store_type, get_load_store_type)
3020 (vect_check_load_store_mask, vect_check_store_rhs)
3021 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
3022 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3023 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3024 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3025 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
3026 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
3027 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
3028 (supportable_widening_operation): Likewise.
3030 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3032 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
3033 a stmt_vec_info instead of a gcall.
3034 (vect_check_gather_scatter): Update call accordingly.
3035 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
3037 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
3038 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
3039 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
3040 instead of a gimple stmt.
3041 (vect_transform_loop): Update calls accordingly.
3042 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
3043 stmt_vec_infos instead of gimple stmts.
3044 (vect_analyze_slp_instance): Update use accordingly.
3045 * tree-vect-stmts.c (read_vector_array, write_vector_array)
3046 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
3047 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
3048 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
3049 (vect_gen_widened_results_half, vect_get_loop_based_defs)
3050 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
3051 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
3052 down to subroutines.
3054 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3056 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
3057 of the worklist from a vector of gimple stmts to a vector of
3059 * tree-vect-stmts.c (vect_mark_relevant, process_use)
3060 (vect_mark_stmts_to_be_vectorized): Likewise
3062 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3064 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
3065 statement before passing it to vect_analyze_stmt.
3066 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
3067 the chain of phi vector definitions. Track the exit phi via its
3069 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
3070 STMT_VINFO_REDUC_DEF.
3071 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
3072 stmt_vec_infos to handle the statement chains.
3073 (vect_get_slp_defs): Record the first statement in the node
3074 using a stmt_vec_info.
3075 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
3076 statements here and pass their stmt_vec_info down to subroutines.
3077 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
3078 down to vect_finish_stmt_generation.
3079 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
3080 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
3081 stmt_vec_infos to subroutines.
3082 (vect_remove_stores): Use stmt_vec_infos to handle the statement
3085 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3087 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
3088 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
3089 (vect_permute_store_chain, vect_setup_realignment)
3090 (vect_permute_load_chain, vect_shift_permute_load_chain)
3091 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
3092 stmts internally, and when passing values to other vectorizer routines.
3093 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
3094 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
3095 (vect_analyze_loop_operations, get_initial_def_for_reduction)
3096 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
3097 (vectorizable_reduction, vectorizable_induction)
3098 (vectorizable_live_operation, vect_transform_loop_stmt)
3099 (vect_transform_loop): Likewise.
3100 * tree-vect-patterns.c (vect_reassociating_reduction_p)
3101 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
3102 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
3103 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3104 (vect_slp_analyze_node_operations_1): Likewise.
3105 * tree-vect-stmts.c (vect_mark_relevant, process_use)
3106 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
3107 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
3108 (vect_finish_stmt_generation_1, get_group_load_store_type)
3109 (get_load_store_type, vect_build_gather_load_calls)
3110 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3111 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3112 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3113 (vectorizable_store, vectorizable_load, vectorizable_condition)
3114 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
3115 (supportable_widening_operation): Likewise.
3116 (vect_get_vector_types_for_stmt): Likewise.
3117 * tree-vectorizer.h (vect_dr_behavior): Likewise.
3119 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3121 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
3122 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
3123 (vect_permute_store_chain, vect_permute_load_chain)
3124 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
3125 repeated stmt_vec_info lookups.
3126 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
3127 (vect_update_ivs_after_vectorizer): Likewise.
3128 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
3129 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
3130 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
3131 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3132 (vect_bb_slp_scalar_cost): Likewise.
3133 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
3135 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3137 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
3138 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
3139 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
3140 to get gassigns and gcalls, rather than operating on generc gimple
3142 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
3143 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
3144 (vectorizable_load, vect_analyze_stmt): Likewise.
3145 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
3147 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3149 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
3150 return stmt_vec_infos rather than gimple stmts. Do not accept
3152 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
3154 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3155 Update use of get_later_stmt.
3156 (vect_get_constant_vectors): Update call accordingly.
3157 (vect_schedule_slp_instance): Likewise
3158 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
3159 (vect_slp_analyze_instance_dependence): Likewise.
3160 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
3162 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3164 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
3165 (stmt_info_for_cost::stmt_info): ...this new field.
3166 (add_stmt_costs): Update accordingly.
3167 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
3168 (vect_get_known_peeling_cost): Likewise.
3169 (vect_estimate_min_profitable_iters): Likewise.
3170 * tree-vect-stmts.c (record_stmt_cost): Likewise.
3172 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3174 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
3175 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3176 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3178 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
3180 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3182 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
3183 a gimple stmt to a stmt_vec_info.
3184 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
3186 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3188 * tree-vectorizer.h (vec_info::grouped_stores): Change from
3189 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3190 (_loop_vec_info::reduction_chains): Likewise.
3191 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
3193 * tree-vect-slp.c (vect_analyze_slp): Likewise.
3195 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3197 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
3198 a gimple stmt to a stmt_vec_info.
3199 (_stmt_vec_info::next_element): Likewise.
3200 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
3201 (vect_slp_analyze_and_verify_node_alignment)
3202 (vect_analyze_group_access_1, vect_analyze_group_access)
3203 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
3204 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
3205 (vect_supportable_dr_alignment): Update accordingly.
3206 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
3207 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
3208 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
3209 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
3210 * tree-vect-slp.c (vect_build_slp_tree_1)
3211 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
3212 (vect_split_slp_store_group, vect_analyze_slp_instance)
3213 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
3214 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
3215 (get_group_load_store_type, get_load_store_type)
3216 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
3217 (vect_transform_stmt, vect_remove_stores): Likewise.
3219 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3221 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
3223 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
3224 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
3225 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
3226 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
3227 (vector_alignment_reachable_p, vect_get_data_access_cost)
3228 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
3229 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
3230 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3231 (vect_analyze_group_access_1, vect_analyze_group_access)
3232 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
3233 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
3234 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
3235 result of vect_dr_stmt and use the stmt_vec_info instead of
3236 the associated gimple stmt.
3237 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3238 (vect_gen_prolog_loop_niters): Likewise.
3239 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3241 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3243 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
3244 to a vec<stmt_vec_info>.
3245 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
3246 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
3248 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
3249 to a vec<stmt_vec_info>.
3250 (bst_traits::value_type, bst_traits::value_type): Likewise.
3251 (bst_traits::hash): Update accordingly.
3252 (vect_get_and_check_slp_defs): Change the stmts parameter from
3253 a vec<gimple *> to a vec<stmt_vec_info>.
3254 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
3255 (vect_build_slp_tree): Likewise.
3256 (vect_build_slp_tree_2): Likewise. Update uses of
3257 SLP_TREE_SCALAR_STMTS.
3258 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
3259 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
3260 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
3261 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
3262 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
3263 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
3264 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
3265 (vect_get_constant_vectors, vect_get_slp_defs)
3266 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
3267 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
3268 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
3269 instead of gimple stmts.
3270 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
3271 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
3272 (vect_slp_analyze_instance_dependence): Update uses of
3273 SLP_TREE_SCALAR_STMTS.
3274 (vect_slp_analyze_and_verify_node_alignment): Likewise.
3275 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
3276 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
3277 (get_initial_defs_for_reduction): Likewise.
3278 (vect_create_epilog_for_reduction): Likewise.
3279 (vectorize_fold_left_reduction): Likewise.
3280 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
3281 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
3282 (can_vectorize_live_stmts): Likewise.
3284 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3286 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
3287 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3288 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
3290 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
3292 (gather_scalar_reductions): Update after above interface changes.
3293 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
3294 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
3296 (vect_force_simple_reduction): Likewise.
3297 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
3298 LOOP_VINFO_REDUCTIONS.
3299 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3301 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3303 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
3304 a gimple stmt to a stmt_vec_info.
3305 * tree-vect-loop.c (vect_active_double_reduction_p)
3306 (vect_force_simple_reduction, vectorizable_reduction): Update
3309 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3311 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
3312 vec<gimple *> to a vec<stmt_vec_info>.
3313 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
3314 the reduction_phis argument from a vec<gimple *> to a
3316 (vectorizable_reduction): Likewise the phis local variable that
3317 is passed to vect_create_epilog_for_reduction. Update for new type
3318 of SLP_TREE_VEC_STMTS.
3319 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
3320 (vectorizable_live_operation): Likewise.
3321 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
3322 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
3324 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3326 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
3327 a gimple stmt to a stmt_vec_info.
3328 (vectorizable_condition, vectorizable_live_operation)
3329 (vectorizable_reduction, vectorizable_induction): Pass back the
3330 vectorized statement as a stmt_vec_info.
3331 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
3332 use of STMT_VINFO_VEC_STMT.
3333 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
3334 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
3335 as stmt_vec_infos rather than gimple stmts.
3336 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
3338 (vectorizable_live_operation): Likewise.
3339 (vectorizable_reduction, vectorizable_induction): Likewise,
3340 updating use of STMT_VINFO_VEC_STMT.
3341 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
3342 of STMT_VINFO_VEC_STMT.
3343 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
3344 (vectorizable_simd_clone_call, vectorizable_conversion)
3345 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3346 (vectorizable_store, vectorizable_load, vectorizable_condition)
3347 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
3348 from a gimple stmt to a stmt_vec_info.
3349 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
3350 pointer to a stmt_vec_info to the vectorizable_* routines.
3352 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3354 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
3355 a gimple stmt to a stmt_vec_info.
3356 (is_pattern_stmt_p): Update accordingly.
3357 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
3358 (vect_record_grouped_load_vectors): Likewise.
3359 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
3360 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
3361 (vect_model_reduction_cost): Likewise.
3362 (vect_create_epilog_for_reduction): Likewise.
3363 (vectorizable_reduction, vectorizable_induction): Likewise.
3364 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3365 Return the stmt_vec_info for the pattern statement.
3366 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
3367 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
3368 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
3369 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
3370 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
3371 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
3372 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
3373 (free_stmt_vec_info, vect_is_simple_use): Likewise.
3375 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3377 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
3378 (vect_finish_stmt_generation): Likewise.
3379 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3380 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
3381 (vect_build_gather_load_calls): Use the return value of the above
3382 functions instead of a separate call to vinfo_for_stmt. Use narrow
3383 scopes for the input gimple stmt and wider scopes for the associated
3384 stmt_vec_info. Use vec_info::lookup_def when setting these
3385 stmt_vec_infos from an SSA_NAME definition.
3386 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3387 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3388 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3389 (vectorizable_store, vectorizable_load, vectorizable_condition)
3390 (vectorizable_comparison): Likewise.
3391 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
3392 (vectorizable_reduction): Likewise.
3394 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3396 * tree-vectorizer.h (vect_is_simple_use): Add an optional
3397 stmt_vec_info * parameter before the optional gimple **.
3398 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3399 (process_use, vect_get_vec_def_for_operand_1): Update callers.
3400 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
3401 * tree-vect-loop.c (vectorizable_reduction): Likewise.
3402 (vectorizable_live_operation): Likewise.
3403 * tree-vect-patterns.c (type_conversion_p): Likewise.
3404 (vect_look_through_possible_promotion): Likewise.
3405 (vect_recog_rotate_pattern): Likewise.
3406 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3408 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3410 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
3411 a typedef to a wrapper class.
3412 (NULL_STMT_VEC_INFO): New macro.
3413 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
3414 (stmt_vec_info::operator*): New function.
3415 (stmt_vec_info::operator gimple *): Likewise.
3416 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
3417 (add_stmt_costs): Likewise.
3418 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
3419 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
3420 (vect_get_known_peeling_cost): Likewise.
3421 (vect_estimate_min_profitable_iters): Likewise.
3422 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3423 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
3424 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3425 (vectorizable_store, free_stmt_vec_infos): Likewise.
3426 (new_stmt_vec_info): Change return type of xcalloc to
3429 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3431 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
3432 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
3433 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
3434 a single_imm_use-based sequence.
3435 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
3437 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3439 * tree-vectorizer.h (vec_info::lookup_def): Declare.
3440 * tree-vectorizer.c (vec_info::lookup_def): New function.
3441 * tree-vect-patterns.c (vect_get_internal_def): Use it.
3442 (vect_widened_op_tree): Likewise.
3443 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3444 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
3445 (vectorizable_reduction): Likewise.
3446 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
3448 (vect_is_slp_reduction): Update calls accordingly. Use
3449 vec_info::lookup_def.
3450 (vect_is_simple_reduction): Likewise
3451 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
3453 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3455 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
3456 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
3457 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
3459 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
3460 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
3461 (vect_update_vf_for_slp, vect_analyze_loop_operations)
3462 (vect_is_slp_reduction, vectorizable_induction)
3463 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
3464 * tree-vect-patterns.c (vect_init_pattern_stmt):
3465 (vect_determine_min_output_precision_1, vect_determine_precisions)
3466 (vect_pattern_recog): Likewise.
3467 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
3468 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
3469 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
3470 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
3471 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
3472 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
3473 info field from a loop to a loop_vec_info.
3475 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3477 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
3478 (vec_info::add_stmt): Declare.
3479 * tree-vectorizer.c (vec_info::add_stmt): New function.
3480 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
3481 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
3482 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
3483 (vectorizable_induction): Likewise.
3484 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
3485 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3486 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
3487 (vectorizable_load): Likewise.
3488 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3489 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
3490 (vect_recog_gather_scatter_pattern): Likewise.
3491 (append_pattern_def_seq): Likewise. Remove a check that is
3492 performed by add_stmt itself.
3494 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3496 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
3497 which make_ssa_name was called with new_stmt before new_stmt
3500 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3502 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
3504 (vect_is_slp_reduction): ...here...
3505 (vect_is_simple_reduction): ...and here. Remove repetition of tests
3506 that are already known to be false.
3508 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3510 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
3511 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
3512 STMT_VINFO_NUM_SLP_USES when it's true.
3513 (vect_free_slp_instance): Add a final_p parameter and pass it to
3515 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
3516 (vect_analyze_slp_instance): Likewise.
3517 (vect_slp_analyze_operations): Likewise.
3518 (vect_slp_analyze_bb_1): Likewise.
3519 * tree-vectorizer.c (vec_info): Likewise.
3520 * tree-vect-loop.c (vect_transform_loop): Likewise.
3522 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3524 * tree-vect-loop.c (vectorizable_reduction): Assert that the
3525 function is not called for second and subsequent members of
3528 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3530 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
3531 cases for nested loops from here to ...
3532 (vect_create_epilog_for_reduction): ...here. Only call
3533 vect_is_simple_use for inner-loop reductions.
3535 2018-07-31 Martin Liska <mliska@suse.cz>
3537 PR gcov-profile/85338
3538 PR gcov-profile/85350
3539 PR gcov-profile/85372
3540 * profile.c (struct location_triplet): New.
3541 (struct location_triplet_hash): Likewise.
3542 (output_location): Do not output a BB that
3543 is already recorded for a line.
3544 (branch_prob): Use streamed_locations.
3546 2018-07-31 Martin Liska <mliska@suse.cz>
3548 PR gcov-profile/85370
3549 * coverage.c (coverage_begin_function): Do not mark target
3550 clones as artificial functions.
3552 2018-07-31 Martin Liska <mliska@suse.cz>
3554 PR gcov-profile/83813
3555 PR gcov-profile/84758
3556 PR gcov-profile/85217
3557 PR gcov-profile/85332
3558 * profile.c (branch_prob): Do not record GOTO expressions
3559 for GIMPLE statements which locations are already streamed.
3561 2018-07-31 Olivier Hainque <hainque@adacore.com>
3563 * gcc.c (handle_spec_function): Accept a soft_matched_part
3564 argument, as do_spec_1. Pass it down to ...
3565 (eval_spec_function): Accept a soft_matched_part argument,
3566 and pass it down to ...
3567 (do_spec_2): Accept a soft_matched_part argument, and pass
3568 it down to do_spec_1.
3569 (do_spec_1): Pass soft_matched_part to handle_spec_function.
3570 (handle_braces): Update call to handle_spec_function.
3571 (driver::set_up_specs): Update calls to do_spec_2.
3572 (compare_debug_dump_opt_spec_function): Likewise.
3573 (compare_debug_self_opt_spec_function): Likewise.
3575 2018-07-31 Olivier Hainque <hainque@adacore.com>
3577 * common.opt (nolibc): New option.
3578 * doc/invoke.texi (Link Options): Document it.
3579 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
3580 * config/alpha/linux.h: Likewise.
3581 * config/arc/elf.h: Likewise.
3582 * config/arm/uclinux-elf.h: Likewise.
3583 * config/arm/unknown-elf.h: Likewise.
3584 * config/avr/avrlibc.h: Likewise.
3585 * config/bfin/bfin.h: Likewise.
3586 * config/bfin/linux.h: Likewise.
3587 * config/bfin/uclinux.h: Likewise.
3588 * config/darwin.h: Likewise.
3589 * config/darwin10.h: Likewise.
3590 * config/darwin12.h: Likewise.
3591 * config/gnu-user.h: Likewise.
3592 * config/lm32/uclinux-elf.h: Likewise.
3593 * config/pa/pa-hpux11.h: Likewise.
3594 * config/pa/pa64-hpux.h: Likewise.
3595 * config/sparc/sparc.h: Likewise.
3597 2018-07-31 Olivier Hainque <hainque@adacore.com>
3599 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
3600 undefined variables.
3602 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
3605 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
3608 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
3610 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
3611 terminated string literal.
3613 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
3615 PR rtl-optimization/85160
3616 * combine.c (is_just_move): New function.
3617 (try_combine): Allow combining two instructions into two if neither of
3618 the original instructions was a move.
3620 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
3623 * doc/extend.texi (Global Register Variables): Discourage use of type
3625 (Local Register Variables): Likewise.
3627 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
3629 PR tree-optimization/86506
3630 * hwint.h (ceil_log2): Resync with hwint.c implementation.
3632 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
3635 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
3636 hard_regno, make sure no insn between `from` and `to` clobbers it.
3638 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
3639 Tom de Vries <tdevries@suse.de>
3641 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
3642 (PTX_DEFAULT_RUNTIME_DIM): ... this.
3643 (nvptx_goacc_validate_dims): Set default worker and gang dims to
3644 PTX_DEFAULT_RUNTIME_DIM.
3645 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
3647 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
3649 * config/pa/pa.c (pa_output_addr_vec): Align address table.
3650 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
3651 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
3653 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
3655 * config/rs6000/constraints.md (wG constraint): Delete, no longer
3657 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
3658 predicate to reflect toc fusion has been deleted.
3659 (toc_fusion_mem_raw): Delete, no longer used.
3660 (toc_fusion_mem_wrapped): Likewise.
3661 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
3663 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
3664 Delete, no longer used.
3665 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
3666 meant to be used for toc fusion.
3667 (rs6000_debug_print_mode): Delete toc fusion debugging.
3668 (rs6000_debug_reg_global): Likewise.
3669 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
3670 fusion and secondary reload support that were never used.
3671 (rs6000_option_override_internal): Delete TOC fusion, that was only
3672 partially defined, and it did not work unless you also used the
3674 (rs6000_legitimate_address_p): Delete TOC fusion support.
3675 (rs6000_opt_masks): Likewise.
3676 (fusion_wrap_memory_address): Delete function, no longer used.
3677 (fusion_split_address); Delete TOC fusion support.
3678 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
3679 longer used with toc fusion being deleted.
3680 (TARGET_TOC_FUSION_FP): Likewise.
3681 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
3683 (toc fusion spliter): Delete TOC fusion support.
3684 (toc_fusionload_<mode>): Likewise.
3685 (toc_fusionload_di): Likewise.
3686 (fusion_gpr_load_<mode>): Delete generator function, this insn no
3687 longer needs to be named. Rename predicate to delete TOC fusion.
3688 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
3689 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
3690 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
3691 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
3692 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
3694 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
3696 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
3697 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
3698 __int128 in built-in function prototypes.
3699 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
3700 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
3702 2018-07-27 Martin Sebor <msebor@redhat.com>
3704 PR tree-optimization/86696
3705 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
3706 types, including enums.
3707 (handle_char_store): Be prepared for the above function to fail.
3709 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
3711 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
3712 when optimization level is lower than 2 or optimize for size.
3714 2018-07-26 Martin Sebor <msebor@redhat.com>
3716 PR tree-optimization/86043
3717 PR tree-optimization/86042
3718 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
3719 (get_string_cst_length): Rename...
3720 (get_min_string_length): ...to this. Add argument.
3721 (handle_char_store): Extend to handle multi-character stores by
3723 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
3724 * tree.h (initializer_zerop): Add argument.
3726 2018-07-26 Jakub Jelinek <jakub@redhat.com>
3729 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
3730 declare target to variables if they have always,{to,from,tofrom} map
3733 2018-07-26 Martin Liska <mliska@suse.cz>
3736 * lto-wrapper.c: Add linker_output as prefix
3737 for ltrans_output_file.
3739 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
3741 PR rtl-optimization/85805
3742 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
3743 value for hard registers if that was written in the same mode.
3745 2018-07-26 Martin Liska <mliska@suse.cz>
3747 PR gcov-profile/86536
3748 * gcov.c (format_gcov): Use printf format %.*f directly
3749 and do not handle special values.
3751 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3753 * common/config/arc/arc-common.c (arc_option_optimization_table):
3754 Update default optimizations for size.
3756 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3758 * config/arc/arc.md (movsf_insn): Add short instruction selection.
3759 * config/arc/constraints.md (CfZ): New constraint.
3760 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
3761 (subsf3_fpu): Likewise.
3762 (cmpsf_fpu): Likewise.
3763 (cmpsf_fpu_uneq): Likewise.
3765 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3767 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
3769 (arc_is_uncached_mem_p): uncached applies to both the variable and
3772 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3774 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
3777 2018-07-25 David Malcolm <dmalcolm@redhat.com>
3779 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
3780 field "m_scopes" from vec to auto_vec.
3782 2018-07-25 Martin Liska <mliska@suse.cz>
3784 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
3787 2018-07-25 Richard Biener <rguenther@suse.de>
3790 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
3791 special wrt context_die late.
3792 (gen_subprogram_die): Re-use DIEs in local scope.
3794 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
3796 PR tree-optimization/86644
3797 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
3799 2018-07-25 Martin Liska <mliska@suse.cz>
3802 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
3803 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
3805 2018-07-25 Martin Liska <mliska@suse.cz>
3808 * params.def: Explain ASan abbreviation and provide
3809 a documentation link.
3811 2018-07-24 Martin Sebor <msebor@redhat.com>
3813 PR tree-optimization/86622
3814 PR tree-optimization/86532
3815 * builtins.h (string_length): Declare.
3816 * builtins.c (c_strlen): Correct handling of non-constant offsets.
3817 (check_access): Be prepared for non-constant length ranges.
3818 (string_length): Make extern.
3819 * expr.c (string_constant): Only handle the minor non-constant
3820 array index. Use string_constant to compute the length of
3821 a generic string constant.
3823 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
3825 PR tree-optimization/86618
3826 * tree-vect-stmts.c (vectorizable_call): Don't take the address
3827 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
3829 2018-07-24 David Malcolm <dmalcolm@redhat.com>
3831 PR tree-optimization/86636
3832 * json.cc (json::object::set): Fix comment. Add assertions.
3833 (json::array::append): Move here from json.h. Add comment and an
3835 (json::string::string): Likewise.
3836 * json.h (json::array::append): Move to json.cc.
3837 (json::string::string): Likewise.
3838 * optinfo-emit-json.cc
3839 (optrecord_json_writer::impl_location_to_json): Assert that we
3840 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
3841 wrapper around it. Expand the location once, rather than three
3843 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
3844 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
3846 (optrecord_json_writer::optinfo_to_json): Likewise, in four
3847 places. Fix some overlong lines.
3849 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
3851 * config/aarch64/aarch64-simd.md
3852 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
3853 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
3854 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
3855 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
3856 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
3857 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
3858 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
3859 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
3860 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
3862 2018-07-24 Jakub Jelinek <jakub@redhat.com>
3865 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
3866 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
3867 and abs_d == d, do the power of two handling if profitable.
3869 2018-07-24 Richard Biener <rguenther@suse.de>
3871 * match.pd: Add BIT_FIELD_REF canonicalizations.
3873 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
3876 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
3878 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
3880 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
3881 terminated STRING_CST object.
3883 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
3885 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
3887 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
3889 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
3890 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
3891 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
3892 the elements into a register.
3893 (rs6000_split_v4si_init_di_reg): Delete.
3894 (rs6000_split_v4si_init): Delete.
3895 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
3896 (vsx_init_v4si): Rewrite as a define_expand.
3898 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
3900 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
3901 zero_extend argument from memory): New.
3903 2018-07-22 Martin Sebor <msebor@redhat.com>
3906 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
3907 diagnosing calls with unknown arguments unless -Walloca-larger-than
3908 is restricted to less than PTRDIFF_MAX bytes.
3910 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
3912 * doc/gcov.texi (Invoking Gcov): Editorial changes.
3914 2018-07-20 David Malcolm <dmalcolm@redhat.com>
3916 * pretty-print.c (text_info::set_location): Remove redundant
3917 "line_table" parameter from call to rich_location::set_range.
3919 2018-07-20 Martin Sebor <msebor@redhat.com>
3922 * builtins.c (expand_builtin_alloca): Adjust.
3923 * calls.c (alloc_max_size): Simplify.
3924 * cgraphunit.c (cgraph_node::expand): Adjust.
3925 * common.opt (larger_than_size, warn_frame_larger_than): Remove
3927 (frame_larger_than_size): Same.
3928 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
3929 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
3931 * doc/invoke.texi (GCC Command Options): Document option arguments.
3932 Explain byte-size arguments and suffixes.
3933 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
3934 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
3935 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
3936 * doc/options.texi (UInteger): Expand.
3937 (Host_Wide_Int, ByteSize): Document new properties.
3938 * final.c (final_start_function_1): Include sizes in an error message.
3939 * function.c (frame_offset_overflow): Same.
3940 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
3941 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
3942 Diagnose unbounded alloca calls only for limits of less than
3944 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
3945 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
3947 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
3948 only for limits of less than PTRDIFF_MAX.
3949 * langhooks-def.h (lhd_handle_option): Change function argument
3951 * langhooks.c (lhd_handle_option): Same.
3952 * langhooks.h (handle_option): Same.
3953 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
3955 (var_type, var_type_struct): Same.
3956 (var_set): Handle ByteSize flag.
3957 * optc-gen.awk: Add comments to output to ease debugging. Make
3958 use of HOST_WIDE_INT where appropriate.
3959 * opts-gen-save.awk: Use %lx to format unsigned long.
3960 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
3961 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
3962 arguments. Parse bytes-size suffixes.
3963 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
3964 (enum_value_to_arg): Same.
3965 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
3966 (handle_option): Adjust.
3967 (generate_option): Change function argument to HOST_WIDE_INT.
3968 (cmdline_handle_error): Adjust.
3969 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
3970 (set_option): Change function argument to HOST_WIDE_INT.
3971 (option_enabled): Handle cl_host_wide_int.
3972 (get_option_state): Handle CLVC_SIZE.
3973 (control_warning_option): Same.
3974 * opts.c (common_handle_option): Change function argument to
3975 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
3976 OPT_Wvla_larger_than_.
3977 * opts.h (enum cl_var_type): Add an enumerator.
3978 * stor-layout.c (layout_decl): Print a more meaningful warning.
3979 * toplev.c (output_stack_usage): Adjust.
3981 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
3983 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
3984 call to inline_expand_builtin_string_cmp.
3985 (expand_builtin_strcmp): Likewise.
3986 (expand_builtin_strncmp): Likewise.
3987 (inline_string_cmp): Delete the last parameter, change char_type_node
3988 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
3990 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
3991 the inlining expansion on target where the type of the call has same or
3992 narrower precision than unsigned char.
3994 2018-07-20 David Malcolm <dmalcolm@redhat.com>
3996 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
3997 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
3998 * common.opt (fsave-optimization-record): New option.
3999 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
4000 * doc/invoke.texi (-fsave-optimization-record): New option.
4001 * dumpfile.c: Include "optinfo-emit-json.h".
4002 (struct kv_pair): Move to coretypes.h.
4003 (optgroup_options): Make non-static.
4004 (dump_context::end_scope): Call
4005 optimization_records_maybe_pop_dump_scope.
4006 * dumpfile.h (optgroup_options): New decl.
4007 * json.cc: New file.
4009 * optinfo-emit-json.cc: New file.
4010 * optinfo-emit-json.h: New file.
4011 * optinfo.cc: Include "optinfo-emit-json.h".
4012 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
4013 (optinfo_enabled_p): Check optimization_records_enabled_p.
4014 (optinfo_wants_inlining_info_p): Likewise.
4015 * optinfo.h: Update comment.
4016 * profile-count.c (profile_quality_as_string): New function.
4017 * profile-count.h (profile_quality_as_string): New decl.
4018 (profile_count::quality): New accessor.
4019 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
4020 and optinfo_emit_json_cc_tests.
4021 * selftest.h (selftest::json_cc_tests): New decl.
4022 (selftest::optinfo_emit_json_cc_tests): New decl.
4023 * toplev.c: Include "optinfo-emit-json.h".
4024 (compile_file): Call optimization_records_finish.
4025 (do_compile): Call optimization_records_start.
4026 * tree-ssa-live.c: Include optinfo.h.
4027 (remove_unused_scope_block_p): Retain inlining information if
4028 optinfo_wants_inlining_info_p returns true.
4030 2018-07-20 Richard Biener <rguenther@suse.de>
4033 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
4034 to cover -flto-partition=none.
4036 2018-07-20 Martin Liska <mliska@suse.cz>
4038 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
4039 (get_decl_source_range): Remove unused function.
4041 2018-07-20 Richard Biener <rguenther@suse.de>
4043 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
4044 (struct vn_phi_s): Likewise.
4045 (struct vn_reference_s): Likewise.
4046 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
4047 for searching the slot of an entry known to be in the hash itself.
4048 (vn_phi_hasher::equal): Likewise.
4049 (vn_reference_hasher::equal): Likewise.
4050 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
4052 (optimistic_info, current_info): Remove, keeping only valid_info.
4053 (vn_reference_lookup_1): Remove fallback lookup.
4054 (vn_reference_lookup_2): Likewise.
4055 (vn_nary_op_lookup_1): Likewise.
4056 (vn_phi_lookup): Likewise.
4057 (vn_nary_build_or_lookup_1): Make sure to not chain the built
4059 (vn_reference_insert): Adjust, chain the inserted hash element
4060 at last_inserted_ref.
4061 (vn_reference_insert_pieces): Likewise.
4062 (visit_reference_op_call): Likewise.
4063 (vn_nary_op_insert_into): Chain the inserted hash element at
4065 (vn_nary_op_insert_pieces): Adjust.
4066 (vn_nary_op_insert): Likewise.
4067 (vn_nary_op_insert_stmt): Likewise.
4068 (vn_phi_insert): Adjust, chain the inserted hash element at
4070 (process_scc): Remove clearing and copying the optimistic
4071 table. Instead remove elements inserted during an optimistic
4072 iteration from the single table we maintain.
4073 (init_scc_vn): Adjust.
4074 (free_scc_vn): Likewise.
4075 (sccvn_dom_walker::record_cond): Likewise.
4076 (sccvn_dom_walker::after_dom_children): Likewise.
4078 2018-07-19 Martin Sebor <msebor@redhat.com>
4080 PR tree-optimization/84047
4081 PR tree-optimization/83776
4082 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
4083 (check_array_bounds): Call it.
4085 2018-07-19 Martin Sebor <msebor@redhat.com>
4087 * align.h (align_flags): Use member initialization.
4089 2018-07-19 David Malcolm <dmalcolm@redhat.com>
4091 * Makefile.in (OBJS): Add optinfo.o.
4092 * coretypes.h (class symtab_node): New forward decl.
4093 (struct cgraph_node): New forward decl.
4094 (class varpool_node): New forward decl.
4095 * dump-context.h: New file.
4096 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
4098 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
4099 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
4100 (set_alt_dump_file): Likewise.
4101 (dump_context::~dump_context): New dtor.
4102 (dump_gimple_stmt): Move implementation to...
4103 (dump_context::dump_gimple_stmt): ...this new member function.
4104 Add the stmt to any pending optinfo, creating one if need be.
4105 (dump_gimple_stmt_loc): Move implementation to...
4106 (dump_context::dump_gimple_stmt_loc): ...this new member function.
4107 Start a new optinfo and add the stmt to it.
4108 (dump_gimple_expr): Move implementation to...
4109 (dump_context::dump_gimple_expr): ...this new member function.
4110 Add the stmt to any pending optinfo, creating one if need be.
4111 (dump_gimple_expr_loc): Move implementation to...
4112 (dump_context::dump_gimple_expr_loc): ...this new member function.
4113 Start a new optinfo and add the stmt to it.
4114 (dump_generic_expr): Move implementation to...
4115 (dump_context::dump_generic_expr): ...this new member function.
4116 Add the tree to any pending optinfo, creating one if need be.
4117 (dump_generic_expr_loc): Move implementation to...
4118 (dump_context::dump_generic_expr_loc): ...this new member
4119 function. Add the tree to any pending optinfo, creating one if
4121 (dump_printf): Move implementation to...
4122 (dump_context::dump_printf_va): ...this new member function. Add
4123 the text to any pending optinfo, creating one if need be.
4124 (dump_printf_loc): Move implementation to...
4125 (dump_context::dump_printf_loc_va): ...this new member function.
4126 Start a new optinfo and add the stmt to it.
4127 (dump_dec): Move implementation to...
4128 (dump_context::dump_dec): ...this new member function. Add the
4129 value to any pending optinfo, creating one if need be.
4130 (dump_context::dump_symtab_node): New member function.
4131 (dump_context::get_scope_depth): New member function.
4132 (dump_context::begin_scope): New member function.
4133 (dump_context::end_scope): New member function.
4134 (dump_context::ensure_pending_optinfo): New member function.
4135 (dump_context::begin_next_optinfo): New member function.
4136 (dump_context::end_any_optinfo): New member function.
4137 (dump_context::s_current): New global.
4138 (dump_context::s_default): New global.
4139 (dump_scope_depth): Delete global.
4140 (dumpfile_ensure_any_optinfo_are_flushed): New function.
4141 (dump_symtab_node): New function.
4142 (get_dump_scope_depth): Reimplement in terms of dump_context.
4143 (dump_begin_scope): Likewise.
4144 (dump_end_scope): Likewise.
4145 (selftest::temp_dump_context::temp_dump_context): New ctor.
4146 (selftest::temp_dump_context::~temp_dump_context): New dtor.
4147 (selftest::verify_item): New function.
4148 (ASSERT_IS_TEXT): New macro.
4149 (ASSERT_IS_TREE): New macro.
4150 (ASSERT_IS_GIMPLE): New macro.
4151 (selftest::test_capture_of_dump_calls): New test.
4152 (selftest::dumpfile_c_tests): Call it.
4153 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
4154 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
4155 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
4156 descriptive comment.
4157 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
4158 (dump_node, dump_bb): Move these unrelated decls.
4159 (class dump_manager): Add leading comment.
4160 * optinfo.cc: New file.
4161 * optinfo.h: New file.
4163 2018-07-19 Michael Collison <michael.collison@arm.com>
4164 Richard Henderson <rth@redhat.com>
4166 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
4167 (subti): Handle op1 zero.
4168 (subvti4, usub4ti4): New.
4169 (*sub<GPI>3_compare1_imm): New.
4170 (sub<GPI>3_carryinCV): New.
4171 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
4172 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
4174 2018-07-19 Michael Collison <michael.collison@arm.com>
4175 Richard Henderson <rth@redhat.com>
4177 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
4178 (addti3): Create simpler code if low part is already known to be 0.
4179 (addvti4, uaddvti4): New.
4180 (*add<GPI>3_compareC_cconly_imm): New.
4181 (*add<GPI>3_compareC_cconly): New.
4182 (*add<GPI>3_compareC_imm): New.
4183 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
4184 handle constants within this pattern..
4185 (*add<GPI>3_compareV_cconly_imm): New.
4186 (*add<GPI>3_compareV_cconly): New.
4187 (*add<GPI>3_compareV_imm): New.
4188 (add<GPI>3_compareV): New.
4189 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
4190 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
4191 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
4192 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
4193 with 'comparison' operator.
4194 (*add<GPI>3_compareV_cconly_imm): Ditto.
4195 (*add<GPI>3_compareV_cconly): Ditto.
4196 (*add<GPI>3_compareV_imm): Ditto.
4197 (add<GPI>3_compareV): Ditto.
4198 (add<mode>3_carryinC): Ditto.
4199 (*add<mode>3_carryinC_zero): Ditto.
4200 (*add<mode>3_carryinC): Ditto.
4201 (add<mode>3_carryinV): Ditto.
4202 (*add<mode>3_carryinV_zero): Ditto.
4203 (*add<mode>3_carryinV): Ditto.
4205 2018-07-19 Michael Collison <michael.collison@arm.com>
4206 Richard Henderson <rth@redhat.com>
4208 * config/aarch64/aarch64-modes.def (CC_V): New.
4209 * config/aarch64/aarch64-protos.h
4210 (aarch64_addti_scratch_regs): Declare
4211 (aarch64_subvti_scratch_regs): Declare.
4212 (aarch64_expand_subvti): Declare.
4213 (aarch64_gen_unlikely_cbranch): Declare
4214 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
4215 for signed overflow using CC_Vmode.
4216 (aarch64_get_condition_code_1): Handle CC_Vmode.
4217 (aarch64_gen_unlikely_cbranch): New function.
4218 (aarch64_addti_scratch_regs): New function.
4219 (aarch64_subvti_scratch_regs): New function.
4220 (aarch64_expand_subvti): New function.
4222 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
4224 * config/aarch64/aarch64-option-extensions.def: New entry for profile
4226 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
4227 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
4230 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
4233 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
4234 address check not strict.
4236 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
4238 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
4240 (store_pair_lanes<mode>): Likewise.
4241 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
4242 enum value 'ADDR_QUERY_LDP_STP_N'.
4243 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
4244 (aarch64_print_address_internal): Add declaration.
4245 (aarch64_print_ldpstp_address): Remove.
4246 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
4247 (aarch64_print_operand): Change printing of 'y'.
4248 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
4249 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
4250 'true' rather than '1'.
4251 * config/aarch64/constraints.md (Uml): Likewise.
4252 (Uml): Rename to Umn.
4255 2018-07-19 Richard Biener <rguenther@suse.de>
4257 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
4259 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
4260 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
4261 (vn_reference_hasher): Likewise.
4262 (struct vn_tables_s): Remove obstack and alloc-pool members.
4263 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
4264 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
4265 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
4266 (vn_reference_insert_pieces): Likewise.
4267 (alloc_vn_nary_op_noinit): Adjust.
4268 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
4269 (vn_phi_eq): Adjust.
4270 (shared_lookup_phiargs): Remove.
4271 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
4272 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
4273 (visit_reference_op_call): Likewise.
4274 (copy_nary, copy_phi, copy_reference): Remove.
4275 (process_scc): Rewind the obstack when iterating. Do not
4276 copy the elements to valid_info but just move them from one
4277 hashtable to the other.
4278 (allocate_vn_table): Adjust.
4279 (free_vn_table): Likewise.
4280 (init_scc_vn): Likewise.
4281 (free_scc_vn): Likewise.
4283 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
4286 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
4287 indirect_return as function type attribute.
4288 (ix86_attribute_table): Change indirect_return to function
4290 * doc/extend.texi: Update indirect_return attribute.
4292 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
4294 * wide-int.h (widest2_int): New.
4295 * gimple-fold.c (arith_overflowed_p): Use it.
4296 * tree.h (widest2_int_cst): New.
4297 * tree-vrp.c (wide_int_binop_overflow): Rename from
4298 vrp_int_const_binop.
4299 Rewrite to work on trees.
4300 (extract_range_from_multiplicative_op_1): Abstract code to...
4301 (wide_int_range_min_max): ...here.
4302 (wide_int_range_cross_product): ...and here.
4303 (extract_range_from_binary_expr_1): Abstract overflow code to...
4304 (wide_int_range_mult_wrapping): ...here.
4305 * tree-vrp.h (wide_int_range_cross_product): New.
4306 (wide_int_range_mult_wrapping): New.
4308 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
4309 Julia Koval <julia.koval@intel.com>
4311 * config/i386/x86-tune-costs.h (skylake_memcpy,
4312 skylake_memset): Replace rep_prefix with unrolling for size 512.
4314 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
4317 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
4318 comparision with EQ_EXPR in last stmt.
4320 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
4322 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
4323 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
4324 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
4325 previously known as "PowerPC AltiVec Built-in Functions". Move
4326 some material to new subsubsections "PowerPC AltiVec Built-in
4327 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
4329 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
4330 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
4331 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
4332 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
4334 2018-07-18 Richard Biener <rguenther@suse.de>
4336 PR tree-optimization/86557
4337 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
4340 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
4342 * config/s390/s390.c (s390_function_profiler): Generate CFI.
4344 2018-07-17 Jeff Law <law@redhat.com>
4346 * config/arm/arm.c (get_label_padding): Update for recent
4347 changes to label_to_alignment.
4349 PR tree-optimization/86010
4350 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
4352 * config/mips/mips.c (vr4130_align_insns): Update for recent
4353 changes to label_to_alignment.
4355 * config/frv/frv.c (frv_label_align): Update for recent changes
4356 to label_to_alignment.
4358 * config/nios2/nios2.c (nios2_label_align): Update for recent
4359 changes which dropped ALIGN_LABELS_LOG.
4361 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
4363 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
4364 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
4366 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
4368 * config/arc/arc.c (arc_label_align): Use align_labels instead of
4369 deprecated align_labels_log.
4371 2018-07-17 Richard Biener <rguenther@suse.de>
4374 * dwarf2out.c (init_sections_and_labels): Always generate
4375 a debug_line_str_section for early LTO debug.
4376 (dwarf2out_finish): Reset debug_line_str_hash output early.
4377 Bump counter for extra dwarf5 .debug_loc labels to not conflict
4379 (dwarf2out_early_finish): Output debug_line_str.
4381 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
4383 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
4384 index register on z196 or later.
4386 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
4388 * config/s390/s390.c (s390_default_align): Set default function
4390 (s390_override_options_after_change): Call s390_default align.
4391 (s390_option_override_internal): Call s390_default_align.
4392 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
4394 2018-07-17 Jakub Jelinek <jakub@redhat.com>
4397 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
4398 to _looptemp_ clauses, other than the first two.
4400 2018-07-17 Martin Liska <mliska@suse.cz>
4402 * opts.c: Do not enable OPT_falign_* for -Os.
4404 2018-07-17 Martin Liska <mliska@suse.cz>
4406 * align.h (MAX_CODE_ALIGN): New.
4407 (MAX_CODE_ALIGN_VALUE): New.
4408 * common/config/i386/i386-common.c (ix86_handle_option):
4409 (MAX_CODE_ALIGN): Moved to align.h.
4410 * final.c (MAX_CODE_ALIGN): Likewise.
4411 * opts.c (parse_and_check_align_values):
4412 (MAX_CODE_ALIGN): Likewise.
4413 (MAX_CODE_ALIGN_VALUE): Likewise.
4415 2018-07-17 Martin Liska <mliska@suse.cz>
4417 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
4418 in order to fulfil coding style.
4419 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
4420 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4421 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4422 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
4423 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
4424 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
4425 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
4426 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
4427 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4429 2018-07-17 Martin Liska <mliska@suse.cz>
4431 * align.h: New file.
4432 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
4434 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
4435 align_flags of label_to_alignment.
4436 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
4438 * config/m68k/m68k.c: Do not use removed align_labels_value and
4440 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
4441 (LOOP_ALIGN): Likewise.
4442 (LABEL_ALIGN): Likewise.
4443 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
4444 Remove not used macro.
4445 (rs6000_loop_align): Change return type to align_flags.
4446 (rs6000_loop_align_max_skip): Remove.
4447 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
4448 Change return type to align_flags.
4449 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
4450 Remove not used macro.
4451 (rs6000_loop_align): Change return type to align_flags.
4452 (rs6000_loop_align_max_skip): Remove.
4453 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
4454 * config/rx/rx-protos.h (rx_align_for_label): Make it
4456 * config/rx/rx.c (rx_align_for_label): Change return type
4458 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
4460 into align_flags class.
4461 (LABEL_ALIGN): Likewise.
4462 (LOOP_ALIGN): Likewise.
4463 * config/s390/s390.c (s390_label_align): Use align_flags
4465 (s390_asm_output_function_label): Likewise.
4466 * config/sh/sh.c (sh_override_options_after_change):
4467 Use align_flags class directly without macros.
4468 (find_barrier): Likewise.
4469 (barrier_align): Likewise.
4470 (sh_loop_align): Likewise.
4471 * config/spu/spu.c (spu_option_override):
4472 Use align_flags_tuple::get_value instead of removed macros.
4473 (spu_sched_init): Likewise.
4474 * config/spu/spu.h (GTY): Likewise.
4475 * config/visium/visium.c (visium_option_override):
4476 Set "8" as default secondary alignment.
4477 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
4478 in order to guarantee secondary alignment of 8.
4479 * coretypes.h: Include align.h header file.
4480 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
4481 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
4482 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
4483 * doc/tm.texi.in: Likewise.
4484 * final.c (struct label_alignment): Remove not used structure.
4485 (LABEL_ALIGN): Change type to align_flags.
4486 (LOOP_ALIGN): Likewise.
4487 (JUMP_ALIGN): Likewise.
4488 (default_loop_align_max_skip): Remove.
4489 (default_label_align_max_skip): Likewise.
4490 (default_jump_align_max_skip): Likewise.
4491 (default_label_align_after_barrier_max_skip):
4492 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
4493 (LABEL_TO_MAX_SKIP): Remove.
4494 (label_to_alignment): Return align_flags type instead of integer.
4495 (label_to_max_skip): Remove.
4496 (align_fuzz): Use align_flags type.
4497 (compute_alignments): Use align_flags type and use align_flags::max
4498 to combine multiple alignments.
4499 (grow_label_align): Grow vec instead of C array.
4500 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
4501 (shorten_branches): Use align_flags type and use align_flags::max
4502 to combine multiple alignments.
4503 (final_scan_insn_1): Remove usage of secondary alignment that comes
4504 from label alignment, but instead use proper secondary alignment
4505 which is computed in grow_label_align.
4506 * flags.h (struct align_flags_tuple): Move to align.h.
4507 (struct align_flags): Likewise.
4508 (state_align_loops): Rename to align_loops.
4509 (state_align_jumps): Rename to align_jumps.
4510 (state_align_labels): Rename to align_labels.
4511 (state_align_functions): Rename to align_functions.
4512 (align_loops_log): Remove.
4513 (align_jumps_log): Remove.
4514 (align_labels_log): Remove.
4515 (align_functions_log): Remove.
4516 (align_loops_max_skip): Remove.
4517 (align_jumps_max_skip): Remove.
4518 (align_labels_max_skip): Remove.
4519 (align_functions_max_skip): Remove.
4520 (align_loops_value): Remove.
4521 (align_jumps_value): Remove.
4522 (align_labels_value): Remove.
4523 (align_functions_value): Remove.
4524 * output.h (label_to_alignment): Change return type to align_flags.
4525 (label_to_max_skip): Remove.
4526 * target.def: Remove loop_align_max_skip, label_align_max_skip,
4527 jump_align_max_skip macros.
4528 * targhooks.h (default_loop_align_max_skip): Remove.
4529 (default_label_align_max_skip): Likewise.
4530 (default_jump_align_max_skip): Likewise.
4531 (default_label_align_after_barrier_max_skip): Remove.
4532 * toplev.c (read_log_maxskip): Use ::normalize function.
4533 (parse_N_M): Remove not used argument and also call ::normalize.
4534 (parse_alignment_opts): Do not pass unused arguments.
4535 * varasm.c (assemble_start_function): Use directly align_functions
4536 instead of removed macros.
4537 * system.h: Do not poison removed macros.
4539 2018-07-17 Jakub Jelinek <jakub@redhat.com>
4542 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
4543 and cond temporaries don't have reference type if iterator has
4544 pointer type. For init use &for_pre_body instead of pre_p if
4545 for_pre_body is non-empty.
4547 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
4549 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
4550 double-double modes to SFmode directly directly.
4551 (trunc<mode>sf2_fprs): Delete.
4553 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
4555 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
4556 for conversions between IFmode and the decimal floating point modes.
4557 (init_float128_ieee): Use the correct names for conversions between
4558 KFmode and the decimal floating point modes.
4560 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
4562 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
4563 for the conversions between TDmode and IFmode.
4564 (init_float128_ieee): Use more correct names for the conversions
4565 between TDmode and KFmode.
4567 2018-07-16 Jakub Jelinek <jakub@redhat.com>
4569 PR tree-optimization/86526
4570 * builtins.c (expand_builtin_memcmp): Formatting fixes.
4571 (inline_expand_builtin_string_cmp): Likewise.
4572 (inline_string_cmp): Likewise. Use c_readstr instead of
4573 builtin_memcpy_read_str. Add unit_mode temporary.
4575 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4578 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
4579 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
4581 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
4583 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
4584 Alphabetize prototypes of built-in functions, separating out
4585 built-in functions that are listed in this section but should be
4586 described elsewhere.
4588 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
4591 * expmed.c (emit_store_flag): Do not emit setcc followed by a
4592 conditional move when trapping comparison was split to a
4593 non-trapping one (and vice versa).
4595 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
4597 * config/s390/s390.c (s390_function_profiler): Generate nops
4598 instead of profiler call sequences.
4599 * config/s390/s390.opt: Add the new option.
4601 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
4603 * config/s390/s390.c (s390_function_profiler): Generate
4604 __mcount_loc section.
4605 * config/s390/s390.opt: Add the new option.
4607 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
4609 * common.opt: Add the new warning.
4610 * config/s390/s390.c (s390_function_profiler): Emit "brasl
4611 %r0,__fentry__" when -mfentry is specified.
4612 (s390_option_override_internal): Disallow -mfentry for 31-bit
4614 * config/s390/s390.opt: Add the new option.
4616 2018-07-16 Richard Biener <rguenther@suse.de>
4619 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
4620 for function-local FUNCTION_DECL and RESULT_DECL immediately.
4622 2018-07-16 Martin Liska <mliska@suse.cz>
4625 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
4628 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
4630 * config/arc/arcHS.md: Update ARCHS scheduling rules.
4632 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
4634 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
4636 * config/arc/arc-cpus.def (hs4x): New cpu.
4638 * config/arc/arc-tables.opt: Regenerate.
4639 * config/arc/arc.c (arc_sched_issue_rate): New function.
4640 (TARGET_SCHED_ISSUE_RATE): Define.
4641 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
4642 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
4644 (attr tune): Add ARCHS4x tune values.
4645 (attr tune_dspmpy): Define.
4646 (*tst): Correct instruction type.
4647 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
4648 * config/arc/arcHS4x.md: New file.
4649 * config/arc/fpu.md: Update instruction type attributes.
4650 * config/arc/t-multilib: Regenerate.
4652 2018-07-16 Tom de Vries <tdevries@suse.de>
4655 * var-tracking.c (vt_initialize): Fix pre_dec handling.
4657 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4659 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
4662 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
4664 PR tree-optimization/86514
4665 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
4666 conversion to a boolean type from a type with greater precision.
4668 2018-07-16 Tom de Vries <tdevries@suse.de>
4670 * var-tracking.c (vt_initialize): Print adjusted insn slim if
4671 dump_flags request TDF_SLIM.
4673 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
4675 * fold-const.c (int_const_binop_1): Abstract...
4676 (wide_int_binop): ...wide int code here.
4677 (poly_int_binop): ...poly int code here.
4678 Abstract the rest of int_const_binop_1 into int_const_binop.
4679 * fold-const.h (wide_int_binop): New.
4680 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
4681 Remove useless PLUS/MINUS_EXPR case.
4682 (zero_nonzero_bits_from_vr): Move wide int code...
4683 (zero_nonzero_bits_from_bounds): ...here.
4684 (extract_range_from_binary_expr_1): Move mask optimization code...
4685 (range_easy_mask_min_max): ...here.
4686 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
4687 (range_easy_mask_min_max): New.
4689 2018-07-15 Jeff Law <law@redhat.com>
4692 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
4695 2018-07-14 Jim Wilson <jimw@sifive.com>
4697 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
4699 2018-07-14 Paul Koning <ni1d@arrl.net>
4701 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
4703 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
4705 * lto-streamer-out.c (copy_function_or_variable): Dump info about
4708 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
4709 Steve Munroe <munroesj52@gmail.com>
4711 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
4712 (_mm_andnot_si128): Likewise.
4713 (_mm_or_si128): Likewise.
4714 (_mm_xor_si128): Likewise.
4716 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
4719 * builtins.c (expand_builtin_memcmp): Inline the calls first
4720 when result_eq is false.
4721 (expand_builtin_strcmp): Inline the calls first.
4722 (expand_builtin_strncmp): Likewise.
4723 (inline_string_cmp): New routine. Expand a string compare
4724 call by using a sequence of char comparison.
4725 (inline_expand_builtin_string_cmp): New routine. Inline expansion
4726 a call to str(n)cmp/memcmp.
4727 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
4729 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
4731 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
4733 * config/arm/driver-arm.c: Include arm-native.h.
4734 (host_detect_local_cpu): Use auto-generated data tables.
4735 (vendors, arm_cpu_table): Delete. Move part information to ...
4736 * config/arm/arm-cpus.in: ... here.
4737 * config/arm/parsecpu.awk (gen_native): New function.
4738 (vendor, part): New CPU fields.
4739 (END): Add support for building the native CPU detection tables.
4740 * config/arm/t-arm (arm-native.h): Add build rule.
4741 (driver-arm.o): Add dependency on arm-native.h.
4743 2018-07-13 Richard Biener <rguenther@suse.de>
4746 * match.pd (addr1 - addr2): Allow either of the operand to
4749 2018-07-13 Tom de Vries <tdevries@suse.de>
4751 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
4754 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
4756 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
4757 arrays instead of numbered variables.
4759 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
4761 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
4762 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
4764 2018-07-13 Richard Biener <rguenther@suse.de>
4767 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
4768 instead of get_context_die.
4770 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
4771 Richard Biener <rguenther@suse.de>
4774 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
4775 that the loop latch destination where phi is defined.
4777 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
4779 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
4780 (riscv_expand_epilogue): Add assertion to check interrupt mode.
4781 (riscv_set_current_function): Extract getting interrupt type to new
4783 (riscv_get_interrupt_type): New function.
4784 (riscv_merge_decl_attributes): New function, checking interrupt type is
4786 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
4788 2018-07-12 Paul Koning <ni1d@arrl.net>
4790 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
4793 2018-07-12 Paul Koning <ni1d@arrl.net>
4795 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
4796 zero reference, add doloop_end instead.
4797 * doc/md.texi (decrement_and_branch_until_zero): Remove.
4798 (Looping patterns): Remove decrement_and_branch_until_zero. Add
4799 detail for doloop_end.
4801 2018-07-12 Martin Sebor <msebor@redhat.com>
4804 * attribs.c (decl_attributes): Reject conflicting attributes before
4805 calling attribute handlers.
4807 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
4809 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
4811 (gcc::dump_manager::get_dump_file_name): likewise.
4812 (dump_begin): Likewise.
4813 * dumpfile.h (dump_begin): Update prototype.
4814 (gcc::dump_manager::get_dump_file_name,
4815 gcc::dump_manager::get_dump_file_name): Update prototype.
4817 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4819 * internal-fn.h (vectorizable_internal_fn_p): New function.
4820 * tree-vect-slp.c (compatible_calls_p): Likewise.
4821 (vect_build_slp_tree_1): Remove nops argument. Handle calls
4822 to internal functions.
4823 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
4825 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4827 * fold-const.h (inverse_conditions_p): Declare.
4828 * fold-const.c (inverse_conditions_p): New function.
4829 * match.pd: Use inverse_conditions_p. Add folds of view_converts
4830 that test the inverse condition of a conditional internal function.
4831 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
4832 * internal-fn.c (internal_fn_mask_index): Handle conditional
4834 (vectorized_internal_fn_supported_p): New function.
4835 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
4836 (any_pred_load_store): Replace with...
4837 (need_to_predicate): ...this new variable.
4838 (redundant_ssa_names): New variable.
4839 (ifcvt_can_use_mask_load_store): Move initial checks to...
4840 (ifcvt_can_predicate): ...this new function. Handle tree codes
4841 for which a conditional internal function exists.
4842 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
4843 instead of ifcvt_can_use_mask_load_store. Update after variable
4845 (predicate_load_or_store): New function, split out from
4846 predicate_mem_writes.
4847 (check_redundant_cond_expr): New function.
4848 (value_available_p): Likewise.
4849 (predicate_rhs_code): Likewise.
4850 (predicate_mem_writes): Rename to...
4851 (predicate_statements): ...this. Use predicate_load_or_store
4852 and predicate_rhs_code.
4853 (combine_blocks, tree_if_conversion): Update after above name changes.
4854 (ifcvt_local_dce): Handle redundant_ssa_names.
4855 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
4856 general conditional functions.
4857 * tree-vect-stmts.c (vectorizable_call): Likewise.
4859 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4860 Alan Hayward <alan.hayward@arm.com>
4861 David Sherwood <david.sherwood@arm.com>
4863 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
4864 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
4865 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
4866 plus and minus and convert them into IFN_COND_FMA-based sequences.
4867 (convert_mult_to_fma): Handle conditional plus and minus.
4869 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4871 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
4872 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
4873 (cond_fnms_optab): New optabs.
4874 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
4876 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
4877 * internal-fn.h (get_conditional_internal_fn): Declare.
4878 (get_unconditional_internal_fn): Likewise.
4879 * internal-fn.c (cond_ternary_direct): New macro.
4880 (expand_cond_ternary_optab_fn): Likewise.
4881 (direct_cond_ternary_optab_supported_p): Likewise.
4882 (FOR_EACH_COND_FN_PAIR): Likewise.
4883 (get_conditional_internal_fn): New function.
4884 (get_unconditional_internal_fn): Likewise.
4885 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
4886 (gimple_match_op::gimple_match_op): Add a new overload for 5
4888 (gimple_match_op::set_op): Likewise.
4889 (gimple_resimplify5): Declare.
4890 * genmatch.c (decision_tree::gen): Generate simplifications for
4892 * gimple-match-head.c (gimple_simplify): Define an overload for
4893 5 operands. Handle calls with 5 arguments in the top-level overload.
4894 (convert_conditional_op): Handle conversions from unconditional
4895 internal functions to conditional ones.
4896 (gimple_resimplify5): New function.
4897 (build_call_internal): Pass a fifth operand.
4898 (maybe_push_res_to_seq): Likewise.
4899 (try_conditional_simplification): Try converting conditional
4900 internal functions to unconditional internal functions.
4901 Handle 3-operand unconditional forms.
4902 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
4903 Define ternary equivalents of the current rules for binary conditional
4905 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
4907 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
4908 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
4909 (optab): Handle them.
4910 (SVE_COND_FP_TERNARY): New int iterator.
4911 (sve_fmla_op, sve_fmad_op): New int attributes.
4912 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
4913 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
4914 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
4916 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4918 * target.def (preferred_else_value): New target hook.
4919 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
4920 * doc/tm.texi: Regenerate.
4921 * targhooks.h (default_preferred_else_value): Declare.
4922 * targhooks.c (default_preferred_else_value): New function.
4923 * internal-fn.h (conditional_internal_fn_code): Declare.
4924 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
4925 (get_conditional_internal_fn): Use it.
4926 (conditional_internal_fn_code): New function.
4927 * gimple-match.h (gimple_match_cond): New struct.
4928 (gimple_match_op): Add a cond member function.
4929 (gimple_match_op::gimple_match_op): Update all forms to take a
4931 * genmatch.c (expr::gen_transform): Use the same condition as res_op
4932 for the suboperation, but don't specify a particular else_value.
4933 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
4934 (visit_nary_op, visit_reference_op_load): Pass
4935 gimple_match_cond::UNCOND to the gimple_match_op constructor.
4936 * gimple-match-head.c: Include tree-eh.h
4937 (convert_conditional_op): New function.
4938 (maybe_resimplify_conditional_op): Likewise.
4939 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
4940 (gimple_resimplify2): Likewise.
4941 (gimple_resimplify3): Likewise.
4942 (gimple_resimplify4): Likewise.
4943 (maybe_push_res_to_seq): Return null for conditional operations.
4944 (try_conditional_simplification): New function.
4945 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
4947 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
4949 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
4951 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
4953 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
4955 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
4957 (hash_tree): Do not hash DECL_FCONTEXT
4958 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
4959 Do not stream DECL_FCONTEXT.
4960 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
4961 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
4963 2018-07-12 Richard Biener <rguenther@suse.de>
4966 * dwarf2out.c (gen_block_die): Only output blocks when they have
4967 at least one !DECL_IGNORED_P variable.
4969 2018-07-12 Richard Biener <rguenther@suse.de>
4972 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
4973 Remove -mieee-fp handling.
4975 2018-07-12 Richard Biener <rguenther@suse.de>
4977 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
4978 left-over from last patch.
4980 2018-07-12 Jakub Jelinek <jakub@redhat.com>
4982 PR tree-optimization/86492
4983 * gimple-ssa-store-merging.c
4984 (imm_store_chain_info::coalesce_immediate_stores): Call
4985 check_no_overlap even for the merge_overlapping case. Formatting fix.
4987 2018-07-12 Richard Biener <rguenther@suse.de>
4990 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
4991 move possibly trapping operations into the conditional.
4993 2018-07-12 Richard Biener <rguenther@suse.de>
4995 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
4996 (vn_lookup_simplify_result): Remove recursion limit applied
4998 (vn_nary_build_or_lookup_1): Adjust.
4999 (try_to_simplify): Likewise.
5000 * gimple-match-head.c (gimple_resimplify1): Instead apply one
5002 (gimple_resimplify2): Likewise.
5003 (gimple_resimplify3): Likewise.
5004 (gimple_resimplify4): Likewise.
5006 2018-07-11 Jakub Jelinek <jakub@redhat.com>
5008 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
5009 Use __mmask64 type instead of __mmask8 for __M argument.
5010 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
5011 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
5013 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
5014 __mmask16 for __M argument.
5015 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
5016 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
5017 to __mmask16 instead of __mmask8.
5018 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
5019 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
5020 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
5021 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
5022 instead of __mmask16 for __U argument.
5023 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
5024 __mmask16 instead of __mmask8 for __U argument.
5025 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
5027 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
5029 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
5031 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
5033 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
5035 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
5037 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
5039 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
5041 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
5043 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
5045 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
5046 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
5047 return type as well as __M argument type and all casts from __mmask8
5049 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
5050 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
5051 return type as well as __M argument type and all casts from __mmask8
5053 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
5054 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
5055 return type as well as __M argument type and all casts from __mmask8
5057 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
5058 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
5059 return type as well as __M argument type and all casts from __mmask8
5061 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
5062 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
5065 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
5067 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
5068 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
5071 2018-07-11 Paul Koning <ni1d@arrl.net>
5073 * doc/md.texi (define_subst): Document how multiple occurrences of
5074 the same argument in the replacement pattern are handled.
5076 2018-07-11 Paul Koning <ni1d@arrl.net>
5078 * doc/extend.texi (Common Variable Attributes): Move "mode" into
5080 (Common Type Attributes): Add "mode" attribute.
5082 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
5084 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
5085 stream DECL_ORIGINAL_TYPE.
5086 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
5087 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
5088 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
5089 Do not walk original type.
5090 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
5092 (write_ts_decl_non_common_tree_pointers): Do not stream
5094 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
5095 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
5097 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
5099 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
5100 thread twice from the same starting edge.
5102 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
5104 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
5105 * gimple.c (gimple_call_nonnull_result_p): ...here...
5106 (gimple_call_nonnull_arg): ...and here.
5107 * gimple.h (gimple_call_nonnull_result_p): New.
5108 (gimple_call_nonnull_arg): New.
5110 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
5112 * config/arm/arm-cpus.in: Move information from fpu field of each
5113 cpu definition to the isa field.
5114 * config/arm/parsecpu.awk (fpu): Delete match rule.
5115 (gen_comm_data): Don't add bits from the CPU's FPU entry.
5117 2018-07-11 Richard Biener <rguenther@suse.de>
5120 * dwarf2out.c (init_sections_and_labels): Use
5121 output_asm_line_debug_info consistently.
5122 (dwarf2out_early_finish): Likewise.
5123 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
5126 2018-07-11 Richard Biener <rguenther@suse.de>
5128 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
5129 Rework father_bb setting in a way to avoid propagating constants
5130 multiple times on a loop body.
5132 2018-07-10 Mark Wielaard <mark@klomp.org>
5135 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
5137 2018-07-10 Richard Biener <rguenther@suse.de>
5139 * hash-map.h (hash_map::iterator::operator*): Return
5140 references to key and value.
5142 2018-07-10 Jakub Jelinek <jakub@redhat.com>
5145 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
5146 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
5147 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
5148 (gimplify_omp_for): For composite loops, move outer
5149 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
5150 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
5151 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
5152 TREE_LIST for both the original class iterator and the "last" helper
5153 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
5154 loop, remember has_decl_expr from outer composite loops for the
5155 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
5157 2018-07-09 Martin Sebor <msebor@redhat.com>
5161 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
5162 accessing implicitly initialized array elements.
5163 * expr.c (string_constant): Handle string initializers of
5164 character arrays within aggregates.
5165 * gimple-fold.c (fold_array_ctor_reference): Add argument.
5166 Store element offset. As a special case, handle zero size.
5167 (fold_nonarray_ctor_reference): Same.
5168 (fold_ctor_reference): Add argument. Store subobject offset.
5169 * gimple-fold.h (fold_ctor_reference): Add argument.
5171 2018-07-09 Paul Koning <ni1d@arrl.net>
5173 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
5174 (pdp11_insn_cost): New function.
5175 (pdp11_md_asm_adjust): New function.
5176 (TARGET_INVALID_WITHIN_DOLOOP): Define.
5177 (pdp11_rtx_costs): Update to match machine better.
5178 (output_addr_const_pdp11): Correct format mismatch warnings.
5179 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
5180 * config/pdp11/pdp11.md: General change to add base_cost and/or
5181 length attributes for use by new pdp11_insn_cost function.
5182 (MIN_BRANCH): Correct definition.
5184 (doloop_end): Use standard pattern name for looping pattern.
5185 (doloop_end_nocc): New.
5186 (movsf): Add another constraint alternative.
5187 (zero_extendqihi2): Add constraint alternatives for not in place
5189 (zero_extendhisi2): Remove.
5190 (shift patterns): Add CC handling variants.
5194 (define_peephole2): New peephole to recognize mov that sets CC for
5197 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5199 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
5200 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
5203 2018-07-09 Jakub Jelinek <jakub@redhat.com>
5206 * real.c (real_nextafter): Return true if result is denormal.
5208 2018-07-09 Martin Liska <mliska@suse.cz>
5210 * common.opt: Add back wrongly removed attribute.
5212 2018-07-09 Richard Biener <rguenther@suse.de>
5215 * dwarf2out.c (gen_block_die): For an early generated DIE
5216 always output high/low PC attributes.
5218 2018-07-09 Tom de Vries <tdevries@suse.de>
5220 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
5221 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
5222 onto VAR_DECL with abstract origin.
5224 2018-07-07 Jim Wilson <jimw@sifive.com>
5226 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
5228 2018-07-07 Tom de Vries <tdevries@suse.de>
5230 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
5232 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
5234 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
5236 (combine_bound): Use wide-int overflow calculation instead of
5238 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
5240 * fold-const.c (int_const_binop_2): Same.
5241 (extract_muldiv_1): Same.
5242 (fold_div_compare): Same.
5243 (fold_abs_const): Same.
5245 * poly-int.h (add): Same.
5249 * predict.c (predict_iv_comparison): Same.
5250 * profile-count.c (slow_safe_scale_64bit): Same.
5251 * simplify-rtx.c (simplify_const_binary_operation): Same.
5252 * tree-chrec.c (tree_fold_binomial): Same.
5253 * tree-data-ref.c (split_constant_offset_1): Same.
5254 * tree-if-conv.c (idx_within_array_bound): Same.
5255 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
5256 * tree-ssa-phiopt.c (minmax_replacement): Same.
5257 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
5258 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
5259 * vr-values.c (vr_values::adjust_range_with_scev): Same.
5260 * wide-int.cc (wi::add_large): Same.
5261 (wi::mul_internal): Same.
5262 (wi::sub_large): Same.
5263 (wi::divmod_internal): Same.
5264 * wide-int.h: Change overflow type to overflow_type for neg, add,
5265 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
5266 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
5267 mul_internal, divmod_internal.
5268 (overflow_type): New enum.
5269 (accumulate_overflow): New.
5271 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
5273 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
5274 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
5276 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
5278 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
5279 argument is checked for zero before entering loop, avoid checking again.
5281 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
5283 * gimplify.h (generic_expr_could_trap_p): Set as global function.
5284 * gimplify.h (generic_expr_could_trap_p): Likwise.
5285 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
5287 2018-07-06 Jakub Jelinek <jakub@redhat.com>
5289 PR tree-optimization/86401
5290 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
5291 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
5292 (fold_bit_and_mask): ... here. New helper function for match.pd.
5293 * fold-const.h (fold_bit_and_mask): Declare.
5294 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
5296 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
5299 * target.def (translate_mode_attribute): New hook.
5300 * targhooks.h (default_translate_mode_attribute): Declare.
5301 * targhooks.c (default_translate_mode_attribute): New function.
5302 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
5303 * doc/tm.texi: Regenerate.
5304 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
5305 (rs6000_translate_mode_attribute): New function.
5307 2018-07-06 Paul Koning <ni1d@arrl.net>
5309 * doc/md.texi (define_split): Document DONE and FAIL.
5310 (define_peephole2): Ditto.
5312 2018-07-05 Jeff Law <law@redhat.com>
5314 PR tree-optimization/86010
5315 * tree-ssa-dse.c (compute_trims): More aggressively trim at
5316 both the head and tail of mem* and str* calls.
5318 2018-07-05 Jim Wilson <jimw@sifive.com>
5320 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
5322 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
5324 * config/aarch64/aarch64-simd.md: correct flags text for
5325 MIN_EXPR replacement.
5327 2018-07-05 James Clarke <jrtc27@jrtc27.com>
5329 * configure: Regenerated.
5331 2018-07-05 Carl Love <cel@us.ibm.com>
5333 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
5334 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
5335 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
5336 VSX_BUILTIN_DOUBLEL_V4SF.
5338 2018-07-05 Martin Sebor <msebor@redhat.com>
5341 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
5342 than its domain to compute its the upper bound of a char array.
5344 2018-07-05 Nathan Sidwell <nathan@acm.org>
5346 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
5347 * doc/cpp.texi: Update comment.
5348 * doc/tm.texi: Rebuilt.
5349 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
5350 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
5351 * doc/extend.texi (Backwards Compatibility): Clarify it is system
5352 headers affected by extern "C".
5353 * system.h: Poison NO_IMPLICIT_EXTERN_C.
5354 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
5355 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
5356 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
5357 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
5358 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
5359 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
5360 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
5361 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
5362 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
5363 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
5364 config/sparc/sp64-elf.h, config/spu/spu.h,
5365 config/stormy16/stormy16.h, config/v850/v850.h,
5366 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
5367 define NO_IMPLICIT_EXTERN_C.
5368 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
5370 2018-07-05 Tamar Christina <tamar.christina@arm.com>
5373 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
5374 instead of GET_MODE_SIZE when comparing Units.
5376 2018-07-05 Tamar Christina <tamar.christina@arm.com>
5379 * rtlanal.c (set_noop_p): Constrain on mode change,
5380 include hard-reg-set.h
5382 2018-07-05 Tamar Christina <tamar.christina@arm.com>
5384 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
5386 2018-07-05 Jakub Jelinek <jakub@redhat.com>
5389 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
5392 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
5394 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
5396 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
5399 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
5401 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
5403 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
5406 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
5408 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
5410 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
5411 neg_*_op* variables.
5413 2018-07-04 Martin Liska <mliska@suse.cz>
5415 * tree-switch-conversion.c: Define
5416 max_ratio_for_speed and max_ratio_for_size constants.
5418 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
5419 Martin Liska <mliska@suse.cz>
5424 * common.opt: Rename align options with 'str_' prefix.
5425 * common/config/i386/i386-common.c (set_malign_value): New
5427 (ix86_handle_option): Use it to set -falign-* options/
5428 * config/aarch64/aarch64-protos.h (struct tune_params): Change
5429 type from int to string.
5430 * config/aarch64/aarch64.c: Update default values from int
5432 * config/alpha/alpha.c (alpha_override_options_after_change):
5434 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
5435 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5436 max skip conditionally.
5437 * config/i386/freebsd.h (SUBALIGN_LOG): New.
5438 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5439 max skip conditionally.
5440 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5441 max skip conditionally.
5442 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
5443 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5444 max skip conditionally.
5445 * config/i386/i386.c (struct ptt): Change type from int to
5447 (ix86_default_align): Set default values.
5448 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
5449 max skip conditionally.
5450 * config/i386/iamcu.h (SUBALIGN_LOG): New.
5451 (ASM_OUTPUT_MAX_SKIP_ALIGN):
5452 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
5453 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5454 max skip conditionally.
5455 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
5456 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
5457 * config/i386/x86-64.h (SUBALIGN_LOG): New.
5458 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5459 max skip conditionally.
5460 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5461 * config/ia64/ia64.c (ia64_option_override): Set default values
5462 for alignment options.
5463 * config/m68k/m68k.c: Handle new str_align_* options.
5464 * config/mips/mips.c (mips_set_compression_mode): Change
5466 (mips_option_override): Set default values for options.
5467 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
5469 * config/rs6000/rs6000.c (rs6000_option_override_internal):
5471 * config/rx/rx.c (rx_option_override): Likewise.
5472 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
5473 (LABEL_ALIGN): Use align_labels_log.
5474 (LOOP_ALIGN): Use align_loops_align.
5475 * config/s390/s390.c (s390_asm_output_function_label): Use new
5477 * config/sh/sh.c (sh_override_options_after_change):
5478 Change type of constants.
5479 * config/spu/spu.c (spu_sched_init): Likewise.
5480 * config/sparc/sparc.c (sparc_option_override): Set default
5482 * config/visium/visium.c (visium_option_override): Likewise.
5483 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
5484 emit p2align format with last argument if it's not needed.
5485 * doc/invoke.texi: Document extended format of -falign-*.
5486 * final.c: Use align_labels alignment.
5487 * flags.h (struct target_flag_state): Change type to use
5489 (struct align_flags_tuple): New.
5490 (struct align_flags): Likewise.
5491 (align_loops_log): Redefine macro to use new types.
5492 (align_loops_max_skip): Redefine macro to use new types.
5493 (align_jumps_log): Redefine macro to use new types.
5494 (align_jumps_max_skip): Redefine macro to use new types.
5495 (align_labels_log): Redefine macro to use new types.
5496 (align_labels_max_skip): Redefine macro to use new types.
5497 (align_functions_log): Redefine macro to use new types.
5498 (align_loops): Redefine macro to use new types.
5499 (align_jumps): Redefine macro to use new types.
5500 (align_labels): Redefine macro to use new types.
5501 (align_functions): Redefine macro to use new types.
5502 (align_functions_max_skip): Redefine macro to use new types.
5503 (align_loops_value): New macro.
5504 (align_jumps_value): New macro.
5505 (align_labels_value): New macro.
5506 (align_functions_value): New macro.
5507 * function.c (invoke_set_current_function_hook): Propagate
5508 alignment values from flags to global variables default in
5510 * ipa-icf.c (sem_function::equals_wpa): Use
5511 cl_optimization_option_eq instead of memcmp.
5512 * lto-streamer.h (cl_optimization_stream_out): Support streaming
5514 (cl_optimization_stream_in): Likewise.
5515 * optc-save-gen.awk: Support strings in cl_optimization.
5516 * opth-gen.awk: Likewise.
5517 * opts.c (finish_options): Remove error checking of invalid
5519 (MAX_CODE_ALIGN): Remove.
5520 (MAX_CODE_ALIGN_VALUE): Likewise.
5521 (parse_and_check_align_values): New function.
5522 (check_alignment_argument): Likewise.
5523 (common_handle_option): Use check_alignment_argument.
5524 * opts.h (parse_and_check_align_values): Declare.
5525 * toplev.c (init_alignments): Remove.
5526 (read_log_maxskip): New.
5527 (parse_N_M): Likewise.
5528 (parse_alignment_opts): Likewise.
5529 (backend_init_target): Remove usage of init_alignments.
5530 * toplev.h (parse_alignment_opts): Declare.
5531 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
5533 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
5534 * tree.c (cl_option_hasher::equal): New.
5535 * varasm.c: Use new global macros.
5537 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
5539 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
5540 Use a simpler align directive also if MAXSKIP = ALIGN-1.
5541 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5542 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5543 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5544 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5545 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
5546 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
5547 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
5548 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5549 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5550 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5551 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5553 2018-07-04 Martin Liska <mliska@suse.cz>
5554 Jonathan Wakely <jwakely@redhat.com>
5556 * coverage.c: Use correct type.
5557 * doc/invoke.texi: Language correction.
5559 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
5562 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
5563 ENDBRANCH for non-tail call which may return via indirect branch.
5564 * doc/extend.texi: Document indirect_return attribute.
5566 2018-07-03 Martin Sebor <msebor@redhat.com>
5568 PR tree-optimization/86274
5569 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
5571 (format_floating): Correct handling of infinities and NaNs.
5573 2018-07-03 Martin Sebor <msebor@redhat.com>
5575 * print-tree.c (print_real_cst): New function.
5576 (print_node_brief): Call it.
5577 (print_node): Ditto.
5579 2018-07-03 Jeff Law <law@redhat.com>
5581 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
5582 into a single pattern.
5584 * config/h8300/h8300.md (ors code_iterator): New.
5585 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
5586 a single pattern and single splitter.
5587 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
5588 (iorqi3_1, xorqi3_1): Likewise.
5589 (iorqi3, xorqi3 expanders): Similarly.
5591 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
5592 (movmd_internal) into a single pattern using the P mode iterator.
5593 (movmd splitters): Similarly.
5594 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
5595 (movsd splitters): Similarly.
5597 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
5598 ADDB, ADDW and ADDL into a single ADD attribute which selects the
5599 right table based on the size of the operand.
5600 * config/h8300/h8300.md (length_table): Corresponding changes. All
5601 references to "addb", "addw" and "addl" changed to "add".
5602 (btst patterns): Merge two variants into a single pattern.
5603 (tstqi, tsthi): Likewise.
5604 (addhi3_incdec, addsi3_incdec): Likewise.
5605 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
5606 (mulhi3, mulsi3): Likewise.
5607 (udivhi3, udivsi3): Likewise.
5608 (divhi3, divsi3): Likewise.
5609 (andorqi3, andorhi3, andorsi3): Likewise.
5611 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
5614 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
5615 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
5617 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5619 PR tree-optimization/85694
5620 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
5621 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
5623 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
5624 (<u>avg<mode>3_ceil): New patterns.
5626 2018-07-03 David Malcolm <dmalcolm@redhat.com>
5628 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
5629 scan-tree-dump directive.
5630 * gcc.dg/vect/slp-perm-2.c: Likewise.
5631 * gcc.dg/vect/slp-perm-3.c: Likewise.
5632 * gcc.dg/vect/slp-perm-5.c: Likewise.
5633 * gcc.dg/vect/slp-perm-6.c: Likewise.
5634 * gcc.dg/vect/slp-perm-7.c: Likewise.
5635 * gcc.dg/vect/slp-perm-8.c: Likewise.
5637 2018-07-03 Marek Polacek <polacek@redhat.com>
5640 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
5642 2018-07-03 Richard Biener <rguenther@suse.de>
5645 * tree-ssa-structalias.c (find_func_clobbers): Properly
5646 handle indirect calls.
5648 2018-07-03 Jeff Law <law@redhat.com>
5650 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
5651 (shifts): New code iterator.
5652 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
5653 expander. Fix HImode handling on H8/SX.
5654 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
5655 (subqi3, subhi3, subsi3 expanders): Likewise.
5656 (andqi3, andhi3, andsi3 expanders): Likewise.
5657 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
5658 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
5659 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
5660 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
5661 (zero_extendqihi2, zero_extendqisi2): Likewise.
5662 (extendqihi2, extendqisi2): Likewise.
5663 (rotlqi3, rotlhi3, rotlsi3): Likewise.
5664 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
5665 (rotlqi3_1, rotlhi3_1): Likewise.
5666 (logicalhi3_sn, logicalsi3_sn): Likewise.
5667 (logicalhi3, logicalsi3): Likewise.
5669 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5671 * tree-vect-patterns.c (vect_recog_rotate_pattern)
5672 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
5673 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
5674 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
5675 type to append_pattern_def_seq instead of creating a stmt_vec_info
5677 (build_mask_conversion): Likewise. Remove vinfo argument.
5678 (vect_add_conversion_to_patterm): Likewise, renaming to...
5679 (vect_add_conversion_to_pattern): ...this.
5680 (vect_recog_mask_conversion_pattern): Update call to
5681 build_mask_conversion. Pass the vector type to
5682 append_pattern_def_seq here too.
5683 (vect_recog_gather_scatter_pattern): Update call to
5684 vect_add_conversion_to_pattern.
5686 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5688 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
5689 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5690 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
5691 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
5692 STMT_VINFO_PATTERN_DEF_SEQ to null here.
5693 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
5694 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
5695 append_pattern_def_seq instead of new_pattern_def_seq.
5696 (vect_recog_divmod_pattern): Do both of the above.
5697 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
5700 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5702 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
5703 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
5704 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
5705 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
5706 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
5707 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
5708 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
5709 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
5710 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
5711 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
5712 parameter with a single stmt_vec_info.
5713 (vect_recog_func_ptr): Likewise.
5714 (vect_recog_gather_scatter_pattern): Likewise, folding in...
5715 (vect_try_gather_scatter_pattern): ...this.
5716 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
5717 the stmt_vec_info of the statement to be matched. Don't clear
5718 STMT_VINFO_RELATED_STMT.
5719 (vect_pattern_recog): Update call accordingly.
5721 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5723 PR tree-optimization/85694
5724 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
5725 (uavgM3_ceil): Document new optabs.
5726 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
5727 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
5729 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
5730 (savg_ceil_optab): New optabs.
5731 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
5732 (vect_vect_recog_func_ptrs): Add it.
5733 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
5734 constant directly from the associated lhs.
5736 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5738 * tree-vect-patterns.c (vect_split_statement): New function.
5739 (vect_convert_input): Use it to try to split an existing cast.
5741 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5743 * poly-int.h (print_hex): New function.
5744 * dumpfile.h (dump_dec, dump_hex): Declare.
5745 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
5746 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
5747 min_input_precision, operation_precision and operation_sign.
5748 * tree-vect-patterns.c (vect_get_range_info): New function.
5749 (vect_same_loop_or_bb_p, vect_single_imm_use)
5750 (vect_operation_fits_smaller_type): Delete.
5751 (vect_look_through_possible_promotion): Add an optional
5752 single_use_p parameter.
5753 (vect_recog_over_widening_pattern): Rewrite to use new
5754 stmt_vec_info infomration. Handle one operation at a time.
5755 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
5756 (vect_truncatable_operation_p, vect_set_operation_type)
5757 (vect_set_min_input_precision): New functions.
5758 (vect_determine_min_output_precision_1): Likewise.
5759 (vect_determine_min_output_precision): Likewise.
5760 (vect_determine_precisions_from_range): Likewise.
5761 (vect_determine_precisions_from_users): Likewise.
5762 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
5763 (vect_vect_recog_func_ptrs): Put over_widening first.
5765 (vect_pattern_recog): Call vect_determine_precisions.
5767 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5769 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
5770 statements that have been replaced by further pattern statements.
5771 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
5773 2018-07-03 Richard Biener <rguenther@suse.de>
5775 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
5776 always set *dt. Dump vectype in vectype overload.
5777 * dumpfile.h (dump_gimple_expr): New function.
5778 (dump_gimple_expr_loc): Likewise.
5779 * dumpfile.c (dump_gimple_expr): New function.
5780 (dump_gimple_expr_loc): Likewise.
5782 2018-07-02 Jeff Law <law@redhat.com>
5784 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
5785 the H8/300, H8/300H and H8/S variants into a single pattern.
5786 (movhi_h8300, movqi_h8300hs): Similarly.
5787 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
5788 (QHI mode iterator): New.
5790 * config/h8300/h8300.md: Remove trailing whitespace.
5792 2018-07-02 Jim Wilson <jimw@sifive.com>
5794 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
5795 instead of emit_insn for interrupt returns.
5796 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
5797 (riscv_sret, riscv_uret): Likewise.
5799 2018-07-02 David Malcolm <dmalcolm@redhat.com>
5801 * pretty-print.c (selftest::test_pp_format): Move save and restore
5802 of quotes to class auto_fix_quotes, and add an instance.
5803 * selftest.c: Include "intl.h".
5804 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
5805 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
5806 * selftest.h (selftest::auto_fix_quotes): New class.
5808 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
5810 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
5811 (aarch64_sve_prepare_conditional_op): Remove.
5812 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
5813 Allow aarch64_simd_reg_or_zero as select operand; remove
5814 the aarch64_sve_prepare_conditional_op call.
5815 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
5816 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
5817 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
5818 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
5819 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
5820 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
5821 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
5822 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
5823 and a splitters to match all of the *_any patterns.
5824 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
5826 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
5827 (SVE_COND_FP_BINARY_REV): Remove.
5828 (sve_int_op_rev, sve_fp_op_rev): New.
5829 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
5830 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
5831 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
5832 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
5833 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
5834 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
5835 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
5836 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
5837 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
5839 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
5840 Remove match_dup 1 from the inner unspec.
5841 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
5843 * config/aarch64/aarch64.md (movprfx): New attr.
5844 (length): Default movprfx to 8.
5845 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
5846 (*madd<SVE_I>, *msub<SVE_I): Likewise.
5847 (*<su>mul<SVE_I>3_highpart): Likewise.
5848 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
5849 (*v<ASHIFT><SVE_I>3): Likewise.
5850 (*<su><MAXMIN><SVE_I>3): Likewise.
5851 (*<su><MAXMIN><SVE_F>3): Likewise.
5852 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
5853 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
5854 (*div<SVE_F>4): Likewise.
5856 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
5858 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
5861 2018-07-02 Richard Biener <rguenther@suse.de>
5863 PR tree-optimization/86363
5864 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
5865 memset argument refers to a non-variable address.
5867 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
5869 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
5870 {PLUS,MINUS}_EXPR code to...
5871 (adjust_symbolic_bound): ...here,
5872 (combine_bound): ...here,
5873 (set_value_range_with_overflow): ...and here.
5875 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
5877 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
5879 (extract_range_from_abs_expr): ...here.
5881 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
5883 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
5884 -fno-omit-frame-pointer when not optimizing.
5886 2018-07-02 Martin Liska <mliska@suse.cz>
5889 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
5890 (propagate_nothrow): Likewise.
5892 2018-07-02 Martin Liska <mliska@suse.cz>
5895 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
5897 2018-07-02 David Malcolm <dmalcolm@redhat.com>
5899 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
5900 function in r262149, changing "loc" param from source_location to
5901 const dump_location_t &.
5902 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
5903 declaration, as above.
5905 2018-07-01 Paul Koning <ni1d@arrl.net>
5907 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
5908 -munit-asm, -mgnu-asm, -mdec-asm.
5909 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
5910 (pdp11_output_labelref): New.
5911 (pdp11_output_def): New.
5912 (pdp11_output_addr_vec_elt): New.
5913 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
5914 %# and %@ format codes.
5915 (pdp11_option_override): New.
5916 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
5917 (pdp11_output_ident): New.
5918 (pdp11_asm_named_section): New.
5919 (pdp11_asm_init_sections): New.
5920 (pdp11_file_start): New.
5921 (pdp11_file_end): New.
5922 (output_ascii): Use .ascii/.asciz for -mdec-asm.
5923 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
5924 %o, like %c but octal.
5925 (pdp11_option_override): New.
5926 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
5928 (DATA_SECTION_ASM_OP): Ditto.
5929 (READONLY_DATA_SECTION_ASM_OP): New.
5930 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
5931 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
5932 (ASM_OUTPUT_LABELREF): Ditto.
5933 (ASM_OUTPUT_DEF): Ditto.
5934 (ASM_OUTPUT_EXTERNAL): New.
5935 (ASM_OUTPUT_SOURCE_FILENAME): New.
5936 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
5937 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
5938 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
5939 %# and %@ format codes.
5940 * config/pdp11/pdp11.opt (mgnu-asm): New.
5941 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
5942 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
5943 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
5945 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
5947 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
5948 dereferencing path[] beyond its length.
5950 (debug_all_paths): New.
5951 (rewire_first_differing_edge): New.
5952 (adjust_paths_after_duplication): New.
5953 (duplicate_thread_path): Call adjust_paths_after_duplication.
5955 (thread_through_all_blocks): Add new argument to
5956 duplicate_thread_path.
5958 2018-06-30 Jim Wilson <jimw@sifive.com>
5960 * config/riscv/predicates.md (p2m1_shift_operand): New.
5961 (high_mask_shift_operand): New.
5962 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
5963 pattern using p2m1_shift_operand.
5964 (lshsi3_zero_extend_3+2): New combiner pattern using
5965 high_mask_shift_operand.
5967 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5969 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
5971 (vect_recog_rotate_pattern): ...here.
5972 (vect_convert_input): Try to insert casts of invariants in the
5974 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
5975 preheader to be empty.
5977 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5979 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
5980 vector type. If given, install it in the new statement's
5982 (vect_element_precision): New function.
5983 (vect_unpromoted_value): New struct.
5984 (vect_unpromoted_value::vect_unpromoted_value): New function.
5985 (vect_unpromoted_value::set_op): Likewise.
5986 (vect_look_through_possible_promotion): Likewise.
5987 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
5988 (vect_widened_op_tree, vect_convert_input): Likewise.
5989 (vect_convert_inputs, vect_convert_output): Likewise.
5990 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
5991 to handle the optional cast of the multiplication result and
5992 vect_widened_op_tree to detect the widened multiplication itself.
5993 Do not require the input and output of promotion casts to have
5994 the same sign, but base the signedness of the operation on the
5995 input rather than the result. If the pattern includes two
5996 promotions, check that those promotions have the same sign.
5997 Do not restrict the MULT_EXPR handling to a double-width result;
5998 handle quadruple-width results and wider. Use vect_convert_inputs
5999 to convert the inputs to the common type.
6000 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
6001 to handle the optional cast of the ABS result. Also allow a sign
6002 change or a sign extension between the ABS and MINUS.
6003 Use vect_widened_op_tree to detect the widened subtraction and use
6004 vect_convert_inputs to convert the inputs to the common type.
6005 (vect_handle_widen_op_by_const): Delete.
6006 (vect_recog_widen_op_pattern): New function.
6007 (vect_recog_widen_mult_pattern): Use it.
6008 (vect_recog_widen_shift_pattern): Likewise.
6009 (vect_recog_widen_sum_pattern): Use
6010 vect_look_through_possible_promotion to handle the promoted
6013 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6015 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
6016 the containing gimple_seq *.
6017 * gimple-iterator.h (gsi_for_stmt): Declare it.
6018 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
6019 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
6020 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6021 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6022 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
6024 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
6026 (vect_mark_pattern_stmts): ...here. Handle cases in which the
6027 statement being replaced is part of an existing pattern
6028 definition sequence, inserting the new pattern statements before
6030 (vect_pattern_recog_1): Don't return a bool. If the statement
6031 is already part of a pattern, instead apply pattern matching
6032 to the pattern definition statements. Don't clear the
6033 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
6034 (vect_pattern_recog): Don't break after the first match;
6035 continue processing the pattern definition statements instead.
6036 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
6038 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6040 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
6041 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6042 (vect_recog_widen_sum_pattern): Use it.
6044 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6046 * tree-vect-loop.c (vectorizable_reduction): Assert that the
6047 phi is not a pattern statement and has not been replaced by
6048 a pattern statement.
6049 * tree-vect-patterns.c (type_conversion_p): Don't check
6050 STMT_VINFO_IN_PATTERN_P.
6051 (vect_recog_vector_vector_shift_pattern): Likewise.
6052 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
6053 the pattern statement rather than the original statement; check
6054 directly for a WIDEN_MULT_EXPR here.
6055 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
6056 vect_is_simple_use to return the pattern statement rather
6057 than the original statement; use is_pattern_stmt_p to check
6058 for such a pattern statement.
6059 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
6060 to return the pattern statement rather than the original statement;
6061 don't do the same transformation here.
6062 (vect_is_simple_use): If the defining statement has been replaced
6063 by a pattern statement, return the pattern statement instead.
6064 Remove the corresponding (local) transformation from the vectype
6067 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6069 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
6070 end and default to null.
6071 * tree-vect-loop.c (vect_create_epilog_for_reduction)
6072 (vectorizable_reduction): Update calls accordingly, dropping the
6073 gimple ** argument if the passed-back statement isn't needed.
6074 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
6075 (vect_recog_rotate_pattern): Likewise.
6076 (vect_recog_mask_conversion_pattern): Likewise.
6077 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6078 (vect_mask_constant_operand_p): Likewise.
6079 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
6080 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
6081 (get_group_load_store_type, get_load_store_type): Likewise.
6082 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
6083 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
6084 (vectorizable_conversion, vectorizable_assignment): Likewise.
6085 (vectorizable_shift, vectorizable_operation): Likewise.
6086 (vectorizable_store, vect_is_simple_cond): Likewise.
6087 (vectorizable_condition, vectorizable_comparison): Likewise.
6088 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
6089 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
6090 and move it to the end. Cope with null def_stmt_outs.
6092 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
6094 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
6096 2018-06-29 Jeff Law <law@redhat.com>
6098 * config/v850/v850.c (v850_legitimate_address_p): Handle large
6099 displacements for TARGET_V850E2V3 and newer.
6100 (TARGET_LRA_P): Remove. Defaults to LRA now.
6101 * config/v850/v850.md (sign23byte_load): Remove.
6102 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
6103 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
6105 2018-06-29 Martin Liska <mliska@suse.cz>
6108 * coverage.c (coverage_init): Mangle full path name.
6109 * doc/invoke.texi: Document the change.
6110 * gcov-io.c (mangle_path): New.
6111 * gcov-io.h (mangle_path): Likewise.
6112 * gcov.c (mangle_name): Use mangle_path for path mangling.
6114 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6116 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
6117 if starting source register is not even.
6119 2018-06-29 Martin Liska <mliska@suse.cz>
6121 PR tree-optimization/86263
6122 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
6123 Make edge redirection.
6125 2018-06-29 David Malcolm <dmalcolm@redhat.com>
6127 * dumpfile.c (dump_loc): Add indentation based on scope depth.
6128 (dump_scope_depth): New variable.
6129 (get_dump_scope_depth): New function.
6130 (dump_begin_scope): New function.
6131 (dump_end_scope): New function.
6132 * dumpfile.h (get_dump_scope_depth): New declaration.
6133 (dump_begin_scope): New declaration.
6134 (dump_end_scope): New declaration.
6135 (class auto_dump_scope): New class.
6136 (AUTO_DUMP_SCOPE): New macro.
6137 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
6140 2018-06-29 Richard Biener <rguenther@suse.de>
6142 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
6143 compute_all_dependences succeeds.
6144 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
6145 exceed --param loop-max-datarefs-for-datadeps.
6147 2018-06-29 Jakub Jelinek <jakub@redhat.com>
6149 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
6151 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
6154 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
6155 alternative 0 in preferred_for_speed attribute.
6157 2018-06-28 Paul Koning <ni1d@arrl.net>
6159 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
6160 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
6161 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
6162 * config/pdp11/pdp11.md: Correct "length" attribute calculation
6163 for shift insn patterns.
6165 2018-06-28 David Malcolm <dmalcolm@redhat.com>
6167 * cgraph.c (cgraph_node::get_body): Replace assignments to
6168 "dump_file" with calls to set_dump_file.
6169 * dumpfile.c (alt_dump_file): Make static, and group with...
6170 (alt_flags): ...this definition.
6171 (dumps_are_enabled): New variable.
6172 (refresh_dumps_are_enabled): New function.
6173 (set_dump_file): New function.
6174 (set_alt_dump_file): New function.
6175 (gcc::dump_manager::dump_start): Replace assignments to
6176 "dump_file" and "alt_dump_file" with calls to set_dump_file and
6178 (gcc::dump_manager::dump_finish): Likewise.
6179 * dumpfile.h (alt_dump_file): Delete decl.
6180 (dumps_are_enabled): New variable decl.
6181 (set_dump_file): New function decl.
6182 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
6184 * tree-nested.c (lower_nested_functions): Replace assignments to
6185 "dump_file" with calls to set_dump_file.
6187 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
6189 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
6190 goto_locus of each outgoing edge of each basic block.
6192 2018-06-28 Richard Biener <rguenther@suse.de>
6194 * dwarf2out.c (decl_scope_table): Remove.
6195 (push_decl_scope): Likewise.
6196 (pop_decl_scope): Likewise.
6197 (gen_type_die_for_member): Do not call push/pop_decl_scope.
6198 (gen_struct_or_union_type_die): Likewise.
6199 (gen_tagged_type_die): Likewise.
6200 (dwarf2out_init): Do not initialize decl_scope_table.
6201 (dwarf2out_c_finalize): Do not free it.
6203 2018-06-28 Richard Biener <rguenther@suse.de>
6205 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
6206 deciding whether to not re-use a DIE.
6208 2018-06-28 Richard Biener <rguenther@suse.de>
6210 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
6211 DW_AT_abstract_origin attribute.
6213 2018-06-28 Martin Liska <mliska@suse.cz>
6215 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
6216 Use newly introduced constants.
6217 * tree-switch-conversion.h (struct jump_table_cluster):
6218 Define max_ratio_for_size and max_ratio_for_speed.
6220 2018-06-28 Martin Liska <mliska@suse.cz>
6222 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6223 Add new checking assert to catch invalid state.
6224 (jump_table_cluster::can_be_handled): Handle single case
6226 (jump_table_cluster::is_beneficial): Bail out for such case.
6227 (bit_test_cluster::find_bit_tests):
6228 Add new checking assert to catch invalid state.
6229 (bit_test_cluster::can_be_handled): Handle single case
6231 (bit_test_cluster::is_beneficial): Bail out for such case.
6232 (switch_decision_tree::analyze_switch_statement):
6235 2018-06-28 Martin Liska <mliska@suse.cz>
6237 * common.opt: Introduce -completion option.
6238 * gcc.c (driver_handle_option): Handle it.
6239 (driver::main): Print completions if completion
6241 * opt-suggestions.c (option_proposer::get_completions):
6243 (option_proposer::suggest_completion): Likewise.
6244 (option_proposer::find_param_completions): Likewise.
6245 (verify_autocompletions): Likewise.
6246 (test_completion_valid_options): Likewise.
6247 (test_completion_valid_params): Likewise.
6248 (in_completion_p): Likewise.
6249 (empty_completion_p): Likewise.
6250 (test_completion_partial_match): Likewise.
6251 (test_completion_garbage): Likewise.
6252 (opt_proposer_c_tests): Likewise.
6253 * opt-suggestions.h: Declare new functions.
6254 * opts.c (common_handle_option): Handle OPT__completion_.
6255 * selftest-run-tests.c (selftest::run_tests): Add
6256 opt_proposer_c_tests.
6257 * selftest.c (assert_str_startswith): New.
6258 * selftest.h (assert_str_startswith): Likewise.
6259 (opt_proposer_c_tests): New.
6260 (ASSERT_STR_STARTSWITH): Likewise.
6262 2018-06-28 Martin Liska <mliska@suse.cz>
6264 * Makefile.in: Add opt-suggestions.o.
6265 * gcc-main.c: Include opt-suggestions.h.
6266 * gcc.c (driver::driver): Likewise.
6267 (driver::~driver): Remove m_option_suggestions.
6268 (driver::build_option_suggestions): Moved to option_proposer.
6269 (driver::suggest_option): Likewise.
6270 (driver::handle_unrecognized_options): Use option_proposer.
6271 * gcc.h (class driver): Add new memver m_option_proposer.
6272 * opt-suggestions.c: New file.
6273 * opt-suggestions.h: New file.
6275 2018-06-28 Martin Liska <mliska@suse.cz>
6277 * vec.h (class auto_string_vec): New (moved from auto_argvec).
6278 (auto_string_vec::~auto_string_vec): Likewise.
6280 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
6282 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
6283 prevent_decl_creation_for_types fields up and add reset_location field.
6284 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
6285 statement if id->reset_location is true.
6286 (copy_edges_for_bb): Do not set goto_locus on the new edges if
6287 id->reset_location is true.
6288 (copy_phis_for_bb): Force input_location on the arguments if
6289 id->reset_location is true.
6290 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
6291 is set on the function to be inlined.
6293 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
6295 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
6297 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
6299 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
6300 registers for Pmode.
6301 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
6302 hard registers for the clobbered pseudo.
6304 2018-06-27 Paul Koning <ni1d@arrl.net>
6306 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6307 mutually exclusive options.
6308 * config/pdp11/constraints.md (h): New constraint.
6309 (O): Update definition to match shift code generation.
6310 (D): New constraint.
6311 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
6313 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
6315 (output_jump): Change arguments.
6316 (pdp11_fixed_cc_regs): New function.
6317 (pdp11_cc_mode): Ditto.
6318 (pdp11_expand_shift): Ditto.
6319 (pdp11_assemble_shift): Ditto.
6320 (pdp11_small_shift): Ditto.
6321 (pdp11_branch_cost): Remove.
6322 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
6324 (pdp11_register_move_cost): Update for CC registers.
6325 (pdp11_rtx_costs): Add case for LSHIFTRT.
6326 (pdp11_output_jump): Add CCNZ mode conditional branches.
6327 (notice_update_cc_on_set): Remove.
6328 (pdp11_cc_mode): New function.
6329 (simple_memory_operand): Correct pre/post decrement case.
6330 (no_side_effect_operand): New function.
6331 (pdp11_regno_reg_class): Add CC_REGS class.
6332 (pdp11_fixed_cc_regs): New function.
6333 (pdp11_small_shift): New function.
6334 (pdp11_expand_shift): New function to expand shift insns.
6335 (pdp11_assemble_shift): New function to output shifts.
6336 (pdp11_branch_cost): Remove.
6337 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
6338 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
6339 (WCHAR_TYPE): Ditto.
6340 (PTRDIFF_TYPE): Ditto.
6341 (ADJUST_INSN_LENGTH): New macro.
6342 (FIXED_REGISTERS): Add CC registers.
6343 (CALL_USED_REGISTERS): Ditto.
6345 (REG_CLASS_NAMES): Ditto.
6346 (REG_CLASS_CONTENTS): Ditto.
6347 (SELECT_CC_MODE): Use new function.
6348 (TARGET_FLAGS_REGNUM): New macro.
6349 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
6350 (cc0_reg_rtx): Remove.
6351 (CC_STATUS_MDEP): Remove.
6352 (CC_STATUS_MDEFP_INIT): Remove.
6353 (CC_IN_FPU): Remove.
6354 (NOTICE_UPDATE_CC): Remove.
6355 (REGISTER_NAMES): Add CC registers.
6356 (BRANCH_COST): Change to constant 1.
6357 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
6359 * config/pdp11/pdp11.opt (mbcopy): Remove.
6360 (mbcopy-builtin): Remove.
6361 (mbranch-cheap): Remove.
6362 (mbranch-expensive): Remove.
6363 * config/pdp11/predicates.md (expand_shift_operand): Update to
6364 match shift code generation.
6365 (ccnz_operator): New predicate.
6366 * doc/invoke.texi (PDP-11 Options): Remove deleted options
6367 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
6368 Remove non-existent option -mabshi, -mno-abshi. Document mutually
6370 * doc/md.texi (PDP-11): Document new D and h constraints. Update
6371 description of O constraint.
6373 2018-06-27 Jeff Law <law@redhat.com>
6374 Austin Law <austinklaw@gmail.com>
6376 * config/v850/v850.md (addsi3_set_flags): New pattern.
6377 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
6378 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
6379 (zero_extendhisi2_v850_set_flags): Likewise.
6380 (zero_extendqisi2_v850_set_flags): Likewise.
6381 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
6382 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
6383 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
6385 * config/v850/v850-protos.h (notice_update_cc): Remove.
6386 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
6387 (v850_print_operand): Handle 'D' and "d".
6388 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
6389 Add handling of arithmetic/logical operations compared against zero.
6390 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
6391 Do not look at v850_compare_op, instead get mode from last argument.
6392 (v850_gen_compare): Remove
6393 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
6394 after reload for prologue insns.
6395 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
6397 (construct_save_jarl): Likewise.
6398 (TARGET_FLAGS_REGNUM): Define.
6399 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
6400 (NOTICE_UPDATE_CC): Remove.
6401 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
6402 than cc0. Conditionalize on reload_completed.
6403 (cmpsi_insn, setfcc_insn): Likewise.
6404 (tst1 splitter): Turn into define_and_split which sets the flags
6406 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
6407 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
6408 (cstoresf4, cstoredf4): Clobber the flags.
6409 (cmpsi, cmpsf, cmpdf): Remove expanders.
6410 (setf_insn): Remove pattern.
6411 (addsi3): Turn into define_and_split which clobbers the flags after
6412 reload and a suitable pattern (addsi3_clobber_flags) for use after
6414 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
6415 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
6416 (ashrsi3, ashrsi3_v850e2): Likewise.
6417 (bins): Clobber the flags.
6418 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
6419 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
6420 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
6421 (call_value_internal_short, call_value_internal_long): Likewise.
6422 (callt_save_interrupt, callt_return_interrupt): Likewise.
6423 (save_interrupt, return_interrupt): Likewise.
6424 (callt_save_all_interrupt, save_all_interrupt): Likewise.
6425 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
6426 (restore_all_interrupt, _restore_all_interrupt): Likewise.
6427 (All FP comparisons): Only allow after reload has completed.
6429 (divh, divhu): Tweak output template.
6430 (branch_z_normal, branch_z_invert): Remove
6431 (branch_nz_normal, branch_nz_invert): Likewise.
6432 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
6434 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
6435 * config/v850/v850.c (notice_update_cc): Remove.
6436 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
6437 (CC_NO_CARRY): Likewise.
6438 (NOTICE_UPDATE_CC): Define to nothing.
6439 * config/v850/v850.md: Remove block comment on cc0 handling
6440 Remove "cc" attribute from all patterns. Remove cc_status handling
6441 from all patterns. Minor formatting fixes.
6443 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6445 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
6446 (cortex-a76.cortex-a55): Likewise.
6447 * config/aarch64/aarch64-tune.md: Regenerate.
6448 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
6449 cortex-a76.cortex-a55.
6451 2018-06-27 Jeff Law <law@redhat.com>
6453 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
6454 (MULTILIB_DIRNAMES): Similarly.
6456 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
6458 * gimple.h (gimple_return_retbnd): Delete.
6459 (gimple_return_set_retbnd): Likewise.
6460 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
6461 gimple_return_set_retbnd.
6462 * gimple-pretty-print.c (dump_gimple_return): Remove call to
6463 gimple_return_retbnd and adjust.
6464 * tree-inline.h (struct copy_body_data): Remove retbnd field.
6465 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
6466 Explicitly return NULL in a couple more cases. Move assertion
6467 on debug statements and remove unreachable code.
6468 (reset_debug_binding): Do not test id->retbnd.
6469 (expand_call_inline): Do not set it.
6471 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6473 * configure.ac: Add --disable-gcov option.
6474 * configure: Regenerate.
6475 * Makefile.in: Honour @enable_gcov@.
6476 * doc/install.texi: Document --disable-gcov.
6478 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6480 * config/arm/arm-cpus.in (cortex-a76): New entry.
6481 (cortex-a76.cortex-a55): Likewise.
6482 * config/arm/arm-tables.opt: Regenerate.
6483 * config/arm/arm-tune.md: Likewise.
6484 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
6485 * doc/invoke.texi (ARM Options): Document cortex-a76 and
6486 cortex-a76.cortex-a55.
6488 2018-06-27 Tamar Christina <tamar.christina@arm.com>
6491 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
6493 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
6495 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
6497 (EPILOGUE_USES): Likewise.
6499 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
6501 * tree-inline.c (remap_location): New function extracted from...
6502 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
6503 (copy_phis_for_bb): ...here. Call remap_location.
6504 (copy_cfg_body): Adjust call to copy_edges_for_bb.
6506 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
6508 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
6509 unaligned vsx for 16B memset.
6511 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
6514 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
6515 ieee128_float_type_node to long_double_type_node unless
6516 TARGET_LONG_DOUBLE_128 is set.
6518 2018-06-26 David Malcolm <dmalcolm@redhat.com>
6520 * cfgloop.c (get_loop_location): Convert return type from
6521 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
6522 by implicit construction from rtx_insn *, and using
6523 dump_user_location_t::from_function_decl for the fallback case.
6524 * cfgloop.h (get_loop_location): Convert return type from
6525 location_t to dump_user_location_t.
6526 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
6527 dump_printf_loc to pass in a dump_location_t rather than a
6528 location_t, via the gimple stmt.
6529 * coverage.c (get_coverage_counts): Update calls to
6530 dump_printf_loc to pass in dump_location_t rather than a
6532 * doc/optinfo.texi (Dump types): Convert example of
6533 dump_printf_loc from taking "locus" to taking "insn". Update
6534 description of the "_loc" calls to cover dump_location_t.
6535 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
6537 (dump_user_location_t::dump_user_location_t): New constructors,
6538 from gimple *stmt and rtx_insn *.
6539 (dump_user_location_t::from_function_decl): New function.
6540 (dump_loc): Make static.
6541 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
6542 const dump_location_t &.
6543 (dump_generic_expr_loc): Delete.
6544 (dump_printf_loc): Convert param "loc" from location_t to
6545 const dump_location_t &.
6546 (selftest::test_impl_location): New function.
6547 (selftest::dumpfile_c_tests): New function.
6548 * dumpfile.h: Include "profile-count.h".
6549 (class dump_user_location_t): New class.
6550 (struct dump_impl_location_t): New struct.
6551 (class dump_location_t): New class.
6552 (dump_printf_loc): Convert 2nd param from source_location to
6553 const dump_location_t &.
6554 (dump_generic_expr_loc): Delete.
6555 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
6556 const dump_location_t &.
6557 * gimple-fold.c (fold_gimple_assign): Update call to
6558 dump_printf_loc to pass in a dump_location_t rather than a
6559 location_t, via the gimple stmt.
6560 (gimple_fold_call): Likewise.
6561 * gimple-loop-interchange.cc
6562 (loop_cand::analyze_iloop_reduction_var): Update for change to
6563 check_reduction_path.
6564 (tree_loop_interchange::interchange): Update for change to
6566 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
6567 change in return-type of find_loop_location.
6568 (graphite_regenerate_ast_isl): Likewise.
6569 * graphite-optimize-isl.c (optimize_isl): Likewise.
6570 * graphite.c (graphite_transform_loops): Likewise.
6571 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
6572 pass in a dump_location_t rather than a location_t, via the
6574 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6575 * ipa.c (walk_polymorphic_call_targets): Likewise.
6576 * loop-unroll.c (report_unroll): Convert "locus" param from
6577 location_t to dump_location_t.
6578 (decide_unrolling): Update for change to get_loop_location's
6580 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
6581 location_t to dump_user_location_t.
6582 (grid_find_single_omp_among_assignments_1): Updates calls to
6583 dump_printf_loc to pass in a dump_location_t rather than a
6584 location_t, via the gimple stmt.
6585 (grid_parallel_clauses_gridifiable): Convert "tloc" from
6586 location_t to dump_location_t. Updates calls to dump_printf_loc
6587 to pass in a dump_location_t rather than a location_t, via the
6589 (grid_inner_loop_gridifiable_p): Likewise.
6590 (grid_dist_follows_simple_pattern): Likewise.
6591 (grid_gfor_follows_tiling_pattern): Likewise.
6592 (grid_target_follows_gridifiable_pattern): Likewise.
6593 (grid_attempt_target_gridification): Convert initialization
6594 of local "grid" from memset to zero-initialization; FIXME: does
6595 this require C++11? Update call to dump_printf_loc to pass in a
6596 optinfo_location rather than a location_t, via the gimple stmt.
6597 * profile.c (read_profile_edge_counts): Updates call to
6598 dump_printf_loc to pass in a dump_location_t rather than a
6600 (compute_branch_probabilities): Likewise.
6601 * selftest-run-tests.c (selftest::run_tests): Call
6603 * selftest.h (dumpfile_c_tests): New decl.
6604 * tree-loop-distribution.c (pass_loop_distribution::execute):
6605 Update for change in return type of find_loop_location.
6606 * tree-parloops.c (parallelize_loops): Likewise.
6607 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
6608 "locus" from location_t to dump_user_location_t.
6609 (canonicalize_loop_induction_variables): Likewise.
6610 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
6611 for change in return type of find_loop_location.
6612 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
6613 to dump_printf_loc to pass in a dump_location_t rather than a
6614 location_t, via the stmt.
6615 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
6617 * tree-vect-loop-manip.c (find_loop_location): Convert return
6618 type from source_location to dump_user_location_t.
6619 (vect_do_peeling): Update for above change.
6620 (vect_loop_versioning): Update for change in type of
6622 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
6623 from location_t to dump_user_location_t.
6624 (vect_estimate_min_profitable_iters): Update for change in type
6626 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
6627 location_t to dump_location_t.
6628 (vect_slp_bb): Update for change in type of vect_location.
6629 * tree-vectorizer.c (vect_location): Convert from source_location
6630 to dump_user_location_t.
6631 (try_vectorize_loop_1): Update for change in vect_location's type.
6632 (vectorize_loops): Likewise.
6633 (increase_alignment): Likewise.
6634 * tree-vectorizer.h (vect_location): Convert from source_location
6635 to dump_user_location_t.
6636 (find_loop_location): Convert return type from source_location to
6637 dump_user_location_t.
6638 (check_reduction_path): Convert 1st param from location_t to
6639 dump_user_location_t.
6640 * value-prof.c (check_counter): Update call to dump_printf_loc to
6641 pass in a dump_user_location_t rather than a location_t; update
6642 call to error_at for change in type of "locus".
6643 (check_ic_target): Update call to dump_printf_loc to
6644 pass in a dump_user_location_t rather than a location_t, via the
6647 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
6649 * config/s390/s390.h (enum processor_flags): Do not use
6650 default tune parameter when -march was specified.
6652 2018-06-26 Jakub Jelinek <jakub@redhat.com>
6655 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
6656 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
6659 2018-06-26 Richard Biener <rguenther@suse.de>
6661 PR tree-optimization/86287
6663 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
6664 (vect_analyze_loop): Initialize n_stmts.
6666 2018-06-26 Richard Biener <rguenther@suse.de>
6669 * fold-const.c (fold_convertible_p): Pointer extension
6672 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
6675 * dwarf2out.c (loc_list_has_views): Adjust comments.
6676 (dw_loc_list): Split single cross-partition range with
6679 2018-06-25 Jeff Law <law@redhat.com>
6681 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
6682 on -mbig-switch by default.
6684 * config/v850/predicates.md (const_float_1_operand): Fix match_code
6686 (const_float_0_operand): Remove unused predicate.
6687 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
6688 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
6689 (recipsf2): New expander. Original pattern now called
6691 (recipdf2, recipdf2_insn): Similarly.
6692 (rsqrtsf2, rsqrtsf2_insn): Similarly
6693 (rsqrtdf2, rsqrtdf2_insn): Similarly
6695 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
6697 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
6698 Simplify logic for FreeBSD (twice).
6700 2018-06-25 Martin Sebor <msebor@redhat.com>
6702 PR tree-optimization/86204
6703 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
6704 a strnlen result if it's less than the length of the string.
6706 2018-06-25 Martin Sebor <msebor@redhat.com>
6708 PR tree-optimization/85700
6709 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
6710 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
6711 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
6713 2018-06-25 Martin Sebor <msebor@redhat.com>
6715 * doc/extend.texi (Zero-length arrays): Update and clarify.
6717 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
6719 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
6720 added IEEE/IBM long double multilib support on PowerPC little
6721 endian Linux systems.
6722 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
6723 (MULTILIB_DEFAULTS): Likewise.
6724 * config/rs6000/rs6000.c (rs6000_option_override_internal):
6726 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
6727 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
6728 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
6730 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
6733 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
6734 (REORDER_45): Likewise.
6736 2018-06-25 Jeff Law <law@redhat.com>
6738 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
6739 dividend to 32 bits. Adjust length.
6740 (udivmodhi4): Cleanup output template. Fix length.
6742 2018-06-25 Carl Love <cel@us.ibm.com>
6744 * config/rs6000/vsx.md: Change word selector to prefered location.
6746 2018-06-25 Richard Biener <rguenther@suse.de>
6748 PR tree-optimization/86304
6749 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
6750 epilogue-if-converted loops as well.
6752 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
6754 * lto-section-out.c (lto_begin_section): Do not print section
6755 name for noaddr and unnumbered dumps.
6757 2018-06-25 Richard Biener <rguenther@suse.de>
6759 * tree-vectorizer.h (struct vec_info_shared): New structure
6760 with parts split out from struct vec_info and loop_nest from
6761 struct _loop_vec_info.
6762 (struct vec_info): Adjust accordingly.
6763 (struct _loop_vec_info): Likewise.
6764 (LOOP_VINFO_LOOP_NEST): Adjust.
6765 (LOOP_VINFO_DATAREFS): Likewise.
6766 (LOOP_VINFO_DDRS): Likewise.
6767 (struct _bb_vec_info): Likewise.
6768 (BB_VINFO_DATAREFS): Likewise.
6769 (BB_VINFO_DDRS): Likewise.
6770 (struct _stmt_vec_info): Add dr_aux member.
6771 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
6772 (DR_MISALIGNMENT_UNINITIALIZED): New.
6773 (set_dr_misalignment): Adjust.
6774 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
6775 (vect_analyze_loop): Adjust prototype.
6776 (vect_analyze_loop_form): Likewise.
6777 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
6778 Compute dependences lazily.
6779 (vect_record_base_alignments): Use shared datarefs/ddrs.
6780 (vect_verify_datarefs_alignment): Likewise.
6781 (vect_analyze_data_refs_alignment): Likewise.
6782 (vect_analyze_data_ref_accesses): Likewise.
6783 (vect_analyze_data_refs): Likewise.
6784 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
6785 constructor parameter for shared part.
6786 (vect_analyze_loop_form): Pass in shared part and adjust.
6787 (vect_analyze_loop_2): Pass in storage for the number of
6788 stmts. Move loop nest finding to the caller. Compute
6790 (vect_analyze_loop): Pass in shared part.
6791 (vect_transform_loop): Verify shared datarefs are unchanged.
6792 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
6793 constructor parameter for shared part.
6794 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
6795 (vect_slp_bb): Verify shared datarefs are unchanged before
6797 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
6799 (new_stmt_vec_info): Initialize DR_AUX misalignment to
6800 DR_MISALIGNMENT_UNINITIALIZED.
6801 * tree-vectorizer.c (vec_info::vec_info): Add constructor
6802 parameter for shared part.
6803 (vec_info::~vec_info): Adjust.
6804 (vec_info_shared::vec_info_shared): New.
6805 (vec_info_shared::~vec_info_shared): Likewise.
6806 (vec_info_shared::save_datarefs): Likewise.
6807 (vec_info_shared::check_datarefs): Likewise.
6808 (try_vectorize_loop_1): Construct shared part live for analyses
6809 of a single loop for multiple vector sizes.
6810 * tree-parloops.c (gather_scalar_reductions): Adjust.
6812 2018-06-25 Richard Biener <rguenther@suse.de>
6814 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
6815 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
6816 (vect_analyze_data_refs): Remove similar code from here and
6817 simplify accordingly.
6819 2018-06-25 Richard Biener <rguenther@suse.de>
6821 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
6822 for reverse storage order accesses rather than asserting
6823 they cannot happen here.
6825 2018-06-25 Tom de Vries <tdevries@suse.de>
6828 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
6829 Use data16 instead of .byte for insn prefix.
6831 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
6834 * parser.c (make_char_string_pack): Pass this literal chars
6835 through cpp_interpret_string.
6836 (cp_parser_userdef_numeric_literal): Check the result of
6837 make_char_string_pack.
6839 2018-06-24 Maya Rashish <coypu@sdf.org>
6841 * ginclude/stddef.h: Simplify conditions around avoiding
6842 re-definition of __size_t.
6844 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
6846 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
6847 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
6849 2018-06-22 Maya Rashish <coypu@sdf.org>
6851 * doc/invoke.texi (mno-fancy-math-387): Update for changes
6852 made to OpenBSD and NetBSD through the years.
6854 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
6856 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
6857 behavior of vec_pack (vector double, vector double) to match
6858 behavior of vec_float2 (vector double, vector double).
6860 2018-06-22 Olivier Hainque <hainque@adacore.com>
6862 * gimplify.c (gimplify_function_tree): Prevent creation
6863 of a trampoline for the address of the current function
6864 passed to entry/exit instrumentation hooks.
6866 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
6869 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
6872 2018-06-22 Martin Liska <mliska@suse.cz>
6874 PR tree-optimization/86263
6875 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6876 Bail out if is_enabled is false.
6877 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
6879 (jump_table_cluster::is_enabled): New function.
6881 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
6883 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
6884 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
6885 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
6886 (lto_input_ts_binfo_tree_pointers): Likewise.
6887 * tree-streamer-out.c (streamer_write_tree_bitfields,
6888 write_ts_binfo_tree_pointers): Likewise.
6889 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
6891 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
6893 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
6895 2018-06-22 Martin Liska <mliska@suse.cz>
6897 * symbol-summary.h (get): Make it pure and inline move
6898 functionality from ::get function.
6899 (get): Remove and inline into ::get and ::get_create.
6900 (get_create): Move code from ::get function.
6902 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6905 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
6906 -x assembler-with-cpp.
6908 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6910 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
6911 _FILE_OFFSET_BITS=64 for C++.
6913 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
6915 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
6916 conversion insn that shows up when pr85657-3.c is compiled using
6917 IEEE 128-bit long double.
6918 (neg<mode>2_internal): Use the correct mode to check whether the
6919 mode is IBM extended.
6920 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
6921 multiply and divide external functions from being created more
6924 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6926 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
6928 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
6929 the edge can be forwarded.
6930 (cfg_layout_merge_blocks): Likewise.
6932 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6934 * except.c (finish_eh_generation): Commit edge insertions only after
6935 the EH edges have been redirected from post-landing to landing pads.
6937 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6939 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
6940 create_tmp_var_for to create the FRAME decl.
6941 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
6943 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6945 * tree-inline.c (copy_edges_for_bb): Minor tweak.
6946 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
6947 debug statement when resetting its value.
6948 (expand_call_inline): Copy the locus of the call onto the assignment
6949 of the return value, if any. Use local variable in more cases.
6951 2018-06-21 Martin Liska <mliska@suse.cz>
6953 * ipa-pure-const.c (propagate_nothrow): Use
6954 funct_state_summaries->get.
6955 (dump_malloc_lattice): Likewise.
6956 (propagate_malloc): Likewise.
6958 2018-06-21 Richard Biener <rguenther@suse.de>
6960 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
6961 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
6962 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
6964 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
6965 BLOCK_ABSTRACT_ORIGIN unconditionally.
6967 2018-06-21 David Malcolm <dmalcolm@redhat.com>
6969 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
6971 * ipa-reference.c (ipa_reference_c_finalize): Delete
6972 ipa_ref_opt_sum_summaries and set it to NULL.
6974 2018-06-21 Tom de Vries <tdevries@suse.de>
6976 PR tree-optimization/85859
6977 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
6978 test with comment from bb_no_side_effects_p.
6980 2018-06-21 Richard Biener <rguenther@suse.de>
6982 PR tree-optimization/86232
6983 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
6984 max for constant niter.
6986 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
6988 * config/aarch64/aarch64-simd.md
6989 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
6991 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
6993 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
6994 Make opernads of the unspec commutative.
6996 2018-06-21 Richard Biener <rguenther@suse.de>
6998 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
6999 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
7000 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
7001 (vect_analyze_data_ref_dependence): Re-order checks to deal with
7003 (vect_record_base_alignments): Do not record base alignment
7004 for gathers or scatters.
7005 (vect_compute_data_ref_alignment): Drop return value that is always
7006 true. Bail out early for gathers or scatters.
7007 (vect_enhance_data_refs_alignment): Bail out early for gathers
7009 (vect_find_same_alignment_drs): Likewise.
7010 (vect_analyze_data_refs_alignment): Remove dead code.
7011 (vect_slp_analyze_and_verify_node_alignment): Likewise.
7012 (vect_analyze_data_refs): For possible gathers or scatters do
7013 not create an alternate DR, just check their possible validity
7014 and mark them. Adjust DECL_NONALIASED handling to not rely
7016 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
7017 update inits of gathers or scatters.
7018 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
7019 Also copy gather/scatter flag to pattern vinfo.
7021 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
7023 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7024 behavior of vec_packsu (vector unsigned long long, vector unsigned
7025 long long) to match behavior of vec_packs with same signature.
7027 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
7028 Thomas Schwinge <thomas@codesourcery.com>
7029 Cesar Philippidis <cesar@codesourcery.com>
7031 * gimplify.c (gimplify_scan_omp_clauses): Add support for
7032 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7033 (gimplify_adjust_omp_clauses): Likewise.
7034 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
7035 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
7036 (gimplify_omp_target_update): Update handling of acc update and
7038 * omp-low.c (install_var_field): Remove unused parameter
7039 base_pointers_restrict.
7040 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
7041 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
7043 (omp_target_base_pointers_restrict_p): Delete.
7044 (scan_omp_target): Update call to scan_sharing_clauses.
7045 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
7047 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
7048 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7049 (convert_local_omp_clauses): Likewise.
7050 * tree-pretty-print.c (dump_omp_clause): Likewise.
7051 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
7053 (omp_clause_code_name): Likewise.
7055 2018-06-20 Jakub Jelinek <jakub@redhat.com>
7058 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
7061 PR tree-optimization/86231
7062 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
7063 anti-range don't overwrite *vr0min before using it to compute *vr0max.
7065 2018-06-20 Tom de Vries <tdevries@suse.de>
7067 PR tree-optimization/86097
7068 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
7069 iv type if signedness of iv type is not the same as that of *nit.
7071 2018-06-20 Jakub Jelinek <jakub@redhat.com>
7073 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
7074 EDGE_EH edges, verify they are all EDGE_EH.
7076 2018-06-20 Maya Rashish <coypu@sdf.org>
7078 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
7080 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7082 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
7083 * config/aarch64/aarch64.c (xgene1_tunings): Add
7084 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
7085 (aarch64_mode_valid_for_sched_fusion_p):
7086 Allow 16-byte modes.
7087 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
7088 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
7090 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
7092 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
7093 * config/aarch64/iterators.md (VQ2): New mode iterator.
7095 2018-06-20 Martin Liska <mliska@suse.cz>
7097 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7098 Change default ratio from 10 to 8.
7100 2018-06-20 Martin Liska <mliska@suse.cz>
7102 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7104 (bit_test_cluster::find_bit_tests): Likewise.
7105 (switch_decision_tree::analyze_switch_statement): Find clusters.
7106 * tree-switch-conversion.h (struct jump_table_cluster): Document
7109 2018-06-20 Martin Liska <mliska@suse.cz>
7111 * tree-switch-conversion.c (switch_conversion::collect):
7112 Record m_uniq property.
7113 (switch_conversion::expand): Bail out for special conditions.
7114 (group_cluster::~group_cluster): New.
7115 (group_cluster::group_cluster): Likewise.
7116 (group_cluster::dump): Likewise.
7117 (jump_table_cluster::emit): New.
7118 (switch_decision_tree::fix_phi_operands_for_edges): New.
7119 (struct case_node): Remove struct.
7120 (jump_table_cluster::can_be_handled): New.
7121 (case_values_threshold): Moved to header.
7122 (reset_out_edges_aux): Likewise.
7123 (jump_table_cluster::is_beneficial): New.
7124 (bit_test_cluster::can_be_handled): Likewise.
7125 (add_case_node): Remove.
7126 (bit_test_cluster::is_beneficial): New.
7127 (case_bit_test::cmp): New.
7128 (bit_test_cluster::emit): New.
7129 (expand_switch_as_decision_tree_p): Remove.
7130 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
7131 (fix_phi_operands_for_edge): Likewise.
7132 (switch_decision_tree::analyze_switch_statement): New.
7133 (compute_cases_per_edge): Move ...
7134 (switch_decision_tree::compute_cases_per_edge): ... here.
7135 (try_switch_expansion): Likewise.
7136 (switch_decision_tree::try_switch_expansion): Likewise.
7137 (record_phi_operand_mapping): Likewise.
7138 (switch_decision_tree::record_phi_operand_mapping): Likewise.
7139 (emit_case_decision_tree): Likewise.
7140 (switch_decision_tree::emit): Likewise.
7141 (balance_case_nodes): Likewise.
7142 (switch_decision_tree::balance_case_nodes): Likewise.
7143 (dump_case_nodes): Likewise.
7144 (switch_decision_tree::dump_case_nodes): Likewise.
7145 (emit_jump): Likewise.
7146 (switch_decision_tree::emit_jump): Likewise.
7147 (emit_cmp_and_jump_insns): Likewise.
7148 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
7149 (emit_case_nodes): Likewise.
7150 (switch_decision_tree::emit_case_nodes): Likewise.
7151 (conditional_probability): Remove.
7152 * tree-switch-conversion.h (enum cluster_type): New.
7154 (struct cluster): Likewise.
7155 (cluster::cluster): Likewise.
7156 (struct simple_cluster): Likewise.
7157 (simple_cluster::simple_cluster): Likewise.
7158 (struct group_cluster): Likewise.
7159 (struct jump_table_cluster): Likewise.
7160 (struct bit_test_cluster): Likewise.
7161 (struct min_cluster_item): Likewise.
7162 (struct case_tree_node): Likewise.
7163 (case_tree_node::case_tree_node): Likewise.
7164 (jump_table_cluster::case_values_threshold): Likewise.
7165 (struct case_bit_test): Likewise.
7166 (struct switch_decision_tree): Likewise.
7167 (struct switch_conversion): Likewise.
7168 (switch_decision_tree::reset_out_edges_aux): Likewise.
7170 2018-06-20 Martin Liska <mliska@suse.cz>
7172 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
7173 (hoist_edge_and_branch_if_true): Likewise.
7174 (expand_switch_using_bit_tests_p): Likewise.
7175 (struct case_bit_test): Likewise.
7176 (case_bit_test_cmp): Likewise.
7177 (emit_case_bit_tests): Likewise.
7178 (switch_conversion::switch_conversion): New class.
7179 (struct switch_conv_info): Remove old struct.
7180 (collect_switch_conv_info): More to ...
7181 (switch_conversion::collect): ... this.
7182 (check_range): Likewise.
7183 (switch_conversion::check_range): Likewise.
7184 (check_all_empty_except_final): Likewise.
7185 (switch_conversion::check_all_empty_except_final): Likewise.
7186 (check_final_bb): Likewise.
7187 (switch_conversion::check_final_bb): Likewise.
7188 (create_temp_arrays): Likewise.
7189 (switch_conversion::create_temp_arrays): Likewise.
7190 (free_temp_arrays): Likewise.
7191 (gather_default_values): Likewise.
7192 (switch_conversion::gather_default_values): Likewise.
7193 (build_constructors): Likewise.
7194 (switch_conversion::build_constructors): Likewise.
7195 (constructor_contains_same_values_p): Likewise.
7196 (switch_conversion::contains_same_values_p): Likewise.
7197 (array_value_type): Likewise.
7198 (switch_conversion::array_value_type): Likewise.
7199 (build_one_array): Likewise.
7200 (switch_conversion::build_one_array): Likewise.
7201 (build_arrays): Likewise.
7202 (switch_conversion::build_arrays): Likewise.
7203 (gen_def_assigns): Likewise.
7204 (switch_conversion::gen_def_assigns): Likewise.
7205 (prune_bbs): Likewise.
7206 (switch_conversion::prune_bbs): Likewise.
7207 (fix_phi_nodes): Likewise.
7208 (switch_conversion::fix_phi_nodes): Likewise.
7209 (gen_inbound_check): Likewise.
7210 (switch_conversion::gen_inbound_check): Likewise.
7211 (process_switch): Use the newly created class.
7212 (switch_conversion::expand): New.
7213 (switch_conversion::~switch_conversion): New.
7214 * tree-switch-conversion.h: New file.
7216 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7218 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
7219 tree-vect-patterns.c.
7220 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
7221 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
7222 (vect_recog_sad_pattern): Likewise.
7223 (vect_recog_widen_sum_pattern): Likewise.
7224 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
7225 (vect_recog_widen_shift_pattern): Remove the type_in argument.
7226 (vect_recog_rotate_pattern): Likewise.
7227 (vect_recog_mult_pattern): Likewise.
7228 (vect_recog_vector_vector_shift_pattern): Likewise.
7229 (vect_recog_divmod_pattern): Likewise.
7230 (vect_recog_mixed_size_cond_pattern): Likewise.
7231 (vect_recog_bool_pattern): Likewise.
7232 (vect_recog_mask_conversion_pattern): Likewise.
7233 (vect_try_gather_scatter_pattern): Likewise.
7234 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
7235 (vect_recog_over_widening_pattern): Likewise.
7236 (vect_recog_gather_scatter_pattern): Likewise.
7237 (vect_recog_func_ptr): Move from tree-vectorizer.h
7238 (vect_vect_recog_func_ptrs): Move further down the file.
7239 (vect_recog_func): Likewise. Remove the third argument.
7240 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
7241 (vect_pattern_recog_1): Expect the pattern function to do any
7242 necessary target tests. Also expect it to provide a vector type.
7243 Remove the type_in handling.
7245 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7247 * tree-vect-patterns.c (vect_pattern_detected): New function.
7248 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
7249 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
7250 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
7251 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
7252 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
7253 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
7254 (vect_recog_mask_conversion_pattern)
7255 (vect_try_gather_scatter_pattern): Likewise.
7257 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7259 * tree-vect-patterns.c (vect_get_internal_def): New function.
7260 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7261 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
7262 (search_type_for_mask_1): Use it.
7264 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7266 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
7267 redundant WIDEN_SUM_EXPR handling.
7268 (vect_recog_sad_pattern): Likewise.
7270 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7272 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
7273 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
7274 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
7275 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
7276 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
7278 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7280 * tree-vect-stmts.c (vectorizable_call): Make sure that we
7281 use the stmt_vec_info of the original bb statement for the
7282 new zero assignment, even if the call is part of a pattern.
7284 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7286 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
7287 that the sequence is attached to the original statement rather
7288 than the pattern statement.
7289 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
7290 PATTERN_DEF_SEQ from the original statement rather than
7291 the main pattern statement.
7292 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
7293 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
7294 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
7296 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7298 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
7299 definition statements before the early exit for statements that aren't
7301 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
7303 (vect_transform_loop): ...here. Process pattern definition
7304 statements without first checking whether the main pattern
7305 statement is live or relevant.
7307 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
7309 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
7310 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
7312 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
7314 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
7315 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
7316 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
7317 (expand_block_compare): Change select_block_compare_mode call.
7318 (expand_strncmp_align_check): Use new functions, fix comment.
7319 (emit_final_str_compare_gpr): New function.
7320 (expand_strn_compare): Refactor and clean up code.
7321 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
7323 2018-06-19 Tony Reix <tony.reix@atos.com>
7324 Damien Bergamini <damien.bergamini@atos.com>
7325 David Edelsohn <dje.gcc@gmail.com>
7327 * collect2.c (static_obj): New variable.
7328 (static_libs): New variable.
7329 (is_in_list): Uncomment declaration.
7330 (main): Track AIX libraries linked statically.
7331 (is_in_list): Uncomment definition.
7332 (scan_prog_file): Don't add AIX shared libraries initializer
7333 to constructor list if linking statically.
7335 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
7337 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
7339 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
7341 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
7343 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
7346 2018-06-19 Martin Liska <mliska@suse.cz>
7348 * config/i386/i386.c (ix86_can_inline_p): Do not use
7349 ipa_fn_summaries::get_create.
7350 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
7352 (devirtualization_time_bonus): Likewise.
7353 (ipcp_propagate_stage): Likewise.
7354 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
7355 (edge_set_predicate): Likewise.
7356 (evaluate_conditions_for_known_args): Likewise.
7357 (evaluate_properties_for_edge): Likewise.
7358 (ipa_call_summary::reset): Tranform to ...
7359 (ipa_call_summary::~ipa_call_summary): ... this.
7360 (ipa_fn_summary::reset): Transform to ...
7361 (ipa_fn_summary::~ipa_fn_summary): ... this.
7362 (ipa_fn_summary_t::remove): Rename to ...
7363 (ipa_fn_summary_t::remove_callees): ... this.
7364 (ipa_fn_summary_t::duplicate): Use placement new
7365 instead of memory copy.
7366 (ipa_call_summary_t::duplicate): Likewise.
7367 (ipa_call_summary_t::remove): Remove.
7368 (dump_ipa_call_summary): Change get_create to get.
7369 (ipa_dump_fn_summary): Dump only when summary exists.
7370 (analyze_function_body): Use symbol_summary::get instead
7372 (compute_fn_summary): Likewise.
7373 (estimate_edge_devirt_benefit): Likewise.
7374 (estimate_edge_size_and_time): Likewise.
7375 (inline_update_callee_summaries): Likewise.
7376 (remap_edge_change_prob): Likewise.
7377 (remap_edge_summaries): Likewise.
7378 (ipa_merge_fn_summary_after_inlining): Likewise.
7379 (write_ipa_call_summary): Likewise.
7380 (ipa_fn_summary_write): Likewise.
7381 (ipa_free_fn_summary): Likewise.
7382 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
7383 (struct ipa_call_summary): Likewise.
7384 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
7386 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
7387 (estimate_size_after_inlining): Likewise.
7388 (estimate_growth): Likewise.
7389 (growth_likely_positive): Likewise.
7390 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
7391 (inline_call): Likewise.
7392 * ipa-inline.c (caller_growth_limits): Likewise.
7393 (can_inline_edge_p): Likewise.
7394 (can_inline_edge_by_limits_p): Likewise.
7395 (compute_uninlined_call_time): Likewise.
7396 (compute_inlined_call_time): Likewise.
7397 (want_inline_small_function_p): Likewise.
7398 (edge_badness): Likewise.
7399 (update_caller_keys): Likewise.
7400 (update_callee_keys): Likewise.
7401 (inline_small_functions): Likewise.
7402 (inline_to_all_callers_1): Likewise.
7403 (dump_overall_stats): Likewise.
7404 (early_inline_small_functions): Likewise.
7405 (early_inliner): Likewise.
7406 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
7407 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7408 * ipa-pure-const.c (malloc_candidate_p): Likewise.
7409 * ipa-split.c (execute_split_functions): Likewise.
7410 * symbol-summary.h: Likewise.
7411 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
7413 2018-06-19 Richard Biener <rguenther@suse.de>
7415 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
7416 (vectorize_loops): ... here. Fix dbgcnt handling.
7417 (try_vectorize_loop): Wrap try_vectorize_loop_1.
7419 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
7422 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
7423 ieee128 argument takes up only one (vector) register, not two (floating
7426 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
7428 * gimplify.c (gimplify_init_constructor): Really never clear for an
7429 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
7431 2018-06-19 Richard Biener <rguenther@suse.de>
7433 PR tree-optimization/86179
7434 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
7435 after failed recognition.
7437 2018-06-18 Martin Sebor <msebor@redhat.com>
7440 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
7441 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
7442 Handle integer subtraction.
7443 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
7444 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
7446 2018-06-18 David Malcolm <dmalcolm@redhat.com>
7448 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
7449 param from rtx to rtx_insn *.
7450 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
7452 (frv_ifcvt_modify_insn): Likwise.
7453 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
7454 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
7455 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
7456 as_a <rtx_insn *> cast to local "unprotected_region" once
7457 it's been established that it's not NULL or pc_rtx.
7458 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
7459 param "sethi" from rtx to rtx_insn *.
7460 (nds32_group_float_insns): Likewise for param "insn".
7461 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
7463 (vax_output_int_subtract): Likewise.
7464 * config/vax/vax.c (vax_output_int_add): Likewise for param
7466 (vax_output_int_subtract): Likewise.
7467 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
7468 (emit_pattern_after): Likewise for param "after".
7469 (emit_insn_after): Likewise.
7470 (emit_jump_insn_after): Likewise.
7471 (emit_call_insn_after): Likewise.
7472 (emit_debug_insn_after): Likewise.
7473 (emit_pattern_before): Likewise for param "before".
7474 (emit_insn_before): Likewise.
7475 (emit_jump_insn_before): Likewise.
7476 * final.c (get_insn_template): Likewise for param "insn", removing
7478 * output.h (get_insn_template): Likewise for 2nd param.
7479 * rtl.h (emit_insn_before): Likewise.
7480 (emit_jump_insn_before): Likewise.
7481 (emit_debug_insn_before_noloc): Likewise.
7482 (emit_insn_after): Likewise.
7483 (emit_jump_insn_after): Likewise.
7484 (emit_call_insn_after): Likewise.
7485 (emit_debug_insn_after): Likewise.
7486 (set_insn_deleted): Likewise for param.
7488 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
7491 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
7492 floating point modes, so that IFmode is numerically greater than
7493 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
7494 to declare the ordering. This prevents IFmode from being
7495 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
7496 machine. Include rs6000-modes.h to share the fractional values
7497 between genmodes* and the rest of the compiler.
7501 * config/rs6000/rs6000-modes.h: New file.
7502 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
7503 meaning of rs6000_long_double_size so that 126..128 selects an
7504 appropriate 128-bit floating point type.
7505 (rs6000_option_override_internal): Likewise.
7506 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
7507 (TARGET_LONG_DOUBLE_128): Change the meaning of
7508 rs6000_long_double_size so that 126..128 selects an appropriate
7509 128-bit floating point type.
7510 (LONG_DOUBLE_TYPE_SIZE): Update comment.
7511 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
7512 source and destination to match the standard usage.
7513 (truncifkf2): Likewise.
7514 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
7515 ISA 2.07 to use an explicit clobber, instead of passing in a
7517 (copysign<mode>3_soft): Likewise.
7519 2018-06-18 David Malcolm <dmalcolm@redhat.com>
7521 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
7522 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
7523 (vect_slp_analyze_instance_dependence): Likewise.
7524 (vect_enhance_data_refs_alignment): Likewise.
7525 (vect_analyze_data_refs_alignment): Likewise.
7526 (vect_slp_analyze_and_verify_instance_alignment
7527 (vect_analyze_data_ref_accesses): Likewise.
7528 (vect_prune_runtime_alias_test_list): Likewise.
7529 (vect_analyze_data_refs): Likewise.
7530 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
7531 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
7532 (vect_analyze_scalar_cycles_1): Likewise.
7533 (vect_get_loop_niters): Likewise.
7534 (vect_analyze_loop_form_1): Likewise.
7535 (vect_update_vf_for_slp): Likewise.
7536 (vect_analyze_loop_operations): Likewise.
7537 (vect_analyze_loop): Likewise.
7538 (vectorizable_induction): Likewise.
7539 (vect_transform_loop): Likewise.
7540 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
7541 * tree-vect-slp.c (vect_analyze_slp): Likewise.
7542 (vect_make_slp_decision): Likewise.
7543 (vect_detect_hybrid_slp): Likewise.
7544 (vect_slp_analyze_operations): Likewise.
7545 (vect_slp_bb): Likewise.
7546 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
7547 (vectorizable_bswap): Likewise.
7548 (vectorizable_call): Likewise.
7549 (vectorizable_simd_clone_call): Likewise.
7550 (vectorizable_conversion): Likewise.
7551 (vectorizable_assignment): Likewise.
7552 (vectorizable_shift): Likewise.
7553 (vectorizable_operation): Likewise.
7554 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
7556 2018-06-18 Martin Sebor <msebor@redhat.com>
7558 PR tree-optimization/81384
7559 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
7560 * builtins.c (expand_builtin_strnlen): New function.
7561 (expand_builtin): Call it.
7562 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
7563 * builtins.def (BUILT_IN_STRNLEN): New.
7564 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
7565 Warn for bounds in excess of maximum object size.
7566 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
7567 single-value ranges. Handle strnlen.
7568 (handle_builtin_strlen): Handle strnlen.
7569 (strlen_check_and_optimize_stmt): Same.
7570 * doc/extend.texi (Other Builtins): Document strnlen.
7572 2018-06-18 Maya Rashish <coypu@sdf.org>
7574 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
7575 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
7576 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
7578 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
7580 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
7582 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7584 * tree.c (escaped_string::escape): Replace cast to char * by
7585 const_cast<char *> (unescaped).
7587 2018-06-18 Nick Clifton <nickc@redhat.com>
7590 * tree.c (escaped_string): New class. Converts an unescaped
7591 string into its escaped equivalent.
7592 (warn_deprecated_use): Use the new class to convert the
7593 deprecation message, if present.
7594 (test_escaped_strings): New self test.
7595 (test_c_tests): Add test_escaped_strings.
7596 * doc/extend.texi (deprecated): Add a note that the
7597 deprecation message is affected by the -fmessage-length
7598 option, and that control characters will be escaped.
7599 (#pragma GCC error): Document this pragma.
7600 (#pragma GCC warning): Likewise.
7601 * doc/invoke.texi (-fmessage-length): Document this option's
7602 effect on the #warning and #error preprocessor directives and
7603 the deprecated attribute.
7605 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
7607 * tree.c (decl_value_expr_lookup): Revert latest change.
7608 (decl_value_expr_insert): Likewise.
7610 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
7612 * gimplify.c (nonlocal_vlas): Delete.
7613 (nonlocal_vla_vars): Likewise.
7614 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
7616 (gimplify_body): Do not create and destroy nonlocal_vlas.
7617 * tree-nested.c: Include diagnostic.h.
7618 (use_pointer_in_frame): Tweak.
7619 (lookup_field_for_decl): Add assertion and declare the transformation.
7620 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
7621 internal error when the reference is in a wrong context. Do not
7622 create a debug decl by default.
7623 (note_nonlocal_block_vlas): Delete.
7624 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
7625 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
7626 create a debug decl by default.
7627 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
7628 call is in a wrong context.
7629 (fixup_vla_decls): New function.
7630 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
7631 debug variables were created.
7632 * tree.c (decl_value_expr_lookup): Add checking assertion.
7633 (decl_value_expr_insert): Likewise.
7635 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
7638 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
7639 * tree-scalar-evolution.c (interpret_expr): Likewise.
7640 (expression_expensive_p): Likewise.
7641 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
7642 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
7643 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
7644 (ssa_defined_by_minus_one_stmt_p): New.
7646 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
7649 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
7650 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
7651 * dojump.c (do_jump): Likewise.
7652 * expr.c (expand_expr_real_2): Check operand type's sign.
7653 * fold-const.c (const_unop): Handle ABSU_EXPR.
7654 (fold_abs_const): Likewise.
7655 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
7656 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
7657 (strip_sign_op_1): Likesise.
7658 * match.pd: Add new pattern to generate ABSU_EXPR.
7659 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
7660 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
7661 * tree-eh.c (operation_could_trap_helper_p): Likewise.
7662 * tree-inline.c (estimate_operator_cost): Likewise.
7663 * tree-pretty-print.c (dump_generic_node): Likewise.
7664 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
7665 * tree.def (ABSU_EXPR): New.
7667 2018-06-16 Jakub Jelinek <jakub@redhat.com>
7670 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
7671 documented as preserved for backward compatibility only.
7672 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
7674 PR rtl-optimization/86108
7675 * bb-reorder.c (create_forwarder_block): Renamed to ...
7676 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
7677 jump from new landing pad to the second part.
7678 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
7681 2018-06-15 Jakub Jelinek <jakub@redhat.com>
7684 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
7685 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
7686 Only call store_expr for halves if the mode is the same.
7689 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
7690 Fix up comment formatting.
7692 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
7694 * typed-splay-tree.h (typed_splay_tree::remove): New function.
7695 (typed_splay_tree::closure,
7696 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
7697 (typed_splay_tree::typed_splay_tree,
7698 typed_splay_tree::operator =): Declared private.
7699 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
7700 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
7701 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
7702 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
7703 typed_splay_tree::splay_tree_splay,
7704 typed_splay_tree::splay_tree_foreach_helper,
7705 typed_splay_tree::splay_tree_insert,
7706 typed_splay_tree::splay_tree_remove,
7707 typed_splay_tree::splay_tree_lookup,
7708 typed_splay_tree::splay_tree_predecessor,
7709 typed_splay_tree::splay_tree_successor,
7710 typed_splay_tree::splay_tree_min,
7711 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
7712 (typed_splay_tree::root, typed_splay_tree::comp,
7713 typed_splay_tree::delete_key,
7714 typed_splay_tree::delete_value): New data members.
7715 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
7716 typed_splay_tree::remove.
7718 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
7720 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
7721 -mginv and -mno-ginv to the assembler.
7722 * config/mips/mips.opt (-mcrc): New option.
7724 * doc/invoke.text (-mcrc): Document.
7727 2018-06-15 Nick Clifton <nickc@redhat.com>
7730 * tree.c (escaped_string): New class. Converts an unescaped
7731 string into its escaped equivalent.
7732 (warn_deprecated_use): Use the new class to convert the
7733 deprecation message, if present.
7734 (test_escaped_strings): New self test.
7735 (test_c_tests): Add test_escaped_strings.
7736 * doc/extend.texi (deprecated): Add a note that the
7737 deprecation message is affected by the -fmessage-length
7738 option, and that control characters will be escaped.
7739 (#pragma GCC error): Document this pragma.
7740 (#pragma GCC warning): Likewise.
7741 * doc/invoke.texi (-fmessage-length): Document this option's
7742 effect on the #warning and #error preprocessor directives and
7743 the deprecated attribute.
7745 2018-06-15 Richard Biener <rguenther@suse.de>
7747 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
7748 here, also noting vector size used.
7749 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
7750 size used in MSG_OPTIMIZED_LOCATIONS dump.
7751 (pass_slp_vectorize::execute): Adjust.
7753 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
7756 * config/arc/arc.c (arc_return_address_register): Fix
7759 2018-06-15 Richard Biener <rguenther@suse.de>
7762 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
7763 leave useless conversion stripping to force_gimple_operand_gsi.
7764 (gimplify_build2): Likewise.
7765 (gimplify_build1): Likewise.
7767 2018-06-15 Richard Biener <rguenther@suse.de>
7770 * tree-cfg.c (move_stmt_op): unshare invariant addresses
7771 before adjusting their block.
7773 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
7775 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
7776 multilibs for *-*-rtems*.
7777 * config/riscv/t-rtems: New file.
7779 2018-06-14 Jakub Jelinek <jakub@redhat.com>
7782 * match.pd ((A +- CST1) +- CST2): Punt if last resort
7783 unsigned_type_for returns NULL.
7786 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
7787 subregs of multi-word pseudos unless the float mode has word size.
7789 2018-06-14 Richard Biener <rguenther@suse.de>
7792 * tree-vect-generic.c (build_word_mode_vector_type): Remove
7793 duplicate and harmful type_hash_canon.
7794 * tree.c (type_hash_canon): Assert we didn't find ourselves.
7796 2018-06-14 Richard Biener <rguenther@suse.de>
7799 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
7802 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
7804 * config/rtems.h (STDINT_LONG32): Define.
7806 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
7807 Prachi Godbole <prachi.godbole@imgtec.com>
7809 * config/mips/mips-cpus.def: Define P6600.
7810 * config/mips/mips-tables.opt: Regenerate.
7811 * config/mips/mips.c (mips_ucbranch_type): New enum.
7812 (mips_rtx_cost_data): Add support for P6600.
7813 (mips_issue_rate): Likewise.
7814 (mips_multipass_dfa_lookahead): Likewise.
7815 (mips_avoid_hazard): Likewise.
7816 (mips_reorg_process_insns): Likewise.
7817 (mips_classify_branch_p6600): New function.
7818 * config/mips/mips.h (TUNE_P6600): New define.
7819 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
7820 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
7821 * config/mips/mips.md: Include p6600.md.
7822 (processor): Add p6600.
7823 * config/mips/p6600.md: New file.
7824 * doc/invoke.texi: Add p6600 to supported architectures.
7826 2018-06-13 Martin Sebor <msebor@redhat.com>
7828 PR tree-optimization/86114
7829 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
7831 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
7833 2018-06-13 Richard Biener <rguenther@suse.de>
7835 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
7836 Properly set vector type of the intermediate stmt.
7837 * tree-vect-stmts.c (vectorizable_operation): The destination
7838 var always has vectype_out type.
7840 2018-06-13 Jeff Law <law@redhat.com>
7842 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
7843 integer 0 for argument to print_rtl_with_bb.
7844 (rl78_reorg): Likewise.
7846 2018-06-13 David Malcolm <dmalcolm@redhat.com>
7848 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
7849 from rtx to rtx_insn *.
7850 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
7852 (add_sched_insns_for_speculation): Likewise for local "target",
7853 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
7854 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
7855 from rtx_insn ** to rtx_code_label **.
7856 (reorg_emit_nops): Likewise.
7857 (c6x_reorg): Likewise for local "call_labels".
7858 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
7860 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
7861 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
7862 the loops over LABEL_REFS.
7863 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
7865 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
7866 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
7867 (split_branches): Strengthen local "olabel" from rtx to
7868 rtx_insn *, adding a safe_as_a cast.
7869 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
7871 (add_insn_after): Likewise for first two params.
7872 (add_insn_before): Likewise.
7873 (remove_insn): Likewise for param.
7874 (emit_pattern_before_noloc): Likewise for second and third params.
7875 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
7876 (emit_call_insn_before_noloc): Likewise.
7877 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
7879 (emit_barrier_before): Likewise.
7880 (emit_label_before): Strengthen "label" param from "rtx" to
7881 "rtx_code_label *". Strengthen "before" param from "rtx" to
7883 (emit_insn_after_1): Strengthen "after" param from "rtx" to
7885 (emit_pattern_after_noloc): Likewise.
7886 (emit_insn_after_noloc): Likewise.
7887 (emit_jump_insn_after_noloc): Likewise.
7888 (emit_call_insn_after_noloc): Likewise.
7889 (emit_debug_insn_after_noloc): Likewise.
7890 (emit_barrier_after): Likewise.
7891 (emit_label_after): Likewise for both params.
7892 (emit_pattern_after_setloc): Likewise for "after" param. Convert
7893 "loc" param from "int" to "location_t".
7894 (emit_insn_after_setloc): Likewise.
7895 (emit_jump_insn_after_setloc): Likewise.
7896 (emit_call_insn_after_setloc): Likewise.
7897 (emit_debug_insn_after_setloc): Likewise.
7898 (emit_pattern_before_setloc): Likewise for "before" param. Convert
7899 "loc" param from "int" to "location_t".
7900 (emit_pattern_before): Convert NULL_RTX to NULL.
7901 (emit_insn_before_setloc): Convert "loc" param from "int" to
7903 (emit_jump_insn_before_setloc): Likewise.
7904 (emit_call_insn_before_setloc): Likewise.
7905 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
7906 rtx_insn *. Convert "loc" param from "int" to "location_t".
7907 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
7908 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
7909 Convert 3rd param from "int" to "location_t".
7910 (emit_barrier_before, emit_barrier_after, next_real_insn):
7911 Strengthen param from rtx to rtx_insn *.
7912 (emit_label_before): Strengthen 1st param from "rtx" to
7913 "rtx_code_label *". Strengthen 2nd param from "rtx" to
7915 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
7916 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
7917 Strengthen 2nd param from "rtx" to "rtx_insn *".
7918 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
7919 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
7920 Likewise. Convert 3rd param from "int" to "location_t".
7921 (emit_label_after): Strengthen 1st param from "rtx" to
7923 (next_real_insn, remove_insn): Strengthen param from "rtx" to
7925 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
7926 from "rtx" to "rtx_insn *".
7928 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
7930 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
7931 bodies streamed in with -Q.
7932 * dumpfile.c (dump_files): Add lto-stream-out dump file.
7933 * dumpfile.h (tree_dump_index): Add lto_stream_out.
7934 * gimple-streamer-out.c: Include gimple-pretty-print.h
7935 (output_bb): Dump stmts streamed.
7936 * lto-section-out.c: Include print-tree.h
7937 (lto_begin_section): Dump sections created.
7938 (lto_output_decl_index): Dump decl encoded.
7939 * lto-streamer-out.c: Include print-tree.h
7940 (create_output_block): Dump output block created.
7941 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
7942 (output_function): Dump function output.
7943 (output_constructor): Dump constructor streamed.
7944 (write_global_stream): Output indexes encoded.
7945 (produce_asm_for_decls): Dump streams encoded.
7946 * lto-streamer.c (streamer_dump_file): New global var.
7947 * lto-streamer.h (streamer_dump_file): Declare.
7948 * passes.c (ipa_write_summaries): Initialize streamer dump.
7949 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
7952 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
7955 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
7956 offsets for register save directives. Emit a second batch of save
7957 directives, if need be, when the function accesses prior frames.
7959 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7961 * config/arc/fpu.md (fmasf4): Force operand to register.
7962 (fnmasf4): Likewise.
7964 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7966 * config/arc/arc-protos.h (arc_pad_return): Remove.
7967 * config/arc/arc.c (machine_function): Remove force_short_suffix
7969 (arc_print_operand): Adjust printing of '&'.
7970 (arc_verify_short): Remove conditional printing of short suffix.
7971 (arc_final_prescan_insn): Remove reference to size_reason.
7972 (pad_return): New function.
7973 (arc_reorg): Call pad_return.
7974 (arc_pad_return): Remove.
7975 (arc_init_machine_status): Remove reference to force_short_suffix.
7976 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
7977 (attr length): When attribute iscompact is true force to 2
7978 regardless; in the case of maybe check if we want to force the
7979 instruction to have 4 bytes length.
7980 (nopv): Change it to generate 4 byte long nop as well.
7981 (blockage): New pattern.
7982 (simple_return): Remove call to arc_pad_return.
7983 (p_return_i): Likewise.
7985 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7987 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
7989 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7991 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
7994 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7996 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
7997 for ARC700 and ARCv2.
7999 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
8002 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
8003 operands[2] instead of operands[1].
8006 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
8008 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
8009 case, check whether the outer register overlaps an unallocatable
8010 register, not just whether it fits the required class.
8012 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
8014 * poly-int.h (can_div_trunc_p): Add new overload in which all values
8016 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
8017 (memrefs_conflict_p): Likewise.
8018 (init_alias_analysis): Likewise.
8019 * cfgexpand.c (expand_debug_expr): Likewise.
8020 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
8021 * cse.c (fold_rtx): Likewise.
8022 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
8023 * expr.c (emit_block_move_hints): Likewise.
8024 (clear_storage_hints, push_block, emit_push_insn): Likewise.
8025 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
8026 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
8027 (emit_group_store): Likewise.
8028 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
8029 to read the PRE/POST_MODIFY increment.
8030 * calls.c (store_one_arg): Use strip_offset.
8031 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
8033 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
8035 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
8036 (simplify_binary_operation_1): Extend CONST_INT handling to
8038 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
8039 than a HOST_WIDE_INT.
8040 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
8042 (adjust_mems, add_stores): Update accodingly.
8043 (vt_canonicalize_addr): Track polynomial offsets.
8044 (emit_note_insn_var_location): Likewise.
8045 (vt_add_function_parameter): Likewise.
8046 (vt_initialize): Likewise.
8048 2018-06-12 Jeff Law <law@redhat.com>
8050 * config.gcc (alpha*-*-freebsd*): Remove.
8051 * config/alpha/freebsd.h: Remove.
8053 2018-06-12 David Malcolm <dmalcolm@redhat.com>
8056 * spellcheck-tree.c (levenshtein_distance): Rename to...
8057 (get_edit_distance): ...this, and update for underlying renaming.
8058 * spellcheck-tree.h (levenshtein_distance): Rename to...
8059 (get_edit_distance): ...this.
8060 * spellcheck.c (levenshtein_distance): Rename to...
8061 (get_edit_distance): ...this. Convert from Levenshtein distance
8062 to Damerau-Levenshtein distance by supporting transpositions of
8063 adjacent characters. Rename "v1" to "v_next" and "v0" to
8065 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
8066 (selftest::test_edit_distance_unit_test_oneway): ...this, and
8067 update for underlying renaming.
8068 (selftest::levenshtein_distance_unit_test): Rename to...
8069 (selftest::test_get_edit_distance_unit): ...this, and update for
8070 underlying renaming.
8071 (selftest::test_find_closest_string): Add example from PR 69968
8072 where transposition helps
8073 (selftest::test_metric_conditions): Update for renaming.
8074 (selftest::test_metric_conditions): Likewise.
8075 (selftest::spellcheck_c_tests): Likewise.
8076 * spellcheck.h (levenshtein_distance): Rename both overloads to...
8077 (get_edit_distance): ...this.
8078 (best_match::consider): Update for renaming.
8080 2018-06-12 Martin Sebor <msebor@redhat.com>
8082 PR tree-optimization/85259
8083 * builtins.c (compute_objsize): Handle constant offsets.
8084 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
8085 true iff a warning has been issued.
8086 * gimple.h (gimple_nonartificial_location): New function.
8087 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
8088 gimple_nonartificial_location and handle -Wno-system-headers.
8089 (handle_builtin_stxncpy): Same.
8091 2018-06-12 Martin Sebor <msebor@redhat.com>
8094 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
8096 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
8098 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
8099 BUILTIN_VEC_XST entries for pointer to double and long long.
8101 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
8104 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
8106 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
8109 2018-06-12 Martin Liska <mliska@suse.cz>
8111 * doc/options.texi: Document IntegerRange.
8113 2018-06-12 Martin Liska <mliska@suse.cz>
8115 * config/i386/i386.opt: Make MPX-related options as Deprecated.
8116 * opt-functions.awk: Handle Deprecated flag.
8117 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
8119 (read_cmdline_option): Report warning for a deprecated option.
8120 * opts.h (struct cl_option): Add new field cl_deprecated.
8121 (CL_ERR_DEPRECATED): New.
8123 2018-06-12 Martin Liska <mliska@suse.cz>
8125 * doc/options.texi: Document Deprecated option flag.
8127 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8129 * config/arc/arc-arch.h (arc_extras): New enum.
8130 (arc_cpu_t):Add field extra.
8131 (arc_cpu_types): Consider the extras.
8132 * config/arc/arc-cpus.def: Add extras info.
8133 * config/arc/arc-opts.h (processor_type): Consider extra field.
8134 * config/arc/arc.c (arc_override_options): Handle extra field.
8136 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8138 * config/arc/arc-arch.h: Update ARC_OPTX macro.
8139 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
8141 * config/arc/arc.c (arc_init): Update pic warning.
8142 (irq_range): Update irq range parsing warnings.
8143 (arc_override_options): Update various warning messages.
8144 (arc_handle_aux_attribute): Likewise.
8146 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
8148 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
8150 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8152 * doc/sourcebuild.texi: Document usage of line number 0 in verify
8153 compiler messages directives.
8155 2018-06-12 Matthew Fortune <mfortune@gmail.com>
8157 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
8158 * config/mips/mips-tables.opt: Regenerate.
8159 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
8161 * doc/invoke.texi: Document -march=i6500.
8163 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
8165 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
8166 (i6400_gpmul): Add cpu_unit.
8167 (i6400_gpdiv): Likewise.
8168 (i6400_msa_add_d): Update reservations.
8169 (i6400_msa_int_add) Likewise.
8170 (i6400_msa_short_logic3) Likewise.
8171 (i6400_msa_short_logic2) Likewise.
8172 (i6400_msa_short_logic) Likewise.
8173 (i6400_msa_move) Likewise.
8174 (i6400_msa_cmp) Likewise.
8175 (i6400_msa_short_float2) Likewise.
8176 (i6400_msa_div_d) Likewise.
8177 (i6400_msa_long_logic1) Likewise.
8178 (i6400_msa_long_logic2) Likewise.
8179 (i6400_msa_mult) Likewise.
8180 (i6400_msa_long_float2) Likewise.
8181 (i6400_msa_long_float4) Likewise.
8182 (i6400_msa_long_float5) Likewise.
8183 (i6400_msa_long_float8) Likewise.
8184 (i6400_fpu_fadd): Include frint type.
8185 (i6400_fpu_store): New define_insn_reservation.
8186 (i6400_fpu_load): Likewise.
8187 (i6400_fpu_move): Likewise.
8188 (i6400_fpu_fcmp): Likewise.
8189 (i6400_fpu_fmadd): Likewise.
8190 (i6400_int_mult): Include imul3nc type and update reservation.
8191 (i6400_int_div): Include idiv3 type and update reservation.
8192 (i6400_int_load): Update to check type not move_type.
8193 (i6400_int_store): Likewise.
8194 (i6400_int_prefetch): Set zero latency.
8196 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
8198 * gcc.c: Document new %@{...} sequence.
8199 (LINK_COMMAND_SPEC): Use it for the -L switches.
8200 (cpp_unique_options): Use it for the -I switches.
8201 (at_file_argbuf): New global variable.
8202 (in_at_file): Likewise.
8203 (alloc_args): Create at_file_argbuf.
8204 (clear_args): Truncate at_file_argbuf.
8205 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
8206 (open_at_file): New function.
8207 (close_at_file): Likewise.
8208 (create_at_file): Delete.
8209 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
8212 (validate_switches_from_spec): Deal with %@{...} sequence.
8213 (validate_switches): Likewise.
8214 (driver::finalize): Call clear_args.
8216 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
8218 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
8220 2018-06-11 Martin Sebor <msebor@redhat.com>
8222 * doc/invoke.texi (-Wall): List -Wc++17-compat.
8223 (Wno-class-memaccess): Add @opindex.
8224 (Wno-templates, Wno-multiple-inheritance): Same.
8225 (Wno-virtual-inheritance, Wno-namespaces): Same.
8226 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
8227 (Wno-format-overflow, Wno-format-truncation): Same.
8228 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
8229 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
8230 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
8231 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
8232 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
8233 (Wno-misspelled-isr): Same.
8235 2018-06-11 Martin Sebor <msebor@redhat.com>
8237 * PR tree-optimization/86083
8238 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
8240 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
8242 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
8244 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
8247 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
8248 on the correct operand.
8249 (*movdi_internal64): Ditto.
8251 2018-06-11 Martin Liska <mliska@suse.cz>
8253 PR tree-optimization/86089
8254 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
8256 2018-06-11 Julia Koval <julia.koval@intel.com>
8258 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
8259 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
8260 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
8262 2018-06-11 Olivier Hainque <hainque@adacore.com>
8264 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
8265 for Ada with strict dwarf2.
8267 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
8270 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
8273 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
8275 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
8277 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
8279 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
8282 2018-06-08 Martin Liska <mliska@suse.cz>
8284 * tree-cfg.h (debug_function): Fix argument type to match
8287 2018-06-08 Martin Liska <mliska@suse.cz>
8289 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
8290 Remove usage of MPX-related (and removed) fields.
8291 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
8293 2018-06-08 David Malcolm <dmalcolm@redhat.com>
8295 * cfg.c (debug): Use TDF_NONE rather than 0.
8296 * cfghooks.c (debug): Likewise.
8297 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
8298 (struct dump_option_value_info): Convert to...
8299 (struct kv_pair): ...this template type.
8300 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
8302 (optinfo_verbosity_options): Likewise.
8303 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
8305 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
8306 than int for "optgroup_flags" param.
8307 (dump_generic_expr_loc): Use dump_flags_t rather than int for
8309 (dump_dec): Likewise.
8310 (dump_finish): Use TDF_NONE rather than 0.
8311 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
8312 rather than int for "optgroup_flags" param. Use TDF_NONE rather
8313 than 0. Update for change to option_ptr.
8314 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
8315 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
8316 0. Update for changes to optinfo_verbosity_options and
8318 (opt_info_switch_p): Convert optgroup_flags from int to
8320 (dump_basic_block): Use dump_flags_t rather than int
8321 for "dump_kind" param.
8322 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
8323 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
8324 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
8325 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
8326 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
8327 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
8328 TDF_NONE): Convert from macros to...
8329 (enum dump_flag): ...this new enum.
8330 (dump_flags_t): Update to use enum.
8331 (operator|, operator&, operator~, operator|=, operator&=):
8332 Implement for dump_flags_t.
8333 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
8334 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
8335 Convert from macros to...
8336 (enum optgroup_flag): ...this new enum.
8337 (optgroup_flags_t): New typedef.
8338 (operator|, operator|=): Implement for optgroup_flags_t.
8339 (struct dump_file_info): Convert field "alt_flags" to
8340 dump_flags_t. Convert field "optgroup_flags" to
8342 (dump_basic_block): Use dump_flags_t rather than int for param.
8343 (dump_generic_expr_loc): Likewise.
8344 (dump_dec): Likewise.
8345 (dump_register): Convert param "optgroup_flags" to
8347 (opt_info_enable_passes): Likewise.
8348 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
8350 * gimple-pretty-print.c (debug): Likewise.
8351 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
8352 (merged_store_group::apply_stores): Likewise.
8353 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
8354 * gimple.c (verify_gimple_pp): Likewise.
8355 * graphite-poly.c (print_pbb_body): Likewise.
8356 * passes.c (pass_manager::register_one_dump_file): Convert
8357 local "optgroup_flags" to optgroup_flags_t.
8358 * print-tree.c (print_node): Use TDF_NONE rather than 0.
8360 (debug_body): Likewise.
8361 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
8362 to optgroup_flags_t.
8363 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
8365 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
8366 (convert_mult_to_fma): Likewise.
8367 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
8368 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
8369 * tree-vect-data-refs.c (dump_lower_bound): Convert param
8370 "dump_kind" to dump_flags_t.
8372 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
8374 * config/rs6000/rs6000.c (min, max): Delete.
8376 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
8378 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
8379 -mabi=spe and -mabi=no-spe.
8381 2018-06-08 Martin Liska <mliska@suse.cz>
8383 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
8384 where we expect an existing summary.
8386 2018-06-08 Martin Liska <mliska@suse.cz>
8388 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
8389 * ipa-inline.h (estimate_edge_growth): Likewise.
8391 2018-06-08 Martin Liska <mliska@suse.cz>
8393 * cgraph.c (function_version_hasher::hash): Use
8394 cgraph_node::get_uid ().
8395 (function_version_hasher::equal):
8396 * cgraph.h (cgraph_node::get_uid): New method.
8397 * ipa-inline.c (update_caller_keys): Use
8398 cgraph_node::get_uid ().
8399 (update_callee_keys): Likewise.
8400 * ipa-utils.c (searchc): Likewise.
8401 (ipa_reduced_postorder): Likewise.
8402 * lto-cgraph.c (input_node): Likewise.
8403 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
8404 * symbol-summary.h (symtab_insertion): Likewise.
8405 (symtab_removal): Likewise.
8406 (symtab_duplication): Likewise.
8407 * tree-pretty-print.c (dump_function_header): Likewise.
8408 * tree-sra.c (convert_callers_for_node): Likewise.
8410 2018-06-08 Martin Liska <mliska@suse.cz>
8412 * cgraph.c (symbol_table::create_edge): Always assign a new
8414 (symbol_table::free_edge): Do not recycle numbers.
8415 * cgraph.h (cgraph_edge::get): New method.
8416 * symbol-summary.h (symtab_removal): Use it.
8417 (symtab_duplication): Likewise.
8418 (call_summary::hashable_uid): Remove.
8420 2018-06-08 Martin Liska <mliska@suse.cz>
8422 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
8423 (initialize_growth_caches): Remove.
8424 (free_growth_caches): Likewise.
8425 (do_estimate_edge_time): Use edge_growth_cache.
8426 (do_estimate_edge_size): Likewise.
8427 (do_estimate_edge_hints): Likewise.
8428 * ipa-inline.c (reset_edge_caches): Likewise.
8429 (recursive_inlining): Likewise.
8430 (inline_small_functions): Likewise.
8431 * ipa-inline.h (initialize_growth_caches): Remove.
8432 (estimate_edge_size): Likewise.
8433 (estimate_edge_time): Likewise.
8434 (estimate_edge_hints): Likewise.
8435 (reset_edge_growth_cache): Likewise.
8436 * symbol-summary.h (call_summary::remove): New method.
8438 2018-06-08 Martin Liska <mliska@suse.cz>
8440 * ipa-cp.c (class edge_clone_summary): New summary.
8441 (grow_edge_clone_vectors): Remove.
8442 (ipcp_edge_duplication_hook): Remove.
8443 (class edge_clone_summary_t): New call_summary class.
8444 (ipcp_edge_removal_hook): Remove.
8445 (edge_clone_summary_t::duplicate): New function.
8446 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
8447 (create_specialized_node): Likewise.
8448 (ipcp_driver): Initialize edge_clone_summaries and do not
8451 2018-06-08 Martin Liska <mliska@suse.cz>
8453 * symbol-summary.h (get): New function.
8454 (call_summary::m_initialize_when_cloning): New class member.
8456 2018-06-08 Martin Liska <mliska@suse.cz>
8458 * cgraph.c (cgraph_node::remove): Do not recycle uid.
8459 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
8460 (symbol_table::allocate_cgraph_symbol): Do not set uid.
8461 * passes.c (uid_hash_t): Record removed_nodes by their uids.
8462 (remove_cgraph_node_from_order): Use the removed_nodes set.
8463 (do_per_function_toporder): Likwise.
8464 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
8465 instead of summary_uid.
8466 (symtab_removal): Likewise.
8467 (symtab_duplication): Likewise.
8469 2018-06-08 Martin Liska <mliska@suse.cz>
8471 * ipa-cp.c (ipcp_store_bits_results): Use
8472 ipcp_transformation_sum.
8473 (ipcp_store_vr_results): Likewise.
8474 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
8476 (ipcp_transformation_initialize): ... this.
8477 (ipa_set_node_agg_value_chain):
8478 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
8479 (write_ipcp_transformation_info): Likewise.
8480 (read_ipcp_transformation_info): Likewise.
8481 (ipcp_update_bits): Likewise.
8482 (ipcp_update_vr): Likewise.
8483 (ipcp_transform_function): Likewise.
8484 * ipa-prop.h: Rename ipcp_transformation_summary to
8485 ipcp_transformation.
8486 (class ipcp_transformation_t): New function summary.
8487 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
8488 (ipa_get_agg_replacements_for_node): Likewise.
8490 2018-06-08 Martin Liska <mliska@suse.cz>
8492 * ipa-pure-const.c (struct funct_state_d): Do it class instead
8494 (class funct_state_summary_t): New function_summary class.
8495 (has_function_state): Remove.
8496 (get_function_state): Likewise.
8497 (set_function_state): Likewise.
8498 (add_new_function): Likewise.
8499 (funct_state_summary_t::insert): New function.
8500 (duplicate_node_data): Remove.
8501 (remove_node_data): Remove.
8502 (funct_state_summary_t::duplicate): New function.
8503 (register_hooks): Create new funct_state_summaries.
8504 (pure_const_generate_summary): Use it.
8505 (pure_const_write_summary): Likewise.
8506 (pure_const_read_summary): Likewise.
8507 (propagate_pure_const): Likewise.
8508 (propagate_nothrow): Likewise.
8509 (dump_malloc_lattice): Likewise.
8510 (propagate_malloc): Likewise.
8511 (execute): Do not register hooks, just remove summary
8513 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
8516 2018-06-08 Martin Liska <mliska@suse.cz>
8518 * ipa-reference.c (remove_node_data): Remove.
8519 (duplicate_node_data): Likewise.
8520 (class ipa_ref_var_info_summary_t): New class.
8521 (class ipa_ref_opt_summary_t): Likewise.
8522 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
8523 (get_reference_optimization_summary): Use
8524 ipa_ref_opt_sum_summaries.
8525 (set_reference_vars_info): Remove.
8526 (set_reference_optimization_summary): Likewise.
8527 (ipa_init): Create summaries.
8528 (init_function_info): Use function summary.
8529 (ipa_ref_opt_summary_t::duplicate): New function.
8530 (ipa_ref_opt_summary_t::remove): New function.
8531 (get_read_write_all_from_node): Fix GNU coding style.
8532 (propagate): Use function summary.
8533 (write_node_summary_p): Fix GNU coding style.
8534 (stream_out_bitmap): Likewise.
8535 (ipa_reference_read_optimization_summary): Use function summary.
8536 (ipa_reference_c_finalize): Do not release hooks.
8538 2018-06-08 Martin Liska <mliska@suse.cz>
8540 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
8541 (analyze_function_body): Extract multiple calls of get_create.
8542 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
8543 * ipa-inline.c (recursive_inlining): Use ::get method.
8544 * ipa-inline.h (estimate_edge_growth): Likewise.
8546 2018-06-08 Martin Liska <mliska@suse.cz>
8548 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
8550 (hsa_function_summary::hsa_function_summary): Use the new enum
8552 (hsa_gpu_implementation_p): Use hsa_summaries::get.
8553 * hsa-gen.c (hsa_get_host_function): Likewise.
8554 (get_brig_function_name): Likewise.
8555 * ipa-hsa.c (process_hsa_functions): Likewise.
8556 (ipa_hsa_write_summary): Likewise.
8557 * symbol-summary.h (symtab_duplication): Use ::get function/
8558 (get): New function.
8560 2018-06-08 Martin Liska <mliska@suse.cz>
8562 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
8564 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
8565 (hsa_register_kernel): Likewise.
8566 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
8567 * hsa-gen.c (hsa_get_host_function): Likewise.
8568 (get_brig_function_name): Likewise.
8569 (generate_hsa): Likewise.
8570 (pass_gen_hsail::execute): Likewise.
8571 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
8572 (devirtualization_time_bonus): Likewise.
8573 (ipcp_propagate_stage): Likewise.
8574 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
8575 (edge_set_predicate): Likewise.
8576 (evaluate_conditions_for_known_args): Likewise.
8577 (evaluate_properties_for_edge): Likewise.
8578 (ipa_fn_summary::reset): Likewise.
8579 (ipa_fn_summary_t::duplicate): Likewise.
8580 (dump_ipa_call_summary): Likewise.
8581 (ipa_dump_fn_summary): Likewise.
8582 (analyze_function_body): Likewise.
8583 (compute_fn_summary): Likewise.
8584 (estimate_edge_devirt_benefit): Likewise.
8585 (estimate_edge_size_and_time): Likewise.
8586 (estimate_calls_size_and_time): Likewise.
8587 (estimate_node_size_and_time): Likewise.
8588 (inline_update_callee_summaries): Likewise.
8589 (remap_edge_change_prob): Likewise.
8590 (remap_edge_summaries): Likewise.
8591 (ipa_merge_fn_summary_after_inlining): Likewise.
8592 (ipa_update_overall_fn_summary): Likewise.
8593 (read_ipa_call_summary): Likewise.
8594 (inline_read_section): Likewise.
8595 (write_ipa_call_summary): Likewise.
8596 (ipa_fn_summary_write): Likewise.
8597 (ipa_free_fn_summary): Likewise.
8598 * ipa-hsa.c (process_hsa_functions): Likewise.
8599 (ipa_hsa_write_summary): Likewise.
8600 (ipa_hsa_read_section): Likewise.
8601 * ipa-icf.c (sem_function::merge): Likewise.
8602 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
8603 (do_estimate_edge_time): Likewise.
8604 (estimate_size_after_inlining): Likewise.
8605 (estimate_growth): Likewise.
8606 (growth_likely_positive): Likewise.
8607 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
8608 (inline_call): Likewise.
8609 * ipa-inline.c (caller_growth_limits): Likewise.
8610 (can_inline_edge_p): Likewise.
8611 (can_inline_edge_by_limits_p): Likewise.
8612 (compute_uninlined_call_time): Likewise.
8613 (compute_inlined_call_time): Likewise.
8614 (want_inline_small_function_p): Likewise.
8615 (edge_badness): Likewise.
8616 (update_caller_keys): Likewise.
8617 (update_callee_keys): Likewise.
8618 (recursive_inlining): Likewise.
8619 (inline_small_functions): Likewise.
8620 (inline_to_all_callers_1): Likewise.
8621 (dump_overall_stats): Likewise.
8622 (early_inline_small_functions): Likewise.
8623 (early_inliner): Likewise.
8624 * ipa-inline.h (estimate_edge_growth): Likewise.
8625 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
8626 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8627 * ipa-prop.h (IPA_NODE_REF): Likewise.
8628 (IPA_EDGE_REF): Likewise.
8629 * ipa-pure-const.c (malloc_candidate_p): Likewise.
8630 (propagate_malloc): Likewise.
8631 * ipa-split.c (execute_split_functions): Likewise.
8632 * symbol-summary.h: Rename get to get_create.
8634 (get_create): Likewise.
8635 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
8637 2018-06-08 Martin Liska <mliska@suse.cz>
8639 * symbol-summary.h (release): Move definition out of class
8641 (symtab_removal): Likewise.
8642 (symtab_duplication): Likewise.
8644 2018-06-08 Martin Liska <mliska@suse.cz>
8646 * symbol-summary.h (function_summary): Move constructor
8647 implementation out of class declaration.
8648 (release): Likewise.
8649 (symtab_insertion): Likewise.
8650 (symtab_removal): Likewise.
8651 (symtab_duplication): Likewise.
8654 2018-06-08 Martin Liska <mliska@suse.cz>
8656 * Makefile.in: Remove support for MPX (macros, related functions,
8657 fields in cgraph_node, ...).
8658 * builtin-types.def (BT_BND): Likewise.
8659 (BT_FN_BND_CONST_PTR): Likewise.
8660 (BT_FN_CONST_PTR_BND): Likewise.
8661 (BT_FN_VOID_PTR_BND): Likewise.
8662 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
8663 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
8664 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
8665 (expand_builtin_mempcpy_with_bounds): Likewise.
8666 (expand_builtin_memset_with_bounds): Likewise.
8667 (expand_builtin_memset_args): Likewise.
8668 (std_expand_builtin_va_start): Likewise.
8669 (expand_builtin): Likewise.
8670 (expand_builtin_with_bounds): Likewise.
8671 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
8672 (DEF_LIB_BUILTIN_CHKP): Likewise.
8673 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
8674 (DEF_CHKP_BUILTIN): Likewise.
8675 (BUILT_IN_MEMCPY): Likewise.
8676 (BUILT_IN_MEMMOVE): Likewise.
8677 (BUILT_IN_MEMPCPY): Likewise.
8678 (BUILT_IN_MEMSET): Likewise.
8679 (BUILT_IN_STPCPY): Likewise.
8680 (BUILT_IN_STRCAT): Likewise.
8681 (BUILT_IN_STRCHR): Likewise.
8682 (BUILT_IN_STRCPY): Likewise.
8683 (BUILT_IN_STRLEN): Likewise.
8684 (BUILT_IN_MEMCPY_CHK): Likewise.
8685 (BUILT_IN_MEMMOVE_CHK): Likewise.
8686 (BUILT_IN_MEMPCPY_CHK): Likewise.
8687 (BUILT_IN_MEMSET_CHK): Likewise.
8688 (BUILT_IN_STPCPY_CHK): Likewise.
8689 (BUILT_IN_STRCAT_CHK): Likewise.
8690 (BUILT_IN_STRCPY_CHK): Likewise.
8691 * calls.c (store_bounds): Likewise.
8692 (emit_call_1): Likewise.
8693 (special_function_p): Likewise.
8694 (maybe_warn_nonstring_arg): Likewise.
8695 (initialize_argument_information): Likewise.
8696 (finalize_must_preallocate): Likewise.
8697 (compute_argument_addresses): Likewise.
8698 (expand_call): Likewise.
8699 * cfgexpand.c (expand_call_stmt): Likewise.
8700 (expand_return): Likewise.
8701 (expand_gimple_stmt_1): Likewise.
8702 (pass_expand::execute): Likewise.
8703 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
8704 (cgraph_node::remove): Likewise.
8705 (cgraph_node::dump): Likewise.
8706 (cgraph_node::verify_node): Likewise.
8707 * cgraph.h (chkp_function_instrumented_p): Likewise.
8708 (symtab_node::get_alias_target): Likewise.
8709 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
8710 (cgraph_local_p): Likewise.
8711 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
8712 (cgraph_edge::rebuild_references): Likewise.
8713 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
8714 (walk_polymorphic_call_targets): Likewise.
8715 (cgraph_node::expand_thunk): Likewise.
8716 (symbol_table::output_weakrefs): Likewise.
8717 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
8718 (ix86_handle_option): Likewise.
8719 * config/i386/constraints.md: Likewise.
8720 * config/i386/i386-builtin-types.def (BND): Likewise.
8724 * config/i386/i386-builtin.def (BDESC_END): Likewise.
8725 (BDESC_FIRST): Likewise.
8727 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
8728 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
8729 * config/i386/i386.c (enum reg_class): Likewise.
8730 (ix86_target_string): Likewise.
8731 (ix86_option_override_internal): Likewise.
8732 (ix86_conditional_register_usage): Likewise.
8733 (ix86_valid_target_attribute_inner_p): Likewise.
8734 (ix86_set_indirect_branch_type): Likewise.
8735 (ix86_set_current_function): Likewise.
8736 (ix86_function_arg_regno_p): Likewise.
8737 (init_cumulative_args): Likewise.
8738 (ix86_function_arg_advance): Likewise.
8739 (ix86_function_arg): Likewise.
8740 (ix86_pass_by_reference): Likewise.
8741 (ix86_function_value_regno_p): Likewise.
8742 (ix86_function_value_1): Likewise.
8743 (ix86_function_value_bounds): Likewise.
8744 (ix86_return_in_memory): Likewise.
8745 (ix86_setup_incoming_vararg_bounds): Likewise.
8746 (ix86_va_start): Likewise.
8747 (indirect_thunk_need_prefix): Likewise.
8748 (print_reg): Likewise.
8749 (ix86_print_operand): Likewise.
8750 (ix86_expand_call): Likewise.
8751 (ix86_output_function_return): Likewise.
8752 (reg_encoded_number): Likewise.
8753 (BDESC_VERIFYS): Likewise.
8754 (ix86_init_mpx_builtins): Likewise.
8755 (ix86_init_builtins): Likewise.
8756 (ix86_emit_cmove): Likewise.
8757 (ix86_emit_move_max): Likewise.
8758 (ix86_expand_builtin): Likewise.
8759 (ix86_builtin_mpx_function): Likewise.
8760 (ix86_get_arg_address_for_bt): Likewise.
8761 (ix86_load_bounds): Likewise.
8762 (ix86_store_bounds): Likewise.
8763 (ix86_load_returned_bounds): Likewise.
8764 (ix86_store_returned_bounds): Likewise.
8765 (ix86_class_likely_spilled_p): Likewise.
8766 (ix86_hard_regno_mode_ok): Likewise.
8767 (x86_order_regs_for_local_alloc): Likewise.
8768 (ix86_mitigate_rop): Likewise.
8769 (ix86_bnd_prefixed_insn_p): Likewise.
8770 (ix86_mpx_bound_mode): Likewise.
8771 (ix86_make_bounds_constant): Likewise.
8772 (ix86_initialize_bounds): Likewise.
8773 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
8774 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
8775 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
8776 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
8777 (TARGET_CHKP_BOUND_MODE): Likewise.
8778 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
8779 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
8780 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
8781 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
8782 * config/i386/i386.h (TARGET_MPX): Likewise.
8783 (TARGET_MPX_P): Likewise.
8784 (VALID_BND_REG_MODE): Likewise.
8785 (FIRST_BND_REG): Likewise.
8786 (LAST_BND_REG): Likewise.
8787 (enum reg_class): Likewise.
8788 (BND_REG_P): Likewise.
8789 (BND_REGNO_P): Likewise.
8790 (BNDmode): Likewise.
8791 (ADJUST_INSN_LENGTH): Likewise.
8792 * config/i386/i386.md: Likewise.
8793 * config/i386/i386.opt: Likewise.
8794 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
8795 (defined): Likewise.
8796 (LINK_MPX): Likewise.
8797 (MPX_SPEC): Likewise.
8798 (LIBMPX_SPEC): Likewise.
8799 (LIBMPXWRAPPERS_SPEC): Likewise.
8800 (CHKP_SPEC): Likewise.
8801 * config/i386/predicates.md: Likewise.
8802 * dbxout.c (dbxout_type): Likewise.
8803 * doc/extend.texi: Likewise.
8804 * doc/invoke.texi: Likewise.
8805 * doc/md.texi: Likewise.
8806 * doc/tm.texi: Likewise.
8807 * doc/tm.texi.in: Likewise.
8808 * dwarf2out.c (is_base_type): Likewise.
8809 (gen_formal_types_die): Likewise.
8810 (gen_subprogram_die): Likewise.
8811 (gen_type_die_with_usage): Likewise.
8812 (gen_decl_die): Likewise.
8813 (dwarf2out_late_global_decl): Likewise.
8814 * expr.c (expand_assignment): Likewise.
8815 (emit_storent_insn): Likewise.
8816 (store_expr_with_bounds): Likewise.
8817 (store_expr): Likewise.
8818 (expand_expr_real_1): Likewise.
8819 * expr.h (store_expr_with_bounds): Likewise.
8820 * function.c (use_register_for_decl): Likewise.
8821 (struct bounds_parm_data): Likewise.
8822 (assign_parms_augmented_arg_list): Likewise.
8823 (assign_parm_find_entry_rtl): Likewise.
8824 (assign_parm_is_stack_parm): Likewise.
8825 (assign_parm_load_bounds): Likewise.
8826 (assign_bounds): Likewise.
8827 (assign_parms): Likewise.
8828 (expand_function_start): Likewise.
8829 * gcc.c (CHKP_SPEC): Likewise.
8830 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
8831 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
8832 (wrestrict_dom_walker::check_call): Likewise.
8833 * gimple.c (gimple_build_call_from_tree): Likewise.
8834 * gimple.h (enum gf_mask): Likewise.
8835 (gimple_call_with_bounds_p): Likewise.
8836 (gimple_call_set_with_bounds): Likewise.
8837 * gimplify.c (gimplify_init_constructor): Likewise.
8838 * ipa-cp.c (initialize_node_lattices): Likewise.
8839 (propagate_constants_across_call): Likewise.
8840 (find_more_scalar_values_for_callers_subset): Likewise.
8841 * ipa-hsa.c (process_hsa_functions): Likewise.
8842 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
8843 * ipa-icf.c (sem_function::merge): Likewise.
8844 * ipa-inline.c (early_inliner): Likewise.
8845 * ipa-pure-const.c (warn_function_noreturn): Likewise.
8846 (warn_function_cold): Likewise.
8847 (propagate_pure_const): Likewise.
8848 * ipa-ref.h (enum GTY): Likewise.
8849 * ipa-split.c (find_retbnd): Likewise.
8850 (consider_split): Likewise.
8851 (split_function): Likewise.
8852 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
8853 * ipa.c (walk_polymorphic_call_targets): Likewise.
8854 (symbol_table::remove_unreachable_nodes): Likewise.
8855 (process_references): Likewise.
8856 (cgraph_build_static_cdtor_1): Likewise.
8857 * lto-cgraph.c (lto_output_node): Likewise.
8858 (output_refs): Likewise.
8859 (compute_ltrans_boundary): Likewise.
8860 (input_overwrite_node): Likewise.
8861 (input_node): Likewise.
8862 (input_cgraph_1): Likewise.
8863 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
8864 * passes.c (pass_manager::execute_early_local_passes): Likewise.
8865 (class pass_chkp_instrumentation_passes): Likewise.
8866 (make_pass_chkp_instrumentation_passes): Likewise.
8867 * passes.def: Likewise.
8868 * rtl.h (struct GTY): Likewise.
8869 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
8870 * stor-layout.c (layout_type): Likewise.
8871 * symtab.c: Likewise.
8872 * target.def: Likewise.
8873 * targhooks.c (default_chkp_bound_type): Likewise.
8874 (default_chkp_bound_mode): Likewise.
8875 (default_builtin_chkp_function): Likewise.
8876 (default_chkp_function_value_bounds): Likewise.
8877 (default_chkp_make_bounds_constant): Likewise.
8878 (default_chkp_initialize_bounds): Likewise.
8879 * targhooks.h (default_chkp_bound_type): Likewise.
8880 (default_chkp_bound_mode): Likewise.
8881 (default_builtin_chkp_function): Likewise.
8882 (default_chkp_function_value_bounds): Likewise.
8883 (default_chkp_make_bounds_constant): Likewise.
8884 (default_chkp_initialize_bounds): Likewise.
8885 * toplev.c (compile_file): Likewise.
8886 (process_options): Likewise.
8887 * tree-core.h (DEF_BUILTIN): Likewise.
8888 (DEF_BUILTIN_CHKP): Likewise.
8889 * tree-inline.c (declare_return_variable): Likewise.
8890 (remap_gimple_stmt): Likewise.
8891 (copy_bb): Likewise.
8892 (initialize_inlined_parameters): Likewise.
8893 (expand_call_inline): Likewise.
8894 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
8895 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
8896 (make_pass_ipa_chkp_produce_thunks): Likewise.
8897 (make_pass_chkp): Likewise.
8898 (make_pass_chkp_opt): Likewise.
8899 (make_pass_chkp_instrumentation_passes): Likewise.
8900 * tree-pretty-print.c (dump_generic_node): Likewise.
8901 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
8902 * tree-ssa-dce.c (propagate_necessity): Likewise.
8903 (eliminate_unnecessary_stmts): Likewise.
8904 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
8905 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
8906 * tree-ssa-sccvn.h: Likewise.
8907 * tree-ssa-strlen.c (get_string_length): Likewise.
8908 (valid_builtin_call): Likewise.
8909 (adjust_last_stmt): Likewise.
8910 (handle_builtin_strchr): Likewise.
8911 (handle_builtin_strcpy): Likewise.
8912 (handle_builtin_stxncpy): Likewise.
8913 (handle_builtin_memcpy): Likewise.
8914 (handle_builtin_strcat): Likewise.
8915 (strlen_check_and_optimize_stmt): Likewise.
8916 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
8917 * tree-streamer-in.c: Likewise.
8918 * tree-streamer.c (record_common_node): Likewise.
8919 * tree.c (tree_code_size): Likewise.
8920 (wide_int_to_tree_1): Likewise.
8921 (type_contains_placeholder_1): Likewise.
8922 (build_common_tree_nodes): Likewise.
8923 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
8924 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
8925 (POINTER_BOUNDS_P): Likewise.
8926 (BOUNDED_TYPE_P): Likewise.
8927 (BOUNDED_P): Likewise.
8928 (CALL_WITH_BOUNDS_P): Likewise.
8929 (pointer_bounds_type_node): Likewise.
8930 * value-prof.c (gimple_ic): Likewise.
8931 * var-tracking.c (vt_add_function_parameters): Likewise.
8932 * varasm.c (make_decl_rtl): Likewise.
8933 (assemble_start_function): Likewise.
8934 (output_constant): Likewise.
8935 (maybe_assemble_visibility): Likewise.
8936 * varpool.c (ctor_for_folding): Likewise.
8937 * chkp-builtins.def: Remove.
8938 * ipa-chkp.c: Remove.
8939 * ipa-chkp.h: Remove.
8940 * rtl-chkp.c: Remove.
8941 * rtl-chkp.h: Remove.
8942 * tree-chkp-opt.c: Remove.
8943 * tree-chkp.c: Remove.
8944 * tree-chkp.h: Remove.
8946 2018-06-07 Carl Love <cel@us.ibm.com>
8948 * config/rs6000/vsx.md (vextract_fp_from_shorth,
8949 vextract_fp_from_shortl): Add BE support.
8951 2018-06-07 Paul Koning <ni1d@arrl.net>
8953 * compare-elim.c (try_merge_compare): Don't merge compare if
8954 address contains a side effect.
8955 (try_eliminate_compare): Likewise.
8957 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
8959 * config.gcc: Support "tremont".
8960 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
8961 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8963 * config/i386/i386.c (m_TREMONT): Define.
8964 (processor_target_table): Add "tremont".
8965 (PTA_TREMONT): Define.
8966 (ix86_lea_outperforms): Add TARGET_TREMONT.
8967 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
8968 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
8969 and M_INTEL_GOLDMONT_PLUS.
8970 (fold_builtin_cpu): Add "tremont".
8971 (ix86_add_stmt_cost): Add TARGET_TREMONT.
8972 (ix86_option_override_internal): Add "tremont".
8973 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
8974 (processor_type): Add PROCESSOR_TREMONT.
8975 * config/i386/x86-tune.def: Add m_TREMONT.
8976 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
8978 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8980 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
8981 symbol defined for msp430i* devices to be lower case.
8983 2018-06-07 Richard Biener <rguenther@suse.de>
8985 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
8986 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
8987 Properly wrap signed arithmetic if overflow wraps.
8989 2018-06-07 Jakub Jelinek <jakub@redhat.com>
8991 PR tree-optimization/69615
8992 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
8993 of a cast from a same precision integral SSA_NAME in a bb dominated
8994 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
8995 cast to utype if rhs2 has already a compatible type.
8997 2018-06-07 Richard Biener <rguenther@suse.de>
8999 PR tree-optimization/85935
9000 * graphite-scop-detection.c (find_params_in_bb): Analyze
9001 condition operands with respect to the correct loop. Assert
9002 the analysis doesn't fail.
9004 2018-06-04 Carl Love <cel@us.ibm.com>
9006 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
9007 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
9008 as it is slightly cheaper.
9009 (first_match_or_eos_index_<mode>):
9010 Calculate index using natural element order.
9011 (first_match_index_<mode>):
9012 Calculate index using natural element order.
9013 (first_match_or_eos_index_<mode>):
9014 Calculate index using natural order.
9015 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
9016 for BE and LE modes.
9017 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
9018 P9V_BUILTIN_VCLZLSBB_V16QI.
9019 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
9022 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
9024 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
9025 indentation and line wrap for many prototypes. Add missing
9026 @smallexample directives around block of prototypes for vec_xl and
9029 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
9031 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
9032 track if we pass or return IEEE 128-bit floating point.
9033 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
9034 C++ mangling that is compatible with GCC 8.1.
9035 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
9036 (init_cumulative_args): Note if we pass or return IEEE 128-bit
9037 floating point types.
9038 (rs6000_function_arg_advance_1): Likewise.
9039 (rs6000_mangle_type): Optionally generate mangled names that match
9040 what GCC 8.1 generated for IEEE 128-bit floating point types.
9041 (rs6000_globalize_decl_name): If we have an external function that
9042 passes or returns IEEE 128-bit types, generate a weak reference
9043 from the mangled name used in GCC 8.1 to the current mangled
9045 (rs6000_init_builtins): Make __ibm128 use the long double type if
9046 long double is IBM extended double. Make __float128 use the long
9047 double type if long double is IEEE 128-bit.
9050 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
9051 macro for __ibm128 built-in functions.
9052 (PACK_IF): Add __ibm128 pack/unpack functions.
9053 (UNPACK_IF): Likewise.
9054 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
9055 enable long double built-in functions if long double is IEEE
9056 128-bit floating point.
9057 (rs6000_invalid_builtin): Update long double built-in function
9059 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
9060 functions, adjust the built-in function to use the long double
9061 built-in function if __ibm128 and long double are the same type.
9062 * doc/extend.texi (PowerPC builtins): Update documention for
9063 __builtin_{,un}pack_longdouble. Add documentation for
9064 __builtin_{,un}pack_ibm128.
9066 2018-06-06 Jim Wilson <jimw@sifive.com>
9068 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
9069 (struct machine_function): New field interrupt_mode.
9070 (riscv_handle_type_attribute): New function. Add forward declaration.
9071 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
9072 (riscv_expand_epilogue): Check interrupt_mode field.
9073 (riscv_set_current_function): Check interrupt attribute args and
9074 set interrupt_mode field.
9075 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
9076 (riscv_sret, riscv_uret): New.
9077 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
9078 new arguments to interrupt attribute.
9080 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
9083 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
9084 Don't handle -mcpu=power8 if -mpower9-vector is also used.
9086 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
9088 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
9089 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
9090 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
9091 several redundant entries.
9093 2018-06-06 David Malcolm <dmalcolm@redhat.com>
9095 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
9096 type from "rtx" to "rtx_insn *".
9097 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
9098 for local "call_insn", removing cast.
9099 (ix86_expand_call): Likewise, introducing a "call_insn" local.
9101 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
9103 PR tree-optimization/86066
9104 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
9105 for BIT_INSERT_EXPR stores.
9107 2018-06-06 Richard Biener <rguenther@suse.de>
9109 PR tree-optimization/86062
9110 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
9111 component refs ontop
9112 of to be offsetted base.
9114 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9116 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
9117 to be static and remove check on interrupt attribute name.
9119 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
9121 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
9122 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
9124 2018-06-05 Steve Ellcey <sellcey@cavium.com>
9127 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
9129 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
9130 Remove second argument, change how error is called.
9131 (aarch64_layout_arg): Remove second argument from
9132 aarch64_err_no_fpadvsimd call.
9133 (aarch64_init_cumulative_args): Ditto.
9134 (aarch64_gimplify_va_arg_expr): Ditto.
9135 * config/aarch64/aarch64.md (mov<mode>): Ditto.
9137 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
9139 * config/i386/i386.md (simple_return_indirect_internal): New expander.
9140 (*simple_return_indirect_internal<mode>): Rename from
9141 simple_return_indirect_internal. Use W mode iterator.
9142 (rstorssp): New expander.
9143 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
9144 (clrssbsy): New expander.
9145 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
9147 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
9149 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
9151 (cmse_check_pointed_object): Likewise.
9153 2018-06-05 Martin Liska <mliska@suse.cz>
9155 PR gcov-profile/47618
9156 * doc/invoke.texi: Document how -fprofile-dir format
9159 2018-06-05 Richard Biener <rguenther@suse.de>
9161 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
9162 removal pretend DOM info isn't available so we do not update
9163 it and only remove edges, not dominated blocks. Actually free
9164 DOM info in case we removed something. Remove unreachable blocks.
9165 (mfb_keep_latches): Work with either DOM info or marked backedges.
9166 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
9167 first. Mark backedges if DOM info isn't available.
9168 (Re-)compute DOM info after cleanup_control_flow_pre.
9170 2018-06-05 Richard Biener <rguenther@suse.de>
9172 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
9173 (locus_discrim_hasher::hash): Adjust.
9174 (locus_discrim_hasher::equal): Likewise.
9175 (next_discriminator_for_locus): Work on line directly.
9176 (same_line_p): Pass in expanded locus1 as well.
9177 (assign_discriminators): Avoid redundant location expansions.
9179 2018-06-05 Richard Biener <rguenther@suse.de>
9181 PR tree-optimization/86046
9182 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
9183 if required after clearing TREE_ADDRESSABLE.
9185 2018-06-05 Richard Biener <rguenther@suse.de>
9187 PR tree-optimization/86047
9188 * tree-ssa-loop.c (for_each_index): Glob handling of all
9189 decls and constants and really handle all of them.
9191 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9194 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
9195 qualifier_void_pointer and qualifier_const_void_pointer.
9196 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
9197 (arm_init_builtins): Handle the above.
9198 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
9199 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
9200 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
9203 2018-06-05 Martin Liska <mliska@suse.cz>
9205 * auto-profile.c (read_autofdo_file): Do not use
9206 gcov_ctr_summary struct.
9207 (afdo_callsite_hot_enough_for_early_inline): Likewise.
9208 * coverage.c (struct counts_entry): Likewise.
9209 (read_counts_file): Read just single summary entry.
9210 (get_coverage_counts): Use gcov_summary struct.
9211 * coverage.h (get_coverage_counts): Likewise.
9212 * gcov-dump.c (dump_working_sets): Likewise.
9213 (tag_summary): Dump just single summary.
9214 * gcov-io.c (gcov_write_summary): Write just histogram
9216 (gcov_read_summary): Read just single summary.
9217 (compute_working_sets): Use gcov_summary struct.
9218 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
9219 of GCOV_COUNTERS_SUMMABLE.
9220 (GCOV_COUNTERS_SUMMABLE): Remove.
9221 (GCOV_FIRST_VALUE_COUNTER): Replace with
9222 GCOV_COUNTER_V_INTERVAL.
9223 (struct gcov_ctr_summary): Remove.
9224 (struct gcov_summary): Directly use fields of former
9226 (compute_working_sets): Use gcov_summary struct.
9227 * gcov.c (read_count_file): Do not use ctrs fields.
9228 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
9230 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
9232 * profile.c: Likewise.
9233 * profile.h: Likewise.
9235 2018-06-05 Martin Liska <mliska@suse.cz>
9237 PR gcov-profile/84846
9238 * gcov.c (output_lines): Print working directory only
9239 in intermediate format.
9241 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
9243 * config/s390/s390-builtin-types.def: Add void function type.
9244 * config/s390/s390-builtins.def: Use the function type for the
9247 2018-06-04 Jim Wilson <jimw@sifive.com>
9249 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
9251 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
9252 and maybe_eh_return. Change regno to unsigned int. Use new args to
9253 handle EH_RETURN_DATA_REGNO registers properly.
9254 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
9255 (riscv_expand_epilogue): Update comment. Change argument name and
9256 type. Update code to use new name and type. Pass new args to
9257 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
9259 * config/riscv/riscv.md (NORMAL_RETURN): New.
9260 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
9261 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
9262 (eh_return): Call gen_eh_return_internal and emit barrier.
9263 (eh_return_internal): Call riscv_expand_epilogue.
9265 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
9267 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
9268 bit_insertion field and declare can_be_merged_into method.
9269 (merged_store_group::can_be_merged_into): New method.
9270 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
9271 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
9272 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
9274 2018-06-04 Richard Biener <rguenther@suse.de>
9276 PR tree-optimization/85955
9277 * builtins.c (fold_builtin_sincos): Convert pointers to
9278 destination to appropriate type before dereferencing.
9280 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
9282 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
9284 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
9286 * expr.c (expand_expr_real_1): Force the operand into memory if
9287 its TYPE_MODE is BLKmode and if there is no integer mode for
9288 the number of bits being extracted.
9290 2018-06-04 Jakub Jelinek <jakub@redhat.com>
9294 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
9295 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
9297 2018-06-04 Richard Biener <rguenther@suse.de>
9299 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
9300 (cleanup_tree_cfg_noloop): ... single caller. Do
9301 start_recording_case_labels later.
9303 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
9305 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
9306 to _IMMINTRIN_H_INCLUDED.
9307 * config/i386/pconfigintrin.h: Ditto.
9308 * config/i386/waitpkgintrin.h: Ditto.
9309 * config/i386/immintrin.h: Add includes for sgxintrin.h,
9310 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
9311 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
9312 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
9313 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
9314 waitpkgintrin.h and cldemoteintrin.h.
9316 2018-06-04 Richard Biener <rguenther@suse.de>
9318 PR tree-optimization/86038
9319 * tracer.c (find_best_successor): Check probability for
9320 being initialized, bail out if not.
9322 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
9325 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
9326 of bits to ignore when comparing architectures.
9328 2018-06-04 Jakub Jelinek <jakub@redhat.com>
9330 PR tree-optimization/69615
9331 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
9332 maximum or minimum of the type, try to merge it also as if
9333 range1 is + [-, x - 1] or + [x + 1, -].
9336 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
9338 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
9340 PR tree-optimization/86034
9341 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
9342 the unsigned bitfield type in a bit insertion sequence if it does not
9343 have a larger precision than the bitfield size.
9344 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
9346 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
9348 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
9350 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
9352 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
9353 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
9354 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
9355 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
9357 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
9359 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
9360 Disable -fdelete-null-pointer-checks for ELF toolchain.
9362 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
9363 Kito Cheng <kito.cheng@gmail.com>
9365 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
9366 (nds32le-*-*, nds32be-*-*): Integrate checking process.
9367 (nds32*-*-*): Add glibc and uclibc conditions.
9368 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
9369 (TARGET_EXCEPT_UNWIND_INFO): Define.
9370 * config/nds32/elf.h: New file.
9371 * config/nds32/linux.h: New file.
9372 * config/nds32/nds32-elf.opt: New file.
9373 * config/nds32/nds32-linux.opt: New file.
9374 * config/nds32/nds32-fp-as-gp.c
9375 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
9376 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
9378 (nds32_asm_file_end): Ditto.
9379 (nds32_print_operand): Ditto.
9380 (nds32_insert_attributes): Ditto.
9381 (nds32_init_libfuncs): New function.
9382 (TARGET_HAVE_TLS): Define.
9383 (TARGET_INIT_LIBFUNCS): Define.
9384 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
9386 (TARGET_ELF): Apply different mcmodel setting.
9387 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
9388 been migrated into elf.h and linux.h files.
9389 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
9390 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
9391 (mcmodel): The content has been migrated into nds32-elf.opt and
9392 nds32-linux.opt files.
9393 * config/nds32/t-elf: New file.
9394 * config/nds32/t-linux: New file.
9396 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
9397 Shiva Chen <shiva0217@gmail.com>
9399 * config/nds32/constants.md (unspec_volatile_element): Add
9400 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
9401 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
9403 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
9404 (make_pass_nds32_fp_as_gp): Declare.
9405 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
9407 (nds32_asm_function_end_prologue): Remove unused asm output.
9408 (nds32_asm_function_begin_epilogue): Remove unused asm output.
9409 (nds32_asm_file_start): Output necessary fp_as_gp information.
9410 (nds32_option_override): Adjust register usage.
9411 (nds32_expand_prologue): Consider fp_as_gp situation.
9412 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
9413 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
9416 (simple_return): Ditto.
9417 (omit_fp_begin): Output special directive for fp_as_gp.
9418 (omit_fp_end): Output special directive for fp_as_gp.
9419 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
9420 mforbid-fp-as-gp): New options.
9422 2018-06-01 Mark Wielaard <mark@klomp.org>
9424 * dwarf2out.c (dwarf2out_finish): Remove generation of
9425 DW_AT_loclists_base.
9427 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
9429 * gimple-ssa-store-merging.c: Include gimple-fold.h.
9430 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
9431 (struct merged_store_group): Add bit_insertion field.
9432 (dump_char_array): Use standard hexadecimal format.
9433 (merged_store_group::merged_store_group): Set bit_insertion to false.
9434 (merged_store_group::apply_stores): Use optimal buffer size. Deal
9435 with BIT_INSERT_EXPR stores. Move up code updating the mask and
9436 also print the mask in the dump file.
9437 (pass_store_merging::gate): Minor tweak.
9438 (imm_store_chain_info::coalesce_immediate): Fix wrong association
9439 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
9440 stores with INTEGER_CST stores.
9441 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
9442 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
9443 and use it throughout. Generate bit insertion sequences if need be.
9444 (pass_store_merging::process_store): Remove redundant condition.
9445 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
9447 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
9449 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
9450 the 128-bit floating point types. Fix function comment.
9452 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9454 * config/aarch64/aarch64-simd.md
9455 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
9457 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
9460 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
9462 PR tree-optimization/85989
9463 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
9465 (backprop::intersect_uses): Check it when deciding whether this
9466 is a backedge reference.
9467 (backprop::process_block): Add each phi to m_visited_phis
9468 after visiting it, then clear it at the end.
9470 2018-06-01 Richard Biener <rguenther@suse.de>
9472 * tree-vectorizer.h (vect_dr_stmt): New function.
9473 (vect_get_load_cost): Adjust.
9474 (vect_get_store_cost): Likewise.
9475 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
9476 Use vect_dr_stmt instead of DR_SMTT.
9477 (vect_record_base_alignments): Likewise.
9478 (vect_calculate_target_alignment): Likewise.
9479 (vect_compute_data_ref_alignment): Likewise and make static.
9480 (vect_update_misalignment_for_peel): Likewise.
9481 (vect_verify_datarefs_alignment): Likewise.
9482 (vector_alignment_reachable_p): Likewise.
9483 (vect_get_data_access_cost): Likewise. Pass down
9484 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
9485 (vect_get_peeling_costs_all_drs): Likewise.
9486 (vect_peeling_hash_get_lowest_cost): Likewise.
9487 (vect_enhance_data_refs_alignment): Likewise.
9488 (vect_find_same_alignment_drs): Likewise.
9489 (vect_analyze_data_refs_alignment): Likewise.
9490 (vect_analyze_group_access_1): Likewise.
9491 (vect_analyze_group_access): Likewise.
9492 (vect_analyze_data_ref_access): Likewise.
9493 (vect_analyze_data_ref_accesses): Likewise.
9494 (vect_vfa_segment_size): Likewise.
9495 (vect_small_gap_p): Likewise.
9496 (vectorizable_with_step_bound_p): Likewise.
9497 (vect_prune_runtime_alias_test_list): Likewise.
9498 (vect_analyze_data_refs): Likewise.
9499 (vect_supportable_dr_alignment): Likewise.
9500 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
9501 (vect_gen_prolog_loop_niters): Likewise.
9502 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
9503 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
9505 (vect_recog_mask_conversion_pattern): Likewise.
9506 (vect_try_gather_scatter_pattern): Likewise.
9507 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
9508 to vect_get_store_cost.
9509 (vect_get_store_cost): Get stmt_info instead of DR.
9510 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
9511 (vect_get_load_cost): Get stmt_info instead of DR.
9513 2018-06-01 Richard Biener <rguenther@suse.de>
9516 * gimple-fold.c (var_decl_component_p): Also allow offsetted
9517 vars wrapped in MEM_REFs.
9519 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
9521 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
9522 Fix subreg tests so that we only return a choice between
9523 GENERAL_REGS and FP_REGS if the original classes included both.
9525 2018-06-01 Richard Biener <rguenther@suse.de>
9528 * tree-ssa-structalias.c (get_function_part_constraint):
9529 Handle NULL fi->decl.
9530 (find_func_aliases_for_call): Properly handle indirect
9531 fi from direct call.
9532 (find_func_clobbers): Likewise.
9533 (ipa_pta_execute): Likewise.
9534 (create_variable_info_for): For functions that are ifunc_resolver
9535 resolve to a varinfo that contains the result of the resolver call.
9536 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
9539 2018-05-31 Michael Collison <michael.collison@arm.com>
9541 * config/aarch64/aarch64.md:
9542 (*fix_to_zero_extenddfdi2): New pattern.
9543 * gcc.target/aarch64/fix_extend1.c: New testcase.
9545 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
9549 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
9550 and BUILT_IN_STRNCMP_EQ.
9551 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
9552 BUILT_IN_STRNCMP_EQ.
9553 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
9554 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
9555 (gimple_fold_builtin): Likewise.
9556 * tree-ssa-strlen.c (compute_string_length): New function.
9557 (determine_min_obsize): New function.
9558 (handle_builtin_string_cmp): New function to handle calls to
9559 string compare functions.
9560 (strlen_optimize_stmt): Add handling to builtin string compare
9562 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
9563 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
9564 * tree.c (build_common_builtin_nodes): Add new defines of
9565 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
9567 2018-05-31 Jakub Jelinek <jakub@redhat.com>
9570 * bb-reorder.c (pass_partition_blocks::gate): Return false for
9571 functions with naked attribute.
9573 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
9575 * config/i386/sse.md (avx_vec_concat<mode>):
9576 Substitute concat_tg_mode mode attribute with xtg_mode.
9577 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
9578 (concat_tg_mode): Remove mode attribute.
9580 2018-05-31 Martin Sebor <msebor@redhat.com>
9583 * calls.c (alloc_max_size): Correct a logic error/typo.
9584 Treat excessive arguments as infinite. Warn for invalid arguments.
9585 * doc/invoke.texi (-Walloc-size-larger-than): Update.
9587 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
9590 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
9591 and movx for Haswell.
9593 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
9594 Cesar Philippidis <cesar@codesourcery.com>
9597 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
9598 when emitting error on private/firstprivate reductions.
9599 * omp-low.c (lower_omp_target): Avoid reference-type processing
9600 on pointers for firstprivate clause.
9602 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
9604 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
9607 * config/aarch64/aarch64-simd.md
9608 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
9609 (aarch64_ld1_x3_<mode>): Likewise
9610 (aarch64_st1x2<VALLDIF:mode>): Likewise
9611 (aarch64_st1_x2_<mode>): Likewise
9612 (aarch64_st1x3<VALLDIF:mode>): Likewise
9613 (aarch64_st1_x3_<mode>): Likewise
9614 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
9615 (vld1_s8_x3): Likewise.
9616 (vld1_u16_x3): Likewise.
9617 (vld1_s16_x3): Likewise.
9618 (vld1_u32_x3): Likewise.
9619 (vld1_s32_x3): Likewise.
9620 (vld1_u64_x3): Likewise.
9621 (vld1_s64_x3): Likewise.
9622 (vld1_f16_x3): Likewise.
9623 (vld1_f32_x3): Likewise.
9624 (vld1_f64_x3): Likewise.
9625 (vld1_p8_x3): Likewise.
9626 (vld1_p16_x3): Likewise.
9627 (vld1_p64_x3): Likewise.
9628 (vld1q_u8_x3): Likewise.
9629 (vld1q_s8_x3): Likewise.
9630 (vld1q_u16_x3): Likewise.
9631 (vld1q_s16_x3): Likewise.
9632 (vld1q_u32_x3): Likewise.
9633 (vld1q_s32_x3): Likewise.
9634 (vld1q_u64_x3): Likewise.
9635 (vld1q_s64_x3): Likewise.
9636 (vld1q_f16_x3): Likewise.
9637 (vld1q_f32_x3): Likewise.
9638 (vld1q_f64_x3): Likewise.
9639 (vld1q_p8_x3): Likewise.
9640 (vld1q_p16_x3): Likewise.
9641 (vld1q_p64_x3): Likewise.
9642 (vst1_s64_x2): Likewise.
9643 (vst1_u64_x2): Likewise.
9644 (vst1_f64_x2): Likewise.
9645 (vst1_s8_x2): Likewise.
9646 (vst1_p8_x2): Likewise.
9647 (vst1_s16_x2): Likewise.
9648 (vst1_p16_x2): Likewise.
9649 (vst1_s32_x2): Likewise.
9650 (vst1_u8_x2): Likewise.
9651 (vst1_u16_x2): Likewise.
9652 (vst1_u32_x2): Likewise.
9653 (vst1_f16_x2): Likewise.
9654 (vst1_f32_x2): Likewise.
9655 (vst1_p64_x2): Likewise.
9656 (vst1q_s8_x2): Likewise.
9657 (vst1q_p8_x2): Likewise.
9658 (vst1q_s16_x2): Likewise.
9659 (vst1q_p16_x2): Likewise.
9660 (vst1q_s32_x2): Likewise.
9661 (vst1q_s64_x2): Likewise.
9662 (vst1q_u8_x2): Likewise.
9663 (vst1q_u16_x2): Likewise.
9664 (vst1q_u32_x2): Likewise.
9665 (vst1q_u64_x2): Likewise.
9666 (vst1q_f16_x2): Likewise.
9667 (vst1q_f32_x2): Likewise.
9668 (vst1q_f64_x2): Likewise.
9669 (vst1q_p64_x2): Likewise.
9670 (vst1_s64_x3): Likewise.
9671 (vst1_u64_x3): Likewise.
9672 (vst1_f64_x3): Likewise.
9673 (vst1_s8_x3): Likewise.
9674 (vst1_p8_x3): Likewise.
9675 (vst1_s16_x3): Likewise.
9676 (vst1_p16_x3): Likewise.
9677 (vst1_s32_x3): Likewise.
9678 (vst1_u8_x3): Likewise.
9679 (vst1_u16_x3): Likewise.
9680 (vst1_u32_x3): Likewise.
9681 (vst1_f16_x3): Likewise.
9682 (vst1_f32_x3): Likewise.
9683 (vst1_p64_x3): Likewise.
9684 (vst1q_s8_x3): Likewise.
9685 (vst1q_p8_x3): Likewise.
9686 (vst1q_s16_x3): Likewise.
9687 (vst1q_p16_x3): Likewise.
9688 (vst1q_s32_x3): Likewise.
9689 (vst1q_s64_x3): Likewise.
9690 (vst1q_u8_x3): Likewise.
9691 (vst1q_u16_x3): Likewise.
9692 (vst1q_u32_x3): Likewise.
9693 (vst1q_u64_x3): Likewise.
9694 (vst1q_f16_x3): Likewise.
9695 (vst1q_f32_x3): Likewise.
9696 (vst1q_f64_x3): Likewise.
9697 (vst1q_p64_x3): Likewise.
9699 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9701 * config/msp430/msp430.c (msp430_output_labelref): Prepend
9702 user_label_prefix to name.
9704 * tree-core.h: Update comment about the format of NAME string
9705 passed to handler in attribute_spec.
9707 * config/msp430/msp430.md: Remove erroneous subreg expression from
9708 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
9709 zero_extend{q,h}isi2.
9711 2018-05-30 Borislav Petkov <bp@suse.de>
9713 * doc/extend.texi: Document some architecture specific
9714 constraints and sort entries.
9716 2018-05-30 Martin Sebor <msebor@redhat.com>
9719 * builtins.c (expand_builtin_stpcpy_1): New function.
9720 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
9721 only if the former succeeds.
9723 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
9725 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
9728 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9730 * doc/invoke.texi (-flinker-output): Document
9732 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9734 * passes.c (ipa_write_summaries): Only modify statements if body
9736 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
9737 incrementally linking.
9738 (ipa_passes): Likewise.
9739 * lto-cgraph.c (lto_output_node): When incrementally linking do not
9740 pass down resolution info.
9741 * common.opt (flag_incremental_link): Update info.
9742 * gcc.c (plugin specs): Turn flinker-output=* to
9743 -plugin-opt=-linker-output-known
9744 * toplev.c (compile_file): Also cut compilation when doing incremental
9746 * flag-types. (enum lto_partition_model): Add
9747 LTO_LINKER_OUTPUT_NOLTOREL.
9748 (invoke.texi): Add -flinker-output docs.
9749 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
9750 link same way as WPA; do not stream in dead initializers.
9752 * dwarf2out.c (dwarf2out_die_ref_for_decl,
9753 darf2out_register_external_decl): Support incremental link.
9755 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9757 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
9759 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9761 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
9762 it down to simple_object_copy_lto_debug_sections.
9763 (run_gcc): Determine incremental LTO link time and configure
9764 lto1 into non-wpa mode, disable renaming of debug sections.
9766 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
9768 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
9769 descriptions of various incorrectly documented functions.
9771 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
9774 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9775 address check not strict.
9777 2018-05-30 Richard Biener <rguenther@suse.de>
9779 PR tree-optimization/85964
9780 * tracer.c (better_p): Drop initialized count check, we only
9781 call the function with initialized counts now.
9782 (find_best_successor): Do find a best edge if one
9783 has uninitialized count.
9784 (find_best_predecessor): Likewise. Do BB frequency check only
9785 if count is initialized.
9787 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
9789 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
9790 (aarch64_ldrstr_offset_compare): New.
9791 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
9792 load/store orderings.
9793 (aarch64_gen_adjusted_ldpstp): Likewise.
9795 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
9797 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
9798 Check for subset of GENERAL_REGS and FP_REGS.
9799 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
9802 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
9804 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
9805 and wi::to_poly_offset. Add the current offset and then check
9806 whether the sum fits, rather than using an unchecked addition of
9807 a checked term. Check for a shwi rather than a uhwi.
9808 * expr.c (get_bit_range): Use tree_to_poly_uint64.
9809 (store_constructor): Use poly_int_tree_p.
9810 (expand_expr_real_1): Likewise.
9811 * function.c (assign_temp): Likewise.
9812 * fold-const.c (const_binop): Use poly_int_tree_p and
9814 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
9816 * ipa-icf-gimple.c (func_checker::compare_operand): Use
9817 to_poly_offset for MEM offsets.
9818 * ipa-icf.c (sem_variable::equals): Likewise.
9819 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
9820 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
9821 wi::to_poly_offset for BIT_FIELD_REF offsets.
9822 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
9824 * var-tracking.c (emit_note_insn_var_location): Use
9825 tree_to_poly_uint64.
9827 2018-05-29 Jim Wilson <jimw@sifive.com>
9829 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
9831 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
9834 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
9835 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
9837 (sse4_1_round<mode>2): Use nonimmediate_operand
9838 for operand 1 predicate.
9840 2018-05-29 Martin Sebor <msebor@redhat.com>
9841 Richard Biener <rguenther@suse.de>
9844 * calls.c (get_size_range): Call determine_value_range instead
9845 of get_value_range..
9846 * tree-vrp.h (determine_value_range): Declared new function.
9847 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
9849 2018-05-29 Richard Biener <rguenther@suse.de>
9851 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
9852 sure to use non-pattern stmts for get_earlier_stmt arguments.
9853 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
9854 called on pattern stmts.
9855 (get_later_stmt): Likewise.
9857 2018-05-29 Martin Liska <mliska@suse.cz>
9859 PR gcov-profile/85759
9860 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
9863 2018-05-29 Jakub Jelinek <jakub@redhat.com>
9865 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
9867 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
9871 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
9872 VEC_PACK_FLOAT_EXPR): New tree codes.
9873 * tree-pretty-print.c (op_code_prio): Handle
9874 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
9875 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
9876 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
9877 * tree-inline.c (estimate_operator_cost): Likewise.
9878 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
9879 * fold-const.c (const_binop): Likewise.
9880 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
9881 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
9882 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
9883 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
9884 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
9885 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
9886 * expr.c (expand_expr_real_2): Likewise.
9887 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
9888 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
9889 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
9891 * optabs.c (expand_widen_pattern_expr): For
9892 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
9893 sign from result type rather than operand's type.
9894 (expand_binop_directly): For vec_packu_float_optab and
9895 vec_packs_float_optab allow result type to be different from operand's
9897 * optabs-tree.c (optab_for_tree_code): Handle
9898 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
9899 VEC_PACK_FLOAT_EXPR. Formatting fixes.
9900 * tree-vect-generic.c (expand_vector_operations_1): Handle
9901 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
9902 VEC_PACK_FLOAT_EXPR.
9903 * tree-vect-stmts.c (supportable_widening_operation): Handle
9905 (supportable_narrowing_operation): Handle FLOAT_EXPR.
9906 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
9907 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
9908 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
9909 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
9911 (vec_pack<floatprefix>_float_<mode>): New expander.
9912 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
9914 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
9915 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
9916 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
9917 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
9918 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
9920 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
9921 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
9922 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
9923 VEC_PACK_FLOAT_EXPR): Document.
9925 2018-05-29 Richard Biener <rguenther@suse.de>
9927 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
9929 (stmt_vec_info_vec): Make pointer.
9930 (init_stmt_vec_info_vec): Remove.
9931 (free_stmt_vec_info_vec): Likewise.
9932 (set_stmt_vec_info_vec): New function.
9933 (free_stmt_vec_infos): Likewise.
9934 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
9935 (set_vinfo_for_stmt): Likewise.
9936 (get_earlier_stmt): Likewise.
9937 (get_later_stmt): Likewise.
9938 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
9939 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
9940 (vec_info::~vec_info): Free stmt_vec_infos.
9941 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
9942 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
9943 (pass_slp_vectorize::execute): Likewise.
9944 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
9945 (free_stmt_vec_info_vec): Likewise.
9946 (set_stmt_vec_info_vec): New function.
9947 (free_stmt_vec_infos): Likewise.
9948 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
9949 the global stmt_vec_info_vec.
9950 * tree-parloops.c (gather_scalar_reductions): Use
9951 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
9954 2018-05-29 Richard Biener <rguenther@suse.de>
9956 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
9958 2018-05-29 Martin Liska <mliska@suse.cz>
9959 David Malcolm <dmalcolm@redhat.com>
9961 * vec.c (test_reverse): New.
9962 (vec_c_tests): Add new test.
9963 * vec.h (vl_ptr>::reverse): New function.
9965 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
9967 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
9969 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
9972 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
9974 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
9976 2018-05-28 Richard Biener <rguenther@suse.de>
9978 PR tree-optimization/85933
9979 * tree-vect-data-refs.c (vect_record_base_alignments): Only
9980 look at stmts marked as vectorizable.
9982 2018-05-28 Richard Biener <rguenther@suse.de>
9984 PR tree-optimization/85934
9985 * tree-vect-generic.c (expand_vector_operations_1): Hoist
9986 vector boolean check before scalar optimization.
9988 2018-05-28 Jakub Jelinek <jakub@redhat.com>
9990 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
9993 2018-05-28 Mark Wielaard <mark@klomp.org>
9995 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
9996 if it is an expression containing a minus sign.
9998 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
10000 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
10002 2018-05-27 Paul Koning <ni1d@arrl.net>
10004 * config/pdp11/pdp11.md (truncsihi2): Remove.
10006 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
10007 Chung-Ju Wu <jasonwucj@gmail.com>
10009 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
10011 (unaligned_store_dw): Ditto.
10012 * config/nds32/nds32-memory-manipulation.c
10013 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
10014 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
10015 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
10016 (emit_setmem_word_loop): Rename to ...
10017 (emit_setmem_doubleword_loop): ... this.
10018 (nds32_gen_dup_4_byte_to_word_value): New function.
10019 (nds32_gen_dup_8_byte_to_double_word_value): New function.
10020 (nds32_expand_setmem_loop): Refine implementation.
10021 (nds32_expand_setmem_loop_v3m): Ditto.
10022 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
10025 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
10027 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
10029 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
10031 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
10032 (nds32_init_machine_status): Initialize machine->attr_naked_p and
10033 machine->attr_no_prologue_p.
10034 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
10035 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
10036 (nds32_expand_epilogue): Consider attr_naked_p.
10037 (nds32_expand_epilogue_v3pop): Likewise.
10038 (nds32_can_use_return_insn): Likewise.
10039 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
10040 attr_no_prologue_p fields.
10041 * config/nds32/nds32.opt (mret-in-naked-func): New option.
10043 2018-05-27 Jakub Jelinek <jakub@redhat.com>
10046 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
10048 * config/i386/sse.md
10049 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
10051 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
10053 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
10055 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
10057 (*<floatsuffix>floatv2div2sf2): Rename to ...
10058 (*float<floatunssuffix>v2div2sf2): ... this.
10059 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
10060 (float<floatunssuffix>v2div2sf2_mask): ... this.
10061 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
10062 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
10063 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
10065 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
10067 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
10069 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
10071 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
10073 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
10075 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
10076 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
10077 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
10078 gen_ufix_truncv8dfv8si2.
10079 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
10080 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
10081 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
10082 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
10083 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
10084 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
10085 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
10086 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
10088 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
10092 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
10094 2018-05-25 Jim Wilson <jimw@sifive.com>
10096 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
10097 * config/riscv/riscv.c (struct machine_function): Add
10098 interrupt_handler_p and attribute_checked_p fields.
10099 (riscv_attribute_table): Add interrupt.
10100 (riscv_interrupt_type_p): New.
10101 (riscv_save_reg_p): Save extra regs for interrupt handler.
10102 (riscv_use_save_libcall): Return false for interrupt handler.
10103 (riscv_first_stack_step): Add forward declaration.
10104 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
10105 for interrupt handler with large frame. Use it for saved reg list.
10106 (riscv_expand_prologue): Move flag_stack_usage_info support to
10107 eliminate duplication.
10108 (riscv_expand_epilogue): Generate mret for interrupt handler.
10109 (riscv_epilogue_uses): New.
10110 (riscv_can_use_return_insn): Return false for interrupt handler.
10111 (riscv_function_ok_for_sibcall): Likewise.
10112 (riscv_set_current_function): Add interrupt handler support.
10113 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
10114 * config/riscv/riscv.md (UNSPECV_MRET): New.
10116 (riscv_frflags, riscv_fsflags): Use tab after opcode.
10118 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
10120 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
10122 PR tree-optimization/85712
10123 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
10124 this candidate has already been replaced in-situ by a copy.
10126 2018-05-25 Jason Merrill <jason@redhat.com>
10128 PR c++/80485 - inline function non-zero address.
10129 * symtab.c (nonzero_address): Check DECL_COMDAT.
10131 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
10134 * config/alpha/alpha.md (ashlsi3): New insn pattern.
10135 (*ashlsi_se): Rename from *ashldi_se. Define as sign
10136 extension of SImode operation. Use const123_operand predicate.
10137 (*saddsi_1): Remove.
10138 (*saddl_se_1): Ditto.
10139 (*ssubsi_1): Ditto.
10140 (*ssubl_se_1): Ditto.
10141 * config/alpha/predicates.md (const123_operand): New predicate.
10142 * config/alpha/constraints.md (P): Use IN_RANGE.
10144 2018-05-25 Richard Biener <rguenther@suse.de>
10146 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
10148 (ref_maybe_used_by_stmt_p): Likewise.
10149 (stmt_may_clobber_ref_p): Likewise.
10150 (stmt_may_clobber_ref_p_1): Likewise.
10151 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
10153 (ref_maybe_used_by_stmt_p): Likewise.
10154 (stmt_may_clobber_ref_p): Likewise.
10155 (stmt_may_clobber_ref_p_1): Likewise.
10156 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
10157 the alias oracle to disambiguate DRs with stmts DR analysis
10159 (vect_analyze_data_refs): Do not give up on not analyzable
10160 DRs for BB vectorization. Remove code truncating the dataref
10163 2018-05-25 Jakub Jelinek <jakub@redhat.com>
10166 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10167 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
10168 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
10170 2018-05-25 Richard Biener <rguenther@suse.de>
10172 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
10173 function, combining stmt data ref gathering and fatal analysis
10175 (vect_analyze_data_refs): Remove now redudnant code and simplify.
10176 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
10177 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
10178 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
10179 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
10181 2018-05-25 Bin Cheng <bin.cheng@arm.com>
10183 PR tree-optimization/85720
10184 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
10185 SCC if all partitions are builtins.
10186 (version_loop_by_alias_check): New parameter. Generate cancelable
10187 runtime alias check if all partitions are builtins.
10188 (distribute_loop): Update call to above function.
10190 2018-05-25 Bin Cheng <bin.cheng@arm.com>
10192 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
10193 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
10194 (parm_default_def_partition_arg): Ditto.
10195 (set_parm_default_def_partition): Ditto.
10196 (get_parm_default_def_partitions): Ditto and make it static.
10197 (get_undefined_value_partitions): Ditto and make it static.
10198 (remove_ssa_form): Refactor call to init_var_map here.
10199 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
10200 computation for loop region.
10201 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
10202 (register_default_def): Delete.
10203 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
10204 (parm_default_def_partition_arg): Ditto.
10205 (set_parm_default_def_partition): Ditto.
10206 (get_parm_default_def_partitions): Ditto and make it static.
10207 (get_undefined_value_partitions): Ditto and make it static.
10208 (coalesce_with_default, coalesce_with_default): Update comment.
10209 (create_coalesce_list_for_region): New func factored out from
10210 create_outofssa_var_map.
10211 (populate_coalesce_list_for_outofssa): New func factored out from
10212 create_outofssa_var_map and coalesce_ssa_name.
10213 (create_outofssa_var_map): Delete.
10214 (coalesce_ssa_name): Refactor to support live range computation.
10215 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
10216 (get_parm_default_def_partitions): Delete.
10217 (get_undefined_value_partitions): Ditto.
10218 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
10219 computation for loop region.
10220 (new_tree_live_info, loe_visit_block): Ditto.
10221 (live_worklist, set_var_live_on_entry): Ditto.
10222 (calculate_live_on_exit, verify_live_on_entry): Ditto.
10223 * tree-ssa-live.h (struct _var_map): New fields.
10224 (init_var_map): Change decl.
10225 (region_contains_p): New.
10227 2018-05-25 Bin Cheng <bin.cheng@arm.com>
10229 * tree-ssa-live.h (live_merge_and_clear): Delete.
10231 2018-05-25 Richard Biener <rguenther@suse.de>
10234 * tree-dump.c (dequeue_and_dump): Remove access to removed
10235 operand 2 of a SWITCH_EXPR.
10237 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10239 * doc/sourcebuild.texi (vect_double_cond_arith): Include
10240 multiplication and division.
10241 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
10242 (cond_udiv@var{m}, cond_umod@var{m}): Document.
10243 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
10244 (cond_udiv_optab, cond_umod_optab): New optabs.
10245 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
10246 (IFN_COND_RDIV): New internal functions.
10247 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
10248 TRUNC_MOD_EXPR and RDIV_EXPR.
10249 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
10250 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
10252 (SVE_INT_BINARY): Include mult.
10253 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
10254 (optab, sve_int_op): Handle mult.
10255 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
10257 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
10258 for SVE_INT_BINARY_SD.
10260 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10262 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
10263 (optab, sve_int_op): Handle div and udiv.
10264 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
10265 for SVE_INT_BINARY_SD.
10266 (*<optab><mode>3): New insn for the same.
10268 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10270 * tree-vect-patterns.c: Include predict.h.
10271 (vect_recog_divmod_pattern): Restrict check for division support
10272 to when optimizing for size.
10274 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10276 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
10277 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
10278 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
10279 (gimple_match_op::set_op): Likewise.
10280 (gimple_resimplify4): Declare.
10281 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
10282 (expr::gen_transform): Likewise.
10283 (decision_tree::gen): Generate a simplification routine for 4 operands.
10284 * gimple-match-head.c (gimple_simplify): Add an overload for
10285 4 operands. In the top-level function, handle up to 4 call
10286 arguments and call gimple_resimplify4.
10287 (gimple_resimplify4): New function.
10288 (build_call_internal): Pass a fourth operand.
10289 (maybe_push_to_seq): Likewise.
10290 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
10291 Fold VEC_COND_EXPRs of an operation and a default value into
10292 an IFN_COND_* function if possible.
10293 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
10295 (SVE_COND_FP_BINARY): Include them.
10296 (optab, sve_fp_op): Handle them.
10297 (SVE_INT_BINARY_REV): New code iterator.
10298 (SVE_COND_FP_BINARY_REV): New int iterator.
10299 (commutative): New int attribute.
10300 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
10302 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
10304 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
10305 (*cond_<optab><mode>): New patterns for reversed operands.
10307 2018-05-25 Richard Biener <rguenther@suse.de>
10309 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
10310 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
10311 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
10312 (STMT_VINFO_GROUPED_ACCESS): Adjust.
10313 * tree-vect-data-refs.c (everywhere): Adjust users.
10314 * tree-vect-loop.c (everywhere): Likewise.
10315 * tree-vect-slp.c (everywhere): Likewise.
10316 * tree-vect-stmts.c (everywhere): Likewise.
10317 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
10319 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10321 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
10323 (gcc_cv_as_section_exclude): ... this.
10324 Try Solaris as #exclude syntax.
10325 * configure: Regenerate.
10326 * config.in: Regenerate.
10327 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
10329 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
10330 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
10332 * varasm.c (default_elf_asm_named_section): Don't check if
10333 HAVE_GAS_SECTION_EXCLUDE is defined.
10335 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10337 * doc/md.texi: Update the documentation of the cond_* optabs
10338 to mention the new final operand. Fix GET_MODE_NUNITS call.
10339 Describe the scalar case too.
10340 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
10341 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
10343 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
10344 (get_conditional_internal_fn): Update comment.
10345 * tree-vect-loop.c (vectorizable_reduction): Pass the original
10346 accumulator value as a final argument to conditional functions.
10347 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
10348 a define_expand and add an "else" operand. Assert for now that
10349 the else operand is equal to operand 2. Use SVE_INT_BINARY and
10350 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
10351 (*cond_<optab><mode>): New patterns.
10352 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
10353 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
10354 (UNSPEC_COND_EOR): Delete.
10355 (optab): Remove associated mappings.
10356 (SVE_INT_BINARY): New code iterator.
10357 (sve_int_op): Remove int attribute and add "minus" to the code
10359 (SVE_COND_INT_OP): Delete.
10360 (SVE_COND_FP_OP): Rename to...
10361 (SVE_COND_FP_BINARY): ...this.
10363 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10365 * optabs.c (can_reuse_operands_p): New function.
10366 (maybe_legitimize_operands): Try to reuse the results for
10369 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
10371 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
10372 Add {q} suffix to insn mnemonic.
10374 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10376 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
10377 (msp430_warn_func_return): New.
10379 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
10381 * fold-const.c (tree_nonzero_bits): New function.
10382 * fold-const.h (tree_nonzero_bits): Likewise.
10383 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
10384 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
10386 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
10390 * varasm.c (assemble_alias): Check ifunc_resolver only on
10393 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
10396 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
10397 when memory input operand is handled.
10399 2018-05-24 Luis Machado <luis.machado@linaro.org>
10401 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
10403 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
10405 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
10407 * match.pd: Delay FMA folds until after vectorization.
10409 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
10412 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10413 address check not strict.
10415 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
10417 * gimple-match.h (gimple_match_op): New class.
10418 (mprts_hook): Replace parameters with a gimple_match_op *.
10419 (maybe_build_generic_op): Likewise.
10420 (gimple_simplified_result_is_gimple_val): Replace parameters with
10421 a const gimple_match_op *.
10422 (gimple_simplify): Replace code_helper * and tree * parameters with
10423 a gimple_match_op * parameter.
10424 (gimple_resimplify1): Replace code_helper *, tree and tree *
10425 parameters with a gimple_match_op * parameter.
10426 (gimple_resimplify2): Likewise.
10427 (gimple_resimplify3): Likewise.
10428 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
10429 parameters with a gimple_match_op * parameter.
10430 * gimple-match-head.c (gimple_simplify): Change prototypes of
10431 auto-generated functions to take a gimple_match_op * instead of
10432 separate code_helper * and tree * parameters. Make the same
10433 change in the top-level overload and update calls to the
10434 gimple_resimplify routines. Update calls to the auto-generated
10435 functions and to maybe_push_res_to_seq in the publicly-facing
10436 operation-specific gimple_simplify overloads.
10437 (gimple_match_op::MAX_NUM_OPS): Define.
10438 (gimple_resimplify1): Replace rcode and ops with a single res_op
10439 parameter. Update call to gimple_simplify.
10440 (gimple_resimplify2): Likewise.
10441 (gimple_resimplify3): Likewise.
10442 (mprts_hook): Replace parameters with a gimple_match_op *.
10443 (maybe_build_generic_op): Likewise.
10444 (build_call_internal): Replace type, nargs and ops with
10445 a gimple_match_op *.
10446 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
10447 with a single gimple_match_op *. Update calls to mprts_hook,
10448 build_call_internal and gimple_simplified_result_is_gimple_val.
10449 Factor out code that is common to the tree_code and combined_fn cases.
10450 * genmatch.c (expr::gen_transform): Replace tem_code and
10451 tem_ops with a gimple_match_op called tem_op. Update calls
10452 to the gimple_resimplify functions and maybe_push_res_to_seq.
10453 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
10454 res_ops. Update call to the gimple_resimplify functions.
10455 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
10456 (decision_tree::gen): Make the functions take a gimple_match_op *
10457 called res_op instead of separate res_code and res_ops parameters.
10458 Update call accordingly.
10459 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
10460 and ops with a single res_op parameter. Update calls to
10461 maybe_build_generic_op and maybe_push_res_to_seq.
10462 (fold_stmt_1): Update calls to gimple_simplify and
10463 replace_stmt_with_simplification.
10464 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
10465 and gimple_simplified_result_is_gimple_val.
10466 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
10468 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
10469 with a gimple_match_op *.
10470 (vn_nary_build_or_lookup): Likewise. Update call to
10471 vn_nary_build_or_lookup_1.
10472 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
10473 gimple_match_op *. Update calls to the gimple_resimplify routines
10474 and to gimple_simplified_result_is_gimple_val.
10475 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
10476 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
10477 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
10478 (visit_nary_op): Likewise.
10479 (visit_reference_op_load): Likewise.
10481 2018-05-23 Luis Machado <luis.machado@linaro.org>
10483 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
10484 modifier for printing the step amount.
10486 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
10489 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
10492 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
10494 * doc/sourcebuild.texi (Endianness): New subsubsection.
10496 2018-05-23 Luis Machado <luis.machado@linaro.org>
10498 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10499 <prefetch_dynamic_strides>: New const bool field.
10500 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10501 prefetch_dynamic_strides.
10502 (exynosm1_prefetch_tune): Likewise.
10503 (thunderxt88_prefetch_tune): Likewise.
10504 (thunderx_prefetch_tune): Likewise.
10505 (thunderx2t99_prefetch_tune): Likewise.
10506 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
10508 (aarch64_override_options_internal): Update to set
10509 PARAM_PREFETCH_DYNAMIC_STRIDES.
10510 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10511 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10512 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10513 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10514 prefetch-dynamic-strides setting.
10516 2018-05-23 Luis Machado <luis.machado@linaro.org>
10518 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10519 <minimum_stride>: New const int field.
10520 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10521 minimum_stride field defaulting to -1.
10522 (exynosm1_prefetch_tune): Likewise.
10523 (thunderxt88_prefetch_tune): Likewise.
10524 (thunderx_prefetch_tune): Likewise.
10525 (thunderx2t99_prefetch_tune): Likewise.
10526 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
10527 <default_opt_level>: Set to 3.
10528 (aarch64_override_options_internal): Update to set
10529 PARAM_PREFETCH_MINIMUM_STRIDE.
10530 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10531 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10532 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10533 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10534 stride is constant and is below the minimum stride threshold.
10536 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10538 * config/arm/arm-cpus.in (mode26): Delete.
10539 (armv4): Delete mode26 reference.
10540 * config/arm/arm.c (arm_configure_build_target): Delete use of
10543 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
10545 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
10547 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
10548 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
10550 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
10551 (floatunsdidf2): Ditto.
10553 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
10555 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
10556 (fixuns_trunc<mode>si2_avx512f): Ditto.
10557 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
10558 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
10559 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
10561 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
10563 PR rtl-optimization/79985
10564 * df-scan.c (df_insn_refs_collect): Remove special case for
10565 global registers and asm statements.
10567 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
10569 * extend.texi (Global Register Variables): Rewrite the bullet list.
10570 Note that the register is available for allocation. Note that access
10571 via inline asm must use constraints. Add note about async-signal
10572 handlers. Remove paragraph about automagic register selection.
10574 2018-05-23 Richard Biener <rguenther@suse.de>
10576 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
10577 of fixed offset from memset VN.
10579 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
10581 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
10582 first_interp field.
10583 (alloc_cand_and_find_basis): Initialize first_interp field.
10584 (slsr_process_mul): Modify first_interp field.
10585 (slsr_process_add): Likewise.
10586 (slsr_process_cast): Modify first_interp field for each new
10588 (slsr_process_copy): Likewise.
10589 (dump_candidate): Dump first_interp field.
10590 (replace_mult_candidate): Process all interpretations, not just
10592 (replace_rhs_if_not_dup): Likewise.
10593 (replace_one_candidate): Likewise.
10595 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
10597 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
10599 (aarch64_needs_frame_chain): New function.
10600 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
10602 2018-05-23 Sudakshina Das <sudi.das@arm.com>
10605 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
10606 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
10607 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
10608 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
10609 as true for strict-align.
10610 (aarch64_can_inline_p): Perform checks even when callee has no
10611 attributes to check for strict alignment.
10612 * doc/extend.texi (AArch64 Function Attributes): Document
10614 * doc/invoke.texi: (AArch64 Options): Likewise.
10616 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
10618 PR tree-optimization/85853
10619 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
10620 the handling of the root of the node to...
10621 (vect_slp_analyze_node_operations_1): ...this new function,
10622 and run the whole thing with the child nodes' def types
10623 set according to their SLP node's def type.
10625 2018-05-23 Richard Biener <rguenther@suse.de>
10627 PR middle-end/85874
10628 * tree-data-ref.c (create_runtime_alias_checks): Defer
10629 and ignore overflow warnings.
10631 2018-05-23 Yury Gribov <tetra2005@gmail.com>
10633 PR tree-optimization/85822
10634 * tree-vrp.c (is_masked_range_test): Fix handling of negative
10637 2018-05-23 Richard Biener <rguenther@suse.de>
10639 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
10640 memset constants via native_interpret_expr.
10642 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
10645 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
10647 (cgraph_node::create_alias): Likewise.
10648 (cgraph_node::get_availability): Check ifunc_resolver instead
10649 of looking up ifunc attribute.
10650 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
10651 * varasm.c (do_assemble_alias): Likewise.
10652 (assemble_alias): Likewise.
10653 (default_binds_local_p_3): Likewise.
10654 * cgraph.h (cgraph_node): Add ifunc_resolver.
10655 (cgraph_node::only_called_directly_or_aliased_p): Return false
10656 for IFUNC resolver.
10657 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
10659 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
10660 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
10661 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
10662 instead of looking up ifunc attribute.
10664 2018-05-22 Luis Machado <luis.machado@linaro.org>
10666 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
10668 2018-05-22 Martin Sebor <msebor@redhat.com>
10670 PR middle-end/85359
10671 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
10672 only when expasion succeeds.
10673 (expand_builtin_strcmp): Same.
10674 (expand_builtin_strncmp): Same.
10676 2018-05-22 Martin Sebor <msebor@redhat.com>
10678 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
10680 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
10681 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10683 * config/aarch64/aarch64-ldpstp.md: Replace uses of
10684 aarch64_mem_pair_operand with memory_operand and delete operand swapping
10686 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
10687 Add check for legitimate_address.
10688 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
10689 (aarch64_swap_ldrstr_operands): New.
10690 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
10693 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
10694 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10696 * config/aarch64/aarch64.md: New patterns to generate stp
10698 (store_pair_sw, store_pair_dw): New patterns to generate stp for
10699 single words and double words.
10700 (load_pair_sw, load_pair_dw): Likewise.
10701 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
10703 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
10705 * config/aarch64/aarch64-ldpstp.md: Modify peephole
10706 for different mode ldpstp and add peephole for merged zero stores.
10707 Likewise for loads.
10708 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
10710 (aarch64_gen_store_pair): Rename calls to match new patterns.
10711 (aarch64_gen_load_pair): Rename calls to match new patterns.
10712 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
10713 (load_pair<DREG:mode><DREG2:mode>): ... This.
10714 (store_pair<mode>): Rename to...
10715 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
10716 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
10717 New mode iterators.
10718 (V_INT_EQUIV): Handle SImode.
10719 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
10722 2018-05-22 Martin Sebor <msebor@redhat.com>
10725 * calls.c (maybe_warn_nonstring_arg): Use string length to set
10726 or ajust the presumed bound on an operation to avoid unnecessary
10729 2018-05-22 Martin Sebor <msebor@redhat.com>
10731 PR tree-optimization/85826
10732 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
10733 assuming that a DECL necesarily has a constant size.
10735 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
10737 PR middle-end/85862
10738 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
10740 2018-05-22 Richard Biener <rguenther@suse.de>
10742 PR tree-optimization/85834
10743 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
10744 non-constant and non-zero memset arguments.
10746 2018-05-22 Martin Liska <mliska@suse.cz>
10749 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
10751 2018-05-22 Richard Biener <rguenther@suse.de>
10753 PR tree-optimization/85863
10754 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
10755 comparisons when vectype is specified.
10756 (vectorizable_condition): Do not specify vectype for
10757 vect_is_simple_cond when SLP vectorizing.
10759 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
10762 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
10763 define __ibm128 as long double.
10764 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
10765 as a distinct type when IEEE 128-bit support is enabled.
10766 (init_float128_ieee): Fix up conversions between IFmode and IEEE
10767 128-bit types to use the correct functions.
10768 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
10769 convert between 128-bit floating point types that have different
10770 modes but the same representation, instead of using gen_lowpart to
10772 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
10774 (IFKF_reg): New attributes to give the register constraints for
10776 (extend<mode>tf2_internal): New insns to mark an explicit
10777 conversion between 128-bit floating point types that have a
10778 different mode but share the same representation.
10780 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
10782 PR tree-optimization/85814
10783 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
10784 a null return from get_strinfo when unsharing the next
10785 strinfo in the chain.
10787 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
10790 * varasm.c (weak_finish): Clean up weak_decls.
10792 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10794 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
10795 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
10796 UNSPEC_UADALP values.
10797 * config/aarch64/iterators.md (ABAL): New int iterator.
10800 (sur): Add mappings for the above.
10801 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
10803 (aarch64_<sur>abal<mode>_4): Likewise.
10804 (aarch64_<sur>adalp<mode>_3): Likewise.
10805 (<sur>sadv16qi): New define_expand.
10807 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
10809 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
10810 (*movdf_internal): Ditto.
10811 (*rcpsf2_sse): Ditto.
10812 (*rsqrtsf2_sse): Ditto.
10813 (*sqrt<mode>2_sse): Ditto.
10815 2018-05-21 Tamar Christina <tamar.christina@arm.com>
10817 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
10819 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
10820 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
10821 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
10822 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
10824 * config/aarch64/arm_neon.h: Likewise.
10825 * config/aarch64/iterators.md (VQ_I): New.
10827 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
10829 * config.gcc: Add arc/t-multilib-linux to tmake_file for
10831 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
10834 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
10836 * config/nds32/constraints.md (S): New constraint.
10837 * config/nds32/nds32.md (call_internal): Use constraint S.
10838 (call_value_internal): Likewise.
10839 (sibcall_internal): Likewise.
10840 (sibcall_value_internal): Likewise.
10842 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
10843 Chung-Ju Wu <jasonwucj@gmail.com>
10845 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
10846 into consideration.
10848 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
10849 Chung-Ju Wu <jasonwucj@gmail.com>
10851 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
10852 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
10853 (nds32_rtx_costs_impl): Simplify.
10854 (nds32_address_cost_impl): Simplify.
10855 (nds32_init_rtx_costs): New function.
10856 (nds32_rtx_costs_speed_prefer): Likewise.
10857 (nds32_rtx_costs_size_prefer): Likewise.
10858 (nds32_address_cost_speed_prefer): Likewise.
10859 (nds32_address_cost_speed_fwprop): Likewise.
10860 (nds32_address_cost_size_prefer): Likewise.
10861 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
10862 * config/nds32/nds32.c (nds32_option_override): Use
10863 nds32_init_rtx_costs function.
10865 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
10867 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
10868 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
10869 (TARGET_PIPELINE_N8): Likewise.
10870 (TARGET_PIPELINE_N10): Likewise.
10871 (TARGET_PIPELINE_N13): Likewise.
10872 (TARGET_PIPELINE_GRAYWOLF): Likewise.
10874 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
10876 * config/nds32/nds32-fpu.md: Update copyright year.
10878 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10880 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
10882 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10884 * config/nds32/nds32.c
10885 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
10886 * config/nds32/nds32.opt (minline-asm-r15): New option.
10888 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10890 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
10892 * config/nds32/nds32.md (abssi2): New pattern.
10894 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
10896 * config/i386/i386.md (rex64namesuffix): New mode attribute.
10897 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
10898 Merge insn pattern from sse_cvtsi2ss<round_name> and
10899 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
10900 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
10901 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
10902 using SWI48 mode iterator.
10903 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
10904 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
10905 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
10906 pattern from sse_cvttss2si<round_saeonly_name>
10907 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
10908 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
10909 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
10910 using SWI48 mode iterator.
10911 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
10912 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
10913 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
10914 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
10915 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
10916 using SWI48 mode iterator.
10917 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
10918 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
10919 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
10920 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
10921 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
10922 SWI48 mode iterator.
10923 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
10924 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
10925 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
10926 pattern from sse_cvttsd2si<round_saeonly_name>
10927 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
10929 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10931 * config/nds32/nds32-md-auxiliary.c
10932 (nds32_valid_smw_lwm_base_p): Refine.
10933 (nds32_output_smw_single_word): Refine.
10934 (nds32_output_smw_double_word): New.
10935 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
10937 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10939 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
10940 (nds32_output_stack_pop): Refine.
10941 (nds32_expand_unaligned_load): Refine.
10942 (nds32_expand_unaligned_store): Refine.
10944 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
10945 Chung-Ju Wu <jasonwucj@gmail.com>
10947 * config/nds32/constants.md: Add TP_REGNUM constant.
10948 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
10949 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
10951 * config/nds32/nds32-doubleword.md: Consider flag_pic.
10952 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
10953 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
10954 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
10955 and PIC code generation.
10956 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
10958 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
10960 * config/nds32/nds32.md: Support TLS and PIC.
10961 * config/nds32/nds32.c: Support TLS and PIC.
10962 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
10963 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
10966 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10968 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
10969 mode with E_ prefix.
10971 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
10972 Chung-Ju Wu <jasonwucj@gmail.com>
10974 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
10975 * config/nds32/nds32-md-auxiliary.c
10976 (symbolic_reference_mentioned_p): New.
10977 (nds32_legitimize_ict_address): New.
10978 (nds32_expand_ict_move): New.
10979 (nds32_indirect_call_referenced_p): New.
10980 (nds32_symbol_binds_local_p): Delete.
10981 (nds32_long_call_p): Modify.
10982 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
10983 * config/nds32/nds32-protos.h
10984 (symbolic_reference_mentioned_p): Declare.
10985 (nds32_legitimize_ict_address): Declare.
10986 (nds32_expand_ict_move): Declare.
10987 (nds32_indirect_call_referenced_p): Declare.
10988 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
10989 (nds32_relax_group): Use nds32_ict_const_p as condition.
10990 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
10991 (nds32_asm_file_start): Output ict_model directive in asm code.
10992 (nds32_legitimate_address_p): Consider indirect call.
10993 (nds32_print_operand): Consider indirect call.
10994 (nds32_print_operand_address): Consider indirect call.
10995 (nds32_insert_attributes): Handle "indirect_call" attribute.
10996 (TARGET_LEGITIMATE_ADDRESS_P): Define.
10997 (TARGET_LEGITIMATE_CONSTANT_P): Define.
10998 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
10999 (TARGET_DELEGITIMIZE_ADDRESS): Define.
11000 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
11001 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
11002 (TARGET_ICT_MODEL_SMALL): Define.
11003 (TARGET_ICT_MODEL_LARGE): Define.
11004 * config/nds32/nds32.md (movsi): Consider ict model.
11005 (call, call_value): Consider ict model.
11006 (sibcall, sibcall_value): Consider ict model.
11007 * config/nds32/nds32.opt (mict-model): New option.
11008 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
11011 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
11012 Monk Chiang <sh.chiang04@gmail.com>
11013 Jim Wilson <jimw@sifive.com>
11015 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
11016 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
11017 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
11018 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
11019 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
11020 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
11021 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
11022 compute save_libcall_adjustment properly.
11023 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
11024 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
11025 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
11026 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
11027 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
11028 (ABI_SPEC): Handle mabi=ilp32e.
11029 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
11030 (RVE): Add RVE mask.
11031 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
11032 <-march>: Add rv32e as an example.
11034 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
11037 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
11038 (intra_create_variable_infos): Handle C++ constructors.
11040 2018-05-18 Martin Liska <mliska@suse.cz>
11042 * passes.def: Remove a redundant pass.
11044 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
11047 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
11049 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11051 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
11053 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
11055 (armv2, armv2a, armv3, armv3m): Delete architectures.
11056 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
11057 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
11058 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
11060 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
11061 (*mulsidi3adddi): Likewise.
11062 (mulsidi3): Likewise.
11063 (*mulsidi3_nov6): Likewise.
11064 (umulsidi3): Likewise.
11065 (umulsidi3_nov6): Likewise.
11066 (umaddsidi4): Likewise.
11067 (*umulsidi3adddi): Likewise.
11068 (smulsi3_highpart): Likewise.
11069 (*smulsi3_highpart_nov6): Likewise.
11070 (umulsi3_highpart): Likewise.
11071 (*umulsi3_highpart_nov6): Likewise.
11072 * config/arm/arm.h (arm_arch3m): Delete.
11073 * config/arm/arm.c (arm_arch3m): Delete.
11074 (arm_option_override_internal): Update armv3-related comment.
11075 (arm_configure_build_target): Delete use of isa_bit_mode32.
11076 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
11077 (arm_rtx_costs_internal): Delete check of arm_arch3m.
11078 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
11079 (mulsa3): Likewise.
11080 (mulusa3): Likewise.
11081 * config/arm/arm-protos.h (arm_arch3m): Delete.
11082 * config/arm/arm-tables.opt: Regenerate.
11083 * config/arm/arm-tune.md: Likewise.
11084 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
11085 deleted architectures.
11087 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11089 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
11090 (armv5t, armv5te): New features.
11091 (ARMv5, ARMv5e): Delete fgroups.
11092 (ARMv5t, ARMv5te): Adjust for above changes.
11093 (ARMv6m): Likewise.
11094 (armv5, armv5e): Delete arches.
11095 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
11097 (*call_reg_arm): Likewise.
11098 (*call_value_reg_armv5): Likewise.
11099 (*call_value_reg_arm): Likewise.
11100 (*call_symbol): Likewise.
11101 (*call_value_symbol): Likewise.
11102 (*sibcall_insn): Likewise.
11103 (*sibcall_value_insn): Likewise.
11104 (clzsi2): Likewise.
11105 (prefetch): Likewise.
11106 (define_split and define_peephole2 dependent on arm_arch5):
11108 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
11110 (TARGET_ARM_QBIT): Likewise.
11111 (TARGET_DSP_MULTIPLY): Likewise.
11112 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
11113 (arm_arch5, arm_arch5e): Delete.
11114 (arm_arch5t, arm_arch5te): Declare.
11115 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
11116 (arm_arch5t): Declare.
11117 (arm_option_reconfigure_globals): Update for the above.
11118 (arm_options_perform_arch_sanity_checks): Update comment, replace
11119 use of arm_arch5 with arm_arch5t.
11120 (use_return_insn): Likewise.
11121 (arm_emit_call_insn): Likewise.
11122 (output_return_instruction): Likewise.
11123 (arm_final_prescan_insn): Likewise.
11124 (arm_coproc_builtin_available): Likewise.
11125 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
11126 arm_arch5e with arm_arch5t and arm_arch5te.
11127 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
11128 (arm_arch5t, arm_arch5te): Declare.
11129 * config/arm/arm-tables.opt: Regenerate.
11130 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
11131 * config/arm/t-multilib: Likewise.
11132 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
11133 instead of arm_arch5.
11134 (*call_reg_thumb1): Likewise.
11135 (*call_value_reg_thumb1_v5): Likewise.
11136 (*call_value_reg_thumb1): Likewise.
11137 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
11139 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
11141 2018-05-18 Martin Liska <mliska@suse.cz>
11143 PR gcov-profile/84846
11144 * doc/gcov.texi: Document -t option of gcov tool.
11146 2018-05-18 Martin Liska <mliska@suse.cz>
11148 PR gcov-profile/84846
11149 * gcov.c (print_usage): Add new -t option.
11150 (process_args): Handle the option.
11151 (generate_results): Use stdout as output when requested by
11154 2018-05-18 Martin Liska <mliska@suse.cz>
11156 PR gcov-profile/84846
11157 * coverage.c (coverage_init): Write PWD to .gcno file.
11158 * doc/gcov.texi: Document how working directory is printed.
11159 * gcov-dump.c (dump_gcov_file): Print PWD.
11160 * gcov.c (output_intermediate_file): Likewise.
11161 (read_graph_file): Read PWD string.
11162 (output_lines): Print PWD.
11164 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11166 PR middle-end/85817
11167 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
11168 for retval and return false if all args to phi are zero.
11170 2018-05-18 Richard Biener <rguenther@suse.de>
11172 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
11174 (evrp_dom_walker::before_dom_children): Call it.
11176 2018-05-18 Richard Biener <rguenther@suse.de>
11178 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
11179 results when processing array refs with variable index.
11181 2018-05-18 Toon Moene <toon@moene.org>
11183 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
11184 directly after that of -floop-interchange. Indicate that both
11185 options are enabled by default when specifying -O3.
11187 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11189 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
11190 iterator. Delete separate integer-mode vec_set<mode> expander.
11191 (aarch64_simd_vec_setv2di): Delete.
11192 (vec_setv2di): Delete.
11193 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
11194 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
11195 the "w, r" alternative.
11197 2018-05-18 Martin Liska <mliska@suse.cz>
11199 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
11200 * tree-pass.h (make_pass_lower_switch_O0): New function.
11201 * tree-switch-conversion.c (node_has_low_bound): Remove.
11202 (node_has_high_bound): Likewise.
11203 (node_is_bounded): Likewise.
11204 (class pass_lower_switch): Make it a template type and create
11206 (pass_lower_switch::execute): Add template argument.
11207 (make_pass_lower_switch): New function.
11208 (make_pass_lower_switch_O0): New function.
11209 (do_jump_if_equal): Remove.
11210 (emit_case_nodes): Simplify to just handle all 3 cases and leave
11211 all the hard work to tree optimization passes.
11213 2018-05-18 Martin Liska <mliska@suse.cz>
11215 * dbgcnt.c (limit_low): Renamed from limit.
11216 (limit_high): New variable.
11217 (dbg_cnt_is_enabled): Check for upper limit.
11218 (dbg_cnt): Adjust dumping.
11219 (dbg_cnt_set_limit_by_index): Add new argument for high
11221 (dbg_cnt_set_limit_by_name): Likewise.
11222 (dbg_cnt_process_single_pair): Parse new format.
11223 (dbg_cnt_process_opt): Use strtok.
11224 (dbg_cnt_list_all_counters): Remove 'value' and add
11226 * doc/invoke.texi: Document changes.
11228 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
11230 * doc/sourcebuild.texi (scalar_all_fma): Document.
11231 * tree.def (FMA_EXPR): Delete.
11232 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
11233 * internal-fn.c (ternary_direct): New macro.
11234 (expand_ternary_optab_fn): Likewise.
11235 (direct_ternary_optab_supported_p): Likewise.
11236 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
11237 * builtins.c (fold_builtin_fma): Delete.
11238 (fold_builtin_3): Don't call it.
11239 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
11240 * expr.c (expand_expr_real_2): Likewise.
11241 * fold-const.c (operand_equal_p): Likewise.
11242 (fold_ternary_loc): Likewise.
11243 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
11244 * gimple.c (DEFTREECODE): Likewise.
11245 * gimplify.c (gimplify_expr): Likewise.
11246 * optabs-tree.c (optab_for_tree_code): Likewise.
11247 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
11248 * tree-eh.c (operation_could_trap_p): Likewise.
11249 (stmt_could_throw_1_p): Likewise.
11250 * tree-inline.c (estimate_operator_cost): Likewise.
11251 * tree-pretty-print.c (dump_generic_node): Likewise.
11252 (op_code_prio): Likewise.
11253 * tree-ssa-loop-im.c (stmt_cost): Likewise.
11254 * tree-ssa-operands.c (get_expr_operands): Likewise.
11255 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
11256 * fold-const-call.h (fold_fma): Delete.
11257 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
11258 CFN_FNMA and CFN_FNMS.
11259 (fold_fma): Delete.
11260 * genmatch.c (combined_fn): New enum.
11261 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
11262 (commutative_op): New function.
11263 (commutate): Use it. Handle more than 2 operands.
11264 (dt_operand::gen_gimple_expr): Use commutative_op.
11265 (parser::parse_expr): Allow :c to be used with non-binary
11266 operators if the commutative operand is known.
11267 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
11268 CFN_FMS, CFN_FNMA and CFN_FNMS.
11269 (backprop::process_assign_use): Remove FMA_EXPR handling.
11270 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
11271 (gen_hsa_fma): New function.
11272 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
11273 IFN_FNMA and IFN_FNMS.
11274 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
11275 * gimple-fold.h (follow_all_ssa_edges): Declare.
11276 * gimple-fold.c (follow_all_ssa_edges): New function.
11277 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
11278 gimple_build interface and use follow_all_ssa_edges to fold the result.
11279 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
11280 instead of checking for optabs directly.
11281 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
11282 rather than FMA_EXPRs.
11283 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
11284 call to IFN_FMA instead of an FMA_EXPR.
11286 2018-05-17 Jim Wilson <jimw@sifive.com>
11288 * expr.c (do_tablejump): When converting index to Pmode, if we have a
11289 sign extended promoted subreg, and the range does not have the sign bit
11290 set, then do a sign extend.
11292 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
11293 test, check for sign extended subreg and/or constant operands, and
11294 do a sign extend in that case.
11296 2018-05-17 Steve Ellcey <sellcey@cavium.com>
11298 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
11299 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
11301 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
11302 Change logics_shift_reg to logics_shift_imm.
11303 (thunderx2t99_fp_loadpair_basic): Delete.
11304 (thunderx2t99_fp_storepair_basic): Delete.
11305 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
11306 (thunderx2t99_asimd_polynomial): Delete.
11307 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
11308 and neon_fp_mul_d_scalar_q.
11309 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
11310 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
11311 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
11312 (thunderx2t99_asimd_lut): Add missing tbl types.
11313 (thunderx2t99_asimd_ext): Delete.
11314 (thunderx2t99_asimd_load1_1_mult): Delete.
11315 (thunderx2t99_asimd_load1_2_mult): Delete.
11316 (thunderx2t99_asimd_load1_ldp): New.
11317 (thunderx2t99_asimd_load1): New.
11318 (thunderx2t99_asimd_load2): Add missing *load2* types.
11319 (thunderx2t99_asimd_load3): New.
11320 (thunderx2t99_asimd_load4): New.
11321 (thunderx2t99_asimd_store1_1_mult): Delete.
11322 (thunderx2t99_asimd_store1_2_mult): Delete.
11323 (thunderx2t99_asimd_store2_mult): Delete.
11324 (thunderx2t99_asimd_store2_onelane): Delete.
11325 (thunderx2t99_asimd_store_stp): New.
11326 (thunderx2t99_asimd_store1): New.
11327 (thunderx2t99_asimd_store2): New.
11328 (thunderx2t99_asimd_store3): New.
11329 (thunderx2t99_asimd_store4): New.
11331 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
11333 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
11334 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
11336 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
11337 Segher Boessenkool <segher@kernel.crashing.org>
11340 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
11343 2018-05-17 Richard Biener <rguenther@suse.de>
11345 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
11346 for pruning loop and prune defs feeding only already visited PHIs.
11348 2018-05-17 Richard Biener <rguenther@suse.de>
11350 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
11352 2018-05-17 Bin Cheng <bin.cheng@arm.com>
11353 Richard Biener <rguenther@suse.de>
11355 PR tree-optimization/85793
11356 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
11357 for VMAT_ELEMENTWISE.
11359 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
11361 * internal-fn.h (lookup_internal_fn): Declare
11362 * internal-fn.c (lookup_internal_fn): New function.
11363 * gimple.c (gimple_build_call_from_tree): Handle calls to
11364 internal functions.
11365 * gimple-pretty-print.c (dump_gimple_call): Print "." before
11366 internal function names.
11367 * tree-pretty-print.c (dump_generic_node): Likewise.
11368 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
11370 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
11372 * gimple-fold.h (gimple_build): Make the function forms take
11373 combined_fn rather than built_in_function.
11374 (gimple_simplify): Likewise.
11375 * gimple-match-head.c (gimple_simplify): Likewise.
11376 * gimple-fold.c (gimple_build): Likewise.
11377 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
11378 rather than gimple_build_call_internal.
11379 (get_initial_defs_for_reduction): Likewise.
11380 (vect_create_epilog_for_reduction): Likewise.
11381 (vectorizable_live_operation): Likewise.
11383 2018-05-17 Martin Liska <mliska@suse.cz>
11385 * gimple-ssa-sprintf.c (format_directive): Do not use
11386 space in between 'G_' and '('.
11388 2018-05-17 Jakub Jelinek <jakub@redhat.com>
11391 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
11392 even if the mask is not all ones.
11395 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
11397 (ix86_gimple_fold_builtin): Likewise.
11400 * config/i386/i386.c: Include tree-vector-builder.h.
11401 (ix86_vector_shift_count): New function.
11402 (ix86_fold_builtin): Fold shift builtins by scalar count.
11403 (ix86_gimple_fold_builtin): Likewise.
11405 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
11406 _mm512_setzero): New intrinsics.
11408 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
11409 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11411 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
11412 code generation for cases where splatting a value is not useful.
11413 * simplify-rtx.c (simplify_ternary_operation): Simplify
11414 vec_merge across a vec_duplicate and a paradoxical subreg forming
11415 a vector mode to a vec_concat.
11417 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
11419 * config.gcc: Support "goldmont-plus".
11420 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
11422 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11423 PROCESSOR_GOLDMONT_PLUS.
11424 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
11425 (processor_target_table): Add "goldmont-plus".
11426 (PTA_GOLDMONT_PLUS): Define.
11427 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
11428 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
11429 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
11430 (fold_builtin_cpu): Add "goldmont-plus".
11431 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
11432 (ix86_option_override_internal): Add "goldmont-plus".
11433 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
11434 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
11435 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
11436 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
11438 2018-05-17 Richard Biener <rguenther@suse.de>
11440 PR tree-optimization/85757
11441 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
11442 remove defs that only feed that PHI from further processing.
11444 2018-05-16 Jim Wilson <jimw@sifive.com>
11446 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
11448 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
11450 2018-05-16 Mark Wielaard <mark@klomp.org>
11452 * dwarf2out.c (count_index_strings): New function.
11453 (output_indirect_strings): Call count_index_strings and generate
11454 header for dwarf_version >= 5.
11456 2018-05-16 Mark Wielaard <mark@klomp.org>
11458 * dwarf2out.c (dwarf_FORM): New function.
11459 (set_indirect_string): Use dwarf_FORM.
11460 (reset_indirect_string): Likewise.
11461 (size_of_die): Likewise.
11462 (value_format): Likewise.
11463 (output_die): Likewise.
11464 (add_skeleton_AT_string): Likewise.
11465 (output_macinfo_op): Likewise.
11466 (index_string): Likewise.
11467 (output_index_string_offset): Likewise.
11468 (output_index_string): Likewise.
11469 (count_index_strings): Likewise.
11471 2018-05-16 Carl Love <cel@us.ibm.com>
11473 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
11474 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
11476 2018-05-16 Martin Jambor <mjambor@suse.cz>
11478 * ipa-prop.c (ipa_free_all_edge_args): Remove.
11479 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
11481 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
11483 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
11484 (fnma<mode>4): Likewise.
11485 (fms<mode>4): Likewise.
11486 (fnms<mode>4): Likewise.
11487 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
11488 (aarch64_fnma<mode>4): Likewise.
11489 (aarch64_fms<mode>4): Likewise.
11490 (aarch64_fnms<mode>4): Likewise.
11491 (aarch64_fnmadd<mode>4): Likewise.
11493 2018-05-16 Jason Merrill <jason@redhat.com>
11495 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
11497 2018-05-16 Richard Biener <rguenther@suse.de>
11499 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
11500 (dump_stmt_cost): Declare.
11501 (add_stmt_cost): Dump cost we add.
11502 (add_stmt_costs): New function.
11503 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
11504 No longer exported.
11505 (vect_analyze_stmt): Adjust prototype.
11506 (vectorizable_condition): Likewise.
11507 (vectorizable_live_operation): Likewise.
11508 (vectorizable_reduction): Likewise.
11509 (vectorizable_induction): Likewise.
11510 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
11511 cost vector to pass to vectorizable_ and record afterwards.
11512 (vect_model_reduction_cost): Take cost vector argument and adjust.
11513 (vect_model_induction_cost): Likewise.
11514 (vectorizable_reduction): Likewise.
11515 (vectorizable_induction): Likewise.
11516 (vectorizable_live_operation): Likewise.
11517 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
11518 SLP_TREE_NUMBER_OF_VEC_STMTS.
11519 (vect_analyze_slp_cost_1): Remove.
11520 (vect_analyze_slp_cost): Likewise.
11521 (vect_slp_analyze_node_operations): Take visited args and
11522 a target cost vector. Avoid processing already visited stmt sets.
11523 (vect_slp_analyze_operations): Use a local cost vector to gather
11524 costs and register those of non-discarded instances.
11525 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
11526 (vect_schedule_slp_instance): Remove copying of
11527 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
11529 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
11530 adding cost. Record cost entry location.
11531 (vect_prologue_cost_for_slp_op): Function to compute cost of
11532 a constant or invariant generated for SLP vect in the prologue,
11533 split out from vect_analyze_slp_cost_1.
11534 (vect_model_simple_cost): Make static. Adjust for SLP costing.
11535 (vect_model_promotion_demotion_cost): Likewise.
11536 (vect_model_store_cost): Likewise, make static.
11537 (vect_model_load_cost): Likewise.
11538 (vectorizable_bswap): Add cost vector arg and adjust.
11539 (vectorizable_call): Likewise.
11540 (vectorizable_simd_clone_call): Likewise.
11541 (vectorizable_conversion): Likewise.
11542 (vectorizable_assignment): Likewise.
11543 (vectorizable_shift): Likewise.
11544 (vectorizable_operation): Likewise.
11545 (vectorizable_store): Likewise.
11546 (vectorizable_load): Likewise.
11547 (vectorizable_condition): Likewise.
11548 (vectorizable_comparison): Likewise.
11549 (can_vectorize_live_stmts): Likewise.
11550 (vect_analyze_stmt): Likewise.
11551 (vect_transform_stmt): Adjust calls to vectorizable_*.
11552 * tree-vectorizer.c: Include gimple-pretty-print.h.
11553 (dump_stmt_cost): New function.
11555 2018-05-16 Richard Biener <rguenther@suse.de>
11557 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
11558 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
11559 * tree-ssa-dse.c: Include tree-ssa-loop.h.
11560 (check_name): New callback.
11561 (dse_classify_store): Track cycles via a visited bitmap of PHI
11562 defs and simplify handling of in-loop and across loop dead stores
11563 and properly fail for loop-variant refs. Handle byte-tracking with
11564 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
11567 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
11569 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
11570 (vect_get_mask_type_for_stmt): Likewise.
11571 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
11573 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
11574 to determine the statement's vector type and the vector type that
11575 should be used for calculating nunits. Deal with cases in which
11576 the type has to be deferred.
11577 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
11578 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
11579 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
11580 (vect_determine_vf_for_stmt): New functions, split out from...
11581 (vect_determine_vectorization_factor): ...here.
11582 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
11583 (vect_get_mask_type_for_stmt): New functions, split out from
11584 vect_determine_vectorization_factor.
11586 2018-05-16 Richard Biener <rguenther@suse.de>
11588 * tree-cfg.c (verify_gimple_assign_ternary): Properly
11589 verify the [VEC_]COND_EXPR embedded comparison.
11591 2018-05-15 Martin Sebor <msebor@redhat.com>
11593 PR tree-optimization/85753
11594 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
11595 RECORD_TYPE in addition to ARRAY_TYPE.
11597 2018-05-15 Martin Sebor <msebor@redhat.com>
11599 PR middle-end/85643
11600 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
11602 2018-05-15 Richard Biener <rguenther@suse.de>
11604 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
11605 add by_clobber_p one. Change algorithm to collect all defs
11606 representing uses we need to walk and try reducing them to
11607 a single one before failing.
11608 (dse_dom_walker::dse_optimize_stmt): Adjust.
11610 2018-05-13 Mark Wielaard <mark@klomp.org>
11612 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
11613 (size_of_loc_descr): Likewise.
11614 (output_loc_operands): Likewise.
11615 (output_loc_operands_raw): Likewise.
11616 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
11617 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
11618 (hash_loc_operands): Likewise.
11619 (compare_loc_operands): Likewise.
11621 2018-05-14 Mark Wielaard <mark@klomp.org>
11623 * dwarf2out.c (count_index_addrs): New function.
11624 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
11626 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11628 PR tree-optimization/83648
11629 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
11630 return value as malloc candidate.
11632 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11635 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
11636 param as true in call to suggest_attribute.
11638 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
11640 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
11641 -mreadonly-in-sdata.
11643 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11645 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
11647 (aarch64_crypto_aesd_fused): Likewise.
11649 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
11651 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
11652 (movsi_aarch64): Likewise.
11653 (load_pairsi): Likewise.
11654 (load_pairdi): Likewise.
11655 (store_pairsi): Likewise.
11656 (store_pairdi): Likewise.
11657 (load_pairsf): Likewise.
11658 (load_pairdf): Likewise.
11659 (store_pairsf): Likewise.
11660 (store_pairdf): Likewise.
11661 (zero_extend): Likewise.
11662 (trunc): Swap alternatives.
11663 (fcvt_target): Add '?' to prefer w over r.
11665 2018-05-14 Jakub Jelinek <jakub@redhat.com>
11668 * config/i386/i386.md: Disallow non-commutative arithmetics in
11669 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
11670 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
11671 in the peephole2 before it.
11673 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
11675 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
11676 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
11677 (ix86_handle_option): Handle -mcldemote.
11678 * config.gcc: New header.
11679 * config/i386/cldemoteintrin.h: New file.
11680 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
11681 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
11683 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11684 OPTION_MASK_ISA_CLDEMOTE.
11685 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
11686 (ix86_valid_target_attribute_inner_p): Ditto.
11687 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
11688 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
11689 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
11690 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
11691 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
11693 * config/i386/i386.opt: Add -mcldemote.
11694 * config/i386/x86intrin.h: New header.
11695 * doc/invoke.texi: Add -mcldemote.
11697 2018-05-14 Richard Biener <rguenther@suse.de>
11699 * doc/match-and-simplify.texi: Adjust :s documentation.
11701 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
11703 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
11704 intended memcpy size.
11705 (REORDER_45): Likewise.
11707 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
11709 * sort.cc: New file.
11710 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
11711 * vec.c (qsort_chk): Use gcc_qsort.
11712 * Makefile.in (OBJS-libcommon): Add sort.o.
11713 (build/sort.o): New target. Use it...
11714 (BUILD_RTL): ... here, and...
11715 (build/gencfn-macros): ... here, and...
11716 (build/genmatch): ... here.
11718 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
11719 Chung-Ju Wu <jasonwucj@gmail.com>
11721 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
11722 * config/nds32/nds32-graywolf.md: New file.
11723 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
11724 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
11726 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
11727 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
11728 * config/nds32/nds32.md (pipeline_model): Add graywolf.
11729 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
11730 * config/nds32/pipelines.md: Include n15 settings.
11732 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
11733 Chung-Ju Wu <jasonwucj@gmail.com>
11735 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
11736 * config/nds32/nds32-n13.md: New file.
11737 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
11738 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
11740 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
11741 * config/nds32/nds32.md (pipeline_model): Add n13.
11742 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
11743 * config/nds32/pipelines.md: Include n13 settings.
11745 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
11746 Chung-Ju Wu <jasonwucj@gmail.com>
11748 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
11749 * config/nds32/nds32-n10.md: New file.
11750 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
11751 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
11753 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
11754 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
11755 * config/nds32/nds32.md (pipeline_model): Add n10.
11756 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
11757 * config/nds32/pipelines.md: Include n10 settings.
11759 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
11760 Kito Cheng <kito.cheng@gmail.com>
11761 Chung-Ju Wu <jasonwucj@gmail.com>
11763 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
11764 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11765 Add enum values for DSP extension instructions.
11766 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
11768 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
11769 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
11770 New code iterators.
11771 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
11772 * config/nds32/nds32-dspext.md: New file for DSP implementation.
11773 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
11774 * config/nds32/nds32-intrinsic.md: Likewise.
11775 * config/nds32/nds32_intrinsic.h: Likewise.
11776 * config/nds32/nds32-md-auxiliary.c: Likewise.
11777 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
11778 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
11779 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
11780 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
11781 * config/nds32/nds32-protos.h: New declarations for DSP extension.
11782 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
11783 TYPE_DMAC in switch statement.
11784 * config/nds32/nds32.c: New checking and implementation for DSP
11785 extension instructions.
11786 * config/nds32/nds32.h: Likewise.
11787 * config/nds32/nds32.md: Likewise.
11788 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
11789 * config/nds32/predicates.md: Implement new predicates for DSP
11792 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
11794 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
11795 Reformat alternatives and attributes so it is easier to identify
11796 which constraints/attributes go with which instruction.
11797 (mov<mode>_hardfloat32, FMOVE64): Likewise.
11798 (mov<mode>_softfloat32, FMOVE64): Likewise.
11799 (mov<mode>_hardfloat64, FMOVE64): Likewise.
11800 (mov<mode>_softfloat64, FMOVE64): Likewise.
11802 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
11804 * doc/extend.texi (PowerPC Built-in Functions): Rename this
11806 (Basic PowerPC Built-in Functions): The new name of the
11807 subsection previously known as "PowerPC Built-in Functions".
11808 (Basic PowerPC Built-in Functions Available on all Configurations):
11810 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
11811 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
11812 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
11813 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
11815 2018-05-11 Martin Jambor <mjambor@suse.cz>
11818 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
11821 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
11824 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
11826 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
11828 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
11829 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
11830 (ix86_handle_option): Handle -mwaitpkg.
11831 * config.gcc: New header.
11832 * config/i386/cpuid.h (bit_WAITPKG): New bit.
11833 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
11834 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
11836 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11837 OPTION_MASK_ISA_WAITPKG.
11838 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
11839 (ix86_option_override_internal): Add PTA_WAITPKG.
11840 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
11841 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
11842 IX86_BUILTIN_TPAUSE.
11843 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
11844 __builtin_ia32_umwait and __builtin_ia32_tpause.
11845 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
11846 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
11847 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
11848 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
11849 UNSPECV_TPAUSE): New.
11850 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
11851 * config/i386/i386.opt: Add -mwaitpkg.
11852 * config/i386/waitpkgintrin.h: New file.
11853 * config/i386/x86intrin.h: New header.
11854 * doc/invoke.texi: Add -mwaitpkg.
11856 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
11859 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
11861 (cortex-m0): Use armv6s-m isa.
11862 (cortex-m0plus): Likewise.
11863 (cortex-m1): Likewise.
11864 (cortex-m0.small-multiply): Likewise.
11865 (cortex-m0plus.small-multiply): Likewise.
11866 (cortex-m1.small-multiply): Likewise.
11868 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
11869 Jakub Jelinek <jakub@redhat.com>
11871 PR tree-optimization/85692
11872 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
11873 source permute as well.
11875 2018-05-11 Martin Liska <mliska@suse.cz>
11878 * doc/extend.texi: Document LLVM style format for no_sanitize
11881 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
11883 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
11884 mode_supports_vsx_dform_quad to mode_supports_dq_form.
11885 (mode_supports_vsx_dform_quad): Likewise.
11886 (mode_supports_vmx_dform): Move these functions to be next to the
11887 other mode_supports functions.
11888 (mode_supports_dq_form): Likewise.
11889 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
11890 mode_supports_dq_form.
11891 (reg_offset_addressing_ok_p): Likewise.
11892 (offsettable_ok_by_alignment): Likewise.
11893 (rs6000_legitimate_offset_address_p): Likewise.
11894 (legitimate_lo_sum_address_p): Likewise.
11895 (rs6000_legitimize_address): Likewise.
11896 (rs6000_legitimize_reload_address): Likewise.
11897 (rs6000_secondary_reload_inner): Likewise.
11898 (rs6000_preferred_reload_class): Likewise.
11899 (rs6000_output_move_128bit): Likewise.
11901 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
11903 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
11904 Generate SImode target register for null target.
11905 <case IX86_BUILTIN_XGETBV>: Ditto.
11906 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
11907 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
11909 2018-05-10 Carl Love <cel@us.ibm.com>
11911 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
11912 dcbtt and dcbtstt if operands[2] is 0.
11914 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
11917 * config/i386/sse.md (usadv64qi): New expander.
11919 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
11921 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
11922 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
11923 -maltivec=be support.
11924 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
11925 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
11926 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
11927 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
11928 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
11929 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
11930 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
11931 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
11932 altivec_vsumsws): Adjust.
11933 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
11934 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
11935 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
11937 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
11938 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
11939 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
11940 (altivec_lve<VI_char>x): Delete expand.
11941 (*altivec_lve<VI_char>x_internal): Rename to...
11942 (altivec_lve<VI_char>x): ... this.
11943 (altivec_lvxl_<mode>): Delete expand.
11944 (*altivec_lvxl_<mode>_internal): Rename to ...
11945 (altivec_lvxl_<mode>): ... this.
11946 (altivec_stvxl_<mode>): Delete expand.
11947 (*altivec_stvxl_<mode>_internal): Rename to ...
11948 (altivec_stvxl_<mode>): ... this.
11949 (altivec_stve<VI_char>x): Delete expand.
11950 (*altivec_stve<VI_char>x_internal): Rename to ...
11951 (altivec_stve<VI_char>x): ... this.
11952 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
11953 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
11954 reduc_plus_scal_<mode>): Adjust.
11955 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
11957 (rs6000_cpu_cpp_builtins): Adjust.
11958 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
11959 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
11960 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
11961 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
11962 -maltivec=be support.
11963 (rs6000_split_vec_extract_var): Adjust.
11964 (rs6000_split_v4si_init): Adjust.
11965 (swap_selector_for_mode): Delete.
11966 (altivec_expand_lvx_be, altivec_expand_stvx_be,
11967 altivec_expand_stvex_be): Delete.
11968 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
11969 -maltivec=be support.
11970 (rs6000_gimple_fold_builtin): Ditto.
11971 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
11973 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
11974 (TARGET_DIRECT_MOVE_64BIT): Adjust.
11975 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
11976 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
11977 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
11978 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
11979 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
11980 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
11981 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
11982 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
11983 anonymous split): Adjust.
11984 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
11985 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
11987 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
11989 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
11990 when --with-gxx-include-dir is also specified.
11991 * configure: Regenerate.
11993 2018-05-09 Jim Wilson <jimw@sifive.com>
11996 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
11997 * config/riscv/t-withmultilib: New.
11998 * config/riscv/withmultilib.h: New.
11999 * doc/install.texi: Document RISC-V --with-multilib-list support.
12001 2018-05-09 Richard Biener <rguenther@suse.de>
12003 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
12005 (vect_bb_vectorization_profitable_p): Adjust. Compute
12006 actual scalar cost using the cost vector and the add_stmt_cost
12009 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12011 PR rtl-optimization/85645
12012 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
12013 in the REG_CFA_REGISTER note for LR, don't leave it empty.
12015 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12017 PR rtl-optimization/85645
12018 * shrink-wrap.c (spread_components): Return a boolean saying if
12019 anything was changed.
12020 (try_shrink_wrapping_separate): Iterate spread_components until
12021 nothing changes anymore.
12023 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12025 PR rtl-optimization/85645
12026 * regrename.c (build_def_use): Also kill the chains that include the
12027 destination of a REG_CFA_REGISTER note.
12029 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12031 PR rtl-optimization/85645
12032 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
12033 insn that has a REG_CFA_REGISTER note.
12035 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
12037 * cfgexpand.c (expand_clobber): New function.
12038 (expand_gimple_stmt_1): Use it.
12039 * tree-vect-stmts.c (vect_clobber_variable): New function,
12041 (vectorizable_simd_clone_call): ...here.
12042 (vectorizable_store): Emit a clobber either side of an
12043 IFN_STORE_LANES sequence.
12044 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
12046 2018-05-09 Tom de Vries <tom@codesourcery.com>
12049 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
12050 (define_insn "trap_if_false"): Add exit after trap.
12052 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
12054 PR rtl-optimization/85638
12055 * bb-reorder.c: Include common/common-target.h.
12056 (create_forwarder_block): New function extracted from...
12057 (fix_up_crossing_landing_pad): ...here. Rename into...
12058 (dw2_fix_up_crossing_landing_pad): ...this.
12059 (sjlj_fix_up_crossing_landing_pad): New function.
12060 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
12061 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
12062 from both partitions and exit the loop after one iteration.
12064 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
12067 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12069 (Basic PowerPC Built-in Functions): The new name of the
12070 subsection previously known as "PowerPC Built-in Functions".
12071 (Basic PowerPC Built-in Functions Available on all Configurations):
12073 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
12075 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
12077 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
12079 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
12082 2018-05-08 Jim Wilson <jimw@sifive.com>
12084 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
12085 (LD_EMUL_SUFFIX): New.
12086 (LINK_SPEC): Use it.
12088 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
12090 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12092 (Basic PowerPC Built-in Functions): The new name of the
12093 subsection previously known as "PowerPC Built-in Functions".
12094 (Basic PowerPC Built-in Functions Available on all Configurations):
12096 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
12098 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
12100 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
12102 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
12105 2018-05-08 Jakub Jelinek <jakub@redhat.com>
12108 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
12109 after cmpelim optimization.
12111 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
12113 * config.gcc: Support "goldmont".
12114 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
12115 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12116 PROCESSOR_GOLDMONT.
12117 * config/i386/i386.c (m_GOLDMONT): Define.
12118 (processor_target_table): Add "goldmont".
12119 (PTA_GOLDMONT): Define.
12120 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
12121 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
12122 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
12123 (fold_builtin_cpu): Add "goldmont".
12124 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
12125 (ix86_option_override_internal): Add "goldmont".
12126 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
12127 (processor_type): Add PROCESSOR_GOLDMONT.
12128 * config/i386/i386.md: Add CPU "glm".
12129 * config/i386/glm.md: New file.
12130 * config/i386/x86-tune.def: Add m_GOLDMONT.
12131 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
12133 2018-05-08 Jakub Jelinek <jakub@redhat.com>
12136 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
12138 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
12139 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
12140 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
12143 * config/i386/i386.c (ix86_fold_builtin): Handle
12144 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
12147 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
12148 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
12150 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
12153 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
12154 (check_arch): Likewise.
12155 (check_fpu): Return the result rather than printing it.
12156 (end arch): Fix operator precedence.
12157 (end cpu): Likewise.
12158 (END): Print the result from check_fpu.
12160 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
12161 Alan Hayward <alan.hayward@arm.com>
12162 David Sherwood <david.sherwood@arm.com>
12164 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
12165 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
12166 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
12167 (*fcmuo<mode>_and): New patterns.
12169 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
12171 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
12172 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
12173 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
12174 (cmp_op, sve_imm_con): New code attributes.
12175 (SVE_COND_INT_CMP, imm_con): Delete.
12176 (cmp_op): Remove above unspecs from int attribute.
12177 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
12179 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
12180 comparison-specific unspecs.
12181 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
12182 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
12183 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
12184 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
12185 (*vec_fcm<cmp_op><mode>): Rename to...
12186 (*fcm<cmp_op><mode>): ...this and adjust likewise.
12187 (*vec_fcmuo<mode>): Rename to...
12188 (*fcmuo<mode>): ...this and adjust likewise.
12189 (*pred_fcm<cmp_op><mode>): New pattern.
12190 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
12191 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
12193 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
12195 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
12196 (aarch64_emit_sve_predicated_cond): New function.
12197 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
12198 (aarch64_emit_unspec_cond_or): Replace with...
12199 (aarch64_emit_sve_or_conds): ...this new function. Use
12200 aarch64_emit_sve_ptrue_op for the individual comparisons and
12201 aarch64_emit_binop to OR them together.
12202 (aarch64_emit_inverted_unspec_cond): Replace with...
12203 (aarch64_emit_sve_inverted_cond): ...this new function. Use
12204 aarch64_emit_sve_ptrue_op for the comparison and
12205 aarch64_emit_unop to invert the result.
12206 (aarch64_expand_sve_vec_cmp_float): Update after the above
12207 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
12209 2018-05-07 Nathan Sidwell <nathan@acm.org>
12211 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
12212 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
12213 (Backwards Compatibility): Likewise.
12215 2018-05-07 Luis Machado <luis.machado@linaro.org>
12219 2018-05-07 Luis Machado <luis.machado@linaro.org>
12221 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12222 <prefetch_dynamic_strides>: New const bool field.
12223 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12224 prefetch_dynamic_strides.
12225 (exynosm1_prefetch_tune): Likewise.
12226 (thunderxt88_prefetch_tune): Likewise.
12227 (thunderx_prefetch_tune): Likewise.
12228 (thunderx2t99_prefetch_tune): Likewise.
12229 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
12231 (aarch64_override_options_internal): Update to set
12232 PARAM_PREFETCH_DYNAMIC_STRIDES.
12233 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12234 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12235 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12236 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12237 prefetch-dynamic-strides setting.
12239 2018-05-07 Luis Machado <luis.machado@linaro.org>
12241 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12242 <minimum_stride>: New const int field.
12243 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12244 minimum_stride field.
12245 (exynosm1_prefetch_tune): Likewise.
12246 (thunderxt88_prefetch_tune): Likewise.
12247 (thunderx_prefetch_tune): Likewise.
12248 (thunderx2t99_prefetch_tune): Likewise.
12249 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
12250 (aarch64_override_options_internal): Update to set
12251 PARAM_PREFETCH_MINIMUM_STRIDE.
12252 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12253 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12254 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12255 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12256 stride is constant and is below the minimum stride threshold.
12258 2018-05-07 Luis Machado <luis.machado@linaro.org>
12260 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
12263 2018-05-07 Luis Machado <luis.machado@linaro.org>
12265 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12266 <prefetch_dynamic_strides>: New const bool field.
12267 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12268 prefetch_dynamic_strides.
12269 (exynosm1_prefetch_tune): Likewise.
12270 (thunderxt88_prefetch_tune): Likewise.
12271 (thunderx_prefetch_tune): Likewise.
12272 (thunderx2t99_prefetch_tune): Likewise.
12273 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
12275 (aarch64_override_options_internal): Update to set
12276 PARAM_PREFETCH_DYNAMIC_STRIDES.
12277 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12278 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12279 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12280 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12281 prefetch-dynamic-strides setting.
12283 2018-05-07 Luis Machado <luis.machado@linaro.org>
12285 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12286 <minimum_stride>: New const int field.
12287 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12288 minimum_stride field.
12289 (exynosm1_prefetch_tune): Likewise.
12290 (thunderxt88_prefetch_tune): Likewise.
12291 (thunderx_prefetch_tune): Likewise.
12292 (thunderx2t99_prefetch_tune): Likewise.
12293 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
12294 (aarch64_override_options_internal): Update to set
12295 PARAM_PREFETCH_MINIMUM_STRIDE.
12296 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12297 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12298 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12299 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12300 stride is constant and is below the minimum stride threshold.
12302 2018-05-06 Jakub Jelinek <jakub@redhat.com>
12305 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
12306 the type is addressable. Don't force op into register if it has
12309 2018-05-05 Roland McGrath <mcgrathr@google.com>
12312 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
12313 any section for which we don't know a specific type it should have,
12314 regardless of name. Previously this was done only for the exact
12315 names ".init_array", ".fini_array", and ".preinit_array".
12316 (default_elf_asm_named_section): Add comment about
12317 relationship with default_section_type_flags and SECTION_NOTYPE.
12318 (get_section): Don't consider it a type conflict if one side has
12319 SECTION_NOTYPE and the other doesn't, as long as neither has the
12320 SECTION_BSS et al used in the default_section_type_flags logic.
12322 2018-05-05 Tom de Vries <tom@codesourcery.com>
12325 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
12326 (workaround_barsyncs): New function.
12327 (nvptx_reorg): Use workaround_barsyncs.
12328 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
12329 (define_expand "nvptx_membar_cta"): New define_expand.
12330 (define_insn "*nvptx_membar_cta"): New insn.
12332 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
12334 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
12335 To improve optimization opportunities.
12336 * builtin-types.def: The new needed builtin types for the above.
12338 2018-05-04 Richard Biener <rguenther@suse.de>
12340 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
12341 * gimple-ssa-store-merging.c
12342 (imm_store_chain_info::output_merged_store): Remove redundant create,
12343 release split_store vector contents on failure.
12344 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
12345 scalar stmt vector on cache hit.
12347 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
12349 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
12351 * config.gcc (powerpc-xilinx-eabi*): Remove.
12352 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
12354 (fusion_addis_mem_combo_load): Ditto.
12355 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
12357 (rs6000_cpu_cpp_builtins): Ditto.
12358 * config/rs6000/rs6000-linux.c
12359 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
12360 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
12361 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
12363 (rs6000_setup_reg_addr_masks): Ditto.
12364 (rs6000_init_hard_regno_mode_ok): Ditto.
12365 (rs6000_option_override_internal): Ditto.
12366 (legitimate_lo_sum_address_p): Ditto.
12367 (rs6000_legitimize_address): Ditto.
12368 (rs6000_legitimize_reload_address): Ditto.
12369 (rs6000_legitimate_address_p): Ditto.
12370 (abi_v4_pass_in_fpr): Ditto.
12371 (setup_incoming_varargs): Ditto.
12372 (rs6000_gimplify_va_arg): Ditto.
12373 (rs6000_split_multireg_move): Ditto.
12374 (rs6000_savres_strategy): Ditto.
12375 (rs6000_emit_prologue_components): Ditto.
12376 (rs6000_emit_epilogue_components): Ditto.
12377 (rs6000_emit_prologue): Ditto.
12378 (rs6000_emit_epilogue): Ditto.
12379 (rs6000_elf_file_end): Ditto.
12380 (rs6000_function_value): Ditto.
12381 (rs6000_libcall_value): Ditto.
12382 * config/rs6000/rs6000.h: Ditto.
12383 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
12384 (TARGET_MINMAX): ... this. New.
12385 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
12386 * config/rs6000/rs6000.md: Remove Xilinx FP support.
12387 (*movsi_internal1_single): Delete.
12388 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
12389 mfpu=, mxilinx-fpu): Delete.
12390 * config/rs6000/singlefp.h: Delete.
12391 * config/rs6000/sysv4.h: Remove Xilinx FP support.
12392 * config/rs6000/t-rs6000: Ditto.
12393 * config/rs6000/t-xilinx: Delete.
12394 * config/rs6000/titan.md: Adjust for fp_type removal.
12395 * config/rs6000/vsx.md: Remove Xilinx FP support.
12396 (VStype_simple): Delete.
12397 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
12398 * config/rs6000/xfpu.h: Delete.
12399 * config/rs6000/xfpu.md: Delete.
12400 * config/rs6000/xilinx.h: Delete.
12401 * config/rs6000/xilinx.opt: Delete.
12402 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
12403 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
12405 2018-05-04 Tom de Vries <tom@codesourcery.com>
12408 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
12411 2018-05-04 Richard Biener <rguenther@suse.de>
12413 PR middle-end/85627
12414 * tree-complex.c (update_complex_assignment): We are always in SSA form.
12415 (expand_complex_div_wide): Likewise.
12416 (expand_complex_operations_1): Likewise.
12417 (expand_complex_libcall): Preserve EH info of the original stmt.
12418 (tree_lower_complex): Handle removed blocks.
12419 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
12420 on complex multiplication and division libcall builtins.
12422 2018-05-04 Richard Biener <rguenther@suse.de>
12424 PR middle-end/85574
12425 * fold-const.c (negate_expr_p): Restrict negation of operand
12426 zero of a division to when we know that can happen without
12428 (fold_negate_expr_1): Likewise.
12430 2018-05-04 Jakub Jelinek <jakub@redhat.com>
12433 * real.h (real_nextafter): Declare.
12434 * real.c (real_nextafter): New function.
12435 * fold-const-call.c (fold_const_nextafter): New function.
12436 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
12437 CASE_CFN_NEXTTOWARD.
12438 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
12439 even when arg1_mode is different from arg0_mode.
12441 2018-05-03 Nathan Sidwell <nathan@acm.org>
12443 * doc/extend.texi (Deprecated Features): Remove
12444 -ffriend-injection.
12445 (Backwards Compatibility): Likewise.
12446 * doc/invoke.texi (C++ Language Options): Likewise.
12447 (C++ Dialect Options): Likewise.
12449 2018-05-03 Jakub Jelinek <jakub@redhat.com>
12452 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
12453 _mm512_mask_mullox_epi64): New intrinsics.
12455 2018-05-03 Tom de Vries <tom@codesourcery.com>
12458 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12459 dump files): Add offload-tree.
12461 2018-05-03 Richard Biener <rguenther@suse.de>
12463 PR tree-optimization/85615
12464 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
12465 to loops not nested in BBs loop father to avoid creating multi-entry
12468 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12470 PR tree-optimization/70291
12471 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
12472 arguments. Change return type to tree. Emit libcall as a new
12473 statement rather than replacing existing one when inplace_p is true.
12474 (expand_complex_multiplication_components): New function.
12475 (expand_complex_multiplication): Expand floating-point complex
12476 multiplication using the above.
12477 (expand_complex_division): Rename inner_type parameter to type.
12478 Update expand_complex_libcall call-site.
12479 (expand_complex_operations_1): Update expand_complex_multiplication
12480 and expand_complex_division call-sites.
12482 2018-05-02 Jakub Jelinek <jakub@redhat.com>
12485 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
12486 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
12487 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
12488 the highest significant bit of the shift count mask is clear. In
12489 check whether and[sq]i3 is needed verify that all significant bits
12490 of the shift count other than the highest are set.
12492 2018-05-02 Tom de Vries <tom@codesourcery.com>
12495 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
12496 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
12497 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
12498 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
12499 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
12500 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
12501 __builtin_goacc_parlevel_size.
12503 2018-05-02 Richard Biener <rguenther@suse.de>
12505 PR tree-optimization/85597
12506 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
12507 do not use split vect_get_vec_defs call but call vect_get_slp_defs
12510 2018-05-02 Tom de Vries <tom@codesourcery.com>
12513 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12514 dump files): Add ltrans-tree.
12516 2018-05-02 Tom de Vries <tom@codesourcery.com>
12519 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12520 dump files): Add wpa-ipa.
12522 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
12524 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
12525 powerpc*-*-linux*paired* target.
12526 * config/rs6000/750cl.h: Delete.
12527 * config/rs6000/paired.h: Delete.
12528 * config/rs6000/paired.md: Delete.
12529 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
12531 * config/rs6000/rs6000-builtin.def: Remove paired float support.
12532 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
12533 comment. Remove paired float support.
12534 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
12535 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
12537 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
12538 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
12540 * config/rs6000/rs6000.c: Remove paired float support.
12541 (paired_expand_vector_init, paired_expand_vector_move,
12542 paired_emit_vector_compare, paired_emit_vector_cond_expr,
12543 (paired_expand_lv_builtin, paired_expand_stv_builtin,
12544 paired_expand_builtin, paired_expand_predicate_builtin,
12545 paired_init_builtins): Delete.
12546 * config/rs6000/rs6000.h: Remove paired float support.
12547 * config/rs6000/rs6000.md: Remove paired float support.
12548 (move_from_CR_ov_bit): Delete.
12549 * config/rs6000/rs6000.opt (mpaired): Delete.
12550 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
12551 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
12553 2018-05-02 Richard Biener <rguenther@suse.de>
12555 PR middle-end/85567
12556 * gimplify.c (gimplify_save_expr): When in SSA form allow
12557 SAVE_EXPRs to compute to SSA vars.
12559 2018-05-02 Jakub Jelinek <jakub@redhat.com>
12562 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
12563 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
12564 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
12565 clobber operands[2], instead use a new pseudo. Formatting fixes.
12567 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
12569 PR tree-optimization/85586
12570 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
12571 exit early for statements in the same group if the accesses are
12574 2018-05-02 Tom de Vries <tom@codesourcery.com>
12577 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
12580 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
12582 PR tree-optimization/85143
12583 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
12585 2018-05-01 Tom de Vries <tom@codesourcery.com>
12588 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
12589 not found" error message.
12591 2018-05-01 Tom de Vries <tom@codesourcery.com>
12594 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
12595 * vec.c (test_ordered_remove_if): New function.
12596 (vec_c_tests): Call test_ordered_remove_if.
12597 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
12598 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
12599 * tree-vect-patterns.c (vect_pattern_recog_1): Use
12600 VEC_ORDERED_REMOVE_IF.
12602 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12604 PR tree-optimization/82665
12605 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
12606 pointer subtraction where arguments come from a memchr call.
12608 2018-05-01 Jakub Jelinek <jakub@redhat.com>
12610 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
12611 --push-state --as-needed and --pop-state instead of --as-needed and
12612 --no-as-needed if ld supports it.
12613 * configure: Regenerated.
12616 * doc/install.texi2html: Replace _002d with - and _002a with * in
12617 generated html files using sed.
12619 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12622 * gcc-rich-location.c (blank_line_before_p): New function.
12623 (use_new_line): New function.
12624 (gcc_rich_location::add_fixit_insert_formatted): New function.
12625 * gcc-rich-location.h
12626 (gcc_rich_location::add_fixit_insert_formatted): New function.
12628 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12630 * selftest.c (assert_streq): Rename "expected" and "actual" to
12631 "val1" and "val2". Extend NULL-handling to cover both inputs
12632 symmetrically, while still requiring both to be non-NULL for a pass.
12633 * selftest.h (assert_streq): Rename "expected" and "actual" to
12635 (ASSERT_EQ): Likewise.
12636 (ASSERT_EQ_AT): Likewise.
12637 (ASSERT_KNOWN_EQ): Likewise.
12638 (ASSERT_KNOWN_EQ_AT): Likewise.
12639 (ASSERT_NE): Likewise.
12640 (ASSERT_MAYBE_NE): Likewise.
12641 (ASSERT_MAYBE_NE_AT): Likewise.
12642 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
12643 the assertion to pass.
12644 (ASSERT_STREQ_AT): Likewise.
12646 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
12648 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
12649 interaction with -pie.
12651 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12653 * selftest.h: Fix alphabetization of per-source-file selftest
12656 2018-04-30 Jason Merrill <jason@redhat.com>
12658 PR c++/61982 - dead stores to destroyed objects.
12659 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
12662 2018-04-30 Jason Merrill <jason@redhat.com>
12664 * tree.c (build_clobber): New.
12665 * tree.h: Declare it.
12666 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
12668 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12670 * diagnostic-show-locus.c (layout::layout): Update for
12671 location_get_source_line returning a char_span.
12672 (struct char_span): Move to input.h.
12673 (struct correction): Update for fields in char_span becoming
12675 (struct source_line): Update for location_get_source_line
12676 returning a char_span.
12677 (layout::print_line): Likewise.
12678 * edit-context.c (edited_file::print_content): Likewise.
12679 (edited_file::print_diff_hunk): Likewise.
12680 (edited_file::print_run_of_changed_lines): Likewise.
12681 (edited_file::get_num_lines): Likewise.
12682 (edited_line::edited_line): Likewise.
12683 * final.c (asm_show_source): Likewise.
12684 * input.c (location_get_source_line): Convert return type
12685 from const char * to char_span, losing the final "line_len"
12687 (dump_location_info): Update for the above.
12688 (get_substring_ranges_for_loc): Likewise. Use a char_span
12689 when handling the literal within the line.
12690 (test_reading_source_line): Update for location_get_source_line
12691 returning a char_span.
12692 * input.h (class char_span): Move here from
12693 diagnostic-show-locus.c, converting from a struct to a class.
12694 Make data members private.
12695 (char_span::operator bool): New.
12696 (char_span::length): New.
12697 (char_span::get_buffer): New.
12698 (char_span::operator[]): New.
12699 (char_span::subspan): Make const.
12700 (char_span::xstrdup): New.
12701 (location_get_source_line): Convert return type from const char *
12702 to char_span, losing the final "line_size" param.
12704 2018-04-30 Jan Hubicka <jh@suse.cz>
12706 * lto-wrapper.c (ltrans_priorities): New static var.
12707 (cmp_priority): New.
12708 (run_gcc): Read priorities and if doing parallel build order
12709 the Makefile by them.
12711 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12713 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
12715 2018-04-30 Richard Biener <rguenther@suse.de>
12717 * tree-cfg.c (verify_address): Remove base argument, add
12718 flag whether to check TREE_ADDRESSABLE and do that.
12719 (verify_expr): Remove.
12720 (verify_types_in_gimple_reference): Add pieces from verify_expr.
12721 (verify_gimple_assign_single): Likewise.
12722 (verify_gimple_switch): Likewise.
12723 (verify_expr_location_1): Dereference tp once. Add (disabled)
12724 piece from verify_expr.
12725 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
12727 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
12729 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
12731 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
12733 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
12734 (small_data_pattern): Likewise.
12735 (arc_rewrite_small_data): Likewise.
12736 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
12737 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
12738 (get_symbol_alignment): New function.
12739 (legitimate_small_data_address_p): Likewise.
12740 (legitimate_scaled_address): Update, call
12741 legitimate_small_data_address_p.
12742 (output_sdata): New static variable.
12743 (arc_print_operand): Update how we handle small data operands.
12744 (arc_print_operand_address): Likewise.
12745 (arc_legitimate_address_p): Update, use
12746 legitimate_small_data_address_p.
12747 (arc_rewrite_small_data_p): Remove.
12748 (arc_rewrite_small_data_1): Likewise.
12749 (arc_rewrite_small_data): Likewise.
12750 (small_data_pattern): Likewise.
12751 (compact_sda_memory_operand): Update to use
12752 legitimate_small_data_address_p and get_symbol_alignment.
12753 (prepare_move_operands): Don't rewite sdata pattern.
12754 (prepare_extend_operands): Remove.
12755 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
12757 (zero_extendqisi2): Likewise.
12758 (zero_extendhisi2): Likewise.
12759 (extendqihi2): Likewise.
12760 (extendqisi2): Likewise.
12761 (extendhisi2): Likewise.
12762 (addsi3): Likewise.
12763 (subsi3): Likewise.
12764 (andsi3): Likewise.
12765 * config/arc/constraints.md (Usd): Change it to memory constraint.
12767 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
12769 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
12770 as source of std instructions.
12771 * config/arc/arc.md (movsi_insn): Update pattern predicate to
12772 allow 6-bit constants as source for store instructions.
12773 (movdi_insn): Update instruction pattern to allow 6-bit constants
12774 as source for store instructions.
12776 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
12778 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
12780 2018-04-30 Nathan Sidwell <nathan@acm.org>
12781 Sandra Loosemore <sandra@codesourcery.com>
12783 * dumpfile.c (dump_open): Allow '-' for stdout.
12784 * doc/invoke.texi (Developer Options): Document dump filename
12785 determination early. Document stdin/stdout selection.
12787 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
12789 Microblaze Target: PIC data text relative
12791 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
12792 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
12794 * config/microblaze/microblaze.h (microblaze_constant_address_p):
12795 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
12796 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
12797 New addressing mode for data-text relative position indepenedent code.
12798 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
12799 'ADDRESS_SYMBOLIC_TXT_REL'.
12800 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
12801 (microblaze_legitimate_pic_operand): Exclude function calls from
12802 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
12803 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
12805 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
12806 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
12807 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
12808 for 'address + offset'.
12809 (microblaze_expand_prologue): Add new function prologue call for
12811 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
12812 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
12813 table in case of TARGET_PIC_DATA_TEXT_REL.
12814 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
12815 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
12816 Add new macros 'UNSPEC_TEXT',
12817 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
12818 + exclude function calls from 'UNSPEC_PLT' in case of data text
12820 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
12821 new target hook for generating address diff vector tables in case of
12823 * doc/tm.texi : Regenerate.
12824 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
12825 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
12826 of addr diff vector generation.
12827 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
12828 target hook definition.
12829 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
12830 Add default function for generate_pic_addr_diff_vec -> flag_pic.
12831 * doc/invoke.texi (Add new pic option): Add new microblaze pic
12832 option for data text relative.
12834 2018-04-30 Richard Biener <rguenther@suse.de>
12836 * tree-chrec.h (evolution_function_is_constant_p): Remove
12838 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
12840 2018-04-30 Richard Biener <rguenther@suse.de>
12843 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
12845 2018-04-30 Richard Biener <rguenther@suse.de>
12847 PR tree-optimization/28364
12848 PR tree-optimization/85275
12849 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
12850 copying first exit test.
12852 2018-04-28 Mark Wielaard <mark@klomp.org>
12854 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
12855 dwarf_version >= 5.
12856 (dwarf_AT): Handle DW_AT_addr_base.
12857 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
12859 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
12862 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
12863 (*ashl<dwi>3_doubleword_mask_1): Ditto.
12864 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
12865 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
12867 2018-04-28 Richard Biener <rguenther@suse.de>
12869 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
12870 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
12871 to reflect use. Only add interesting stmts.
12873 2018-04-27 Martin Jambor <mjambor@suse.cz>
12876 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
12877 the jump function allows for passing through aggregate values.
12879 2018-04-27 David Malcolm <dmalcolm@redhat.com>
12881 * input.h (in_system_header_at): Convert from macro to inline
12883 (from_macro_expansion_at): Likewise.
12884 (from_macro_definition_at): Likewise.
12886 2018-04-27 Jeff Law <law@redhat.com>
12888 * config.gcc: Mark tile* targets as deprecated/obsolete.
12890 2018-04-27 Richard Biener <rguenther@suse.de>
12892 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
12895 2018-04-27 Richard Biener <rguenther@suse.de>
12897 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
12899 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
12901 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
12902 with Yd constraint. Set "preferred_for_speed" attribute from
12903 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
12904 with Yd constraint.
12905 (*movdi_internal): Ditto.
12906 (movti_interunit splitters): Remove
12907 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
12908 (movdi_interunit splitters): Ditto.
12909 * config/i386/constraints.md (Ye): Remove.
12910 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
12912 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12915 * config/aarch64/constraints.md (Usg): Limit to 31.
12916 (Usj): Limit to 63.
12918 2018-04-27 Jakub Jelinek <jakub@redhat.com>
12920 PR tree-optimization/85529
12921 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
12922 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
12923 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
12924 zero extension or masking of the MSB bit.
12925 (optimize_range_tests): Add FIRST_BB argument, pass it through
12926 to optimize_range_tests_var_bound.
12927 (maybe_optimize_range_tests, reassociate_bb): Adjust
12928 optimize_range_tests callers.
12930 2018-04-26 Richard Biener <rguenther@suse.de>
12931 Jakub Jelinek <jakub@redhat.com>
12933 * cgraph.h (symbol_table): Just declare debug method here.
12934 * symtab.c (symbol_table::debug): Define.
12936 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
12938 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
12940 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
12942 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
12943 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
12944 (*movdi_internal): Substitute Yi and Yj constraint with x
12945 and Ym and Yn constraint with y constraint. Update "isa"
12946 attribute and set "preferred_for_speed" attribute from
12947 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
12948 (*movsi_internal): Ditto.
12949 (*movdf_internal): Ditto.
12950 (*movsf_internal): Ditto.
12951 (*zero_extendsidi2): Ditto.
12952 * config/i386/sse.md (vec_set<mode>_0): Ditto.
12953 (sse2_loadld): Ditto.
12954 (*vec_extract<ssevecmodelower>_0): Ditto.
12955 (*vec_extractv4si_0_zext_sse4): Ditto.
12956 (vec_concatv2di): Ditto.
12957 (*vec_dup<mode>): Ditto.
12958 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
12959 * config/i386/constraints.md (Yi): Remove.
12964 2018-04-26 Nathan Sidwell <nathan@acm.org>
12966 * dumpfile.c (dump_open): New.
12967 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
12968 (dump_finish): Detect stdio/stderr by value not name.
12970 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
12972 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
12974 2018-04-26 Tom de Vries <tom@codesourcery.com>
12977 * config/nvptx/nvptx.c (verify_neutering_jumps)
12978 (verify_neutering_labels): New function
12979 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
12981 2018-04-26 Tom de Vries <tom@codesourcery.com>
12984 * config/nvptx/nvptx.c (needs_neutering_p): New function.
12985 (nvptx_single): Use needs_neutering_p to skip over insns that do not
12988 2018-04-26 Richard Biener <rguenther@suse.de>
12989 Tom de Vries <tom@codesourcery.com>
12992 * lto-streamer-out.c (output_function): Fixup loops if required to match
12993 discovery done in the reader.
12995 2018-04-26 Richard Biener <rguenther@suse.de>
12997 PR tree-optimization/85116
12998 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
12999 have a loop exit from the single latch predecessor. Remove
13000 case of header with just condition.
13001 (ch_base::copy_headers): Exclude infinite loops from any
13003 (pass_ch::execute): Record exits.
13005 2018-04-26 Richard Biener <rguenther@suse.de>
13007 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
13008 prologue cost vector and pass it to vect_get_load_cost.
13009 (vect_get_peeling_costs_all_drs): Likewise.
13010 (vect_peeling_hash_get_lowest_cost): Likewise.
13011 (vect_enhance_data_refs_alignment): Likewise.
13013 2018-04-26 Richard Biener <rguenther@suse.de>
13015 PR middle-end/85450
13016 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
13017 checking of integer<->pointer conversions.
13018 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
13019 sign-/zero-extending pointer types.
13020 (expand_omp_for_static_chunk): Likewise.
13022 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
13023 Jean Lee <xiaoyur347@gmail.com>
13025 * config/mips/mips.c (mips_asan_shadow_offset): New function.
13026 (TARGET_ASAN_SHADOW_OFFSET): Define.
13027 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
13028 true for -fsanitize=address.
13030 2018-04-25 Mark Wielaard <mark@klomp.org>
13032 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
13035 2018-04-25 Jakub Jelinek <jakub@redhat.com>
13037 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
13038 than "alu", remove explicit "memory" and "imm_disp" attributes.
13039 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
13041 PR middle-end/85414
13042 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
13043 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
13044 gen_lowpart_no_emit.
13046 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
13049 * config/i386/i386.c (ix86_expand_builtin): Change memory
13050 operand to XI, extend p0 to Pmode.
13051 * config/i386/i386.md: Change unspec volatile and operand
13052 1 mode to XI, change operand 0 mode to P.
13054 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13056 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
13057 GET_MODE_MASK before any checking.
13058 (nds32_can_use_bset_p): Likewise.
13059 (nds32_can_use_btgl_p): Likewise.
13061 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13063 * config/nds32/nds32-doubleword.md: New define_split pattern for
13064 illegal register number.
13066 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13068 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
13070 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13072 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
13074 2018-04-25 Richard Biener <rguenther@suse.de>
13076 * lto-streamer.h (LTO_major_version): Bump to 8.
13078 2018-04-25 Jakub Jelinek <jakub@redhat.com>
13080 * BASE-VER: Set to 9.0.0.
13082 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
13084 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
13085 in __abskf2 and __powikf2.
13087 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13090 * config/aarch64/constraints.md (Usg, Usj): New constraints.
13091 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
13092 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
13093 Use the above on operand 2. Reindent.
13094 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
13096 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
13099 * common/config/i386/i386-common.c (ix86_handle_option): Don't
13101 * config/i386/i386.opt (mcet): Removed.
13102 * doc/install.texi: Remove -mcet documentation.
13103 * doc/invoke.texi: Likewise.
13105 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
13108 * doc/install.texi: Remove -mcet from bootstrap-cet.
13110 2018-04-24 Jakub Jelinek <jakub@redhat.com>
13113 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
13114 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
13118 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
13119 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
13120 containing a CONST_VECTOR.
13122 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
13124 * doc/install.texi: Update newlib dependency for nvptx.
13126 2018-04-24 Jakub Jelinek <jakub@redhat.com>
13129 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
13130 instead of INTVAL when shifting x left.
13132 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
13134 PR tree-optimization/85478
13135 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
13136 vect_grouped_store_supported for single element vectors.
13138 2018-04-24 Richard Biener <rguenther@suse.de>
13141 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
13142 load cost increase to the case of non-constant step.
13144 2018-04-24 Jakub Jelinek <jakub@redhat.com>
13147 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
13148 destination if any_malformed_asm.
13150 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
13152 PR middle-end/85496
13153 * expr.c (store_field): In the bitfield case, if the value comes from
13154 a function call and is returned in registers by means of a PARALLEL,
13155 do not change the mode of the temporary unless BLKmode and VOIDmode.
13157 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
13159 PR rtl-optimization/85423
13160 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
13161 dependencies to debug insns when the previous insn is non-debug.
13163 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
13165 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
13166 enums into a single definition.
13167 (fls): Fix predicates and printing.
13170 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
13172 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
13173 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
13174 and short u6 immediate.
13175 (check_if_valid_sleep_operand): Remove.
13176 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
13178 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13180 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
13181 flag_always_save_lp condition.
13182 * config/nds32/nds32.opt (malways-save-lp): New option.
13184 2018-04-22 Shiva Chen <shiva0217@gmail.com>
13186 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
13187 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
13188 * config/nds32/nds32.h
13189 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
13190 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
13192 2018-04-22 Shiva Chen <shiva0217@gmail.com>
13194 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
13195 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
13197 2018-04-22 Shiva Chen <shiva0217@gmail.com>
13198 Chung-Ju Wu <jasonwucj@gmail.com>
13200 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
13202 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
13203 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
13205 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13207 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
13209 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13211 * config/nds32/nds32-protos.h (nds32_data_alignment,
13212 nds32_local_alignment): Declare.
13213 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
13214 nds32_local_alignment): New functions.
13215 (TARGET_CONSTANT_ALIGNMENT): Define.
13216 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
13218 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13220 * config/nds32/nds32.c
13221 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
13222 (TARGET_MODES_TIEABLE_P): Likewise.
13224 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13226 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
13227 level Ofast and Og.
13229 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
13230 Chung-Ju Wu <jasonwucj@gmail.com>
13232 * config/nds32/constants.md (unspec_volatile_element): Add enum values
13233 for unaligned access.
13234 * config/nds32/nds32-intrinsic.c: Implementation of expanding
13236 * config/nds32/nds32-intrinsic.md: Likewise.
13237 * config/nds32/nds32_intrinsic.h: Likewise.
13238 * config/nds32/nds32.h (nds32_builtins): Likewise.
13239 * config/nds32/nds32.opt (munaligned-access): New option.
13240 * config/nds32/nds32.c (nds32_asm_file_start): Display
13241 flag_unaligned_access status.
13243 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
13245 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
13246 -mno-relax is present.
13247 * config/riscv/linux.h (LINK_SPEC): Ditto.
13249 2018-04-20 Martin Sebor <msebor@redhat.com>
13252 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
13254 (gimple_fold_builtin_stxcpy_chk): Same.
13255 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
13257 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
13260 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
13261 __powikf2 when long double is IEEE 128-bit.
13263 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
13265 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
13266 step to make sure stack always aligned.
13268 2018-04-20 Carl Love <cel@us.ibm.com>
13271 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
13272 size check for arg0.
13274 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
13275 Tom de Vries <tom@codesourcery.com>
13278 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
13279 Emit insns for calls too.
13280 (nvptx_find_par): Always look for worker-level predecessor insn.
13281 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
13283 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
13284 (nvptx_process_pars): Propagate frames for calls.
13286 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
13289 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
13291 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
13292 (ix86_handle_option): Don't handle OPT_mibt.
13293 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
13295 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
13297 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
13298 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
13299 (ix86_target_macros): Define __CET__ with flag_cf_protection
13300 for -fcf-protection.
13301 * config/i386/i386.c (isa2_opts): Remove -mibt.
13302 * config/i386/i386.h (TARGET_IBT): Removed.
13303 (TARGET_IBT_P): Likewise.
13304 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
13305 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
13306 * config/i386/i386.opt (mcet): Update help message.
13307 (mshstk): Likewise.
13309 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
13310 -mcet as an alias for -mshstk.
13312 2018-04-20 Richard Biener <rguenther@suse.de>
13314 PR middle-end/85475
13315 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
13316 complexity by forcing a single use of the multiply operand.
13318 2018-04-20 Martin Jambor <mjambor@suse.cz>
13321 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
13322 recursion dependency to only apply to non-clones.
13324 2018-04-20 Martin Jambor <mjambor@suse.cz>
13327 * ipa-cp.c (create_specialized_node): Check that clones of
13328 self-recursive edges exist during IPA-CP.
13330 2018-04-19 Toon Moene <toon@moene.org>
13332 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
13335 2018-04-19 Jakub Jelinek <jakub@redhat.com>
13337 PR tree-optimization/85467
13338 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
13339 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
13340 VECTOR_CST element to type.
13342 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
13345 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
13346 * config/i386/i386.md (builtin_setjmp_setup): Removed.
13347 (builtin_longjmp): Likewise.
13348 (save_stack_nonlocal): New pattern.
13349 (restore_stack_nonlocal): Likewise.
13351 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
13354 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
13355 Replace ASM_OUTPUT_LABEL with fprintf.
13357 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
13360 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
13361 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
13362 * config/i386/i386-c.c (ix86_target_macros_internal): Also
13363 define __IBT__ and __SHSTK__ for -fcf-protection.
13364 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
13366 (ix86_trampoline_init): Likewise.
13367 (x86_output_mi_thunk): Likewise.
13368 (ix86_notrack_prefixed_insn_p): Likewise.
13369 (ix86_option_override_internal): Don't disallow -fcf-protection.
13370 * config/i386/i386.md (rdssp<mode>): Also enable for
13372 (incssp<mode>): Likewise.
13373 (nop_endbr): Likewise.
13374 * config/i386/i386.opt (mcet): Change help message to built-in
13377 (mshstk): Likewise.
13378 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
13379 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
13380 enable CET built-in functions.
13382 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
13384 * common/config/i386/i386-common.c
13385 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
13386 OPTION_MASK_ISA_MOVDIRI_UNSET,
13387 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
13388 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
13389 * config.gcc (movdirintrin.h): New header.
13390 * config/i386/cpuid.h (bit_MOVDIRI,
13391 bit_MOVDIR64B): New bits.
13392 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
13394 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
13395 (VOID, PVOID, PCVOID)): New function types.
13396 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
13397 __builtin_ia32_directstoreu_u64,
13398 __builtin_ia32_movdir64b): New builtins.
13399 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
13400 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
13402 (ix86_valid_target_attribute_inner_p): Ditto.
13403 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
13404 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
13405 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
13406 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
13407 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
13408 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
13409 (movdiri<mode>, movdir64b_<mode>): New.
13410 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
13411 * config/i386/immintrin.h: Include movdirintrin.h.
13412 * config/i386/movdirintrin.h: New file.
13413 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
13415 2018-04-19 Richard Biener <rguenther@suse.de>
13417 PR middle-end/85455
13418 * cfg.c (clear_bb_flags): When loop state says we have
13419 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
13421 2018-04-19 Richard Biener <rguenther@suse.de>
13423 PR tree-optimization/84737
13424 * tree-vect-data-refs.c (vect_copy_ref_info): New function
13425 copying restrict info.
13426 (vect_setup_realignment): Use it.
13427 * tree-vectorizer.h (vect_copy_ref_info): Declare.
13428 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
13429 the first DR to all generated stores.
13430 (vectorizable_load): Likewise for loads.
13432 2018-04-19 Jakub Jelinek <jakub@redhat.com>
13434 PR tree-optimization/85446
13435 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
13436 the integral and pointer types to have the same precision.
13438 * doc/install.texi: Document --disable-cet being the default and
13441 2018-04-18 Martin Liska <mliska@suse.cz>
13443 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
13446 2018-04-18 Martin Liska <mliska@suse.cz>
13449 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
13452 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
13453 arguments if they are comparable.
13455 2018-04-18 Martin Liska <mliska@suse.cz>
13458 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
13461 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
13464 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
13467 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
13468 ENDBR after calling __morestack.
13470 2018-04-18 David Malcolm <dmalcolm@redhat.com>
13473 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
13474 by using gcc_base_ver to generate a gcc_driver_version, and use
13475 it when generating GCC_DRIVER_NAME.
13476 * configure: Regenerate.
13478 2018-04-18 Jakub Jelinek <jakub@redhat.com>
13481 * config.gcc: Obsolete powerpc*-*-*spe*.
13483 2018-04-17 Jakub Jelinek <jakub@redhat.com>
13486 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
13487 (stabstr_D): Change type of unum from unsigned int to
13488 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
13491 2018-04-17 Jim Wilson <jimw@sifive.com>
13494 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
13495 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
13496 Set arg_pointer_offset after using pretend_args_size.
13498 2018-04-17 Jakub Jelinek <jakub@redhat.com>
13500 PR rtl-optimization/85431
13501 * dse.c (record_store): Ignore zero width stores.
13504 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
13505 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
13506 __builtin_stack_restore rather than after it.
13507 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
13508 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
13509 argument instead of virtual_dynamic_stack_rtx.
13511 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
13513 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
13515 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
13516 Add note to error message to explain internal mapping of overloaded
13517 built-in function name to non-overloaded built-in function name.
13518 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
13521 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
13524 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
13525 where the inputs overlap with the output.
13527 2018-04-17 Jakub Jelinek <jakub@redhat.com>
13529 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
13530 (=v, v) alternative and explicit "memory" attribute.
13531 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
13532 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
13534 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
13535 "sselog1" type instead of "sselog".
13536 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
13537 "sselog". Remove explicit "memory" attribute.
13538 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
13539 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
13541 (vec_extract_hi_v32hi): Merge all alternatives into one, use
13542 "sselog1" type instead of "sselog". Remove explicit "memory"
13544 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
13545 use "sselog1" type instead of "sselog". Remove explicit "memory"
13547 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
13548 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
13550 (vec_extract_hi_v64qi): Merge all alternatives into one, use
13551 "sselog1" type instead of "sselog". Remove explicit "memory"
13553 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
13554 use "sselog1" type instead of "sselog". Remove explicit "memory"
13558 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
13560 PR middle-end/85414
13561 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
13564 2018-04-17 Martin Jambor <mjambor@suse.cz>
13567 * ipa-cp.c (create_specialized_node): Call
13568 expand_all_artificial_thunks if necessary.
13570 2018-04-17 Martin Liska <mliska@suse.cz>
13573 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
13574 in message, remote space in between '_G' and '('.
13576 2018-04-17 Jakub Jelinek <jakub@redhat.com>
13579 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
13580 avx512f_vmcmp<mode>3<round_saeonly_name>,
13581 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
13582 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
13583 avx512f_rndscale<mode><round_saeonly_name>,
13584 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
13585 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
13586 Use %<iptr>2 instead of %2 for -masm=intel.
13587 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
13588 avx512f_vcvttss2usi<round_saeonly_name>,
13589 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
13591 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
13592 avx512f_vcvttsd2usi<round_saeonly_name>,
13593 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
13594 Use %q1 instead of %1 for -masm=intel.
13595 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
13596 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
13597 of %3 for -masm=intel.
13598 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
13600 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
13602 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
13604 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
13605 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
13607 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
13609 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
13610 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
13611 %g1 and one with %0 and %1.
13612 (avx512er_vmrcp28<mode><round_saeonly_name>,
13613 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
13614 %1 for -masm=intel.
13615 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
13616 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
13617 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
13618 of %0 and %{%4%} for -masm=intel.
13619 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
13620 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
13621 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
13622 order of %0 and %{%5%}%{z%} for -masm=intel.
13624 2018-04-17 Jan Hubicka <jh@suse.cz>
13627 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
13629 2018-04-17 Martin Liska <mliska@suse.cz>
13632 * multiple_target.c (create_dispatcher_calls): Set apostrophes
13633 for target_clone error message. Make default implementation
13634 clone to be a local declaration.
13635 (separate_attrs): Add new argument and check for an empty
13637 (expand_target_clones): Handle it.
13638 (ipa_target_clone): Make redirection just for target_clones
13641 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
13642 Tom de Vries <tom@codesourcery.com>
13644 PR middle-end/84955
13645 * omp-expand.c (expand_oacc_for): Add dummy false branch for
13646 tiled basic blocks without omp continue statements.
13648 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
13651 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
13652 vec_extract expression as having side effects to make sure it gets
13655 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
13658 * config/i386/i386.c (get_builtin_code_for_version): Check
13661 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
13664 * config.gcc: Support "skylake".
13665 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13667 * config/i386/i386.c (m_SKYLAKE): Define.
13668 (processor_target_table): Add "skylake".
13669 (ix86_option_override_internal): Add "skylake".
13670 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
13671 PROCESSOR_CANNONLAKE.
13672 (get_builtin_code_for_version): Fix priority for
13673 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
13674 PROCESSOR_SKYLAKE-AVX512.
13675 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
13676 (processor_type): Add PROCESSOR_SKYLAKE.
13678 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
13679 Jason Merrill <jason@redhat.com>
13682 * convert.c (convert_to_integer_1): Use direct recursion for
13683 enumeral types and types with a precision less than the number
13684 of bits in their mode.
13686 2018-04-16 Julia Koval <julia.koval@intel.com>
13689 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
13690 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
13692 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
13695 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
13696 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
13697 and -mno-direct-move.
13699 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
13702 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
13703 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
13704 Ensure negative shifts result in {0}.
13706 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
13708 PR rtl-optimization/79916
13709 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
13710 regs (if any) to define how to gnerate SD moves when LRA is in
13713 2018-04-13 Jakub Jelinek <jakub@redhat.com>
13715 PR rtl-optimization/85393
13716 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
13717 * except.c (expand_dw2_landing_pad_for_region): Make static.
13718 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
13719 a label and unconditional jump to old_bb, rather than
13720 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
13723 PR rtl-optimization/85376
13724 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
13725 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
13726 instead of a specific value.
13728 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
13729 Bin Cheng <bin.cheng@arm.com>
13731 PR tree-optimization/82965
13732 PR tree-optimization/83991
13733 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
13734 by_profile_only parameter.
13735 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
13736 information if the loop was predicted to iterate too many times.
13737 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
13739 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
13742 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
13745 2018-04-13 Martin Liska <mliska@suse.cz>
13746 Jakub Jelinek <jakub@redhat.com>
13748 PR middle-end/81657
13749 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
13750 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
13751 * builtins.c (expand_builtin_memory_copy_args): Use
13752 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
13753 handle dest_addr == pc_rtx.
13755 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
13758 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
13759 asked to not generate direct moves.
13760 (fix_trunc<mode>si2_stfiwx): Similar.
13761 (fix_trunc<mode>si2_internal): Similar.
13763 2018-04-12 Jakub Jelinek <jakub@redhat.com>
13766 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
13767 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
13768 lookup if dest in some wider mode is known to be const0_rtx and
13769 if so, record permanent equivalence for it to be ZERO_EXTEND of
13770 the narrower mode destination.
13772 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
13774 * lto-streamer-out.c (output_function): Revert 259346.
13775 * omp-expand.c (expand_oacc_for): Likewise.
13777 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
13779 PR rtl-optimization/85354
13780 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
13781 * sel-sched.c (sel_global_init): ... here.
13783 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
13786 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
13787 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
13788 mode for PE-COFF targets.
13789 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
13790 (i386_pe_asm_lto_end): Likewise.
13791 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
13792 (TARGET_ASM_LTO_END): Likewise.
13793 * config/i386/winnt.c (saved_debug_info_level): New static variable.
13794 (i386_pe_asm_lto_start): New function.
13795 (i386_pe_asm_lto_end): Likewise.
13797 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
13798 Richard Biener <rguenther@suse.de>
13800 PR middle-end/84955
13801 * lto-streamer-out.c (output_function): Fix CFG loop state before
13803 * omp-expand.c (expand_oacc_for): Handle calls to internal
13804 functions like regular functions.
13806 2018-04-12 Richard Biener <rguenther@suse.de>
13809 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
13810 for the early LTO debug to properly generate references to it
13811 during DIE emission. Do not re-use that for the skeleton for
13813 (dwarf2out_early_finish): Likewise.
13815 2018-04-12 Jakub Jelinek <jakub@redhat.com>
13818 * config/i386/sse.md
13819 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
13820 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
13821 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
13822 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
13823 and output is a reg, avoid creating invalid lowpart subreg, but
13824 instead split into a 512-bit move. Don't split if not AVX512VL,
13825 input is xmm16+ reg and output is a mem.
13826 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
13827 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
13828 xmm16+ reg and output is a mem.
13830 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
13832 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
13833 also for flag_dwarf2_cfi_asm.
13835 2018-04-12 Jakub Jelinek <jakub@redhat.com>
13837 PR rtl-optimization/85342
13838 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
13839 a bool scalar var inside of the loop instead. Don't try to update
13840 recog_data.operand after failed apply_change_group.
13842 2018-04-12 Tom de Vries <tom@codesourcery.com>
13845 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
13846 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
13847 array with flexible array member as array without given dimension.
13848 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
13849 argument for undefined param to true.
13851 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
13854 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
13855 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
13856 from PowerPC section.
13857 * config/rs6000/sysv4.opt (mcall-): Improve help text.
13858 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
13859 help text that is too long.
13860 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
13861 help text that is too long.
13862 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
13863 help text that is too long.
13865 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
13867 * config/alpha/alpha.md (stack_probe_internal): Rename
13868 from "probe_stack". Update all callers.
13870 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
13872 PR rtl-optimization/84566
13873 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
13874 sched_macro_fuse_insns.
13876 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
13879 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
13880 (compute_block_dependences): ... from here.
13882 2018-04-11 Jakub Jelinek <jakub@redhat.com>
13884 PR tree-optimization/85331
13885 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
13886 from int to HOST_WIDE_INT.
13888 2018-04-11 Martin Jambor <mjambor@suse.cz>
13891 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
13892 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
13893 not the same as the source val.
13894 (cgraph_edge_brings_value_p): New parameter.
13895 (gather_edges_for_value): Pass destination value to
13896 cgraph_edge_brings_value_p.
13897 (perhaps_add_new_callers): Likewise.
13898 (get_info_about_necessary_edges): Likewise and exclude values brought
13899 only by self-recursive edges.
13900 (create_specialized_node): Redirect only clones of self-calling edges.
13901 (+self_recursive_pass_through_p): New function.
13902 (find_more_scalar_values_for_callers_subset): Use it.
13903 (find_aggregate_values_for_callers_subset): Likewise.
13904 (known_aggs_to_agg_replacement_list): Removed.
13905 (decide_whether_version_node): Re-calculate known constants for all
13906 remaining context clones.
13908 2018-04-11 Richard Biener <rguenther@suse.de>
13911 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
13912 from early DWARF output.
13913 (dwarf2out_early_finish): Output line info unconditionally into
13914 early DWARF and add reference to it.
13916 2018-04-11 Jakub Jelinek <jakub@redhat.com>
13919 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
13920 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
13921 other than V2DFmode using iptr mode attribute.
13922 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
13924 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
13926 PR rtl-optimization/84659
13927 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
13929 2018-04-11 Jakub Jelinek <jakub@redhat.com>
13932 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
13934 (output_loc_list): Pass address of a dummy size variable even in the
13935 locview handling loop.
13936 (index_location_lists): Add comment on why skip_loc_list_entry can't
13939 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
13942 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
13945 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
13948 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
13949 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
13950 and -mstring-compare-inline-limit.
13952 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
13955 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
13956 for stack clash protection in a register whenever we need it to be in
13959 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
13961 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
13962 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
13964 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
13967 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
13969 (mlong-double-): Ditto.
13970 * config/rs6000/sysv4.opt (msdata=): Ditto.
13971 (mtls-size=): Ditto.
13973 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
13975 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
13976 erroneous entries for
13977 "vector int vec_ldl (int, long int *)", and
13978 "vector unsigned int vec_ldl (int, unsigned long int *)".
13979 Add comments and entries for
13980 "vector bool char vec_ldl (int, bool char *)",
13981 "vector bool short vec_ldl (int, bool short *)",
13982 "vector bool int vec_ldl (int, bool int *)",
13983 "vector bool long long vec_ldl (int, bool long long *)",
13984 "vector pixel vec_ldl (int, pixel *)",
13985 "vector long long vec_ldl (int, long long *)",
13986 "vector unsigned long long vec_ldl (int, unsigned long long *)".
13987 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
13988 type tree bool_long_long_type_node and correct definition of
13989 bool_V2DI_type_node to make reference to this new type tree.
13990 (rs6000_mangle_type): Replace erroneous reference to
13991 bool_long_type_node with bool_long_long_type_node.
13992 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
13993 comments to emphasize sign distinctions for char and int types and
13994 replace RS6000_BTI_bool_long constant with
13995 RS6000_BTI_bool_long_long constant. Also add comment to restrict
13996 use of RS6000_BTI_pixel.
13997 (bool_long_type_node): Remove this macro definition.
13998 (bool_long_long_type_node): New macro definition
14000 2018-04-10 Jakub Jelinek <jakub@redhat.com>
14002 PR rtl-optimization/85300
14003 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
14004 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
14005 simplify_unary_operation fails.
14007 2018-04-10 Martin Liska <mliska@suse.cz>
14009 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
14010 cgraph_edge and ipa_ref.
14012 2018-04-10 Jakub Jelinek <jakub@redhat.com>
14016 * config/i386/sse.md
14017 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
14018 computation of the VEC_MERGE selector from mask.
14019 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
14020 Fix decoding of the VEC_MERGE selector into mask.
14022 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
14024 PR tree-optimization/85286
14025 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
14027 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
14029 * final.c (final_1): Set insn_last_address as well as
14030 insn_current_address.
14032 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14035 * explow.c (emit_stack_probe): Call validize_mem on memory location
14036 before passing it to gen_probe_stack. Create address operand and
14037 legitimize it for the probe_stack_address case.
14039 2018-04-09 Jan Hubicka <jh@suse.cz>
14042 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
14043 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
14044 * tree.c (free_lang_data_in_type): Fix handling of binfos;
14046 (free_lang_data): Rebuild type inheritance graph.
14048 2018-04-09 Martin Sebor <msebor@redhat.com>
14050 * invoke.texi (-finline-small-functions): Mention other optimization
14052 (-findirect-inlining, -fpartial-inlining): Same.
14053 (-finline-functions-called-once): Same.
14054 (-freorder-blocks-and-partition): Same.
14056 2018-04-09 Jan Hubicka <jh@suse.cz>
14059 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
14060 jumps; choose last target that matches the criteria (i.e.
14061 no partition changes for non-crossing jumps).
14062 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
14063 support for redirecting crossing jumps to non-crossing.
14065 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
14067 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
14068 also for naked functions.
14070 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
14072 * config/arc/arc.md (add_shift): New pattern.
14073 (add_shift2): Likewise.
14074 (sub_shift): Likewise.
14075 (sub_shift_cmp0_noout): Likewise.
14076 (compare_si_ashiftsi): Likewise.
14077 (xbfu_cmp0_noout): New combine pattern.
14078 (xbfu_cmp0"): Likewise.
14079 (movsi_set_cc_insn): Place the predicable variant first.
14080 (commutative_binary_cmp0_noout): Remove clobber.
14081 (commutative_binary_cmp0): New pattern.
14082 (noncommutative_binary_cmp0): Likewise.
14083 (noncommutative_binary_cmp0_noout): Likewise.
14084 (noncommutative_binary_comparison_result_used): Removed.
14085 (rsub_cmp0): New pattern.
14086 (rsub_cmp0_noout): Likewise.
14087 (extzvsi): Changed, keep only meaningful variants.
14088 (SQH, SEZ): New iterators.
14089 (SQH_postfix): New mode attribute.
14090 (SEZ_prefix): New code attribute.
14091 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
14092 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
14093 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
14094 of numerical value.
14095 (noncommutative_operator): Check the availability of barrel
14098 2018-04-09 Richard Biener <rguenther@suse.de>
14100 PR tree-optimization/85284
14101 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
14102 Only use the niter constraining form of simple_iv when the exit
14103 is always executed.
14105 2018-04-09 Tom de Vries <tom@codesourcery.com>
14108 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
14109 (define_expand "*memory_barrier"): New define_expand.
14110 (define_insn "memory_barrier"): New insn.
14112 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14114 PR rtl-optimization/80463
14115 PR rtl-optimization/83972
14116 PR rtl-optimization/83480
14118 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
14119 correct producer for the insn.
14120 (tidy_control_flow): Fixup seqnos in case of debug insns.
14122 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14124 PR rtl-optimization/83913
14126 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
14127 different sched-times when merging exprs.
14129 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14131 PR rtl-optimization/83962
14133 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
14134 tidy_fallthru_edge and tidy_control_flow.
14136 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14138 PR rtl-optimization/83530
14140 * sel-sched.c (force_next_insn): New global variable.
14141 (remove_insn_for_debug): When force_next_insn is true, also leave only
14142 next insn in the ready list.
14143 (sel_sched_region): When the region wasn't scheduled, make another pass
14144 over it with force_next_insn set to 1.
14146 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
14148 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
14150 * config/nds32/constants.md (unspec_volatile_element): Add enum values
14151 for interrupt control.
14152 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
14153 functions for interrupt control.
14154 * config/nds32/nds32-intrinsic.md: Likewise.
14155 * config/nds32/nds32_intrinsic.h: Likewise.
14156 * config/nds32/nds32.h (nds32_builtins): Likewise.
14158 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
14160 * config/nds32/nds32.c (nds32_init_machine_status,
14161 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
14162 strict_aligned_p field.
14163 (nds32_expand_to_rtl_hook): New function.
14164 (TARGET_EXPAND_TO_RTL_HOOK): Define.
14165 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
14167 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14168 Chung-Ju Wu <jasonwucj@gmail.com>
14170 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
14171 * config/nds32/nds32-n7.md: New file.
14172 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
14173 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
14175 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
14176 * config/nds32/nds32.md (pipeline_model): Add n7.
14177 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
14178 * config/nds32/pipelines.md: Include n7 settings.
14180 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14181 Chung-Ju Wu <jasonwucj@gmail.com>
14183 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
14184 * config/nds32/nds32-e8.md: New file.
14185 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
14186 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
14188 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
14189 * config/nds32/nds32.md (pipeline_model): Add e8.
14190 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
14191 * config/nds32/pipelines.md: Include e8 settings.
14193 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14194 Chung-Ju Wu <jasonwucj@gmail.com>
14196 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
14197 * config/nds32/nds32-n8.md: New file.
14198 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
14199 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
14201 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
14202 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
14203 * config/nds32/nds32.md (pipeline_model): Add n8.
14204 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
14205 * config/nds32/pipelines.md: Include n8 settings.
14207 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14208 Chung-Ju Wu <jasonwucj@gmail.com>
14210 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
14211 * config/nds32/nds32-n9-2r1w.md: New file.
14212 * config/nds32/nds32-n9-3r2w.md: New file.
14213 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
14214 nds32_register_ports): New or modify for cpu n9.
14215 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
14217 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
14218 * config/nds32/nds32-utils.c: New file.
14219 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
14220 TARGET_MUL_SLOW): Define.
14221 * config/nds32/nds32.md (pipeline_model): New attribute.
14222 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
14223 New options that support cpu n9.
14224 * config/nds32/pipelines.md: Include n9 settings.
14225 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
14227 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
14229 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
14230 information if necessary.
14231 (output_cond_branch_compare_zero): Likewise.
14232 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
14233 (nds32_target_alignment): Refine for alignment.
14234 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
14235 (FUNCTION_BOUNDARY): Modify.
14236 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
14238 * config/nds32/nds32.opt (malways-align, malign-functions): New.
14240 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
14242 * config/nds32/constants.md (unspec_volatile_element): Add values for
14243 TLB operation and data prefetch.
14244 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
14245 functions for TLB operation and data prefetch.
14246 * config/nds32/nds32-intrinsic.md: Likewise.
14247 * config/nds32/nds32_intrinsic.h: Likewise.
14248 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
14249 (nds32_print_operand): Likewise.
14250 * config/nds32/nds32.h (nds32_builtins): Likewise.
14252 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
14253 Andrew Pinski <pinsika@gcc.gnu.org>
14255 PR middle-end/82976
14256 * match.pd: Use constant_boolean_node of correct type instead of
14257 boolean_true_node or boolean_false_node for simplifying
14258 pointer comparisons to zero.
14260 2018-04-07 Jakub Jelinek <jakub@redhat.com>
14262 PR tree-optimization/80021
14263 * tree.c (verify_type_variant): Make error call in verify_variant_match
14264 translatable and remove final full stop.
14266 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14268 * config/nds32/constants.md (unspec_volatile_element): Add
14269 UNSPEC_VOLATILE_EH_RETURN.
14270 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
14271 nds32_output_stack_pop): Support dwarf exception handling process.
14272 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
14273 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
14274 exception handling process.
14275 (nds32_compute_stack_frame): Likewise.
14276 (nds32_return_addr_rtx): Likewise.
14277 (nds32_initial_elimination_offset): Likewise.
14278 (nds32_expand_prologue): Likewise.
14279 (nds32_expand_epilogue): Likewise.
14280 (nds32_dynamic_chain_address): New function.
14281 * config/nds32/nds32.h (machine_function): Add fields for dwarf
14282 exception handling.
14283 (DYNAMIC_CHAIN_ADDRESS): Define.
14284 (EH_RETURN_DATA_REGNO): Define.
14285 (EH_RETURN_STACKADJ_RTX): Define.
14286 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
14287 patterns for dwarf exception handling.
14289 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14291 * config/nds32/nds32.h: Clean up obsolete macros.
14293 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14295 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
14296 Add enum values for particular instructions.
14297 * config/nds32/nds32-intrinsic.c: Implementation of expanding
14298 particular intrinsic functions.
14299 * config/nds32/nds32-intrinsic.md: Likewise.
14300 * config/nds32/nds32_intrinsic.h: Likewise.
14301 * config/nds32/nds32.h (nds32_builtins): Likewise.
14302 * config/nds32/nds32.md (type): Add pbsad and pbsada.
14303 (btst, ave): New patterns for particular instructions.
14305 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14307 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
14308 Add enum values for atomic load/store and memory sync.
14309 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
14311 * config/nds32/nds32-intrinsic.md: Likewise.
14312 * config/nds32/nds32_intrinsic.h: Likewise.
14313 * config/nds32/nds32.h (nds32_builtins): Likewise.
14315 2018-04-07 Jakub Jelinek <jakub@redhat.com>
14317 PR tree-optimization/85257
14318 * fold-const.c (native_encode_vector): If not all elts could fit
14319 and off is -1, return 0 rather than offset.
14320 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
14321 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
14322 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
14323 adjust buffer in native_interpret_expr call.
14325 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14327 * config/nds32/constants.md (unspec_volatile_element): Add cache
14328 control enum values.
14329 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
14330 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
14331 * config/nds32/nds32.c (nds32_cctl_names): New.
14332 (nds32_print_operand): Handle cache control register names.
14333 * config/nds32/nds32.h (nds32_builtins): New enum values.
14334 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
14336 * config/nds32/nds32.md (type): Add mmu.
14337 * config/nds32/pipelines.md (simple_insn): Add mmu.
14339 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14341 * config/nds32/nds32.md (type): Remove call.
14342 * config/nds32/pipelines.md (simple_insn): Likewise.
14344 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14346 * config/nds32/constants.md (unspec_volatile_element): Add
14347 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
14348 UNSPEC_VOLATILE_FMFCFG.
14349 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
14350 description for fmfcfg and fmfcsr.
14351 (bdesc_1arg): Add fmtcsr.
14352 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
14353 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
14354 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
14355 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
14356 unspec_fmfcfg): New patterns.
14357 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
14358 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
14359 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
14360 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
14361 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
14362 __nds32__fmfcfg): Define.
14364 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14366 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
14367 intrinsic register names.
14368 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
14369 intrinsic register enum values and macros.
14371 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14373 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
14374 for load/store addressing form.
14375 (nds32_print_operand_address): Likewise.
14377 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
14380 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
14381 based on LABEL_REF. Remove useless assertion.
14382 (pic_address_needs_scratch): Fix formatting.
14383 (sparc_legitimize_pic_address): Minor tweaks.
14384 (sparc_delegitimize_address): Adjust assertion accordingly.
14385 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
14386 into symbolic_operand.
14387 (movsi_high_pic_label_ref): Likewise.
14388 (movsi_lo_sum_pic_label_ref): Likewise.
14389 (movdi_pic_label_ref): Likewise.
14390 (movdi_high_pic_label_ref): Likewise.
14391 (movdi_lo_sum_pic_label_ref): Likewise.
14393 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
14395 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
14396 custom LIB_SPEC setup.
14398 2018-04-06 Ruslan Bukin <br@bsdpad.com>
14399 Kito Cheng <kito.cheng@gmail.com>
14401 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
14402 * config/riscv/freebsd.h: New.
14404 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
14406 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
14407 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
14410 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
14411 Kito Cheng <kito.cheng@gmail.com>
14413 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
14414 nds32_output_call, nds32_symbol_binds_local_p): New functions.
14415 * config/nds32/nds32-protos.h (nds32_output_call,
14416 nds32_output_return): Declare.
14417 * config/nds32/nds32.md: Refine all the call and return patterns.
14419 2018-04-06 Jakub Jelinek <jakub@redhat.com>
14422 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
14423 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
14425 PR rtl-optimization/84872
14426 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
14427 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
14428 EDGE_CROSSING edge.
14430 2018-04-06 Tamar Christina <tamar.christina@arm.com>
14432 * expr.c (copy_blkmode_to_reg): Revert 254862.
14433 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
14435 2018-04-06 Richard Biener <rguenther@suse.de>
14437 PR middle-end/85244
14438 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
14439 after seeing a component reference with an adjacent field. Treat
14440 refs to arrays at struct end of external decls similar to
14441 refs to unconstrained commons.
14443 2018-04-06 Jakub Jelinek <jakub@redhat.com>
14446 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
14447 look through SAVE_EXPRs with non-side-effects argument. Adjust
14449 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
14452 2018-04-06 Richard Biener <rguenther@suse.de>
14454 PR middle-end/85180
14455 * alias.c (find_base_term): New wrapper around find_base_term
14456 unwinding CSELIB_VAL_PTR changes.
14457 (find_base_term): Do not restore CSELIB_VAL_PTR during the
14460 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14462 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
14464 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
14465 constant definitions.
14466 ("nop"): lr 0,0 -> nopr r0
14467 ("nop_lr0", "nop_lr1"): New insn definitions.
14469 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
14471 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
14472 NDS32_V3PUSH_AVAILABLE_P macro.
14474 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
14475 Chung-Ju Wu <jasonwucj@gmail.com>
14477 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
14478 (nds32*-*-*): Add float and fpu_config into supported_defaults.
14479 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
14480 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
14481 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
14482 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
14483 * config/nds32/constraints.md: New constraints and checking for hard
14484 float configuration.
14485 * config/nds32/iterators.md: New mode iterator and attribute for hard
14486 float configuration.
14487 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
14489 * config/nds32/nds32-fpu.md: New file.
14490 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
14491 deal with hard float code generation.
14492 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
14494 (abi_type, float_reg_number): New enum type.
14495 * config/nds32/nds32-predicates.c: New predicates for hard float.
14496 * config/nds32/nds32-protos.h: Declare functions for hard float.
14497 * config/nds32/nds32.c: Implementation for hard float configuration.
14498 * config/nds32/nds32.h: Definitions for hard float configuration.
14499 * config/nds32/nds32.md: Include hard float machine description and
14500 modify patterns for hard float configuration.
14501 * config/nds32/nds32.opt: New options for hard float configuration.
14502 * config/nds32/predicates.md: New predicates for hard float
14505 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
14507 * common/config/nds32/nds32-common.c
14508 (nds32_option_optimization_table): Enable -mreleax-hint by default.
14510 2018-04-05 Jakub Jelinek <jakub@redhat.com>
14512 PR middle-end/85195
14513 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
14514 CONSTRUCTOR_ELT (ctor, ...)->value.
14516 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
14519 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
14521 2018-04-05 Tom de Vries <tom@codesourcery.com>
14524 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
14527 2018-04-05 Shiva Chen <shiva0217@gmail.com>
14528 Kito Cheng <kito.cheng@gmail.com>
14530 * config/nds32/constraints.md (U33): Fine-tune checking condition.
14531 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
14532 * config/nds32/nds32.h (nds32_16bit_address_type): Add
14533 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
14535 2018-04-05 Shiva Chen <shiva0217@gmail.com>
14536 Kito Cheng <kito.cheng@gmail.com>
14538 * config/nds32/constraints.md (Ufe): New memory constraint.
14539 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
14540 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
14541 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
14543 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
14544 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
14546 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14548 * config/nds32/nds32.md: Use optimize_size in the condition for
14549 alu-shift instructions.
14551 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14553 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
14555 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14557 * config/nds32/nds32.md (negsi2): Refine pattern.
14559 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
14560 Chung-Ju Wu <jasonwucj@gmail.com>
14562 * config/nds32/iterators.md (shift_rotate): New code iterator.
14563 (shift): New code attribute.
14564 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
14565 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
14566 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
14567 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
14568 bit-wise operations.
14569 (andsi3, *andsi3): Ditto.
14570 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
14571 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
14572 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
14573 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
14574 nds32_ior_operand, nds32_xor_operand): New predicates.
14576 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14578 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
14579 (addsi3, subsi3): ... this.
14581 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14583 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
14585 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14587 * config/nds32/nds32.md: Adjust indention.
14589 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
14591 * config/nds32/nds32.md (feature): New attribute.
14593 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14595 * config/nds32/nds32.md (subtype): New attribute.
14597 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
14600 * config/arm/arm-builtins.c (arm_expand_builtin): Change
14601 expansion to perform a bitwise AND of the argument followed by a
14602 boolean negation of the result.
14604 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
14606 PR rtl-optimization/84878
14607 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
14608 the basic block. Assert the use reference is not artificial and that
14609 it has an associated insn.
14611 2018-04-04 Michael Matz <matz@suse.de>
14613 * builtins.c (compute_objsize): Pass correct operand
14614 to array_at_struct_end_p.
14616 2018-04-04 Richard Biener <rguenther@suse.de>
14619 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
14620 from contexts for DINFO_LEVEL_TERSE and below.
14622 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
14624 * config/nds32/nds32-doubleword.md (move_<mode>): Require
14625 resiter_operand condition.
14626 * config/nds32/nds32.md (*move<mode>): Ditto.
14628 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
14629 Monk Chiang <sh.chiang04@gmail.com>
14631 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
14633 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14635 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
14637 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14638 Kito Cheng <kito.cheng@gmail.com>
14640 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
14641 nds32_cond_code_str, output_cond_branch,
14642 output_cond_branch_compare_zero, nds32_expand_cbranch,
14643 nds32_expand_cstore, nds32_expand_movcc,
14644 nds32_output_cbranchsi4_equality_zero,
14645 nds32_output_cbranchsi4_equality_reg,
14646 nds32_output_cbranchsi4_equality_reg_or_const_int,
14647 nds32_output_cbranchsi4_greater_less_zero: New functions.
14648 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
14649 nds32_expand_cstore, nds32_expand_movcc,
14650 nds32_output_cbranchsi4_equality_zero,
14651 nds32_output_cbranchsi4_equality_reg,
14652 nds32_output_cbranchsi4_equality_reg_or_const_int,
14653 nds32_output_cbranchsi4_greater_less_zero): Declare.
14654 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
14655 nds32_rimm11s_operand): New predicates.
14656 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
14657 * config/nds32/nds32.md: Rewrite all the branch and conditional move
14660 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
14662 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
14663 * config/nds32/nds32.md: Ditto.
14664 * config/nds32/pipelines.md: Ditto.
14666 2018-04-04 Richard Biener <rguenther@suse.de>
14668 PR tree-optimization/85168
14669 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
14670 propagating abnormals.
14672 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14674 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
14676 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14677 Kito Cheng <kito.cheng@gmail.com>
14679 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
14680 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
14681 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
14682 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
14683 * config/nds32/nds32.md (sibcall_internal): New.
14684 (sibcall_register): Remove.
14685 (sibcall_immediate): Remove.
14686 (sibcall_value_internal): New.
14687 (sibcall_value_register): Remove.
14688 (sibcall_value_immediate): Remove.
14689 * config/nds32/predicates.md (nds32_general_register_operand): New.
14690 (nds32_call_address_operand): New.
14692 2018-04-03 Jakub Jelinek <jakub@redhat.com>
14694 PR rtl-optimization/85167
14695 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
14696 bb_defs if *split_p, instead preinitialize it to NULL.
14698 PR tree-optimization/85156
14699 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
14700 evaluating the argument multiple times.
14702 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
14704 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
14706 (_mm_cvtpd_ps): Likewise.
14707 (_mm_cvttpd_epi32): Likewise.
14708 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
14709 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
14710 vector, pixel, and bool following altivec.h include.
14712 2018-04-03 Martin Sebor <msebor@redhat.com>
14714 * doc/extend.texi (Common Function Attributes): Clarify.
14715 (const attribute): Likewise.
14716 (pure attribute): Likewise.
14718 2018-04-03 Jakub Jelinek <jakub@redhat.com>
14721 * config/i386/i386.c (ix86_expand_vector_set): Use
14722 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
14724 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
14726 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
14727 instructions when changing rounding bits to preserve precision bits
14728 in the x87 control word.
14730 2018-04-03 Martin Liska <mliska@suse.cz>
14732 PR tree-optimization/82491
14733 * rtl.h (strip_offset_and_add): Replace += suboffset with
14734 poly_uint64 () + suboffset.
14736 2018-03-29 Martin Liska <mliska@suse.cz>
14737 Martin Jambor <mjambor@suse.cz>
14740 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
14741 param_type is not an integral or pointer type.
14743 2018-04-03 Richard Biener <rguenther@suse.de>
14745 * sese.h (recompute_all_dominators): Remove.
14747 2018-04-02 Martin Sebor <msebor@redhat.com>
14749 * doc/invoke.texi (-Wrestrict): Fix typos.
14751 2018-04-02 Jim Wilson <jimw@sifive.com>
14753 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
14754 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
14755 (<optab>di3, <optab>si3_extend): Likewise.
14756 (<optab>si3_mask, <optab>si3_mask_1): New.
14757 (<optab>di3_mask, <optab>di3_mask_1): New.
14758 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
14759 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
14760 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
14762 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
14764 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
14767 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
14769 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
14770 (nds32_canonicalize_comparison): New function.
14772 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
14773 Kito Cheng <kito.cheng@gmail.com>
14774 Kuan-Lin Chen <kuanlinchentw@gmail.com>
14776 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
14777 * config/nds32/constants.md (unspec_volatile_element): Add
14778 UNSPEC_VOLATILE_RELAX_GROUP.
14779 * config/nds32/nds32-relax-opt.c: New file.
14780 * config/nds32/nds32-predicates.c
14781 (nds32_symbol_load_store_p): New function.
14782 * config/nds32/nds32-protos.h
14783 (nds32_symbol_load_store_p): Declare function.
14784 (make_pass_nds32_relax_opt): Declare new rtl pass function.
14785 * config/nds32/nds32.c
14786 (nds32_register_pass): New function to register pass.
14787 (nds32_register_passes): New function to register passes.
14788 * config/nds32/nds32.md (relax_group): New pattern.
14789 * config/nds32/nds32.opt (mrelax-hint): New option.
14790 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
14792 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
14794 * config/nds32/t-nds32: Modify files dependency.
14796 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
14798 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
14799 (PROFILE_HOOK): Define its implementation.
14801 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
14803 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
14804 type and 32-bit size.
14806 2018-04-01 Jakub Jelinek <jakub@redhat.com>
14808 PR middle-end/85090
14809 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
14810 (V_128_256): New mode iterator.
14811 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
14812 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
14813 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
14815 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
14816 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
14818 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
14821 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
14822 NaN inputs correctly.
14824 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
14827 * config/rs6000/vsx.md (??r): New mode attribute.
14828 (*vsx_mov<mode>_64bit): Use it.
14829 (*vsx_mov<mode>_32bit): Likewise.
14831 2018-03-30 Martin Sebor <msebor@redhat.com>
14833 PR tree-optimization/84818
14834 * builtins.c (check_access): Use warning_n.
14836 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
14839 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
14841 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
14844 2018-03-30 Julia Koval <julia.koval@intel.com>
14847 * x86-tune.def (movx, partial_reg_dependency): Enable for
14850 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
14852 PR inline-asm/84985
14853 * lra-constraints.c (process_alt_operands): Move setting
14854 this_alternative_matches below.
14856 2018-03-29 Martin Liska <mliska@suse.cz>
14859 * doc/invoke.texi: Document how LTO works with debug info.
14860 Describe auto-load support of binutils. Mention 'x86-64'
14861 as valid option value of -march option.
14863 2018-03-29 Jakub Jelinek <jakub@redhat.com>
14865 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
14868 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
14869 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
14870 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
14873 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
14876 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
14877 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
14878 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
14879 for RS6000_BTM_POWERPC64.
14880 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
14881 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
14882 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
14885 (DIVDEU): Likewise.
14887 2018-03-28 Carl Love <cel@us.ibm.com>
14890 2017-09-27 Carl Love <cel@us.ibm.com>
14892 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
14893 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
14894 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
14897 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14899 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
14900 instead of __vector bool.
14901 (_mm_max_pu8): Likewise.
14902 (_mm_min_pi16): Likewise.
14904 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
14907 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
14908 (DIVWEUO): Likewise.
14909 (DIVDEO): Likewise.
14910 (DIVDEUO): Likewise.
14911 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
14912 DIVWEUO and DIVDEUO.
14913 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
14914 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
14915 (div_extend): Likewise.
14916 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
14918 (__builtin_divweuo): Likewise.
14919 (__builtin_divdeo): Likewise.
14920 (__builtin_divdeuo): Likewise.
14922 2018-03-28 Jakub Jelinek <jakub@redhat.com>
14925 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
14926 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
14928 PR tree-optimization/82004
14929 * gimple-match-head.c (optimize_pow_to_exp): New function.
14930 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
14931 Don't fold to exp if optimize_pow_to_exp is false.
14933 2018-03-28 Martin Liska <mliska@suse.cz>
14936 * calls.c (initialize_argument_information): Fix trailing space.
14937 * common.opt: Fix typo and provide better explanation for
14938 -fsanitize-coverage option.
14939 * config/i386/i386.opt: Fix typo.
14941 2018-03-28 Jakub Jelinek <jakub@redhat.com>
14942 Martin Liska <mliska@suse.cz>
14945 * gimplify.c (asan_poison_variable): Don't do the check for
14946 gimplify_omp_ctxp here.
14947 (gimplify_decl_expr): Do it here.
14948 (gimplify_target_expr): Likewise.
14950 2018-03-28 Martin Liska <mliska@suse.cz>
14953 * config/i386/i386.c (ix86_function_arg_advance): Do not call
14954 chkp_type_bounds_count if MPX is not enabled.
14956 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
14958 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
14960 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
14963 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
14964 function to create the function decl for complex long double
14965 multiply and divide for -mabi=ieeelongdouble.
14966 (init_float128_ieee): Call it.
14968 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
14971 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
14972 -fcf-protection=branch -mibt.
14973 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
14975 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
14978 * config/arm/arm.c (arm_valid_symbolic_address): Handle
14979 arm_word_relocations.
14981 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
14984 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
14985 extern array declarations.
14987 2018-03-27 Richard Biener <rguenther@suse.de>
14989 PR middle-end/84067
14990 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
14991 explicit single_use checks.
14993 2018-03-27 Richard Biener <rguenther@suse.de>
14995 PR tree-optimization/85082
14996 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
14999 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
15001 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
15002 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
15003 Turn on fasynchronous-unwind-tables and funwind-tables.
15005 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
15008 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
15009 (*bmi_blsr_<mode>_ccz): Ditto.
15011 2018-03-26 Tom de Vries <tom@codesourcery.com>
15013 PR tree-optimization/85063
15014 * omp-general.c (offloading_function_p): New function. Factor out
15016 * omp-offload.c (pass_omp_target_link::gate): ... here.
15017 * omp-general.h (offloading_function_p): Declare.
15018 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
15019 with attribute omp declare target for offloading functions.
15021 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
15023 PR tree-optimization/84005
15024 * tree-data-ref.h (get_base_for_alignment): Declare.
15025 * tree-data-ref.c (get_base_for_alignment_1): New function.
15026 (get_base_for_alignment): Likewise.
15027 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
15028 get_base_for_alignment to find a suitable base object, instead
15029 of always using drb->base_address.
15031 2018-03-23 Jakub Jelinek <jakub@redhat.com>
15033 PR inline-asm/85022
15034 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
15035 known size by default.
15037 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
15039 PR inline-asm/85030
15040 * lra-constraints.c (process_alt_operands): Don't match BLKmode
15041 and non BLKmode operands.
15043 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15046 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
15047 Clean up attributes.
15049 2018-03-23 Richard Biener <rguenther@suse.de>
15052 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
15053 we are going to emit early debug for LTO.
15055 2018-03-23 Jakub Jelinek <jakub@redhat.com>
15057 PR inline-asm/85034
15058 * function.c (match_asm_constraints_1): Don't optimize if input
15059 doesn't satisfy general_operand predicate for output's mode.
15061 PR inline-asm/85022
15062 * alias.c (write_dependence_p): Don't require for x_canonicalized
15063 non-VOIDmode if x has VOIDmode.
15066 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
15067 just don't try to optimize it rather than assert it never happens.
15069 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
15071 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
15072 macro expansions for definition of ST_INTERNAL_<mode> and
15073 LD_INTERNAL_<mode> builtins.
15074 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
15076 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
15078 (altivec_expand_st_builtin): Likewise.
15079 (altivec_expand_builtin): Remove calls to deleted functions.
15080 (rs6000_address_for_altivec): Delete this function.
15081 * config/rs6000/vector.md: Remove expands for
15082 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
15084 2018-03-22 Sudakshina Das <sudi.das@arm.com>
15087 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
15088 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
15089 re-computing once computed.
15090 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
15091 (arm_init_machine_status): Initialize
15092 machine->static_chain_stack_bytes.
15094 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
15097 * doc/extend.texi: Add four new prototypes for vec_ld.
15098 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
15099 definitions for more logical presentation.
15100 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
15101 entries for V1TI variants of __builtin_altivec_ld builtin.
15102 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
15103 handling of V1TI variant of LVX icode pattern.
15104 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
15105 (rs6000_gimple_fold_builtin): Likewise.
15106 (altivec_init_builtins): Add code to define
15107 __builtin_altivec_lvx_v1ti function.
15109 2018-03-22 Jakub Jelinek <jakub@redhat.com>
15111 PR inline-asm/84941
15112 * function.c (match_asm_constraints_1): Don't do the optimization
15113 if input isn't a REG, SUBREG, MEM or constant.
15115 2018-03-22 Tom de Vries <tom@codesourcery.com>
15117 PR tree-optimization/84956
15118 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
15119 bb_has_abnormal_pred.
15121 2018-03-22 Jakub Jelinek <jakub@redhat.com>
15124 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
15125 DECL_INITIAL (decl) to decl at the end.
15126 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
15127 adjust the comment.
15129 2018-03-21 Joseph Myers <joseph@codesourcery.com>
15131 * doc/extend.texi (__builtin_tgmath): Document when complex
15132 integer types are treated as _Complex _Float64.
15134 2018-03-21 Tom de Vries <tom@codesourcery.com>
15136 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
15138 2018-03-21 Jakub Jelinek <jakub@redhat.com>
15140 PR tree-optimization/84960
15141 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
15142 if it is ENTRY block, move them into single succ of ENTRY in that case.
15144 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
15146 PR tree-optimization/84811
15147 * poly-int.h (poly_span_traits): Remove the T3 parameter and
15148 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
15149 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
15150 (known_subrange_p): Update accordingly. Cast each value involved
15151 in the size comparison, rather than casting the result of the
15154 2018-03-21 Jakub Jelinek <jakub@redhat.com>
15156 PR tree-optimization/84982
15157 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
15158 by flipping the least significant bit rather than all bits from
15159 bitpos to bitpos + bitsize - 1.
15161 2018-03-21 Nathan Sidwell <nathan@acm.org>
15163 * doc/extend.texi (Deprecated Features): Remove mention of
15164 long-deleted deprecations.
15166 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15169 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
15170 * configure: Regenerate.
15172 2018-03-21 Tom de Vries <tom@codesourcery.com>
15174 PR tree-optimization/83126
15175 * tree-parloops.c (num_phis): New function.
15176 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
15178 2018-03-21 Nathan Sidwell <nathan@acm.org>
15180 * doc/extend.texi (Deprecated Features): Update deprecated flags,
15181 mention anon-struct/union members and trailing attributes.
15183 2018-03-21 Bin Cheng <bin.cheng@arm.com>
15185 PR tree-optimization/84969
15186 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
15187 builtin memset partitions if they set different rhs values.
15189 2018-03-21 Jakub Jelinek <jakub@redhat.com>
15191 PR rtl-optimization/84989
15192 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
15193 VEC_DUPLICATE with scalar result mode.
15195 2018-03-21 Martin Liska <mliska@suse.cz>
15198 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
15199 not intended return statement.
15201 2018-03-21 Martin Liska <mliska@suse.cz>
15204 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
15205 (chkp_find_bound_slots_1): Limit number of iterations.
15207 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
15210 * Minor grammar fixes for x86 options.
15212 2018-03-20 Jakub Jelinek <jakub@redhat.com>
15215 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
15216 holding REG_CFA_RESTORE notes, instead turn them into a USE.
15218 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
15221 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
15222 (altivec_lvx_<mode>_1op): Likewise.
15223 (altivec_stvx_<mode>_2op): Likewise.
15224 (altivec_stvx_<mode>_1op): Likewise.
15225 (altivec_lvx_<VM2:mode>): New define_expand.
15226 (altivec_stvx_<VM2:mode>): Likewise.
15227 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
15228 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
15229 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
15230 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
15231 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
15232 (rs6000_gen_lvx): Likewise.
15233 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
15234 (altivec_expand_stv_builtin): Likewise.
15235 (altivec_expand_builtin): Likewise.
15236 * config/rs6000/vector.md: Likewise.
15238 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15241 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
15244 2018-03-20 Richard Biener <rguenther@suse.de>
15247 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
15248 sign-conversions as zero, fall back to standard scalar_stmt
15251 2018-03-20 Martin Liska <mliska@suse.cz>
15254 * predict.c (rebuild_frequencies): Handle case when we have
15255 PROFILE_ABSENT, but flag_guess_branch_prob is false.
15257 2018-03-20 Jakub Jelinek <jakub@redhat.com>
15260 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
15261 flag_section_anchors.
15262 * varasm.c (use_blocks_for_decl_p): Remove hack for
15263 dw2_force_const_mem.
15266 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
15268 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
15269 be created, use lowpart_subreg of operands[0] rather than operands[0]
15271 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
15272 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
15273 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
15274 and n constraint instead of aarch64_shift_imm_di and Usd.
15275 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
15276 (*aarch64_<optab>_reg_minus<mode>3): ... this.
15278 2018-03-20 Sudakshina Das <sudi.das@arm.com>
15281 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
15282 to favor GPR over NEON registers.
15283 (<shift>di3_neon): Likewise.
15285 2018-03-20 Tom de Vries <tom@codesourcery.com>
15288 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
15289 (nvptx_process_pars): Emit bar.sync asap and alap.
15291 2018-03-20 Tom de Vries <tom@codesourcery.com>
15294 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
15295 seen_label if seen_label is already set.
15297 2018-03-20 Jakub Jelinek <jakub@redhat.com>
15300 * config/i386/i386.c (fold_builtin_cpu): For features above 31
15301 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
15302 Use 1U instead of 1. Formatting fixes.
15305 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
15306 instead of TREE_TYPE (s1) for the return value.
15308 2018-03-19 Jakub Jelinek <jakub@redhat.com>
15310 PR tree-optimization/84946
15311 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
15312 bitsize + bitsize in poly_uint64 rather than poly_int64.
15315 * dwarf2asm.c: Include fold-const.c.
15316 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
15317 of decl rather than decl itself.
15319 PR rtl-optimization/84643
15320 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
15322 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
15325 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
15326 calling assemble_variable.
15328 2018-03-19 Sudakshina Das <sudi.das@arm.com>
15331 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
15332 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
15334 2018-03-19 Jim Wilson <jimw@sifive.com>
15337 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
15338 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
15339 (riscv_first_stack_step): Likewise.
15340 (riscv_option_override): Use STACK_BOUNDARY instead of
15341 MIN_STACK_BOUNDARY.
15342 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
15343 MIN_STACK_BOUNDARY.
15344 (BIGGEST_ALIGNMENT): Set to 128.
15345 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
15346 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
15349 2018-03-19 Richard Biener <rguenther@suse.de>
15351 PR tree-optimization/84933
15352 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
15353 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
15355 2018-03-19 Richard Biener <rguenther@suse.de>
15357 PR tree-optimization/84859
15358 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
15359 (cond_if_else_store_replacement): Perform sinking operation on
15360 single-store BBs regardless of MAX_STORES_TO_SINK setting.
15361 Generalize what a BB with a single eligible store is.
15363 2018-03-19 Richard Biener <rguenther@suse.de>
15365 PR tree-optimization/84929
15366 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
15367 chrec_is_positive against non-chrec arg.
15369 2018-03-19 Tamar Christina <tamar.christina@arm.com>
15372 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
15374 2018-03-18 Martin Liska <mliska@suse.cz>
15376 PR rtl-optimization/84635
15377 * regrename.c (build_def_use): Use matches_mode only when
15380 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
15382 PR tree-optimization/84913
15383 * tree-vect-loop.c (vectorizable_reduction): Don't try to
15384 vectorize chains of COND_EXPRs.
15386 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
15388 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
15390 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
15392 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
15394 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
15396 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
15398 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
15399 Kito Cheng <kito.cheng@gmail.com>
15401 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
15402 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
15403 (nds32_adjust_reg_alloc_order): New function.
15404 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
15406 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
15408 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
15409 nds32_print_operand, nds32_print_operand_address): Use
15410 HOST_WIDE_INT_PRINT_DEC instead.
15412 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
15414 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
15416 2018-03-17 Jakub Jelinek <jakub@redhat.com>
15419 * config/i386/i386.c (initial_ix86_tune_features,
15420 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
15421 unsigned long long.
15422 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
15423 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
15424 rather than 1u << ix86_tune. Formatting fix.
15425 (ix86_option_override_internal): Change ix86_arch_mask from
15426 unsigned int to unsigned HOST_WIDE_INT, initialize to
15427 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
15428 (ix86_function_specific_restore): Likewise.
15430 2018-03-16 Jakub Jelinek <jakub@redhat.com>
15433 * postreload.c (reload_combine_recognize_pattern): Perform
15434 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
15435 truncate_int_for_mode the result for the destination's mode.
15438 * hsa-gen.c (mem_type_for_type): Fix comment typo.
15439 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
15441 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
15444 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
15447 * lra-assigns.c (lra_split_hard_reg_for): Don't use
15448 regno_allocno_class_array and sorted_pseudos.
15449 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
15450 insns where regno is used.
15452 2018-03-16 Martin Liska <mliska@suse.cz>
15455 * multiple_target.c (create_dispatcher_calls): Redirect
15456 reference in the symbol table.
15458 2018-03-16 Martin Liska <mliska@suse.cz>
15461 * multiple_target.c (create_dispatcher_calls): Redirect also
15464 2018-03-16 Jakub Jelinek <jakub@redhat.com>
15468 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
15469 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
15470 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
15472 2018-03-16 Julia Koval <julia.koval@intel.com>
15474 * doc/invoke.texi (Skylake Server): Add CLWB.
15475 Cannonlake): Remove CLWB.
15477 2018-03-16 Jakub Jelinek <jakub@redhat.com>
15479 PR tree-optimization/84841
15480 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
15482 (FLOAT_ONE_CONST_TYPE): Define.
15483 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
15484 (sort_by_operand_rank): Put entries with higher constant_type last
15485 rather than first to match comments.
15487 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
15489 * config/nios2/nios2.md (movsi_internal): Fix thinko in
15492 2018-03-15 Jakub Jelinek <jakub@redhat.com>
15495 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
15496 check and use address of target always.
15498 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
15501 * config/i386/i386.c (indirect_thunk_needed): Update comments.
15502 (indirect_thunk_bnd_needed): Likewise.
15503 (indirect_thunks_used): Likewise.
15504 (indirect_thunks_bnd_used): Likewise.
15505 (indirect_return_needed): New.
15506 (indirect_return_bnd_needed): Likewise.
15507 (output_indirect_thunk_function): Add a bool argument for
15509 (output_indirect_thunk_function): Don't generate alias for
15510 function return thunk.
15511 (ix86_code_end): Call output_indirect_thunk_function to generate
15512 function return thunks.
15513 (ix86_output_function_return): Set indirect_return_bnd_needed
15514 and indirect_return_needed instead of indirect_thunk_bnd_needed
15515 and indirect_thunk_needed.
15517 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
15519 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
15520 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
15521 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
15523 2018-03-15 David Malcolm <dmalcolm@redhat.com>
15524 Paul Hua <paul.hua.gm@gmail.com>
15527 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
15529 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
15531 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
15532 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
15533 resp. SFmode cases.
15535 2018-03-15 Tamar Christina <tamar.christina@arm.com>
15538 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
15539 instead of GET_MODE_SIZE when comparing Units.
15541 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
15544 * varasm.c (hash_section): Return an unchangeble hash value
15545 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
15546 Return !aarch64_can_use_per_function_literal_pools_p ().
15548 2018-03-15 Jakub Jelinek <jakub@redhat.com>
15551 * optabs.c (emit_conditional_move): Pass address of cmode's copy
15552 rather than address of cmode as last argument to prepare_cmp_insn.
15554 2018-03-15 Julia Koval <julia.koval@intel.com>
15556 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
15557 F_AVX512VNNI, F_AVX512BITALG): New.
15559 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
15562 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
15563 insn for floating-point loads and stores.
15565 2018-03-14 Carl Love <cel@us.ibm.com>
15567 * config/rs6000/rs6000-c.c: Add macro definitions for
15568 ALTIVEC_BUILTIN_VEC_PERMXOR.
15569 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
15570 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
15571 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
15572 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
15574 * config/doc/extend.texi: Add prototypes for vec_permxor.
15576 2018-03-14 David Malcolm <dmalcolm@redhat.com>
15579 * diagnostic-show-locus.c (class layout_point): Convert m_line
15580 from int to linenum_type.
15581 (line_span::comparator): Use linenum "compare" function when
15582 comparing line numbers.
15583 (test_line_span): New function.
15584 (layout_range::contains_point): Convert param "row" from int to
15586 (layout_range::intersects_line_p): Likewise.
15587 (layout::will_show_line_p): Likewise.
15588 (layout::print_source_line): Likewise.
15589 (layout::should_print_annotation_line_p): Likewise.
15590 (layout::print_annotation_line): Likewise.
15591 (layout::print_leading_fixits): Likewise.
15592 (layout::annotation_line_showed_range_p): Likewise.
15593 (struct line_corrections): Likewise for field m_row.
15594 (line_corrections::line_corrections): Likewise for param "row".
15595 (layout::print_trailing_fixits): Likewise.
15596 (layout::get_state_at_point): Likewise.
15597 (layout::get_x_bound_for_row): Likewise.
15598 (layout::print_line): Likewise.
15599 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
15600 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
15601 * input.c (selftest::test_linenum_comparisons): New function.
15602 (selftest::input_c_tests): Call it.
15603 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
15604 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
15605 * selftest.h (ASSERT_GT): New macro.
15606 (ASSERT_GT_AT): New macro.
15607 (ASSERT_LT): New macro.
15608 (ASSERT_LT_AT): New macro.
15610 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
15612 PR rtl-optimization/84780
15613 * combine.c (distribute_links): Don't make a link based on pc_rtx.
15615 2018-03-14 Martin Liska <mliska@suse.cz>
15617 * tree.c (record_node_allocation_statistics): Use
15618 get_stats_node_kind.
15619 (get_stats_node_kind): New function extracted from
15620 record_node_allocation_statistics.
15621 (free_node): Use get_stats_node_kind.
15623 2018-03-14 Richard Biener <rguenther@suse.de>
15625 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
15626 that the value-set of ANTIC_IN doesn't grow.
15629 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
15631 (BB_VISITED_WITH_VISITED_SUCCS): New define.
15632 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
15634 2018-03-14 Julia Koval <julia.koval@intel.com>
15636 * config.gcc (icelake-client, icelake-server): New.
15638 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
15639 (initial_ix86_arch_features): Ditto.
15640 (PTA_SKYLAKE): Add SGX.
15641 (PTA_ICELAKE): Remove.
15642 (PTA_ICELAKE_CLIENT): New.
15643 (PTA_ICELAKE_SERVER): New.
15644 (ix86_option_override_internal): Split up icelake on icelake client and
15646 (get_builtin_code_for_version): Ditto.
15647 (fold_builtin_cpu): Ditto.
15648 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
15649 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
15650 * config/i386/i386.h (processor_type): Ditto.
15651 * doc/invoke.texi: Ditto.
15653 2018-03-14 Jakub Jelinek <jakub@redhat.com>
15656 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
15657 INTEGER_CST offset, add it together with bitpos / 8 and
15658 sign extend based on POINTER_SIZE.
15662 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
15665 * config/i386/constraints.md (Yc): New register constraint.
15666 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
15667 Use Yc constraint for alternative 2 of operand 0. Remove
15668 preferred_for_speed attribute.
15670 2018-03-14 Richard Biener <rguenther@suse.de>
15672 PR tree-optimization/84830
15673 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
15674 with the old one to avoid oscillations.
15676 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
15679 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
15681 (assign_by_spills): Return a flag of reload assignment failure.
15682 Do not process the reload assignment failures. Do not spill other
15683 reload pseudos if they has the same reg class. Update n if
15685 (lra_assign): Add a return arg. Set up from the result of
15686 assign_by_spills call.
15687 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15688 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
15689 usage_insns if it is not NULL.
15690 (spill_hard_reg_in_range): New function.
15691 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15692 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15693 function prototypes.
15694 (lra_assign): Change prototype.
15695 * lra.c (lra): Add code to deal with fails by splitting hard reg
15698 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
15700 * config/riscv/riscv.opt (mrelax): New option.
15701 * config/riscv/riscv.c (riscv_file_start): Emit ".option
15702 "norelax" when riscv_mrelax is disabled.
15703 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
15705 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15708 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
15709 reassociation for int modes.
15711 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
15713 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
15714 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
15716 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
15717 * config/aarch64/aarch64-sve.md
15718 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
15719 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
15720 (*extend<mode><Vwide>2): Rename to...
15721 (aarch64_sve_extend<mode><Vwide>2): ...this.
15722 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
15723 renaming the old pattern to...
15724 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
15726 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
15727 define_expand, renaming the old pattern to...
15728 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
15729 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
15730 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
15731 account when deciding which SVE instruction the optab should use.
15732 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
15734 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
15736 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
15737 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
15738 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
15739 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
15740 (tlsdesc_small_<mode>): Turn a define_expand and use
15741 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
15742 (tlsdesc_small_advsimd_<mode>): ...this.
15743 (tlsdesc_small_sve_<mode>): New pattern.
15745 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
15747 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
15748 (UNSPEC_UMUL_HIGHPART): New constants.
15749 (MUL_HIGHPART): New int iteraor.
15750 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
15751 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
15753 (*<su>mul<mode>3_highpart): New define_insn.
15755 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
15758 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
15761 2018-03-13 Martin Liska <mliska@suse.cz>
15764 * (sem_item_optimizer::sem_item_optimizer): Initialize new
15766 (sem_item_optimizer::~sem_item_optimizer): Release it.
15767 (sem_item_optimizer::merge_classes): Register variable aliases.
15768 (sem_item_optimizer::fixup_pt_set): New function.
15769 (sem_item_optimizer::fixup_points_to_sets): Likewise.
15770 * ipa-icf.h: Declare new variables and functions.
15772 2018-03-13 Jakub Jelinek <jakub@redhat.com>
15774 PR middle-end/84834
15775 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
15776 integer_pow2p@2 and test integer_pow2p in condition.
15777 (A < 0 ? C : 0): Similarly for @1.
15779 PR middle-end/84831
15780 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
15781 characters starting at p contain '\0' character, don't look beyond
15785 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
15786 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
15789 * reg-stack.c (change_stack): Change update_end var from int to
15790 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
15791 also call set_block_for_insn on the newly added insns and rescan.
15794 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
15795 on the last operand.
15798 * tree.c (stabilize_reference_1): Return save_expr (e) for
15799 STATEMENT_LIST even if it doesn't have side-effects.
15801 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
15803 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
15805 2018-03-12 Renlin Li <renlin.li@arm.com>
15807 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
15808 aarch64_output_scalar_simd_mov_immediate.
15810 2018-03-12 Martin Sebor <msebor@redhat.com>
15812 PR tree-optimization/83456
15813 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
15814 for perfectly overlapping calls to memcpy.
15815 (gimple_fold_builtin_memory_chk): Same.
15816 (gimple_fold_builtin_strcpy): Handle no-warning.
15817 (gimple_fold_builtin_stxcpy_chk): Same.
15818 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
15820 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
15822 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
15823 parameter. Use it for SFmode.
15824 (rs6000_function_arg_advance_1): Adjust.
15825 (rs6000_function_arg): Adjust.
15826 (rs6000_gimplify_va_arg): Pass false for that new parameter.
15828 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
15830 PR rtl-optimization/84169
15831 PR rtl-optimization/84780
15832 * combine.c (can_combine_p): Check for a 2-insn combination whether
15833 the destination register is used between the two insns, too.
15835 2018-03-12 Richard Biener <rguenther@suse.de>
15837 PR tree-optimization/84803
15838 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
15839 for refs DR analysis didn't process.
15841 2018-03-12 Richard Biener <rguenther@suse.de>
15843 PR tree-optimization/84777
15844 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
15845 force-vectorize loops ignore whether we are optimizing for size.
15847 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
15849 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
15850 (TARGET_MD_ASM_ADJUST): Define.
15852 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
15853 Kito Cheng <kito.cheng@gmail.com>
15854 Chung-Ju Wu <jasonwucj@gmail.com>
15856 * config/nds32/nds32.c (nds32_compute_stack_frame,
15857 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
15858 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
15859 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
15860 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
15861 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
15862 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
15863 * config/nds32/nds32.md (prologue, epilogue): Use macro
15864 NDS32_V3PUSH_AVAILABLE_P to do checking.
15866 2018-03-11 Jakub Jelinek <jakub@redhat.com>
15869 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
15870 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
15871 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
15872 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
15873 addition of most attributes on !orig_type_die or the attribute not
15874 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
15876 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
15877 Chung-Ju Wu <jasonwucj@gmail.com>
15879 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
15880 __NDS32_VH__ macro.
15881 * config/nds32/nds32.opt (mvh): New option.
15883 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
15884 Chung-Ju Wu <jasonwucj@gmail.com>
15886 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
15888 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
15889 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
15892 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
15893 Chung-Ju Wu <jasonwucj@gmail.com>
15895 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
15897 * config/nds32/nds32-multiple.md (strlensi): New pattern.
15898 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
15900 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
15901 Kito Cheng <kito.cheng@gmail.com>
15902 Chung-Ju Wu <jasonwucj@gmail.com>
15904 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
15905 UNSPEC_FFMISM and UNSPEC_FLMISM.
15906 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
15907 for ffb, ffmism and flmism.
15908 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
15909 (unspec_ffmism): Ditto.
15910 (unspec_flmism): Ditto.
15911 (nds32_expand_builtin_impl): Check if string extension is available.
15912 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
15913 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
15915 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
15918 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
15921 * lra-assigns.c (assign_by_spills): Return a flag of reload
15922 assignment failure. Do not process the reload assignment
15923 failures. Do not spill other reload pseudos if they has the same
15925 (lra_assign): Add a return arg. Set up from the result of
15926 assign_by_spills call.
15927 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15928 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
15929 usage_insns if it is not NULL.
15930 (spill_hard_reg_in_range): New function.
15931 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15932 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15933 function prototypes.
15934 (lra_assign): Change prototype.
15935 * lra.c (lra): Add code to deal with fails by splitting hard reg
15938 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
15941 * config/i386/i386.opt: Replace Enforcment with Enforcement.
15943 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
15946 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
15947 (dw_val_node): Add val_symbolic_view.
15948 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
15949 (symview_upper_bound): New.
15950 (new_line_info_table): Initialize symviews_since_reset.
15951 (dwarf2out_source_line): Count symviews_since_reset and set
15952 symview_upper_bound.
15953 (dw_val_equal_p): Handle symview.
15954 (add_AT_symview): New.
15955 (print_dw_val): Handle symview.
15956 (attr_checksum, attr_checksum_ordered): Likewise.
15957 (same_dw_val_p, size_of_die): Likewise.
15958 (value_format, output_die): Likewise.
15959 (add_high_low_attributes): Use add_AT_symview for entry_view.
15960 (dwarf2out_finish): Reset symview_upper_bound, clear
15963 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
15966 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
15967 Add strict argument and use it.
15968 (rs6000_split_multireg_move): Update for new strict argument.
15969 (mem_operand_gpr): Disallow all non-offsettable addresses.
15970 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
15972 2018-03-09 Jakub Jelinek <jakub@redhat.com>
15975 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
15976 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
15977 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
15980 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
15981 decl, use remap_type if we want to use the type.
15983 2018-03-09 Martin Sebor <msebor@redhat.com>
15985 PR tree-optimization/84526
15986 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
15988 (builtin_access::generic_overlap): Be prepared to handle non-array
15991 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
15993 PR rtl-optimization/84682
15994 * lra-constraints.c (process_address_1): Check is_address flag
15995 for address constraints.
15996 (process_alt_operands): Likewise.
15997 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
15998 preprocess_constraints.
15999 * recog.h (preprocess_constraints): Add oploc parameter.
16001 * recog.c (preprocess_constraints): Test address_operand for
16002 CT_ADDRESS constraints.
16004 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
16007 * lra-assigns.c (assign_by_spills): Return a flag of reload
16008 assignment failure. Do not process the reload assignment
16009 failures. Do not spill other reload pseudos if they has the same
16011 (lra_assign): Add a return arg. Set up from the result of
16012 assign_by_spills call.
16013 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16014 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16015 usage_insns if it is not NULL.
16016 (spill_hard_reg_in_range): New function.
16017 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16018 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16019 function prototypes.
16020 (lra_assign): Change prototype.
16021 * lra.c (lra): Add code to deal with fails by splitting hard reg
16024 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16027 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
16028 Accept complain bool parameter. Only emit errors if it is true.
16029 (arm_parse_cpu_option_name): Likewise.
16030 (arm_target_thumb_only): Adjust callers of the above.
16031 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
16032 prototype to take a default true bool parameter.
16033 (arm_parse_arch_option_name): Likewise.
16035 2018-03-09 David Malcolm <dmalcolm@redhat.com>
16036 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
16040 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
16041 * configure: Regenerate.
16042 * configure.ac ("linker --version-script option"): New.
16043 ("linker soname option"): New.
16045 2018-03-09 Richard Biener <rguenther@suse.de>
16047 PR tree-optimization/84775
16048 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
16049 immediate uses of predicate stmts and mark them modified.
16052 PR tree-optimization/84178
16053 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
16055 (version_loop_for_if_conversion): Delay update_ssa call.
16056 (tree_if_conversion): Delay update_ssa until after predicate
16059 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
16062 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
16063 when the function accesses prior frames.
16065 2018-03-08 Jakub Jelinek <jakub@redhat.com>
16068 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
16069 gen_llsym, otherwise call maybe_gen_llsym.
16071 PR inline-asm/84742
16072 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
16073 has ',' character inside of it.
16075 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16078 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
16079 as clobbering CC_REGNUM.
16081 2018-03-08 Richard Biener <rguenther@suse.de>
16083 PR middle-end/84552
16084 * tree-scalar-evolution.c: Include tree-into-ssa.h.
16085 (follow_copies_to_constant): Do not follow SSA names registered
16088 2018-03-08 Richard Biener <rguenther@suse.de>
16090 PR tree-optimization/84178
16091 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
16093 (version_loop_for_if_conversion): Delay update_ssa call.
16094 (tree_if_conversion): Delay update_ssa until after predicate
16097 2018-03-08 David Malcolm <dmalcolm@redhat.com>
16099 PR tree-optimization/84178
16100 * tree-if-conv.c (release_bb_predicate): Remove the
16101 the assertion that the stmts have NULL use_ops.
16102 Discard the statements, asserting that they haven't
16103 yet been added to a BB.
16105 2018-03-08 Richard Biener <rguenther@suse.de>
16107 PR tree-optimization/84746
16108 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
16109 (phi_translate): Pass in destination ANTIC_OUT set.
16110 (phi_translate_1): Likewise. For a simplified result lookup
16111 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
16112 (phi_translate_set): Adjust.
16113 (do_pre_regular_insertion): Likewise.
16114 (do_pre_partial_partial_insertion): Likewise.
16116 2018-03-08 Martin Liska <mliska@suse.cz>
16118 PR gcov-profile/84735
16119 * doc/gcov.texi: Document usage of profile files.
16120 * gcov-io.h: Document changes in the format.
16122 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
16126 * dwarf2out.c (struct dw_line_info_table): Update comments for
16128 (FORCE_RESET_NEXT_VIEW): New.
16129 (FORCE_RESETTING_VIEW_P): New.
16130 (RESETTING_VIEW_P): Check for -1 too.
16131 (ZERO_VIEW_P): Likewise.
16132 (new_line_info_table): Force-reset next view.
16133 (dwarf2out_begin_function): Likewise.
16134 (dwarf2out_source_line): Simplify zero_view_p initialization.
16135 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
16136 view directly. Omit view when omitting .loc at line 0.
16138 2018-03-08 Jakub Jelinek <jakub@redhat.com>
16140 PR tree-optimization/84740
16141 * tree-switch-conversion.c (process_switch): Call build_constructors
16142 only if info.phi_count is non-zero.
16144 PR tree-optimization/84739
16145 * tree-tailcall.c (find_tail_calls): Check call arguments against
16146 DECL_ARGUMENTS (current_function_decl) rather than
16147 DECL_ARGUMENTS (func) when checking for tail recursion.
16149 2018-03-07 Jakub Jelinek <jakub@redhat.com>
16151 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
16152 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
16153 Volker Reichelt's entry and add entries for people that perform
16154 GCC fuzzy testing and report numerous bugs.
16156 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
16159 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
16160 readonly data in sdata, if that is disabled.
16161 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
16162 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
16163 -mreadonly-in-sdata option.
16165 2018-03-07 Martin Sebor <msebor@redhat.com>
16167 PR tree-optimization/84468
16168 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
16169 basic block when looking for nul assignment.
16171 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
16174 * except.h (output_function_exception_table): Adjust prototype.
16175 * except.c (output_function_exception_table): Remove FNNAME parameter
16176 and add SECTION parameter. Ouput one part of the table at a time.
16177 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
16178 the first part of the exception table and emit unwind directives.
16179 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
16180 (i386_pe_seh_cold_init): Likewise.
16181 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
16182 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
16183 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
16184 (ix86_output_call_insn): Emit a nop in one more case for SEH.
16185 * config/i386/winnt.c: Include except.h.
16186 (struct seh_frame_state): Add reg_offset, after_prologue and
16187 in_cold_section fields.
16188 (i386_pe_seh_end_prologue): Set seh->after_prologue.
16189 (i386_pe_seh_cold_init): New function.
16190 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
16191 to seh->in_cold_section.
16192 (seh_emit_push): Record the offset of the push.
16193 (seh_emit_save): Record the offet of the save.
16194 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
16195 Test seh->after_prologue to disregard the epilogue.
16196 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
16197 (i386_pe_end_cold_function): New function.
16199 2018-03-07 Jakub Jelinek <jakub@redhat.com>
16202 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
16203 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
16206 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
16208 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
16209 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
16211 PR middle-end/84723
16212 * multiple_target.c: Include tree-inline.h and intl.h.
16213 (expand_target_clones): Diagnose and fail if node->definition and
16214 !tree_versionable_function_p (node->decl).
16216 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
16218 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
16220 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
16221 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
16222 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
16224 2018-03-06 Jakub Jelinek <jakub@redhat.com>
16227 * combine.c (try_combine): Use reg_or_subregno instead of handling
16228 just paradoxical SUBREGs and REGs.
16230 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
16232 * config/arc/arc.c (arc_finalize_pic): Remove function.
16233 (arc_must_save_register): We use single base PIC register, remove
16234 checks to save/restore the PIC register.
16235 (arc_expand_prologue): Likewise.
16236 * config/arc/arc-protos.h (arc_set_default_type_attributes):
16238 (arc_verify_short): Likewise.
16239 (arc_attr_type): Likewise.
16240 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
16241 (walk_stores): Likewise.
16242 (arc_address_cost): Make it static.
16243 (arc_verify_short): Likewise.
16244 (branch_dest): Likewise.
16245 (arc_attr_type): Likewise.
16246 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
16247 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
16248 (arc_final_prescan_insn): Remove inserting the nops due to
16249 hardware hazards. It is done in reorg step.
16250 (insn_length_variant_t): Remove.
16251 (insn_length_parameters_t): Likewise.
16252 (arc_insn_length_parameters): Likewise.
16253 (arc_get_insn_variants): Likewise.
16254 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
16256 2018-03-06 Jakub Jelinek <jakub@redhat.com>
16258 PR inline-asm/84683
16259 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
16262 PR tree-optimization/84687
16263 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
16265 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
16267 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16269 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
16270 Rename to ppc_speculation_barrier.
16271 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
16272 __builtin_ppc_speculation_barrier.
16274 2018-03-05 Jakub Jelinek <jakub@redhat.com>
16277 * combine.c (combine_simplify_rtx): Don't try to simplify if
16278 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
16281 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
16283 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
16284 to 32 bytes when compiling for POWER9.
16286 2018-03-05 Jakub Jelinek <jakub@redhat.com>
16289 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
16290 regparm >= 3 with no arg reg available also for calls with
16291 flag_force_indirect_call. Pass decl to ix86_function_regparm.
16294 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
16296 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
16298 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
16301 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
16303 2018-03-05 Richard Biener <rguenther@suse.de>
16305 PR tree-optimization/84486
16306 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
16307 When inserting a __builtin_assume_aligned call set the LHS
16308 SSA name alignment info accordingly.
16310 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
16312 PR tree-optimization/84114
16313 * config/aarch64/aarch64.c (aarch64_reassociation_width)
16314 Avoid reassociation of FLOAT_MODE addition.
16316 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
16318 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
16319 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
16320 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
16321 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
16322 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
16323 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
16324 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
16326 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
16327 __builtin_ia32_wbinvd): New builtins.
16328 (SPECIAL_ARGS2): New.
16329 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
16330 (SPECIAL_ARGS2): New.
16331 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
16332 (ix86_valid_target_attribute_inner_p): Ditto.
16333 (ix86_init_mmx_sse_builtins): Add special_args2.
16334 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
16335 TARGET_WBNOINVD_P): New.
16336 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
16337 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
16338 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
16339 * config/i386/immintrin.h (_wbinvd): New intrinsic.
16340 * config/i386/pconfigintrin.h: New file.
16341 * config/i386/wbnoinvdintrin.h: Ditto.
16342 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
16344 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
16346 2018-03-05 Richard Biener <rguenther@suse.de>
16348 PR tree-optimization/84670
16349 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16351 (BB_VISITED_WITH_VISITED_SUCCS): New define.
16352 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16353 (compute_antic_aux): Only assert the number of values in ANTIC_IN
16354 doesn't grow if all successors (recursively) were visited at least
16357 2018-03-05 Richard Biener <rguenther@suse.de>
16359 PR tree-optimization/84650
16360 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
16361 if executed in the loop pipeline.
16363 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
16365 * doc/configfiles.texi (Configuration Files): Move info about
16366 conditionalizing $target-protos.h to...
16367 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
16368 differs from $target-protos.h.
16370 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
16371 Chung-Ju Wu <jasonwucj@gmail.com>
16373 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
16374 * config/nds32/nds32-multiple.md (setmemsi): Define.
16375 * config/nds32/nds32-memory-manipulation.c
16376 (nds32_gen_dup_4_byte_to_word_value): New.
16377 (emit_setmem_word_loop): New.
16378 (emit_setmem_byte_loop): New.
16379 (nds32_expand_setmem_loop): New.
16380 (nds32_expand_setmem_loop_v3m): New.
16381 (nds32_expand_setmem_unroll): New.
16382 (nds32_expand_setmem): New.
16384 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
16385 Chung-Ju Wu <jasonwucj@gmail.com>
16387 * config/nds32/nds32-memory-manipulation.c
16388 (nds32_emit_load_store): New.
16389 (nds32_emit_post_inc_load_store): New.
16390 (nds32_emit_mem_move): New.
16391 (nds32_emit_mem_move_block): New.
16392 (nds32_expand_movmemsi_loop_unknown_size): New.
16393 (nds32_expand_movmemsi_loop_known_size): New.
16394 (nds32_expand_movmemsi_loop): New.
16395 (nds32_expand_movmemsi_unroll): New.
16396 (nds32_expand_movmemqi): Rename ...
16397 (nds32_expand_movmemsi): ... to this.
16398 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
16399 (movmemsi): ... to this.
16400 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
16401 (nds32_expand_movmemsi): ... to this.
16403 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
16404 Monk Chiang <sh.chiang04@gmail.com>
16405 Chung-Ju Wu <jasonwucj@gmail.com>
16407 * config/nds32/nds32-protos.h
16408 (nds32_expand_load_multiple): New arguments.
16409 (nds32_expand_store_multiple): Ditto.
16410 (nds32_valid_multiple_load_store): Rename ...
16411 (nds32_valid_multiple_load_store_p): ... to this.
16412 * config/nds32/nds32-memory-manipulation.c
16413 (nds32_expand_load_multiple): Refine implementation.
16414 (nds32_expand_store_multiple): Ditto.
16415 * config/nds32/nds32-multiple.md
16416 (load_multiple): Update nds32_expand_load_multiple interface.
16417 (store_multiple): Update nds32_expand_store_multiple interface.
16418 * config/nds32/nds32-predicates.c
16419 (nds32_valid_multiple_load_store): Rename ...
16420 (nds32_valid_multiple_load_store_p): ... to this and refine
16422 * config/nds32/predicates.md
16423 (nds32_load_multiple_and_update_address_operation): New predicate.
16424 (nds32_store_multiple_and_update_address_operation): New predicate.
16426 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
16427 Chung-Ju Wu <jasonwucj@gmail.com>
16429 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
16430 (combo): New attribute.
16431 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
16433 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
16435 * config/nds32/nds32.opt: Change -mcmodel= default value.
16437 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
16438 Monk Chiang <sh.chiang04@gmail.com>
16439 Chung-Ju Wu <jasonwucj@gmail.com>
16441 * config/nds32/constants.md (unspec_element): New enum.
16442 * config/nds32/constraints.md (Umw): New constraint.
16443 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
16444 * config/nds32/nds32-intrinsic.md: Likewise.
16445 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
16446 (nds32_valid_smw_lwm_base_p): New.
16447 (nds32_output_smw_single_word): New.
16448 (nds32_output_lmw_single_word): New.
16449 (nds32_expand_unaligned_load): New.
16450 (nds32_expand_unaligned_store): New.
16451 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
16452 (nds32_output_smw_single_word): Declare.
16453 (nds32_output_lmw_single_word): Declare.
16454 (nds32_expand_unaligned_load): Declare.
16455 (nds32_expand_unaligned_store): Declare.
16456 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
16457 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
16458 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
16459 NDS32_BUILTIN_UASTORE_DW.
16460 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
16463 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
16464 Kito Cheng <kito.cheng@gmail.com>
16465 Chung-Ju Wu <jasonwucj@gmail.com>
16467 * config/nds32/nds32-intrinsic.c
16468 (nds32_expand_builtin_null_ftype_reg): Delete.
16469 (nds32_expand_builtin_reg_ftype_imm): Ditto.
16470 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
16471 (nds32_read_argument): New.
16472 (nds32_legitimize_target): Ditto.
16473 (nds32_legitimize_argument): Ditto.
16474 (nds32_check_constant_argument): Ditto.
16475 (nds32_expand_unop_builtin): Ditto.
16476 (nds32_expand_unopimm_builtin): Ditto.
16477 (nds32_expand_binop_builtin): Ditto.
16478 (nds32_builtin_decl_impl): Ditto.
16479 (builtin_description): Ditto.
16480 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
16481 (nds32_init_builtins_impl): Ditto.
16482 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
16483 (nds32_builtin_decl): New.
16484 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
16485 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
16487 2018-03-02 Jeff Law <law@redhat.com>
16489 * reorg.c (stop_search_p): Handle DEBUG_INSN.
16490 (redundant_insn, fill_simple_delay_slots): Likewise.
16491 (fill_slots_from_thread): Likewise.
16492 * resource.c (mark_referenced_resources): Likewise.
16493 (mark_set_resources, find_dead_or_set_registers): Likewise.
16495 2018-03-02 Jakub Jelinek <jakub@redhat.com>
16497 * substring-locations.h (format_warning_va): Formatting fix for
16498 ATTRIBUTE_GCC_DIAG.
16499 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
16501 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
16502 * substring-locations.c: Include intl.h.
16503 (format_warning_va): Turned into small wrapper around
16504 format_warning_n_va, renamed to ...
16505 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
16506 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
16508 (format_warning_at_substring_n): New function.
16509 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
16510 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
16511 format_warning_at_substring with just a shorter name instead of
16512 const function pointer.
16513 (fmtwarn_n): New function.
16514 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
16515 appropriate, get rid of all the fmtstr temporaries, move conditionals
16516 with G_() wrapped string literals directly into fmtwarn arguments,
16517 cast dir.len to (int), formatting fixes.
16519 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
16521 * doc/invoke.texi: Remove "Cilk Plus" references.
16523 2018-03-02 Jakub Jelinek <jakub@redhat.com>
16524 Richard Biener <rguenther@suse.de>
16527 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
16528 for error or warning attributes if CALL_FROM_THUNK_P is set.
16531 2018-03-02 Jakub Jelinek <jakub@redhat.com>
16534 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
16535 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
16538 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
16539 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
16541 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
16542 instead of -1U in last predictors element's probability member.
16544 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
16547 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
16548 arguments if they are comparable.
16550 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
16552 PR tree-optimization/84634
16553 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
16554 masks and masked_loop_p with a single loop_masks, making sure it's
16555 null for bb vectorization.
16557 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
16559 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
16560 (vect_analyze_data_ref_access): Use loop->safe_len rather than
16561 loop->force_vectorize to check whether there is no alias.
16563 2018-03-02 Jakub Jelinek <jakub@redhat.com>
16566 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
16568 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
16570 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
16571 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
16572 instead of a loop around prev_real_insn.
16573 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
16576 PR inline-asm/84625
16577 * config/i386/i386.c (ix86_print_operand): Use conditional
16578 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
16581 2018-03-02 Richard Biener <rguenther@suse.de>
16583 PR tree-optimization/84427
16584 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
16585 (bitmap_set_subtract_values): Rewrite to handle multiple
16588 (prune_clobbered_mems): Likewise.
16589 (phi_translate): Take edge instead of pred/phiblock.
16590 (phi_translate_1): Likewise.
16591 (phi_translate_set): Likewise. Insert all translated
16592 exprs for a value into the set, keeping possibly multiple
16593 expressions per value.
16594 (compute_antic_aux): Adjust for phi_translate changes.
16595 When intersecting union the expressions and prune those
16596 not in the final value set, keeping possibly multiple
16597 expressions per value. Do not use value-insertion
16598 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
16599 all expressions. Add verification that the value-sets
16600 only shrink during iteration.
16601 (compute_partial_antic_aux): Adjust for the phi_translate changes.
16602 (do_pre_regular_insertion): Likewise.
16603 (do_pre_partial_partial_insertion): Likewise.
16605 2018-03-02 Richard Biener <rguenther@suse.de>
16608 * config/darwin.c (saved_debug_info_level): New static global.
16609 (darwin_asm_lto_start): Disable debug info generation for LTO out.
16610 (darwin_asm_lto_end): Restore debug info generation settings.
16612 2018-03-01 Martin Liska <mliska@suse.cz>
16615 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
16616 volatile arguments.
16618 2018-03-01 Richard Biener <rguenther@suse.de>
16621 * dwarf2out.c (gen_variable_die): Properly handle late VLA
16622 type annotation with LTO when debug was disabled at compile-time.
16624 2018-03-01 Matthew Fortune <mfortune@gmail.com>
16626 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
16628 (mips_final_postscan_insn): Likewise.
16630 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
16632 PR rtl-optimization/84528
16633 * alias.c (init_alias_target): Add commentary.
16634 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
16635 a unique base value if the frame pointer is not eliminated
16636 to the stack pointer.
16638 2018-03-01 Tom de Vries <tom@codesourcery.com>
16640 PR rtl-optimization/83327
16641 * lra-int.h (hard_regs_spilled_into): Declare.
16642 * lra.c (hard_regs_spilled_into): Define.
16643 (init_reg_info): Init hard_regs_spilled_into.
16644 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
16645 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
16646 (process_bb_lives): Handle hard_regs_spilled_into.
16647 (lra_create_live_ranges_1): Before doing liveness propagation, clear
16648 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
16650 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
16652 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
16653 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
16654 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
16655 * config/rs6000/aix72.h: New file.
16657 2018-02-28 Jakub Jelinek <jakub@redhat.com>
16659 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
16660 instead of warning_at with conditional singular and plural messages
16664 * stor-layout.c (update_alignment_for_field): For
16665 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
16666 && !DECL_PACKED (field), do the alignment update, just use
16667 only desired_align instead of MAX (type_align, desired_align)
16669 (place_field): Don't do known_align < desired_align handling
16670 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
16671 is non-NULL, instead do it after rli->prev_field handling and
16672 only if not within a bitfield word. For DECL_PACKED (field)
16673 use type_align of BITS_PER_UNIT.
16675 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
16677 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
16678 superfluous parentheses and trailing spaces.
16680 2018-02-28 Richard Biener <rguenther@suse.de>
16682 PR tree-optimization/84584
16683 * graphite-scop-detection.c (scop_detection::add_scop): Discard
16684 SCoPs with fake exit edge.
16686 2018-02-28 Martin Liska <mliska@suse.cz>
16689 * timevar.c (timer::print): Fix format to properly print 100%
16692 2018-02-28 Richard Biener <rguenther@suse.de>
16694 PR middle-end/84607
16695 * genmatch.c (capture_info::walk_match): Do not mark
16696 captured expressions without operands as expr_p given
16697 they act more like predicates and should be subject to
16698 "lost tail" side-effect preserving.
16700 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
16702 PR rtl-optimization/81611
16703 * auto-inc-dec.c (attempt_change): Move dead note from
16704 mem_insn if it's the next use of regno
16705 (find_address): Take address use of reg holding
16706 non-incremented value. Add parm to limit search to the named
16708 (merge_in_block): Attempt to use a mem insn that is the next
16709 use of the original regno.
16711 2018-02-27 Martin Sebor <msebor@redhat.com>
16714 * doc/invoke.texi (-Wmissing-attributes): New option.
16715 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
16717 2018-02-27 Martin Sebor <msebor@redhat.com>
16719 PR translation/84207
16720 * diagnostic-core.h (warning_n, error_n, inform_n): Change
16721 n argument to unsigned HOST_WIDE_INT.
16722 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
16723 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
16724 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
16725 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
16727 2018-02-27 Richard Biener <rguenther@suse.de>
16729 PR tree-optimization/84512
16730 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
16731 Do not use the estimate returned from record_stmt_cost for
16732 the scalar iteration cost but sum properly using add_stmt_cost.
16734 2018-02-27 Richard Biener <rguenther@suse.de>
16736 PR tree-optimization/84466
16737 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
16738 Adjust last change to less strictly validate use operands.
16740 2018-02-27 Martin Liska <mliska@suse.cz>
16742 PR gcov-profile/84548
16743 * gcov.c (process_file): Allow partial overlap and consider it
16744 also as group functions.
16745 (output_lines): Properly calculate range of lines for a group.
16747 2018-02-27 Martin Liska <mliska@suse.cz>
16749 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
16750 'ggc' suffixes. Change first column width.
16751 (timer::print): Fix formatting of the column.
16753 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
16755 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
16756 preserve inline entry blocks for the sake of debug inline
16757 entry point markers alone.
16758 (remove_unused_locals): Suggest in comments a better place to
16759 force the preservation of inline entry blocks that are
16760 otherwise unused, but do not preserve them.
16762 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
16764 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
16766 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
16769 * config/i386/constraints.md (Bs): Replace
16770 ix86_indirect_branch_register with
16771 TARGET_INDIRECT_BRANCH_REGISTER.
16773 * config/i386/i386.md (indirect_jump): Likewise.
16774 (tablejump): Likewise.
16775 (*sibcall_memory): Likewise.
16776 (*sibcall_value_memory): Likewise.
16777 Peepholes of indirect call and jump via memory: Likewise.
16778 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
16779 (*sibcall_value_GOT_32): Likewise.
16780 * config/i386/predicates.md (indirect_branch_operand): Likewise.
16781 (GOT_memory_operand): Likewise.
16782 (call_insn_operand): Likewise.
16783 (sibcall_insn_operand): Likewise.
16784 (GOT32_symbol_operand): Likewise.
16785 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
16787 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
16789 PR rtl-optimization/83496
16790 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
16791 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
16792 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
16793 redundant insn, if any.
16794 (relax_delay_slots): Likewise.
16795 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
16797 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
16799 PR tree-optimization/83965
16800 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
16801 that grouped statements are part of a reduction chain. Return
16802 true if the statement is not marked as a reduction itself but
16803 is part of a group.
16804 (vect_recog_dot_prod_pattern): Don't check whether the statement
16805 is part of a group here.
16806 (vect_recog_sad_pattern): Likewise.
16807 (vect_recog_widen_sum_pattern): Likewise.
16809 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
16812 * final.c (rest_of_clean_state): Also look for calls inside sequences.
16814 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
16817 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
16819 (ix86_output_indirect_function_return): New prototype.
16820 (ix86_split_simple_return_pop_internal): Likewise.
16821 * config/i386/i386.c (indirect_return_via_cx): New.
16822 (indirect_return_via_cx_bnd): Likewise.
16823 (indirect_thunk_name): Handle return va CX_REG.
16824 (output_indirect_thunk_function): Create alias for
16825 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
16826 (ix86_output_indirect_jmp): Remove the bool argument.
16827 (ix86_output_indirect_function_return): New function.
16828 (ix86_split_simple_return_pop_internal): Likewise.
16829 * config/i386/i386.md (*indirect_jump): Don't pass false
16830 to ix86_output_indirect_jmp.
16831 (*tablejump_1): Likewise.
16832 (simple_return_pop_internal): Change it to define_insn_and_split.
16833 Call ix86_split_simple_return_pop_internal to split it for
16834 -mfunction-return=.
16835 (simple_return_indirect_internal): Call
16836 ix86_output_indirect_function_return instead of
16837 ix86_output_indirect_jmp.
16839 2018-02-26 Jakub Jelinek <jakub@redhat.com>
16842 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
16843 memset and value initialization afterwards.
16845 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
16847 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
16849 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16852 * common/config/aarch64/aarch64-common.c
16853 (aarch_option_optimization_table[]): Switch
16854 off fomit-frame-pointer
16856 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
16857 Chung-Ju Wu <jasonwucj@gmail.com>
16859 * config/nds32/nds32-multiple.md (load_multiple): Disallow
16861 (store_multiple): Ditto.
16863 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
16865 * config.gcc: Add --with-cpu support for nds32 target.
16866 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
16867 * config/nds32/nds32.opt: Add -mcpu= option.
16869 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
16871 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
16872 isel=yes): Warn for these deprecated options.
16874 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
16876 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
16877 ISA_2_5_MASKS_EMBEDDED.
16879 2018-02-23 Jakub Jelinek <jakub@redhat.com>
16881 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
16882 p->max as pointers rather than using iterative_hash_expr.
16884 2018-02-23 Carl Love <cel@us.ibm.com>
16886 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
16887 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
16889 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
16890 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
16891 P8V_BUILTIN_VEC_VUNSIGNED2.
16893 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
16896 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
16897 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
16899 * lra-constraints.c (curr_insn_transform): Set up
16900 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
16902 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
16903 * lra-eliminations.c (spill_pseudos): Ditto.
16904 (process_insn_for_elimination): Ditto.
16905 * lra-lives.c (reg_early_clobber_p): Use the new macros.
16906 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
16907 LRA_NON_CLOBBERED_ALT.
16909 2018-02-22 Martin Sebor <msebor@redhat.com>
16911 PR tree-optimization/84480
16912 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
16913 to maybe_diag_stxncpy_trunc. Call it.
16914 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
16915 from gimple_fold_builtin_strcpy. Print inlining stack.
16916 (handle_builtin_stxncpy): Print inlining stack.
16917 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
16919 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
16922 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
16923 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
16924 and -fcheck-pointer-bounds are used together.
16925 (indirect_thunk_prefix): New enum.
16926 (indirect_thunk_need_prefix): New function.
16927 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
16928 "_nt" instead of "_bnd" for NOTRACK prefix.
16929 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
16930 (output_indirect_thunk_function): Likewise.
16932 (ix86_code_end): Update output_indirect_thunk_function calls.
16933 (ix86_output_indirect_branch_via_reg): Replace
16934 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
16935 (ix86_output_indirect_branch_via_push): Likewise.
16936 (ix86_output_function_return): Likewise.
16937 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
16938 incompatible with -fcf-protection=branch and
16939 -fcheck-pointer-bounds.
16941 2018-02-22 Steve Ellcey <sellcey@cavium.com>
16944 * config/aarch64/aarch64.c (aarch64_print_address_internal):
16945 Change gcc_assert call to output_operand_lossage.
16947 2018-02-22 Steve Ellcey <sellcey@cavium.com>
16949 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
16951 2018-02-22 DJ Delorie <dj@redhat.com>
16952 Sebastian Perta <sebastian.perta@renesas.com>
16953 Oleg Endo <olegendo@gcc.gnu.org>
16955 * config/rx/rx.c (rx_rtx_costs): New function.
16956 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
16958 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
16960 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
16962 2018-02-22 Martin Liska <mliska@suse.cz>
16965 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
16966 Add "native" as a possible value.
16968 2018-02-22 Martin Liska <mliska@suse.cz>
16971 * config/i386/i386.c (ix86_option_override_internal):
16972 Add "native" as a possible value for -march and -mtune.
16974 2018-02-22 Jakub Jelinek <jakub@redhat.com>
16977 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
16978 to all type variants.
16980 PR tree-optimization/84503
16981 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
16982 width as info->bitpos + info->bitsize - start.
16983 (merged_store_group::merge_overlapping): Simplify width computation.
16984 (check_no_overlap): New function.
16985 (imm_store_chain_info::try_coalesce_bswap): Compute expected
16986 start + width and last_order of the group, fail if check_no_overlap
16988 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
16989 to group if check_no_overlap fails.
16991 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
16993 * config/rs6000/altivec.md: Delete contraint arguments to
16994 define_expand, define_split, and define_peephole2, and in
16995 define_insn_and_split if always unused.
16996 * config/rs6000/darwin.md: Ditto.
16997 * config/rs6000/dfp.md: Ditto.
16998 * config/rs6000/rs6000.md: Ditto.
16999 * config/rs6000/sync.md: Ditto.
17000 * config/rs6000/vector.md: Ditto.
17001 * config/rs6000/vsx.md: Ditto.
17003 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
17005 * config/rs6000/altivec.md: Write output control strings as braced
17006 blocks instead of double-quoted strings.
17007 * config/rs6000/darwin.md: Ditto.
17008 * config/rs6000/rs6000.md: Ditto.
17009 * config/rs6000/vector.md: Ditto.
17010 * config/rs6000/vsx.md: Ditto.
17012 2018-02-21 Jason Merrill <jason@redhat.com>
17014 PR c++/84314 - ICE with templates and fastcall attribute.
17015 * attribs.c (build_type_attribute_qual_variant): Remove assert.
17017 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
17019 * ipa-cp.c (determine_versionability): Fix comment typos.
17021 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
17024 * ipa-cp.c (determine_versionability): Do not version functions caling
17027 2018-02-21 Martin Liska <mliska@suse.cz>
17030 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
17031 Add "native" as a possible value.
17032 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
17033 the macro when native cpu detection is available.
17035 2018-02-21 Martin Liska <mliska@suse.cz>
17038 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
17039 Add "native" as a possible value.
17040 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
17041 when native cpu detection is available.
17043 2018-02-21 Jakub Jelinek <jakub@redhat.com>
17044 Martin Sebor <msebor@redhat.com>
17046 PR tree-optimization/84478
17047 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
17049 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
17050 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
17051 support which is conservatively correct, for 2 only stay conservative
17052 for maxlen. Formatting and comment capitalization fixes. Add STRICT
17053 argument to the 2 argument get_range_strlen, adjust 6 arg
17054 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
17056 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
17057 (gimple_fold_builtin_strlen): Pass true as last argument to
17060 2018-02-20 Martin Sebor <msebor@redhat.com>
17062 PR middle-end/84095
17063 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
17064 (builtin_memref::set_base_and_offset): Same. Handle inner references.
17065 (builtin_memref::builtin_memref): Factor out parts into
17066 set_base_and_offset and call it.
17068 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
17070 PR middle-end/84406
17071 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
17072 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
17073 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
17074 search at the associated MODE_INT.
17076 2018-02-20 Jeff Law <law@redhat.com>
17078 PR middle-end/82123
17079 PR tree-optimization/81592
17080 PR middle-end/79257
17081 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
17082 for range data rather than using global data.
17083 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
17084 range data rather than using global data.
17085 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
17086 pass it to children as needed.
17087 (struct directive::fmtresult): Similarly.
17088 (struct directive::set_width): Similarly.
17089 (struct directive::set_precision): Similarly.
17090 (format_integer, format_directive, parse_directive): Similarly.
17091 (format_none): Accept unnamed vr_values parameter.
17092 (format_percent, format_floating, format_character): Similarly.
17093 (format_string, format_plain): Similarly.
17094 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
17095 the EVRP range analyzer for range data rather than using global data.
17096 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
17097 gimple-ssa-evrp-analyze.h
17098 (class sprintf_dom_walker): Add after_dom_children member function.
17099 Add evrp_range_analyzer member.
17100 (sprintf_dom_walker::before_dom_children): Call into the EVRP
17101 range analyzer as needed.
17102 (sprintf_dom_walker::after_dom_children): New member function.
17103 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
17105 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
17106 (evrp_range_analyzer::pop_to_marker): Likewise.
17108 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
17110 PR tree-optimization/84419
17111 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
17112 with the required type if its current type is compatible but
17115 2018-02-20 Jakub Jelinek <jakub@redhat.com>
17117 PR middle-end/82004
17118 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
17119 after vectorization.
17121 2018-02-20 Martin Liska <mliska@suse.cz>
17124 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
17125 possible values if we don't have a hint.
17127 2018-02-20 Martin Liska <mliska@suse.cz>
17131 * final.c (shorten_branches): Build align_tab array with one
17133 * opts.c (finish_options): Add alignment option limit check.
17134 (MAX_CODE_ALIGN): Likewise.
17135 (MAX_CODE_ALIGN_VALUE): Likewise.
17136 * doc/invoke.texi: Document maximum allowed option value for
17137 all -falign-* options.
17139 2018-02-19 Jakub Jelinek <jakub@redhat.com>
17142 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
17143 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
17144 * var-tracking.c (emit_note_insn_var_location): Remove all references
17145 to NOTE_INSN_CALL_ARG_LOCATION.
17146 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
17147 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
17148 Use copy_rtx_if_shared.
17149 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
17150 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
17151 (dwarf2out_var_location): Remove handling of
17152 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
17154 * final.c (final_scan_insn): Remove all references to
17155 NOTE_INSN_CALL_ARG_LOCATION.
17156 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
17157 before dumping final insns.
17158 * except.c (emit_note_eh_region_end): Remove all references to
17159 NOTE_INSN_CALL_ARG_LOCATION.
17160 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
17161 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
17162 * config/arc/arc.c (hwloop_optimize): Likewise.
17163 * config/arm/arm.c (create_fix_barrier): Likewise.
17164 * config/s390/s390.c (s390_chunkify_start): Likewise.
17165 * config/sh/sh.c (find_barrier): Likewise.
17166 * config/i386/i386.c (rest_of_insert_endbranch,
17167 ix86_seh_fixup_eh_fallthru): Likewise.
17168 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
17169 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
17170 * config/frv/frv.c (frv_function_prologue): Likewise.
17171 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
17173 (note_outside_basic_block_p): Remove all references to
17174 NOTE_INSN_CALL_ARG_LOCATION.
17175 * gengtype.c (adjust_field_rtx_def): Likewise.
17176 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
17178 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
17179 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
17182 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
17185 PR tree-optimization/84452
17186 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
17187 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
17190 2018-02-19 Martin Liska <mliska@suse.cz>
17193 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
17195 2018-02-19 Martin Liska <mliska@suse.cz>
17196 Richard Sandiford <richard.sandiford@linaro.org>
17198 PR tree-optimization/82491
17199 * gimple-fold.c (get_base_constructor): Make earlier bail out
17202 2018-02-19 Carl Love <cel@us.ibm.com>
17204 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
17205 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
17207 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
17208 P8V_BUILTIN_VEC_NEG.
17210 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
17212 * config/rl78/rl78.md (movdf): New define expand.
17214 2018-02-19 Martin Liska <mliska@suse.cz>
17217 * doc/invoke.texi: Fix typo.
17218 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
17220 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
17222 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
17223 handle rs6000_single_float and rs6000_double_float specially for
17226 2018-02-16 Jeff Law <law@redhat.com>
17228 * config/rx/rx.c (add_pop_cfi_notes): New function.;
17229 (pop_regs): Use it.
17231 2018-02-16 Jakub Jelinek <jakub@redhat.com>
17234 * ipa-inline.c (inline_small_functions): Fix a typo.
17236 2018-02-16 Nathan Sidwell <nathan@acm.org>
17238 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
17240 2018-02-16 Carl Love <cel@us.ibm.com>
17242 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
17243 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
17244 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
17245 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
17246 expansion to P8V_BUILTIN_VEC_FLOAT2.
17248 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
17250 PR rtl-optimization/70023
17251 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
17252 src_regno into account.
17254 2018-02-16 Carl Love <cel@us.ibm.com>
17256 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
17257 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
17258 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
17259 * config/rs6000/rs6000.c: Remove case statements for
17260 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
17261 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
17262 and P9V_BUILTIN_VEC_VINSERT4B.
17263 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
17264 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
17265 * config/rs6000/vsx.md:
17266 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
17269 2018-02-16 Carl Love <cel@us.ibm.com>
17271 * config/rs6000/altivec.h: Add builtin names vec_extract4b
17273 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
17275 * config/rs6000/rs6000-c.c: Add the definitions for
17276 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
17277 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
17278 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
17279 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
17280 definition for insert4b and define insn *insert3b_internal.
17281 * doc/extend.texi: Add documentation for vec_extract4b.
17283 2018-02-16 Nathan Sidwell <nathan@acm.org>
17285 * doc/extend.texi (Backwards Compatibility): Mention friend
17286 injection. Note for-scope is deprecated.
17287 * doc/invoke.texi (-ffriend-injection): Deprecate.
17289 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
17291 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
17292 that moved to I2, also allow destinations that are a paradoxical
17293 subreg (instead of a normal reg).
17295 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
17298 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
17301 2018-02-16 Richard Biener <rguenther@suse.de>
17303 PR tree-optimization/84037
17304 PR tree-optimization/84016
17306 * config/i386/i386.c (ix86_builtin_vectorization_cost):
17307 Adjust vec_construct for the fact we need additional higher latency
17308 128bit inserts for AVX256 and AVX512 vector builds.
17309 (ix86_add_stmt_cost): Scale vector construction cost for
17312 2018-02-16 Richard Biener <rguenther@suse.de>
17314 PR tree-optimization/84417
17315 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
17316 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
17317 (non_rewritable_lvalue_p): Likewise, use poly-ints.
17319 2018-02-16 Martin Liska <mliska@suse.cz>
17322 * internal-fn.def (ASAN_CHECK): Set proper flags.
17323 (ASAN_MARK): Likewise.
17325 2018-02-16 Julia Koval <julia.koval@intel.com>
17327 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
17328 from PTA_CANNONLAKE.
17330 2018-02-16 Jakub Jelinek <jakub@redhat.com>
17333 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
17334 Use ++iter rather than iter++ for std::list iterators.
17335 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
17336 defer deleting them until all nodes in the forest are processed. Do
17337 free even leaf nodes. Change to_process into auto_vec.
17340 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
17341 * vec.h (vec_default_construct): Use memset instead of placement new
17342 if BROKEN_VALUE_INITIALIZATION is defined.
17343 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
17344 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
17347 PR rtl-optimization/83723
17348 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
17349 * lra.c (lra_substitute_pseudo): Likewise. If true, use
17350 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
17352 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
17354 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
17356 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
17358 PR rtl-optimization/81443
17359 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
17360 from inner REGs to paradoxical SUBREGs.
17362 2018-02-16 Richard Biener <rguenther@suse.de>
17364 PR tree-optimization/84399
17365 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17366 For operands we can analyze at their definition make sure we can
17367 analyze them at each use as well.
17369 2018-02-16 Richard Biener <rguenther@suse.de>
17371 PR tree-optimization/84190
17372 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
17373 volatile accesses if the decl isn't volatile.
17375 2018-02-15 Jason Merrill <jason@redhat.com>
17377 PR c++/84314 - ICE with templates and fastcall attribute.
17378 * attribs.c (build_type_attribute_qual_variant): Don't clobber
17379 TYPE_CANONICAL on an existing type.
17381 2018-02-15 Jakub Jelinek <jakub@redhat.com>
17383 PR tree-optimization/84383
17384 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
17385 dstoff nor call operand_equal_p if dstbase is NULL.
17387 PR tree-optimization/84334
17388 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
17389 also a CONSTANT_CLASS_P, punt.
17391 2018-02-14 Jim Wilson <jimw@sifive.com>
17393 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
17394 first SMALL_OPERAND check. New local min_second_step. Move assert
17395 to where locals are set. Add TARGET_RVC support.
17396 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
17398 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
17400 * doc/invoke.texi: Correct -Wformat-overflow code sample.
17402 2018-02-14 Martin Sebor <msebor@redhat.com>
17404 PR tree-optimization/83698
17405 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
17406 arrays constrain the offset range to their bounds.
17407 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
17408 (builtin_access::overlap): Avoid setting the size of overlap if it's
17410 (maybe_diag_overlap): Also consider arrays when deciding what values
17411 of offsets to include in diagnostics.
17413 2018-02-14 Martin Sebor <msebor@redhat.com>
17416 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
17417 that correspond to the kind of a declaration.
17419 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
17422 * config/pa/pa.md: Load address of PIC label using the linkage table
17423 if the label is nonlocal.
17425 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
17427 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
17428 warning message if user requests -maltivec=be.
17429 * doc/invoke.texi: Document deprecation of -maltivec=be.
17431 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
17434 * config/rs6000/rs6000-c.c: Update definitions for
17435 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
17436 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
17438 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
17441 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
17442 add _get_ssp intrinsics. Remove argument from
17443 __builtin_ia32_rdssp[d|q].
17444 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
17445 * config/i386/i386-builtin.def: Remove argument from
17446 __builtin_ia32_rdssp[d|q].
17447 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
17448 ix86_expand_special_args_builtin for _rdssp[d|q].
17449 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
17450 Clear register before usage.
17451 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
17452 Add documentation for new _get_ssp and _inc_ssp intrinsics.
17454 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
17456 PR tree-optimization/84357
17457 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
17458 operand 1 of an ARRAY_REF too.
17460 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
17463 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
17464 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
17466 (set_of_reg): New struct.
17467 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
17468 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
17469 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
17471 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
17472 Split into bitclr, bitset, bitinvert patterns if appropriate.
17473 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
17474 use rx_fuse_in_memory_bitop.
17475 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
17476 to named insn, correct maximum insn length.
17478 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
17481 * machmode.def: Define a complex mode for PARTIAL_INT.
17482 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
17484 * doc/rtl.texi: Document CSPImode.
17485 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
17487 (msp430_hard_regno_nregs_with_padding): Likewise.
17489 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
17492 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
17494 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
17496 PR rtl-optimization/84169
17497 * combine.c (try_combine): New variable split_i2i3. Set it to true if
17498 we generated a parallel as new i3 and we split that to new i2 and i3
17499 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
17500 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
17501 those to i2, not i1. Partially rewrite this scan code.
17503 2018-02-13 Jakub Jelinek <jakub@redhat.com>
17506 * stor-layout.c (place_field): For variable length fields, adjust
17507 offset_align afterwards not just based on the field's alignment,
17508 but also on the size.
17510 PR middle-end/84309
17511 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
17512 of exps and logs in the use_exp2 case.
17514 2018-02-13 Jeff Law <law@redhat.com>
17516 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
17517 entry for "vector".
17519 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
17522 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
17526 * common.opt (gas-loc-support, gas-locview-support): New.
17527 (ginline-points, ginternal-reset-location-views): New.
17528 * doc/invoke.texi: Document them. Use @itemx where intended.
17529 (gvariable-location-views): Adjust.
17530 * target.def (reset_location_view): New.
17531 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
17532 (TARGET_RESET_LOCATION_VIEW): New.
17533 * doc/tm.texi: Rebuilt.
17534 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
17535 (dwarf2out_default_as_locview_support): New.
17536 (output_asm_line_debug_info): Use option variables.
17537 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
17538 (output_loc_list): Likewise.
17539 (add_high_low_attributes): Check option variables.
17540 Don't output entry view attribute in strict mode.
17541 (gen_inlined_subroutine_die): Check option variables.
17542 (dwarf2out_inline_entry): Likewise.
17543 (init_sections_and_labels): Likewise.
17544 (dwarf2out_early_finish): Likewise.
17545 (maybe_reset_location_view): New, from...
17546 (dwarf2out_var_location): ... here. Call it.
17547 * debug.h (dwarf2out_default_as_loc_support): Declare.
17548 (dwarf2out_default_as_locview_support): Declare.
17549 * hooks.c (hook_int_rtx_insn_0): New.
17550 * hooks.h (hook_int_rtx_insn_0): Declare.
17551 * toplev.c (process_options): Take -gas-loc-support and
17552 -gas-locview-support from dwarf2out. Enable
17553 -gvariable-location-views by default only with locview
17554 assembler support. Enable -ginternal-reset-location-views by
17555 default only if the target defines the corresponding hook.
17556 Enable -ginline-points by default if location views are
17557 enabled; force it disabled if statement frontiers are
17559 * tree-inline.c (expand_call_inline): Check option variables.
17560 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
17562 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
17564 PR tree-optimization/84321
17565 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
17566 handling. Also check whether the anti-range contains any values
17567 that satisfy the mask; switch to a VR_RANGE if not.
17569 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
17572 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
17574 2018-02-13 Martin Jambor <mjambor@suse.cz>
17577 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
17578 of call statements, also set location of a load to a temporary.
17580 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
17582 * config/rl78/rl78.c (add_vector_labels): New function.
17583 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
17584 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
17585 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
17586 which checks that no arguments are passed.
17587 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
17588 * doc/extend.texi: Documentation for the new attribute.
17590 2018-02-13 Andreas Schwab <schwab@suse.de>
17592 * config/riscv/linux.h (CPP_SPEC): Define.
17594 2018-02-13 Jakub Jelinek <jakub@redhat.com>
17597 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
17598 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
17599 OPTION_MASK_ISA_AES as first argument to def_builtin_const
17600 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
17601 instead of OPTION_MASK_ISA_PCLMUL as first argument to
17602 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
17603 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
17604 temporarily for AES and PCLMUL builtins.
17606 PR tree-optimization/84339
17607 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
17608 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
17611 PR middle-end/84309
17612 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
17613 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
17614 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
17616 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
17618 * omp-simd-clone.h: New file.
17619 * omp-simd-clone.c: Include omp-simd-clone.h.
17620 (expand_simd_clones): No longer static.
17621 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
17622 cgraph.h and omp-simd-clone.h.
17623 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
17624 (vect_recog_widen_shift_pattern): Formatting fix.
17625 (vect_pattern_recog_1): Don't check optab for calls.
17628 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
17629 operands[2] into a REG before using gen_lowpart on it.
17631 2018-02-12 Jeff Law <law@redhat.com>
17634 * config/sh/sh.c (find_barrier): Consider a sibling call
17637 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
17638 successfully back substituting a reg.
17640 2018-02-12 Richard Biener <rguenther@suse.de>
17642 PR tree-optimization/84037
17643 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
17644 parameter, move visited init to caller.
17645 (vect_slp_analyze_operations): Separate cost from validity
17646 check, initialize visited once for all instances.
17647 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
17649 * tree-vect-stmts.c (vect_model_simple_cost): Make early
17651 (vect_model_promotion_demotion_cost): Likewise.
17652 (vectorizable_bswap): Guard cost modeling with !slp_node
17653 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
17655 (vectorizable_call): Likewise.
17656 (vectorizable_conversion): Likewise.
17657 (vectorizable_assignment): Likewise.
17658 (vectorizable_shift): Likewise.
17659 (vectorizable_operation): Likewise.
17660 (vectorizable_store): Likewise.
17661 (vectorizable_load): Likewise.
17662 (vectorizable_condition): Likewise.
17663 (vectorizable_comparison): Likewise.
17665 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
17668 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
17669 (ASAN_MARK): Fix fnspec to account for return value, change pointer
17670 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
17672 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
17674 PR middle-end/83665
17675 * params.def (inline-min-speedup): Increase from 8 to 15.
17676 (max-inline-insns-auto): Decrease from 40 to 30.
17677 * ipa-split.c (consider_split): Add some buffer for function to
17678 be considered inlining candidate.
17679 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
17682 2018-02-12 Richard Biener <rguenther@suse.de>
17684 PR tree-optimization/84037
17685 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
17686 matched stmts if we cannot swap the non-matched ones.
17688 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
17690 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
17691 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
17692 _mm_maskz_scalef_round_ss): New intrinsics.
17693 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
17694 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
17695 __builtin_ia32_scalefss_round): Remove.
17696 (__builtin_ia32_scalefsd_mask_round,
17697 __builtin_ia32_scalefss_mask_round): New intrinsics.
17698 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
17699 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
17700 ((match_operand:VF_128 2 "<round_nimm_predicate>"
17701 "<round_constraint>")): Changed to ...
17702 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
17703 "<round_scalar_constraint>")): ... this.
17704 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
17705 %0, %1, %2<round_op3>}"): Changed to ...
17706 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
17707 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
17708 %2<round_scalar_mask_op3>}"): ... this.
17709 * config/i386/subst.md (round_scalar_nimm_predicate): New.
17711 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
17713 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
17714 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
17715 (_mm_maskz_sqrt_round_ss): New intrinsics.
17716 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
17717 (__builtin_ia32_sqrtsd_mask_round)
17718 (__builtin_ia32_sqrtss_mask_round): New builtins.
17719 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
17720 (__builtin_ia32_sqrtss_round): Remove.
17721 (__builtin_ia32_sqrtsd_mask_round)
17722 (__builtin_ia32_sqrtss_mask_round): New builtins.
17723 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
17724 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
17725 ((match_operand:VF_128 1 "vector_operand"
17726 "xBm,<round_constraint>")): Changed to ...
17727 ((match_operand:VF_128 1 "vector_operand"
17728 "xBm,<round_scalar_constraint>")): ... this.
17729 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
17730 %0, %2, %<iptr>1<round_op3>}): Changed to ...
17731 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
17732 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
17733 %<iptr>1<round_scalar_mask_op3>}): ... this.
17734 ((set_attr "prefix" "<round_prefix>")): Changed to ...
17735 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
17737 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
17740 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
17741 Cast vec_cmpeq result to correct type.
17742 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
17743 Cast vec_cmpgt result to correct type.
17745 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
17747 * final.c (final_scan_insn_1): Renamed from...
17748 (final_scan_insn): ... this. New wrapper, to recover
17749 seen from the outermost call in recursive ones.
17750 * config/sparc/sparc.c (output_return): Drop seen from call.
17751 (output_sibcall): Likewise.
17752 * config/visium/visium.c (output_branch): Likewise.
17754 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
17756 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
17759 2018-02-10 Alan Modra <amodra@gmail.com>
17762 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
17763 Specify LR as an input.
17765 2018-02-10 Jakub Jelinek <jakub@redhat.com>
17768 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
17769 remove_member_access_dummy_vars): New functions.
17770 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
17771 lower_omp_1, execute_lower_omp): Use them.
17773 PR rtl-optimization/84308
17774 * shrink-wrap.c (spread_components): Release todo vector.
17776 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
17778 PR rtl-optimization/57193
17779 * ira-color.c (struct allocno_color_data): Add member
17780 conflict_allocno_hard_prefs.
17781 (update_conflict_allocno_hard_prefs): New.
17782 (bucket_allocno_compare_func): Add a preference based on
17783 conflict_allocno_hard_prefs.
17784 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
17785 (color_allocnos): Remove a dead code. Initiate
17786 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
17788 2018-02-09 Jakub Jelinek <jakub@redhat.com>
17791 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
17792 constraint from =wa to wa. Avoid a subreg on the output operand,
17793 instead use a pseudo and subreg it in a move.
17794 (p9_xxbrd_<mode>): Changed to ...
17795 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
17796 (p9_xxbrd_v2df): New expander.
17797 (p9_xxbrw_<mode>): Changed to ...
17798 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
17799 (p9_xxbrw_v4sf): New expander.
17801 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
17803 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
17805 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
17808 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
17809 multiply in 32-bit mode.
17810 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
17811 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
17814 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
17816 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
17817 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
17818 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
17819 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
17821 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
17824 * dwarf2out.c (is_trivial_indirect_ref): New function.
17825 (dwarf2out_late_global_decl): Do not generate a location
17826 attribute for variables that have a non-trivial DECL_VALUE_EXPR
17827 and that are not defined in the current unit.
17829 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
17831 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
17832 instead of a libcall for UNORDERED.
17834 2018-02-09 Tamar Christina <tamar.christina@arm.com>
17837 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
17838 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
17840 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17843 * config/s390/s390.c (s390_set_current_function): Invoke
17844 s390_indirect_branch_settings also if fndecl didn't change.
17846 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
17848 * config/rs6000/rs6000.md (blockage): Set length to zero.
17850 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
17852 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
17854 2018-02-09 Jakub Jelinek <jakub@redhat.com>
17857 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
17858 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
17862 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
17863 PARALLEL incoming that failed vt_get_decl_and_offset check.
17865 PR middle-end/84237
17866 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
17867 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
17869 (get_variable_section): For decls in named .bss* sections pass true as
17870 second argument to bss_initializer_p.
17872 2018-02-09 Marek Polacek <polacek@redhat.com>
17873 Jakub Jelinek <jakub@redhat.com>
17876 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
17877 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
17878 Sync some changes from cxx_fold_indirect_ref.
17880 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
17882 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
17884 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
17885 (BLOCK_INLINE_ENTRY_LABEL): New.
17886 (dwarf2out_var_location): Disregard inline entry markers.
17887 (inline_entry_data): New struct.
17888 (inline_entry_data_hasher): New hashtable type.
17889 (inline_entry_data_hasher::hash): New.
17890 (inline_entry_data_hasher::equal): New.
17891 (inline_entry_data_table): New variable.
17892 (add_high_low_attributes): Add DW_AT_entry_pc and
17893 DW_AT_GNU_entry_view attributes if a pending entry is found
17894 in inline_entry_data_table. Add old entry_pc attribute only
17895 if debug nonbinding markers are disabled.
17896 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
17897 markers are enabled.
17898 (block_within_block_p, dwarf2out_inline_entry): New.
17899 (dwarf2out_finish): Check that no entries remained in
17900 inline_entry_data_table.
17901 * final.c (reemit_insn_block_notes): Handle inline entry notes.
17902 (final_scan_insn, notice_source_line): Likewise.
17903 (rest_of_clean_state): Skip inline entry markers.
17904 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
17906 * gimple.c (gimple_build_debug_inline_entry): New.
17907 * gimple.h (enum gimple_debug_subcode): Add
17908 GIMPLE_DEBUG_INLINE_ENTRY.
17909 (gimple_build_debug_inline_entry): Declare.
17910 (gimple_debug_inline_entry_p): New.
17911 (gimple_debug_nonbind_marker_p): Adjust.
17912 * insn-notes.def (INLINE_ENTRY): New.
17913 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
17914 inline entry marker notes.
17915 (print_insn): Likewise.
17916 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
17917 (INSN_DEBUG_MARKER_KIND): Likewise.
17918 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
17919 * tree-inline.c (expand_call_inline): Build and insert
17920 debug_inline_entry stmt.
17921 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
17922 inline entry blocks early, if nonbind markers are enabled.
17923 (dump_scope_block): Dump fragment info.
17924 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
17925 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
17926 (gimple_build_debug_inline_entry): New.
17927 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
17928 Enable/disable inline entry points too.
17929 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
17930 (DEBUG_INSN): Describe inline entry markers.
17932 * common.opt (gvariable-location-views): New.
17933 (gvariable-location-views=incompat5): New.
17934 * config.in: Rebuilt.
17935 * configure: Rebuilt.
17936 * configure.ac: Test assembler for view support.
17937 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
17938 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
17939 * dwarf2out.c (var_loc_view): New typedef.
17940 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
17941 (dwarf2out_locviews_in_attribute): New.
17942 (dwarf2out_locviews_in_loclist): New.
17943 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
17944 (enum dw_line_info_opcode): Add LI_adv_address.
17945 (struct dw_line_info_table): Add view.
17946 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
17947 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
17948 (zero_view_p): New variable.
17949 (ZERO_VIEW_P): New macro.
17950 (output_asm_line_debug_info): New.
17951 (struct var_loc_node): Add view.
17952 (add_AT_view_list, AT_loc_list): New.
17953 (add_var_loc_to_decl): Add view param. Test it against last.
17954 (new_loc_list): Add view params. Record them.
17955 (AT_loc_list_ptr): Handle loc and view lists.
17956 (view_list_to_loc_list_val_node): New.
17957 (print_dw_val): Handle dw_val_class_view_list.
17958 (size_of_die): Likewise.
17959 (value_format): Likewise.
17960 (loc_list_has_views): New.
17961 (gen_llsym): Set vl_symbol too.
17962 (maybe_gen_llsym, skip_loc_list_entry): New.
17963 (dwarf2out_maybe_output_loclist_view_pair): New.
17964 (output_loc_list): Output view list or entries too.
17965 (output_view_list_offset): New.
17966 (output_die): Handle dw_val_class_view_list.
17967 (output_dwarf_version): New.
17968 (output_compilation_unit_header): Use it.
17969 (output_skeleton_debug_sections): Likewise.
17970 (output_rnglists, output_line_info): Likewise.
17971 (output_pubnames, output_aranges): Update version comments.
17972 (output_one_line_info_table): Output view numbers in asm comments.
17973 (dw_loc_list): Determine current endview, pass it to new_loc_list.
17974 Call maybe_gen_llsym.
17975 (loc_list_from_tree_1): Adjust.
17976 (add_AT_location_description): Create view list attribute if
17977 needed, check it's absent otherwise.
17978 (convert_cfa_to_fb_loc_list): Adjust.
17979 (maybe_emit_file): Call output_asm_line_debug_info for test.
17980 (dwarf2out_var_location): Reset views as needed. Precompute
17981 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
17982 attribute. Set view.
17983 (new_line_info_table): Reset next view.
17984 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
17985 (dwarf2out_source_line): Likewise. Output view resets and labels to
17986 the assembler, or select appropriate line info opcodes.
17987 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
17988 (optimize_string_length): Catch it. Adjust.
17989 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
17990 dw_val_class_view_list, and remove it if no longer needed.
17991 (hash_loc_list): Hash view numbers.
17992 (loc_list_hasher::equal): Compare them.
17993 (optimize_location_lists): Check whether a view list symbol is
17994 needed, and whether the locview attribute is present, and
17995 whether they match. Remove the locview attribute if no longer
17997 (index_location_lists): Call skip_loc_list_entry for test.
17998 (dwarf2out_finish): Call output_asm_line_debug_info for test.
17999 Use output_dwarf_version.
18000 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
18001 (struct dw_val_node): Add val_view_list.
18002 * final.c (SEEN_NEXT_VIEW): New.
18003 (set_next_view_needed): New.
18004 (clear_next_view_needed): New.
18005 (maybe_output_next_view): New.
18006 (final_start_function): Rename to...
18007 (final_start_function_1): ... this. Take pointer to FIRST,
18008 add SEEN parameter. Emit param bindings in the initial view.
18009 (final_start_function): Reintroduce SEEN-less interface.
18010 (final): Rename to...
18011 (final_1): ... this. Take SEEN parameter. Output final pending
18012 next view at the end.
18013 (final): Reintroduce seen-less interface.
18014 (final_scan_insn): Output pending next view before switching
18015 sections or ending a block. Mark the next view as needed when
18016 outputting variable locations. Notify debug backend of section
18017 changes, and of location view changes.
18018 (rest_of_handle_final): Adjust.
18019 * toplev.c (process_options): Autodetect value for debug variable
18020 location views option. Warn on incompat5 without -gdwarf-5.
18021 * doc/invoke.texi (gvariable-location-views): New.
18022 (gvariable-location-views=incompat5): New.
18023 (gno-variable-location-views): New.
18025 2018-02-08 David Malcolm <dmalcolm@redhat.com>
18027 PR tree-optimization/84136
18028 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
18029 that the result of find_edge is non-NULL.
18031 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
18034 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
18035 storing integer register in SImode. Fix cost of 256 and 512
18036 byte aligned SSE register store.
18038 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
18040 * config/i386/i386.c (ix86_multiplication_cost): Fix
18041 multiplication cost for TARGET_AVX512DQ.
18043 2018-02-08 Marek Polacek <polacek@redhat.com>
18045 PR tree-optimization/84238
18046 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
18049 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18051 PR tree-optimization/84265
18052 * tree-vect-stmts.c (vectorizable_store): Don't treat
18053 VMAT_CONTIGUOUS accesses as grouped.
18054 (vectorizable_load): Likewise.
18056 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18058 PR tree-optimization/81635
18059 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
18060 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
18061 (test_round_for_mask): New functions.
18062 (wide_int_cc_tests): Call test_round_for_mask.
18063 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
18064 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
18065 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
18066 range returned by get_range_info.
18068 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
18071 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
18072 * symtab.c: Include builtins.h
18073 (symtab_node::output_to_lto_symbol_table_p): Move here
18074 from lto-streamer-out.c:output_symbol_p.
18075 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
18076 (output_symbol_p): Move all logic to symtab.c
18077 (produce_symtab): Update.
18079 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18081 * config/s390/s390-opts.h (enum indirect_branch): Define.
18082 * config/s390/s390-protos.h (s390_return_addr_from_memory)
18083 (s390_indirect_branch_via_thunk)
18084 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
18085 (enum s390_indirect_branch_type): Define.
18086 * config/s390/s390.c (struct s390_frame_layout, struct
18087 machine_function): Remove.
18088 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
18089 (indirect_branch_table_label_no, indirect_branch_table_name):
18091 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
18092 (enum s390_indirect_branch_option): Define.
18093 (s390_return_addr_from_memory): New function.
18094 (s390_handle_string_attribute): New function.
18095 (s390_attribute_table): Add new attribute handler.
18096 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
18097 (s390_indirect_branch_via_thunk): New function.
18098 (s390_indirect_branch_via_inline_thunk): New function.
18099 (s390_function_ok_for_sibcall): When jumping via thunk disallow
18100 sibling call optimization for non z10 compiles.
18101 (s390_emit_call): Force indirect branch target to be a single
18102 register. Add r1 clobber for non-z10 compiles.
18103 (s390_emit_epilogue): Emit return jump via return_use expander.
18104 (s390_reorg): Handle JUMP_INSNs as execute targets.
18105 (s390_option_override_internal): Perform validity checks for the
18106 new command line options.
18107 (s390_indirect_branch_attrvalue): New function.
18108 (s390_indirect_branch_settings): New function.
18109 (s390_set_current_function): Invoke s390_indirect_branch_settings.
18110 (s390_output_indirect_thunk_function): New function.
18111 (s390_code_end): Implement target hook.
18112 (s390_case_values_threshold): Implement target hook.
18113 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
18115 * config/s390/s390.h (struct s390_frame_layout)
18116 (struct machine_function): Move here from s390.c.
18117 (TARGET_INDIRECT_BRANCH_NOBP_RET)
18118 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
18119 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
18120 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
18121 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
18122 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
18123 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
18124 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
18125 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
18126 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
18127 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
18128 (mnemonic attribute): Add values which aren't recognized
18130 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
18131 pattern for branch conversion. Fix mnemonic attribute.
18132 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
18133 indirect branch via thunk if requested.
18134 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
18135 ("*indirect_jump"): Disable for branch conversion using out of
18137 ("indirect_jump_via_thunk<mode>_z10")
18138 ("indirect_jump_via_thunk<mode>")
18139 ("indirect_jump_via_inlinethunk<mode>_z10")
18140 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
18141 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
18142 ("casesi_jump_via_inlinethunk<mode>_z10")
18143 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
18144 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
18145 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
18146 ("*indirect2_jump"): Disable for branch conversion.
18147 ("casesi_jump"): Turn into expander and expand patterns for branch
18149 ("return_use"): New expander.
18150 ("*return"): Emit return via thunk and rename it to ...
18151 ("*return<mode>"): ... this one.
18152 * config/s390/s390.opt: Add new options and and enum for the
18155 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18157 * lra-constraints.c (match_reload): Unconditionally use
18158 gen_lowpart_SUBREG, rather than selecting between that
18159 and equivalent gen_rtx_SUBREG code.
18161 2018-02-08 Richard Biener <rguenther@suse.de>
18163 PR tree-optimization/84233
18164 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
18165 changed flag instead of boguously re-using phi_inserted.
18167 2018-02-08 Martin Jambor <mjambor@suse.cz>
18169 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
18170 static local variables.
18172 2018-02-08 Richard Biener <rguenther@suse.de>
18174 PR tree-optimization/84278
18175 * tree-vect-stmts.c (vectorizable_store): When looking for
18176 smaller vector types to perform grouped strided loads/stores
18177 make sure the mode is supported by the target.
18178 (vectorizable_load): Likewise.
18180 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
18182 * config/aarch64/aarch64.c (aarch64_components_for_bb):
18183 Increase LDP/STP opportunities by adding adjacent callee-saves.
18185 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
18187 PR rtl-optimization/84068
18188 PR rtl-optimization/83459
18189 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
18191 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
18193 PR tree-optimization/84224
18194 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
18195 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
18196 non-zero arguments.
18198 2018-02-07 Iain Sandoe <iain@codesourcery.com>
18201 * config/rs6000/altivec.md (*restore_world): Remove LR use.
18202 * config/rs6000/predicates.md (restore_world_operation): Adjust op
18203 count, remove one USE.
18205 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
18207 * doc/install.texi (Configuration): Document the
18208 --with-long-double-format={ibm,ieee} PowerPC configuration
18212 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
18213 Convert from define_expand to be define_insn_and_split. Rework
18214 float/double/_Float128 conversions to QI/HI/SImode to work with
18215 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
18216 conversions to QI/HImode types did a store and then a load to
18217 truncate the value. For conversions to VSX registers, don't split
18218 the insn, instead emit the code directly. Use the code iterator
18219 any_fix to combine signed and unsigned conversions.
18220 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
18221 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
18222 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
18223 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
18224 (fix_<mode>di2_hw): Likewise.
18225 (fixuns_<mode>di2_hw): Likewise.
18226 (fix_<mode>si2_hw): Likewise.
18227 (fixuns_<mode>si2_hw): Likewise.
18228 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
18229 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
18230 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
18231 fix<uns>_trunc<SFDF:mode>si2_p8.
18232 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
18233 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
18234 (fix<uns>_<mode>_mem): Likewise.
18235 (fctiw<u>z_<mode>_mem): Likewise.
18236 (fix<uns>_<mode>_mem): Likewise.
18237 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
18238 the register allocator from doing a direct move to the GPRs to do
18239 a store, and instead use the ISA 3.0 store byte/half-word from
18240 vector register instruction. For IEEE 128-bit floating point,
18241 also optimize stores of 32-bit ints.
18242 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
18244 2018-02-07 Alan Hayward <alan.hayward@arm.com>
18246 * genextract.c (push_pathstr_operand): New function to support
18248 (walk_rtx): Call push_pathstr_operand.
18249 (print_path): Support [a-zA-Z].
18251 2018-02-07 Richard Biener <rguenther@suse.de>
18253 PR tree-optimization/84037
18254 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
18255 (cse_and_gimplify_to_preheader): Declare.
18256 (vect_get_place_in_interleaving_chain): Likewise.
18257 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18259 (_loop_vec_info::~_loop_vec_info): Delete it.
18260 (cse_and_gimplify_to_preheader): New function.
18261 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
18262 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
18263 (vectorizable_load): Likewise. For grouped stores always base
18264 the IV on the first element.
18265 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
18266 condition before gimplifying.
18268 2018-02-07 Jakub Jelinek <jakub@redhat.com>
18270 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
18271 *DIV_EXPR and *MOD_EXPR.
18273 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
18276 * config/i386/i386.c (ix86_option_override_internal): Mask out
18277 the CF_SET bit when checking -fcf-protection.
18279 2018-02-07 Tom de Vries <tom@codesourcery.com>
18282 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
18285 2018-02-07 Richard Biener <rguenther@suse.de>
18287 PR tree-optimization/84204
18288 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
18291 PR tree-optimization/84205
18292 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
18293 special-case isl_ast_op_zdiv_r.
18295 PR tree-optimization/84223
18296 * graphite-scop-detection.c (gather_bbs::before_dom_children):
18297 Only add conditions from within the region.
18298 (gather_bbs::after_dom_children): Adjust.
18300 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
18303 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
18304 * config/avr/avr.md: Only post-reload split REG-REG moves if
18305 either register is GENERAL_REG_P.
18307 2018-02-07 Jakub Jelinek <jakub@redhat.com>
18309 PR tree-optimization/84235
18310 * tree-ssa-scopedtables.c
18311 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
18312 if the subtraction is performed in floating point type where NaNs are
18313 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
18314 build 1. Formatting fix.
18316 2018-02-06 Jakub Jelinek <jakub@redhat.com>
18319 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
18320 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
18321 and skip it regardless of bb boundaries. Use CALL_P macro,
18322 don't test INSN_P (insn) together with CALL_P or JUMP_P check
18323 unnecessarily, formatting fix.
18325 2018-02-06 Michael Collison <michael.collison@arm.com>
18327 * config/arm/thumb2.md:
18328 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
18329 (*thumb_mov_notscc): Ditto.
18331 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
18334 * config/rs6000/rs6000.md (su code attribute): Use "u" for
18335 unsigned_fix, not "s".
18337 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18339 * configure.ac (gcc_fn_eh_frame_ro): New function.
18340 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
18341 correct .eh_frame permissions.
18342 * configure: Regenerate.
18344 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
18346 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
18347 irrelevant options.
18349 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18351 * config/rs6000/rs6000.c (rs6000_option_override_internal):
18352 Display warning message for -mno-speculate-indirect-jumps.
18354 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
18356 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
18358 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
18360 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
18362 PR tree-optimization/84225
18363 * tree-eh.c (find_trapping_overflow): Only call
18364 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
18366 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18369 * config/i386/i386.c: Reimplement the check of possible options
18370 -mibt/-mshstk conbination. Change error messages.
18371 * doc/invoke.texi: Fix a typo: remove extra '='.
18373 2018-02-06 Marek Polacek <polacek@redhat.com>
18375 PR tree-optimization/84228
18376 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
18378 2018-02-06 Tamar Christina <tamar.christina@arm.com>
18381 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
18382 emitted arch directives.
18383 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
18384 __ARM_FEATURE_COPROC before changing architectures.
18386 2018-02-06 Richard Biener <rguenther@suse.de>
18388 * config/i386/i386.c (print_reg): Fix typo.
18389 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
18391 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
18393 * configure: Regenerate.
18395 2018-02-05 Martin Sebor <msebor@redhat.com>
18397 PR tree-optimization/83369
18398 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
18401 2018-02-05 Martin Liska <mliska@suse.cz>
18403 * doc/invoke.texi: Cherry-pick upstream r323995.
18405 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
18407 * ira.c (ira_init_register_move_cost): Adjust comment.
18409 2018-02-05 Martin Liska <mliska@suse.cz>
18411 PR gcov-profile/84137
18412 * doc/gcov.texi: Fix typo in documentation.
18414 2018-02-05 Martin Liska <mliska@suse.cz>
18416 PR gcov-profile/83879
18417 * doc/gcov.texi: Document necessity of --dynamic-list-data when
18418 using dlopen functionality.
18420 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
18422 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
18423 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
18424 _mm_maskz_range_ss, _mm_mask_range_round_ss,
18425 _mm_maskz_range_round_ss): New intrinsics.
18426 (__builtin_ia32_rangesd128_round)
18427 (__builtin_ia32_rangess128_round): Remove.
18428 (__builtin_ia32_rangesd128_mask_round,
18429 __builtin_ia32_rangess128_mask_round): New builtins.
18430 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
18431 __builtin_ia32_rangess128_round): Remove.
18432 (__builtin_ia32_rangesd128_mask_round,
18433 __builtin_ia32_rangess128_mask_round): New builtins.
18434 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
18435 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
18436 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
18437 "<round_saeonly_constraint>")): Changed to ...
18438 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
18439 "<round_saeonly_scalar_constraint>")): ... this.
18440 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
18441 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
18442 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
18443 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
18444 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
18446 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
18448 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
18450 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
18451 Remove all values except native, 8540 and 8548.
18453 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
18455 * config/i386/i386.c (ix86_output_function_return): Pass
18456 INVALID_REGNUM, instead of -1, as invalid register number to
18457 indirect_thunk_name and output_indirect_thunk.
18459 2018-02-02 Julia Koval <julia.koval@intel.com>
18461 * config.gcc: Add -march=icelake.
18462 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
18463 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
18464 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
18465 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
18466 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
18467 (processor_target_table): Add icelake.
18468 (ix86_option_override_internal): Handle new PTAs.
18469 (get_builtin_code_for_version): Handle icelake.
18470 (M_INTEL_COREI7_ICELAKE): New.
18471 (fold_builtin_cpu): Handle icelake.
18472 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
18473 * doc/invoke.texi: Add -march=icelake.
18475 2018-02-02 Julia Koval <julia.koval@intel.com>
18477 * config/i386/i386.c (ix86_option_override_internal): Change flags type
18478 to wide_int_bitmask.
18479 * wide-int-bitmask.h: New.
18481 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18484 * config/i386/i386.md: Replace Pmode with word_mode in
18485 builtin_setjmp_setup and builtin_longjmp to support x32.
18487 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
18491 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
18493 (rs6000_supported_cpu_names): New static variable.
18494 (linux_cpu_translation_table): Likewise.
18495 (elf_platform) <cpu>: Define new static variable and use it.
18496 Translate kernel AT_PLATFORM name to canonical name if needed.
18497 Error if platform name is unknown.
18499 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
18502 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
18504 2018-02-01 Jeff Law <law@redhat.com>
18507 * config/i386/i386.c (release_scratch_register_on_entry): Add new
18508 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
18509 the scratch if RELEASE_VIA_POP is false.
18510 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
18511 If we have to save a temporary register, decrement SIZE appropriately.
18512 Pass new arguments to release_scratch_register_on_entry.
18513 (ix86_adjust_stack_and_probe): Likewise.
18514 (ix86_emit_probe_stack_range): Pass new arguments to
18515 release_scratch_register_on_entry.
18517 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
18519 PR rtl-optimization/84157
18520 * combine.c (change_zero_ext): Use REG_P predicate in
18521 front of HARD_REGISTER_P predicate.
18523 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
18525 * config/avr/avr.c (avr_option_override): Move disabling of
18526 -fdelete-null-pointer-checks to...
18527 * common/config/avr/avr-common.c (avr_option_optimization_table):
18530 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18532 PR tree-optimization/81635
18533 * tree-data-ref.c (split_constant_offset_1): For types that
18534 wrap on overflow, try to use range info to prove that wrapping
18537 2018-02-01 Renlin Li <renlin.li@arm.com>
18540 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
18541 TAILCALL_ADDR_REGS.
18542 (aarch64_register_move_cost): Likewise.
18543 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
18544 TAILCALL_ADDR_REGS.
18545 (REG_CLASS_NAMES): Likewise.
18546 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
18547 TAILCALL_ADDR_REGS. Remove IP registers.
18548 * config/aarch64/aarch64.md (Ucs): Update register constraint.
18550 2018-02-01 Richard Biener <rguenther@suse.de>
18552 * domwalk.h (dom_walker::dom_walker): Add additional constructor
18553 for specifying RPO order and allow NULL for that.
18554 * domwalk.c (dom_walker::dom_walker): Likewise.
18555 (dom_walker::walk): Handle NULL RPO order.
18556 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
18558 (rewrite_update_dom_walker): Likewise.
18559 (mark_def_dom_walker): Likewise.
18561 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18563 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
18564 (aarch64_maybe_expand_sve_subreg_move): Declare.
18565 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
18566 * config/aarch64/predicates.md (aarch64_any_register_operand): New
18568 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
18569 that are semantically a reverse operation.
18570 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
18571 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
18572 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
18574 (aarch64_can_change_mode_class): For big-endian, forbid changes
18575 between two SVE modes if they have different element sizes.
18577 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18579 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
18580 the TImode handling for big-endian targets.
18582 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18584 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
18585 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
18587 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
18588 Remove BSWAP handing for big-endian targets and use the form of
18589 LD1RQ appropariate for the mode.
18591 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18593 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
18594 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
18595 duplicated element.
18597 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18600 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
18601 check for operands that need to go through aarch64_sve_reload_be.
18603 2018-02-01 Jakub Jelinek <jakub@redhat.com>
18605 PR tree-optimization/81661
18606 PR tree-optimization/84117
18607 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
18608 * tree-eh.c: Include gimplify.h.
18609 (find_trapping_overflow, replace_trapping_overflow,
18610 rewrite_to_non_trapping_overflow): New functions.
18611 * tree-vect-loop.c: Include tree-eh.h.
18612 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
18613 * tree-data-ref.c: Include tree-eh.h.
18614 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
18616 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
18618 PR rtl-optimization/84123
18619 * combine.c (change_zero_ext): Check if hard register satisfies
18620 can_change_dest_mode before calling gen_lowpart_SUBREG.
18622 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
18625 * ira.c (ira_init_register_move_cost): Remove assert.
18627 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
18629 PR rtl-optimization/84071
18630 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
18631 * doc/tm.texi: Regenerate.
18633 2018-01-31 Richard Biener <rguenther@suse.de>
18635 PR tree-optimization/84132
18636 * tree-data-ref.c (analyze_miv_subscript): Properly
18637 check whether evolution_function_is_affine_multivariate_p
18638 before calling gcd_of_steps_may_divide_p.
18640 2018-01-31 Julia Koval <julia.koval@intel.com>
18643 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
18644 * config/i386/i386.md (rdpid_rex64) New.
18645 (rdpid): Make 32bit only.
18647 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
18650 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
18651 an IDENTIFIER_NODE for FUNCTION_TYPE's.
18653 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
18656 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
18658 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
18660 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
18662 PR rtl-optimization/84071
18663 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
18664 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
18666 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
18668 * config/arc/arc.c (arc_handle_aux_attribute): New function.
18669 (arc_attribute_table): Add 'aux' attribute.
18670 (arc_in_small_data_p): Consider aux like variables.
18671 (arc_is_aux_reg_p): New function.
18672 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
18673 (arc_get_aux_arg): New function.
18674 (prepare_move_operands): Handle aux-register access.
18675 (arc_handle_aux_attribute): New function.
18676 * doc/extend.texi (ARC Variable attributes): Add subsection.
18678 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
18680 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
18681 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
18682 (arc_attribute_table): Add 'uncached' attribute.
18683 (arc_print_operand): Print '.di' flag for uncached memory
18685 (arc_in_small_data_p): Do not consider for small data the uncached
18687 (arc_is_uncached_mem_p): New function.
18688 * config/arc/predicates.md (compact_store_memory_operand): Check
18689 for uncached memory accesses.
18690 (nonvol_nonimm_operand): Likewise.
18691 * doc/extend.texi (ARC Type Attribute): New subsection.
18693 2018-01-31 Jakub Jelinek <jakub@redhat.com>
18696 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
18697 falign-loops=): Add Optimization flag.
18699 2018-01-30 Jeff Law <law@redhat.com>
18702 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
18703 INT_REGISTERS_SAVED. Check it prior to calling
18704 get_scratch_register_on_entry.
18705 (ix86_adjust_stack_and_probe): Similarly.
18706 (ix86_emit_probe_stack_range): Similarly.
18707 (ix86_expand_prologue): Corresponding changes.
18709 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18712 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
18713 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
18715 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
18718 * lra-constraints.c (curr_insn_transform): Process AND in the
18721 2018-01-30 Jakub Jelinek <jakub@redhat.com>
18723 PR rtl-optimization/83986
18724 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
18725 dependence against last_pending_memory_flush in addition to
18726 pending_jump_insns.
18728 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
18730 PR tree-optimization/81611
18731 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
18734 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18737 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
18740 2018-01-30 Richard Biener <rguenther@suse.de>
18741 Jakub Jelinek <jakub@redhat.com>
18743 PR tree-optimization/84111
18744 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
18745 inner loops added during recursion, as they don't have up-to-date
18748 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
18751 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
18752 (can_inline_edge_by_limits_p): ... here.
18753 (can_early_inline_edge_p, check_callers,
18754 update_caller_keys, update_callee_keys, recursive_inlining,
18755 add_new_edges_to_heap, speculation_useful_p,
18756 inline_small_functions,
18757 inline_small_functions, flatten_function,
18758 inline_to_all_callers_1): Update.
18760 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
18762 * profile-count.c (profile_count::combine_with_ipa_count): Handle
18765 2018-01-30 Richard Biener <rguenther@suse.de>
18767 PR tree-optimization/83008
18768 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
18769 invariant and constant vector uses in stmts when they need
18770 more than one stmt.
18772 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18775 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
18776 * configure: Regenerate.
18778 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
18780 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
18782 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
18783 Use gen_rtx_REG rather than gen_lowpart.
18785 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
18787 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
18788 rather than 0 when creating partial subregs.
18790 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
18792 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
18795 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
18798 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
18799 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
18800 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
18801 flags. This restores the settings used before the 2017-07-24.
18802 Turning off pre increment/decrement/modify allows IVOPTS to
18803 optimize DF/SF loops where the index is an int.
18805 2018-01-29 Richard Biener <rguenther@suse.de>
18806 Kelvin Nilsen <kelvin@gcc.gnu.org>
18809 * tree-vect-stmts.c (vectorizable_call): Don't call
18810 targetm.vectorize_builtin_md_vectorized_function if callee is
18813 2018-01-22 Carl Love <cel@us.ibm.com>
18815 * doc/extend.tex: Fix typo in second arg in
18816 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
18818 2018-01-29 Richard Biener <rguenther@suse.de>
18820 PR tree-optimization/84086
18821 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
18822 (flush_ssaname_freelist): When SSA names were released reset
18823 the SCEV hash table.
18825 2018-01-29 Richard Biener <rguenther@suse.de>
18827 PR tree-optimization/84057
18828 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
18829 removed paths when removing edges.
18831 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
18833 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
18834 -mfunction-return=@var{choice}.
18836 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
18838 PR diagnostic/84034
18839 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
18840 Handle CR like TAB.
18841 (layout::print_source_line): Likewise.
18842 (test_get_line_width_without_trailing_whitespace): Add test cases.
18844 2018-01-27 Jakub Jelinek <jakub@redhat.com>
18846 PR middle-end/84040
18847 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
18850 2018-01-26 Jim Wilson <jimw@sifive.com>
18852 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
18854 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
18857 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18859 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
18860 and CMP + SUB-immediate -> SUBS.
18862 2018-01-26 Martin Sebor <msebor@redhat.com>
18864 PR tree-optimization/83896
18865 * tree-ssa-strlen.c (get_string_len): Rename...
18866 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
18867 Avoid assuming length is constant.
18868 (handle_char_store): Use HOST_WIDE_INT for string length.
18870 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
18873 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
18874 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
18876 2018-01-26 Richard Biener <rguenther@suse.de>
18878 PR rtl-optimization/84003
18879 * dse.c (record_store): Only record redundant stores when
18880 the earlier store aliases at least all accesses the later one does.
18882 2018-01-26 Jakub Jelinek <jakub@redhat.com>
18884 PR rtl-optimization/83985
18885 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
18886 REG_CFA_RESTORE insns.
18887 (delete_unmarked_insns): Don't ignore separate shrink wrapping
18888 REG_CFA_RESTORE insns here.
18891 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
18892 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
18894 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18896 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
18897 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
18898 (arc_init): Likewise.
18899 (arc_override_options): Likewise.
18900 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
18902 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
18904 * config/arc/arc.h (TARGET_DBNZ): Define.
18905 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
18906 properly set the tune attribute.
18907 (dbnz): Use TARGET_DBNZ guard.
18908 * config/arc/arc.opt (mtune): Add core3 option.
18910 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18912 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
18913 recognize new pic like addresses.
18914 (arc_delegitimize_address): Clean up.
18916 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18918 * config/arc/arc-arches.def: Option mrf16 valid for all
18920 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
18921 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
18922 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
18923 * config/arc/arc-tables.opt: Regenerate.
18924 * config/arc/arc.c (arc_conditional_register_usage): Handle
18925 reduced register file case.
18926 (arc_file_start): Set must have build attributes.
18927 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
18928 mrf16 option value.
18929 * config/arc/arc.opt (mrf16): Add new option.
18930 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
18931 * config/arc/genmultilib.awk: Handle new mrf16 option.
18932 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
18933 * config/arc/t-multilib: Regenerate.
18934 * doc/invoke.texi (ARC Options): Document mrf16 option.
18936 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18938 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
18939 * config/arc/arc.c (arc_handle_secure_attribute): New function.
18940 (arc_attribute_table): Add 'secure_call' attribute.
18941 (arc_print_operand): Print secure call operand.
18942 (arc_function_ok_for_sibcall): Don't optimize tail calls when
18944 (arc_is_secure_call_p): New function. * config/arc/arc.md
18945 (call_i): Add support for sjli instruction.
18946 (call_value_i): Likewise.
18947 * config/arc/constraints.md (Csc): New constraint.
18949 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18950 John Eric Martin <John.Martin@emmicro-us.com>
18952 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
18953 * config/arc/arc.c (_arc_jli_section): New struct.
18954 (arc_jli_section): New type.
18955 (rc_jli_sections): New static variable.
18956 (arc_handle_jli_attribute): New function.
18957 (arc_attribute_table): Add jli_always and jli_fixed attribute.
18958 (arc_file_end): New function.
18959 (TARGET_ASM_FILE_END): Define.
18960 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
18961 (arc_add_jli_section): New function.
18962 (jli_call_scan): Likewise.
18963 (arc_reorg): Call jli_call_scan.
18964 (arc_output_addsi): Remove 'S' from printing asm operand.
18965 (arc_is_jli_call_p): New function.
18966 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
18968 (movhi_insn): Likewise.
18969 (movsi_insn): Likewise.
18970 (movsi_set_cc_insn): Likewise.
18971 (loadqi_update): Likewise.
18972 (load_zeroextendqisi_update): Likewise.
18973 (load_signextendqisi_update): Likewise.
18974 (loadhi_update): Likewise.
18975 (load_zeroextendhisi_update): Likewise.
18976 (load_signextendhisi_update): Likewise.
18977 (loadsi_update): Likewise.
18978 (loadsf_update): Likewise.
18979 (movsicc_insn): Likewise.
18980 (bset_insn): Likewise.
18981 (bxor_insn): Likewise.
18982 (bclr_insn): Likewise.
18983 (bmsk_insn): Likewise.
18984 (bicsi3_insn): Likewise.
18985 (cmpsi_cc_c_insn): Likewise.
18986 (movsi_ne): Likewise.
18987 (movsi_cond_exec): Likewise.
18988 (clrsbsi2): Likewise.
18989 (norm_f): Likewise.
18999 (call_i): Remove 'S' asm letter, add jli instruction.
19000 (call_value_i): Likewise.
19001 * config/arc/arc.op (mjli-always): New option.
19002 * config/arc/constraints.md (Cji): New constraint.
19003 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
19005 (subsf3_fpx): Likewise.
19006 (mulsf3_fpx): Likewise.
19007 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
19009 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
19010 function attrbutes.
19011 * doc/invoke.texi (ARC): Document mjli-always option.
19013 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
19015 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
19016 avoid addition with 0 and use incw and decw where possible.
19018 2018-01-26 Richard Biener <rguenther@suse.de>
19020 PR tree-optimization/81082
19021 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
19022 association if it requires casting to unsigned.
19023 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
19024 from fold_plusminus_mult_expr to catch important cases late when
19025 range info is available.
19027 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19029 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
19030 * configure.ac (hidden_linkonce): New test.
19031 * configure: Regenerate.
19032 * config.in: Regenerate.
19034 2018-01-26 Julia Koval <julia.koval@intel.com>
19036 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
19037 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
19038 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
19039 _mm_mask_bitshuffle_epi64_mask): Fix type.
19040 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
19041 USI_FTYPE_V4DI_V4DI_USI): Remove.
19042 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
19043 __builtin_ia32_vpshufbitqmb256_mask,
19044 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
19045 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
19046 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
19048 2018-01-26 Alan Modra <amodra@gmail.com>
19051 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
19052 UNSPEC_VBPERMQ. Sort other unspecs.
19054 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
19056 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
19058 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
19060 PR middle-end/83055
19061 * predict.c (drop_profile): Do not push/pop cfun; update also
19063 (handle_missing_profiles): Fix logic looking for zero profiles.
19065 2018-01-25 Jakub Jelinek <jakub@redhat.com>
19067 PR middle-end/83977
19068 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
19069 on functions with #pragma omp declare simd or functions with simd
19071 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
19072 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
19073 Remove trailing \n from warning_at calls.
19075 2018-01-25 Tom de Vries <tom@codesourcery.com>
19078 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
19079 for neutered workers.
19081 2018-01-24 Joseph Myers <joseph@codesourcery.com>
19084 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
19085 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
19087 2018-01-24 Jeff Law <law@redhat.com>
19090 * i386.c (get_probe_interval): Move to earlier point.
19091 (ix86_compute_frame_layout): If -fstack-clash-protection and
19092 the frame is larger than the probe interval, then use pushes
19093 to save registers rather than reg->mem moves.
19094 (ix86_expand_prologue): Remove conditional for int_registers_saved
19097 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
19100 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
19101 min/max for never referenced object.
19103 2018-01-24 Jakub Jelinek <jakub@redhat.com>
19105 PR middle-end/83977
19106 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
19108 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
19109 attributes from DECL_ATTRIBUTES (decl) without affecting
19110 DECL_ATTRIBUTES (current_function_decl).
19111 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
19112 functions with non-NULL DECL_ABSTRACT_ORIGIN.
19114 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
19116 PR tree-optimization/83979
19117 * fold-const.c (fold_comparison): Use constant_boolean_node
19118 instead of boolean_{true,false}_node.
19120 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
19122 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
19125 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19127 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19128 Simplify the clause that sets the length attribute.
19129 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19130 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
19131 clause that sets the length attribute.
19132 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19134 2018-01-24 Tom de Vries <tom@codesourcery.com>
19137 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
19138 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
19139 Add strict parameter.
19140 (prevent_branch_around_nothing): Insert dummy insn between branch to
19141 label and label with no ptx insn inbetween.
19142 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
19144 2018-01-24 Tom de Vries <tom@codesourcery.com>
19147 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
19148 for neutered threads in warp.
19149 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
19151 2018-01-24 Richard Biener <rguenther@suse.de>
19153 PR tree-optimization/83176
19154 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
19157 2018-01-24 Richard Biener <rguenther@suse.de>
19159 PR tree-optimization/82819
19160 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
19161 code generating pluses that are no-ops in the target precision.
19163 2018-01-24 Richard Biener <rguenther@suse.de>
19165 PR middle-end/84000
19166 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
19168 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
19170 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
19171 to merge probabilities.
19172 * predict.c (probably_never_executed): Also mark as cold functions
19173 with global 0 profile and guessed local profile.
19174 * profile-count.c (profile_probability::combine_with_count): New
19176 * profile-count.h (profile_probability::operator*,
19177 profile_probability::operator*=, profile_probability::operator/,
19178 profile_probability::operator/=): Reduce precision to adjusted
19179 and set value to guessed on contradictory divisions.
19180 (profile_probability::combine_with_freq): Remove.
19181 (profile_probability::combine_wiht_count): Declare.
19182 (profile_count::force_nonzero):: Set to adjusted.
19183 (profile_count::probability_in):: Set quality to adjusted.
19184 * tree-ssa-tail-merge.c (replace_block_by): Use
19185 combine_with_count.
19187 2018-01-23 Andrew Waterman <andrew@sifive.com>
19188 Jim Wilson <jimw@sifive.com>
19190 * config/riscv/riscv.c (riscv_stack_boundary): New.
19191 (riscv_option_override): Set riscv_stack_boundary. Handle
19192 riscv_preferred_stack_boundary_arg.
19193 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
19194 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
19195 (STACK_BOUNDARY): Set to riscv_stack_boundary.
19196 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
19197 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
19198 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
19200 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
19203 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
19204 of struct ix86_frame.
19205 (ix86_expand_epilogue): Likewise. Add a local variable for
19206 the reg_save_offset field in struct ix86_frame.
19208 2018-01-23 Bin Cheng <bin.cheng@arm.com>
19210 PR tree-optimization/82604
19211 * tree-loop-distribution.c (enum partition_kind): New enum item
19212 PKIND_PARTIAL_MEMSET.
19213 (partition_builtin_p): Support above new enum item.
19214 (generate_code_for_partition): Ditto.
19215 (compute_access_range): Differentiate cases that equality can be
19216 proven at all loops, the innermost loops or no loops.
19217 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
19218 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
19219 (finalize_partitions, distribute_loop): Don't fuse partition of
19220 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
19221 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
19222 parloop is enabled.
19224 2018-01-23 Martin Liska <mliska@suse.cz>
19226 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
19227 order to ignore the predictor.
19228 (PRED_POLYMORPHIC_CALL): Likewise.
19229 (PRED_RECURSIVE_CALL): Likewise.
19231 2018-01-23 Martin Liska <mliska@suse.cz>
19233 * tree-profile.c (tree_profiling): Print function header to
19234 aware reader which function we are working on.
19235 * value-prof.c (gimple_find_values_to_profile): Do not print
19236 not interesting value histograms.
19238 2018-01-23 Martin Liska <mliska@suse.cz>
19240 * profile-count.h (enum profile_quality): Add
19241 profile_uninitialized as the first value. Do not number values
19242 as they are zero based.
19243 (profile_count::verify): Update sanity check.
19244 (profile_probability::verify): Likewise.
19246 2018-01-23 Nathan Sidwell <nathan@acm.org>
19248 * doc/invoke.texi (ffor-scope): Deprecate.
19250 2018-01-23 David Malcolm <dmalcolm@redhat.com>
19252 PR tree-optimization/83510
19253 * domwalk.c (set_all_edges_as_executable): New function.
19254 (dom_walker::dom_walker): Convert bool param
19255 "skip_unreachable_blocks" to enum reachability. Move setup of
19256 edge flags to set_all_edges_as_executable and only do it when
19257 reachability is REACHABLE_BLOCKS.
19258 * domwalk.h (enum dom_walker::reachability): New enum.
19259 (dom_walker::dom_walker): Convert bool param
19260 "skip_unreachable_blocks" to enum reachability.
19261 (set_all_edges_as_executable): New decl.
19262 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
19263 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
19265 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
19266 but converting true to REACHABLE_BLOCKS.
19267 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
19269 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
19270 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
19271 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
19273 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
19274 if check_all_array_refs will be called.
19276 2018-01-23 David Malcolm <dmalcolm@redhat.com>
19278 * tree.c (selftest::test_location_wrappers): Add more test
19281 2018-01-23 David Malcolm <dmalcolm@redhat.com>
19283 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
19284 (selftest::test_bit_in_range): Likewise.
19286 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
19289 * doc/sourcebuild.texi (vect_float): Say that the selector
19290 only describes the situation when -funsafe-math-optimizations is on.
19291 (vect_float_strict): Document.
19293 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
19295 PR tree-optimization/83965
19296 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
19297 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
19298 instead of checking only for a reduction.
19299 (vect_recog_widen_sum_pattern): Likewise.
19301 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
19303 * predict.c (probably_never_executed): Only use precise profile info.
19304 (compute_function_frequency): Skip after inlining hack since we now
19305 have quality checking.
19307 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
19309 * profile-count.h (profile_probability::very_unlikely,
19310 profile_probability::unlikely, profile_probability::even): Set
19311 precision to guessed.
19313 2018-01-23 Richard Biener <rguenther@suse.de>
19315 PR tree-optimization/83963
19316 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
19317 Properly terminate dominator walk when crossing the exit edge not
19318 when visiting its source block.
19320 2018-01-23 Jakub Jelinek <jakub@redhat.com>
19323 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
19324 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
19326 2018-01-22 Jakub Jelinek <jakub@redhat.com>
19328 PR tree-optimization/83957
19329 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
19330 semicolon after for body surrounded by braces.
19332 PR tree-optimization/83081
19333 * profile-count.h (profile_probability::split): New method.
19334 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
19335 Use profile_probability::split.
19336 (do_compare_rtx_and_jump): Fix adjustment of probabilities
19337 when splitting a single conditional jump into 2.
19339 2018-01-22 David Malcolm <dmalcolm@redhat.com>
19341 PR tree-optimization/69452
19342 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
19345 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19347 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
19348 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
19349 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
19351 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19353 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
19355 * config/rl78/rl78.md (movdi): New define_expand.
19356 * config/rl78/rl78.c (rl78_split_movdi): New function.
19358 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
19361 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
19363 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
19364 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
19365 128-bit to produce an UNSPEC move to get the double word with the
19366 signbit and then a shift directly to do signbit.
19367 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
19368 implementation with a new version that just does either a direct
19369 move or a regular move. Move memory interface to separate insns.
19370 Move insns so they are next to the expander.
19371 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
19372 with signbit move. Split big and little endian case.
19373 (signbit<mode>2_dm_mem_le): Likewise.
19374 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
19375 (signbit<mode>2_dm2): Likewise.
19377 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19379 * config/rl78/rl78.md (anddi3): New define_expand.
19381 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19383 * config/rl78/rl78.md (umindi3): New define_expand.
19385 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19387 * config/rl78/rl78.md (smindi3): New define_expand.
19389 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19391 * config/rl78/rl78.md (smaxdi3): New define_expand.
19393 2018-01-22 Carl Love <cel@us.ibm.com>
19395 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
19396 LVX_V1TI): Add macro expansion.
19397 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
19398 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
19399 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
19400 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
19401 Change check to determine if the instruction is a byte reversing
19402 entry. Fix typo in comment.
19403 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
19404 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
19405 Add def_builtin calls for new builtins.
19406 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
19407 Add define_insn expansion.
19409 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19411 * config/rl78/rl78.md (umaxdi3): New define_expand.
19413 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19415 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
19416 for non-QImode registers.
19418 2018-01-22 Richard Biener <rguenther@suse.de>
19420 PR tree-optimization/83963
19421 * graphite-scop-detection.c (scop_detection::get_sese): Delay
19422 including the loop exit block.
19423 (scop_detection::merge_sese): Likewise.
19424 (scop_detection::add_scop): Do it here instead.
19426 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19428 * doc/sourcebuild.texi (arm_softfloat): Document.
19430 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
19433 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
19434 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
19435 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
19437 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19438 David Edelsohn <dje.gcc@gmail.com>
19441 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19442 Change "crset eq" to "crset 2".
19443 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19444 (*call_indirect_aix<mode>_nospec): Likewise.
19445 (*call_value_indirect_aix<mode>_nospec): Likewise.
19446 (*call_indirect_elfv2<mode>_nospec): Likewise.
19447 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
19448 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
19449 change assembly output from . to $.
19450 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19451 (indirect_jump<mode>_nospec): Change assembly output from . to $.
19452 (*tablejump<mode>_internal1_nospec): Likewise.
19454 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
19457 * config/sh/sh_optimize_sett_clrt.cc:
19458 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
19460 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
19462 PR tree-optimization/83940
19463 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
19464 offset_dt to vect_constant_def rather than vect_unknown_def_type.
19465 (vect_check_load_store_mask): Add a mask_dt_out parameter and
19466 use it to pass back the definition type.
19467 (vect_check_store_rhs): Likewise rhs_dt_out.
19468 (vect_build_gather_load_calls): Add a mask_dt argument and use
19469 it instead of a call to vect_is_simple_use.
19470 (vectorizable_store): Update calls to vect_check_load_store_mask
19471 and vect_check_store_rhs. Use the dt returned by the latter instead
19472 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
19473 instead of calls to vect_is_simple_use. Pass the scalar rather
19474 than the vector operand to vect_is_simple_use when handling
19475 second and subsequent copies of an rhs value.
19476 (vectorizable_load): Update calls to vect_check_load_store_mask
19477 and vect_build_gather_load_calls. Use the cached mask_dt and
19478 gs_info.offset_dt instead of calls to vect_is_simple_use.
19480 2018-01-20 Jakub Jelinek <jakub@redhat.com>
19482 PR middle-end/83945
19483 * tree-emutls.c: Include gimplify.h.
19484 (lower_emutls_2): New function.
19485 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
19486 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
19487 it before further processing.
19490 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
19491 UINTVAL (trueop1) instead of INTVAL (op1).
19493 2018-01-19 Jakub Jelinek <jakub@redhat.com>
19497 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
19498 INCOMING_FRAME_SP_OFFSET if not defined.
19499 (scan_trace): Add ENTRY argument. If true and
19500 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
19501 emit a note to adjust the CFA offset.
19502 (create_cfi_notes): Adjust scan_trace callers.
19503 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
19504 INCOMING_FRAME_SP_OFFSET in the CIE.
19505 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
19506 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
19508 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
19509 * doc/tm.texi: Regenerated.
19511 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19513 PR rtl-optimization/83147
19514 * lra-constraints.c (remove_inheritance_pseudos): Use
19515 lra_substitute_pseudo_within_insn.
19517 2018-01-19 Tom de Vries <tom@codesourcery.com>
19518 Cesar Philippidis <cesar@codesourcery.com>
19521 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
19523 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
19526 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
19527 spaces for function labels.
19529 2018-01-19 Martin Liska <mliska@suse.cz>
19531 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
19532 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
19533 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
19534 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
19535 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
19536 (PRED_CONST_RETURN): Change from 69 to 65.
19537 (PRED_NULL_RETURN): Change from 91 to 71.
19538 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
19539 (PRED_LOOP_GUARD): Change from 66 to 73.
19541 2018-01-19 Martin Liska <mliska@suse.cz>
19543 * predict.c (predict_insn_def): Add new assert.
19544 (struct branch_predictor): Change type to signed integer.
19545 (test_prediction_value_range): Amend test to cover
19546 PROB_UNINITIALIZED.
19547 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
19548 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
19549 (PRED_LOOP_ITERATIONS_MAX): Likewise.
19550 (PRED_LOOP_IV_COMPARE): Likewise.
19551 * predict.h (PROB_UNINITIALIZED): Define new constant.
19553 2018-01-19 Martin Liska <mliska@suse.cz>
19555 * predict.c (dump_prediction): Add new format for
19556 analyze_brprob.py script which is enabled with -details
19558 * profile-count.h (precise_p): New function.
19560 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
19562 PR tree-optimization/83922
19563 * tree-vect-loop.c (vect_verify_full_masking): Return false if
19564 there are no statements that need masking.
19565 (vect_active_double_reduction_p): New function.
19566 (vect_analyze_loop_operations): Use it when handling phis that
19567 are not in the loop header.
19569 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
19571 PR tree-optimization/83914
19572 * tree-vect-loop.c (vectorizable_induction): Don't convert
19573 init_expr or apply the peeling adjustment for inductions
19574 that are nested within the vectorized loop.
19576 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19578 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
19581 2018-01-18 Jakub Jelinek <jakub@redhat.com>
19585 * function.h (gimplify_parameters): Add gimple_seq * argument.
19586 * function.c: Include gimple.h and options.h.
19587 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
19588 for the added local temporaries if needed.
19589 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
19590 if there are any parameter cleanups, wrap whole body into a
19591 try/finally with the cleanups.
19593 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
19596 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
19597 Use GET_MODE_CLASS for scalar floating point.
19599 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
19603 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
19604 Fix call of call_cgraph_insertion_hooks.
19606 2018-01-18 Martin Sebor <msebor@redhat.com>
19608 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
19610 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
19613 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
19616 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
19619 * common.opt: (-ffile-prefix-map): New option.
19620 * opts.c (common_handle_option): Defer it.
19621 * opts-global.c (handle_common_deferred_options): Handle it.
19622 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
19623 * file-prefix-map.h: New file.
19624 (remap_debug_filename, add_debug_prefix_map): ...here.
19625 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
19626 * final.c (debug_prefix_map, add_debug_prefix_map
19627 remap_debug_filename): Move to...
19628 * file-prefix-map.c: New file.
19629 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
19630 generalize, get rid of alloca(), use strrchr() instead of strchr().
19631 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
19632 Implement in terms of add_prefix_map().
19633 (remap_macro_filename, remap_debug_filename): Implement in term of
19635 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
19636 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
19637 * dbxout.c: Include file-prefix-map.h.
19638 * varasm.c: Likewise.
19639 * vmsdbgout.c: Likewise.
19640 * xcoffout.c: Likewise.
19641 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
19642 * doc/cppopts.texi (-fmacro-prefix-map): Document.
19643 * doc/invoke.texi (-ffile-prefix-map): Document.
19644 (-fdebug-prefix-map): Update description.
19646 2018-01-18 Martin Liska <mliska@suse.cz>
19648 * config/i386/i386.c (indirect_thunk_name): Document that also
19650 (output_indirect_thunk): Document why both instructions
19651 (pause and lfence) are generated.
19653 2018-01-18 Richard Biener <rguenther@suse.de>
19655 PR tree-optimization/83887
19656 * graphite-scop-detection.c
19657 (scop_detection::get_nearest_dom_with_single_entry): Remove.
19658 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
19659 (scop_detection::merge_sese): Re-implement with a flood-fill
19660 algorithm that properly finds a SESE region if it exists.
19662 2018-01-18 Jakub Jelinek <jakub@redhat.com>
19665 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
19666 pointer_diff optimizations use view_convert instead of convert.
19668 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19670 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19671 Generate different code for -mno-speculate-indirect-jumps.
19672 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19673 (*call_indirect_aix<mode>): Disable for
19674 -mno-speculate-indirect-jumps.
19675 (*call_indirect_aix<mode>_nospec): New define_insn.
19676 (*call_value_indirect_aix<mode>): Disable for
19677 -mno-speculate-indirect-jumps.
19678 (*call_value_indirect_aix<mode>_nospec): New define_insn.
19679 (*sibcall_nonlocal_sysv<mode>): Generate different code for
19680 -mno-speculate-indirect-jumps.
19681 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19683 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
19685 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
19686 long double type, set the flags for noting the default long double
19687 type, even if we don't pass or return a long double type.
19689 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
19692 * ipa-inline.c (flatten_function): Do not overwrite final inlining
19695 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
19697 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
19698 support for merge[hl].
19699 (fold_mergehl_helper): New helper function.
19700 (tree-vector-builder.h): New #include for tree_vector_builder usage.
19701 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
19702 (altivec_vmrglw_direct): Add xxmrglw insn.
19704 2018-01-17 Andrew Waterman <andrew@sifive.com>
19706 * config/riscv/riscv.c (riscv_conditional_register_usage): If
19707 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
19709 2018-01-17 David Malcolm <dmalcolm@redhat.com>
19712 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
19713 call the lto_location_cache before reading the
19714 DECL_SOURCE_LOCATION of the types.
19716 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
19717 Richard Sandiford <richard.sandiford@linaro.org>
19719 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
19720 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
19721 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
19722 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
19723 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
19725 * config/aarch64/constraints.md (aarch64_movti_operand):
19727 * config/aarch64/predicates.md (Uti): Add new constraint.
19729 2018-01-17 Carl Love <cel@us.ibm.com>
19731 * config/rs6000/vsx.md (define_expand xl_len_r,
19732 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
19733 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
19735 (define_expand, define_insn): Move the shift left from the
19736 define_insn to the define_expand for lxvl and stxvl instructions.
19737 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
19738 and XL_LEN_R definitions to PURE.
19740 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
19742 * config/i386/i386.c (indirect_thunk_name): Declare regno
19743 as unsigned int. Compare regno with INVALID_REGNUM.
19744 (output_indirect_thunk): Ditto.
19745 (output_indirect_thunk_function): Ditto.
19746 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
19747 in the call to output_indirect_thunk_function.
19749 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
19751 PR middle-end/83884
19752 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
19753 rather than the size of inner_type to determine the stack slot size
19754 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
19756 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
19759 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
19762 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
19764 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
19765 endian Linux systems to optionally enable multilibs for selecting
19766 the long double type if the user configured an explicit type.
19767 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
19768 have no long double multilibs if not defined.
19769 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
19770 warn if the user used -mabi={ieee,ibm}longdouble and we built
19771 multilibs for long double.
19772 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
19773 appropriate multilib option.
19774 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
19776 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
19777 for building long double multilibs.
19778 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
19780 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
19782 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
19785 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
19787 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
19790 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
19793 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
19796 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
19798 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
19799 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
19801 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
19803 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
19804 different rtl trees depending on TARGET_64BIT.
19805 (rs6000_gen_lvx): Likewise.
19807 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
19809 * config/visium/visium.md (nop): Tweak comment.
19810 (hazard_nop): Likewise.
19812 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19814 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
19815 -mspeculate-indirect-jumps.
19816 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
19817 for -mno-speculate-indirect-jumps.
19818 (*call_indirect_elfv2<mode>_nospec): New define_insn.
19819 (*call_value_indirect_elfv2<mode>): Disable for
19820 -mno-speculate-indirect-jumps.
19821 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
19822 (indirect_jump): Emit different RTL for
19823 -mno-speculate-indirect-jumps.
19824 (*indirect_jump<mode>): Disable for
19825 -mno-speculate-indirect-jumps.
19826 (*indirect_jump<mode>_nospec): New define_insn.
19827 (tablejump): Emit different RTL for
19828 -mno-speculate-indirect-jumps.
19829 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
19830 (tablejumpsi_nospec): New define_expand.
19831 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
19832 (tablejumpdi_nospec): New define_expand.
19833 (*tablejump<mode>_internal1): Disable for
19834 -mno-speculate-indirect-jumps.
19835 (*tablejump<mode>_internal1_nospec): New define_insn.
19836 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
19839 2018-01-16 Artyom Skrobov tyomitch@gmail.com
19841 * caller-save.c (insert_save): Drop unnecessary parameter. All
19844 2018-01-16 Jakub Jelinek <jakub@redhat.com>
19845 Richard Biener <rguenth@suse.de>
19848 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
19849 return early, inline manually is_gimple_sizepos. Make sure if we
19850 call gimplify_expr we don't end up with a gimple constant.
19851 * tree.c (variably_modified_type_p): Don't return true for
19852 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
19853 * gimplify.h (is_gimple_sizepos): Remove.
19855 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19857 PR tree-optimization/83857
19858 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
19859 vectorizable_live_operation for pure SLP statements.
19860 (vectorizable_live_operation): Handle PHIs.
19862 2018-01-16 Richard Biener <rguenther@suse.de>
19864 PR tree-optimization/83867
19865 * tree-vect-stmts.c (vect_transform_stmt): Precompute
19866 nested_in_vect_loop_p since the scalar stmt may get invalidated.
19868 2018-01-16 Jakub Jelinek <jakub@redhat.com>
19871 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
19872 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
19873 If off is not INTEGER_CST, issue a may not be aligned warning
19874 rather than isn't aligned. Use isn%'t rather than isn't.
19875 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
19877 <case MULT_EXPR>: Improve the case when bottom and one of the
19878 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
19879 operand, in that case check if the other operand is multiple of
19880 bottom divided by the INTEGER_CST operand.
19882 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19885 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
19886 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
19887 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
19888 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
19889 * config/pa/pa.c (pa_function_arg_advance): Likewise.
19890 (pa_function_arg, pa_arg_partial_bytes): Likewise.
19891 (pa_function_arg_size): New function.
19893 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19895 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
19896 in a separate statement.
19898 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19900 PR tree-optimization/83847
19901 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
19902 group gathers and scatters.
19904 2018-01-16 Jakub Jelinek <jakub@redhat.com>
19906 PR rtl-optimization/86620
19907 * params.def (max-sched-ready-insns): Bump minimum value to 1.
19909 PR rtl-optimization/83213
19910 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
19911 to last if both are JUMP_INSNs.
19913 PR tree-optimization/83843
19914 * gimple-ssa-store-merging.c
19915 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
19916 store_immediate_info for bswap/nop orig_stores.
19918 2018-01-15 Andrew Waterman <andrew@sifive.com>
19920 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
19922 <UDIV>: Increase cost if !TARGET_DIV.
19924 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
19926 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
19927 (define_attr "cr_logical_3op"): New.
19928 (cceq_ior_compare): Adjust.
19929 (cceq_ior_compare_complement): Adjust.
19930 (*cceq_rev_compare): Adjust.
19931 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
19932 (is_cracked_insn): Adjust.
19933 (insn_must_be_first_in_group): Adjust.
19934 * config/rs6000/40x.md: Adjust.
19935 * config/rs6000/440.md: Adjust.
19936 * config/rs6000/476.md: Adjust.
19937 * config/rs6000/601.md: Adjust.
19938 * config/rs6000/603.md: Adjust.
19939 * config/rs6000/6xx.md: Adjust.
19940 * config/rs6000/7450.md: Adjust.
19941 * config/rs6000/7xx.md: Adjust.
19942 * config/rs6000/8540.md: Adjust.
19943 * config/rs6000/cell.md: Adjust.
19944 * config/rs6000/e300c2c3.md: Adjust.
19945 * config/rs6000/e500mc.md: Adjust.
19946 * config/rs6000/e500mc64.md: Adjust.
19947 * config/rs6000/e5500.md: Adjust.
19948 * config/rs6000/e6500.md: Adjust.
19949 * config/rs6000/mpc.md: Adjust.
19950 * config/rs6000/power4.md: Adjust.
19951 * config/rs6000/power5.md: Adjust.
19952 * config/rs6000/power6.md: Adjust.
19953 * config/rs6000/power7.md: Adjust.
19954 * config/rs6000/power8.md: Adjust.
19955 * config/rs6000/power9.md: Adjust.
19956 * config/rs6000/rs64.md: Adjust.
19957 * config/rs6000/titan.md: Adjust.
19959 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19961 * config/i386/predicates.md (indirect_branch_operand): Rewrite
19962 ix86_indirect_branch_register logic.
19964 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19966 * config/i386/constraints.md (Bs): Update
19967 ix86_indirect_branch_register check. Don't check
19968 ix86_indirect_branch_register with GOT_memory_operand.
19970 * config/i386/predicates.md (GOT_memory_operand): Don't check
19971 ix86_indirect_branch_register here.
19972 (GOT32_symbol_operand): Likewise.
19974 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19976 * config/i386/predicates.md (constant_call_address_operand):
19977 Rewrite ix86_indirect_branch_register logic.
19978 (sibcall_insn_operand): Likewise.
19980 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19982 * config/i386/constraints.md (Bs): Replace
19983 ix86_indirect_branch_thunk_register with
19984 ix86_indirect_branch_register.
19986 * config/i386/i386.md (indirect_jump): Likewise.
19987 (tablejump): Likewise.
19988 (*sibcall_memory): Likewise.
19989 (*sibcall_value_memory): Likewise.
19990 Peepholes of indirect call and jump via memory: Likewise.
19991 * config/i386/i386.opt: Likewise.
19992 * config/i386/predicates.md (indirect_branch_operand): Likewise.
19993 (GOT_memory_operand): Likewise.
19994 (call_insn_operand): Likewise.
19995 (sibcall_insn_operand): Likewise.
19996 (GOT32_symbol_operand): Likewise.
19998 2018-01-15 Jakub Jelinek <jakub@redhat.com>
20000 PR middle-end/83837
20001 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
20002 type rather than type addr's type points to.
20003 (expand_omp_atomic_mutex): Likewise.
20004 (expand_omp_atomic): Likewise.
20006 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20009 * config/i386/i386.c (output_indirect_thunk_function): Use
20010 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
20011 for __x86_return_thunk.
20013 2018-01-15 Richard Biener <rguenther@suse.de>
20015 PR middle-end/83850
20016 * expmed.c (extract_bit_field_1): Fix typo.
20018 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20021 * config/arm/iterators.md (VF): New mode iterator.
20022 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
20023 Remove integer-related logic from pattern.
20024 (neon_vabd<mode>_3): Likewise.
20026 2018-01-15 Jakub Jelinek <jakub@redhat.com>
20028 PR middle-end/82694
20029 * common.opt (fstrict-overflow): No longer an alias.
20030 (fwrapv-pointer): New option.
20031 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
20032 also for pointer types based on flag_wrapv_pointer.
20033 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
20034 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
20035 opts->x_flag_wrapv got set.
20036 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
20037 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
20038 POINTER_TYPE_OVERFLOW_UNDEFINED.
20039 * match.pd: Likewise in address comparison pattern.
20040 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
20042 2018-01-15 Richard Biener <rguenther@suse.de>
20045 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
20046 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
20047 Reset type names to their identifier if their TYPE_DECL doesn't
20048 have linkage (and thus is used for ODR and devirt).
20049 (save_debug_info_for_decl): Remove.
20050 (save_debug_info_for_type): Likewise.
20051 (add_tree_to_fld_list): Adjust.
20052 * tree-pretty-print.c (dump_generic_node): Make dumping of
20053 type names more robust.
20055 2018-01-15 Richard Biener <rguenther@suse.de>
20057 * BASE-VER: Bump to 8.0.1.
20059 2018-01-14 Martin Sebor <msebor@redhat.com>
20062 * builtins.c (check_access): Avoid warning when the no-warning bit
20065 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
20067 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
20068 * ira-color (allocno_hard_regs_compare): Likewise.
20070 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
20073 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
20074 Use .pushsection/.popsection.
20076 2018-01-14 Martin Sebor <msebor@redhat.com>
20079 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
20081 2018-01-14 Jakub Jelinek <jakub@redhat.com>
20083 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
20084 entry from extra_headers.
20085 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
20086 extra_headers, make the list bitwise identical to the i?86-*-* one.
20088 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20090 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
20091 -mcmodel=large with -mindirect-branch=thunk,
20092 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
20093 -mfunction-return=thunk-extern.
20094 * doc/invoke.texi: Document -mcmodel=large is incompatible with
20095 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
20096 -mfunction-return=thunk and -mfunction-return=thunk-extern.
20098 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20100 * config/i386/i386.c (print_reg): Print the name of the full
20101 integer register without '%'.
20102 (ix86_print_operand): Handle 'V'.
20103 * doc/extend.texi: Document 'V' modifier.
20105 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20107 * config/i386/constraints.md (Bs): Disallow memory operand for
20108 -mindirect-branch-register.
20110 * config/i386/predicates.md (indirect_branch_operand): Likewise.
20111 (GOT_memory_operand): Likewise.
20112 (call_insn_operand): Likewise.
20113 (sibcall_insn_operand): Likewise.
20114 (GOT32_symbol_operand): Likewise.
20115 * config/i386/i386.md (indirect_jump): Call convert_memory_address
20116 for -mindirect-branch-register.
20117 (tablejump): Likewise.
20118 (*sibcall_memory): Likewise.
20119 (*sibcall_value_memory): Likewise.
20120 Disallow peepholes of indirect call and jump via memory for
20121 -mindirect-branch-register.
20122 (*call_pop): Replace m with Bw.
20123 (*call_value_pop): Likewise.
20124 (*sibcall_pop_memory): Replace m with Bs.
20125 * config/i386/i386.opt (mindirect-branch-register): New option.
20126 * doc/invoke.texi: Document -mindirect-branch-register option.
20128 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20130 * config/i386/i386-protos.h (ix86_output_function_return): New.
20131 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
20132 set function_return_type.
20133 (indirect_thunk_name): Add ret_p to indicate thunk for function
20135 (output_indirect_thunk_function): Pass false to
20136 indirect_thunk_name.
20137 (ix86_output_indirect_branch_via_reg): Likewise.
20138 (ix86_output_indirect_branch_via_push): Likewise.
20139 (output_indirect_thunk_function): Create alias for function
20140 return thunk if regno < 0.
20141 (ix86_output_function_return): New function.
20142 (ix86_handle_fndecl_attribute): Handle function_return.
20143 (ix86_attribute_table): Add function_return.
20144 * config/i386/i386.h (machine_function): Add
20145 function_return_type.
20146 * config/i386/i386.md (simple_return_internal): Use
20147 ix86_output_function_return.
20148 (simple_return_internal_long): Likewise.
20149 * config/i386/i386.opt (mfunction-return=): New option.
20150 (indirect_branch): Mention -mfunction-return=.
20151 * doc/extend.texi: Document function_return function attribute.
20152 * doc/invoke.texi: Document -mfunction-return= option.
20154 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20156 * config/i386/i386-opts.h (indirect_branch): New.
20157 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
20158 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
20159 with local indirect jump when converting indirect call and jump.
20160 (ix86_set_indirect_branch_type): New.
20161 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
20162 (indirectlabelno): New.
20163 (indirect_thunk_needed): Likewise.
20164 (indirect_thunk_bnd_needed): Likewise.
20165 (indirect_thunks_used): Likewise.
20166 (indirect_thunks_bnd_used): Likewise.
20167 (INDIRECT_LABEL): Likewise.
20168 (indirect_thunk_name): Likewise.
20169 (output_indirect_thunk): Likewise.
20170 (output_indirect_thunk_function): Likewise.
20171 (ix86_output_indirect_branch_via_reg): Likewise.
20172 (ix86_output_indirect_branch_via_push): Likewise.
20173 (ix86_output_indirect_branch): Likewise.
20174 (ix86_output_indirect_jmp): Likewise.
20175 (ix86_code_end): Call output_indirect_thunk_function if needed.
20176 (ix86_output_call_insn): Call ix86_output_indirect_branch if
20178 (ix86_handle_fndecl_attribute): Handle indirect_branch.
20179 (ix86_attribute_table): Add indirect_branch.
20180 * config/i386/i386.h (machine_function): Add indirect_branch_type
20181 and has_local_indirect_jump.
20182 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
20184 (tablejump): Likewise.
20185 (*indirect_jump): Use ix86_output_indirect_jmp.
20186 (*tablejump_1): Likewise.
20187 (simple_return_indirect_internal): Likewise.
20188 * config/i386/i386.opt (mindirect-branch=): New option.
20189 (indirect_branch): New.
20192 (thunk-inline): Likewise.
20193 (thunk-extern): Likewise.
20194 * doc/extend.texi: Document indirect_branch function attribute.
20195 * doc/invoke.texi: Document -mindirect-branch= option.
20197 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
20200 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
20202 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
20204 * ipa-inline.c (want_inline_small_function_p): Return false if
20205 inlining has already failed with CIF_FINAL_ERROR.
20206 (update_caller_keys): Call want_inline_small_function_p before
20208 (update_callee_keys): Likewise.
20210 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
20212 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
20214 (rs6000_quadword_masked_address_p): Likewise.
20215 (quad_aligned_load_p): Likewise.
20216 (quad_aligned_store_p): Likewise.
20217 (const_load_sequence_p): Add comment to describe the outer-most loop.
20218 (mimic_memory_attributes_and_flags): New function.
20219 (rs6000_gen_stvx): Likewise.
20220 (replace_swapped_aligned_store): Likewise.
20221 (rs6000_gen_lvx): Likewise.
20222 (replace_swapped_aligned_load): Likewise.
20223 (replace_swapped_load_constant): Capitalize argument name in
20224 comment describing this function.
20225 (rs6000_analyze_swaps): Add a third pass to search for vector loads
20226 and stores that access quad-word aligned addresses and replace
20227 with stvx or lvx instructions when appropriate.
20228 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
20229 New function prototype.
20230 (rs6000_quadword_masked_address_p): Likewise.
20231 (rs6000_gen_lvx): Likewise.
20232 (rs6000_gen_stvx): Likewise.
20233 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
20234 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
20235 when memory address is aligned.
20236 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
20237 this split to select lvx instruction when memory address is aligned.
20238 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
20239 instruction when memory address is aligned.
20240 (*vsx_le_perm_load_v16qi): Likewise.
20241 (four unnamed splitters): Modify to select the stvx instruction
20242 when memory is aligned.
20244 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
20246 * predict.c (determine_unlikely_bbs): Handle correctly BBs
20247 which appears in the queue multiple times.
20249 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20250 Alan Hayward <alan.hayward@arm.com>
20251 David Sherwood <david.sherwood@arm.com>
20253 * tree-vectorizer.h (vec_lower_bound): New structure.
20254 (_loop_vec_info): Add check_nonzero and lower_bounds.
20255 (LOOP_VINFO_CHECK_NONZERO): New macro.
20256 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
20257 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
20258 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
20259 fields. Make seg_len the distance travelled, not including the
20261 (dr_direction_indicator): Declare.
20262 (dr_zero_step_indicator): Likewise.
20263 (dr_known_forward_stride_p): Likewise.
20264 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
20266 (runtime_alias_check_p): Allow runtime alias checks with
20268 (operator ==): Compare access_size and align.
20269 (prune_runtime_alias_test_list): Rework for new distinction between
20270 the access_size and seg_len.
20271 (create_intersect_range_checks_index): Likewise. Cope with polynomial
20273 (get_segment_min_max): New function.
20274 (create_intersect_range_checks): Use it.
20275 (dr_step_indicator): New function.
20276 (dr_direction_indicator): Likewise.
20277 (dr_zero_step_indicator): Likewise.
20278 (dr_known_forward_stride_p): Likewise.
20279 * tree-loop-distribution.c (data_ref_segment_size): Return
20280 DR_STEP * (niters - 1).
20281 (compute_alias_check_pairs): Update call to the dr_with_seg_len
20283 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
20284 (vect_preserves_scalar_order_p): New function, split out from...
20285 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
20286 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
20287 (vect_vfa_access_size): New function.
20288 (vect_vfa_align): Likewise.
20289 (vect_compile_time_alias): Take access_size_a and access_b arguments.
20290 (dump_lower_bound): New function.
20291 (vect_check_lower_bound): Likewise.
20292 (vect_small_gap_p): Likewise.
20293 (vectorizable_with_step_bound_p): Likewise.
20294 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
20295 depencies if the vectorization factor is 1. Convert the checks
20296 for nonzero steps into checks on the bounds of DR_STEP. Try using
20297 a bunds check for variable steps if the minimum required step is
20298 relatively small. Update calls to the dr_with_seg_len
20299 constructor and to vect_compile_time_alias.
20300 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
20302 (vect_loop_versioning): Call it.
20303 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
20305 (vect_estimate_min_profitable_iters): Account for any bounds checks.
20307 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20308 Alan Hayward <alan.hayward@arm.com>
20309 David Sherwood <david.sherwood@arm.com>
20311 * doc/sourcebuild.texi (vect_scatter_store): Document.
20312 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
20314 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
20316 * genopinit.c (main): Add supports_vec_scatter_store and
20317 supports_vec_scatter_store_cached to target_optabs.
20318 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
20319 IFN_MASK_SCATTER_STORE.
20320 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
20322 * internal-fn.h (internal_store_fn_p): Declare.
20323 (internal_fn_stored_value_index): Likewise.
20324 * internal-fn.c (scatter_store_direct): New macro.
20325 (expand_scatter_store_optab_fn): New function.
20326 (direct_scatter_store_optab_supported_p): New macro.
20327 (internal_store_fn_p): New function.
20328 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
20329 IFN_MASK_SCATTER_STORE.
20330 (internal_fn_mask_index): Likewise.
20331 (internal_fn_stored_value_index): New function.
20332 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
20333 for scatter stores.
20334 * optabs-query.h (supports_vec_scatter_store_p): Declare.
20335 * optabs-query.c (supports_vec_scatter_store_p): New function.
20336 * tree-vectorizer.h (vect_get_store_rhs): Declare.
20337 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
20338 true for scatter stores.
20339 (vect_gather_scatter_fn_p): Handle scatter stores too.
20340 (vect_check_gather_scatter): Consider using scatter stores if
20341 supports_vec_scatter_store_p.
20342 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
20343 scatter stores too.
20344 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
20345 internal_fn_stored_value_index.
20346 (check_load_store_masking): Handle scatter stores too.
20347 (vect_get_store_rhs): Make public.
20348 (vectorizable_call): Use internal_store_fn_p.
20349 (vectorizable_store): Handle scatter store internal functions.
20350 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
20351 when deciding whether the end of the group has been reached.
20352 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
20353 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
20354 (mask_scatter_store<mode>): New insns.
20356 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20357 Alan Hayward <alan.hayward@arm.com>
20358 David Sherwood <david.sherwood@arm.com>
20360 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
20361 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
20362 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
20364 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
20365 Use vect_truncate_gather_scatter_offset if we can't treat the
20366 operation as a normal gather load or scatter store.
20367 (get_group_load_store_type): Take the gather_scatter_info
20368 as argument. Try using a gather load or scatter store for
20369 single-element groups.
20370 (get_load_store_type): Update calls to get_group_load_store_type
20371 and vect_use_strided_gather_scatters_p.
20373 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20374 Alan Hayward <alan.hayward@arm.com>
20375 David Sherwood <david.sherwood@arm.com>
20377 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
20378 optional tree argument.
20379 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
20381 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
20382 but continue to use the current value as a fallback.
20383 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
20384 to compare the updates.
20385 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
20386 (get_load_store_type): Use it when handling a strided access.
20387 (vect_get_strided_load_store_ops): New function.
20388 (vect_get_data_ptr_increment): Likewise.
20389 (vectorizable_load): Handle strided gather loads. Always pass
20390 a step to vect_create_data_ref_ptr and bump_vector_ptr.
20392 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20393 Alan Hayward <alan.hayward@arm.com>
20394 David Sherwood <david.sherwood@arm.com>
20396 * doc/md.texi (gather_load@var{m}): Document.
20397 (mask_gather_load@var{m}): Likewise.
20398 * genopinit.c (main): Add supports_vec_gather_load and
20399 supports_vec_gather_load_cached to target_optabs.
20400 * optabs-tree.c (init_tree_optimization_optabs): Use
20401 ggc_cleared_alloc to allocate target_optabs.
20402 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
20403 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
20405 * internal-fn.h (internal_load_fn_p): Declare.
20406 (internal_gather_scatter_fn_p): Likewise.
20407 (internal_fn_mask_index): Likewise.
20408 (internal_gather_scatter_fn_supported_p): Likewise.
20409 * internal-fn.c (gather_load_direct): New macro.
20410 (expand_gather_load_optab_fn): New function.
20411 (direct_gather_load_optab_supported_p): New macro.
20412 (direct_internal_fn_optab): New function.
20413 (internal_load_fn_p): Likewise.
20414 (internal_gather_scatter_fn_p): Likewise.
20415 (internal_fn_mask_index): Likewise.
20416 (internal_gather_scatter_fn_supported_p): Likewise.
20417 * optabs-query.c (supports_at_least_one_mode_p): New function.
20418 (supports_vec_gather_load_p): Likewise.
20419 * optabs-query.h (supports_vec_gather_load_p): Declare.
20420 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
20421 and memory_type field.
20422 (NUM_PATTERNS): Bump to 15.
20423 * tree-vect-data-refs.c: Include internal-fn.h.
20424 (vect_gather_scatter_fn_p): New function.
20425 (vect_describe_gather_scatter_call): Likewise.
20426 (vect_check_gather_scatter): Try using internal functions for
20427 gather loads. Recognize existing calls to a gather load function.
20428 (vect_analyze_data_refs): Consider using gather loads if
20429 supports_vec_gather_load_p.
20430 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
20431 (vect_get_gather_scatter_offset_type): Likewise.
20432 (vect_convert_mask_for_vectype): Likewise.
20433 (vect_add_conversion_to_patterm): Likewise.
20434 (vect_try_gather_scatter_pattern): Likewise.
20435 (vect_recog_gather_scatter_pattern): New pattern recognizer.
20436 (vect_vect_recog_func_ptrs): Add it.
20437 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
20438 internal_fn_mask_index and internal_gather_scatter_fn_p.
20439 (check_load_store_masking): Take the gather_scatter_info as an
20440 argument and handle gather loads.
20441 (vect_get_gather_scatter_ops): New function.
20442 (vectorizable_call): Check internal_load_fn_p.
20443 (vectorizable_load): Likewise. Handle gather load internal
20445 (vectorizable_store): Update call to check_load_store_masking.
20446 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
20447 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
20448 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
20449 (aarch64_gather_scale_operand_d): New predicates.
20450 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
20451 (mask_gather_load<mode>): New insns.
20453 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20454 Alan Hayward <alan.hayward@arm.com>
20455 David Sherwood <david.sherwood@arm.com>
20457 * optabs.def (fold_left_plus_optab): New optab.
20458 * doc/md.texi (fold_left_plus_@var{m}): Document.
20459 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
20460 * internal-fn.c (fold_left_direct): Define.
20461 (expand_fold_left_optab_fn): Likewise.
20462 (direct_fold_left_optab_supported_p): Likewise.
20463 * fold-const-call.c (fold_const_fold_left): New function.
20464 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
20465 * tree-parloops.c (valid_reduction_p): New function.
20466 (gather_scalar_reductions): Use it.
20467 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
20468 (vect_finish_replace_stmt): Declare.
20469 * tree-vect-loop.c (fold_left_reduction_fn): New function.
20470 (needs_fold_left_reduction_p): New function, split out from...
20471 (vect_is_simple_reduction): ...here. Accept reductions that
20472 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
20473 (vect_force_simple_reduction): Also store the reduction type in
20474 the assignment's STMT_VINFO_REDUC_TYPE.
20475 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
20476 (merge_with_identity): New function.
20477 (vect_expand_fold_left): Likewise.
20478 (vectorize_fold_left_reduction): Likewise.
20479 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
20480 scalar phi in place for it. Check for target support and reject
20481 cases that would reassociate the operation. Defer the transform
20482 phase to vectorize_fold_left_reduction.
20483 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
20484 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
20485 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
20487 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20489 * tree-if-conv.c (predicate_mem_writes): Remove redundant
20490 call to ifc_temp_var.
20492 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20493 Alan Hayward <alan.hayward@arm.com>
20494 David Sherwood <david.sherwood@arm.com>
20496 * target.def (legitimize_address_displacement): Take the original
20497 offset as a poly_int.
20498 * targhooks.h (default_legitimize_address_displacement): Update
20500 * targhooks.c (default_legitimize_address_displacement): Likewise.
20501 * doc/tm.texi: Regenerate.
20502 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
20503 as an argument, moving assert of ad->disp == ad->disp_term to...
20504 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
20505 Try calling targetm.legitimize_address_displacement before expanding
20506 the address rather than afterwards, and adjust for the new interface.
20507 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
20508 Match the new hook interface. Handle SVE addresses.
20509 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
20510 new hook interface.
20512 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20514 * Makefile.in (OBJS): Add early-remat.o.
20515 * target.def (select_early_remat_modes): New hook.
20516 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
20517 * doc/tm.texi: Regenerate.
20518 * targhooks.h (default_select_early_remat_modes): Declare.
20519 * targhooks.c (default_select_early_remat_modes): New function.
20520 * timevar.def (TV_EARLY_REMAT): New timevar.
20521 * passes.def (pass_early_remat): New pass.
20522 * tree-pass.h (make_pass_early_remat): Declare.
20523 * early-remat.c: New file.
20524 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
20526 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
20528 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20529 Alan Hayward <alan.hayward@arm.com>
20530 David Sherwood <david.sherwood@arm.com>
20532 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
20533 vfm1 with a bound_epilog parameter.
20534 (vect_do_peeling): Update calls accordingly, and move the prologue
20535 call earlier in the function. Treat the base bound_epilog as 0 for
20536 fully-masked loops and retain vf - 1 for other loops. Add 1 to
20537 this base when peeling for gaps.
20538 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
20539 with fully-masked loops.
20540 (vect_estimate_min_profitable_iters): Handle the single peeled
20541 iteration in that case.
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 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
20548 single-element interleaving even if the size is not a power of 2.
20549 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
20550 accesses for single-element interleaving if the group size is
20553 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20554 Alan Hayward <alan.hayward@arm.com>
20555 David Sherwood <david.sherwood@arm.com>
20557 * doc/md.texi (fold_extract_last_@var{m}): Document.
20558 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
20559 * optabs.def (fold_extract_last_optab): New optab.
20560 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
20561 * internal-fn.c (fold_extract_direct): New macro.
20562 (expand_fold_extract_optab_fn): Likewise.
20563 (direct_fold_extract_optab_supported_p): Likewise.
20564 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
20565 * tree-vect-loop.c (vect_model_reduction_cost): Handle
20566 EXTRACT_LAST_REDUCTION.
20567 (get_initial_def_for_reduction): Do not create an initial vector
20568 for EXTRACT_LAST_REDUCTION reductions.
20569 (vectorizable_reduction): Leave the scalar phi in place for
20570 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
20571 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
20572 epilogue code for EXTRACT_LAST_REDUCTION and defer the
20573 transform phase to vectorizable_condition.
20574 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
20576 (vect_finish_stmt_generation): ...here.
20577 (vect_finish_replace_stmt): New function.
20578 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
20579 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
20581 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
20583 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20584 Alan Hayward <alan.hayward@arm.com>
20585 David Sherwood <david.sherwood@arm.com>
20587 * doc/md.texi (extract_last_@var{m}): Document.
20588 * optabs.def (extract_last_optab): New optab.
20589 * internal-fn.def (EXTRACT_LAST): New internal function.
20590 * internal-fn.c (cond_unary_direct): New macro.
20591 (expand_cond_unary_optab_fn): Likewise.
20592 (direct_cond_unary_optab_supported_p): Likewise.
20593 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
20594 loops using EXTRACT_LAST.
20595 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
20596 (extract_last_<mode>): ...this optab.
20597 (vec_extract<mode><Vel>): Update accordingly.
20599 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20600 Alan Hayward <alan.hayward@arm.com>
20601 David Sherwood <david.sherwood@arm.com>
20603 * target.def (empty_mask_is_expensive): New hook.
20604 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
20605 * doc/tm.texi: Regenerate.
20606 * targhooks.h (default_empty_mask_is_expensive): Declare.
20607 * targhooks.c (default_empty_mask_is_expensive): New function.
20608 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
20609 if the target says that empty masks are expensive.
20610 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
20612 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
20614 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20615 Alan Hayward <alan.hayward@arm.com>
20616 David Sherwood <david.sherwood@arm.com>
20618 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
20619 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
20620 (vect_use_loop_mask_for_alignment_p): New function.
20621 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
20622 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
20623 niters_skip argument. Make sure that the first niters_skip elements
20624 of the first iteration are inactive.
20625 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
20626 Update call to vect_set_loop_masks_directly.
20627 (get_misalign_in_elems): New function, split out from...
20628 (vect_gen_prolog_loop_niters): ...here.
20629 (vect_update_init_of_dr): Take a code argument that specifies whether
20630 the adjustment should be added or subtracted.
20631 (vect_update_init_of_drs): Likewise.
20632 (vect_prepare_for_masked_peels): New function.
20633 (vect_do_peeling): Skip prologue peeling if we're using a mask
20634 instead. Update call to vect_update_inits_of_drs.
20635 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
20637 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
20638 alignment. Do not include the number of peeled iterations in
20639 the minimum threshold in that case.
20640 (vectorizable_induction): Adjust the start value down by
20641 LOOP_VINFO_MASK_SKIP_NITERS iterations.
20642 (vect_transform_loop): Call vect_prepare_for_masked_peels.
20643 Take the number of skipped iterations into account when calculating
20645 * tree-vect-stmts.c (vect_gen_while_not): New function.
20647 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20648 Alan Hayward <alan.hayward@arm.com>
20649 David Sherwood <david.sherwood@arm.com>
20651 * doc/sourcebuild.texi (vect_fully_masked): Document.
20652 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
20653 default value to 0.
20654 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
20656 (vect_analyze_loop_2): ...here. Don't check the vectorization
20657 factor against the number of loop iterations if the loop is
20660 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20661 Alan Hayward <alan.hayward@arm.com>
20662 David Sherwood <david.sherwood@arm.com>
20664 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
20665 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
20666 (dump_groups): Update accordingly.
20667 (iv_use::mem_type): New member variable.
20668 (address_p): New function.
20669 (record_use): Add a mem_type argument and initialize the new
20671 (record_group_use): Add a mem_type argument. Use address_p.
20672 Remove obsolete null checks of base_object. Update call to record_use.
20673 (find_interesting_uses_op): Update call to record_group_use.
20674 (find_interesting_uses_cond): Likewise.
20675 (find_interesting_uses_address): Likewise.
20676 (get_mem_type_for_internal_fn): New function.
20677 (find_address_like_use): Likewise.
20678 (find_interesting_uses_stmt): Try find_address_like_use before
20679 calling find_interesting_uses_op.
20680 (addr_offset_valid_p): Use the iv mem_type field as the type
20681 of the addressed memory.
20682 (add_autoinc_candidates): Likewise.
20683 (get_address_cost): Likewise.
20684 (split_small_address_groups_p): Use address_p.
20685 (split_address_groups): Likewise.
20686 (add_iv_candidate_for_use): Likewise.
20687 (autoinc_possible_for_pair): Likewise.
20688 (rewrite_groups): Likewise.
20689 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
20690 (determine_group_iv_cost): Update after split of USE_ADDRESS.
20691 (get_alias_ptr_type_for_ptr_address): New function.
20692 (rewrite_use_address): Rewrite address uses in calls that were
20693 identified by find_address_like_use.
20695 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20696 Alan Hayward <alan.hayward@arm.com>
20697 David Sherwood <david.sherwood@arm.com>
20699 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
20701 * gimple-expr.h (is_gimple_addressable: Likewise.
20702 * gimple-expr.c (is_gimple_address): Likewise.
20703 * internal-fn.c (expand_call_mem_ref): New function.
20704 (expand_mask_load_optab_fn): Use it.
20705 (expand_mask_store_optab_fn): Likewise.
20707 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20708 Alan Hayward <alan.hayward@arm.com>
20709 David Sherwood <david.sherwood@arm.com>
20711 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
20712 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
20713 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
20714 (cond_umax@var{mode}): Document.
20715 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
20716 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
20717 (cond_umin_optab, cond_umax_optab): New optabs.
20718 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
20719 (COND_IOR, COND_XOR): New internal functions.
20720 * internal-fn.h (get_conditional_internal_fn): Declare.
20721 * internal-fn.c (cond_binary_direct): New macro.
20722 (expand_cond_binary_optab_fn): Likewise.
20723 (direct_cond_binary_optab_supported_p): Likewise.
20724 (get_conditional_internal_fn): New function.
20725 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
20726 Cope with reduction statements that are vectorized as calls rather
20728 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
20729 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
20730 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
20731 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
20732 (UNSPEC_COND_EOR): New unspecs.
20733 (optab): Add mappings for them.
20734 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
20735 (sve_int_op, sve_fp_op): New int attributes.
20737 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20738 Alan Hayward <alan.hayward@arm.com>
20739 David Sherwood <david.sherwood@arm.com>
20741 * optabs.def (while_ult_optab): New optab.
20742 * doc/md.texi (while_ult@var{m}@var{n}): Document.
20743 * internal-fn.def (WHILE_ULT): New internal function.
20744 * internal-fn.h (direct_internal_fn_supported_p): New override
20745 that takes two types as argument.
20746 * internal-fn.c (while_direct): New macro.
20747 (expand_while_optab_fn): New function.
20748 (convert_optab_supported_p): Likewise.
20749 (direct_while_optab_supported_p): New macro.
20750 * wide-int.h (wi::udiv_ceil): New function.
20751 * tree-vectorizer.h (rgroup_masks): New structure.
20752 (vec_loop_masks): New typedef.
20753 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
20754 and fully_masked_p.
20755 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
20756 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
20757 (vect_max_vf): New function.
20758 (slpeel_make_loop_iterate_ntimes): Delete.
20759 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
20760 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
20761 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
20762 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
20763 internal-fn.h, stor-layout.h and optabs-query.h.
20764 (vect_set_loop_mask): New function.
20765 (add_preheader_seq): Likewise.
20766 (add_header_seq): Likewise.
20767 (interleave_supported_p): Likewise.
20768 (vect_maybe_permute_loop_masks): Likewise.
20769 (vect_set_loop_masks_directly): Likewise.
20770 (vect_set_loop_condition_masked): Likewise.
20771 (vect_set_loop_condition_unmasked): New function, split out from
20772 slpeel_make_loop_iterate_ntimes.
20773 (slpeel_make_loop_iterate_ntimes): Rename to..
20774 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
20775 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
20776 (vect_do_peeling): Update call accordingly.
20777 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
20779 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
20780 mask_compare_type, can_fully_mask_p and fully_masked_p.
20781 (release_vec_loop_masks): New function.
20782 (_loop_vec_info): Use it to free the loop masks.
20783 (can_produce_all_loop_masks_p): New function.
20784 (vect_get_max_nscalars_per_iter): Likewise.
20785 (vect_verify_full_masking): Likewise.
20786 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
20787 retries, and free the mask rgroups before retrying. Check loop-wide
20788 reasons for disallowing fully-masked loops. Make the final decision
20789 about whether use a fully-masked loop or not.
20790 (vect_estimate_min_profitable_iters): Do not assume that peeling
20791 for the number of iterations will be needed for fully-masked loops.
20792 (vectorizable_reduction): Disable fully-masked loops.
20793 (vectorizable_live_operation): Likewise.
20794 (vect_halve_mask_nunits): New function.
20795 (vect_double_mask_nunits): Likewise.
20796 (vect_record_loop_mask): Likewise.
20797 (vect_get_loop_mask): Likewise.
20798 (vect_transform_loop): Handle the case in which the final loop
20799 iteration might handle a partial vector. Call vect_set_loop_condition
20800 instead of slpeel_make_loop_iterate_ntimes.
20801 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
20802 (check_load_store_masking): New function.
20803 (prepare_load_store_mask): Likewise.
20804 (vectorizable_store): Handle fully-masked loops.
20805 (vectorizable_load): Likewise.
20806 (supportable_widening_operation): Use vect_halve_mask_nunits for
20808 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
20809 (vect_gen_while): New function.
20810 * config/aarch64/aarch64.md (umax<mode>3): New expander.
20811 (aarch64_uqdec<mode>): New insn.
20813 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20814 Alan Hayward <alan.hayward@arm.com>
20815 David Sherwood <david.sherwood@arm.com>
20817 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
20818 (reduc_xor_scal_optab): New optabs.
20819 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
20820 (reduc_xor_scal_@var{m}): Document.
20821 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
20822 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
20823 internal functions.
20824 * fold-const-call.c (fold_const_call): Handle them.
20825 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
20826 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
20827 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
20828 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
20829 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
20830 (UNSPEC_XORV): New unspecs.
20831 (optab): Add entries for them.
20832 (BITWISEV): New int iterator.
20833 (bit_reduc_op): New int attributes.
20835 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20836 Alan Hayward <alan.hayward@arm.com>
20837 David Sherwood <david.sherwood@arm.com>
20839 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
20840 * internal-fn.def (VEC_SHL_INSERT): New internal function.
20841 * optabs.def (vec_shl_insert_optab): New optab.
20842 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
20843 (duplicate_and_interleave): Likewise.
20844 * tree-vect-loop.c: Include internal-fn.h.
20845 (neutral_op_for_slp_reduction): New function, split out from
20846 get_initial_defs_for_reduction.
20847 (get_initial_def_for_reduction): Handle option 2 for variable-length
20848 vectors by loading the neutral value into a vector and then shifting
20849 the initial value into element 0.
20850 (get_initial_defs_for_reduction): Replace the code argument with
20851 the neutral value calculated by neutral_op_for_slp_reduction.
20852 Use gimple_build_vector for constant-length vectors.
20853 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
20854 but the first group_size elements have a neutral value.
20855 Use duplicate_and_interleave otherwise.
20856 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
20857 Update call to get_initial_defs_for_reduction. Handle SLP
20858 reductions for variable-length vectors by creating one vector
20859 result for each scalar result, with the elements associated
20860 with other scalar results stubbed out with the neutral value.
20861 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
20862 Require IFN_VEC_SHL_INSERT for double reductions on
20863 variable-length vectors, or SLP reductions that have
20864 a neutral value. Require can_duplicate_and_interleave_p
20865 support for variable-length unchained SLP reductions if there
20866 is no neutral value, such as for MIN/MAX reductions. Also require
20867 the number of vector elements to be a multiple of the number of
20868 SLP statements when doing variable-length unchained SLP reductions.
20869 Update call to vect_create_epilog_for_reduction.
20870 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
20871 and remove initial values.
20872 (duplicate_and_interleave): Make public.
20873 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
20874 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
20876 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20877 Alan Hayward <alan.hayward@arm.com>
20878 David Sherwood <david.sherwood@arm.com>
20880 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
20881 (can_duplicate_and_interleave_p): New function.
20882 (vect_get_and_check_slp_defs): Take the vector of statements
20883 rather than just the current one. Remove excess parentheses.
20884 Restriction rejectinon of vect_constant_def and vect_external_def
20885 for variable-length vectors to boolean types, or types for which
20886 can_duplicate_and_interleave_p is false.
20887 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
20888 (duplicate_and_interleave): New function.
20889 (vect_get_constant_vectors): Use gimple_build_vector for
20890 constant-length vectors and suitable variable-length constant
20891 vectors. Use duplicate_and_interleave for other variable-length
20892 vectors. Don't defer the update when inserting new statements.
20894 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20895 Alan Hayward <alan.hayward@arm.com>
20896 David Sherwood <david.sherwood@arm.com>
20898 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
20899 min_profitable_iters doesn't go negative.
20901 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20902 Alan Hayward <alan.hayward@arm.com>
20903 David Sherwood <david.sherwood@arm.com>
20905 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
20906 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
20907 * optabs.def (vec_mask_load_lanes_optab): New optab.
20908 (vec_mask_store_lanes_optab): Likewise.
20909 * internal-fn.def (MASK_LOAD_LANES): New internal function.
20910 (MASK_STORE_LANES): Likewise.
20911 * internal-fn.c (mask_load_lanes_direct): New macro.
20912 (mask_store_lanes_direct): Likewise.
20913 (expand_mask_load_optab_fn): Handle masked operations.
20914 (expand_mask_load_lanes_optab_fn): New macro.
20915 (expand_mask_store_optab_fn): Handle masked operations.
20916 (expand_mask_store_lanes_optab_fn): New macro.
20917 (direct_mask_load_lanes_optab_supported_p): Likewise.
20918 (direct_mask_store_lanes_optab_supported_p): Likewise.
20919 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
20921 (vect_load_lanes_supported): Likewise.
20922 * tree-vect-data-refs.c (strip_conversion): New function.
20923 (can_group_stmts_p): Likewise.
20924 (vect_analyze_data_ref_accesses): Use it instead of checking
20925 for a pair of assignments.
20926 (vect_store_lanes_supported): Take a masked_p parameter.
20927 (vect_load_lanes_supported): Likewise.
20928 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
20929 vect_store_lanes_supported and vect_load_lanes_supported.
20930 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
20931 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
20932 parameter. Don't allow gaps for masked accesses.
20933 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
20934 and vect_load_lanes_supported.
20935 (get_load_store_type): Take a masked_p parameter and update
20936 call to get_group_load_store_type.
20937 (vectorizable_store): Update call to get_load_store_type.
20938 Handle IFN_MASK_STORE_LANES.
20939 (vectorizable_load): Update call to get_load_store_type.
20940 Handle IFN_MASK_LOAD_LANES.
20942 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20943 Alan Hayward <alan.hayward@arm.com>
20944 David Sherwood <david.sherwood@arm.com>
20946 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
20948 * config/aarch64/aarch64-protos.h
20949 (aarch64_sve_struct_memory_operand_p): Declare.
20950 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
20951 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
20952 (VPRED, vpred): Handle SVE structure modes.
20953 * config/aarch64/constraints.md (Utx): New constraint.
20954 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
20955 (aarch64_sve_struct_nonimmediate_operand): New predicates.
20956 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
20957 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
20958 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
20959 structure modes. Split into pieces after RA.
20960 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
20961 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
20963 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
20964 SVE structure modes.
20965 (aarch64_classify_address): Likewise.
20966 (sizetochar): Move earlier in file.
20967 (aarch64_print_operand): Handle SVE register lists.
20968 (aarch64_array_mode): New function.
20969 (aarch64_sve_struct_memory_operand_p): Likewise.
20970 (TARGET_ARRAY_MODE): Redefine.
20972 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20973 Alan Hayward <alan.hayward@arm.com>
20974 David Sherwood <david.sherwood@arm.com>
20976 * target.def (array_mode): New target hook.
20977 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
20978 * doc/tm.texi: Regenerate.
20979 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
20980 * hooks.c (hook_optmode_mode_uhwi_none): New function.
20981 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
20982 targetm.array_mode.
20983 * stor-layout.c (mode_for_array): Likewise. Support polynomial
20986 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20987 Alan Hayward <alan.hayward@arm.com>
20988 David Sherwood <david.sherwood@arm.com>
20990 * fold-const.c (fold_binary_loc): Check the argument types
20991 rather than the result type when testing for a vector operation.
20993 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20995 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
20996 * doc/tm.texi: Regenerate.
20998 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20999 Alan Hayward <alan.hayward@arm.com>
21000 David Sherwood <david.sherwood@arm.com>
21002 * doc/invoke.texi (-msve-vector-bits=): Document new option.
21003 (sve): Document new AArch64 extension.
21004 * doc/md.texi (w): Extend the description of the AArch64
21005 constraint to include SVE vectors.
21006 (Upl, Upa): Document new AArch64 predicate constraints.
21007 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
21009 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
21010 (msve-vector-bits=): New option.
21011 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
21012 SVE when these are disabled.
21013 (sve): New extension.
21014 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
21015 modes. Adjust their number of units based on aarch64_sve_vg.
21016 (MAX_BITSIZE_MODE_ANY_MODE): Define.
21017 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
21018 aarch64_addr_query_type.
21019 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
21020 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
21021 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
21022 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
21023 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
21024 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
21025 (aarch64_simd_imm_zero_p): Delete.
21026 (aarch64_check_zero_based_sve_index_immediate): Declare.
21027 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
21028 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
21029 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
21030 (aarch64_sve_float_mul_immediate_p): Likewise.
21031 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
21032 rather than an rtx.
21033 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
21034 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
21035 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
21036 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
21037 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
21038 (aarch64_regmode_natural_size): Likewise.
21039 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
21040 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
21042 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
21043 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
21044 for VG and the SVE predicate registers.
21045 (V_ALIASES): Add a "z"-prefixed alias.
21046 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
21047 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
21048 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
21049 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
21050 (REG_CLASS_NAMES): Add entries for them.
21051 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
21052 and the predicate registers.
21053 (aarch64_sve_vg): Declare.
21054 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
21055 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
21056 (REGMODE_NATURAL_SIZE): Define.
21057 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
21059 * config/aarch64/aarch64.c: Include cfgrtl.h.
21060 (simd_immediate_info): Add a constructor for series vectors,
21061 and an associated step field.
21062 (aarch64_sve_vg): New variable.
21063 (aarch64_dbx_register_number): Handle VG and the predicate registers.
21064 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
21065 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
21066 (VEC_ANY_DATA, VEC_STRUCT): New constants.
21067 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
21068 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
21069 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
21070 (aarch64_get_mask_mode): New functions.
21071 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
21072 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
21073 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
21074 predicate modes and predicate registers. Explicitly restrict
21075 GPRs to modes of 16 bytes or smaller. Only allow FP registers
21076 to store a vector mode if it is recognized by
21077 aarch64_classify_vector_mode.
21078 (aarch64_regmode_natural_size): New function.
21079 (aarch64_hard_regno_caller_save_mode): Return the original mode
21081 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
21082 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
21083 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
21084 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
21086 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
21087 does not overlap dest if the function is frame-related. Handle
21089 (aarch64_split_add_offset): New function.
21090 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
21091 them aarch64_add_offset.
21092 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
21093 and update call to aarch64_sub_sp.
21094 (aarch64_add_cfa_expression): New function.
21095 (aarch64_expand_prologue): Pass extra temporary registers to the
21096 functions above. Handle the case in which we need to emit new
21097 DW_CFA_expressions for registers that were originally saved
21098 relative to the stack pointer, but now have to be expressed
21099 relative to the frame pointer.
21100 (aarch64_output_mi_thunk): Pass extra temporary registers to the
21102 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
21103 IP0 and IP1 values for SVE frames.
21104 (aarch64_expand_vec_series): New function.
21105 (aarch64_expand_sve_widened_duplicate): Likewise.
21106 (aarch64_expand_sve_const_vector): Likewise.
21107 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
21108 Handle SVE constants. Use emit_move_insn to move a force_const_mem
21109 into the register, rather than emitting a SET directly.
21110 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
21111 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
21112 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
21113 (offset_9bit_signed_scaled_p): New functions.
21114 (aarch64_replicate_bitmask_imm): New function.
21115 (aarch64_bitmask_imm): Use it.
21116 (aarch64_cannot_force_const_mem): Reject expressions involving
21117 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
21118 (aarch64_classify_index): Handle SVE indices, by requiring
21119 a plain register index with a scale that matches the element size.
21120 (aarch64_classify_address): Handle SVE addresses. Assert that
21121 the mode of the address is VOIDmode or an integer mode.
21122 Update call to aarch64_classify_symbol.
21123 (aarch64_classify_symbolic_expression): Update call to
21124 aarch64_classify_symbol.
21125 (aarch64_const_vec_all_in_range_p): New function.
21126 (aarch64_print_vector_float_operand): Likewise.
21127 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
21128 "vN" for FP registers with SVE modes. Handle (const ...) vectors
21129 and the FP immediates 1.0 and 0.5.
21130 (aarch64_print_address_internal): Handle SVE addresses.
21131 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
21132 (aarch64_regno_regclass): Handle predicate registers.
21133 (aarch64_secondary_reload): Handle big-endian reloads of SVE
21135 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
21136 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
21137 (aarch64_convert_sve_vector_bits): New function.
21138 (aarch64_override_options): Use it to handle -msve-vector-bits=.
21139 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
21140 rather than an rtx.
21141 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
21142 Handle SVE vector and predicate modes. Accept VL-based constants
21143 that need only one temporary register, and VL offsets that require
21144 no temporary registers.
21145 (aarch64_conditional_register_usage): Mark the predicate registers
21146 as fixed if SVE isn't available.
21147 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
21148 Return true for SVE vector and predicate modes.
21149 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
21150 rather than an unsigned int. Handle SVE modes.
21151 (aarch64_preferred_simd_mode): Update call accordingly. Handle
21153 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
21155 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
21156 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
21157 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
21158 (aarch64_sve_float_mul_immediate_p): New functions.
21159 (aarch64_sve_valid_immediate): New function.
21160 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
21161 Explicitly reject structure modes. Check for INDEX constants.
21162 Handle PTRUE and PFALSE constants.
21163 (aarch64_check_zero_based_sve_index_immediate): New function.
21164 (aarch64_simd_imm_zero_p): Delete.
21165 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
21166 vector modes. Accept constants in the range of CNT[BHWD].
21167 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
21168 ask for an Advanced SIMD mode.
21169 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
21170 (aarch64_simd_vector_alignment): Handle SVE predicates.
21171 (aarch64_vectorize_preferred_vector_alignment): New function.
21172 (aarch64_simd_vector_alignment_reachable): Use it instead of
21174 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
21175 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
21177 (MAX_VECT_LEN): Delete.
21178 (expand_vec_perm_d): Add a vec_flags field.
21179 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
21180 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
21181 (aarch64_evpc_ext): Don't apply a big-endian lane correction
21183 (aarch64_evpc_rev): Rename to...
21184 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
21185 (aarch64_evpc_rev_global): New function.
21186 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
21187 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
21189 (aarch64_evpc_sve_tbl): New function.
21190 (aarch64_expand_vec_perm_const_1): Update after rename of
21191 aarch64_evpc_rev. Handle SVE permutes too, trying
21192 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
21193 than aarch64_evpc_tbl.
21194 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
21195 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
21196 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
21197 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
21198 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
21199 (aarch64_expand_sve_vcond): New functions.
21200 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
21201 of aarch64_vector_mode_p.
21202 (aarch64_dwarf_poly_indeterminate_value): New function.
21203 (aarch64_compute_pressure_classes): Likewise.
21204 (aarch64_can_change_mode_class): Likewise.
21205 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
21206 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
21207 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
21208 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
21209 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
21210 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
21211 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
21212 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
21214 (Dn, Dl, Dr): Accept const as well as const_vector.
21215 (Dz): Likewise. Compare against CONST0_RTX.
21216 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
21217 of "vector" where appropriate.
21218 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
21219 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
21220 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
21221 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
21222 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
21223 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
21224 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
21225 (v_int_equiv): Extend to SVE modes.
21226 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
21228 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
21229 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
21230 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
21231 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
21232 (SVE_COND_FP_CMP): New int iterators.
21233 (perm_hilo): Handle the new unpack unspecs.
21234 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
21236 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
21237 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
21238 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
21239 (aarch64_equality_operator, aarch64_constant_vector_operand)
21240 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
21241 (aarch64_sve_nonimmediate_operand): Likewise.
21242 (aarch64_sve_general_operand): Likewise.
21243 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
21244 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
21245 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
21246 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
21247 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
21248 (aarch64_sve_float_arith_immediate): Likewise.
21249 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
21250 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
21251 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
21252 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
21253 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
21254 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
21255 (aarch64_sve_float_arith_operand): Likewise.
21256 (aarch64_sve_float_arith_with_sub_operand): Likewise.
21257 (aarch64_sve_float_mul_operand): Likewise.
21258 (aarch64_sve_vec_perm_operand): Likewise.
21259 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
21260 (aarch64_mov_operand): Accept const_poly_int and const_vector.
21261 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
21262 as well as const_vector.
21263 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
21264 in file. Use CONST0_RTX and CONSTM1_RTX.
21265 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
21266 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
21267 Use aarch64_simd_imm_zero.
21268 * config/aarch64/aarch64-sve.md: New file.
21269 * config/aarch64/aarch64.md: Include it.
21270 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
21271 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
21272 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
21273 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
21274 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
21275 (sve): New attribute.
21276 (enabled): Disable instructions with the sve attribute unless
21278 (movqi, movhi): Pass CONST_POLY_INT operaneds through
21279 aarch64_expand_mov_immediate.
21280 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
21281 CNT[BHSD] immediates.
21282 (movti): Split CONST_POLY_INT moves into two halves.
21283 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
21284 Split additions that need a temporary here if the destination
21285 is the stack pointer.
21286 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
21287 (*add<mode>3_poly_1): New instruction.
21288 (set_clobber_cc): New expander.
21290 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21292 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
21293 parameter and use it instead of GET_MODE_SIZE (innermode). Use
21294 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
21295 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
21296 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
21297 Change innermode from fixed_mode_size to machine_mode.
21298 (simplify_subreg): Update call accordingly. Handle a constant-sized
21299 subreg of a variable-length CONST_VECTOR.
21301 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21302 Alan Hayward <alan.hayward@arm.com>
21303 David Sherwood <david.sherwood@arm.com>
21305 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
21306 (add_offset_to_base): New function, split out from...
21307 (create_mem_ref): ...here. When handling a scale other than 1,
21308 check first whether the address is valid without the offset.
21309 Add it into the base if so, leaving the index and scale as-is.
21311 2018-01-12 Jakub Jelinek <jakub@redhat.com>
21314 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
21315 fold_for_warn before checking if arg2 is INTEGER_CST.
21317 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
21319 * config/rs6000/predicates.md (load_multiple_operation): Delete.
21320 (store_multiple_operation): Delete.
21321 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
21322 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
21323 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
21324 guarded by TARGET_STRING.
21325 (rs6000_output_load_multiple): Delete.
21326 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
21327 OPTION_MASK_STRING / TARGET_STRING handling.
21328 (print_operand) <'N', 'O'>: Add comment that these are unused now.
21329 (const rs6000_opt_masks) <"string">: Change mask to 0.
21330 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
21331 (MASK_STRING): Delete.
21332 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
21334 (load_multiple): Delete.
21341 (store_multiple): Delete.
21348 (movmemsi_8reg): Delete.
21349 (corresponding unnamed define_insn): Delete.
21350 (movmemsi_6reg): Delete.
21351 (corresponding unnamed define_insn): Delete.
21352 (movmemsi_4reg): Delete.
21353 (corresponding unnamed define_insn): Delete.
21354 (movmemsi_2reg): Delete.
21355 (corresponding unnamed define_insn): Delete.
21356 (movmemsi_1reg): Delete.
21357 (corresponding unnamed define_insn): Delete.
21358 * config/rs6000/rs6000.opt (mno-string): New.
21359 (mstring): Replace by deprecation warning stub.
21360 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
21362 2018-01-12 Jakub Jelinek <jakub@redhat.com>
21364 * regrename.c (regrename_do_replace): If replacing the same
21365 reg multiple times, try to reuse last created gen_raw_REG.
21368 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
21369 main to workaround a bug in GDB.
21371 2018-01-12 Tom de Vries <tom@codesourcery.com>
21374 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
21376 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
21378 PR rtl-optimization/80481
21379 * ira-color.c (get_cap_member): New function.
21380 (allocnos_conflict_by_live_ranges_p): Use it.
21381 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
21382 (setup_slot_coalesced_allocno_live_ranges): Ditto.
21384 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
21387 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
21388 (*saddl_se_1): Ditto.
21389 (*ssubsi_1): Ditto.
21390 (*ssubl_se_1): Ditto.
21392 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
21394 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
21395 rather than wi::to_widest for DR_INITs.
21396 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
21397 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
21398 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
21400 (vect_analyze_group_access_1): Note that here.
21402 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
21404 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
21405 polynomial type sizes.
21407 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
21409 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
21410 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
21411 (gimple_add_tmp_var): Likewise.
21413 2018-01-12 Martin Liska <mliska@suse.cz>
21415 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
21416 (gimple_alloc_sizes): Likewise.
21417 (dump_gimple_statistics): Use PRIu64 in printf format.
21418 * gimple.h: Change uint64_t to int.
21420 2018-01-12 Martin Liska <mliska@suse.cz>
21422 * tree-core.h: Use uint64_t instead of int.
21423 * tree.c (tree_node_counts): Likewise.
21424 (tree_node_sizes): Likewise.
21425 (dump_tree_statistics): Use PRIu64 in printf format.
21427 2018-01-12 Martin Liska <mliska@suse.cz>
21429 * Makefile.in: As qsort_chk is implemented in vec.c, add
21430 vec.o to linkage of gencfn-macros.
21431 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
21432 passing the info to record_node_allocation_statistics.
21433 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
21435 * ggc-common.c (struct ggc_usage): Add operator== and use
21436 it in operator< and compare function.
21437 * mem-stats.h (struct mem_usage): Likewise.
21438 * vec.c (struct vec_usage): Remove operator< and compare
21439 function. Can be simply inherited.
21441 2018-01-12 Martin Jambor <mjambor@suse.cz>
21444 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
21445 * tree-ssa-math-opts.c: Include domwalk.h.
21446 (convert_mult_to_fma_1): New function.
21447 (fma_transformation_info): New type.
21448 (fma_deferring_state): Likewise.
21449 (cancel_fma_deferring): New function.
21450 (result_of_phi): Likewise.
21451 (last_fma_candidate_feeds_initial_phi): Likewise.
21452 (convert_mult_to_fma): Added deferring logic, split actual
21453 transformation to convert_mult_to_fma_1.
21454 (math_opts_dom_walker): New type.
21455 (math_opts_dom_walker::after_dom_children): New method, body moved
21456 here from pass_optimize_widening_mul::execute, added deferring logic
21458 (pass_optimize_widening_mul::execute): Moved most of code to
21459 math_opts_dom_walker::after_dom_children.
21460 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
21461 * config/i386/i386.c (ix86_option_override_internal): Added
21462 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
21464 2018-01-12 Richard Biener <rguenther@suse.de>
21467 * dwarf2out.c (gen_variable_die): Do not reset old_die for
21468 inline instance vars.
21470 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
21473 * config/rx/rx.c (rx_is_restricted_memory_address):
21474 Handle SUBREG case.
21476 2018-01-12 Richard Biener <rguenther@suse.de>
21478 PR tree-optimization/80846
21479 * target.def (split_reduction): New target hook.
21480 * targhooks.c (default_split_reduction): New function.
21481 * targhooks.h (default_split_reduction): Declare.
21482 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
21483 target requests first reduce vectors by combining low and high
21485 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
21486 (get_vectype_for_scalar_type_and_size): Export.
21487 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
21488 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
21489 * doc/tm.texi: Regenerate.
21490 * config/i386/i386.c (ix86_split_reduction): Implement
21491 TARGET_VECTORIZE_SPLIT_REDUCTION.
21493 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
21496 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
21497 in PIC mode except for TARGET_VXWORKS_RTP.
21498 * config/sparc/sparc.c: Include cfgrtl.h.
21499 (TARGET_INIT_PIC_REG): Define.
21500 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
21501 (sparc_pic_register_p): New predicate.
21502 (sparc_legitimate_address_p): Use it.
21503 (sparc_legitimize_pic_address): Likewise.
21504 (sparc_delegitimize_address): Likewise.
21505 (sparc_mode_dependent_address_p): Likewise.
21506 (gen_load_pcrel_sym): Remove 4th parameter.
21507 (load_got_register): Adjust call to above. Remove obsolete stuff.
21508 (sparc_expand_prologue): Do not call load_got_register here.
21509 (sparc_flat_expand_prologue): Likewise.
21510 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
21511 (sparc_use_pseudo_pic_reg): New function.
21512 (sparc_init_pic_reg): Likewise.
21513 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
21514 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
21516 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
21518 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
21519 Add item for branch_cost.
21521 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
21523 PR rtl-optimization/83565
21524 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
21525 not extend the result to a larger mode for rotate operations.
21526 (num_sign_bit_copies1): Likewise.
21528 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
21531 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
21533 Use values-Xc.o for -pedantic.
21534 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
21536 2018-01-12 Martin Liska <mliska@suse.cz>
21539 * ipa-devirt.c (final_warning_record::grow_type_warnings):
21541 (possible_polymorphic_call_targets): Use it.
21542 (ipa_devirt): Likewise.
21544 2018-01-12 Martin Liska <mliska@suse.cz>
21546 * profile-count.h (enum profile_quality): Use 0 as invalid
21547 enum value of profile_quality.
21549 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
21551 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
21552 -mext-string options.
21554 2018-01-12 Richard Biener <rguenther@suse.de>
21556 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
21557 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
21558 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
21560 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
21562 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
21564 * configure.ac (--with-long-double-format): Add support for the
21565 configuration option to change the default long double format on
21567 * config.gcc (powerpc*-linux*-*): Likewise.
21568 * configure: Regenerate.
21569 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
21570 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
21571 used without modification.
21573 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21575 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
21576 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
21577 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
21578 MISC_BUILTIN_SPEC_BARRIER.
21579 (rs6000_init_builtins): Likewise.
21580 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
21582 (speculation_barrier): New define_insn.
21583 * doc/extend.texi: Document __builtin_speculation_barrier.
21585 2018-01-11 Jakub Jelinek <jakub@redhat.com>
21588 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
21589 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
21590 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
21592 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
21593 integral modes instead of "ss" and "sd".
21594 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
21595 vectors with 32-bit and 64-bit elements.
21596 (vecdupssescalarmodesuffix): New mode attribute.
21597 (vec_dup<mode>): Use it.
21599 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
21602 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
21603 frame if argument is passed on stack.
21605 2018-01-11 Jakub Jelinek <jakub@redhat.com>
21608 * ree.c (combine_reaching_defs): Optimize also
21609 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
21610 reg2=any_extend(exp); reg1=reg2;, formatting fix.
21612 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
21614 PR middle-end/83189
21615 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
21617 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
21619 PR middle-end/83718
21620 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
21621 after they are computed.
21623 2018-01-11 Bin Cheng <bin.cheng@arm.com>
21625 PR tree-optimization/83695
21626 * gimple-loop-linterchange.cc
21627 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
21628 reset cached scev information after interchange.
21629 (pass_linterchange::execute): Remove call to scev_reset_htab.
21631 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21633 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
21634 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
21635 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
21636 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
21637 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
21638 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
21639 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
21640 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
21641 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
21642 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
21643 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
21644 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
21645 (V_lane_reg): Likewise.
21646 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
21648 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
21649 (vfmal_lane_low<mode>_intrinsic,
21650 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
21651 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
21652 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
21653 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
21654 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
21655 vfmsl_lane_high<mode>_intrinsic): New define_insns.
21657 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21659 * config/arm/arm-cpus.in (fp16fml): New feature.
21660 (ALL_SIMD): Add fp16fml.
21661 (armv8.2-a): Add fp16fml as an option.
21662 (armv8.3-a): Likewise.
21663 (armv8.4-a): Add fp16fml as part of fp16.
21664 * config/arm/arm.h (TARGET_FP16FML): Define.
21665 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
21667 * config/arm/arm-modes.def (V2HF): Define.
21668 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
21669 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
21670 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
21671 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
21672 vfmsl_low, vfmsl_high): New set of builtins.
21673 * config/arm/iterators.md (PLUSMINUS): New code iterator.
21674 (vfml_op): New code attribute.
21675 (VFMLHALVES): New int iterator.
21676 (VFML, VFMLSEL): New mode attributes.
21677 (V_reg): Define mapping for V2HF.
21678 (V_hi, V_lo): New mode attributes.
21679 (VF_constraint): Likewise.
21680 (vfml_half, vfml_half_selector): New int attributes.
21681 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
21683 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
21684 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
21686 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
21687 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
21688 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
21689 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
21691 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
21692 Document new effective target and option set.
21694 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21696 * config/arm/arm-cpus.in (armv8_4): New feature.
21697 (ARMv8_4a): New fgroup.
21698 (armv8.4-a): New arch.
21699 * config/arm/arm-tables.opt: Regenerate.
21700 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
21701 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
21702 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
21703 Add matching rules for -march=armv8.4-a and extensions.
21704 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
21706 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
21709 * config/rx/rx.md (BW): New mode attribute.
21710 (sync_lock_test_and_setsi): Add mode suffix to insn output.
21712 2018-01-11 Richard Biener <rguenther@suse.de>
21714 PR tree-optimization/83435
21715 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
21716 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
21717 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
21719 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21720 Alan Hayward <alan.hayward@arm.com>
21721 David Sherwood <david.sherwood@arm.com>
21723 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
21725 (aarch64_classify_address): Initialize it. Track polynomial offsets.
21726 (aarch64_print_address_internal): Use it to check for a zero offset.
21728 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21729 Alan Hayward <alan.hayward@arm.com>
21730 David Sherwood <david.sherwood@arm.com>
21732 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
21733 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
21734 Return a poly_int64 rather than a HOST_WIDE_INT.
21735 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
21736 rather than a HOST_WIDE_INT.
21737 * config/aarch64/aarch64.h (aarch64_frame): Protect with
21738 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
21739 hard_fp_offset, frame_size, initial_adjust, callee_offset and
21740 final_offset from HOST_WIDE_INT to poly_int64.
21741 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
21742 to_constant when getting the number of units in an Advanced SIMD
21744 (aarch64_builtin_vectorized_function): Check for a constant number
21746 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
21748 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
21749 attribute instead of GET_MODE_NUNITS.
21750 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
21751 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
21752 GET_MODE_SIZE for fixed-size registers.
21753 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
21754 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
21755 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
21756 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
21757 (aarch64_print_operand, aarch64_print_address_internal)
21758 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
21759 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
21760 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
21761 Handle polynomial GET_MODE_SIZE.
21762 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
21763 wider than SImode without modification.
21764 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
21765 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
21766 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
21767 passing and returning SVE modes.
21768 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
21769 rather than GEN_INT.
21770 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
21771 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
21772 (aarch64_allocate_and_probe_stack_space): Likewise.
21773 (aarch64_layout_frame): Cope with polynomial offsets.
21774 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
21775 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
21776 polynomial offsets.
21777 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
21778 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
21779 poly_int64 rather than a HOST_WIDE_INT.
21780 (aarch64_get_separate_components, aarch64_process_components)
21781 (aarch64_expand_prologue, aarch64_expand_epilogue)
21782 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
21783 (aarch64_anchor_offset): New function, split out from...
21784 (aarch64_legitimize_address): ...here.
21785 (aarch64_builtin_vectorization_cost): Handle polynomial
21786 TYPE_VECTOR_SUBPARTS.
21787 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
21789 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
21790 number of elements from the PARALLEL rather than the mode.
21791 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
21792 rather than GET_MODE_BITSIZE.
21793 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
21794 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
21795 (aarch64_expand_vec_perm_const_1): Handle polynomial
21796 d->perm.length () and d->perm elements.
21797 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
21798 Apply to_constant to d->perm elements.
21799 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
21800 polynomial CONST_VECTOR_NUNITS.
21801 (aarch64_move_pointer): Take amount as a poly_int64 rather
21803 (aarch64_progress_pointer): Avoid temporary variable.
21804 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
21805 the mode attribute instead of GET_MODE.
21807 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21808 Alan Hayward <alan.hayward@arm.com>
21809 David Sherwood <david.sherwood@arm.com>
21811 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
21812 x exists before using it.
21813 (aarch64_add_constant_internal): Rename to...
21814 (aarch64_add_offset_1): ...this. Replace regnum with separate
21815 src and dest rtxes. Handle the case in which they're different,
21816 including when the offset is zero. Replace scratchreg with an rtx.
21817 Use 2 additions if there is no spare register into which we can
21818 move a 16-bit constant.
21819 (aarch64_add_constant): Delete.
21820 (aarch64_add_offset): Replace reg with separate src and dest
21821 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
21822 Use aarch64_add_offset_1.
21823 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
21824 an rtx rather than an int. Take the delta as a poly_int64
21825 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
21826 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
21827 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
21828 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
21829 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
21830 and aarch64_add_sp.
21831 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
21832 aarch64_add_constant.
21834 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21836 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
21837 Use scalar_float_mode.
21839 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21841 * config/aarch64/aarch64-simd.md
21842 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
21843 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
21844 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
21845 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
21846 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
21847 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
21848 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
21849 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
21850 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
21851 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
21853 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21856 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
21857 targ_options->x_arm_arch_string is non NULL.
21859 2018-01-11 Tamar Christina <tamar.christina@arm.com>
21861 * config/aarch64/aarch64.h
21862 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
21864 2018-01-11 Sudakshina Das <sudi.das@arm.com>
21867 * expmed.c (emit_store_flag_force): Swap if const op0
21868 and change VOIDmode to mode of op0.
21870 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21872 PR rtl-optimization/83761
21873 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
21874 than bytes to mode_for_size.
21876 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
21878 PR middle-end/83189
21879 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
21880 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
21883 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
21885 PR middle-end/83575
21886 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
21887 when in layout mode.
21888 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
21889 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
21892 2018-01-10 Michael Collison <michael.collison@arm.com>
21894 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
21895 * config/aarch64/aarch64-option-extension.def: Add
21896 AARCH64_OPT_EXTENSION of 'fp16fml'.
21897 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21898 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
21899 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
21900 * config/aarch64/constraints.md (Ui7): New constraint.
21901 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
21902 (VFMLA_SEL_W): Ditto.
21905 (VFMLA16_LOW): New int iterator.
21906 (VFMLA16_HIGH): Ditto.
21907 (UNSPEC_FMLAL): New unspec.
21908 (UNSPEC_FMLSL): Ditto.
21909 (UNSPEC_FMLAL2): Ditto.
21910 (UNSPEC_FMLSL2): Ditto.
21911 (f16mac): New code attribute.
21912 * config/aarch64/aarch64-simd-builtins.def
21913 (aarch64_fmlal_lowv2sf): Ditto.
21914 (aarch64_fmlsl_lowv2sf): Ditto.
21915 (aarch64_fmlalq_lowv4sf): Ditto.
21916 (aarch64_fmlslq_lowv4sf): Ditto.
21917 (aarch64_fmlal_highv2sf): Ditto.
21918 (aarch64_fmlsl_highv2sf): Ditto.
21919 (aarch64_fmlalq_highv4sf): Ditto.
21920 (aarch64_fmlslq_highv4sf): Ditto.
21921 (aarch64_fmlal_lane_lowv2sf): Ditto.
21922 (aarch64_fmlsl_lane_lowv2sf): Ditto.
21923 (aarch64_fmlal_laneq_lowv2sf): Ditto.
21924 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
21925 (aarch64_fmlalq_lane_lowv4sf): Ditto.
21926 (aarch64_fmlsl_lane_lowv4sf): Ditto.
21927 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
21928 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
21929 (aarch64_fmlal_lane_highv2sf): Ditto.
21930 (aarch64_fmlsl_lane_highv2sf): Ditto.
21931 (aarch64_fmlal_laneq_highv2sf): Ditto.
21932 (aarch64_fmlsl_laneq_highv2sf): Ditto.
21933 (aarch64_fmlalq_lane_highv4sf): Ditto.
21934 (aarch64_fmlsl_lane_highv4sf): Ditto.
21935 (aarch64_fmlalq_laneq_highv4sf): Ditto.
21936 (aarch64_fmlsl_laneq_highv4sf): Ditto.
21937 * config/aarch64/aarch64-simd.md:
21938 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
21939 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
21940 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
21941 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
21942 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
21943 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
21944 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
21945 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
21946 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
21947 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
21948 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
21949 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
21950 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
21951 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
21952 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
21953 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
21954 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
21955 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
21956 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
21957 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
21958 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
21959 (vfmlsl_low_u32): Ditto.
21960 (vfmlalq_low_u32): Ditto.
21961 (vfmlslq_low_u32): Ditto.
21962 (vfmlal_high_u32): Ditto.
21963 (vfmlsl_high_u32): Ditto.
21964 (vfmlalq_high_u32): Ditto.
21965 (vfmlslq_high_u32): Ditto.
21966 (vfmlal_lane_low_u32): Ditto.
21967 (vfmlsl_lane_low_u32): Ditto.
21968 (vfmlal_laneq_low_u32): Ditto.
21969 (vfmlsl_laneq_low_u32): Ditto.
21970 (vfmlalq_lane_low_u32): Ditto.
21971 (vfmlslq_lane_low_u32): Ditto.
21972 (vfmlalq_laneq_low_u32): Ditto.
21973 (vfmlslq_laneq_low_u32): Ditto.
21974 (vfmlal_lane_high_u32): Ditto.
21975 (vfmlsl_lane_high_u32): Ditto.
21976 (vfmlal_laneq_high_u32): Ditto.
21977 (vfmlsl_laneq_high_u32): Ditto.
21978 (vfmlalq_lane_high_u32): Ditto.
21979 (vfmlslq_lane_high_u32): Ditto.
21980 (vfmlalq_laneq_high_u32): Ditto.
21981 (vfmlslq_laneq_high_u32): Ditto.
21982 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
21983 (AARCH64_FL_FOR_ARCH8_4): New.
21984 (AARCH64_ISA_F16FML): New ISA flag.
21985 (TARGET_F16FML): New feature flag for fp16fml.
21986 (doc/invoke.texi): Document new fp16fml option.
21988 2018-01-10 Michael Collison <michael.collison@arm.com>
21990 * config/aarch64/aarch64-builtins.c:
21991 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
21992 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21993 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
21994 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
21995 (AARCH64_ISA_SHA3): New ISA flag.
21996 (TARGET_SHA3): New feature flag for sha3.
21997 * config/aarch64/iterators.md (sha512_op): New int attribute.
21998 (CRYPTO_SHA512): New int iterator.
21999 (UNSPEC_SHA512H): New unspec.
22000 (UNSPEC_SHA512H2): Ditto.
22001 (UNSPEC_SHA512SU0): Ditto.
22002 (UNSPEC_SHA512SU1): Ditto.
22003 * config/aarch64/aarch64-simd-builtins.def
22004 (aarch64_crypto_sha512hqv2di): New builtin.
22005 (aarch64_crypto_sha512h2qv2di): Ditto.
22006 (aarch64_crypto_sha512su0qv2di): Ditto.
22007 (aarch64_crypto_sha512su1qv2di): Ditto.
22008 (aarch64_eor3qv8hi): Ditto.
22009 (aarch64_rax1qv2di): Ditto.
22010 (aarch64_xarqv2di): Ditto.
22011 (aarch64_bcaxqv8hi): Ditto.
22012 * config/aarch64/aarch64-simd.md:
22013 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
22014 (aarch64_crypto_sha512su0qv2di): Ditto.
22015 (aarch64_crypto_sha512su1qv2di): Ditto.
22016 (aarch64_eor3qv8hi): Ditto.
22017 (aarch64_rax1qv2di): Ditto.
22018 (aarch64_xarqv2di): Ditto.
22019 (aarch64_bcaxqv8hi): Ditto.
22020 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
22021 (vsha512h2q_u64): Ditto.
22022 (vsha512su0q_u64): Ditto.
22023 (vsha512su1q_u64): Ditto.
22024 (veor3q_u16): Ditto.
22025 (vrax1q_u64): Ditto.
22026 (vxarq_u64): Ditto.
22027 (vbcaxq_u16): Ditto.
22028 * config/arm/types.md (crypto_sha512): New type attribute.
22029 (crypto_sha3): Ditto.
22030 (doc/invoke.texi): Document new sha3 option.
22032 2018-01-10 Michael Collison <michael.collison@arm.com>
22034 * config/aarch64/aarch64-builtins.c:
22035 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
22036 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22037 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
22038 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
22039 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
22040 (AARCH64_ISA_SM4): New ISA flag.
22041 (TARGET_SM4): New feature flag for sm4.
22042 * config/aarch64/aarch64-simd-builtins.def
22043 (aarch64_sm3ss1qv4si): Ditto.
22044 (aarch64_sm3tt1aq4si): Ditto.
22045 (aarch64_sm3tt1bq4si): Ditto.
22046 (aarch64_sm3tt2aq4si): Ditto.
22047 (aarch64_sm3tt2bq4si): Ditto.
22048 (aarch64_sm3partw1qv4si): Ditto.
22049 (aarch64_sm3partw2qv4si): Ditto.
22050 (aarch64_sm4eqv4si): Ditto.
22051 (aarch64_sm4ekeyqv4si): Ditto.
22052 * config/aarch64/aarch64-simd.md:
22053 (aarch64_sm3ss1qv4si): Ditto.
22054 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
22055 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
22056 (aarch64_sm4eqv4si): Ditto.
22057 (aarch64_sm4ekeyqv4si): Ditto.
22058 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
22059 (sm3part_op): Ditto.
22060 (CRYPTO_SM3TT): Ditto.
22061 (CRYPTO_SM3PART): Ditto.
22062 (UNSPEC_SM3SS1): New unspec.
22063 (UNSPEC_SM3TT1A): Ditto.
22064 (UNSPEC_SM3TT1B): Ditto.
22065 (UNSPEC_SM3TT2A): Ditto.
22066 (UNSPEC_SM3TT2B): Ditto.
22067 (UNSPEC_SM3PARTW1): Ditto.
22068 (UNSPEC_SM3PARTW2): Ditto.
22069 (UNSPEC_SM4E): Ditto.
22070 (UNSPEC_SM4EKEY): Ditto.
22071 * config/aarch64/constraints.md (Ui2): New constraint.
22072 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
22073 * config/arm/types.md (crypto_sm3): New type attribute.
22074 (crypto_sm4): Ditto.
22075 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
22076 (vsm3tt1aq_u32): Ditto.
22077 (vsm3tt1bq_u32): Ditto.
22078 (vsm3tt2aq_u32): Ditto.
22079 (vsm3tt2bq_u32): Ditto.
22080 (vsm3partw1q_u32): Ditto.
22081 (vsm3partw2q_u32): Ditto.
22082 (vsm4eq_u32): Ditto.
22083 (vsm4ekeyq_u32): Ditto.
22084 (doc/invoke.texi): Document new sm4 option.
22086 2018-01-10 Michael Collison <michael.collison@arm.com>
22088 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
22089 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
22090 (AARCH64_FL_FOR_ARCH8_4): New.
22091 (AARCH64_FL_V8_4): New flag.
22092 (doc/invoke.texi): Document new armv8.4-a option.
22094 2018-01-10 Michael Collison <michael.collison@arm.com>
22096 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22097 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
22098 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
22099 * config/aarch64/aarch64-option-extension.def: Add
22100 AARCH64_OPT_EXTENSION of 'sha2'.
22101 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
22102 (crypto): Disable sha2 and aes if crypto disabled.
22103 (crypto): Enable aes and sha2 if enabled.
22104 (simd): Disable sha2 and aes if simd disabled.
22105 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
22107 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
22108 (TARGET_SHA2): New feature flag for sha2.
22109 (TARGET_AES): New feature flag for aes.
22110 * config/aarch64/aarch64-simd.md:
22111 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
22112 conditional on TARGET_AES.
22113 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
22114 (aarch64_crypto_sha1hsi): Make pattern conditional
22116 (aarch64_crypto_sha1hv4si): Ditto.
22117 (aarch64_be_crypto_sha1hv4si): Ditto.
22118 (aarch64_crypto_sha1su1v4si): Ditto.
22119 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
22120 (aarch64_crypto_sha1su0v4si): Ditto.
22121 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
22122 (aarch64_crypto_sha256su0v4si): Ditto.
22123 (aarch64_crypto_sha256su1v4si): Ditto.
22124 (doc/invoke.texi): Document new aes and sha2 options.
22126 2018-01-10 Martin Sebor <msebor@redhat.com>
22128 PR tree-optimization/83781
22129 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
22132 2018-01-11 Martin Sebor <msebor@gmail.com>
22133 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22135 PR tree-optimization/83501
22136 PR tree-optimization/81703
22138 * tree-ssa-strlen.c (get_string_cst): Rename...
22139 (get_string_len): ...to this. Handle global constants.
22140 (handle_char_store): Adjust.
22142 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
22143 Jim Wilson <jimw@sifive.com>
22145 * config/riscv/riscv-protos.h (riscv_output_return): New.
22146 * config/riscv/riscv.c (struct machine_function): New naked_p field.
22147 (riscv_attribute_table, riscv_output_return),
22148 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
22149 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
22150 (riscv_compute_frame_info): Only compute frame->mask if not a naked
22152 (riscv_expand_prologue): Add early return for naked function.
22153 (riscv_expand_epilogue): Likewise.
22154 (riscv_function_ok_for_sibcall): Return false for naked function.
22155 (riscv_set_current_function): New.
22156 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
22157 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
22158 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
22159 * doc/extend.texi (RISC-V Function Attributes): New.
22161 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
22163 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
22164 check for 128-bit long double before checking TCmode.
22165 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
22166 128-bit long doubles before checking TFmode or TCmode.
22167 (FLOAT128_IBM_P): Likewise.
22169 2018-01-10 Martin Sebor <msebor@redhat.com>
22171 PR tree-optimization/83671
22172 * builtins.c (c_strlen): Unconditionally return zero for the empty
22174 Use -Warray-bounds for warnings.
22175 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
22176 for non-constant array indices with COMPONENT_REF, arrays of
22177 arrays, and pointers to arrays.
22178 (gimple_fold_builtin_strlen): Determine and set length range for
22179 non-constant character arrays.
22181 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
22183 PR middle-end/81897
22184 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
22187 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
22189 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
22191 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
22194 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
22195 VECTOR_MEM_ALTIVEC_OR_VSX_P.
22196 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
22197 indexed_or_indirect_operand predicate.
22198 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
22199 (*vsx_le_perm_load_v8hi): Likewise.
22200 (*vsx_le_perm_load_v16qi): Likewise.
22201 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
22202 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
22203 (*vsx_le_perm_store_v8hi): Likewise.
22204 (*vsx_le_perm_store_v16qi): Likewise.
22205 (eight unnamed splitters): Likewise.
22207 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
22209 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
22210 * config/rs6000/emmintrin.h: Likewise.
22211 * config/rs6000/mmintrin.h: Likewise.
22212 * config/rs6000/xmmintrin.h: Likewise.
22214 2018-01-10 David Malcolm <dmalcolm@redhat.com>
22217 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
22219 * tree.c (tree_nop_conversion): Return true for location wrapper
22221 (maybe_wrap_with_location): New function.
22222 (selftest::check_strip_nops): New function.
22223 (selftest::test_location_wrappers): New function.
22224 (selftest::tree_c_tests): Call it.
22225 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
22226 (maybe_wrap_with_location): New decl.
22227 (EXPR_LOCATION_WRAPPER_P): New macro.
22228 (location_wrapper_p): New inline function.
22229 (tree_strip_any_location_wrapper): New inline function.
22231 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
22234 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
22235 stack_realign_offset for the largest alignment of stack slot
22237 (ix86_find_max_used_stack_alignment): New function.
22238 (ix86_finalize_stack_frame_flags): Use it. Set
22239 max_used_stack_alignment if we don't realign stack.
22240 * config/i386/i386.h (machine_function): Add
22241 max_used_stack_alignment.
22243 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
22245 * config/arm/arm.opt (-mbranch-cost): New option.
22246 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
22249 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
22252 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
22253 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
22255 2018-01-10 Richard Biener <rguenther@suse.de>
22258 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
22259 early out so it also covers the case where we have a non-NULL
22262 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
22264 PR tree-optimization/83753
22265 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
22266 for non-strided grouped accesses if the number of elements is 1.
22268 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22271 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
22272 * i386.h (TARGET_USE_GATHER): Define.
22273 * x86-tune.def (X86_TUNE_USE_GATHER): New.
22275 2018-01-10 Martin Liska <mliska@suse.cz>
22278 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
22279 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
22281 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
22282 CLEANUP_NO_PARTITIONING is not set.
22284 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
22286 * doc/rtl.texi: Remove documentation of (const ...) wrappers
22287 for vectors, as a partial revert of r254296.
22288 * rtl.h (const_vec_p): Delete.
22289 (const_vec_duplicate_p): Don't test for vector CONSTs.
22290 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
22291 * expmed.c (make_tree): Likewise.
22294 * common.md (E, F): Use CONSTANT_P instead of checking for
22296 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
22297 checking for CONST_VECTOR.
22299 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
22301 PR middle-end/83575
22302 * predict.c (force_edge_cold): Handle in more sane way edges
22303 with no prediction.
22305 2018-01-09 Carl Love <cel@us.ibm.com>
22307 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
22309 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
22310 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
22311 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
22312 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
22313 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
22314 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
22315 * config/rs6000/rs6000-protos.h: Add extern defition for
22316 rs6000_generate_float2_double_code.
22317 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
22319 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
22320 (float2_v2df): Add define_expand.
22322 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
22325 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
22326 op_mode in the force_to_mode call.
22328 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
22330 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
22331 instead of checking each element individually.
22332 (aarch64_evpc_uzp): Likewise.
22333 (aarch64_evpc_zip): Likewise.
22334 (aarch64_evpc_ext): Likewise.
22335 (aarch64_evpc_rev): Likewise.
22336 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
22337 instead of checking each element individually. Return true without
22339 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
22340 whether all selected elements come from the same input, instead of
22341 checking each element individually. Remove calls to gen_rtx_REG,
22342 start_sequence and end_sequence and instead assert that no rtl is
22345 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
22347 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
22348 order of HIGH and CONST checks.
22350 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
22352 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
22353 if the destination isn't an SSA_NAME.
22355 2018-01-09 Richard Biener <rguenther@suse.de>
22357 PR tree-optimization/83668
22358 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
22360 (canonicalize_loop_form): ... here, renamed from ...
22361 (canonicalize_loop_closed_ssa_form): ... this and amended to
22362 swap successor edges for loop exit blocks to make us use
22363 the RPO order we need for initial schedule generation.
22365 2018-01-09 Joseph Myers <joseph@codesourcery.com>
22367 PR tree-optimization/64811
22368 * match.pd: When optimizing comparisons with Inf, avoid
22369 introducing or losing exceptions from comparisons with NaN.
22371 2018-01-09 Martin Liska <mliska@suse.cz>
22374 * asan.c (shadow_mem_size): Add gcc_assert.
22376 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
22378 Don't save registers in main().
22381 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
22382 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
22383 * config/avr/avr.c (avr_set_current_function): Don't error if
22384 naked, OS_task or OS_main are specified at the same time.
22385 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
22387 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
22389 * common/config/avr/avr-common.c (avr_option_optimization_table):
22390 Switch on -mmain-is-OS_task for optimizing compilations.
22392 2018-01-09 Richard Biener <rguenther@suse.de>
22394 PR tree-optimization/83572
22395 * graphite.c: Include cfganal.h.
22396 (graphite_transform_loops): Connect infinite loops to exit
22397 and remove fake edges at the end.
22399 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
22401 * ipa-inline.c (edge_badness): Revert accidental checkin.
22403 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
22406 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
22407 symbols; not inline clones.
22409 2018-01-09 Jakub Jelinek <jakub@redhat.com>
22412 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
22413 hard registers. Formatting fixes.
22415 PR preprocessor/83722
22416 * gcc.c (try_generate_repro): Pass
22417 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
22418 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
22421 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
22422 Kito Cheng <kito.cheng@gmail.com>
22424 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
22425 (riscv_leaf_function_p): Delete.
22426 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
22428 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22430 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
22432 (do_ifelse): New function.
22433 (do_isel): New function.
22434 (do_sub3): New function.
22435 (do_add3): New function.
22436 (do_load_mask_compare): New function.
22437 (do_overlap_load_compare): New function.
22438 (expand_compare_loop): New function.
22439 (expand_block_compare): Call expand_compare_loop() when appropriate.
22440 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
22441 option description.
22442 (-mblock-compare-inline-loop-limit): New option.
22444 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22447 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
22448 Reverse order of second and third operands in first alternative.
22449 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
22450 of first and second elements in UNSPEC_VPERMR vector.
22451 (altivec_expand_vec_perm_le): Likewise.
22453 2018-01-08 Jeff Law <law@redhat.com>
22455 PR rtl-optimizatin/81308
22456 * tree-switch-conversion.c (cfg_altered): New file scoped static.
22457 (process_switch): If group_case_labels makes a change, then set
22459 (pass_convert_switch::execute): If a switch is converted, then
22460 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
22462 PR rtl-optimization/81308
22463 * recog.c (split_all_insns): Conditionally cleanup the CFG after
22466 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
22468 PR target/83663 - Revert r255946
22469 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
22470 generation for cases where splatting a value is not useful.
22471 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
22472 across a vec_duplicate and a paradoxical subreg forming a vector
22473 mode to a vec_concat.
22475 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22477 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
22478 -march=armv8.3-a variants.
22479 * config/arm/t-multilib: Likewise.
22480 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
22482 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22484 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
22486 (cceq_ior_compare_complement): Give it a name so I can use it, and
22487 change boolean_or_operator predicate to boolean_operator so it can
22488 be used to generate a crand.
22489 (eqne): New code iterator.
22490 (bd/bd_neg): New code_attrs.
22491 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
22492 a single define_insn.
22493 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
22494 decrement (bdnzt/bdnzf/bdzt/bdzf).
22495 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
22496 with the new names of the branch decrement patterns, and added the
22497 names of the branch decrement conditional patterns.
22499 2018-01-08 Richard Biener <rguenther@suse.de>
22501 PR tree-optimization/83563
22502 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
22505 2018-01-08 Richard Biener <rguenther@suse.de>
22507 PR middle-end/83713
22508 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
22510 2018-01-08 Richard Biener <rguenther@suse.de>
22512 PR tree-optimization/83685
22513 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
22514 references to abnormals.
22516 2018-01-08 Richard Biener <rguenther@suse.de>
22519 * dwarf2out.c (output_indirect_strings): Handle empty
22520 skeleton_debug_str_hash.
22521 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
22523 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
22525 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
22526 (emit_store_direct): Likewise.
22527 (arc_trampoline_adjust_address): Likewise.
22528 (arc_asm_trampoline_template): New function.
22529 (arc_initialize_trampoline): Use asm_trampoline_template.
22530 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
22531 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
22532 * config/arc/arc.md (flush_icache): Delete pattern.
22534 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
22536 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
22537 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
22540 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
22543 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
22544 by not USED_FOR_TARGET.
22545 (make_pass_resolve_sw_modes): Likewise.
22547 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
22549 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
22552 2018-01-08 Richard Biener <rguenther@suse.de>
22554 PR middle-end/83580
22555 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
22557 2018-01-08 Richard Biener <rguenther@suse.de>
22559 PR middle-end/83517
22560 * match.pd ((t * 2) / 2) -> t): Add missing :c.
22562 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
22564 PR middle-end/81897
22565 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
22566 basic blocks with a small number of successors.
22567 (convert_control_dep_chain_into_preds): Improve handling of
22569 (dump_predicates): Split apart into...
22570 (dump_pred_chain): ...here...
22571 (dump_pred_info): ...and here.
22572 (can_one_predicate_be_invalidated_p): Add debugging printfs.
22573 (can_chain_union_be_invalidated_p): Improve check for invalidation
22575 (uninit_uses_cannot_happen): Avoid unnecessary if
22576 convert_control_dep_chain_into_preds yielded nothing.
22578 2018-01-06 Martin Sebor <msebor@redhat.com>
22580 PR tree-optimization/83640
22581 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
22582 subtracting negative offset from size.
22583 (builtin_access::overlap): Adjust offset bounds of the access to fall
22584 within the size of the object if possible.
22586 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
22588 PR rtl-optimization/83699
22589 * expmed.c (extract_bit_field_1): Restrict the vector usage of
22590 extract_bit_field_as_subreg to cases in which the extracted
22591 value is also a vector.
22593 * lra-constraints.c (process_alt_operands): Test for the equivalence
22594 substitutions when detecting a possible reload cycle.
22596 2018-01-06 Jakub Jelinek <jakub@redhat.com>
22599 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
22600 by default if flag_selective_schedling{,2}. Formatting fixes.
22602 PR rtl-optimization/83682
22603 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
22604 if it has non-VECTOR_MODE element mode.
22605 (vec_duplicate_p): Likewise.
22607 PR middle-end/83694
22608 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
22609 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
22611 2018-01-05 Jakub Jelinek <jakub@redhat.com>
22614 * config/i386/i386-builtin.def
22615 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
22616 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
22617 Require also OPTION_MASK_ISA_AVX512F in addition to
22618 OPTION_MASK_ISA_GFNI.
22619 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
22620 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
22621 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
22622 to OPTION_MASK_ISA_GFNI.
22623 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
22624 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
22625 OPTION_MASK_ISA_AVX512BW.
22626 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
22627 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
22628 addition to OPTION_MASK_ISA_GFNI.
22629 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
22630 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
22631 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
22632 to OPTION_MASK_ISA_GFNI.
22633 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
22634 a requirement for all ISAs rather than any of them with a few
22636 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
22638 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
22639 bitmasks to be enabled with 3 exceptions, instead of requiring any
22640 enabled ISA with lots of exceptions.
22641 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
22642 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
22643 Change avx512bw in isa attribute to avx512f.
22644 * config/i386/sgxintrin.h: Add license boilerplate.
22645 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
22646 to __AVX512F__ and __AVX512VL to __AVX512VL__.
22647 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
22648 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
22650 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
22651 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
22652 temporarily sse2 rather than sse if not enabled already.
22655 * config/i386/sse.md (VI248_VLBW): Rename to ...
22656 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
22657 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
22658 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
22659 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
22660 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
22661 mode iterator instead of VI248_VLBW.
22663 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
22665 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
22666 (record_modified): Skip clobbers; add debug output.
22667 (param_change_prob): Use sreal frequencies.
22669 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
22671 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
22672 punt for user-aligned variables.
22674 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
22676 * tree-chrec.c (chrec_contains_symbols): Return true for
22679 2018-01-05 Sudakshina Das <sudi.das@arm.com>
22682 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
22683 of (x|y) == x for BICS pattern.
22685 2018-01-05 Jakub Jelinek <jakub@redhat.com>
22687 PR tree-optimization/83605
22688 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
22689 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
22692 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
22694 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
22695 * config/epiphany/rtems.h: New file.
22697 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22698 Uros Bizjak <ubizjak@gmail.com>
22701 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
22702 QIreg_operand instead of register_operand predicate.
22703 * config/i386/i386.c (ix86_rop_should_change_byte_p,
22704 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
22705 comments instead of -fmitigate[-_]rop.
22707 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22710 * cgraphunit.c (symbol_table::compile): Switch to text_section
22711 before calling assembly_start debug hook.
22712 * run-rtl-passes.c (run_rtl_passes): Likewise.
22715 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22717 * tree-vrp.c (extract_range_from_binary_expr_1): Check
22718 range_int_cst_p rather than !symbolic_range_p before calling
22719 extract_range_from_multiplicative_op_1.
22721 2018-01-04 Jeff Law <law@redhat.com>
22723 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
22724 redundant test in assertion.
22726 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22728 * doc/rtl.texi: Document machine_mode wrapper classes.
22730 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22732 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
22733 using tree_to_uhwi.
22735 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22737 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
22738 the VEC_PERM_EXPR fold to fail.
22740 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22743 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
22744 to switched_sections.
22746 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22749 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
22750 test for d.testing.
22752 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
22755 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
22756 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
22758 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22761 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
22762 is BLKmode and bitpos not zero or mode change is needed.
22764 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22767 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
22770 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
22773 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
22774 instead of MULT rtx. Update all corresponding splitters.
22775 (*saddl_se): Ditto.
22776 (*ssub<modesuffix>): Ditto.
22777 (*ssubl_se): Ditto.
22778 (*cmp_sadd_di): Update split patterns.
22779 (*cmp_sadd_si): Ditto.
22780 (*cmp_sadd_sidi): Ditto.
22781 (*cmp_ssub_di): Ditto.
22782 (*cmp_ssub_si): Ditto.
22783 (*cmp_ssub_sidi): Ditto.
22784 * config/alpha/predicates.md (const23_operand): New predicate.
22785 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
22786 Look for ASHIFT, not MULT inner operand.
22787 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
22789 2018-01-04 Martin Liska <mliska@suse.cz>
22791 PR gcov-profile/83669
22792 * gcov.c (output_intermediate_file): Add version to intermediate
22794 * doc/gcov.texi: Document new field 'version' in intermediate
22795 file format. Fix location of '-k' option of gcov command.
22797 2018-01-04 Martin Liska <mliska@suse.cz>
22800 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
22802 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22804 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
22806 2018-01-03 Martin Sebor <msebor@redhat.com>
22808 PR tree-optimization/83655
22809 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
22810 checking calls with invalid arguments.
22812 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22814 * tree-vect-stmts.c (vect_get_store_rhs): New function.
22815 (vectorizable_mask_load_store): Delete.
22816 (vectorizable_call): Return false for masked loads and stores.
22817 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
22818 instead of gimple_assign_rhs1.
22819 (vectorizable_load): Handle IFN_MASK_LOAD.
22820 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
22822 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22824 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
22826 (vectorizable_mask_load_store): ...here.
22827 (vectorizable_load): ...and here.
22829 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22831 * tree-vect-stmts.c (vect_build_all_ones_mask)
22832 (vect_build_zero_merge_argument): New functions, split out from...
22833 (vectorizable_load): ...here.
22835 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22837 * tree-vect-stmts.c (vect_check_store_rhs): New function,
22839 (vectorizable_mask_load_store): ...here.
22840 (vectorizable_store): ...and here.
22842 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22844 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
22846 (vectorizable_mask_load_store): ...here.
22848 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22850 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
22851 (vect_model_store_cost): Take a vec_load_store_type instead of a
22853 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
22854 (vect_model_store_cost): Take a vec_load_store_type instead of a
22856 (vectorizable_mask_load_store): Update accordingly.
22857 (vectorizable_store): Likewise.
22858 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
22860 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22862 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
22863 IFN_MASK_LOAD calls here rather than...
22864 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
22866 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22867 Alan Hayward <alan.hayward@arm.com>
22868 David Sherwood <david.sherwood@arm.com>
22870 * expmed.c (extract_bit_field_1): For vector extracts,
22871 fall back to extract_bit_field_as_subreg if vec_extract
22874 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22875 Alan Hayward <alan.hayward@arm.com>
22876 David Sherwood <david.sherwood@arm.com>
22878 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
22879 they are variable or constant sized.
22880 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
22881 slots for constant-sized data.
22883 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22884 Alan Hayward <alan.hayward@arm.com>
22885 David Sherwood <david.sherwood@arm.com>
22887 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
22888 handling COND_EXPRs with boolean comparisons, try to find a better
22889 basis for the mask type than the boolean itself.
22891 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22893 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
22894 is calculated and how it can be overridden.
22895 * genmodes.c (max_bitsize_mode_any_mode): New variable.
22896 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
22898 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
22901 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22902 Alan Hayward <alan.hayward@arm.com>
22903 David Sherwood <david.sherwood@arm.com>
22905 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
22906 Remove the mode argument.
22907 (aarch64_simd_valid_immediate): Remove the mode and inverse
22909 * config/aarch64/iterators.md (bitsize): New iterator.
22910 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
22911 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
22912 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
22913 aarch64_simd_valid_immediate.
22914 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
22915 (aarch64_reg_or_bic_imm): Likewise.
22916 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
22917 with an insn_type enum and msl with a modifier_type enum.
22918 Replace element_width with a scalar_mode. Change the shift
22919 to unsigned int. Add constructors for scalar_float_mode and
22920 scalar_int_mode elements.
22921 (aarch64_vect_float_const_representable_p): Delete.
22922 (aarch64_can_const_movi_rtx_p)
22923 (aarch64_simd_scalar_immediate_valid_for_move)
22924 (aarch64_simd_make_constant): Update call to
22925 aarch64_simd_valid_immediate.
22926 (aarch64_advsimd_valid_immediate_hs): New function.
22927 (aarch64_advsimd_valid_immediate): Likewise.
22928 (aarch64_simd_valid_immediate): Remove mode and inverse
22929 arguments. Rewrite to use the above. Use const_vec_duplicate_p
22930 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
22931 and aarch64_float_const_representable_p on the result.
22932 (aarch64_output_simd_mov_immediate): Remove mode argument.
22933 Update call to aarch64_simd_valid_immediate and use of
22934 simd_immediate_info.
22935 (aarch64_output_scalar_simd_mov_immediate): Update call
22938 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22939 Alan Hayward <alan.hayward@arm.com>
22940 David Sherwood <david.sherwood@arm.com>
22942 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
22943 (mode_nunits): Likewise CONST_MODE_NUNITS.
22944 * machmode.def (ADJUST_NUNITS): Document.
22945 * genmodes.c (mode_data::need_nunits_adj): New field.
22946 (blank_mode): Update accordingly.
22947 (adj_nunits): New variable.
22948 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
22950 (emit_mode_size_inline): Set need_bytesize_adj for all modes
22951 listed in adj_nunits.
22952 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
22953 listed in adj_nunits. Don't emit case statements for such modes.
22954 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
22955 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
22956 nothing if adj_nunits is nonnull.
22957 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
22958 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
22959 (emit_mode_fbit): Update use of print_maybe_const_decl.
22960 (emit_move_size): Likewise. Treat the array as non-const
22962 (emit_mode_adjustments): Handle adj_nunits.
22964 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22966 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
22967 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
22968 (VECTOR_MODES): Use it.
22969 (make_vector_modes): Take the prefix as an argument.
22971 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22972 Alan Hayward <alan.hayward@arm.com>
22973 David Sherwood <david.sherwood@arm.com>
22975 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
22976 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
22977 for MODE_VECTOR_BOOL.
22978 * machmode.def (VECTOR_BOOL_MODE): Document.
22979 * genmodes.c (VECTOR_BOOL_MODE): New macro.
22980 (make_vector_bool_mode): New function.
22981 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
22983 * lto-streamer-in.c (lto_input_mode_table): Likewise.
22984 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
22986 * stor-layout.c (int_mode_for_mode): Likewise.
22987 * tree.c (build_vector_type_for_mode): Likewise.
22988 * varasm.c (output_constant_pool_2): Likewise.
22989 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
22990 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
22991 for MODE_VECTOR_BOOL.
22992 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
22993 of mode class checks.
22994 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
22995 instead of a list of mode class checks.
22996 (expand_vector_scalar_condition): Likewise.
22997 (type_for_widest_vector_mode): Handle BImode as an inner mode.
22999 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23000 Alan Hayward <alan.hayward@arm.com>
23001 David Sherwood <david.sherwood@arm.com>
23003 * machmode.h (mode_size): Change from unsigned short to
23005 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
23006 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
23007 or if measurement_type is not polynomial.
23008 (fixed_size_mode::includes_p): Check for constant-sized modes.
23009 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
23010 return a poly_uint16 rather than an unsigned short.
23011 (emit_mode_size): Change the type of mode_size from unsigned short
23012 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
23013 (emit_mode_adjustments): Cope with polynomial vector sizes.
23014 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23016 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23018 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
23019 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
23020 * caller-save.c (setup_save_areas): Likewise.
23021 (replace_reg_with_saved_mem): Likewise.
23022 * calls.c (emit_library_call_value_1): Likewise.
23023 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
23024 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
23025 (gen_lowpart_for_combine): Likewise.
23026 * convert.c (convert_to_integer_1): Likewise.
23027 * cse.c (equiv_constant, cse_insn): Likewise.
23028 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
23029 (cselib_subst_to_values): Likewise.
23030 * dce.c (word_dce_process_block): Likewise.
23031 * df-problems.c (df_word_lr_mark_ref): Likewise.
23032 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
23033 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
23034 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
23035 (rtl_for_decl_location): Likewise.
23036 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
23037 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
23038 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
23039 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
23040 (expand_expr_real_1): Likewise.
23041 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
23042 (pad_below): Likewise.
23043 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
23044 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
23045 * ira.c (get_subreg_tracking_sizes): Likewise.
23046 * ira-build.c (ira_create_allocno_objects): Likewise.
23047 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
23048 (ira_sort_regnos_for_alter_reg): Likewise.
23049 * ira-costs.c (record_operand_costs): Likewise.
23050 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
23051 (resolve_simple_move): Likewise.
23052 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
23053 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
23054 (lra_constraints): Likewise.
23055 (CONST_POOL_OK_P): Reject variable-sized modes.
23056 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
23057 (add_pseudo_to_slot, lra_spill): Likewise.
23058 * omp-low.c (omp_clause_aligned_alignment): Likewise.
23059 * optabs-query.c (get_best_extraction_insn): Likewise.
23060 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
23061 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
23062 (expand_mult_highpart, valid_multiword_target_p): Likewise.
23063 * recog.c (offsettable_address_addr_space_p): Likewise.
23064 * regcprop.c (maybe_mode_change): Likewise.
23065 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
23066 * regrename.c (build_def_use): Likewise.
23067 * regstat.c (dump_reg_info): Likewise.
23068 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
23069 (find_reloads, find_reloads_subreg_address): Likewise.
23070 * reload1.c (eliminate_regs_1): Likewise.
23071 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
23072 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
23073 (simplify_binary_operation_1, simplify_subreg): Likewise.
23074 * targhooks.c (default_function_arg_padding): Likewise.
23075 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
23076 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
23077 (verify_gimple_assign_ternary): Likewise.
23078 * tree-inline.c (estimate_move_cost): Likewise.
23079 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23080 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
23081 (get_address_cost_ainc): Likewise.
23082 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
23083 (vect_supportable_dr_alignment): Likewise.
23084 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
23085 (vectorizable_reduction): Likewise.
23086 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
23087 (vectorizable_operation, vectorizable_load): Likewise.
23088 * tree.c (build_same_sized_truth_vector_type): Likewise.
23089 * valtrack.c (cleanup_auto_inc_dec): Likewise.
23090 * var-tracking.c (emit_note_insn_var_location): Likewise.
23091 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
23092 (ADDR_VEC_ALIGN): Likewise.
23094 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23095 Alan Hayward <alan.hayward@arm.com>
23096 David Sherwood <david.sherwood@arm.com>
23098 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
23100 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
23101 or if measurement_type is polynomial.
23102 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
23103 * combine.c (make_extraction): Likewise.
23104 * dse.c (find_shift_sequence): Likewise.
23105 * dwarf2out.c (mem_loc_descriptor): Likewise.
23106 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
23107 (extract_bit_field, extract_low_bits): Likewise.
23108 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
23109 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
23110 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
23111 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
23112 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
23113 * reload.c (find_reloads): Likewise.
23114 * reload1.c (alter_reg): Likewise.
23115 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
23116 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
23117 * tree-if-conv.c (predicate_mem_writes): Likewise.
23118 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
23119 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
23120 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
23121 * valtrack.c (dead_debug_insert_temp): Likewise.
23122 * varasm.c (mergeable_constant_section): Likewise.
23123 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
23125 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23126 Alan Hayward <alan.hayward@arm.com>
23127 David Sherwood <david.sherwood@arm.com>
23129 * expr.c (expand_assignment): Cope with polynomial mode sizes
23130 when assigning to a CONCAT.
23132 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23133 Alan Hayward <alan.hayward@arm.com>
23134 David Sherwood <david.sherwood@arm.com>
23136 * machmode.h (mode_precision): Change from unsigned short to
23138 (mode_to_precision): Return a poly_uint16 rather than an unsigned
23140 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
23141 or if measurement_type is not polynomial.
23142 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
23143 in which the mode is already known to be a scalar_int_mode.
23144 * genmodes.c (emit_mode_precision): Change the type of mode_precision
23145 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
23147 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23148 for GET_MODE_PRECISION.
23149 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23150 for GET_MODE_PRECISION.
23151 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
23153 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
23154 (expand_field_assignment, make_extraction): Likewise.
23155 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
23156 (get_last_value): Likewise.
23157 * convert.c (convert_to_integer_1): Likewise.
23158 * cse.c (cse_insn): Likewise.
23159 * expr.c (expand_expr_real_1): Likewise.
23160 * lra-constraints.c (simplify_operand_subreg): Likewise.
23161 * optabs-query.c (can_atomic_load_p): Likewise.
23162 * optabs.c (expand_atomic_load): Likewise.
23163 (expand_atomic_store): Likewise.
23164 * ree.c (combine_reaching_defs): Likewise.
23165 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
23166 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
23167 * tree.h (type_has_mode_precision_p): Likewise.
23168 * ubsan.c (instrument_si_overflow): Likewise.
23170 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23171 Alan Hayward <alan.hayward@arm.com>
23172 David Sherwood <david.sherwood@arm.com>
23174 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
23175 polynomial numbers of units.
23176 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
23177 (valid_vector_subparts_p): New function.
23178 (build_vector_type): Remove temporary shim and take the number
23179 of units as a poly_uint64 rather than an int.
23180 (build_opaque_vector_type): Take the number of units as a
23181 poly_uint64 rather than an int.
23182 * tree.c (build_vector_from_ctor): Handle polynomial
23183 TYPE_VECTOR_SUBPARTS.
23184 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
23185 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
23186 (build_vector_from_val): If the number of units is variable,
23187 use build_vec_duplicate_cst for constant operands and
23188 VEC_DUPLICATE_EXPR otherwise.
23189 (make_vector_type): Remove temporary is_constant ().
23190 (build_vector_type, build_opaque_vector_type): Take the number of
23191 units as a poly_uint64 rather than an int.
23192 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
23194 * cfgexpand.c (expand_debug_expr): Likewise.
23195 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
23196 (store_constructor, expand_expr_real_1): Likewise.
23197 (const_scalar_mask_from_tree): Likewise.
23198 * fold-const-call.c (fold_const_reduction): Likewise.
23199 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
23200 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
23201 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
23202 (fold_relational_const): Likewise.
23203 (native_interpret_vector): Likewise. Change the size from an
23204 int to an unsigned int.
23205 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
23206 TYPE_VECTOR_SUBPARTS.
23207 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
23208 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
23209 duplicating a non-constant operand into a variable-length vector.
23210 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
23211 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
23212 * ipa-icf.c (sem_variable::equals): Likewise.
23213 * match.pd: Likewise.
23214 * omp-simd-clone.c (simd_clone_subparts): Likewise.
23215 * print-tree.c (print_node): Likewise.
23216 * stor-layout.c (layout_type): Likewise.
23217 * targhooks.c (default_builtin_vectorization_cost): Likewise.
23218 * tree-cfg.c (verify_gimple_comparison): Likewise.
23219 (verify_gimple_assign_binary): Likewise.
23220 (verify_gimple_assign_ternary): Likewise.
23221 (verify_gimple_assign_single): Likewise.
23222 * tree-pretty-print.c (dump_generic_node): Likewise.
23223 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23224 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
23225 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
23226 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
23227 (vect_shift_permute_load_chain): Likewise.
23228 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
23229 (expand_vector_condition, optimize_vector_constructor): Likewise.
23230 (lower_vec_perm, get_compute_type): Likewise.
23231 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
23232 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
23233 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
23234 (vect_recog_mask_conversion_pattern): Likewise.
23235 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
23236 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
23237 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23238 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
23239 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
23240 (vectorizable_shift, vectorizable_operation, vectorizable_store)
23241 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
23242 (supportable_widening_operation): Likewise.
23243 (supportable_narrowing_operation): Likewise.
23244 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
23246 * varasm.c (output_constant): Likewise.
23248 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23249 Alan Hayward <alan.hayward@arm.com>
23250 David Sherwood <david.sherwood@arm.com>
23252 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
23253 so that both the length == 3 and length != 3 cases set up their
23254 own permute vectors. Add comments explaining why we know the
23255 number of elements is constant.
23256 (vect_permute_load_chain): Likewise.
23258 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23259 Alan Hayward <alan.hayward@arm.com>
23260 David Sherwood <david.sherwood@arm.com>
23262 * machmode.h (mode_nunits): Change from unsigned char to
23264 (ONLY_FIXED_SIZE_MODES): New macro.
23265 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
23266 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
23267 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
23269 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
23270 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
23271 or if measurement_type is not polynomial.
23272 * genmodes.c (ZERO_COEFFS): New macro.
23273 (emit_mode_nunits_inline): Make mode_nunits_inline return a
23275 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
23276 Use ZERO_COEFFS when emitting initializers.
23277 * data-streamer.h (bp_pack_poly_value): New function.
23278 (bp_unpack_poly_value): Likewise.
23279 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23280 for GET_MODE_NUNITS.
23281 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23282 for GET_MODE_NUNITS.
23283 * tree.c (make_vector_type): Remove temporary shim and make
23284 the real function take the number of units as a poly_uint64
23285 rather than an int.
23286 (build_vector_type_for_mode): Handle polynomial nunits.
23287 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
23288 * emit-rtl.c (const_vec_series_p_1): Likewise.
23289 (gen_rtx_CONST_VECTOR): Likewise.
23290 * fold-const.c (test_vec_duplicate_folding): Likewise.
23291 * genrecog.c (validate_pattern): Likewise.
23292 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
23293 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
23294 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
23295 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
23296 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
23297 * rtlanal.c (subreg_get_info): Likewise.
23298 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23299 (vect_grouped_load_supported): Likewise.
23300 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
23301 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
23302 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
23303 (simplify_const_unary_operation, simplify_binary_operation_1)
23304 (simplify_const_binary_operation, simplify_ternary_operation)
23305 (test_vector_ops_duplicate, test_vector_ops): Likewise.
23306 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
23307 instead of CONST_VECTOR_NUNITS.
23308 * varasm.c (output_constant_pool_2): Likewise.
23309 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
23310 explicit-encoded elements in the XVEC for variable-length vectors.
23312 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23314 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
23316 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23317 Alan Hayward <alan.hayward@arm.com>
23318 David Sherwood <david.sherwood@arm.com>
23320 * coretypes.h (fixed_size_mode): Declare.
23321 (fixed_size_mode_pod): New typedef.
23322 * builtins.h (target_builtins::x_apply_args_mode)
23323 (target_builtins::x_apply_result_mode): Change type to
23324 fixed_size_mode_pod.
23325 * builtins.c (apply_args_size, apply_result_size, result_vector)
23326 (expand_builtin_apply_args_1, expand_builtin_apply)
23327 (expand_builtin_return): Update accordingly.
23329 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23331 * cse.c (hash_rtx_cb): Hash only the encoded elements.
23332 * cselib.c (cselib_hash_rtx): Likewise.
23333 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
23334 CONST_VECTOR encoding.
23336 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23337 Jeff Law <law@redhat.com>
23340 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
23341 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
23342 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
23343 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
23346 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
23347 explicitly probe *sp in a noreturn function if there were any callee
23348 register saves or frame pointer is needed.
23350 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23353 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
23354 BLKmode for ternary, binary or unary expressions.
23357 * var-tracking.c (delete_vta_debug_insn): New inline function.
23358 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
23359 insns from get_insns () to NULL instead of each bb separately.
23360 Use delete_vta_debug_insn. No longer static.
23361 (vt_debug_insns_local, variable_tracking_main_1): Adjust
23362 delete_vta_debug_insns callers.
23363 * rtl.h (delete_vta_debug_insns): Declare.
23364 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
23365 instead of variable_tracking_main.
23367 2018-01-03 Martin Sebor <msebor@redhat.com>
23369 PR tree-optimization/83603
23370 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
23371 arguments past the endof the argument list in functions declared
23372 without a prototype.
23373 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
23374 Avoid checking when arguments are null.
23376 2018-01-03 Martin Sebor <msebor@redhat.com>
23379 * doc/extend.texi (attribute const): Fix a typo.
23380 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
23381 issuing -Wsuggest-attribute for void functions.
23383 2018-01-03 Martin Sebor <msebor@redhat.com>
23385 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
23386 offset_int::from instead of wide_int::to_shwi.
23387 (maybe_diag_overlap): Remove assertion.
23388 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
23389 * gimple-ssa-sprintf.c (format_directive): Same.
23390 (parse_directive): Same.
23391 (sprintf_dom_walker::compute_format_length): Same.
23392 (try_substitute_return_value): Same.
23394 2018-01-03 Jeff Law <law@redhat.com>
23396 PR middle-end/83654
23397 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
23398 non-constant residual for zero at runtime and avoid probing in
23399 that case. Reorganize code for trailing problem to mirror handling
23402 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23404 PR tree-optimization/83501
23405 * tree-ssa-strlen.c (get_string_cst): New.
23406 (handle_char_store): Call get_string_cst.
23408 2018-01-03 Martin Liska <mliska@suse.cz>
23410 PR tree-optimization/83593
23411 * tree-ssa-strlen.c: Include tree-cfg.h.
23412 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
23413 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
23414 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
23416 (strlen_dom_walker::before_dom_children): Call
23417 gimple_purge_dead_eh_edges. Dump tranformation with details
23419 (strlen_dom_walker::before_dom_children): Update call by adding
23420 new argument cleanup_eh.
23421 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
23423 2018-01-03 Martin Liska <mliska@suse.cz>
23426 * cif-code.def (VARIADIC_THUNK): New enum value.
23427 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
23430 2018-01-03 Jan Beulich <jbeulich@suse.com>
23432 * sse.md (mov<mode>_internal): Tighten condition for when to use
23433 vmovdqu<ssescalarsize> for TI and OI modes.
23435 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23437 Update copyright years.
23439 2018-01-03 Martin Liska <mliska@suse.cz>
23442 * ipa-visibility.c (function_and_variable_visibility): Skip
23443 functions with noipa attribure.
23445 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23447 * gcc.c (process_command): Update copyright notice dates.
23448 * gcov-dump.c (print_version): Ditto.
23449 * gcov.c (print_version): Ditto.
23450 * gcov-tool.c (print_version): Ditto.
23451 * gengtype.c (create_file): Ditto.
23452 * doc/cpp.texi: Bump @copying's copyright year.
23453 * doc/cppinternals.texi: Ditto.
23454 * doc/gcc.texi: Ditto.
23455 * doc/gccint.texi: Ditto.
23456 * doc/gcov.texi: Ditto.
23457 * doc/install.texi: Ditto.
23458 * doc/invoke.texi: Ditto.
23460 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23462 * vector-builder.h (vector_builder::m_full_nelts): Change from
23463 unsigned int to poly_uint64.
23464 (vector_builder::full_nelts): Update prototype accordingly.
23465 (vector_builder::new_vector): Likewise.
23466 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
23467 (vector_builder::operator ==): Likewise.
23468 (vector_builder::finalize): Likewise.
23469 * int-vector-builder.h (int_vector_builder::int_vector_builder):
23470 Take the number of elements as a poly_uint64 rather than an
23472 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
23473 from unsigned int to poly_uint64.
23474 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
23475 (vec_perm_indices::new_vector): Likewise.
23476 (vec_perm_indices::length): Likewise.
23477 (vec_perm_indices::nelts_per_input): Likewise.
23478 (vec_perm_indices::input_nelts): Likewise.
23479 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
23480 number of elements per input as a poly_uint64 rather than an
23481 unsigned int. Use the original encoding for variable-length
23482 vectors, rather than clamping each individual element.
23483 For the second and subsequent elements in each pattern,
23484 clamp the step and base before clamping their sum.
23485 (vec_perm_indices::series_p): Handle polynomial element counts.
23486 (vec_perm_indices::all_in_range_p): Likewise.
23487 (vec_perm_indices_to_tree): Likewise.
23488 (vec_perm_indices_to_rtx): Likewise.
23489 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
23490 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
23491 (tree_vector_builder::new_binary_operation): Handle polynomial
23492 element counts. Return false if we need to know the number
23493 of elements at compile time.
23494 * fold-const.c (fold_vec_perm): Punt if the number of elements
23495 isn't known at compile time.
23497 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23499 * vec-perm-indices.h (vec_perm_builder): Change element type
23500 from HOST_WIDE_INT to poly_int64.
23501 (vec_perm_indices::element_type): Update accordingly.
23502 (vec_perm_indices::clamp): Handle polynomial element_types.
23503 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
23504 (vec_perm_indices::all_in_range_p): Likewise.
23505 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
23507 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
23508 polynomial vec_perm_indices element types.
23509 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
23510 * fold-const.c (fold_vec_perm): Likewise.
23511 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
23512 * tree-vect-generic.c (lower_vec_perm): Likewise.
23513 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
23514 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
23515 element type to HOST_WIDE_INT.
23517 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23518 Alan Hayward <alan.hayward@arm.com>
23519 David Sherwood <david.sherwood@arm.com>
23521 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
23522 rather than an int. Use plus_constant.
23523 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
23524 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
23526 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23527 Alan Hayward <alan.hayward@arm.com>
23528 David Sherwood <david.sherwood@arm.com>
23530 * calls.c (emit_call_1, expand_call): Change struct_value_size from
23531 a HOST_WIDE_INT to a poly_int64.
23533 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23534 Alan Hayward <alan.hayward@arm.com>
23535 David Sherwood <david.sherwood@arm.com>
23537 * calls.c (load_register_parameters): Cope with polynomial
23538 mode sizes. Require a constant size for BLKmode parameters
23539 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
23540 forces a parameter to be padded at the lsb end in order to
23541 fill a complete number of words, require the parameter size
23542 to be ordered wrt UNITS_PER_WORD.
23544 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23545 Alan Hayward <alan.hayward@arm.com>
23546 David Sherwood <david.sherwood@arm.com>
23548 * reload1.c (spill_stack_slot_width): Change element type
23549 from unsigned int to poly_uint64_pod.
23550 (alter_reg): Treat mode sizes as polynomial.
23552 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23553 Alan Hayward <alan.hayward@arm.com>
23554 David Sherwood <david.sherwood@arm.com>
23556 * reload.c (complex_word_subreg_p): New function.
23557 (reload_inner_reg_of_subreg, push_reload): Use it.
23559 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23560 Alan Hayward <alan.hayward@arm.com>
23561 David Sherwood <david.sherwood@arm.com>
23563 * lra-constraints.c (process_alt_operands): Reject matched
23564 operands whose sizes aren't ordered.
23565 (match_reload): Refer to this check here.
23567 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23568 Alan Hayward <alan.hayward@arm.com>
23569 David Sherwood <david.sherwood@arm.com>
23571 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
23572 that the mode size is in the set {1, 2, 4, 8, 16}.
23574 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23575 Alan Hayward <alan.hayward@arm.com>
23576 David Sherwood <david.sherwood@arm.com>
23578 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
23579 Use plus_constant instead of gen_rtx_PLUS.
23581 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23582 Alan Hayward <alan.hayward@arm.com>
23583 David Sherwood <david.sherwood@arm.com>
23585 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
23586 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
23587 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
23588 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
23589 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
23590 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
23591 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
23592 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
23593 * config/i386/i386.c (ix86_push_rounding): ...this new function.
23594 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
23596 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
23597 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
23598 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
23599 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
23600 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
23601 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
23602 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
23603 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
23604 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
23605 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
23607 * expr.c (emit_move_resolve_push): Treat the input and result
23608 of PUSH_ROUNDING as a poly_int64.
23609 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
23610 (emit_push_insn): Likewise.
23611 * lra-eliminations.c (mark_not_eliminable): Likewise.
23612 * recog.c (push_operand): Likewise.
23613 * reload1.c (elimination_effects): Likewise.
23614 * rtlanal.c (nonzero_bits1): Likewise.
23615 * calls.c (store_one_arg): Likewise. Require the padding to be
23616 known at compile time.
23618 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23619 Alan Hayward <alan.hayward@arm.com>
23620 David Sherwood <david.sherwood@arm.com>
23622 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
23623 Use plus_constant instead of gen_rtx_PLUS.
23625 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23626 Alan Hayward <alan.hayward@arm.com>
23627 David Sherwood <david.sherwood@arm.com>
23629 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
23630 rather than an int.
23632 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23633 Alan Hayward <alan.hayward@arm.com>
23634 David Sherwood <david.sherwood@arm.com>
23636 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
23637 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
23638 via stack temporaries. Treat the mode size as polynomial too.
23640 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23641 Alan Hayward <alan.hayward@arm.com>
23642 David Sherwood <david.sherwood@arm.com>
23644 * expr.c (expand_expr_real_2): When handling conversions involving
23645 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
23646 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
23647 as a poly_uint64 too.
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 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
23655 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23656 Alan Hayward <alan.hayward@arm.com>
23657 David Sherwood <david.sherwood@arm.com>
23659 * combine.c (can_change_dest_mode): Handle polynomial
23660 REGMODE_NATURAL_SIZE.
23661 * expmed.c (store_bit_field_1): Likewise.
23662 * expr.c (store_constructor): Likewise.
23663 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
23664 and polynomial REGMODE_NATURAL_SIZE.
23665 (gen_lowpart_common): Likewise.
23666 * reginfo.c (record_subregs_of_mode): Likewise.
23667 * rtlanal.c (read_modify_subreg_p): Likewise.
23669 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23670 Alan Hayward <alan.hayward@arm.com>
23671 David Sherwood <david.sherwood@arm.com>
23673 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
23674 numbers of elements.
23676 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23677 Alan Hayward <alan.hayward@arm.com>
23678 David Sherwood <david.sherwood@arm.com>
23680 * match.pd: Cope with polynomial numbers of vector elements.
23682 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23683 Alan Hayward <alan.hayward@arm.com>
23684 David Sherwood <david.sherwood@arm.com>
23686 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
23687 in a POINTER_PLUS_EXPR.
23689 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23690 Alan Hayward <alan.hayward@arm.com>
23691 David Sherwood <david.sherwood@arm.com>
23693 * omp-simd-clone.c (simd_clone_subparts): New function.
23694 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
23695 (ipa_simd_modify_function_body): Likewise.
23697 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23698 Alan Hayward <alan.hayward@arm.com>
23699 David Sherwood <david.sherwood@arm.com>
23701 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
23702 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
23703 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
23704 (expand_vector_condition, vector_element): Likewise.
23705 (subparts_gt): New function.
23706 (get_compute_type): Use subparts_gt.
23707 (count_type_subparts): Delete.
23708 (expand_vector_operations_1): Use subparts_gt instead of
23709 count_type_subparts.
23711 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23712 Alan Hayward <alan.hayward@arm.com>
23713 David Sherwood <david.sherwood@arm.com>
23715 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
23716 (vect_compile_time_alias): ...this new function. Do the calculation
23717 on poly_ints rather than trees.
23718 (vect_prune_runtime_alias_test_list): Update call accordingly.
23720 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23721 Alan Hayward <alan.hayward@arm.com>
23722 David Sherwood <david.sherwood@arm.com>
23724 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
23726 (vect_schedule_slp_instance): Likewise.
23728 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23729 Alan Hayward <alan.hayward@arm.com>
23730 David Sherwood <david.sherwood@arm.com>
23732 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
23733 constant and extern definitions for variable-length vectors.
23734 (vect_get_constant_vectors): Note that the number of units
23735 is known to be constant.
23737 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23738 Alan Hayward <alan.hayward@arm.com>
23739 David Sherwood <david.sherwood@arm.com>
23741 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
23742 of units as polynomial. Choose between WIDE and NARROW based
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 * tree-vect-stmts.c (simd_clone_subparts): New function.
23750 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
23752 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23753 Alan Hayward <alan.hayward@arm.com>
23754 David Sherwood <david.sherwood@arm.com>
23756 * tree-vect-stmts.c (vectorizable_call): Treat the number of
23757 vectors as polynomial. Use build_index_vector for
23758 IFN_GOMP_SIMD_LANE.
23760 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23761 Alan Hayward <alan.hayward@arm.com>
23762 David Sherwood <david.sherwood@arm.com>
23764 * tree-vect-stmts.c (get_load_store_type): Treat the number of
23765 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
23766 for variable-length vectors.
23767 (vectorizable_mask_load_store): Treat the number of units as
23768 polynomial, asserting that it is constant if the condition has
23769 already been enforced.
23770 (vectorizable_store, vectorizable_load): Likewise.
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 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
23777 of units as polynomial. Punt if we can't tell at compile time
23778 which vector contains the final result.
23780 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23781 Alan Hayward <alan.hayward@arm.com>
23782 David Sherwood <david.sherwood@arm.com>
23784 * tree-vect-loop.c (vectorizable_induction): Treat the number
23785 of units as polynomial. Punt on SLP inductions. Use an integer
23786 VEC_SERIES_EXPR for variable-length integer reductions. Use a
23787 cast of such a series for variable-length floating-point
23790 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23791 Alan Hayward <alan.hayward@arm.com>
23792 David Sherwood <david.sherwood@arm.com>
23794 * tree.h (build_index_vector): Declare.
23795 * tree.c (build_index_vector): New function.
23796 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
23797 of units as polynomial, forcibly converting it to a constant if
23798 vectorizable_reduction has already enforced the condition.
23799 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
23800 to create a {1,2,3,...} vector.
23801 (vectorizable_reduction): Treat the number of units as polynomial.
23802 Choose vectype_in based on the largest scalar element size rather
23803 than the smallest number of units. Enforce the restrictions
23806 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23807 Alan Hayward <alan.hayward@arm.com>
23808 David Sherwood <david.sherwood@arm.com>
23810 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
23811 number of units as polynomial.
23813 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23814 Alan Hayward <alan.hayward@arm.com>
23815 David Sherwood <david.sherwood@arm.com>
23817 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
23818 * target.def (autovectorize_vector_sizes): Return the vector sizes
23819 by pointer, using vector_sizes rather than a bitmask.
23820 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
23821 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
23822 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
23824 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
23825 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
23826 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
23827 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
23828 * omp-general.c (omp_max_vf): Likewise.
23829 * omp-low.c (omp_clause_aligned_alignment): Likewise.
23830 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
23831 * tree-vect-loop.c (vect_analyze_loop): Likewise.
23832 * tree-vect-slp.c (vect_slp_bb): Likewise.
23833 * doc/tm.texi: Regenerate.
23834 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
23836 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
23837 the vector size as a poly_uint64 rather than an unsigned int.
23838 (current_vector_size): Change from an unsigned int to a poly_uint64.
23839 (get_vectype_for_scalar_type): Update accordingly.
23840 * tree.h (build_truth_vector_type): Take the size and number of
23841 units as a poly_uint64 rather than an unsigned int.
23842 (build_vector_type): Add a temporary overload that takes
23843 the number of units as a poly_uint64 rather than an unsigned int.
23844 * tree.c (make_vector_type): Likewise.
23845 (build_truth_vector_type): Take the number of units as a poly_uint64
23846 rather than an unsigned int.
23848 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23849 Alan Hayward <alan.hayward@arm.com>
23850 David Sherwood <david.sherwood@arm.com>
23852 * target.def (get_mask_mode): Take the number of units and length
23853 as poly_uint64s rather than unsigned ints.
23854 * targhooks.h (default_get_mask_mode): Update accordingly.
23855 * targhooks.c (default_get_mask_mode): Likewise.
23856 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
23857 * doc/tm.texi: Regenerate.
23859 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23860 Alan Hayward <alan.hayward@arm.com>
23861 David Sherwood <david.sherwood@arm.com>
23863 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
23864 * omp-general.c (omp_max_vf): Likewise.
23865 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
23866 (expand_omp_simd): Handle polynomial safelen.
23867 * omp-low.c (omplow_simd_context): Add a default constructor.
23868 (omplow_simd_context::max_vf): Change from int to poly_uint64.
23869 (lower_rec_simd_input_clauses): Update accordingly.
23870 (lower_rec_input_clauses): Likewise.
23872 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23873 Alan Hayward <alan.hayward@arm.com>
23874 David Sherwood <david.sherwood@arm.com>
23876 * tree-vectorizer.h (vect_nunits_for_cost): New function.
23877 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
23878 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
23879 (vect_analyze_slp_cost): Likewise.
23880 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
23881 (vect_model_load_cost): Likewise.
23883 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23884 Alan Hayward <alan.hayward@arm.com>
23885 David Sherwood <david.sherwood@arm.com>
23887 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
23888 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
23889 from an unsigned int * to a poly_uint64_pod *.
23890 (calculate_unrolling_factor): New function.
23891 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
23893 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23894 Alan Hayward <alan.hayward@arm.com>
23895 David Sherwood <david.sherwood@arm.com>
23897 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
23898 from an unsigned int to a poly_uint64.
23899 (_loop_vec_info::slp_unrolling_factor): Likewise.
23900 (_loop_vec_info::vectorization_factor): Change from an int
23902 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
23903 (vect_get_num_vectors): New function.
23904 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
23905 (vect_get_num_copies): Use vect_get_num_vectors.
23906 (vect_analyze_data_ref_dependences): Change max_vf from an int *
23907 to an unsigned int *.
23908 (vect_analyze_data_refs): Change min_vf from an int * to a
23910 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
23911 than an unsigned HOST_WIDE_INT.
23912 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
23913 (vect_analyze_data_ref_dependence): Change max_vf from an int *
23914 to an unsigned int *.
23915 (vect_analyze_data_ref_dependences): Likewise.
23916 (vect_compute_data_ref_alignment): Handle polynomial vf.
23917 (vect_enhance_data_refs_alignment): Likewise.
23918 (vect_prune_runtime_alias_test_list): Likewise.
23919 (vect_shift_permute_load_chain): Likewise.
23920 (vect_supportable_dr_alignment): Likewise.
23921 (dependence_distance_ge_vf): Take the vectorization factor as a
23922 poly_uint64 rather than an unsigned HOST_WIDE_INT.
23923 (vect_analyze_data_refs): Change min_vf from an int * to a
23925 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
23926 vfm1 as a poly_uint64 rather than an int. Make the same change
23927 for the returned bound_scalar.
23928 (vect_gen_vector_loop_niters): Handle polynomial vf.
23929 (vect_do_peeling): Likewise. Update call to
23930 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
23931 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
23933 * tree-vect-loop.c (vect_determine_vectorization_factor)
23934 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
23935 (vect_get_known_peeling_cost): Likewise.
23936 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
23937 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
23938 (vect_transform_loop): Likewise. Use the lowest possible VF when
23939 updating the upper bounds of the loop.
23940 (vect_min_worthwhile_factor): Make static. Return an unsigned int
23941 rather than an int.
23942 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
23943 polynomial unroll factors.
23944 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
23945 (vect_make_slp_decision): Likewise.
23946 (vect_supported_load_permutation_p): Likewise, and polynomial
23948 (vect_analyze_slp_cost): Handle polynomial vf.
23949 (vect_slp_analyze_node_operations): Likewise.
23950 (vect_slp_analyze_bb_1): Likewise.
23951 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
23952 than an unsigned HOST_WIDE_INT.
23953 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
23954 (vectorizable_load): Handle polynomial vf.
23955 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
23957 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
23959 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23960 Alan Hayward <alan.hayward@arm.com>
23961 David Sherwood <david.sherwood@arm.com>
23963 * match.pd: Handle bit operations involving three constants
23964 and try to fold one pair.
23966 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23968 * tree-vect-loop-manip.c: Include gimple-fold.h.
23969 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
23970 niters_maybe_zero parameters. Handle other cases besides a step of 1.
23971 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
23972 Add a path that uses a step of VF instead of 1, but disable it
23974 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
23975 and niters_no_overflow parameters. Update calls to
23976 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
23977 Create a new SSA name if the latter choses to use a ste other
23978 than zero, and return it via niters_vector_mult_vf_var.
23979 * tree-vect-loop.c (vect_transform_loop): Update calls to
23980 vect_do_peeling, vect_gen_vector_loop_niters and
23981 slpeel_make_loop_iterate_ntimes.
23982 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
23983 (vect_gen_vector_loop_niters): Update declarations after above changes.
23985 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
23987 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
23988 128-bit round to integer instructions.
23989 (ceil<mode>2): Likewise.
23990 (btrunc<mode>2): Likewise.
23991 (round<mode>2): Likewise.
23993 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23995 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
23996 unaligned VSX load/store on P8/P9.
23997 (expand_block_clear): Allow the use of unaligned VSX
23998 load/store on P8/P9.
24000 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24002 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
24004 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
24005 swap associated with both a load and a store.
24007 2018-01-02 Andrew Waterman <andrew@sifive.com>
24009 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
24010 * config/riscv/riscv.md (clear_cache): Use it.
24012 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
24014 * web.c: Remove out-of-date comment.
24016 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24018 * expr.c (fixup_args_size_notes): Check that any existing
24019 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
24020 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
24021 (emit_single_push_insn): ...here.
24023 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24025 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
24026 (const_vector_encoded_nelts): New function.
24027 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
24028 (const_vector_int_elt, const_vector_elt): Declare.
24029 * emit-rtl.c (const_vector_int_elt_1): New function.
24030 (const_vector_elt): Likewise.
24031 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
24032 of CONST_VECTOR_ELT.
24034 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24036 * expr.c: Include rtx-vector-builder.h.
24037 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
24038 directly on the tree encoding.
24039 (const_vector_from_tree): Likewise.
24040 * optabs.c: Include rtx-vector-builder.h.
24041 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
24042 sequence of "u" values.
24043 * vec-perm-indices.c: Include rtx-vector-builder.h.
24044 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
24045 directly on the vec_perm_indices encoding.
24047 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24049 * doc/rtl.texi (const_vector): Describe new encoding scheme.
24050 * Makefile.in (OBJS): Add rtx-vector-builder.o.
24051 * rtx-vector-builder.h: New file.
24052 * rtx-vector-builder.c: Likewise.
24053 * rtl.h (rtx_def::u2): Add a const_vector field.
24054 (CONST_VECTOR_NPATTERNS): New macro.
24055 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
24056 (CONST_VECTOR_DUPLICATE_P): Likewise.
24057 (CONST_VECTOR_STEPPED_P): Likewise.
24058 (CONST_VECTOR_ENCODED_ELT): Likewise.
24059 (const_vec_duplicate_p): Check for a duplicated vector encoding.
24060 (unwrap_const_vec_duplicate): Likewise.
24061 (const_vec_series_p): Check for a non-duplicated vector encoding.
24062 Say that the function only returns true for integer vectors.
24063 * emit-rtl.c: Include rtx-vector-builder.h.
24064 (gen_const_vec_duplicate_1): Delete.
24065 (gen_const_vector): Call gen_const_vec_duplicate instead of
24066 gen_const_vec_duplicate_1.
24067 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
24068 (gen_const_vec_duplicate): Use rtx_vector_builder.
24069 (gen_const_vec_series): Likewise.
24070 (gen_rtx_CONST_VECTOR): Likewise.
24071 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
24072 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
24073 Build a new vector rather than modifying a CONST_VECTOR in-place.
24074 (handle_special_swappables): Update call accordingly.
24075 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
24076 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
24077 Build a new vector rather than modifying a CONST_VECTOR in-place.
24078 (handle_special_swappables): Update call accordingly.
24080 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24082 * simplify-rtx.c (simplify_const_binary_operation): Use
24083 CONST_VECTOR_ELT instead of XVECEXP.
24085 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24087 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
24088 the selector elements to be different from the data elements
24089 if the selector is a VECTOR_CST.
24090 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
24091 ssizetype for the selector.
24093 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24095 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
24096 before testing each element individually.
24097 * tree-vect-generic.c (lower_vec_perm): Likewise.
24099 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24101 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
24102 * selftest-run-tests.c (selftest::run_tests): Call it.
24103 * vector-builder.h (vector_builder::operator ==): New function.
24104 (vector_builder::operator !=): Likewise.
24105 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
24106 (vec_perm_indices::all_from_input_p): New function.
24107 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24108 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
24109 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
24110 instead of reading the VECTOR_CST directly. Detect whether both
24111 vector inputs are the same before constructing the vec_perm_indices,
24112 and update the number of inputs argument accordingly. Use the
24113 utility functions added above. Only construct sel2 if we need to.
24115 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24117 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
24118 the broadcast of the low byte.
24119 (expand_mult_highpart): Use an explicit encoding for the permutes.
24120 * optabs-query.c (can_mult_highpart_p): Likewise.
24121 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
24122 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24123 (vectorizable_bswap): Likewise.
24124 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
24125 explicit encoding for the power-of-2 permutes.
24126 (vect_permute_store_chain): Likewise.
24127 (vect_grouped_load_supported): Likewise.
24128 (vect_permute_load_chain): Likewise.
24130 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24132 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
24133 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
24134 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
24135 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24136 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
24137 (vect_gen_perm_mask_any): Likewise.
24139 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24141 * int-vector-builder.h: New file.
24142 * vec-perm-indices.h: Include int-vector-builder.h.
24143 (vec_perm_indices): Redefine as an int_vector_builder.
24144 (auto_vec_perm_indices): Delete.
24145 (vec_perm_builder): Redefine as a stand-alone class.
24146 (vec_perm_indices::vec_perm_indices): New function.
24147 (vec_perm_indices::clamp): Likewise.
24148 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
24149 (vec_perm_indices::new_vector): New function.
24150 (vec_perm_indices::new_expanded_vector): Update for new
24151 vec_perm_indices class.
24152 (vec_perm_indices::rotate_inputs): New function.
24153 (vec_perm_indices::all_in_range_p): Operate directly on the
24154 encoded form, without computing elided elements.
24155 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
24156 encoding. Update for new vec_perm_indices class.
24157 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
24158 the given vec_perm_builder.
24159 (expand_vec_perm_var): Update vec_perm_builder constructor.
24160 (expand_mult_highpart): Use vec_perm_builder instead of
24161 auto_vec_perm_indices.
24162 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
24163 vec_perm_indices instead of auto_vec_perm_indices. Use a single
24164 or double series encoding as appropriate.
24165 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
24166 vec_perm_indices instead of auto_vec_perm_indices.
24167 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24168 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24169 (vect_permute_store_chain): Likewise.
24170 (vect_grouped_load_supported): Likewise.
24171 (vect_permute_load_chain): Likewise.
24172 (vect_shift_permute_load_chain): Likewise.
24173 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
24174 (vect_transform_slp_perm_load): Likewise.
24175 (vect_schedule_slp_instance): Likewise.
24176 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24177 (vectorizable_mask_load_store): Likewise.
24178 (vectorizable_bswap): Likewise.
24179 (vectorizable_store): Likewise.
24180 (vectorizable_load): Likewise.
24181 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
24182 vec_perm_indices instead of auto_vec_perm_indices. Use
24183 tree_to_vec_perm_builder to read the vector from a tree.
24184 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
24185 vec_perm_builder instead of a vec_perm_indices.
24186 (have_whole_vector_shift): Use vec_perm_builder and
24187 vec_perm_indices instead of auto_vec_perm_indices. Leave the
24188 truncation to calc_vec_perm_mask_for_shift.
24189 (vect_create_epilog_for_reduction): Likewise.
24190 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
24191 from auto_vec_perm_indices to vec_perm_indices.
24192 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
24193 instead of changing individual elements.
24194 (aarch64_vectorize_vec_perm_const): Use new_vector to install
24195 the vector in d.perm.
24196 * config/arm/arm.c (expand_vec_perm_d::perm): Change
24197 from auto_vec_perm_indices to vec_perm_indices.
24198 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
24199 instead of changing individual elements.
24200 (arm_vectorize_vec_perm_const): Use new_vector to install
24201 the vector in d.perm.
24202 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
24203 Update vec_perm_builder constructor.
24204 (rs6000_expand_interleave): Likewise.
24205 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
24206 (rs6000_expand_interleave): Likewise.
24208 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24210 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
24211 to qimode could truncate the indices.
24212 * optabs.c (expand_vec_perm_var): Likewise.
24214 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24216 * Makefile.in (OBJS): Add vec-perm-indices.o.
24217 * vec-perm-indices.h: New file.
24218 * vec-perm-indices.c: Likewise.
24219 * target.h (vec_perm_indices): Replace with a forward class
24221 (auto_vec_perm_indices): Move to vec-perm-indices.h.
24222 * optabs.h: Include vec-perm-indices.h.
24223 (expand_vec_perm): Delete.
24224 (selector_fits_mode_p, expand_vec_perm_var): Declare.
24225 (expand_vec_perm_const): Declare.
24226 * target.def (vec_perm_const_ok): Replace with...
24227 (vec_perm_const): ...this new hook.
24228 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
24229 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
24230 * doc/tm.texi: Regenerate.
24231 * optabs.def (vec_perm_const): Delete.
24232 * doc/md.texi (vec_perm_const): Likewise.
24233 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
24234 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
24235 expand_vec_perm for constant permutation vectors. Assert that
24236 the mode of variable permutation vectors is the integer equivalent
24237 of the mode that is being permuted.
24238 * optabs-query.h (selector_fits_mode_p): Declare.
24239 * optabs-query.c: Include vec-perm-indices.h.
24240 (selector_fits_mode_p): New function.
24241 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
24242 is defined, instead of checking whether the vec_perm_const_optab
24243 exists. Use targetm.vectorize.vec_perm_const instead of
24244 targetm.vectorize.vec_perm_const_ok. Check whether the indices
24245 fit in the vector mode before using a variable permute.
24246 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
24247 vec_perm_indices instead of an rtx.
24248 (expand_vec_perm): Replace with...
24249 (expand_vec_perm_const): ...this new function. Take the selector
24250 as a vec_perm_indices rather than an rtx. Also take the mode of
24251 the selector. Update call to shift_amt_for_vec_perm_mask.
24252 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
24253 Use vec_perm_indices::new_expanded_vector to expand the original
24254 selector into bytes. Check whether the indices fit in the vector
24255 mode before using a variable permute.
24256 (expand_vec_perm_var): Make global.
24257 (expand_mult_highpart): Use expand_vec_perm_const.
24258 * fold-const.c: Includes vec-perm-indices.h.
24259 * tree-ssa-forwprop.c: Likewise.
24260 * tree-vect-data-refs.c: Likewise.
24261 * tree-vect-generic.c: Likewise.
24262 * tree-vect-loop.c: Likewise.
24263 * tree-vect-slp.c: Likewise.
24264 * tree-vect-stmts.c: Likewise.
24265 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
24267 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
24268 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
24269 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
24270 (aarch64_vectorize_vec_perm_const): ...this new function.
24271 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24272 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24273 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
24274 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
24275 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24276 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24277 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
24279 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
24280 check for NEON modes.
24281 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
24282 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
24283 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
24284 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
24286 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
24287 the old VEC_PERM_CONST conditions.
24288 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
24289 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
24290 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
24291 (ia64_vectorize_vec_perm_const_ok): Merge into...
24292 (ia64_vectorize_vec_perm_const): ...this new function.
24293 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
24294 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
24295 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
24296 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
24297 * config/mips/mips.c (mips_expand_vec_perm_const)
24298 (mips_vectorize_vec_perm_const_ok): Merge into...
24299 (mips_vectorize_vec_perm_const): ...this new function.
24300 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
24301 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
24302 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
24303 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
24304 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
24305 (rs6000_expand_vec_perm_const): Delete.
24306 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
24308 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24309 (altivec_expand_vec_perm_const_le): Take each operand individually.
24310 Operate on constant selectors rather than rtxes.
24311 (altivec_expand_vec_perm_const): Likewise. Update call to
24312 altivec_expand_vec_perm_const_le.
24313 (rs6000_expand_vec_perm_const): Delete.
24314 (rs6000_vectorize_vec_perm_const_ok): Delete.
24315 (rs6000_vectorize_vec_perm_const): New function.
24316 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
24317 an element count and rtx array.
24318 (rs6000_expand_extract_even): Update call accordingly.
24319 (rs6000_expand_interleave): Likewise.
24320 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
24321 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
24322 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
24323 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
24324 (rs6000_expand_vec_perm_const): Delete.
24325 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24326 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24327 (altivec_expand_vec_perm_const_le): Take each operand individually.
24328 Operate on constant selectors rather than rtxes.
24329 (altivec_expand_vec_perm_const): Likewise. Update call to
24330 altivec_expand_vec_perm_const_le.
24331 (rs6000_expand_vec_perm_const): Delete.
24332 (rs6000_vectorize_vec_perm_const_ok): Delete.
24333 (rs6000_vectorize_vec_perm_const): New function. Remove stray
24334 reference to the SPE evmerge intructions.
24335 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
24336 an element count and rtx array.
24337 (rs6000_expand_extract_even): Update call accordingly.
24338 (rs6000_expand_interleave): Likewise.
24339 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
24340 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
24342 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24344 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24346 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
24347 vector mode and that that mode matches the mode of the data
24349 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
24350 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
24351 directly using expand_vec_perm_1 when forcing selectors into
24353 (expand_vec_perm_var): New function, split out from expand_vec_perm.
24355 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24357 * optabs-query.h (can_vec_perm_p): Delete.
24358 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
24359 * optabs-query.c (can_vec_perm_p): Split into...
24360 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
24361 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
24362 particular selector is valid.
24363 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24364 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24365 (vect_grouped_load_supported): Likewise.
24366 (vect_shift_permute_load_chain): Likewise.
24367 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
24368 (vect_transform_slp_perm_load): Likewise.
24369 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24370 (vectorizable_bswap): Likewise.
24371 (vect_gen_perm_mask_checked): Likewise.
24372 * fold-const.c (fold_ternary_loc): Likewise. Don't take
24373 implementations of variable permutation vectors into account
24374 when deciding which selector to use.
24375 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
24376 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
24377 with a false third argument.
24378 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
24379 to test whether the constant selector is valid and can_vec_perm_var_p
24380 to test whether a variable selector is valid.
24382 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24384 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
24385 * optabs-query.c (can_vec_perm_p): Likewise.
24386 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
24387 instead of vec_perm_indices.
24388 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
24389 (vect_gen_perm_mask_checked): Likewise,
24390 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
24391 (vect_gen_perm_mask_checked): Likewise,
24393 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24395 * optabs-query.h (qimode_for_vec_perm): Declare.
24396 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
24397 (qimode_for_vec_perm): ...this new function.
24398 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
24400 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24402 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
24403 does not have a conditional at the top.
24405 2018-01-02 Richard Biener <rguenther@suse.de>
24407 * ipa-inline.c (big_speedup_p): Fix expression.
24409 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
24412 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
24415 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
24419 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
24420 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
24421 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
24422 cond_taken_branch_cost 3->4.
24424 2018-01-01 Jakub Jelinek <jakub@redhat.com>
24426 PR tree-optimization/83581
24427 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
24428 TODO_cleanup_cfg if any changes have been made.
24430 PR middle-end/83608
24431 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
24432 convert_modes if target mode has the right side, but different mode
24435 PR middle-end/83609
24436 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
24437 last argument when extracting from CONCAT. If either from_real or
24438 from_imag is NULL, use expansion through memory. If result is not
24439 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
24440 the parts directly to inner mode, if even that fails, use expansion
24443 PR middle-end/83623
24444 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
24445 check for bswap in mode rather than HImode and use that in expand_unop
24448 Copyright (C) 2018 Free Software Foundation, Inc.
24450 Copying and distribution of this file, with or without modification,
24451 are permitted in any medium without royalty provided the copyright
24452 notice and this notice are preserved.