1 2018-08-27 Martin Liska <mliska@suse.cz>
3 PR tree-optimization/86702
4 * tree-switch-conversion.c (jump_table_cluster::emit):
5 Make probabilities even for values in jump table
6 according to number of cases handled.
7 (switch_decision_tree::compute_cases_per_edge): Pass
8 argument to reset_out_edges_aux function.
9 (switch_decision_tree::analyze_switch_statement): Likewise.
10 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
13 2018-08-27 Martin Liska <mliska@suse.cz>
15 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
16 cfun argument explicitly.
17 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
18 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
19 function gimple_switch_default_bb.
20 (convert_switch_statements):
22 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
23 * stmt.c (label_to_block_fn): Use label_to_block and pass
24 cfun argument explicitly and use gimple_switch_label_bb.
25 (expand_case): Likewise.
26 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
27 cfun argument explicitly. Likewise.
28 (make_edges_bb): Likewise.
29 (make_cond_expr_edges): Likewise.
30 (get_cases_for_edge): Likewise.
31 (make_gimple_switch_edges): Likewise.
32 (label_to_block_fn): Likewise.
33 (label_to_block): Likewise.
34 (make_goto_expr_edges): Likewise.
35 (make_gimple_asm_edges): Likewise.
36 (main_block_label): Likewise.
37 (group_case_labels_stmt): Likewise.
38 (find_taken_edge_computed_goto): Likewise.
39 (find_taken_edge_switch_expr): Likewise.
40 (gimple_verify_flow_info): Likewise.
41 (gimple_redirect_edge_and_branch): Likewise.
42 (gimple_switch_label_bb): New function.
43 (gimple_switch_default_bb): Likewise.
44 (gimple_switch_edge): Likewise.
45 (gimple_switch_default_edge): Likewise.
46 * tree-cfg.h (label_to_block_fn): Remove and replace ...
47 (label_to_block): ... with this.
48 (gimple_switch_label_bb): New.
49 (gimple_switch_default_bb): Likewise.
50 (gimple_switch_edge): Likewise.
51 (gimple_switch_default_edge): Likewise.
52 * tree-cfgcleanup.c (convert_single_case_switch): Use
53 new gimple functions and pass new argument to label_to_block.
54 (cleanup_control_flow_bb):
55 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
56 cfun argument explicitly.
57 (make_eh_edges): Likewise.
58 (redirect_eh_dispatch_edge): Likewise.
59 (lower_resx): Likewise.
60 (lower_eh_dispatch): Likewise.
61 (maybe_remove_unreachable_handlers): Likewise.
62 (unsplit_eh): Likewise.
63 (cleanup_empty_eh): Likewise.
64 (verify_eh_edges): Likewise.
65 (verify_eh_dispatch_edge): Likewise.
66 * tree-ssa-dom.c (record_edge_info): Likewise.
67 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
68 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
69 (thread_through_normal_block): Likewise.
70 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
71 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
72 * tree-switch-conversion.c (switch_conversion::collect): Use new
74 (switch_conversion::check_final_bb): Likewise.
75 (switch_conversion::gather_default_values): Pass new argument
77 (switch_conversion::build_constructors): Likewise.
78 (switch_decision_tree::compute_cases_per_edge): Use new
79 gimple_switch_edge function.
80 (switch_decision_tree::analyze_switch_statement): Pass new argument
82 (switch_decision_tree::try_switch_expansion): Use
83 gimple_switch_default_edge.
84 * tree-vrp.c (find_switch_asserts): Pass new argument
86 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
87 (vr_values::simplify_switch_using_ranges): Likewise.
89 2018-08-27 Richard Biener <rguenther@suse.de>
91 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
92 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
94 * tree-ssa-sccvn.h (struct vn_pval): New structure.
95 (struct vn_nary_op_s): Add unwind_to member. Add
96 predicated_values flag and put result into a union together
97 with a linked list of vn_pval.
98 (struct vn_ssa_aux): Add name member to make maintaining
99 a map of SSA name to vn_ssa_aux possible. Remove no longer
100 needed info, dfsnum, low, visited, on_sccstack, use_processed
101 and range_info_anti_range_p members.
102 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
103 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
105 (vn_valueize): New global.
106 (vn_context_bb): Likewise.
107 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
108 VN_INFO_PTR_INFO): Remove.
109 * tree-ssa-sccvn.c: ... (rewrite)
110 (pass_fre::execute): For -O2+ initialize loops and run
111 RPO VN in optimistic mode (iterating). For -O1 and -Og
112 run RPO VN in non-optimistic mode.
113 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
114 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
115 * doc/invoke.texi (sccvn-max-scc-size): Remove.
116 (rpo-vn-max-loop-depth): Document.
117 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
118 when valuezing the VUSE signals we walked out of the region.
119 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
120 (phi_translate): Set VN context block to use for availability
122 (compute_avail): Likewise.
123 (pre_valueize): New function.
124 (pass_pre::execute): Adjust to the RPO VN API.
126 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
127 (propagate_constants_for_unrolling): Remove.
128 (tree_unroll_loops_completely): Perform value-numbering
129 on the unrolled bodies loop parent.
131 2018-08-27 Richard Biener <rguenther@suse.de>
133 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
134 for partial antic compute.
136 2018-08-27 Jakub Jelinek <jakub@redhat.com>
138 PR rtl-optimization/87065
139 * combine.c (simplify_if_then_else): Formatting fix.
140 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
142 (known_cond): Don't return const_true_rtx for vector modes. Use
143 CONST0_RTX instead of const0_rtx. Formatting fixes.
145 2018-08-27 Martin Liska <mliska@suse.cz>
147 PR gcov-profile/87069
148 * gcov.c (process_file): Record files already processed
149 and warn about a file being processed multiple times.
151 2018-08-27 Martin Liska <mliska@suse.cz>
154 * config/aarch64/aarch64.c (aarch64_override_options_internal):
155 Set default values for x_aarch64_*_string strings.
156 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
157 prefix. For -mabi do not print '=ABI' in help and use
158 <option_value> format for -msve-vector-bits and -moverride
161 2018-08-26 Jeff Law <law@redhat.com>
163 * config/mips/frame-header-opt.c: Include "backend.h" rather than
166 2018-08-26 Marek Polacek <polacek@redhat.com>
168 PR c++/87029, Implement -Wredundant-move.
169 * doc/invoke.texi: Document -Wredundant-move.
171 2018-08-25 Martin Sebor <msebor@redhat.com>
173 PR tree-optimization/87059
174 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
175 to the same type as the other.
176 * fold-const.c (fold_binary_loc): Assert expectation.
178 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
180 * config/darwin.c (machopic_legitimize_pic_address): Clean up
181 extraneous parentheses, dead code section and formatting.
183 2018-08-24 David Malcolm <dmalcolm@redhat.com>
186 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
187 wide enough for jumps in the line-numbering to be visible.
188 (layout::print_gap_in_line_numbering): New member function.
189 (layout::calculate_line_spans): When using line numbering, merge
190 line spans that are only 1 line apart.
191 (diagnostic_show_locus): When printing line numbers, show gaps in
192 line numbering directly, rather than printing headers.
193 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
194 line-numbering with multiple line spans.
195 (selftest::test_fixit_insert_containing_newline_2): Add test of
196 line-numbering, in which the spans are close enough to be merged.
198 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
200 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
201 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
202 * tree-vrp.c (range_is_nonnull): Remove.
203 (range_includes_zero_p): Accept value_range instead of min/max.
204 (extract_range_from_binary_expr_1): Do not early bail on
206 Use range_includes_zero_p instead of range_is_nonnull.
207 (extract_range_from_unary_expr): Use range_includes_zero_p instead
209 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
210 special case VR_ANTI_RANGE.
211 (vrp_finalize): Same.
212 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
214 (range_is_nonnull): Remove.
215 * vr-values.c (vrp_stmt_computes_nonzero): Use
216 range_includes_zero_p instead of range_is_nonnull.
217 (extract_range_basic): Pass value_range to range_includes_zero_p
218 instead of range_is_nonnull.
220 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
222 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
223 * emit-rtl.h (rtl_data): Remove return_bnd.
224 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
225 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
226 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
227 (POINTER_BOUNDS_MODE): Remove definition.
228 (make_pointer_bounds_mode): Remove.
229 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
230 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
231 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
232 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
233 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
234 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
235 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
237 * config/i386/i386-modes.def (BND32, BND64): Remove.
238 * config/i386/i386.c (dbx_register_map): Remove bound registers.
239 (dbx64_register_map): Ditto.
240 (svr4_dbx_register_map): Ditto.
241 (indirect_thunk_bnd_needed): Remove.
242 (indirect_thunks_bnd_used): Ditto.
243 (indirect_return_bnd_needed): Ditto.
244 (indirect_return_via_cx_bnd): Ditto.
245 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
246 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
247 (output_indirect_thunk): Ditto. Remove need_prefix argument.
248 (output_indirect_thunk_function): Remove handling of
249 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
250 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
251 (ix86_save_reg): Remove handling of crtl->return_bnd.
252 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
253 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
254 and UNSPEC_BNDLX_ADDR.
255 (ix86_output_indirect_branch_via_reg): Remove handling of
256 indirect_thunk_prefix_bnd.
257 (ix86_output_indirect_branch_via_push): Ditto.
258 (ix86_output_function_return): Ditto.
259 (ix86_output_indirect_function_return): Ditto.
260 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
261 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
262 (CALL_USED_REGISTERS): Ditto.
263 (REG_ALLOC_ORDER): Update for removal of bound registers.
264 (HI_REGISTER_NAMES): Ditto.
265 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
266 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
267 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
268 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
269 (FIRST_PSEUDO_REG): Update.
270 (BND): Remove mode iterator.
271 * config/i386/predicates.md (bnd_mem_operator): Remove.
273 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
275 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
278 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
280 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
281 the case in which the permute needs only a single element and
282 repeats for every vector of the result. Extend that case to
283 handle variable-length vectors.
284 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
286 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
289 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
290 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
292 2018-08-24 Richard Biener <rguenther@suse.de>
294 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
295 bb_flags_allocated members.
296 (auto_flag): New RAII class for allocating flags.
297 (auto_edge_flag): New RAII class for allocating edge flags.
298 (auto_bb_flag): New RAII class for allocating bb flags.
299 * cfgloop.c (verify_loop_structure): Allocate temporary edge
301 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
302 in favor of temporarily allocated BB flag.
303 * hsa-brig.c: Re-order includes.
304 * hsa-dump.c: Likewise.
305 * hsa-regalloc.c: Likewise.
306 * print-rtl.c: Likewise.
307 * profile-count.c: Likewise.
309 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
312 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
315 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
318 * wide-int-range.cc (wide_int_range_div): Do not ignore result
319 from wide_int_range_multiplicative_op.
321 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
323 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
326 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
328 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
331 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
333 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
334 full GENERIC expression used for replacement.
336 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
338 * tree-vrp.c (abs_extent_range): Remove.
339 (extract_range_into_wide_ints): Pass wide ints by reference.
340 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
341 Pass wide ints by reference in all calls to
342 extract_range_into_wide_ints.
343 * wide-int-range.cc (wide_int_range_div): New.
344 * wide-int-range.h (wide_int_range_div): New.
345 (wide_int_range_includes_zero_p): New.
346 (wide_int_range_zero_p): New.
348 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
350 * config/aarch64/aarch64.md (arches): New enum.
351 (arch): New enum attr.
352 (arch_enabled): New attr.
353 (enabled): Now uses arch_enabled only.
354 (simd, sve, fp16): Removed attribute.
355 (fp): Attr now defined in terms of 'arch'.
356 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
357 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
358 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
359 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
360 attributes into 'arch'.
361 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
362 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
363 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
364 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
365 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
366 'simd' attribute into 'arch'.
367 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
368 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
369 Convert use of 'fp' attribute to 'arch'.
370 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
371 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
373 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
374 (different modes) Merge 'fp' and 'simd' into 'arch'.
375 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
378 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
380 PR rtl-optimization/87026
381 * expmed.c (canonicalize_comparison): If we can no longer create
382 pseudoregisters, don't.
384 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
387 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
389 * config/arm/arm.c (speculation_barrier_libfunc): New static
391 (arm_init_libfuncs): Initialize it.
392 (arm_emit_speculation_barrier): New function.
393 * config/arm/arm.md (speculation_barrier): Call
394 arm_emit_speculation_barrier for architectures that do not have
396 (speculation_barrier_insn): Only match on Armv7 or later.
398 2018-08-23 Richard Biener <rguenther@suse.de>
401 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
404 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
406 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
407 of single-vector TBLs.
408 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
411 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
414 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
415 aarch64_evpc_tbl guard.
417 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
419 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
422 2018-08-22 Martin Sebor <msebor@redhat.com>
425 * tree-pretty-print.c (pretty_print_string): Add argument.
426 (dump_generic_node): Call to pretty_print_string with string size.
428 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
430 PR rtl-optimization/86771
431 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
432 of two SETs into those two SETs, one to be placed at i2, if that SETs
433 destination is modified between i2 and i3.
435 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
437 PR tree-optimization/86725
438 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
440 (vect_analyze_scalar_cycles_1): Check it.
442 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
444 PR tree-optimization/86725
445 * tree-vect-loop.c (vect_is_simple_reduction): When treating
446 an outer loop phi as a double reduction, make sure that the
447 single user of the phi result is an inner loop phi.
449 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
451 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
452 grouped stores with gaps to a strided group.
454 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
456 * tree-vect-stmts.c (get_group_load_store_type)
457 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
458 first statement in a group.
460 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
462 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
463 the sequence used in gcc/gcc.c.
465 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
468 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
471 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
473 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
474 Darwin10-specific unwinder-shim.
475 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
476 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
477 New to cater for Darwin10 Rosetta.
479 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
481 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
482 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
484 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
489 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
490 (dwarf2out_switch_text_section): Generate a local label for the
491 second function sub-section and apply it as the second FDE start
493 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
494 second sub-section start.
496 2018-08-22 Richard Biener <rguenther@suse.de>
498 PR tree-optimization/86988
499 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
501 2018-08-22 Richard Biener <rguenther@suse.de>
503 PR tree-optimization/86945
504 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
506 2018-08-22 Alexandre Oliva <oliva@adacore.com>
508 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
509 a comment about how uses of r2 for .sdata2 come about.
511 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
513 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
515 2018-08-21 Marek Polacek <polacek@redhat.com>
517 PR c++/86981, Implement -Wpessimizing-move.
518 * doc/invoke.texi: Document -Wpessimizing-move.
520 2018-08-21 Jan Hubicka <jh@suse.cz>
522 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
523 * tree.h (is_redundant_typedef): Remove.
524 * dwarf2out.c (is_redundant_typedef): Turn into static function.
526 2018-08-21 Jan Hubicka <jh@suse.cz>
528 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
531 2018-08-21 Tamar Christina <tamar.christina@arm.com>
533 * expmed.c (extract_low_bits): Reject invalid subregs early.
535 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
538 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
541 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
543 * config/vxworks.h: Guard vxworks_asm_out_constructor and
544 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
545 * config/vxworks.c: Likewise.
547 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
549 * config/vxworks.c: Set targetm.have_ctors_dtors
550 if HAVE_INITFINI_ARRAY_SUPPORT.
551 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
552 if HAVE_INITFINI_ARRAY_SUPPORT.
554 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
556 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
557 default search path for VxWorks < 7.
559 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
561 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
562 (get_format_string): Refer to c_getstr.
564 2018-08-21 Tom de Vries <tdevries@suse.de>
566 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
567 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
568 (debuginfo_early_stop): Declare.
569 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
570 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
571 (debuginfo_early_stop): New function.
572 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
573 and debuginfo_early_stop.
574 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
575 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
576 (general_init): Call debuginfo_early_init.
577 (finalize): Call debuginfo_fini.
578 (do_compile): Call debuginfo_init.
579 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
581 (@item -fdump-debug, @item -fdump-earlydebug): Add.
583 2018-08-21 Tom de Vries <tdevries@suse.de>
585 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
586 flag_dump_noaddr and flag_dump_unnumbered.
588 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
590 * wide-int-range.cc (wide_int_range_abs): New.
591 (wide_int_range_order_set): Rename from wide_int_range_min_max.
592 * wide-int-range.h (wide_int_range_abs): New.
593 (wide_int_range_min_max): New.
594 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
595 case to call wide_int_range_abs.
596 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
597 (extract_range_from_abs_expr): Delete.
599 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
602 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
603 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
606 2018-08-20 Nathan Sidwell <nathan@acm.org>
607 Jeff Law <law@redhat.com>
609 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
610 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
612 2018-08-20 David Malcolm <dmalcolm@redhat.com>
615 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
616 (decl_attributes): Likewise.
617 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
619 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
620 * diagnostic-core.h (class auto_diagnostic_group): New class.
621 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
622 (diagnostic_report_diagnostic): Handle the first diagnostics within
624 (emit_diagnostic): Add auto_diagnostic_group instance.
626 (inform_n): Likewise.
628 (warning_at): Likewise.
629 (warning_n): Likewise.
631 (permerror): Likewise.
634 (error_at): Likewise.
636 (fatal_error): Likewise.
637 (internal_error): Likewise.
638 (internal_error_no_backtrace): Likewise.
639 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
640 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
641 * diagnostic.h (struct diagnostic_context): Add fields
642 "diagnostic_group_nesting_depth",
643 "diagnostic_group_emission_count", "begin_group_cb",
645 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
646 Add auto_diagnostic_group instance(s).
647 (find_explicit_erroneous_behavior): Likewise.
648 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
649 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
650 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
651 (gimplify_va_arg_expr): Likewise.
652 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
653 (HSA_SORRY_AT): Likewise.
654 * ipa-devirt.c (compare_virtual_tables): Likewise.
655 (warn_odr): Likewise.
656 * multiple_target.c (expand_target_clones): Likewise.
657 * opts-common.c (cmdline_handle_error): Likewise.
658 * reginfo.c (globalize_reg): Likewise.
659 * substring-locations.c (format_warning_n_va): Likewise.
660 * tree-inline.c (expand_call_inline): Likewise.
661 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
662 * tree-ssa-loop-niter.c
663 (do_warn_aggressive_loop_optimizations): Likewise.
664 * tree-ssa-uninit.c (warn_uninit): Likewise.
665 * tree.c (warn_deprecated_use): Likewise.
667 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
670 * config/i386/i386.md (eh_return): Always update EH return
671 address in word_mode.
673 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
675 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
676 TARGET_SPLIT_COMPLEX_ARG is defined.
678 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
680 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
682 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
685 * expr.c (expand_assignment): Assert that bitpos is positive.
686 (store_field): Likewise
687 (expand_expr_real_1): Make sure that bitpos is positive.
688 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
691 2018-08-20 Nathan Sidwell <nathan@acm.org>
693 * Makefile.in (CPP_ID_DATA_H): Delete.
694 (CPP_INTERNAL_H): Don't add it.
695 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
696 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
698 2018-08-20 Richard Biener <rguenther@suse.de>
700 PR tree-optimization/78655
701 * tree-vrp.c (extract_range_from_binary_expr_1): Make
702 pointer + offset nonnull if either operand is nonnull work.
704 2018-08-20 Tom de Vries <tdevries@suse.de>
706 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
707 unless the referenced die describes the added property using
708 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
709 Otherwise, add a DW_AT_location to the referenced die.
711 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
714 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
715 register_operand when calling ix86_set_reg_reg_cost.
716 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
717 Set *total to 0 for operands that satisfy x86_64_immediate_operand
718 predicate and to 1 otherwise.
720 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
722 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
723 emit a diagnostic that it is not supported and reset the option.
724 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
725 supported and consume the option. (ASM_FINAL_SPEC): New.
727 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
729 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
732 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
734 C-SKY port: Documentation
736 * doc/extend.texi (C-SKY Function Attributes): New section.
737 * doc/invoke.texi (Option Summary): Add C-SKY options.
738 (C-SKY Options): New section.
739 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
741 2018-08-17 Jojo <jijie_rong@c-sky.com>
742 Huibin Wang <huibin_wang@c-sky.com>
743 Sandra Loosemore <sandra@codesourcery.com>
744 Chung-Lin Tang <cltang@codesourcery.com>
746 C-SKY port: Backend implementation
748 * config/csky/*: New.
749 * common/config/csky/*: New.
751 2018-08-17 Jojo <jijie_rong@c-sky.com>
752 Huibin Wang <huibin_wang@c-sky.com>
753 Sandra Loosemore <sandra@codesourcery.com>
754 Chung-Lin Tang <cltang@codesourcery.com>
755 Andrew Jenner <andrew@codesourcery.com>
757 C-SKY port: Configury
759 * config.gcc (csky-*-*): New.
760 * configure.ac: Add csky to targets for dwarf2 debug_line support.
761 * configure: Regenerated.
763 2018-08-17 David Malcolm <dmalcolm@redhat.com>
765 * dump-context.h: Include "dumpfile.h".
766 (dump_context::dump_printf_va): Convert final param from va_list
767 to va_list *. Convert from ATTRIBUTE_PRINTF to
768 ATTRIBUTE_GCC_DUMP_PRINTF.
769 (dump_context::dump_printf_loc_va): Likewise.
770 * dumpfile.c: Include "stringpool.h".
771 (make_item_for_dump_printf_va): Delete.
772 (make_item_for_dump_printf): Delete.
773 (class dump_pretty_printer): New class.
774 (dump_pretty_printer::dump_pretty_printer): New ctor.
775 (dump_pretty_printer::emit_items): New member function.
776 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
778 (dump_pretty_printer::emit_item): New member function.
779 (dump_pretty_printer::stash_item): New member function.
780 (dump_pretty_printer::format_decoder_cb): New member function.
781 (dump_pretty_printer::decode_format): New member function.
782 (dump_context::dump_printf_va): Reimplement in terms of
784 (dump_context::dump_printf_loc_va): Convert final param from va_list
786 (dump_context::begin_scope): Reimplement call to
787 make_item_for_dump_printf.
788 (dump_printf): Update for change to dump_printf_va.
789 (dump_printf_loc): Likewise.
790 (selftest::test_capture_of_dump_calls): Convert "stmt" from
791 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
793 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
794 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
795 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
796 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
797 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
798 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
799 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
800 within a dump_printf_loc call to "%wu".
801 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
802 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
803 missing space after "=".
804 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
805 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
806 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
807 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
808 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
809 duplicate "vectorized" from message.
811 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
813 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
814 polyNxK_t element's TYPE_STRING_FLAG.
816 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
818 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
819 (they were unnamed before). Fix comments.
821 2018-08-17 Nathan Sidwell <nathan@acm.org>
823 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
825 2018-08-17 Richard Biener <rguenther@suse.de>
827 PR tree-optimization/86841
828 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
830 2018-08-17 Martin Liska <mliska@suse.cz>
832 * common.opt: Remove Warn, Init and Report for options with
833 Ignore/Deprecated flag. Warning is done automatically for
835 * config/i386/i386.opt: Likewise.
836 * config/ia64/ia64.opt: Likewise.
837 * config/rs6000/rs6000.opt: Likewise.
838 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
839 Remove usage of flag_check_pointer_bounds.
840 * lto-wrapper.c (merge_and_complain): Do not handle
841 OPT_fcheck_pointer_bounds.
842 (append_compiler_options): Likewise.
843 * opt-functions.awk: Do not handle Deprecated.
844 * optc-gen.awk: Check that Var, Report and Init are not
845 used for an option with Ignore/Deprecated flag.
846 * opts-common.c (decode_cmdline_option): Do not report
848 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
850 * opts.h (struct cl_option): Remove cl_deprecated flag.
851 (CL_ERR_DEPRECATED): Remove error enum value.
853 2018-08-17 Richard Biener <rguenther@suse.de>
856 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
857 across a va-arg-pack using call adjust its return value accordingly.
859 2018-08-16 Martin Sebor <msebor@redhat.com>
861 PR tree-optimization/86853
862 * gimple-ssa-sprintf.c (struct format_result): Rename member.
863 (struct fmtresult): Add member and initialize it in ctors.
864 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
865 (format_string): Handle %S the same as %ls. Set MAYFAIL.
866 (format_directive): Set POSUNDER4K when MAYFAIL is set.
867 (parse_directive): Handle %C same as %c.
868 (sprintf_dom_walker::compute_format_length): Adjust.
869 (is_call_safe): Adjust.
871 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
873 * builtins.c (c_strlen): Add new parameter eltsize. Use it
874 for determining how to count the elements.
875 * builtins.h (c_strlen): Adjust prototype.
876 * expr.c (string_constant): Add new parameter mem_size.
877 Set *mem_size appropriately.
878 * expr.h (string_constant): Adjust protoype.
879 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
880 * gimple-fold.h (get_range_strlen): Adjust prototype.
881 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
882 (format_string): Call get_string_length with eltsize.
884 2018-08-16 David Malcolm <dmalcolm@redhat.com>
886 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
887 to emit the span, rather than setting it as the prefix.
889 2018-08-16 David Malcolm <dmalcolm@redhat.com>
891 * diagnostic-show-locus.c (layout::start_annotation_line): Add
892 "margin_char" parameter, defaulting to space. Use it in place
893 of pp_space for the initial part of the margin.
894 (layout::print_leading_fixits): Use '+' when filling the margin
895 of line-insertion fix-it hints.
897 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
899 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
902 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
904 * config/rs6000/altivec.md: Don't set length attribute to the default
906 * config/rs6000/darwin.md: Ditto.
907 * config/rs6000/dfp.md: Ditto.
908 * config/rs6000/htm.md: Ditto.
909 * config/rs6000/rs6000.md: Ditto.
910 * config/rs6000/sync.md: Ditto.
911 * config/rs6000/vsx.md: Ditto.
913 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
915 * config/rs6000/altivec.md: Don't set length attribute to the default
916 value, for branch instructions.
917 * config/rs6000/darwin.md: Ditto.
918 * config/rs6000/rs6000.md: Ditto.
920 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
922 * config/rs6000/rs6000.md (length): Always define as const_int 4.
923 (unnamed conditional branch define_insn): Set length to 4 or 8
925 (<bd>_<mode>): Similar, for alternative 0.
926 (<bd>tf_<mode>): Ditto.
928 2018-08-16 Tamar Christina <tamar.christina@arm.com>
930 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
932 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
934 * doc/rtl.texi: Replace old RTX class names with new names.
937 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
939 * expmed.h (canonicalize_comparison): New declaration.
940 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
941 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
942 * optabs.c (prepare_cmp_insn): Likewise.
943 * rtl.h (unsigned_condition_p): New function which checks if a
944 comparison operator is unsigned.
946 2018-08-16 Nathan Sidwell <nathan@acm.org>
948 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
949 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
951 2018-08-16 Tamar Christina <tamar.christina@arm.com>
954 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
955 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
956 (mov<mov>): ..this and enable unconditionally.
958 2018-08-16 Tamar Christina <tamar.christina@arm.com>
960 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
962 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
964 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
965 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
966 "Common" with "Target".
968 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
970 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
971 * doc/invoke.texi (mmitigate-rop): Remove.
972 * config/i386/i386.c: Do not include "regrename.h".
973 (ix86_rop_should_change_byte_p, reg_encoded_number)
974 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
976 (ix86_reorg): Remove call to ix86_mitigate_rop.
977 * config/i386/i386.md (attr "modrm_class"): Remove.
978 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
979 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
980 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
982 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
984 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
985 allow folding of mergeh() and mergel() for the float and double types.
986 (fold_mergehl_helper): Rework to handle building a permute tree
989 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
991 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
994 2018-08-15 David Malcolm <dmalcolm@redhat.com>
996 * common.opt (fdiagnostics-show-labels): New option.
997 * diagnostic-show-locus.c (class layout_range): Add field
999 (class layout): Add field "m_show_labels_p".
1000 (layout_range::layout_range): Add param "label" and use it to
1002 (make_range): Pass in NULL for new "label" param of layout_range's
1004 (layout::layout): Initialize m_show_labels_p.
1005 (layout::maybe_add_location_range): Pass in loc_range->m_label
1006 when constructing layout_range instances.
1007 (struct line_label): New struct.
1008 (layout::print_any_labels): New member function.
1009 (layout::print_line): Call it if label-printing is enabled.
1010 (selftest::test_one_liner_labels): New test.
1011 (selftest::test_diagnostic_show_locus_one_liner): Call it.
1012 * diagnostic.c (diagnostic_initialize): Initialize
1013 context->show_labels_p.
1014 * diagnostic.h (struct diagnostic_context): Add field
1016 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
1017 -fno-diagnostics-show-labels.
1018 * dwarf2out.c (gen_producer_string): Add
1019 OPT_fdiagnostics_show_labels to the ignored options.
1020 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
1022 (gcc_rich_location::maybe_add_expr): Likewise.
1023 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
1024 label" param, defaulting to NULL.
1025 (gcc_rich_location::add_expr): Add "label" param.
1026 (gcc_rich_location::maybe_add_expr): Likewise.
1027 (class text_range_label): New class.
1028 (class range_label_for_type_mismatch): New class.
1029 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
1030 of format_warning_va.
1031 (fmtwarn_n): Likewise for new params of format_warning_n_va.
1032 * lto-wrapper.c (merge_and_complain): Add
1033 OPT_fdiagnostics_show_labels to the "pick one setting" options.
1034 (append_compiler_options): Likewise to the dropped options.
1035 (append_diag_options): Likewise to the passed-on options.
1036 * opts.c (common_handle_option): Handle the new option.
1037 * selftest-diagnostic.c
1038 (test_diagnostic_context::test_diagnostic_context): Enable
1040 * substring-locations.c: Include "gcc-rich-location.h".
1041 (format_warning_n_va): Add "fmt_label" and "param_label" params
1042 and use them as appropriate.
1043 (format_warning_va): Add "fmt_label" and "param_label" params,
1044 passing them on to format_warning_n_va.
1045 (format_warning_at_substring): Likewise.
1046 (format_warning_at_substring_n): Likewise.
1047 * substring-locations.h (format_warning_va): Add "fmt_label" and
1048 "param_label" params.
1049 (format_warning_n_va): Likewise.
1050 (format_warning_at_substring): Likewise.
1051 (format_warning_at_substring_n): Likewise.
1052 * toplev.c (general_init): Initialize global_dc->show_labels_p.
1054 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
1057 * builtins.c (expand_builtin_memcmp): Do not expand the call
1058 when overflow is detected.
1060 2018-08-15 Martin Sebor <msebor@redhat.com>
1062 PR tree-optimization/71625
1063 * config/aarch64/aarch64-builtins.c
1064 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
1066 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
1068 * config/s390/s390.c (s390_reorg): Remove loop.
1070 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1073 (darwin_function_switched_text_sections): Delete.
1074 * gcc/config/darwin.h
1075 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
1077 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1080 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
1081 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
1082 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
1084 2018-08-15 Martin Liska <mliska@suse.cz>
1086 PR tree-optimization/86925
1087 * predict.c (expr_expected_value_1): When taking
1088 later predictor, assign also probability.
1089 Use fold_build2_initializer_loc in order to fold
1090 the expression in -frounding-math.
1092 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
1094 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
1096 (expand_vec_perm_1): Try the new method.
1098 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
1101 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
1102 Check whether lra_live_max_point is 0 before dividing.
1104 2018-08-14 Martin Sebor <msebor@redhat.com>
1106 PR tree-optimization/86650
1107 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
1108 (vrp_prop::check_mem_ref): Same.
1110 2018-08-13 Liu Hao <lh_mouse@126.com>
1112 * pretty-print.c (eat_esc_sequence): Swap the foreground and
1113 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
1114 and clear it thereafter, as it only works for DBCS.
1116 2018-08-13 Liu Hao <lh_mouse@126.com>
1118 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
1119 handle returned by _get_osf_handle().
1121 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
1123 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
1124 for folding vec_perm.
1126 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
1128 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
1129 Add support for gimple-folding of vec_pack() and vec_unpack()
1132 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
1134 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
1135 vec_xst variants to the list.
1136 (rs6000_gimple_fold_builtin): Add support for folding unaligned
1137 vector loads and stores.
1139 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
1141 * config.gcc (rs6000-ibm-aix4.x): Delete.
1142 (rs6000-ibm-aix5.1): Delete.
1143 (rs6000-ibm-aix5.2): Delete.
1144 (rs6000-ibm-aix5.3): Delete.
1145 * config/rs6000/aix43.h: Delete.
1146 * config/rs6000/aix51.h: Delete.
1147 * config/rs6000/aix52.h: Delete.
1148 * config/rs6000/t-aix43: Delete.
1150 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
1152 * config/s390/s390.c (s390_decompose_constant_pool_ref):
1154 (s390_decompose_address): Factor out constant pool ref
1157 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1159 * config/nds32/nds32-predicates.c
1160 (nds32_can_use_bclr_p): Change return type as bool.
1161 (nds32_can_use_bset_p): Ditto.
1162 (nds32_can_use_btgl_p): Ditto.
1163 (nds32_can_use_bitci_p): Ditto.
1164 * config/nds32/nds32-protos.h
1165 (nds32_can_use_bclr_p): Change declaration.
1166 (nds32_can_use_bset_p): Ditto.
1167 (nds32_can_use_btgl_p): Ditto.
1168 (nds32_can_use_bitci_p): Ditto.
1170 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1172 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
1173 Support -msched-prolog-epilog option.
1174 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
1176 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1178 * common/config/nds32/nds32-common.c
1179 (nds32_option_optimization_table): Enalbe -malways-align.
1181 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1183 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
1185 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
1186 OPT_misr_secure_ case.
1187 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
1188 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
1189 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
1191 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
1192 (nds32_isr_info): New field security_level.
1193 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
1194 * config/nds32/nds32.md (return_internal): Consider critical attribute.
1195 * config/nds32/nds32.opt (misr-secure): New option.
1196 * config/nds32/nds32_init.inc: New file.
1197 * config/nds32/nds32_isr.h: New file.
1199 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
1201 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
1202 Update comment for atomic instructions.
1203 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
1204 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
1206 (atomic_loaddi): Revise fence expansion to only emit fence prior to
1207 load for __ATOMIC_SEQ_CST model.
1208 (atomic_loaddi_1): Remove float register target.
1209 (atomic_storedi): Handle CONST_INT values.
1210 (atomic_storedi_1): Remove float register source. Add special case
1212 (memory_barrier): New expander and insn.
1214 2018-08-11 Jakub Jelinek <jakub@redhat.com>
1216 PR tree-optimization/86835
1217 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
1218 new_stmt after def_gsi, make sure to insert new_square_stmt after
1219 that stmt, not 2 stmts before it.
1221 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
1224 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
1227 2018-08-10 Martin Liska <mliska@suse.cz>
1230 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
1232 * builtins.c (expand_builtin_expect_with_probability):
1234 (expand_builtin_expect_with_probability): New function.
1235 (build_builtin_expect_predicate): Add new argumnet probability
1236 for BUILT_IN_EXPECT_WITH_PROBABILITY.
1237 (fold_builtin_expect):
1240 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
1241 * builtins.h (fold_builtin_expect): Set new argument.
1242 * doc/extend.texi: Document __builtin_expect_with_probability.
1243 * doc/invoke.texi: Likewise.
1244 * gimple-fold.c (gimple_fold_call): Pass new argument.
1245 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
1246 also BUILT_IN_EXPECT_WITH_PROBABILITY.
1247 * predict.c (get_predictor_value): New function.
1248 (expr_expected_value): Add new argument probability. Assume
1249 that predictor and probability are always non-null.
1250 (expr_expected_value_1): Likewise. For __builtin_expect and
1251 __builtin_expect_with_probability set probability. Handle
1252 combination in binary expressions.
1253 (tree_predict_by_opcode): Simplify code by simply calling
1254 get_predictor_value.
1255 (pass_strip_predict_hints::execute): Add handling of
1256 BUILT_IN_EXPECT_WITH_PROBABILITY.
1257 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
1259 * tree.h (DECL_BUILT_IN_P): New function.
1261 2018-08-10 Martin Liska <mliska@suse.cz>
1263 PR tree-optimization/85799
1264 * passes.def: Add argument for pass_strip_predict_hints.
1265 * predict.c (class pass_strip_predict_hints): Add new argument
1267 (strip_predictor_early): New function.
1268 (pass_strip_predict_hints::execute): Call the function to
1270 (strip_predict_hints): New function.
1271 * predict.def: Fix comment.
1273 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
1275 * Makefile.in: Clarify which tm.texi to copy over to assert the
1276 right to grant a GFDL license for all.
1278 2018-08-09 Jeff Law <law@redhat.com>
1280 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
1283 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
1285 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
1288 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
1290 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
1291 reductions for variable-length vectors.
1293 2018-08-09 David Malcolm <dmalcolm@redhat.com>
1296 * common.opt (fdiagnostics-show-line-numbers): New option.
1297 * diagnostic-show-locus.c (class layout): Add fields
1298 "m_show_line_numbers_p" and "m_linenum_width";
1299 (num_digits): New function.
1300 (test_num_digits): New function.
1301 (layout::layout): Initialize new fields. Update m_x_offset
1302 logic to handle any left margin.
1303 (layout::print_source_line): Print line number when requested.
1304 (layout::start_annotation_line): New member function.
1305 (layout::print_annotation_line): Call it.
1306 (layout::print_leading_fixits): Likewise.
1307 (layout::print_trailing_fixits): Likewise. Update calls to
1308 move_to_column for new parameter.
1309 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
1310 it to potentially call start_annotation_line.
1311 (layout::show_ruler): Call start_annotation_line.
1312 (selftest::test_line_numbers_multiline_range): New selftest.
1313 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
1314 and selftest::test_line_numbers_multiline_range.
1315 * diagnostic.c (diagnostic_initialize): Initialize
1316 show_line_numbers_p.
1317 * diagnostic.h (struct diagnostic_context): Add field
1318 "show_line_numbers_p".
1319 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
1320 -fno-diagnostics-show-line-numbers.
1321 * dwarf2out.c (gen_producer_string): Add
1322 OPT_fdiagnostics_show_line_numbers to the ignored options.
1323 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
1324 one setting" options.
1325 (append_compiler_options): Likewise to the dropped options.
1326 (append_diag_options): Likewise to the passed-on options.
1327 * opts.c (common_handle_option): Handle the new option.
1328 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
1330 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
1332 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
1333 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
1334 third argument of type "const signed char" to descriptions of
1335 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
1336 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
1337 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
1338 __builtin_bcdsub_ov functions.
1340 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
1342 PR tree-optimization/86858
1343 * tree-vect-loop.c (vect_is_simple_reduction): Restore
1344 flow_bb_inside_loop_p calls.
1346 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
1348 PR tree-optimization/86871
1349 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
1350 instead of gimple_assign_lhs.
1352 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
1355 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
1356 register constraint to operand 0.
1357 (add<mode>3_carryinC): Likewise.
1358 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
1360 2018-08-09 Martin Liska <mliska@suse.cz>
1363 * common.opt: Remove extra line.
1365 2018-08-09 Martin Liska <mliska@suse.cz>
1367 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
1368 at the end of a line, make first letter capital and end up
1369 a sentence with a dot.
1370 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
1371 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
1372 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
1373 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
1374 (PARAM_MAX_ISL_OPERATIONS): Likewise.
1375 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
1376 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
1377 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
1378 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
1379 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
1380 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
1381 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
1382 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
1383 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
1384 (PARAM_TREE_REASSOC_WIDTH): Likewise.
1385 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
1386 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
1387 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
1389 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
1392 * config/s390/s390.c (s390_option_override_internal): Reduce the
1393 stack-clash-protection-probe-interval param if it would be too big
1396 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
1399 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
1400 * config/m68k/m68k.c (handle_move_double): Don't call
1401 m68k_final_prescan_insn.
1402 (m68k_adjust_decorated_operand): Renamed from
1403 m68k_final_prescan_insn, remove first and third operand and
1405 (print_operand): Call it.
1406 (print_operand_address): Call it.
1408 2018-08-08 Nathan Sidwell <nathan@acm.org>
1410 * diagnostic.c (diagnostic_report_current_module): Use
1411 linemap_included_from & linemap_included_from_linemap.
1413 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
1415 * config/aarch64/aarch64-cores.def: Add phecda core.
1416 * config/aarch64/aarch64-tune.md: Regenerate.
1417 * doc/invoke.texi: Add phecda core.
1419 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
1422 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
1424 * config/s390/s390.md ("movti"): Add more alternatives for
1425 constant to GPR copies.
1427 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
1429 * config/s390/s390.c: Fix whitespace damage throughout the file.
1430 * config/s390/s390.h: Likewise.
1431 * config/s390/tpf.h: Likewise.
1433 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
1435 * config/s390/s390.c (s390_loadrelative_operand_p):
1436 Remove TARGET_CPU_ZARCH usages.
1437 (s390_rtx_costs): Likewise.
1438 (s390_legitimate_constant_p): Likewise.
1439 (s390_cannot_force_const_mem): Likewise.
1440 (legitimate_reload_constant_p): Likewise.
1441 (s390_preferred_reload_class): Likewise.
1442 (legitimize_pic_address): Likewise.
1443 (legitimize_tls_address): Likewise.
1444 (s390_split_branches): Removed.
1445 (s390_add_execute): Removed.
1446 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
1447 (s390_mainpool_start): Likewise.
1448 (s390_mainpool_finish): Likewise.
1449 (s390_mainpool_cancel): Removed.
1450 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
1451 (s390_chunkify_cancel): Likewise.
1452 (s390_return_addr_rtx): Likewise.
1453 (s390_register_info): Remove split_branches_pending_p uages.
1454 (s390_optimize_register_info): Likewise.
1455 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
1456 split_branches_pending_p usages.
1457 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
1458 (s390_load_got): Likewise.
1459 (s390_expand_split_stack_prologue): Likewise.
1460 (output_asm_nops): Likewise.
1461 (s390_function_profiler): Likewise.
1462 (s390_emit_call): Likewise.
1463 (s390_conditional_register_usage): Likewise.
1464 (s390_optimize_prologue): Likewise.
1465 (s390_reorg): Remove TARGET_CPU_ZARCH and
1466 split_branches_pending_p usages.
1467 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
1469 (s390_output_indirect_thunk_function): Likewise.
1470 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
1471 (TARGET_CPU_ZARCH_P): Removed.
1472 (struct machine_function): Remove split_branches_pending_p.
1473 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
1475 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
1477 * common/config/s390/s390-common.c (processor_flags_table):
1479 * config.gcc: Remove with_arch/with_tune support.
1480 * config/s390/2064.md: Remove cpu attribute comparisons.
1481 * config/s390/driver-native.c (s390_host_detect_local_cpu):
1483 * config/s390/linux.h (ASM_SPEC):
1484 Remove -march support.
1485 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
1486 Use a table to get an arch level.
1487 * config/s390/s390-opts.h (enum processor_type):
1489 * config/s390/s390.c
1490 (processor_table): Remove entries, add arch_level values.
1491 (s390_issue_rate): Remove cases.
1492 (s390_option_override): Adjust
1493 s390_option_override_internal() call.
1494 (s390_option_override_internal): Remove deprecation warning.
1495 (s390_valid_target_attribute_tree): Adjust
1496 s390_option_override_internal() call.
1497 * config/s390/s390.h (struct s390_processor):
1498 Share with s390-c.c, add arch_level field.
1499 * config/s390/s390.md:
1500 Remove occurrences in cpu attribute.
1501 * config/s390/s390.opt: Remove -march/-mtune support.
1502 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
1503 * doc/invoke.texi: Remove deprecation warning.
1505 2018-08-08 Luis Machado <luis.machado@linaro.org>
1507 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
1509 (qdf24xx_tunings): Set vector cost structure to
1510 qdf24xx_vector_cost.
1512 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
1513 <register_sextend>: Set to 3.
1515 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
1518 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
1519 * config/aarch64/aarch64-simd.md
1520 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
1521 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
1522 (aarch64_frecpx<mode>): ...this new pattern.
1523 * config/aarch64/aarch64-simd-builtins.def: Remove comment
1524 about aarch64_frecp<FRECP:frecp_suffix><mode>.
1526 2018-08-07 Martin Liska <mliska@suse.cz>
1529 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
1530 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
1531 * predict.def (PRED_MALLOC_NONNULL): New predictor.
1532 * doc/extend.texi: Document that malloc attribute adds
1535 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
1538 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1539 Define to speculation_safe_value_not_needed.
1541 2018-08-06 Jeff Law <law@redhat.com>
1543 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
1544 the vr_values instance to cprop_into_stmt.
1545 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
1546 (cprop_operand): Also query EVRP to determine if OP is a constant.
1548 2018-08-06 Nathan Sidwell <nathan@acm.org>
1550 * diagnostic.c (diagnostic_report_current_module): Reroll
1551 included-at loop. Translate text.
1553 2018-08-06 David Malcolm <dmalcolm@redhat.com>
1555 * function-tests.c (selftest::test_expansion_to_rtl): Call
1556 free_after_compilation.
1558 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1560 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
1562 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
1564 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
1565 loops with memory block operations from getting unrolled.
1567 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
1570 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1571 Define to speculation_safe_value_not_needed.
1573 2018-08-06 Jeff Law <law@redhat.com>
1575 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
1578 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1581 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
1582 with all enabled __intN types.
1584 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
1586 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1588 * alias.c (record_set): Check for clobber high.
1589 * cfgexpand.c (expand_gimple_stmt): Likewise.
1590 * combine-stack-adj.c (single_set_for_csa): Likewise.
1591 * combine.c (find_single_use_1): Likewise.
1592 (set_nonzero_bits_and_sign_copies): Likewise.
1593 (get_combine_src_dest): Likewise.
1594 (is_parallel_of_n_reg_sets): Likewise.
1595 (try_combine): Likewise.
1596 (record_dead_and_set_regs_1): Likewise.
1597 (reg_dead_at_p_1): Likewise.
1598 (reg_dead_at_p): Likewise.
1599 * dce.c (deletable_insn_p): Likewise.
1600 (mark_nonreg_stores_1): Likewise.
1601 (mark_nonreg_stores_2): Likewise.
1602 * df-scan.c (df_find_hard_reg_defs): Likewise.
1603 (df_uses_record): Likewise.
1604 (df_get_call_refs): Likewise.
1605 * dwarf2out.c (mem_loc_descriptor): Likewise.
1606 * haifa-sched.c (haifa_classify_rtx): Likewise.
1607 * ira-build.c (create_insn_allocnos): Likewise.
1608 * ira-costs.c (scan_one_insn): Likewise.
1609 * ira.c (equiv_init_movable_p): Likewise.
1610 (rtx_moveable_p): Likewise.
1611 (interesting_dest_for_shprep): Likewise.
1612 * jump.c (mark_jump_label_1): Likewise.
1613 * postreload-gcse.c (record_opr_changes): Likewise.
1614 * postreload.c (reload_cse_simplify): Likewise.
1615 (struct reg_use): Add source expr.
1616 (reload_combine): Check for clobber high.
1617 (reload_combine_note_use): Likewise.
1618 (reload_cse_move2add): Likewise.
1619 (move2add_note_store): Likewise.
1620 * print-rtl.c (print_pattern): Likewise.
1621 * recog.c (decode_asm_operands): Likewise.
1622 (store_data_bypass_p): Likewise.
1623 (if_test_bypass_p): Likewise.
1624 * regcprop.c (kill_clobbered_value): Likewise.
1625 (kill_set_value): Likewise.
1626 * reginfo.c (reg_scan_mark_refs): Likewise.
1627 * reload1.c (maybe_fix_stack_asms): Likewise.
1628 (eliminate_regs_1): Likewise.
1629 (elimination_effects): Likewise.
1630 (mark_not_eliminable): Likewise.
1631 (scan_paradoxical_subregs): Likewise.
1632 (forget_old_reloads_1): Likewise.
1633 * reorg.c (find_end_label): Likewise.
1634 (try_merge_delay_insns): Likewise.
1635 (redundant_insn): Likewise.
1636 (own_thread_p): Likewise.
1637 (fill_simple_delay_slots): Likewise.
1638 (fill_slots_from_thread): Likewise.
1639 (dbr_schedule): Likewise.
1640 * resource.c (update_live_status): Likewise.
1641 (mark_referenced_resources): Likewise.
1642 (mark_set_resources): Likewise.
1643 * rtl.c (copy_rtx): Likewise.
1644 * rtlanal.c (reg_referenced_p): Likewise.
1645 (single_set_2): Likewise.
1646 (noop_move_p): Likewise.
1647 (note_stores): Likewise.
1648 * sched-deps.c (sched_analyze_reg): Likewise.
1649 (sched_analyze_insn): Likewise.
1651 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1653 * cse.c (invalidate_reg): New function extracted from...
1654 (invalidate): ...here.
1655 (canonicalize_insn): Check for clobber high.
1656 (invalidate_from_clobbers): invalidate clobber highs.
1657 (invalidate_from_sets_and_clobbers): Likewise.
1658 (count_reg_usage): Check for clobber high.
1659 (insn_live_p): Likewise.
1660 * cselib.c (cselib_expand_value_rtx_1):Likewise.
1661 (cselib_invalidate_regno): Check for clobber in setter.
1662 (cselib_invalidate_rtx): Pass through setter.
1663 (cselib_invalidate_rtx_note_stores):
1664 (cselib_process_insn): Check for clobber high.
1665 * cselib.h (cselib_invalidate_rtx): Add operand.
1667 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1669 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
1670 (mark_not_eliminable): Likewise.
1671 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
1672 * lra-lives.c (process_bb_lives): Check for clobber high.
1673 * lra.c (new_insn_reg): Remember clobber highs.
1674 (collect_non_operand_hard_regs): Check for clobber high.
1675 (lra_set_insn_recog_data): Likewise.
1676 (add_regs_to_insn_regno_info): Likewise.
1677 (lra_update_insn_regno_info): Likewise.
1679 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1681 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
1682 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
1684 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1686 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
1687 (copy_insn_1): Likewise.
1688 (gen_hard_reg_clobber_high): New gen function.
1689 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
1690 * genemit.c (gen_exp): Likewise.
1691 (gen_emit_seq): Pass through info.
1692 (gen_insn): Check for CLOBBER_HIGH.
1693 (gen_expand): Pass through info.
1694 (gen_split): Likewise.
1695 (output_add_clobbers): Likewise.
1696 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
1697 (remove_clobbers): Likewise.
1698 * rtl.h (gen_hard_reg_clobber_high): New declaration.
1700 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1702 * doc/rtl.texi (clobber_high): Add.
1703 (parallel): Add in clobber high
1704 * rtl.c (rtl_check_failed_code3): Add function.
1705 * rtl.def (CLOBBER_HIGH): Add expression.
1706 * rtl.h (RTL_CHECKC3): Add macro.
1707 (rtl_check_failed_code3): Add declaration.
1708 (XC3EXP): Add macro.
1710 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
1713 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
1714 cfun->machine->max_used_stack_alignment if needed.
1716 2018-08-04 Martin Sebor <msebor@redhat.com>
1718 PR tree-optimization/86571
1719 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
1722 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
1725 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1728 2018-08-03 Jeff Law <law@redhat.com>
1731 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1732 Define to speculation_safe_value_not_needed.
1734 2018-08-03 David Malcolm <dmalcolm@redhat.com>
1736 * doc/gcov.texi (-x): Remove duplicate "to".
1737 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
1738 (-Wif-not-aligned): Remove duplicate "is".
1739 (-flto): Remove duplicate "the".
1740 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
1741 duplicate "v5.00.b".
1742 (MSP430 Options): Remove duplicate "and" from the description
1743 of "-mgprel-sec=regexp".
1744 (x86 Options): Remove duplicate copies of "vmldLog102" and
1745 vmlsLog104 from description of "-mveclibabi=type".
1747 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
1749 * internal-fn.h (first_commutative_argument): Declare.
1750 * internal-fn.c (first_commutative_argument): New function.
1751 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
1752 restrictions for pattern statements. Use first_commutative_argument
1753 to look for commutative operands in calls to internal functions.
1755 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
1757 * Makefile.in (wide-int-range.o): New.
1758 * tree-vrp.c: Move all the wide_int_* functions to...
1759 * wide-int-range.cc: ...here.
1760 * tree-vrp.h: Move all the wide_int_* prototypes to...
1761 * wide-int-range.h: ...here.
1763 2018-08-03 Tom de Vries <tdevries@suse.de>
1765 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
1767 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
1768 * except.c (output_function_exception_table): Do early exit if
1769 targetm_common.except_unwind_info (&global_options) == UI_NONE.
1771 2018-08-03 Martin Liska <mliska@suse.cz>
1773 * predict.c (dump_prediction): Change to 2 digits
1776 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
1778 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
1780 (falkor_am_1_gtov_gtov): ... a new insn reservation.
1782 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
1784 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
1785 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
1786 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
1787 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
1788 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
1790 2018-08-02 David Malcolm <dmalcolm@redhat.com>
1792 * diagnostic-show-locus.c (diagnostic_show_locus): Use
1793 pp_take_prefix when saving the existing prefix.
1794 * diagnostic.c (diagnostic_append_note): Likewise.
1795 * langhooks.c (lhd_print_error_function): Likewise.
1796 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
1797 param's type. Free the existing prefix.
1798 (pp_take_prefix): New function.
1799 (pretty_printer::pretty_printer): Drop the prefix parameter.
1800 Rename the length parameter to match the comment.
1801 (pretty_printer::~pretty_printer): Free the prefix.
1802 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
1804 (struct pretty_printer): Drop the "const" from "prefix" field's
1805 type and clarify memory management.
1806 (pp_set_prefix): Drop the "const" from the 2nd param.
1807 (pp_take_prefix): New decl.
1809 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
1811 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
1812 for word_mode_ok here instead of passing as argument.
1813 (expand_block_compare): Change select_block_compare_mode() call.
1814 (expand_strncmp_gpr_sequence): New function.
1815 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
1817 2018-08-02 Jeff Law <law@redhat.com>
1820 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1821 Define to speculation_safe_value_not_needed.
1824 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1825 Define to speculation_safe_value_not_needed.
1827 2018-08-02 Tom de Vries <tdevries@suse.de>
1830 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
1831 function. Return UI_TARGET unconditionally.
1832 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
1833 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
1835 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
1837 * genemit.c (print_overload_test): Fix typo.
1839 2018-08-02 Richard Biener <rguenther@suse.de>
1841 PR tree-optimization/86816
1842 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
1843 which checks for value availability before querying it.
1844 (gvn_uses_equal): Use it.
1845 (same_succ_hash): Likewise.
1846 (gimple_equal_p): Likewise.
1848 2018-08-02 Nick Clifton <nickc@redhat.com>
1851 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1852 Define to speculation_safe_value_not_needed.
1855 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1856 Define to speculation_safe_value_not_needed.
1859 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1860 Define to speculation_safe_value_not_needed.
1863 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1864 Define to speculation_safe_value_not_needed.
1867 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1868 Define to speculation_safe_value_not_needed.
1871 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1872 Define to speculation_safe_value_not_needed.
1875 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1876 Define to speculation_safe_value_not_needed.
1879 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1880 Define to speculation_safe_value_not_needed.
1883 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
1884 speculation_safe_value_not_needed.
1887 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
1888 to speculation_safe_value_not_needed.
1890 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
1892 * doc/md.texi: Expand the documentation of instruction names
1893 to mention port-local uses. Document '@' in pattern names.
1894 * read-md.h (overloaded_instance, overloaded_name): New structs.
1896 (md_reader::handle_overloaded_name): New member function.
1897 (md_reader::get_overloads): Likewise.
1898 (md_reader::m_first_overload): New member variable.
1899 (md_reader::m_next_overload_ptr): Likewise.
1900 (md_reader::m_overloads_htab): Likewise.
1901 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
1902 m_next_overload_ptr and m_overloads_htab.
1903 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
1904 (get_mode_token, get_code_token, get_int_token): New functions.
1905 (map_attr_string): Add an optional argument that passes back
1906 the associated iterator.
1907 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
1908 (md_reader::handle_overloaded_name, add_overload_instance): New
1910 (apply_iterators): Handle '@' names. Report an error if '@'
1911 is used without iterators.
1912 (initialize_iterators): Initialize the new iterator_group fields.
1913 * genopinit.c (handle_overloaded_code_for)
1914 (handle_overloaded_gen): New functions.
1915 (main): Use them to print declarations of maybe_code_for_* and
1916 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
1917 * genemit.c (print_overload_arguments, print_overload_test)
1918 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
1919 (main): Use it to print definitions of maybe_code_for_* and
1920 maybe_gen_* functions.
1921 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
1922 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
1923 instead of explicit mode checks.
1924 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
1925 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
1926 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
1927 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
1928 (aarch64_expand_compare_and_swap): Likewise
1929 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
1930 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
1931 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
1932 (aarch64_constant_pool_reload_icode): Delete.
1933 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
1934 instead of aarch64_constant_pool_reload_icode. Use
1935 code_for_aarch64_reload_mov instead of explicit mode checks.
1936 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
1937 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
1938 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
1939 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
1940 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
1941 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
1942 (aarch64_atomic_load_op_code): Delete.
1943 (aarch64_emit_atomic_load_op): Likewise.
1944 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
1945 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
1946 instead of aarch64_emit_atomic_load_op.
1947 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
1948 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
1949 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
1950 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
1951 character before the pattern name.
1952 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
1953 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
1954 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
1955 (aarch64_frecps<mode>): Likewise.
1956 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
1957 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
1958 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
1959 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
1960 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
1962 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
1964 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
1965 Allow HFmode constants if TARGET_FP_F16INST.
1967 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
1970 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
1971 No longer check last store for clobber of address register.
1973 2018-08-02 Martin Liska <mliska@suse.cz>
1975 PR gcov-profile/86817
1976 * gcov.c (process_all_functions): New function.
1978 (process_file): Move functions processing to
1979 process_all_functions.
1981 2018-08-02 David Malcolm <dmalcolm@redhat.com>
1983 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
1984 "const" to the "gimple *" and "rtx_insn *" parameters.
1985 * dumpfile.h (dump_user_location_t::dump_user_location_t):
1987 (dump_location_t::dump_location_t): Likewise.
1989 2018-08-01 Martin Sebor <msebor@redhat.com>
1991 PR tree-optimization/86650
1992 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
1993 rather than a "gcall *". Directly pass the data of interest
1994 to percent_K_format, rather than building a temporary CALL_EXPR
1996 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
1997 (gimple_fold_builtin_strncat): Adjust.
1998 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
1999 gcall* argument with gimple*.
2000 * gimple-ssa-warn-restrict.c (check_call): Same.
2001 (wrestrict_dom_walker::before_dom_children): Same.
2002 (builtin_access::builtin_access): Same.
2003 (check_bounds_or_overlap): Same
2004 (maybe_diag_overlap): Same.
2005 (maybe_diag_offset_bounds): Same.
2006 * tree-diagnostic.c (default_tree_printer): Move usage of
2007 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
2009 * tree-pretty-print.c (percent_K_format): Add argument.
2010 * tree-pretty-print.h: Add argument.
2011 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
2012 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
2013 (maybe_diag_stxncpy_trunc): Same.
2014 (handle_builtin_stxncpy): Same.
2015 (handle_builtin_strcat): Same.
2017 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2019 * match.pd: Optimise pointer range checks.
2021 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2023 PR tree-optimization/86758
2024 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
2025 to remove pattern statements.
2027 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2029 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
2030 result of dfs_enumerate_from when constructing stmt_vec_infos,
2031 instead of additionally calling get_loop_body.
2033 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2035 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
2037 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
2038 When creating an iv, assert that the step is not known to be zero.
2039 (vect_setup_realignment): Update call accordingly.
2040 * tree-vect-stmts.c (vectorizable_store): Likewise.
2041 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
2043 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2045 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
2046 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
2047 (vectorizable_reduction): Likewise.
2048 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2049 (vect_detect_hybrid_slp_stmts): Likewise.
2050 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2052 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
2054 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
2055 (wide_int_set_zero_nonzero_bits): ...this.
2056 (zero_nonzero_bits_from_vr): Rename to...
2057 (vrp_set_zero_nonzero_bits): ...this.
2058 (extract_range_from_multiplicative_op_1): Abstract wide int
2060 (wide_int_range_multiplicative_op): ...here.
2061 (extract_range_from_binary_expr_1): Extract wide int binary
2062 operations into their own functions.
2063 (wide_int_range_lshift): New.
2064 (wide_int_range_can_optimize_bit_op): New.
2065 (wide_int_range_shift_undefined_p): New.
2066 (wide_int_range_bit_xor): New.
2067 (wide_int_range_bit_ior): New.
2068 (wide_int_range_bit_and): New.
2069 (wide_int_range_trunc_mod): New.
2070 (extract_range_into_wide_ints): New.
2071 (vrp_shift_undefined_p): New.
2072 (extract_range_from_multiplicative_op): New.
2073 (vrp_can_optimize_bit_op): New.
2074 * tree-vrp.h (value_range::dump): New.
2075 (wide_int_range_multiplicative_op): New.
2076 (wide_int_range_lshift):New.
2077 (wide_int_range_shift_undefined_p): New.
2078 (wide_int_range_bit_xor): New.
2079 (wide_int_range_bit_ior): New.
2080 (wide_int_range_bit_and): New.
2081 (wide_int_range_trunc_mod): New.
2082 (zero_nonzero_bits_from_bounds): Rename to...
2083 (wide_int_set_zero_nonzero_bits): ...this.
2084 (zero_nonzero_bits_from_vr): Rename to...
2085 (vrp_set_zero_nonzero_bits): ...this.
2086 (range_easy_mask_min_max): Rename to...
2087 (wide_int_range_can_optimize_bit_op): this.
2088 * vr-values.c (simplify_bit_ops_using_ranges): Rename
2089 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
2091 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2093 * tree-vectorizer.h (vect_orig_stmt): New function.
2094 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
2095 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
2096 (vect_create_epilog_for_reduction): Likewise.
2097 (vectorizable_live_operation): Likewise.
2098 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
2099 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
2100 * tree-vect-stmts.c (vectorizable_call): Likewise.
2101 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
2103 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2105 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
2107 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
2108 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
2109 (vect_transform_loop): Likewise.
2110 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
2112 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2114 * tree-vectorizer.h (vect_schedule_slp): Return void.
2115 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
2116 (vect_schedule_slp): Likewise.
2118 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2120 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
2122 (vect_transform_loop): Update calls accordingly. Schedule SLP
2123 instances before the main loop, if any exist.
2125 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2127 PR tree-optimization/86749
2128 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
2129 If the lhs is used in a COND_EXPR, check that it is being used
2130 as the "then" or "else" value.
2132 2018-08-01 Tom de Vries <tdevries@suse.de>
2135 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
2136 speculation_safe_value_not_needed.
2138 2018-08-01 Richard Biener <rguenther@suse.de>
2140 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
2143 2018-08-01 Martin Liska <mliska@suse.cz>
2145 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
2146 format how successful transformation is dumped.
2147 (gimple_mod_pow2_value_transform): Likewise.
2148 (gimple_mod_subtract_transform): Likewise.
2149 (gimple_stringops_transform): Likewise.
2151 2018-08-01 Martin Liska <mliska@suse.cz>
2154 * value-prof.c (interesting_stringop_to_profile_p):
2155 Simplify the code and add BUILT_IN_MEMMOVE.
2156 (gimple_stringops_transform): Likewise.
2158 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
2160 * config/aarch64/aarch64-simd.md
2161 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
2162 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
2163 use GPI iterator instead of SI mode.
2165 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
2167 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
2168 rs6000_speculation_barrier.
2169 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
2170 new barrier pattern name.
2172 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
2174 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
2175 (speculation_barrier): New insn.
2177 2018-08-01 Richard Biener <rguenther@suse.de>
2180 * graphite.h: Include isl/id.h and isl/space.h to allow build
2183 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
2186 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
2187 mode for COFF targets.
2188 * defaults.h (TARGET_COFF): Define.
2189 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
2190 TARGET_COFF): Define.
2191 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
2192 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
2193 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
2195 2018-07-31 Alexandre Oliva <oliva@adacore.com>
2197 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
2198 * gimple-streamer-out.c (output_bb): Save it.
2199 * lto-streamer-in.c (input_struct_function_base): Restore
2200 instance discriminator if available. Create map on demand.
2201 * lto-streamer-out.c (output_struct_function_base): Save it if
2203 * final.c (decl_to_instance_map): Document LTO strategy.
2205 2018-07-31 Alexandre Oliva <oliva@adacore.com>
2206 Olivier Hainque <hainque@adacore.com>
2208 * debug.h (decl_to_instance_map_t): New type.
2209 (decl_to_instance_map): Declare.
2210 (maybe_create_decl_to_instance_map): New inline function.
2211 * final.c (bb_discriminator, last_bb_discriminator): New statics,
2212 to track basic block discriminators.
2213 (final_start_function_1): Initialize them.
2214 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
2216 (decl_to_instance_map): New variable.
2217 (map_decl_to_instance, maybe_set_discriminator): New functions.
2218 (notice_source_line): Set discriminator.
2220 2018-07-31 Ian Lance Taylor <iant@golang.org>
2222 * targhooks.c (default_have_speculation_safe_value): Add
2225 2018-07-31 David Malcolm <dmalcolm@redhat.com>
2227 * dump-context.h: Include "pretty-print.h".
2228 (dump_context::refresh_dumps_are_enabled): New decl.
2229 (dump_context::emit_item): New decl.
2230 (class dump_context): Add fields "m_test_pp" and
2232 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
2233 (temp_dump_context::get_dumped_text): New decl.
2234 (class temp_dump_context): Add field "m_pp".
2235 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
2236 (dump_context::refresh_dumps_are_enabled): ...and add a test for
2238 (set_dump_file): Update for above change.
2239 (set_alt_dump_file): Likewise.
2240 (dump_loc): New overload, taking a pretty_printer *.
2241 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
2242 to any test pretty-printer.
2243 (make_item_for_dump_gimple_stmt): New function, adapted from
2244 optinfo::add_gimple_stmt.
2245 (dump_context::dump_gimple_stmt): Call it, and use the result,
2246 eliminating the direct usage of dump_file and alt_dump_file in
2247 favor of indirectly using them via emit_item.
2248 (make_item_for_dump_gimple_expr): New function, adapted from
2249 optinfo::add_gimple_expr.
2250 (dump_context::dump_gimple_expr): Call it, and use the result,
2251 eliminating the direct usage of dump_file and alt_dump_file in
2252 favor of indirectly using them via emit_item.
2253 (make_item_for_dump_generic_expr): New function, adapted from
2255 (dump_context::dump_generic_expr): Call it, and use the result,
2256 eliminating the direct usage of dump_file and alt_dump_file in
2257 favor of indirectly using them via emit_item.
2258 (make_item_for_dump_printf_va): New function, adapted from
2259 optinfo::add_printf_va.
2260 (make_item_for_dump_printf): New function.
2261 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
2262 and use the result, eliminating the direct usage of dump_file and
2263 alt_dump_file in favor of indirectly using them via emit_item.
2264 (make_item_for_dump_dec): New function.
2265 (dump_context::dump_dec): Call it, and use the result,
2266 eliminating the direct usage of dump_file and alt_dump_file in
2267 favor of indirectly using them via emit_item.
2268 (make_item_for_dump_symtab_node): New function, adapted from
2269 optinfo::add_symtab_node.
2270 (dump_context::dump_symtab_node): Call it, and use the result,
2271 eliminating the direct usage of dump_file and alt_dump_file in
2272 favor of indirectly using them via emit_item.
2273 (dump_context::begin_scope): Reimplement, avoiding direct usage
2274 of dump_file and alt_dump_file in favor of indirectly using them
2276 (dump_context::emit_item): New member function.
2277 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
2278 Set up test pretty-printer on the underlying context. Call
2279 refresh_dumps_are_enabled.
2280 (temp_dump_context::~temp_dump_context): Call
2281 refresh_dumps_are_enabled.
2282 (temp_dump_context::get_dumped_text): New member function.
2283 (selftest::verify_dumped_text): New function.
2284 (ASSERT_DUMPED_TEXT_EQ): New macro.
2285 (selftest::test_capture_of_dump_calls): Run all tests twice, with
2286 and then without optinfo enabled. Add uses of
2287 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
2288 * dumpfile.h: Update comment for the dump_* API.
2289 * optinfo-emit-json.cc
2290 (selftest::test_building_json_from_dump_calls): Update for new
2291 param for temp_dump_context ctor.
2292 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
2293 and "m_owned" field.
2294 (optinfo_item::~optinfo_item): Likewise.
2295 (optinfo::add_item): New member function.
2296 (optinfo::emit): Update comment.
2297 (optinfo::add_string): Delete.
2298 (optinfo::add_printf): Delete.
2299 (optinfo::add_printf_va): Delete.
2300 (optinfo::add_gimple_stmt): Delete.
2301 (optinfo::add_gimple_expr): Delete.
2302 (optinfo::add_tree): Delete.
2303 (optinfo::add_symtab_node): Delete.
2304 (optinfo::add_dec): Delete.
2305 * optinfo.h (class dump_context): New forward decl.
2306 (optinfo::add_item): New decl.
2307 (optinfo::add_string): Delete.
2308 (optinfo::add_printf): Delete.
2309 (optinfo::add_printf_va): Delete.
2310 (optinfo::add_gimple_stmt): Delete.
2311 (optinfo::add_gimple_expr): Delete.
2312 (optinfo::add_tree): Delete.
2313 (optinfo::add_symtab_node): Delete.
2314 (optinfo::add_dec): Delete.
2315 (optinfo::add_poly_int): Delete.
2316 (optinfo_item::optinfo_item): Remove "owned" param.
2317 (class optinfo_item): Remove field "m_owned".
2319 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2322 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
2323 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
2324 requested variable alignment.
2325 (expand_one_ssa_partition): Likewise.
2326 (expand_one_var): Likewise.
2328 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2330 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
2331 to speculation_safe_value_not_needed.
2333 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2335 * targhooks.h (speculation_safe_value_not_needed): New prototype.
2336 * targhooks.c (speculation_safe_value_not_needed): New function.
2337 * target.def (have_speculation_safe_value): Update documentation.
2338 * doc/tm.texi: Regenerated.
2340 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2342 * config/aarch64/iterators.md (ALLI_TI): New iterator.
2343 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
2345 (despeculate_copy<ALLI:mode>_insn): New insn.
2346 (despeculate_copyti_insn): New insn.
2347 (despeculate_simple<ALLI:mode>): New insn
2348 (despeculate_simpleti): New insn.
2349 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
2351 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
2352 aarch64_speculation_safe_value.
2353 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
2355 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2357 * config/aarch64/aarch64-speculation.cc: New file.
2358 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
2359 before pass_reorder_blocks.
2360 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
2362 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
2363 X14 and X15 when tracking speculation.
2364 * config/aarch64/aarch64.md (register name constants): Add
2365 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
2366 (unspec): Add UNSPEC_SPECULATION_TRACKER.
2367 (speculation_barrier): New insn attribute.
2368 (cmp<mode>): Allow SP in comparisons.
2369 (speculation_tracker): New insn.
2370 (speculation_barrier): Add speculation_barrier attribute.
2371 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
2372 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
2373 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
2375 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2377 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
2378 aarch64_track_speculation is true.
2379 (tb<optab><mode>1): Likewise.
2380 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
2381 generate CB[N]Z when tracking speculation.
2382 (aarch64_split_compare_and_swap): Likewise.
2383 (aarch64_split_atomic_op): Likewise.
2385 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2387 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
2389 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2391 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
2392 (speculation_barrier): New insn.
2394 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2396 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
2397 * config/arm/arm.md (speculation_barrier): New expand.
2398 (speculation_barrier_insn): New pattern.
2400 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2402 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
2403 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
2404 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
2405 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
2407 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
2408 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
2409 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
2410 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
2411 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
2412 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
2413 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
2414 * builtins.c (expand_speculation_safe_value): New function.
2415 (expand_builtin): Call it.
2416 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
2417 * doc/extend.texi: Document __builtin_speculation_safe_value.
2418 * doc/md.texi: Document "speculation_barrier" pattern.
2419 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
2420 TARGET_HAVE_SPECULATION_SAFE_VALUE.
2421 * doc/tm.texi: Regenerated.
2422 * target.def (have_speculation_safe_value, speculation_safe_value): New
2424 * targhooks.c (default_have_speculation_safe_value): New function.
2425 (default_speculation_safe_value): New function.
2426 * targhooks.h (default_have_speculation_safe_value): Add prototype.
2427 (default_speculation_safe_value): Add prototype.
2429 2018-07-31 David Malcolm <dmalcolm@redhat.com>
2431 * dump-context.h (dump_context::dump_loc): New decl.
2432 * dumpfile.c (dump_context::dump_loc): New member function.
2433 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
2434 and dump_gimple_stmt.
2435 (dump_context::dump_gimple_expr_loc): Likewise, using
2437 (dump_context::dump_generic_expr_loc): Likewise, using
2439 (dump_context::dump_printf_loc_va): Likewise, using
2441 (dump_context::begin_scope): Explicitly using the global function
2442 "dump_loc", rather than the member function.
2444 2018-07-31 Martin Sebor <msebor@redhat.com>
2446 PR tree-optimization/86741
2447 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
2449 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
2451 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
2452 depend on whether prefetch instructions will be emitted or not.
2453 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
2454 will be emitted or not.
2455 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
2456 (TARGET_SETMEM_PFD): New macros.
2458 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2460 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
2461 (NULL_STMT_VEC_INFO): Delete.
2462 (stmt_vec_info::operator*): Likewise.
2463 (stmt_vec_info::operator gimple *): Likewise.
2464 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
2465 of NULL_STMT_VEC_INFO.
2466 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2467 (vect_reassociating_reduction_p): Likewise.
2468 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
2469 (vectorizable_store): Likewise.
2470 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
2471 (vec_info::free_stmt_vec_infos): Likewise.
2473 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2475 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
2476 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
2478 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2480 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
2481 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
2482 (vec_info::free_stmt_vec_info): New private member functions.
2483 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
2484 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
2485 * tree-parloops.c (gather_scalar_reductions): Remove calls to
2486 set_stmt_vec_info_vec and free_stmt_vec_infos.
2487 * tree-vect-loop.c (_loop_vec_info): Remove call to
2488 set_stmt_vec_info_vec.
2489 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
2490 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
2491 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
2492 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
2493 (vec_info::free_stmt_vec_info): ...these new functions. Remove
2494 assignments in {vec_info::,}new_stmt_vec_info that are redundant
2495 with the clearing in the xcalloc.
2496 (stmt_vec_info_vec): Delete.
2497 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
2498 (vectorize_loops): Likewise.
2499 (vec_info::~vec_info): Remove argument from call to
2500 free_stmt_vec_infos.
2501 (vec_info::add_stmt): Remove vinfo argument from call to
2504 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2506 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
2507 rather than a gimple stmt.
2508 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
2509 information for pattern statements when passed the original
2510 statement; instead wait to be passed the pattern statement itself.
2511 Don't call set_vinfo_for_stmt here.
2512 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
2513 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
2514 stmt_vec_infos here.
2515 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
2516 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
2517 stmt_vec_infos entry.
2519 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2521 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
2522 * tree-vectorizer.c (vec_info::replace_stmt): New function.
2523 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
2524 * tree-vect-stmts.c (vectorizable_call): Likewise.
2525 (vectorizable_simd_clone_call): Likewise.
2527 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2529 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
2530 * tree-vectorizer.c (vec_info::remove_stmt): New function.
2531 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
2532 * tree-vect-loop.c (vect_transform_loop): Likewise.
2533 * tree-vect-slp.c (vect_schedule_slp): Likewise.
2534 * tree-vect-stmts.c (vect_remove_stores): Likewise.
2536 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2538 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
2539 (vect_dr_stmt): Delete.
2540 * tree-vectorizer.c (vec_info::lookup_dr): New function.
2541 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
2543 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
2544 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
2545 (vect_verify_datarefs_alignment, vect_peeling_supportable)
2546 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
2547 (vect_analyze_data_refs): Likewise.
2548 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
2550 (vect_find_same_alignment_drs): Likewise.
2551 (vect_slp_analyze_node_dependences): Update calls accordingly.
2552 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
2553 instead of DR_VECT_AUX.
2554 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
2555 of a vector data references. Use vec_info::lookup_dr instead of
2557 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
2558 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
2559 instead of DR_VECT_AUX.
2561 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2563 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
2565 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
2567 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2568 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2569 (vect_gen_prolog_loop_niters): Likewise.
2571 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2573 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
2574 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
2575 (vect_known_alignment_in_bytes, vect_dr_behavior)
2576 (vect_get_scalar_dr_size): Take references as dr_vec_infos
2577 instead of data_references. Update calls to other routines for
2578 which the same change has been made.
2579 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
2580 dr_vec_infos instead of stmt_vec_infos.
2581 (vect_analyze_data_ref_dependence): Update call accordingly.
2582 (vect_slp_analyze_data_ref_dependence)
2583 (vect_record_base_alignments): Use DR_VECT_AUX.
2584 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
2585 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
2586 (vector_alignment_reachable_p, vect_get_data_access_cost)
2587 (vect_peeling_supportable, vect_analyze_group_access_1)
2588 (vect_analyze_group_access, vect_analyze_data_ref_access)
2589 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
2590 (vect_compile_time_alias, vect_small_gap_p)
2591 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
2592 (vect_supportable_dr_alignment): Take references as dr_vec_infos
2593 instead of data_references. Update calls to other routines for
2594 which the same change has been made.
2595 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
2596 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
2597 (vect_slp_analyze_and_verify_node_alignment)
2598 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
2599 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
2600 (vect_setup_realignment): Use dr_vec_infos. Update calls after
2602 (_vect_peel_info::dr): Replace with...
2603 (_vect_peel_info::dr_info): ...this new field.
2604 (vect_peeling_hash_get_most_frequent)
2605 (vect_peeling_hash_choose_best_peeling): Update accordingly.
2606 (vect_peeling_hash_get_lowest_cost):
2607 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
2608 routines for which the same change has been made.
2609 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
2611 * tree-vect-loop-manip.c (get_misalign_in_elems)
2612 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
2614 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2615 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
2616 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
2617 (get_group_load_store_type, get_negative_load_store_type)
2618 (vect_get_data_ptr_increment, vectorizable_store)
2619 (vectorizable_load): Likewise.
2620 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
2621 Update calls to other routines for which the same change has been made.
2623 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2625 * tree-vectorizer.h (vec_info::move_dr): New member function.
2626 (dataref_aux): Rename to...
2627 (dr_vec_info): ...this and add "dr" and "stmt" fields.
2628 (_stmt_vec_info::dr_aux): Update accordingly.
2629 (_stmt_vec_info::data_ref_info): Delete.
2630 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
2631 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
2632 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
2633 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
2635 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
2636 (STMT_VINFO_DR_INFO): New macro.
2637 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
2638 (set_dr_misalignment): Update after rename of dataref_aux.
2639 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
2640 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
2641 initialization of STMT_VINFO_DATA_REF.
2642 * tree-vectorizer.c (vec_info::move_dr): New function.
2643 * tree-vect-patterns.c (vect_recog_bool_pattern)
2644 (vect_recog_mask_conversion_pattern)
2645 (vect_recog_gather_scatter_pattern): Use it.
2646 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
2647 the "dr" and "stmt" fields of dr_vec_info instead of
2648 STMT_VINFO_DATA_REF.
2650 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2652 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
2653 (is_pattern_stmt_p): Use it.
2654 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
2655 on pattern statements.
2657 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2659 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
2660 original stmt as a stmt_vec_info rather than a gimple stmt.
2661 (vect_pattern_recog_1): Take the statement directly as a
2662 stmt_vec_info, rather than via a gimple_stmt_iterator.
2663 Update call to vect_mark_pattern_stmts.
2664 (vect_pattern_recog): Update calls accordingly.
2666 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2668 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
2669 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
2670 a vect_def_type for the first argument.
2671 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
2672 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
2673 operand if it isn't defined by a vectorized statement.
2674 (vect_build_gather_load_calls): Remove the mask_dt argument and
2675 update calls to vect_get_vec_def_for_stmt_copy.
2676 (vectorizable_bswap): Likewise the dt argument.
2677 (vectorizable_call): Update calls to vectorizable_bswap and
2678 vect_get_vec_def_for_stmt_copy.
2679 (vectorizable_simd_clone_call, vectorizable_assignment)
2680 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
2681 (vectorizable_comparison): Update calls to
2682 vect_get_vec_def_for_stmt_copy.
2683 (vectorizable_store): Likewise. Remove now-unnecessary calls to
2685 (vect_get_loop_based_defs): Remove dt argument and update call
2686 to vect_get_vec_def_for_stmt_copy.
2687 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
2688 and vect_get_vec_def_for_stmt_copy.
2689 (vectorizable_load): Update calls to vect_build_gather_load_calls
2690 and vect_get_vec_def_for_stmt_copy.
2691 * tree-vect-loop.c (vect_create_epilog_for_reduction)
2692 (vectorizable_reduction, vectorizable_live_operation): Update calls
2693 to vect_get_vec_def_for_stmt_copy.
2695 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2697 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
2698 and gimple stmt arguments with a stmt_vec_info.
2699 (vect_record_base_alignments): Update calls accordingly.
2700 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
2701 and gimple stmt arguments with a stmt_vec_info.
2702 (vect_build_slp_tree_1): Remove vinfo argument and update call
2703 to vect_record_max_nunits.
2704 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
2705 and vect_record_max_nunits.
2707 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2709 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
2710 file and take a stmt_vec_info instead of a gimple stmt.
2711 (supportable_widening_operation, vect_finish_replace_stmt)
2712 (vect_finish_stmt_generation, vect_get_store_rhs)
2713 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
2714 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
2715 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
2716 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
2717 (vect_create_data_ref_ptr, bump_vector_ptr)
2718 (vect_permute_store_chain, vect_setup_realignment)
2719 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
2720 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
2721 (vectorizable_reduction, vectorizable_induction)
2722 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
2723 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
2724 than gimple stmts as arguments.
2725 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
2726 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
2727 (can_group_stmts_p, vect_check_gather_scatter)
2728 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
2729 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
2730 (vect_permute_load_chain, vect_shift_permute_load_chain)
2731 (vect_transform_grouped_load)
2732 (vect_record_grouped_load_vectors): Likewise.
2733 * tree-vect-loop.c (vect_fixup_reduc_chain)
2734 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
2735 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
2736 (vectorizable_reduction, vectorizable_induction)
2737 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
2738 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
2739 (vect_get_load_store_mask): Likewise.
2740 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
2741 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
2742 * tree-vect-stmts.c (vect_mark_relevant)
2743 (is_simple_and_all_uses_invariant)
2744 (exist_non_indexing_operands_for_use_p, process_use)
2745 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
2746 (vect_get_vec_def_for_operand, vect_get_vec_defs)
2747 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
2748 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
2749 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
2750 (get_negative_load_store_type, get_load_store_type)
2751 (vect_check_load_store_mask, vect_check_store_rhs)
2752 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
2753 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2754 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2755 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2756 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
2757 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
2758 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
2759 (supportable_widening_operation): Likewise.
2761 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2763 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
2764 a stmt_vec_info instead of a gcall.
2765 (vect_check_gather_scatter): Update call accordingly.
2766 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
2768 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
2769 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
2770 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
2771 instead of a gimple stmt.
2772 (vect_transform_loop): Update calls accordingly.
2773 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
2774 stmt_vec_infos instead of gimple stmts.
2775 (vect_analyze_slp_instance): Update use accordingly.
2776 * tree-vect-stmts.c (read_vector_array, write_vector_array)
2777 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
2778 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
2779 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
2780 (vect_gen_widened_results_half, vect_get_loop_based_defs)
2781 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
2782 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
2783 down to subroutines.
2785 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2787 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
2788 of the worklist from a vector of gimple stmts to a vector of
2790 * tree-vect-stmts.c (vect_mark_relevant, process_use)
2791 (vect_mark_stmts_to_be_vectorized): Likewise
2793 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2795 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
2796 statement before passing it to vect_analyze_stmt.
2797 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
2798 the chain of phi vector definitions. Track the exit phi via its
2800 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
2801 STMT_VINFO_REDUC_DEF.
2802 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
2803 stmt_vec_infos to handle the statement chains.
2804 (vect_get_slp_defs): Record the first statement in the node
2805 using a stmt_vec_info.
2806 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
2807 statements here and pass their stmt_vec_info down to subroutines.
2808 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
2809 down to vect_finish_stmt_generation.
2810 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
2811 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
2812 stmt_vec_infos to subroutines.
2813 (vect_remove_stores): Use stmt_vec_infos to handle the statement
2816 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2818 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
2819 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
2820 (vect_permute_store_chain, vect_setup_realignment)
2821 (vect_permute_load_chain, vect_shift_permute_load_chain)
2822 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
2823 stmts internally, and when passing values to other vectorizer routines.
2824 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
2825 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
2826 (vect_analyze_loop_operations, get_initial_def_for_reduction)
2827 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
2828 (vectorizable_reduction, vectorizable_induction)
2829 (vectorizable_live_operation, vect_transform_loop_stmt)
2830 (vect_transform_loop): Likewise.
2831 * tree-vect-patterns.c (vect_reassociating_reduction_p)
2832 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
2833 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
2834 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2835 (vect_slp_analyze_node_operations_1): Likewise.
2836 * tree-vect-stmts.c (vect_mark_relevant, process_use)
2837 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
2838 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
2839 (vect_finish_stmt_generation_1, get_group_load_store_type)
2840 (get_load_store_type, vect_build_gather_load_calls)
2841 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2842 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2843 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2844 (vectorizable_store, vectorizable_load, vectorizable_condition)
2845 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
2846 (supportable_widening_operation): Likewise.
2847 (vect_get_vector_types_for_stmt): Likewise.
2848 * tree-vectorizer.h (vect_dr_behavior): Likewise.
2850 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2852 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
2853 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
2854 (vect_permute_store_chain, vect_permute_load_chain)
2855 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
2856 repeated stmt_vec_info lookups.
2857 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
2858 (vect_update_ivs_after_vectorizer): Likewise.
2859 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
2860 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
2861 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
2862 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2863 (vect_bb_slp_scalar_cost): Likewise.
2864 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
2866 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2868 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
2869 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
2870 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
2871 to get gassigns and gcalls, rather than operating on generc gimple
2873 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
2874 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
2875 (vectorizable_load, vect_analyze_stmt): Likewise.
2876 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
2878 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2880 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
2881 return stmt_vec_infos rather than gimple stmts. Do not accept
2883 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
2885 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
2886 Update use of get_later_stmt.
2887 (vect_get_constant_vectors): Update call accordingly.
2888 (vect_schedule_slp_instance): Likewise
2889 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
2890 (vect_slp_analyze_instance_dependence): Likewise.
2891 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
2893 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2895 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
2896 (stmt_info_for_cost::stmt_info): ...this new field.
2897 (add_stmt_costs): Update accordingly.
2898 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
2899 (vect_get_known_peeling_cost): Likewise.
2900 (vect_estimate_min_profitable_iters): Likewise.
2901 * tree-vect-stmts.c (record_stmt_cost): Likewise.
2903 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2905 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
2906 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2907 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
2909 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
2911 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2913 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
2914 a gimple stmt to a stmt_vec_info.
2915 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
2917 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2919 * tree-vectorizer.h (vec_info::grouped_stores): Change from
2920 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2921 (_loop_vec_info::reduction_chains): Likewise.
2922 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
2924 * tree-vect-slp.c (vect_analyze_slp): Likewise.
2926 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2928 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
2929 a gimple stmt to a stmt_vec_info.
2930 (_stmt_vec_info::next_element): Likewise.
2931 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
2932 (vect_slp_analyze_and_verify_node_alignment)
2933 (vect_analyze_group_access_1, vect_analyze_group_access)
2934 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
2935 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
2936 (vect_supportable_dr_alignment): Update accordingly.
2937 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
2938 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
2939 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
2940 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
2941 * tree-vect-slp.c (vect_build_slp_tree_1)
2942 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
2943 (vect_split_slp_store_group, vect_analyze_slp_instance)
2944 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
2945 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
2946 (get_group_load_store_type, get_load_store_type)
2947 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
2948 (vect_transform_stmt, vect_remove_stores): Likewise.
2950 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2952 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
2954 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
2955 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
2956 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
2957 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
2958 (vector_alignment_reachable_p, vect_get_data_access_cost)
2959 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
2960 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
2961 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
2962 (vect_analyze_group_access_1, vect_analyze_group_access)
2963 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
2964 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
2965 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
2966 result of vect_dr_stmt and use the stmt_vec_info instead of
2967 the associated gimple stmt.
2968 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2969 (vect_gen_prolog_loop_niters): Likewise.
2970 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2972 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2974 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
2975 to a vec<stmt_vec_info>.
2976 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
2977 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
2979 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
2980 to a vec<stmt_vec_info>.
2981 (bst_traits::value_type, bst_traits::value_type): Likewise.
2982 (bst_traits::hash): Update accordingly.
2983 (vect_get_and_check_slp_defs): Change the stmts parameter from
2984 a vec<gimple *> to a vec<stmt_vec_info>.
2985 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
2986 (vect_build_slp_tree): Likewise.
2987 (vect_build_slp_tree_2): Likewise. Update uses of
2988 SLP_TREE_SCALAR_STMTS.
2989 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
2990 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
2991 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
2992 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
2993 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
2994 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
2995 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
2996 (vect_get_constant_vectors, vect_get_slp_defs)
2997 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
2998 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
2999 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
3000 instead of gimple stmts.
3001 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
3002 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
3003 (vect_slp_analyze_instance_dependence): Update uses of
3004 SLP_TREE_SCALAR_STMTS.
3005 (vect_slp_analyze_and_verify_node_alignment): Likewise.
3006 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
3007 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
3008 (get_initial_defs_for_reduction): Likewise.
3009 (vect_create_epilog_for_reduction): Likewise.
3010 (vectorize_fold_left_reduction): Likewise.
3011 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
3012 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
3013 (can_vectorize_live_stmts): Likewise.
3015 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3017 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
3018 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3019 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
3021 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
3023 (gather_scalar_reductions): Update after above interface changes.
3024 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
3025 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
3027 (vect_force_simple_reduction): Likewise.
3028 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
3029 LOOP_VINFO_REDUCTIONS.
3030 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3032 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3034 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
3035 a gimple stmt to a stmt_vec_info.
3036 * tree-vect-loop.c (vect_active_double_reduction_p)
3037 (vect_force_simple_reduction, vectorizable_reduction): Update
3040 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3042 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
3043 vec<gimple *> to a vec<stmt_vec_info>.
3044 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
3045 the reduction_phis argument from a vec<gimple *> to a
3047 (vectorizable_reduction): Likewise the phis local variable that
3048 is passed to vect_create_epilog_for_reduction. Update for new type
3049 of SLP_TREE_VEC_STMTS.
3050 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
3051 (vectorizable_live_operation): Likewise.
3052 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
3053 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
3055 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3057 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
3058 a gimple stmt to a stmt_vec_info.
3059 (vectorizable_condition, vectorizable_live_operation)
3060 (vectorizable_reduction, vectorizable_induction): Pass back the
3061 vectorized statement as a stmt_vec_info.
3062 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
3063 use of STMT_VINFO_VEC_STMT.
3064 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
3065 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
3066 as stmt_vec_infos rather than gimple stmts.
3067 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
3069 (vectorizable_live_operation): Likewise.
3070 (vectorizable_reduction, vectorizable_induction): Likewise,
3071 updating use of STMT_VINFO_VEC_STMT.
3072 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
3073 of STMT_VINFO_VEC_STMT.
3074 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
3075 (vectorizable_simd_clone_call, vectorizable_conversion)
3076 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3077 (vectorizable_store, vectorizable_load, vectorizable_condition)
3078 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
3079 from a gimple stmt to a stmt_vec_info.
3080 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
3081 pointer to a stmt_vec_info to the vectorizable_* routines.
3083 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3085 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
3086 a gimple stmt to a stmt_vec_info.
3087 (is_pattern_stmt_p): Update accordingly.
3088 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
3089 (vect_record_grouped_load_vectors): Likewise.
3090 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
3091 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
3092 (vect_model_reduction_cost): Likewise.
3093 (vect_create_epilog_for_reduction): Likewise.
3094 (vectorizable_reduction, vectorizable_induction): Likewise.
3095 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3096 Return the stmt_vec_info for the pattern statement.
3097 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
3098 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
3099 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
3100 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
3101 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
3102 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
3103 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
3104 (free_stmt_vec_info, vect_is_simple_use): Likewise.
3106 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3108 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
3109 (vect_finish_stmt_generation): Likewise.
3110 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3111 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
3112 (vect_build_gather_load_calls): Use the return value of the above
3113 functions instead of a separate call to vinfo_for_stmt. Use narrow
3114 scopes for the input gimple stmt and wider scopes for the associated
3115 stmt_vec_info. Use vec_info::lookup_def when setting these
3116 stmt_vec_infos from an SSA_NAME definition.
3117 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3118 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3119 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3120 (vectorizable_store, vectorizable_load, vectorizable_condition)
3121 (vectorizable_comparison): Likewise.
3122 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
3123 (vectorizable_reduction): Likewise.
3125 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3127 * tree-vectorizer.h (vect_is_simple_use): Add an optional
3128 stmt_vec_info * parameter before the optional gimple **.
3129 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3130 (process_use, vect_get_vec_def_for_operand_1): Update callers.
3131 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
3132 * tree-vect-loop.c (vectorizable_reduction): Likewise.
3133 (vectorizable_live_operation): Likewise.
3134 * tree-vect-patterns.c (type_conversion_p): Likewise.
3135 (vect_look_through_possible_promotion): Likewise.
3136 (vect_recog_rotate_pattern): Likewise.
3137 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3139 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3141 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
3142 a typedef to a wrapper class.
3143 (NULL_STMT_VEC_INFO): New macro.
3144 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
3145 (stmt_vec_info::operator*): New function.
3146 (stmt_vec_info::operator gimple *): Likewise.
3147 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
3148 (add_stmt_costs): Likewise.
3149 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
3150 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
3151 (vect_get_known_peeling_cost): Likewise.
3152 (vect_estimate_min_profitable_iters): Likewise.
3153 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3154 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
3155 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3156 (vectorizable_store, free_stmt_vec_infos): Likewise.
3157 (new_stmt_vec_info): Change return type of xcalloc to
3160 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3162 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
3163 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
3164 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
3165 a single_imm_use-based sequence.
3166 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
3168 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3170 * tree-vectorizer.h (vec_info::lookup_def): Declare.
3171 * tree-vectorizer.c (vec_info::lookup_def): New function.
3172 * tree-vect-patterns.c (vect_get_internal_def): Use it.
3173 (vect_widened_op_tree): Likewise.
3174 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3175 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
3176 (vectorizable_reduction): Likewise.
3177 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
3179 (vect_is_slp_reduction): Update calls accordingly. Use
3180 vec_info::lookup_def.
3181 (vect_is_simple_reduction): Likewise
3182 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
3184 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3186 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
3187 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
3188 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
3190 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
3191 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
3192 (vect_update_vf_for_slp, vect_analyze_loop_operations)
3193 (vect_is_slp_reduction, vectorizable_induction)
3194 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
3195 * tree-vect-patterns.c (vect_init_pattern_stmt):
3196 (vect_determine_min_output_precision_1, vect_determine_precisions)
3197 (vect_pattern_recog): Likewise.
3198 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
3199 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
3200 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
3201 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
3202 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
3203 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
3204 info field from a loop to a loop_vec_info.
3206 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3208 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
3209 (vec_info::add_stmt): Declare.
3210 * tree-vectorizer.c (vec_info::add_stmt): New function.
3211 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
3212 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
3213 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
3214 (vectorizable_induction): Likewise.
3215 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
3216 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3217 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
3218 (vectorizable_load): Likewise.
3219 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3220 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
3221 (vect_recog_gather_scatter_pattern): Likewise.
3222 (append_pattern_def_seq): Likewise. Remove a check that is
3223 performed by add_stmt itself.
3225 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3227 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
3228 which make_ssa_name was called with new_stmt before new_stmt
3231 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3233 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
3235 (vect_is_slp_reduction): ...here...
3236 (vect_is_simple_reduction): ...and here. Remove repetition of tests
3237 that are already known to be false.
3239 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3241 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
3242 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
3243 STMT_VINFO_NUM_SLP_USES when it's true.
3244 (vect_free_slp_instance): Add a final_p parameter and pass it to
3246 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
3247 (vect_analyze_slp_instance): Likewise.
3248 (vect_slp_analyze_operations): Likewise.
3249 (vect_slp_analyze_bb_1): Likewise.
3250 * tree-vectorizer.c (vec_info): Likewise.
3251 * tree-vect-loop.c (vect_transform_loop): Likewise.
3253 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3255 * tree-vect-loop.c (vectorizable_reduction): Assert that the
3256 function is not called for second and subsequent members of
3259 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3261 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
3262 cases for nested loops from here to ...
3263 (vect_create_epilog_for_reduction): ...here. Only call
3264 vect_is_simple_use for inner-loop reductions.
3266 2018-07-31 Martin Liska <mliska@suse.cz>
3268 PR gcov-profile/85338
3269 PR gcov-profile/85350
3270 PR gcov-profile/85372
3271 * profile.c (struct location_triplet): New.
3272 (struct location_triplet_hash): Likewise.
3273 (output_location): Do not output a BB that
3274 is already recorded for a line.
3275 (branch_prob): Use streamed_locations.
3277 2018-07-31 Martin Liska <mliska@suse.cz>
3279 PR gcov-profile/85370
3280 * coverage.c (coverage_begin_function): Do not mark target
3281 clones as artificial functions.
3283 2018-07-31 Martin Liska <mliska@suse.cz>
3285 PR gcov-profile/83813
3286 PR gcov-profile/84758
3287 PR gcov-profile/85217
3288 PR gcov-profile/85332
3289 * profile.c (branch_prob): Do not record GOTO expressions
3290 for GIMPLE statements which locations are already streamed.
3292 2018-07-31 Olivier Hainque <hainque@adacore.com>
3294 * gcc.c (handle_spec_function): Accept a soft_matched_part
3295 argument, as do_spec_1. Pass it down to ...
3296 (eval_spec_function): Accept a soft_matched_part argument,
3297 and pass it down to ...
3298 (do_spec_2): Accept a soft_matched_part argument, and pass
3299 it down to do_spec_1.
3300 (do_spec_1): Pass soft_matched_part to handle_spec_function.
3301 (handle_braces): Update call to handle_spec_function.
3302 (driver::set_up_specs): Update calls to do_spec_2.
3303 (compare_debug_dump_opt_spec_function): Likewise.
3304 (compare_debug_self_opt_spec_function): Likewise.
3306 2018-07-31 Olivier Hainque <hainque@adacore.com>
3308 * common.opt (nolibc): New option.
3309 * doc/invoke.texi (Link Options): Document it.
3310 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
3311 * config/alpha/linux.h: Likewise.
3312 * config/arc/elf.h: Likewise.
3313 * config/arm/uclinux-elf.h: Likewise.
3314 * config/arm/unknown-elf.h: Likewise.
3315 * config/avr/avrlibc.h: Likewise.
3316 * config/bfin/bfin.h: Likewise.
3317 * config/bfin/linux.h: Likewise.
3318 * config/bfin/uclinux.h: Likewise.
3319 * config/darwin.h: Likewise.
3320 * config/darwin10.h: Likewise.
3321 * config/darwin12.h: Likewise.
3322 * config/gnu-user.h: Likewise.
3323 * config/lm32/uclinux-elf.h: Likewise.
3324 * config/pa/pa-hpux11.h: Likewise.
3325 * config/pa/pa64-hpux.h: Likewise.
3326 * config/sparc/sparc.h: Likewise.
3328 2018-07-31 Olivier Hainque <hainque@adacore.com>
3330 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
3331 undefined variables.
3333 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
3336 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
3339 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
3341 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
3342 terminated string literal.
3344 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
3346 PR rtl-optimization/85160
3347 * combine.c (is_just_move): New function.
3348 (try_combine): Allow combining two instructions into two if neither of
3349 the original instructions was a move.
3351 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
3354 * doc/extend.texi (Global Register Variables): Discourage use of type
3356 (Local Register Variables): Likewise.
3358 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
3360 PR tree-optimization/86506
3361 * hwint.h (ceil_log2): Resync with hwint.c implementation.
3363 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
3366 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
3367 hard_regno, make sure no insn between `from` and `to` clobbers it.
3369 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
3370 Tom de Vries <tdevries@suse.de>
3372 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
3373 (PTX_DEFAULT_RUNTIME_DIM): ... this.
3374 (nvptx_goacc_validate_dims): Set default worker and gang dims to
3375 PTX_DEFAULT_RUNTIME_DIM.
3376 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
3378 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
3380 * config/pa/pa.c (pa_output_addr_vec): Align address table.
3381 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
3382 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
3384 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
3386 * config/rs6000/constraints.md (wG constraint): Delete, no longer
3388 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
3389 predicate to reflect toc fusion has been deleted.
3390 (toc_fusion_mem_raw): Delete, no longer used.
3391 (toc_fusion_mem_wrapped): Likewise.
3392 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
3394 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
3395 Delete, no longer used.
3396 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
3397 meant to be used for toc fusion.
3398 (rs6000_debug_print_mode): Delete toc fusion debugging.
3399 (rs6000_debug_reg_global): Likewise.
3400 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
3401 fusion and secondary reload support that were never used.
3402 (rs6000_option_override_internal): Delete TOC fusion, that was only
3403 partially defined, and it did not work unless you also used the
3405 (rs6000_legitimate_address_p): Delete TOC fusion support.
3406 (rs6000_opt_masks): Likewise.
3407 (fusion_wrap_memory_address): Delete function, no longer used.
3408 (fusion_split_address); Delete TOC fusion support.
3409 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
3410 longer used with toc fusion being deleted.
3411 (TARGET_TOC_FUSION_FP): Likewise.
3412 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
3414 (toc fusion spliter): Delete TOC fusion support.
3415 (toc_fusionload_<mode>): Likewise.
3416 (toc_fusionload_di): Likewise.
3417 (fusion_gpr_load_<mode>): Delete generator function, this insn no
3418 longer needs to be named. Rename predicate to delete TOC fusion.
3419 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
3420 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
3421 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
3422 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
3423 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
3425 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
3427 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
3428 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
3429 __int128 in built-in function prototypes.
3430 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
3431 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
3433 2018-07-27 Martin Sebor <msebor@redhat.com>
3435 PR tree-optimization/86696
3436 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
3437 types, including enums.
3438 (handle_char_store): Be prepared for the above function to fail.
3440 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
3442 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
3443 when optimization level is lower than 2 or optimize for size.
3445 2018-07-26 Martin Sebor <msebor@redhat.com>
3447 PR tree-optimization/86043
3448 PR tree-optimization/86042
3449 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
3450 (get_string_cst_length): Rename...
3451 (get_min_string_length): ...to this. Add argument.
3452 (handle_char_store): Extend to handle multi-character stores by
3454 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
3455 * tree.h (initializer_zerop): Add argument.
3457 2018-07-26 Jakub Jelinek <jakub@redhat.com>
3460 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
3461 declare target to variables if they have always,{to,from,tofrom} map
3464 2018-07-26 Martin Liska <mliska@suse.cz>
3467 * lto-wrapper.c: Add linker_output as prefix
3468 for ltrans_output_file.
3470 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
3472 PR rtl-optimization/85805
3473 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
3474 value for hard registers if that was written in the same mode.
3476 2018-07-26 Martin Liska <mliska@suse.cz>
3478 PR gcov-profile/86536
3479 * gcov.c (format_gcov): Use printf format %.*f directly
3480 and do not handle special values.
3482 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3484 * common/config/arc/arc-common.c (arc_option_optimization_table):
3485 Update default optimizations for size.
3487 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3489 * config/arc/arc.md (movsf_insn): Add short instruction selection.
3490 * config/arc/constraints.md (CfZ): New constraint.
3491 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
3492 (subsf3_fpu): Likewise.
3493 (cmpsf_fpu): Likewise.
3494 (cmpsf_fpu_uneq): Likewise.
3496 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3498 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
3500 (arc_is_uncached_mem_p): uncached applies to both the variable and
3503 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3505 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
3508 2018-07-25 David Malcolm <dmalcolm@redhat.com>
3510 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
3511 field "m_scopes" from vec to auto_vec.
3513 2018-07-25 Martin Liska <mliska@suse.cz>
3515 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
3518 2018-07-25 Richard Biener <rguenther@suse.de>
3521 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
3522 special wrt context_die late.
3523 (gen_subprogram_die): Re-use DIEs in local scope.
3525 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
3527 PR tree-optimization/86644
3528 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
3530 2018-07-25 Martin Liska <mliska@suse.cz>
3533 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
3534 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
3536 2018-07-25 Martin Liska <mliska@suse.cz>
3539 * params.def: Explain ASan abbreviation and provide
3540 a documentation link.
3542 2018-07-24 Martin Sebor <msebor@redhat.com>
3544 PR tree-optimization/86622
3545 PR tree-optimization/86532
3546 * builtins.h (string_length): Declare.
3547 * builtins.c (c_strlen): Correct handling of non-constant offsets.
3548 (check_access): Be prepared for non-constant length ranges.
3549 (string_length): Make extern.
3550 * expr.c (string_constant): Only handle the minor non-constant
3551 array index. Use string_constant to compute the length of
3552 a generic string constant.
3554 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
3556 PR tree-optimization/86618
3557 * tree-vect-stmts.c (vectorizable_call): Don't take the address
3558 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
3560 2018-07-24 David Malcolm <dmalcolm@redhat.com>
3562 PR tree-optimization/86636
3563 * json.cc (json::object::set): Fix comment. Add assertions.
3564 (json::array::append): Move here from json.h. Add comment and an
3566 (json::string::string): Likewise.
3567 * json.h (json::array::append): Move to json.cc.
3568 (json::string::string): Likewise.
3569 * optinfo-emit-json.cc
3570 (optrecord_json_writer::impl_location_to_json): Assert that we
3571 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
3572 wrapper around it. Expand the location once, rather than three
3574 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
3575 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
3577 (optrecord_json_writer::optinfo_to_json): Likewise, in four
3578 places. Fix some overlong lines.
3580 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
3582 * config/aarch64/aarch64-simd.md
3583 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
3584 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
3585 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
3586 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
3587 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
3588 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
3589 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
3590 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
3591 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
3593 2018-07-24 Jakub Jelinek <jakub@redhat.com>
3596 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
3597 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
3598 and abs_d == d, do the power of two handling if profitable.
3600 2018-07-24 Richard Biener <rguenther@suse.de>
3602 * match.pd: Add BIT_FIELD_REF canonicalizations.
3604 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
3607 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
3609 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
3611 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
3612 terminated STRING_CST object.
3614 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
3616 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
3618 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
3620 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
3621 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
3622 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
3623 the elements into a register.
3624 (rs6000_split_v4si_init_di_reg): Delete.
3625 (rs6000_split_v4si_init): Delete.
3626 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
3627 (vsx_init_v4si): Rewrite as a define_expand.
3629 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
3631 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
3632 zero_extend argument from memory): New.
3634 2018-07-22 Martin Sebor <msebor@redhat.com>
3637 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
3638 diagnosing calls with unknown arguments unless -Walloca-larger-than
3639 is restricted to less than PTRDIFF_MAX bytes.
3641 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
3643 * doc/gcov.texi (Invoking Gcov): Editorial changes.
3645 2018-07-20 David Malcolm <dmalcolm@redhat.com>
3647 * pretty-print.c (text_info::set_location): Remove redundant
3648 "line_table" parameter from call to rich_location::set_range.
3650 2018-07-20 Martin Sebor <msebor@redhat.com>
3653 * builtins.c (expand_builtin_alloca): Adjust.
3654 * calls.c (alloc_max_size): Simplify.
3655 * cgraphunit.c (cgraph_node::expand): Adjust.
3656 * common.opt (larger_than_size, warn_frame_larger_than): Remove
3658 (frame_larger_than_size): Same.
3659 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
3660 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
3662 * doc/invoke.texi (GCC Command Options): Document option arguments.
3663 Explain byte-size arguments and suffixes.
3664 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
3665 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
3666 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
3667 * doc/options.texi (UInteger): Expand.
3668 (Host_Wide_Int, ByteSize): Document new properties.
3669 * final.c (final_start_function_1): Include sizes in an error message.
3670 * function.c (frame_offset_overflow): Same.
3671 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
3672 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
3673 Diagnose unbounded alloca calls only for limits of less than
3675 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
3676 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
3678 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
3679 only for limits of less than PTRDIFF_MAX.
3680 * langhooks-def.h (lhd_handle_option): Change function argument
3682 * langhooks.c (lhd_handle_option): Same.
3683 * langhooks.h (handle_option): Same.
3684 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
3686 (var_type, var_type_struct): Same.
3687 (var_set): Handle ByteSize flag.
3688 * optc-gen.awk: Add comments to output to ease debugging. Make
3689 use of HOST_WIDE_INT where appropriate.
3690 * opts-gen-save.awk: Use %lx to format unsigned long.
3691 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
3692 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
3693 arguments. Parse bytes-size suffixes.
3694 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
3695 (enum_value_to_arg): Same.
3696 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
3697 (handle_option): Adjust.
3698 (generate_option): Change function argument to HOST_WIDE_INT.
3699 (cmdline_handle_error): Adjust.
3700 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
3701 (set_option): Change function argument to HOST_WIDE_INT.
3702 (option_enabled): Handle cl_host_wide_int.
3703 (get_option_state): Handle CLVC_SIZE.
3704 (control_warning_option): Same.
3705 * opts.c (common_handle_option): Change function argument to
3706 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
3707 OPT_Wvla_larger_than_.
3708 * opts.h (enum cl_var_type): Add an enumerator.
3709 * stor-layout.c (layout_decl): Print a more meaningful warning.
3710 * toplev.c (output_stack_usage): Adjust.
3712 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
3714 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
3715 call to inline_expand_builtin_string_cmp.
3716 (expand_builtin_strcmp): Likewise.
3717 (expand_builtin_strncmp): Likewise.
3718 (inline_string_cmp): Delete the last parameter, change char_type_node
3719 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
3721 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
3722 the inlining expansion on target where the type of the call has same or
3723 narrower precision than unsigned char.
3725 2018-07-20 David Malcolm <dmalcolm@redhat.com>
3727 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
3728 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
3729 * common.opt (fsave-optimization-record): New option.
3730 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
3731 * doc/invoke.texi (-fsave-optimization-record): New option.
3732 * dumpfile.c: Include "optinfo-emit-json.h".
3733 (struct kv_pair): Move to coretypes.h.
3734 (optgroup_options): Make non-static.
3735 (dump_context::end_scope): Call
3736 optimization_records_maybe_pop_dump_scope.
3737 * dumpfile.h (optgroup_options): New decl.
3738 * json.cc: New file.
3740 * optinfo-emit-json.cc: New file.
3741 * optinfo-emit-json.h: New file.
3742 * optinfo.cc: Include "optinfo-emit-json.h".
3743 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
3744 (optinfo_enabled_p): Check optimization_records_enabled_p.
3745 (optinfo_wants_inlining_info_p): Likewise.
3746 * optinfo.h: Update comment.
3747 * profile-count.c (profile_quality_as_string): New function.
3748 * profile-count.h (profile_quality_as_string): New decl.
3749 (profile_count::quality): New accessor.
3750 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
3751 and optinfo_emit_json_cc_tests.
3752 * selftest.h (selftest::json_cc_tests): New decl.
3753 (selftest::optinfo_emit_json_cc_tests): New decl.
3754 * toplev.c: Include "optinfo-emit-json.h".
3755 (compile_file): Call optimization_records_finish.
3756 (do_compile): Call optimization_records_start.
3757 * tree-ssa-live.c: Include optinfo.h.
3758 (remove_unused_scope_block_p): Retain inlining information if
3759 optinfo_wants_inlining_info_p returns true.
3761 2018-07-20 Richard Biener <rguenther@suse.de>
3764 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
3765 to cover -flto-partition=none.
3767 2018-07-20 Martin Liska <mliska@suse.cz>
3769 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
3770 (get_decl_source_range): Remove unused function.
3772 2018-07-20 Richard Biener <rguenther@suse.de>
3774 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
3775 (struct vn_phi_s): Likewise.
3776 (struct vn_reference_s): Likewise.
3777 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
3778 for searching the slot of an entry known to be in the hash itself.
3779 (vn_phi_hasher::equal): Likewise.
3780 (vn_reference_hasher::equal): Likewise.
3781 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
3783 (optimistic_info, current_info): Remove, keeping only valid_info.
3784 (vn_reference_lookup_1): Remove fallback lookup.
3785 (vn_reference_lookup_2): Likewise.
3786 (vn_nary_op_lookup_1): Likewise.
3787 (vn_phi_lookup): Likewise.
3788 (vn_nary_build_or_lookup_1): Make sure to not chain the built
3790 (vn_reference_insert): Adjust, chain the inserted hash element
3791 at last_inserted_ref.
3792 (vn_reference_insert_pieces): Likewise.
3793 (visit_reference_op_call): Likewise.
3794 (vn_nary_op_insert_into): Chain the inserted hash element at
3796 (vn_nary_op_insert_pieces): Adjust.
3797 (vn_nary_op_insert): Likewise.
3798 (vn_nary_op_insert_stmt): Likewise.
3799 (vn_phi_insert): Adjust, chain the inserted hash element at
3801 (process_scc): Remove clearing and copying the optimistic
3802 table. Instead remove elements inserted during an optimistic
3803 iteration from the single table we maintain.
3804 (init_scc_vn): Adjust.
3805 (free_scc_vn): Likewise.
3806 (sccvn_dom_walker::record_cond): Likewise.
3807 (sccvn_dom_walker::after_dom_children): Likewise.
3809 2018-07-19 Martin Sebor <msebor@redhat.com>
3811 PR tree-optimization/84047
3812 PR tree-optimization/83776
3813 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
3814 (check_array_bounds): Call it.
3816 2018-07-19 Martin Sebor <msebor@redhat.com>
3818 * align.h (align_flags): Use member initialization.
3820 2018-07-19 David Malcolm <dmalcolm@redhat.com>
3822 * Makefile.in (OBJS): Add optinfo.o.
3823 * coretypes.h (class symtab_node): New forward decl.
3824 (struct cgraph_node): New forward decl.
3825 (class varpool_node): New forward decl.
3826 * dump-context.h: New file.
3827 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
3829 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
3830 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
3831 (set_alt_dump_file): Likewise.
3832 (dump_context::~dump_context): New dtor.
3833 (dump_gimple_stmt): Move implementation to...
3834 (dump_context::dump_gimple_stmt): ...this new member function.
3835 Add the stmt to any pending optinfo, creating one if need be.
3836 (dump_gimple_stmt_loc): Move implementation to...
3837 (dump_context::dump_gimple_stmt_loc): ...this new member function.
3838 Start a new optinfo and add the stmt to it.
3839 (dump_gimple_expr): Move implementation to...
3840 (dump_context::dump_gimple_expr): ...this new member function.
3841 Add the stmt to any pending optinfo, creating one if need be.
3842 (dump_gimple_expr_loc): Move implementation to...
3843 (dump_context::dump_gimple_expr_loc): ...this new member function.
3844 Start a new optinfo and add the stmt to it.
3845 (dump_generic_expr): Move implementation to...
3846 (dump_context::dump_generic_expr): ...this new member function.
3847 Add the tree to any pending optinfo, creating one if need be.
3848 (dump_generic_expr_loc): Move implementation to...
3849 (dump_context::dump_generic_expr_loc): ...this new member
3850 function. Add the tree to any pending optinfo, creating one if
3852 (dump_printf): Move implementation to...
3853 (dump_context::dump_printf_va): ...this new member function. Add
3854 the text to any pending optinfo, creating one if need be.
3855 (dump_printf_loc): Move implementation to...
3856 (dump_context::dump_printf_loc_va): ...this new member function.
3857 Start a new optinfo and add the stmt to it.
3858 (dump_dec): Move implementation to...
3859 (dump_context::dump_dec): ...this new member function. Add the
3860 value to any pending optinfo, creating one if need be.
3861 (dump_context::dump_symtab_node): New member function.
3862 (dump_context::get_scope_depth): New member function.
3863 (dump_context::begin_scope): New member function.
3864 (dump_context::end_scope): New member function.
3865 (dump_context::ensure_pending_optinfo): New member function.
3866 (dump_context::begin_next_optinfo): New member function.
3867 (dump_context::end_any_optinfo): New member function.
3868 (dump_context::s_current): New global.
3869 (dump_context::s_default): New global.
3870 (dump_scope_depth): Delete global.
3871 (dumpfile_ensure_any_optinfo_are_flushed): New function.
3872 (dump_symtab_node): New function.
3873 (get_dump_scope_depth): Reimplement in terms of dump_context.
3874 (dump_begin_scope): Likewise.
3875 (dump_end_scope): Likewise.
3876 (selftest::temp_dump_context::temp_dump_context): New ctor.
3877 (selftest::temp_dump_context::~temp_dump_context): New dtor.
3878 (selftest::verify_item): New function.
3879 (ASSERT_IS_TEXT): New macro.
3880 (ASSERT_IS_TREE): New macro.
3881 (ASSERT_IS_GIMPLE): New macro.
3882 (selftest::test_capture_of_dump_calls): New test.
3883 (selftest::dumpfile_c_tests): Call it.
3884 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
3885 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
3886 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
3887 descriptive comment.
3888 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
3889 (dump_node, dump_bb): Move these unrelated decls.
3890 (class dump_manager): Add leading comment.
3891 * optinfo.cc: New file.
3892 * optinfo.h: New file.
3894 2018-07-19 Michael Collison <michael.collison@arm.com>
3895 Richard Henderson <rth@redhat.com>
3897 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
3898 (subti): Handle op1 zero.
3899 (subvti4, usub4ti4): New.
3900 (*sub<GPI>3_compare1_imm): New.
3901 (sub<GPI>3_carryinCV): New.
3902 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
3903 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
3905 2018-07-19 Michael Collison <michael.collison@arm.com>
3906 Richard Henderson <rth@redhat.com>
3908 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
3909 (addti3): Create simpler code if low part is already known to be 0.
3910 (addvti4, uaddvti4): New.
3911 (*add<GPI>3_compareC_cconly_imm): New.
3912 (*add<GPI>3_compareC_cconly): New.
3913 (*add<GPI>3_compareC_imm): New.
3914 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
3915 handle constants within this pattern..
3916 (*add<GPI>3_compareV_cconly_imm): New.
3917 (*add<GPI>3_compareV_cconly): New.
3918 (*add<GPI>3_compareV_imm): New.
3919 (add<GPI>3_compareV): New.
3920 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
3921 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
3922 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
3923 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
3924 with 'comparison' operator.
3925 (*add<GPI>3_compareV_cconly_imm): Ditto.
3926 (*add<GPI>3_compareV_cconly): Ditto.
3927 (*add<GPI>3_compareV_imm): Ditto.
3928 (add<GPI>3_compareV): Ditto.
3929 (add<mode>3_carryinC): Ditto.
3930 (*add<mode>3_carryinC_zero): Ditto.
3931 (*add<mode>3_carryinC): Ditto.
3932 (add<mode>3_carryinV): Ditto.
3933 (*add<mode>3_carryinV_zero): Ditto.
3934 (*add<mode>3_carryinV): Ditto.
3936 2018-07-19 Michael Collison <michael.collison@arm.com>
3937 Richard Henderson <rth@redhat.com>
3939 * config/aarch64/aarch64-modes.def (CC_V): New.
3940 * config/aarch64/aarch64-protos.h
3941 (aarch64_addti_scratch_regs): Declare
3942 (aarch64_subvti_scratch_regs): Declare.
3943 (aarch64_expand_subvti): Declare.
3944 (aarch64_gen_unlikely_cbranch): Declare
3945 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
3946 for signed overflow using CC_Vmode.
3947 (aarch64_get_condition_code_1): Handle CC_Vmode.
3948 (aarch64_gen_unlikely_cbranch): New function.
3949 (aarch64_addti_scratch_regs): New function.
3950 (aarch64_subvti_scratch_regs): New function.
3951 (aarch64_expand_subvti): New function.
3953 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
3955 * config/aarch64/aarch64-option-extensions.def: New entry for profile
3957 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
3958 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
3961 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
3964 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
3965 address check not strict.
3967 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
3969 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
3971 (store_pair_lanes<mode>): Likewise.
3972 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
3973 enum value 'ADDR_QUERY_LDP_STP_N'.
3974 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
3975 (aarch64_print_address_internal): Add declaration.
3976 (aarch64_print_ldpstp_address): Remove.
3977 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
3978 (aarch64_print_operand): Change printing of 'y'.
3979 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
3980 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
3981 'true' rather than '1'.
3982 * config/aarch64/constraints.md (Uml): Likewise.
3983 (Uml): Rename to Umn.
3986 2018-07-19 Richard Biener <rguenther@suse.de>
3988 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
3990 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
3991 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
3992 (vn_reference_hasher): Likewise.
3993 (struct vn_tables_s): Remove obstack and alloc-pool members.
3994 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
3995 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
3996 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
3997 (vn_reference_insert_pieces): Likewise.
3998 (alloc_vn_nary_op_noinit): Adjust.
3999 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
4000 (vn_phi_eq): Adjust.
4001 (shared_lookup_phiargs): Remove.
4002 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
4003 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
4004 (visit_reference_op_call): Likewise.
4005 (copy_nary, copy_phi, copy_reference): Remove.
4006 (process_scc): Rewind the obstack when iterating. Do not
4007 copy the elements to valid_info but just move them from one
4008 hashtable to the other.
4009 (allocate_vn_table): Adjust.
4010 (free_vn_table): Likewise.
4011 (init_scc_vn): Likewise.
4012 (free_scc_vn): Likewise.
4014 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
4017 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
4018 indirect_return as function type attribute.
4019 (ix86_attribute_table): Change indirect_return to function
4021 * doc/extend.texi: Update indirect_return attribute.
4023 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
4025 * wide-int.h (widest2_int): New.
4026 * gimple-fold.c (arith_overflowed_p): Use it.
4027 * tree.h (widest2_int_cst): New.
4028 * tree-vrp.c (wide_int_binop_overflow): Rename from
4029 vrp_int_const_binop.
4030 Rewrite to work on trees.
4031 (extract_range_from_multiplicative_op_1): Abstract code to...
4032 (wide_int_range_min_max): ...here.
4033 (wide_int_range_cross_product): ...and here.
4034 (extract_range_from_binary_expr_1): Abstract overflow code to...
4035 (wide_int_range_mult_wrapping): ...here.
4036 * tree-vrp.h (wide_int_range_cross_product): New.
4037 (wide_int_range_mult_wrapping): New.
4039 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
4040 Julia Koval <julia.koval@intel.com>
4042 * config/i386/x86-tune-costs.h (skylake_memcpy,
4043 skylake_memset): Replace rep_prefix with unrolling for size 512.
4045 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
4048 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
4049 comparision with EQ_EXPR in last stmt.
4051 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
4053 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
4054 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
4055 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
4056 previously known as "PowerPC AltiVec Built-in Functions". Move
4057 some material to new subsubsections "PowerPC AltiVec Built-in
4058 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
4060 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
4061 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
4062 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
4063 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
4065 2018-07-18 Richard Biener <rguenther@suse.de>
4067 PR tree-optimization/86557
4068 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
4071 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
4073 * config/s390/s390.c (s390_function_profiler): Generate CFI.
4075 2018-07-17 Jeff Law <law@redhat.com>
4077 * config/arm/arm.c (get_label_padding): Update for recent
4078 changes to label_to_alignment.
4080 PR tree-optimization/86010
4081 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
4083 * config/mips/mips.c (vr4130_align_insns): Update for recent
4084 changes to label_to_alignment.
4086 * config/frv/frv.c (frv_label_align): Update for recent changes
4087 to label_to_alignment.
4089 * config/nios2/nios2.c (nios2_label_align): Update for recent
4090 changes which dropped ALIGN_LABELS_LOG.
4092 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
4094 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
4095 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
4097 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
4099 * config/arc/arc.c (arc_label_align): Use align_labels instead of
4100 deprecated align_labels_log.
4102 2018-07-17 Richard Biener <rguenther@suse.de>
4105 * dwarf2out.c (init_sections_and_labels): Always generate
4106 a debug_line_str_section for early LTO debug.
4107 (dwarf2out_finish): Reset debug_line_str_hash output early.
4108 Bump counter for extra dwarf5 .debug_loc labels to not conflict
4110 (dwarf2out_early_finish): Output debug_line_str.
4112 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
4114 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
4115 index register on z196 or later.
4117 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
4119 * config/s390/s390.c (s390_default_align): Set default function
4121 (s390_override_options_after_change): Call s390_default align.
4122 (s390_option_override_internal): Call s390_default_align.
4123 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
4125 2018-07-17 Jakub Jelinek <jakub@redhat.com>
4128 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
4129 to _looptemp_ clauses, other than the first two.
4131 2018-07-17 Martin Liska <mliska@suse.cz>
4133 * opts.c: Do not enable OPT_falign_* for -Os.
4135 2018-07-17 Martin Liska <mliska@suse.cz>
4137 * align.h (MAX_CODE_ALIGN): New.
4138 (MAX_CODE_ALIGN_VALUE): New.
4139 * common/config/i386/i386-common.c (ix86_handle_option):
4140 (MAX_CODE_ALIGN): Moved to align.h.
4141 * final.c (MAX_CODE_ALIGN): Likewise.
4142 * opts.c (parse_and_check_align_values):
4143 (MAX_CODE_ALIGN): Likewise.
4144 (MAX_CODE_ALIGN_VALUE): Likewise.
4146 2018-07-17 Martin Liska <mliska@suse.cz>
4148 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
4149 in order to fulfil coding style.
4150 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
4151 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4152 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4153 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
4154 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
4155 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
4156 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
4157 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
4158 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4160 2018-07-17 Martin Liska <mliska@suse.cz>
4162 * align.h: New file.
4163 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
4165 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
4166 align_flags of label_to_alignment.
4167 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
4169 * config/m68k/m68k.c: Do not use removed align_labels_value and
4171 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
4172 (LOOP_ALIGN): Likewise.
4173 (LABEL_ALIGN): Likewise.
4174 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
4175 Remove not used macro.
4176 (rs6000_loop_align): Change return type to align_flags.
4177 (rs6000_loop_align_max_skip): Remove.
4178 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
4179 Change return type to align_flags.
4180 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
4181 Remove not used macro.
4182 (rs6000_loop_align): Change return type to align_flags.
4183 (rs6000_loop_align_max_skip): Remove.
4184 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
4185 * config/rx/rx-protos.h (rx_align_for_label): Make it
4187 * config/rx/rx.c (rx_align_for_label): Change return type
4189 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
4191 into align_flags class.
4192 (LABEL_ALIGN): Likewise.
4193 (LOOP_ALIGN): Likewise.
4194 * config/s390/s390.c (s390_label_align): Use align_flags
4196 (s390_asm_output_function_label): Likewise.
4197 * config/sh/sh.c (sh_override_options_after_change):
4198 Use align_flags class directly without macros.
4199 (find_barrier): Likewise.
4200 (barrier_align): Likewise.
4201 (sh_loop_align): Likewise.
4202 * config/spu/spu.c (spu_option_override):
4203 Use align_flags_tuple::get_value instead of removed macros.
4204 (spu_sched_init): Likewise.
4205 * config/spu/spu.h (GTY): Likewise.
4206 * config/visium/visium.c (visium_option_override):
4207 Set "8" as default secondary alignment.
4208 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
4209 in order to guarantee secondary alignment of 8.
4210 * coretypes.h: Include align.h header file.
4211 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
4212 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
4213 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
4214 * doc/tm.texi.in: Likewise.
4215 * final.c (struct label_alignment): Remove not used structure.
4216 (LABEL_ALIGN): Change type to align_flags.
4217 (LOOP_ALIGN): Likewise.
4218 (JUMP_ALIGN): Likewise.
4219 (default_loop_align_max_skip): Remove.
4220 (default_label_align_max_skip): Likewise.
4221 (default_jump_align_max_skip): Likewise.
4222 (default_label_align_after_barrier_max_skip):
4223 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
4224 (LABEL_TO_MAX_SKIP): Remove.
4225 (label_to_alignment): Return align_flags type instead of integer.
4226 (label_to_max_skip): Remove.
4227 (align_fuzz): Use align_flags type.
4228 (compute_alignments): Use align_flags type and use align_flags::max
4229 to combine multiple alignments.
4230 (grow_label_align): Grow vec instead of C array.
4231 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
4232 (shorten_branches): Use align_flags type and use align_flags::max
4233 to combine multiple alignments.
4234 (final_scan_insn_1): Remove usage of secondary alignment that comes
4235 from label alignment, but instead use proper secondary alignment
4236 which is computed in grow_label_align.
4237 * flags.h (struct align_flags_tuple): Move to align.h.
4238 (struct align_flags): Likewise.
4239 (state_align_loops): Rename to align_loops.
4240 (state_align_jumps): Rename to align_jumps.
4241 (state_align_labels): Rename to align_labels.
4242 (state_align_functions): Rename to align_functions.
4243 (align_loops_log): Remove.
4244 (align_jumps_log): Remove.
4245 (align_labels_log): Remove.
4246 (align_functions_log): Remove.
4247 (align_loops_max_skip): Remove.
4248 (align_jumps_max_skip): Remove.
4249 (align_labels_max_skip): Remove.
4250 (align_functions_max_skip): Remove.
4251 (align_loops_value): Remove.
4252 (align_jumps_value): Remove.
4253 (align_labels_value): Remove.
4254 (align_functions_value): Remove.
4255 * output.h (label_to_alignment): Change return type to align_flags.
4256 (label_to_max_skip): Remove.
4257 * target.def: Remove loop_align_max_skip, label_align_max_skip,
4258 jump_align_max_skip macros.
4259 * targhooks.h (default_loop_align_max_skip): Remove.
4260 (default_label_align_max_skip): Likewise.
4261 (default_jump_align_max_skip): Likewise.
4262 (default_label_align_after_barrier_max_skip): Remove.
4263 * toplev.c (read_log_maxskip): Use ::normalize function.
4264 (parse_N_M): Remove not used argument and also call ::normalize.
4265 (parse_alignment_opts): Do not pass unused arguments.
4266 * varasm.c (assemble_start_function): Use directly align_functions
4267 instead of removed macros.
4268 * system.h: Do not poison removed macros.
4270 2018-07-17 Jakub Jelinek <jakub@redhat.com>
4273 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
4274 and cond temporaries don't have reference type if iterator has
4275 pointer type. For init use &for_pre_body instead of pre_p if
4276 for_pre_body is non-empty.
4278 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
4280 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
4281 double-double modes to SFmode directly directly.
4282 (trunc<mode>sf2_fprs): Delete.
4284 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
4286 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
4287 for conversions between IFmode and the decimal floating point modes.
4288 (init_float128_ieee): Use the correct names for conversions between
4289 KFmode and the decimal floating point modes.
4291 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
4293 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
4294 for the conversions between TDmode and IFmode.
4295 (init_float128_ieee): Use more correct names for the conversions
4296 between TDmode and KFmode.
4298 2018-07-16 Jakub Jelinek <jakub@redhat.com>
4300 PR tree-optimization/86526
4301 * builtins.c (expand_builtin_memcmp): Formatting fixes.
4302 (inline_expand_builtin_string_cmp): Likewise.
4303 (inline_string_cmp): Likewise. Use c_readstr instead of
4304 builtin_memcpy_read_str. Add unit_mode temporary.
4306 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4309 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
4310 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
4312 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
4314 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
4315 Alphabetize prototypes of built-in functions, separating out
4316 built-in functions that are listed in this section but should be
4317 described elsewhere.
4319 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
4322 * expmed.c (emit_store_flag): Do not emit setcc followed by a
4323 conditional move when trapping comparison was split to a
4324 non-trapping one (and vice versa).
4326 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
4328 * config/s390/s390.c (s390_function_profiler): Generate nops
4329 instead of profiler call sequences.
4330 * config/s390/s390.opt: Add the new option.
4332 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
4334 * config/s390/s390.c (s390_function_profiler): Generate
4335 __mcount_loc section.
4336 * config/s390/s390.opt: Add the new option.
4338 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
4340 * common.opt: Add the new warning.
4341 * config/s390/s390.c (s390_function_profiler): Emit "brasl
4342 %r0,__fentry__" when -mfentry is specified.
4343 (s390_option_override_internal): Disallow -mfentry for 31-bit
4345 * config/s390/s390.opt: Add the new option.
4347 2018-07-16 Richard Biener <rguenther@suse.de>
4350 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
4351 for function-local FUNCTION_DECL and RESULT_DECL immediately.
4353 2018-07-16 Martin Liska <mliska@suse.cz>
4356 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
4359 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
4361 * config/arc/arcHS.md: Update ARCHS scheduling rules.
4363 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
4365 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
4367 * config/arc/arc-cpus.def (hs4x): New cpu.
4369 * config/arc/arc-tables.opt: Regenerate.
4370 * config/arc/arc.c (arc_sched_issue_rate): New function.
4371 (TARGET_SCHED_ISSUE_RATE): Define.
4372 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
4373 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
4375 (attr tune): Add ARCHS4x tune values.
4376 (attr tune_dspmpy): Define.
4377 (*tst): Correct instruction type.
4378 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
4379 * config/arc/arcHS4x.md: New file.
4380 * config/arc/fpu.md: Update instruction type attributes.
4381 * config/arc/t-multilib: Regenerate.
4383 2018-07-16 Tom de Vries <tdevries@suse.de>
4386 * var-tracking.c (vt_initialize): Fix pre_dec handling.
4388 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4390 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
4393 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
4395 PR tree-optimization/86514
4396 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
4397 conversion to a boolean type from a type with greater precision.
4399 2018-07-16 Tom de Vries <tdevries@suse.de>
4401 * var-tracking.c (vt_initialize): Print adjusted insn slim if
4402 dump_flags request TDF_SLIM.
4404 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
4406 * fold-const.c (int_const_binop_1): Abstract...
4407 (wide_int_binop): ...wide int code here.
4408 (poly_int_binop): ...poly int code here.
4409 Abstract the rest of int_const_binop_1 into int_const_binop.
4410 * fold-const.h (wide_int_binop): New.
4411 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
4412 Remove useless PLUS/MINUS_EXPR case.
4413 (zero_nonzero_bits_from_vr): Move wide int code...
4414 (zero_nonzero_bits_from_bounds): ...here.
4415 (extract_range_from_binary_expr_1): Move mask optimization code...
4416 (range_easy_mask_min_max): ...here.
4417 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
4418 (range_easy_mask_min_max): New.
4420 2018-07-15 Jeff Law <law@redhat.com>
4423 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
4426 2018-07-14 Jim Wilson <jimw@sifive.com>
4428 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
4430 2018-07-14 Paul Koning <ni1d@arrl.net>
4432 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
4434 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
4436 * lto-streamer-out.c (copy_function_or_variable): Dump info about
4439 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
4440 Steve Munroe <munroesj52@gmail.com>
4442 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
4443 (_mm_andnot_si128): Likewise.
4444 (_mm_or_si128): Likewise.
4445 (_mm_xor_si128): Likewise.
4447 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
4450 * builtins.c (expand_builtin_memcmp): Inline the calls first
4451 when result_eq is false.
4452 (expand_builtin_strcmp): Inline the calls first.
4453 (expand_builtin_strncmp): Likewise.
4454 (inline_string_cmp): New routine. Expand a string compare
4455 call by using a sequence of char comparison.
4456 (inline_expand_builtin_string_cmp): New routine. Inline expansion
4457 a call to str(n)cmp/memcmp.
4458 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
4460 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
4462 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
4464 * config/arm/driver-arm.c: Include arm-native.h.
4465 (host_detect_local_cpu): Use auto-generated data tables.
4466 (vendors, arm_cpu_table): Delete. Move part information to ...
4467 * config/arm/arm-cpus.in: ... here.
4468 * config/arm/parsecpu.awk (gen_native): New function.
4469 (vendor, part): New CPU fields.
4470 (END): Add support for building the native CPU detection tables.
4471 * config/arm/t-arm (arm-native.h): Add build rule.
4472 (driver-arm.o): Add dependency on arm-native.h.
4474 2018-07-13 Richard Biener <rguenther@suse.de>
4477 * match.pd (addr1 - addr2): Allow either of the operand to
4480 2018-07-13 Tom de Vries <tdevries@suse.de>
4482 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
4485 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
4487 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
4488 arrays instead of numbered variables.
4490 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
4492 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
4493 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
4495 2018-07-13 Richard Biener <rguenther@suse.de>
4498 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
4499 instead of get_context_die.
4501 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
4502 Richard Biener <rguenther@suse.de>
4505 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
4506 that the loop latch destination where phi is defined.
4508 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
4510 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
4511 (riscv_expand_epilogue): Add assertion to check interrupt mode.
4512 (riscv_set_current_function): Extract getting interrupt type to new
4514 (riscv_get_interrupt_type): New function.
4515 (riscv_merge_decl_attributes): New function, checking interrupt type is
4517 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
4519 2018-07-12 Paul Koning <ni1d@arrl.net>
4521 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
4524 2018-07-12 Paul Koning <ni1d@arrl.net>
4526 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
4527 zero reference, add doloop_end instead.
4528 * doc/md.texi (decrement_and_branch_until_zero): Remove.
4529 (Looping patterns): Remove decrement_and_branch_until_zero. Add
4530 detail for doloop_end.
4532 2018-07-12 Martin Sebor <msebor@redhat.com>
4535 * attribs.c (decl_attributes): Reject conflicting attributes before
4536 calling attribute handlers.
4538 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
4540 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
4542 (gcc::dump_manager::get_dump_file_name): likewise.
4543 (dump_begin): Likewise.
4544 * dumpfile.h (dump_begin): Update prototype.
4545 (gcc::dump_manager::get_dump_file_name,
4546 gcc::dump_manager::get_dump_file_name): Update prototype.
4548 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4550 * internal-fn.h (vectorizable_internal_fn_p): New function.
4551 * tree-vect-slp.c (compatible_calls_p): Likewise.
4552 (vect_build_slp_tree_1): Remove nops argument. Handle calls
4553 to internal functions.
4554 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
4556 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4558 * fold-const.h (inverse_conditions_p): Declare.
4559 * fold-const.c (inverse_conditions_p): New function.
4560 * match.pd: Use inverse_conditions_p. Add folds of view_converts
4561 that test the inverse condition of a conditional internal function.
4562 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
4563 * internal-fn.c (internal_fn_mask_index): Handle conditional
4565 (vectorized_internal_fn_supported_p): New function.
4566 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
4567 (any_pred_load_store): Replace with...
4568 (need_to_predicate): ...this new variable.
4569 (redundant_ssa_names): New variable.
4570 (ifcvt_can_use_mask_load_store): Move initial checks to...
4571 (ifcvt_can_predicate): ...this new function. Handle tree codes
4572 for which a conditional internal function exists.
4573 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
4574 instead of ifcvt_can_use_mask_load_store. Update after variable
4576 (predicate_load_or_store): New function, split out from
4577 predicate_mem_writes.
4578 (check_redundant_cond_expr): New function.
4579 (value_available_p): Likewise.
4580 (predicate_rhs_code): Likewise.
4581 (predicate_mem_writes): Rename to...
4582 (predicate_statements): ...this. Use predicate_load_or_store
4583 and predicate_rhs_code.
4584 (combine_blocks, tree_if_conversion): Update after above name changes.
4585 (ifcvt_local_dce): Handle redundant_ssa_names.
4586 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
4587 general conditional functions.
4588 * tree-vect-stmts.c (vectorizable_call): Likewise.
4590 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4591 Alan Hayward <alan.hayward@arm.com>
4592 David Sherwood <david.sherwood@arm.com>
4594 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
4595 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
4596 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
4597 plus and minus and convert them into IFN_COND_FMA-based sequences.
4598 (convert_mult_to_fma): Handle conditional plus and minus.
4600 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4602 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
4603 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
4604 (cond_fnms_optab): New optabs.
4605 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
4607 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
4608 * internal-fn.h (get_conditional_internal_fn): Declare.
4609 (get_unconditional_internal_fn): Likewise.
4610 * internal-fn.c (cond_ternary_direct): New macro.
4611 (expand_cond_ternary_optab_fn): Likewise.
4612 (direct_cond_ternary_optab_supported_p): Likewise.
4613 (FOR_EACH_COND_FN_PAIR): Likewise.
4614 (get_conditional_internal_fn): New function.
4615 (get_unconditional_internal_fn): Likewise.
4616 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
4617 (gimple_match_op::gimple_match_op): Add a new overload for 5
4619 (gimple_match_op::set_op): Likewise.
4620 (gimple_resimplify5): Declare.
4621 * genmatch.c (decision_tree::gen): Generate simplifications for
4623 * gimple-match-head.c (gimple_simplify): Define an overload for
4624 5 operands. Handle calls with 5 arguments in the top-level overload.
4625 (convert_conditional_op): Handle conversions from unconditional
4626 internal functions to conditional ones.
4627 (gimple_resimplify5): New function.
4628 (build_call_internal): Pass a fifth operand.
4629 (maybe_push_res_to_seq): Likewise.
4630 (try_conditional_simplification): Try converting conditional
4631 internal functions to unconditional internal functions.
4632 Handle 3-operand unconditional forms.
4633 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
4634 Define ternary equivalents of the current rules for binary conditional
4636 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
4638 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
4639 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
4640 (optab): Handle them.
4641 (SVE_COND_FP_TERNARY): New int iterator.
4642 (sve_fmla_op, sve_fmad_op): New int attributes.
4643 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
4644 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
4645 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
4647 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4649 * target.def (preferred_else_value): New target hook.
4650 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
4651 * doc/tm.texi: Regenerate.
4652 * targhooks.h (default_preferred_else_value): Declare.
4653 * targhooks.c (default_preferred_else_value): New function.
4654 * internal-fn.h (conditional_internal_fn_code): Declare.
4655 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
4656 (get_conditional_internal_fn): Use it.
4657 (conditional_internal_fn_code): New function.
4658 * gimple-match.h (gimple_match_cond): New struct.
4659 (gimple_match_op): Add a cond member function.
4660 (gimple_match_op::gimple_match_op): Update all forms to take a
4662 * genmatch.c (expr::gen_transform): Use the same condition as res_op
4663 for the suboperation, but don't specify a particular else_value.
4664 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
4665 (visit_nary_op, visit_reference_op_load): Pass
4666 gimple_match_cond::UNCOND to the gimple_match_op constructor.
4667 * gimple-match-head.c: Include tree-eh.h
4668 (convert_conditional_op): New function.
4669 (maybe_resimplify_conditional_op): Likewise.
4670 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
4671 (gimple_resimplify2): Likewise.
4672 (gimple_resimplify3): Likewise.
4673 (gimple_resimplify4): Likewise.
4674 (maybe_push_res_to_seq): Return null for conditional operations.
4675 (try_conditional_simplification): New function.
4676 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
4678 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
4680 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
4682 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
4684 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
4686 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
4688 (hash_tree): Do not hash DECL_FCONTEXT
4689 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
4690 Do not stream DECL_FCONTEXT.
4691 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
4692 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
4694 2018-07-12 Richard Biener <rguenther@suse.de>
4697 * dwarf2out.c (gen_block_die): Only output blocks when they have
4698 at least one !DECL_IGNORED_P variable.
4700 2018-07-12 Richard Biener <rguenther@suse.de>
4703 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
4704 Remove -mieee-fp handling.
4706 2018-07-12 Richard Biener <rguenther@suse.de>
4708 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
4709 left-over from last patch.
4711 2018-07-12 Jakub Jelinek <jakub@redhat.com>
4713 PR tree-optimization/86492
4714 * gimple-ssa-store-merging.c
4715 (imm_store_chain_info::coalesce_immediate_stores): Call
4716 check_no_overlap even for the merge_overlapping case. Formatting fix.
4718 2018-07-12 Richard Biener <rguenther@suse.de>
4721 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
4722 move possibly trapping operations into the conditional.
4724 2018-07-12 Richard Biener <rguenther@suse.de>
4726 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
4727 (vn_lookup_simplify_result): Remove recursion limit applied
4729 (vn_nary_build_or_lookup_1): Adjust.
4730 (try_to_simplify): Likewise.
4731 * gimple-match-head.c (gimple_resimplify1): Instead apply one
4733 (gimple_resimplify2): Likewise.
4734 (gimple_resimplify3): Likewise.
4735 (gimple_resimplify4): Likewise.
4737 2018-07-11 Jakub Jelinek <jakub@redhat.com>
4739 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
4740 Use __mmask64 type instead of __mmask8 for __M argument.
4741 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
4742 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
4744 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
4745 __mmask16 for __M argument.
4746 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
4747 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
4748 to __mmask16 instead of __mmask8.
4749 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
4750 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
4751 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
4752 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
4753 instead of __mmask16 for __U argument.
4754 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
4755 __mmask16 instead of __mmask8 for __U argument.
4756 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
4758 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
4760 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
4762 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
4764 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
4766 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
4768 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
4770 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
4772 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
4774 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
4776 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
4777 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
4778 return type as well as __M argument type and all casts from __mmask8
4780 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
4781 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
4782 return type as well as __M argument type and all casts from __mmask8
4784 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
4785 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
4786 return type as well as __M argument type and all casts from __mmask8
4788 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
4789 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
4790 return type as well as __M argument type and all casts from __mmask8
4792 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
4793 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
4796 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
4798 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
4799 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
4802 2018-07-11 Paul Koning <ni1d@arrl.net>
4804 * doc/md.texi (define_subst): Document how multiple occurrences of
4805 the same argument in the replacement pattern are handled.
4807 2018-07-11 Paul Koning <ni1d@arrl.net>
4809 * doc/extend.texi (Common Variable Attributes): Move "mode" into
4811 (Common Type Attributes): Add "mode" attribute.
4813 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
4815 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
4816 stream DECL_ORIGINAL_TYPE.
4817 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
4818 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
4819 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
4820 Do not walk original type.
4821 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
4823 (write_ts_decl_non_common_tree_pointers): Do not stream
4825 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
4826 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
4828 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
4830 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
4831 thread twice from the same starting edge.
4833 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
4835 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
4836 * gimple.c (gimple_call_nonnull_result_p): ...here...
4837 (gimple_call_nonnull_arg): ...and here.
4838 * gimple.h (gimple_call_nonnull_result_p): New.
4839 (gimple_call_nonnull_arg): New.
4841 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
4843 * config/arm/arm-cpus.in: Move information from fpu field of each
4844 cpu definition to the isa field.
4845 * config/arm/parsecpu.awk (fpu): Delete match rule.
4846 (gen_comm_data): Don't add bits from the CPU's FPU entry.
4848 2018-07-11 Richard Biener <rguenther@suse.de>
4851 * dwarf2out.c (init_sections_and_labels): Use
4852 output_asm_line_debug_info consistently.
4853 (dwarf2out_early_finish): Likewise.
4854 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
4857 2018-07-11 Richard Biener <rguenther@suse.de>
4859 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
4860 Rework father_bb setting in a way to avoid propagating constants
4861 multiple times on a loop body.
4863 2018-07-10 Mark Wielaard <mark@klomp.org>
4866 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
4868 2018-07-10 Richard Biener <rguenther@suse.de>
4870 * hash-map.h (hash_map::iterator::operator*): Return
4871 references to key and value.
4873 2018-07-10 Jakub Jelinek <jakub@redhat.com>
4876 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
4877 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
4878 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
4879 (gimplify_omp_for): For composite loops, move outer
4880 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
4881 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
4882 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
4883 TREE_LIST for both the original class iterator and the "last" helper
4884 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
4885 loop, remember has_decl_expr from outer composite loops for the
4886 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
4888 2018-07-09 Martin Sebor <msebor@redhat.com>
4892 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
4893 accessing implicitly initialized array elements.
4894 * expr.c (string_constant): Handle string initializers of
4895 character arrays within aggregates.
4896 * gimple-fold.c (fold_array_ctor_reference): Add argument.
4897 Store element offset. As a special case, handle zero size.
4898 (fold_nonarray_ctor_reference): Same.
4899 (fold_ctor_reference): Add argument. Store subobject offset.
4900 * gimple-fold.h (fold_ctor_reference): Add argument.
4902 2018-07-09 Paul Koning <ni1d@arrl.net>
4904 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
4905 (pdp11_insn_cost): New function.
4906 (pdp11_md_asm_adjust): New function.
4907 (TARGET_INVALID_WITHIN_DOLOOP): Define.
4908 (pdp11_rtx_costs): Update to match machine better.
4909 (output_addr_const_pdp11): Correct format mismatch warnings.
4910 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
4911 * config/pdp11/pdp11.md: General change to add base_cost and/or
4912 length attributes for use by new pdp11_insn_cost function.
4913 (MIN_BRANCH): Correct definition.
4915 (doloop_end): Use standard pattern name for looping pattern.
4916 (doloop_end_nocc): New.
4917 (movsf): Add another constraint alternative.
4918 (zero_extendqihi2): Add constraint alternatives for not in place
4920 (zero_extendhisi2): Remove.
4921 (shift patterns): Add CC handling variants.
4925 (define_peephole2): New peephole to recognize mov that sets CC for
4928 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4930 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
4931 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
4934 2018-07-09 Jakub Jelinek <jakub@redhat.com>
4937 * real.c (real_nextafter): Return true if result is denormal.
4939 2018-07-09 Martin Liska <mliska@suse.cz>
4941 * common.opt: Add back wrongly removed attribute.
4943 2018-07-09 Richard Biener <rguenther@suse.de>
4946 * dwarf2out.c (gen_block_die): For an early generated DIE
4947 always output high/low PC attributes.
4949 2018-07-09 Tom de Vries <tdevries@suse.de>
4951 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
4952 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
4953 onto VAR_DECL with abstract origin.
4955 2018-07-07 Jim Wilson <jimw@sifive.com>
4957 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
4959 2018-07-07 Tom de Vries <tdevries@suse.de>
4961 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
4963 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
4965 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
4967 (combine_bound): Use wide-int overflow calculation instead of
4969 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
4971 * fold-const.c (int_const_binop_2): Same.
4972 (extract_muldiv_1): Same.
4973 (fold_div_compare): Same.
4974 (fold_abs_const): Same.
4976 * poly-int.h (add): Same.
4980 * predict.c (predict_iv_comparison): Same.
4981 * profile-count.c (slow_safe_scale_64bit): Same.
4982 * simplify-rtx.c (simplify_const_binary_operation): Same.
4983 * tree-chrec.c (tree_fold_binomial): Same.
4984 * tree-data-ref.c (split_constant_offset_1): Same.
4985 * tree-if-conv.c (idx_within_array_bound): Same.
4986 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
4987 * tree-ssa-phiopt.c (minmax_replacement): Same.
4988 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
4989 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
4990 * vr-values.c (vr_values::adjust_range_with_scev): Same.
4991 * wide-int.cc (wi::add_large): Same.
4992 (wi::mul_internal): Same.
4993 (wi::sub_large): Same.
4994 (wi::divmod_internal): Same.
4995 * wide-int.h: Change overflow type to overflow_type for neg, add,
4996 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
4997 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
4998 mul_internal, divmod_internal.
4999 (overflow_type): New enum.
5000 (accumulate_overflow): New.
5002 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
5004 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
5005 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
5007 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
5009 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
5010 argument is checked for zero before entering loop, avoid checking again.
5012 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
5014 * gimplify.h (generic_expr_could_trap_p): Set as global function.
5015 * gimplify.h (generic_expr_could_trap_p): Likwise.
5016 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
5018 2018-07-06 Jakub Jelinek <jakub@redhat.com>
5020 PR tree-optimization/86401
5021 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
5022 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
5023 (fold_bit_and_mask): ... here. New helper function for match.pd.
5024 * fold-const.h (fold_bit_and_mask): Declare.
5025 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
5027 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
5030 * target.def (translate_mode_attribute): New hook.
5031 * targhooks.h (default_translate_mode_attribute): Declare.
5032 * targhooks.c (default_translate_mode_attribute): New function.
5033 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
5034 * doc/tm.texi: Regenerate.
5035 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
5036 (rs6000_translate_mode_attribute): New function.
5038 2018-07-06 Paul Koning <ni1d@arrl.net>
5040 * doc/md.texi (define_split): Document DONE and FAIL.
5041 (define_peephole2): Ditto.
5043 2018-07-05 Jeff Law <law@redhat.com>
5045 PR tree-optimization/86010
5046 * tree-ssa-dse.c (compute_trims): More aggressively trim at
5047 both the head and tail of mem* and str* calls.
5049 2018-07-05 Jim Wilson <jimw@sifive.com>
5051 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
5053 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
5055 * config/aarch64/aarch64-simd.md: correct flags text for
5056 MIN_EXPR replacement.
5058 2018-07-05 James Clarke <jrtc27@jrtc27.com>
5060 * configure: Regenerated.
5062 2018-07-05 Carl Love <cel@us.ibm.com>
5064 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
5065 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
5066 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
5067 VSX_BUILTIN_DOUBLEL_V4SF.
5069 2018-07-05 Martin Sebor <msebor@redhat.com>
5072 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
5073 than its domain to compute its the upper bound of a char array.
5075 2018-07-05 Nathan Sidwell <nathan@acm.org>
5077 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
5078 * doc/cpp.texi: Update comment.
5079 * doc/tm.texi: Rebuilt.
5080 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
5081 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
5082 * doc/extend.texi (Backwards Compatibility): Clarify it is system
5083 headers affected by extern "C".
5084 * system.h: Poison NO_IMPLICIT_EXTERN_C.
5085 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
5086 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
5087 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
5088 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
5089 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
5090 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
5091 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
5092 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
5093 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
5094 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
5095 config/sparc/sp64-elf.h, config/spu/spu.h,
5096 config/stormy16/stormy16.h, config/v850/v850.h,
5097 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
5098 define NO_IMPLICIT_EXTERN_C.
5099 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
5101 2018-07-05 Tamar Christina <tamar.christina@arm.com>
5104 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
5105 instead of GET_MODE_SIZE when comparing Units.
5107 2018-07-05 Tamar Christina <tamar.christina@arm.com>
5110 * rtlanal.c (set_noop_p): Constrain on mode change,
5111 include hard-reg-set.h
5113 2018-07-05 Tamar Christina <tamar.christina@arm.com>
5115 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
5117 2018-07-05 Jakub Jelinek <jakub@redhat.com>
5120 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
5123 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
5125 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
5127 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
5130 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
5132 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
5134 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
5137 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
5139 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
5141 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
5142 neg_*_op* variables.
5144 2018-07-04 Martin Liska <mliska@suse.cz>
5146 * tree-switch-conversion.c: Define
5147 max_ratio_for_speed and max_ratio_for_size constants.
5149 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
5150 Martin Liska <mliska@suse.cz>
5155 * common.opt: Rename align options with 'str_' prefix.
5156 * common/config/i386/i386-common.c (set_malign_value): New
5158 (ix86_handle_option): Use it to set -falign-* options/
5159 * config/aarch64/aarch64-protos.h (struct tune_params): Change
5160 type from int to string.
5161 * config/aarch64/aarch64.c: Update default values from int
5163 * config/alpha/alpha.c (alpha_override_options_after_change):
5165 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
5166 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5167 max skip conditionally.
5168 * config/i386/freebsd.h (SUBALIGN_LOG): New.
5169 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5170 max skip conditionally.
5171 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5172 max skip conditionally.
5173 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
5174 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5175 max skip conditionally.
5176 * config/i386/i386.c (struct ptt): Change type from int to
5178 (ix86_default_align): Set default values.
5179 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
5180 max skip conditionally.
5181 * config/i386/iamcu.h (SUBALIGN_LOG): New.
5182 (ASM_OUTPUT_MAX_SKIP_ALIGN):
5183 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
5184 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5185 max skip conditionally.
5186 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
5187 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
5188 * config/i386/x86-64.h (SUBALIGN_LOG): New.
5189 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5190 max skip conditionally.
5191 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5192 * config/ia64/ia64.c (ia64_option_override): Set default values
5193 for alignment options.
5194 * config/m68k/m68k.c: Handle new str_align_* options.
5195 * config/mips/mips.c (mips_set_compression_mode): Change
5197 (mips_option_override): Set default values for options.
5198 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
5200 * config/rs6000/rs6000.c (rs6000_option_override_internal):
5202 * config/rx/rx.c (rx_option_override): Likewise.
5203 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
5204 (LABEL_ALIGN): Use align_labels_log.
5205 (LOOP_ALIGN): Use align_loops_align.
5206 * config/s390/s390.c (s390_asm_output_function_label): Use new
5208 * config/sh/sh.c (sh_override_options_after_change):
5209 Change type of constants.
5210 * config/spu/spu.c (spu_sched_init): Likewise.
5211 * config/sparc/sparc.c (sparc_option_override): Set default
5213 * config/visium/visium.c (visium_option_override): Likewise.
5214 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
5215 emit p2align format with last argument if it's not needed.
5216 * doc/invoke.texi: Document extended format of -falign-*.
5217 * final.c: Use align_labels alignment.
5218 * flags.h (struct target_flag_state): Change type to use
5220 (struct align_flags_tuple): New.
5221 (struct align_flags): Likewise.
5222 (align_loops_log): Redefine macro to use new types.
5223 (align_loops_max_skip): Redefine macro to use new types.
5224 (align_jumps_log): Redefine macro to use new types.
5225 (align_jumps_max_skip): Redefine macro to use new types.
5226 (align_labels_log): Redefine macro to use new types.
5227 (align_labels_max_skip): Redefine macro to use new types.
5228 (align_functions_log): Redefine macro to use new types.
5229 (align_loops): Redefine macro to use new types.
5230 (align_jumps): Redefine macro to use new types.
5231 (align_labels): Redefine macro to use new types.
5232 (align_functions): Redefine macro to use new types.
5233 (align_functions_max_skip): Redefine macro to use new types.
5234 (align_loops_value): New macro.
5235 (align_jumps_value): New macro.
5236 (align_labels_value): New macro.
5237 (align_functions_value): New macro.
5238 * function.c (invoke_set_current_function_hook): Propagate
5239 alignment values from flags to global variables default in
5241 * ipa-icf.c (sem_function::equals_wpa): Use
5242 cl_optimization_option_eq instead of memcmp.
5243 * lto-streamer.h (cl_optimization_stream_out): Support streaming
5245 (cl_optimization_stream_in): Likewise.
5246 * optc-save-gen.awk: Support strings in cl_optimization.
5247 * opth-gen.awk: Likewise.
5248 * opts.c (finish_options): Remove error checking of invalid
5250 (MAX_CODE_ALIGN): Remove.
5251 (MAX_CODE_ALIGN_VALUE): Likewise.
5252 (parse_and_check_align_values): New function.
5253 (check_alignment_argument): Likewise.
5254 (common_handle_option): Use check_alignment_argument.
5255 * opts.h (parse_and_check_align_values): Declare.
5256 * toplev.c (init_alignments): Remove.
5257 (read_log_maxskip): New.
5258 (parse_N_M): Likewise.
5259 (parse_alignment_opts): Likewise.
5260 (backend_init_target): Remove usage of init_alignments.
5261 * toplev.h (parse_alignment_opts): Declare.
5262 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
5264 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
5265 * tree.c (cl_option_hasher::equal): New.
5266 * varasm.c: Use new global macros.
5268 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
5270 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
5271 Use a simpler align directive also if MAXSKIP = ALIGN-1.
5272 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5273 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5274 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5275 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5276 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
5277 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
5278 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
5279 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5280 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5281 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5282 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5284 2018-07-04 Martin Liska <mliska@suse.cz>
5285 Jonathan Wakely <jwakely@redhat.com>
5287 * coverage.c: Use correct type.
5288 * doc/invoke.texi: Language correction.
5290 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
5293 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
5294 ENDBRANCH for non-tail call which may return via indirect branch.
5295 * doc/extend.texi: Document indirect_return attribute.
5297 2018-07-03 Martin Sebor <msebor@redhat.com>
5299 PR tree-optimization/86274
5300 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
5302 (format_floating): Correct handling of infinities and NaNs.
5304 2018-07-03 Martin Sebor <msebor@redhat.com>
5306 * print-tree.c (print_real_cst): New function.
5307 (print_node_brief): Call it.
5308 (print_node): Ditto.
5310 2018-07-03 Jeff Law <law@redhat.com>
5312 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
5313 into a single pattern.
5315 * config/h8300/h8300.md (ors code_iterator): New.
5316 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
5317 a single pattern and single splitter.
5318 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
5319 (iorqi3_1, xorqi3_1): Likewise.
5320 (iorqi3, xorqi3 expanders): Similarly.
5322 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
5323 (movmd_internal) into a single pattern using the P mode iterator.
5324 (movmd splitters): Similarly.
5325 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
5326 (movsd splitters): Similarly.
5328 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
5329 ADDB, ADDW and ADDL into a single ADD attribute which selects the
5330 right table based on the size of the operand.
5331 * config/h8300/h8300.md (length_table): Corresponding changes. All
5332 references to "addb", "addw" and "addl" changed to "add".
5333 (btst patterns): Merge two variants into a single pattern.
5334 (tstqi, tsthi): Likewise.
5335 (addhi3_incdec, addsi3_incdec): Likewise.
5336 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
5337 (mulhi3, mulsi3): Likewise.
5338 (udivhi3, udivsi3): Likewise.
5339 (divhi3, divsi3): Likewise.
5340 (andorqi3, andorhi3, andorsi3): Likewise.
5342 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
5345 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
5346 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
5348 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5350 PR tree-optimization/85694
5351 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
5352 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
5354 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
5355 (<u>avg<mode>3_ceil): New patterns.
5357 2018-07-03 David Malcolm <dmalcolm@redhat.com>
5359 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
5360 scan-tree-dump directive.
5361 * gcc.dg/vect/slp-perm-2.c: Likewise.
5362 * gcc.dg/vect/slp-perm-3.c: Likewise.
5363 * gcc.dg/vect/slp-perm-5.c: Likewise.
5364 * gcc.dg/vect/slp-perm-6.c: Likewise.
5365 * gcc.dg/vect/slp-perm-7.c: Likewise.
5366 * gcc.dg/vect/slp-perm-8.c: Likewise.
5368 2018-07-03 Marek Polacek <polacek@redhat.com>
5371 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
5373 2018-07-03 Richard Biener <rguenther@suse.de>
5376 * tree-ssa-structalias.c (find_func_clobbers): Properly
5377 handle indirect calls.
5379 2018-07-03 Jeff Law <law@redhat.com>
5381 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
5382 (shifts): New code iterator.
5383 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
5384 expander. Fix HImode handling on H8/SX.
5385 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
5386 (subqi3, subhi3, subsi3 expanders): Likewise.
5387 (andqi3, andhi3, andsi3 expanders): Likewise.
5388 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
5389 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
5390 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
5391 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
5392 (zero_extendqihi2, zero_extendqisi2): Likewise.
5393 (extendqihi2, extendqisi2): Likewise.
5394 (rotlqi3, rotlhi3, rotlsi3): Likewise.
5395 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
5396 (rotlqi3_1, rotlhi3_1): Likewise.
5397 (logicalhi3_sn, logicalsi3_sn): Likewise.
5398 (logicalhi3, logicalsi3): Likewise.
5400 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5402 * tree-vect-patterns.c (vect_recog_rotate_pattern)
5403 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
5404 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
5405 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
5406 type to append_pattern_def_seq instead of creating a stmt_vec_info
5408 (build_mask_conversion): Likewise. Remove vinfo argument.
5409 (vect_add_conversion_to_patterm): Likewise, renaming to...
5410 (vect_add_conversion_to_pattern): ...this.
5411 (vect_recog_mask_conversion_pattern): Update call to
5412 build_mask_conversion. Pass the vector type to
5413 append_pattern_def_seq here too.
5414 (vect_recog_gather_scatter_pattern): Update call to
5415 vect_add_conversion_to_pattern.
5417 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5419 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
5420 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5421 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
5422 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
5423 STMT_VINFO_PATTERN_DEF_SEQ to null here.
5424 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
5425 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
5426 append_pattern_def_seq instead of new_pattern_def_seq.
5427 (vect_recog_divmod_pattern): Do both of the above.
5428 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
5431 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5433 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
5434 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
5435 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
5436 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
5437 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
5438 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
5439 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
5440 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
5441 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
5442 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
5443 parameter with a single stmt_vec_info.
5444 (vect_recog_func_ptr): Likewise.
5445 (vect_recog_gather_scatter_pattern): Likewise, folding in...
5446 (vect_try_gather_scatter_pattern): ...this.
5447 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
5448 the stmt_vec_info of the statement to be matched. Don't clear
5449 STMT_VINFO_RELATED_STMT.
5450 (vect_pattern_recog): Update call accordingly.
5452 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5454 PR tree-optimization/85694
5455 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
5456 (uavgM3_ceil): Document new optabs.
5457 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
5458 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
5460 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
5461 (savg_ceil_optab): New optabs.
5462 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
5463 (vect_vect_recog_func_ptrs): Add it.
5464 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
5465 constant directly from the associated lhs.
5467 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5469 * tree-vect-patterns.c (vect_split_statement): New function.
5470 (vect_convert_input): Use it to try to split an existing cast.
5472 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5474 * poly-int.h (print_hex): New function.
5475 * dumpfile.h (dump_dec, dump_hex): Declare.
5476 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
5477 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
5478 min_input_precision, operation_precision and operation_sign.
5479 * tree-vect-patterns.c (vect_get_range_info): New function.
5480 (vect_same_loop_or_bb_p, vect_single_imm_use)
5481 (vect_operation_fits_smaller_type): Delete.
5482 (vect_look_through_possible_promotion): Add an optional
5483 single_use_p parameter.
5484 (vect_recog_over_widening_pattern): Rewrite to use new
5485 stmt_vec_info infomration. Handle one operation at a time.
5486 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
5487 (vect_truncatable_operation_p, vect_set_operation_type)
5488 (vect_set_min_input_precision): New functions.
5489 (vect_determine_min_output_precision_1): Likewise.
5490 (vect_determine_min_output_precision): Likewise.
5491 (vect_determine_precisions_from_range): Likewise.
5492 (vect_determine_precisions_from_users): Likewise.
5493 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
5494 (vect_vect_recog_func_ptrs): Put over_widening first.
5496 (vect_pattern_recog): Call vect_determine_precisions.
5498 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5500 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
5501 statements that have been replaced by further pattern statements.
5502 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
5504 2018-07-03 Richard Biener <rguenther@suse.de>
5506 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
5507 always set *dt. Dump vectype in vectype overload.
5508 * dumpfile.h (dump_gimple_expr): New function.
5509 (dump_gimple_expr_loc): Likewise.
5510 * dumpfile.c (dump_gimple_expr): New function.
5511 (dump_gimple_expr_loc): Likewise.
5513 2018-07-02 Jeff Law <law@redhat.com>
5515 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
5516 the H8/300, H8/300H and H8/S variants into a single pattern.
5517 (movhi_h8300, movqi_h8300hs): Similarly.
5518 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
5519 (QHI mode iterator): New.
5521 * config/h8300/h8300.md: Remove trailing whitespace.
5523 2018-07-02 Jim Wilson <jimw@sifive.com>
5525 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
5526 instead of emit_insn for interrupt returns.
5527 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
5528 (riscv_sret, riscv_uret): Likewise.
5530 2018-07-02 David Malcolm <dmalcolm@redhat.com>
5532 * pretty-print.c (selftest::test_pp_format): Move save and restore
5533 of quotes to class auto_fix_quotes, and add an instance.
5534 * selftest.c: Include "intl.h".
5535 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
5536 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
5537 * selftest.h (selftest::auto_fix_quotes): New class.
5539 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
5541 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
5542 (aarch64_sve_prepare_conditional_op): Remove.
5543 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
5544 Allow aarch64_simd_reg_or_zero as select operand; remove
5545 the aarch64_sve_prepare_conditional_op call.
5546 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
5547 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
5548 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
5549 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
5550 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
5551 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
5552 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
5553 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
5554 and a splitters to match all of the *_any patterns.
5555 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
5557 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
5558 (SVE_COND_FP_BINARY_REV): Remove.
5559 (sve_int_op_rev, sve_fp_op_rev): New.
5560 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
5561 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
5562 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
5563 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
5564 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
5565 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
5566 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
5567 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
5568 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
5570 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
5571 Remove match_dup 1 from the inner unspec.
5572 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
5574 * config/aarch64/aarch64.md (movprfx): New attr.
5575 (length): Default movprfx to 8.
5576 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
5577 (*madd<SVE_I>, *msub<SVE_I): Likewise.
5578 (*<su>mul<SVE_I>3_highpart): Likewise.
5579 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
5580 (*v<ASHIFT><SVE_I>3): Likewise.
5581 (*<su><MAXMIN><SVE_I>3): Likewise.
5582 (*<su><MAXMIN><SVE_F>3): Likewise.
5583 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
5584 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
5585 (*div<SVE_F>4): Likewise.
5587 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
5589 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
5592 2018-07-02 Richard Biener <rguenther@suse.de>
5594 PR tree-optimization/86363
5595 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
5596 memset argument refers to a non-variable address.
5598 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
5600 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
5601 {PLUS,MINUS}_EXPR code to...
5602 (adjust_symbolic_bound): ...here,
5603 (combine_bound): ...here,
5604 (set_value_range_with_overflow): ...and here.
5606 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
5608 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
5610 (extract_range_from_abs_expr): ...here.
5612 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
5614 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
5615 -fno-omit-frame-pointer when not optimizing.
5617 2018-07-02 Martin Liska <mliska@suse.cz>
5620 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
5621 (propagate_nothrow): Likewise.
5623 2018-07-02 Martin Liska <mliska@suse.cz>
5626 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
5628 2018-07-02 David Malcolm <dmalcolm@redhat.com>
5630 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
5631 function in r262149, changing "loc" param from source_location to
5632 const dump_location_t &.
5633 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
5634 declaration, as above.
5636 2018-07-01 Paul Koning <ni1d@arrl.net>
5638 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
5639 -munit-asm, -mgnu-asm, -mdec-asm.
5640 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
5641 (pdp11_output_labelref): New.
5642 (pdp11_output_def): New.
5643 (pdp11_output_addr_vec_elt): New.
5644 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
5645 %# and %@ format codes.
5646 (pdp11_option_override): New.
5647 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
5648 (pdp11_output_ident): New.
5649 (pdp11_asm_named_section): New.
5650 (pdp11_asm_init_sections): New.
5651 (pdp11_file_start): New.
5652 (pdp11_file_end): New.
5653 (output_ascii): Use .ascii/.asciz for -mdec-asm.
5654 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
5655 %o, like %c but octal.
5656 (pdp11_option_override): New.
5657 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
5659 (DATA_SECTION_ASM_OP): Ditto.
5660 (READONLY_DATA_SECTION_ASM_OP): New.
5661 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
5662 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
5663 (ASM_OUTPUT_LABELREF): Ditto.
5664 (ASM_OUTPUT_DEF): Ditto.
5665 (ASM_OUTPUT_EXTERNAL): New.
5666 (ASM_OUTPUT_SOURCE_FILENAME): New.
5667 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
5668 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
5669 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
5670 %# and %@ format codes.
5671 * config/pdp11/pdp11.opt (mgnu-asm): New.
5672 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
5673 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
5674 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
5676 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
5678 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
5679 dereferencing path[] beyond its length.
5681 (debug_all_paths): New.
5682 (rewire_first_differing_edge): New.
5683 (adjust_paths_after_duplication): New.
5684 (duplicate_thread_path): Call adjust_paths_after_duplication.
5686 (thread_through_all_blocks): Add new argument to
5687 duplicate_thread_path.
5689 2018-06-30 Jim Wilson <jimw@sifive.com>
5691 * config/riscv/predicates.md (p2m1_shift_operand): New.
5692 (high_mask_shift_operand): New.
5693 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
5694 pattern using p2m1_shift_operand.
5695 (lshsi3_zero_extend_3+2): New combiner pattern using
5696 high_mask_shift_operand.
5698 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5700 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
5702 (vect_recog_rotate_pattern): ...here.
5703 (vect_convert_input): Try to insert casts of invariants in the
5705 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
5706 preheader to be empty.
5708 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5710 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
5711 vector type. If given, install it in the new statement's
5713 (vect_element_precision): New function.
5714 (vect_unpromoted_value): New struct.
5715 (vect_unpromoted_value::vect_unpromoted_value): New function.
5716 (vect_unpromoted_value::set_op): Likewise.
5717 (vect_look_through_possible_promotion): Likewise.
5718 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
5719 (vect_widened_op_tree, vect_convert_input): Likewise.
5720 (vect_convert_inputs, vect_convert_output): Likewise.
5721 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
5722 to handle the optional cast of the multiplication result and
5723 vect_widened_op_tree to detect the widened multiplication itself.
5724 Do not require the input and output of promotion casts to have
5725 the same sign, but base the signedness of the operation on the
5726 input rather than the result. If the pattern includes two
5727 promotions, check that those promotions have the same sign.
5728 Do not restrict the MULT_EXPR handling to a double-width result;
5729 handle quadruple-width results and wider. Use vect_convert_inputs
5730 to convert the inputs to the common type.
5731 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
5732 to handle the optional cast of the ABS result. Also allow a sign
5733 change or a sign extension between the ABS and MINUS.
5734 Use vect_widened_op_tree to detect the widened subtraction and use
5735 vect_convert_inputs to convert the inputs to the common type.
5736 (vect_handle_widen_op_by_const): Delete.
5737 (vect_recog_widen_op_pattern): New function.
5738 (vect_recog_widen_mult_pattern): Use it.
5739 (vect_recog_widen_shift_pattern): Likewise.
5740 (vect_recog_widen_sum_pattern): Use
5741 vect_look_through_possible_promotion to handle the promoted
5744 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5746 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
5747 the containing gimple_seq *.
5748 * gimple-iterator.h (gsi_for_stmt): Declare it.
5749 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
5750 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
5751 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
5752 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
5753 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
5755 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
5757 (vect_mark_pattern_stmts): ...here. Handle cases in which the
5758 statement being replaced is part of an existing pattern
5759 definition sequence, inserting the new pattern statements before
5761 (vect_pattern_recog_1): Don't return a bool. If the statement
5762 is already part of a pattern, instead apply pattern matching
5763 to the pattern definition statements. Don't clear the
5764 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
5765 (vect_pattern_recog): Don't break after the first match;
5766 continue processing the pattern definition statements instead.
5767 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
5769 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5771 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
5772 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5773 (vect_recog_widen_sum_pattern): Use it.
5775 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5777 * tree-vect-loop.c (vectorizable_reduction): Assert that the
5778 phi is not a pattern statement and has not been replaced by
5779 a pattern statement.
5780 * tree-vect-patterns.c (type_conversion_p): Don't check
5781 STMT_VINFO_IN_PATTERN_P.
5782 (vect_recog_vector_vector_shift_pattern): Likewise.
5783 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
5784 the pattern statement rather than the original statement; check
5785 directly for a WIDEN_MULT_EXPR here.
5786 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
5787 vect_is_simple_use to return the pattern statement rather
5788 than the original statement; use is_pattern_stmt_p to check
5789 for such a pattern statement.
5790 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
5791 to return the pattern statement rather than the original statement;
5792 don't do the same transformation here.
5793 (vect_is_simple_use): If the defining statement has been replaced
5794 by a pattern statement, return the pattern statement instead.
5795 Remove the corresponding (local) transformation from the vectype
5798 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5800 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
5801 end and default to null.
5802 * tree-vect-loop.c (vect_create_epilog_for_reduction)
5803 (vectorizable_reduction): Update calls accordingly, dropping the
5804 gimple ** argument if the passed-back statement isn't needed.
5805 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
5806 (vect_recog_rotate_pattern): Likewise.
5807 (vect_recog_mask_conversion_pattern): Likewise.
5808 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
5809 (vect_mask_constant_operand_p): Likewise.
5810 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
5811 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
5812 (get_group_load_store_type, get_load_store_type): Likewise.
5813 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
5814 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
5815 (vectorizable_conversion, vectorizable_assignment): Likewise.
5816 (vectorizable_shift, vectorizable_operation): Likewise.
5817 (vectorizable_store, vect_is_simple_cond): Likewise.
5818 (vectorizable_condition, vectorizable_comparison): Likewise.
5819 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
5820 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
5821 and move it to the end. Cope with null def_stmt_outs.
5823 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
5825 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
5827 2018-06-29 Jeff Law <law@redhat.com>
5829 * config/v850/v850.c (v850_legitimate_address_p): Handle large
5830 displacements for TARGET_V850E2V3 and newer.
5831 (TARGET_LRA_P): Remove. Defaults to LRA now.
5832 * config/v850/v850.md (sign23byte_load): Remove.
5833 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
5834 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
5836 2018-06-29 Martin Liska <mliska@suse.cz>
5839 * coverage.c (coverage_init): Mangle full path name.
5840 * doc/invoke.texi: Document the change.
5841 * gcov-io.c (mangle_path): New.
5842 * gcov-io.h (mangle_path): Likewise.
5843 * gcov.c (mangle_name): Use mangle_path for path mangling.
5845 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5847 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
5848 if starting source register is not even.
5850 2018-06-29 Martin Liska <mliska@suse.cz>
5852 PR tree-optimization/86263
5853 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
5854 Make edge redirection.
5856 2018-06-29 David Malcolm <dmalcolm@redhat.com>
5858 * dumpfile.c (dump_loc): Add indentation based on scope depth.
5859 (dump_scope_depth): New variable.
5860 (get_dump_scope_depth): New function.
5861 (dump_begin_scope): New function.
5862 (dump_end_scope): New function.
5863 * dumpfile.h (get_dump_scope_depth): New declaration.
5864 (dump_begin_scope): New declaration.
5865 (dump_end_scope): New declaration.
5866 (class auto_dump_scope): New class.
5867 (AUTO_DUMP_SCOPE): New macro.
5868 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
5871 2018-06-29 Richard Biener <rguenther@suse.de>
5873 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
5874 compute_all_dependences succeeds.
5875 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
5876 exceed --param loop-max-datarefs-for-datadeps.
5878 2018-06-29 Jakub Jelinek <jakub@redhat.com>
5880 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
5882 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
5885 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
5886 alternative 0 in preferred_for_speed attribute.
5888 2018-06-28 Paul Koning <ni1d@arrl.net>
5890 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
5891 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
5892 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
5893 * config/pdp11/pdp11.md: Correct "length" attribute calculation
5894 for shift insn patterns.
5896 2018-06-28 David Malcolm <dmalcolm@redhat.com>
5898 * cgraph.c (cgraph_node::get_body): Replace assignments to
5899 "dump_file" with calls to set_dump_file.
5900 * dumpfile.c (alt_dump_file): Make static, and group with...
5901 (alt_flags): ...this definition.
5902 (dumps_are_enabled): New variable.
5903 (refresh_dumps_are_enabled): New function.
5904 (set_dump_file): New function.
5905 (set_alt_dump_file): New function.
5906 (gcc::dump_manager::dump_start): Replace assignments to
5907 "dump_file" and "alt_dump_file" with calls to set_dump_file and
5909 (gcc::dump_manager::dump_finish): Likewise.
5910 * dumpfile.h (alt_dump_file): Delete decl.
5911 (dumps_are_enabled): New variable decl.
5912 (set_dump_file): New function decl.
5913 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
5915 * tree-nested.c (lower_nested_functions): Replace assignments to
5916 "dump_file" with calls to set_dump_file.
5918 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
5920 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
5921 goto_locus of each outgoing edge of each basic block.
5923 2018-06-28 Richard Biener <rguenther@suse.de>
5925 * dwarf2out.c (decl_scope_table): Remove.
5926 (push_decl_scope): Likewise.
5927 (pop_decl_scope): Likewise.
5928 (gen_type_die_for_member): Do not call push/pop_decl_scope.
5929 (gen_struct_or_union_type_die): Likewise.
5930 (gen_tagged_type_die): Likewise.
5931 (dwarf2out_init): Do not initialize decl_scope_table.
5932 (dwarf2out_c_finalize): Do not free it.
5934 2018-06-28 Richard Biener <rguenther@suse.de>
5936 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
5937 deciding whether to not re-use a DIE.
5939 2018-06-28 Richard Biener <rguenther@suse.de>
5941 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
5942 DW_AT_abstract_origin attribute.
5944 2018-06-28 Martin Liska <mliska@suse.cz>
5946 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
5947 Use newly introduced constants.
5948 * tree-switch-conversion.h (struct jump_table_cluster):
5949 Define max_ratio_for_size and max_ratio_for_speed.
5951 2018-06-28 Martin Liska <mliska@suse.cz>
5953 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5954 Add new checking assert to catch invalid state.
5955 (jump_table_cluster::can_be_handled): Handle single case
5957 (jump_table_cluster::is_beneficial): Bail out for such case.
5958 (bit_test_cluster::find_bit_tests):
5959 Add new checking assert to catch invalid state.
5960 (bit_test_cluster::can_be_handled): Handle single case
5962 (bit_test_cluster::is_beneficial): Bail out for such case.
5963 (switch_decision_tree::analyze_switch_statement):
5966 2018-06-28 Martin Liska <mliska@suse.cz>
5968 * common.opt: Introduce -completion option.
5969 * gcc.c (driver_handle_option): Handle it.
5970 (driver::main): Print completions if completion
5972 * opt-suggestions.c (option_proposer::get_completions):
5974 (option_proposer::suggest_completion): Likewise.
5975 (option_proposer::find_param_completions): Likewise.
5976 (verify_autocompletions): Likewise.
5977 (test_completion_valid_options): Likewise.
5978 (test_completion_valid_params): Likewise.
5979 (in_completion_p): Likewise.
5980 (empty_completion_p): Likewise.
5981 (test_completion_partial_match): Likewise.
5982 (test_completion_garbage): Likewise.
5983 (opt_proposer_c_tests): Likewise.
5984 * opt-suggestions.h: Declare new functions.
5985 * opts.c (common_handle_option): Handle OPT__completion_.
5986 * selftest-run-tests.c (selftest::run_tests): Add
5987 opt_proposer_c_tests.
5988 * selftest.c (assert_str_startswith): New.
5989 * selftest.h (assert_str_startswith): Likewise.
5990 (opt_proposer_c_tests): New.
5991 (ASSERT_STR_STARTSWITH): Likewise.
5993 2018-06-28 Martin Liska <mliska@suse.cz>
5995 * Makefile.in: Add opt-suggestions.o.
5996 * gcc-main.c: Include opt-suggestions.h.
5997 * gcc.c (driver::driver): Likewise.
5998 (driver::~driver): Remove m_option_suggestions.
5999 (driver::build_option_suggestions): Moved to option_proposer.
6000 (driver::suggest_option): Likewise.
6001 (driver::handle_unrecognized_options): Use option_proposer.
6002 * gcc.h (class driver): Add new memver m_option_proposer.
6003 * opt-suggestions.c: New file.
6004 * opt-suggestions.h: New file.
6006 2018-06-28 Martin Liska <mliska@suse.cz>
6008 * vec.h (class auto_string_vec): New (moved from auto_argvec).
6009 (auto_string_vec::~auto_string_vec): Likewise.
6011 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
6013 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
6014 prevent_decl_creation_for_types fields up and add reset_location field.
6015 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
6016 statement if id->reset_location is true.
6017 (copy_edges_for_bb): Do not set goto_locus on the new edges if
6018 id->reset_location is true.
6019 (copy_phis_for_bb): Force input_location on the arguments if
6020 id->reset_location is true.
6021 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
6022 is set on the function to be inlined.
6024 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
6026 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
6028 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
6030 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
6031 registers for Pmode.
6032 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
6033 hard registers for the clobbered pseudo.
6035 2018-06-27 Paul Koning <ni1d@arrl.net>
6037 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6038 mutually exclusive options.
6039 * config/pdp11/constraints.md (h): New constraint.
6040 (O): Update definition to match shift code generation.
6041 (D): New constraint.
6042 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
6044 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
6046 (output_jump): Change arguments.
6047 (pdp11_fixed_cc_regs): New function.
6048 (pdp11_cc_mode): Ditto.
6049 (pdp11_expand_shift): Ditto.
6050 (pdp11_assemble_shift): Ditto.
6051 (pdp11_small_shift): Ditto.
6052 (pdp11_branch_cost): Remove.
6053 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
6055 (pdp11_register_move_cost): Update for CC registers.
6056 (pdp11_rtx_costs): Add case for LSHIFTRT.
6057 (pdp11_output_jump): Add CCNZ mode conditional branches.
6058 (notice_update_cc_on_set): Remove.
6059 (pdp11_cc_mode): New function.
6060 (simple_memory_operand): Correct pre/post decrement case.
6061 (no_side_effect_operand): New function.
6062 (pdp11_regno_reg_class): Add CC_REGS class.
6063 (pdp11_fixed_cc_regs): New function.
6064 (pdp11_small_shift): New function.
6065 (pdp11_expand_shift): New function to expand shift insns.
6066 (pdp11_assemble_shift): New function to output shifts.
6067 (pdp11_branch_cost): Remove.
6068 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
6069 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
6070 (WCHAR_TYPE): Ditto.
6071 (PTRDIFF_TYPE): Ditto.
6072 (ADJUST_INSN_LENGTH): New macro.
6073 (FIXED_REGISTERS): Add CC registers.
6074 (CALL_USED_REGISTERS): Ditto.
6076 (REG_CLASS_NAMES): Ditto.
6077 (REG_CLASS_CONTENTS): Ditto.
6078 (SELECT_CC_MODE): Use new function.
6079 (TARGET_FLAGS_REGNUM): New macro.
6080 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
6081 (cc0_reg_rtx): Remove.
6082 (CC_STATUS_MDEP): Remove.
6083 (CC_STATUS_MDEFP_INIT): Remove.
6084 (CC_IN_FPU): Remove.
6085 (NOTICE_UPDATE_CC): Remove.
6086 (REGISTER_NAMES): Add CC registers.
6087 (BRANCH_COST): Change to constant 1.
6088 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
6090 * config/pdp11/pdp11.opt (mbcopy): Remove.
6091 (mbcopy-builtin): Remove.
6092 (mbranch-cheap): Remove.
6093 (mbranch-expensive): Remove.
6094 * config/pdp11/predicates.md (expand_shift_operand): Update to
6095 match shift code generation.
6096 (ccnz_operator): New predicate.
6097 * doc/invoke.texi (PDP-11 Options): Remove deleted options
6098 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
6099 Remove non-existent option -mabshi, -mno-abshi. Document mutually
6101 * doc/md.texi (PDP-11): Document new D and h constraints. Update
6102 description of O constraint.
6104 2018-06-27 Jeff Law <law@redhat.com>
6105 Austin Law <austinklaw@gmail.com>
6107 * config/v850/v850.md (addsi3_set_flags): New pattern.
6108 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
6109 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
6110 (zero_extendhisi2_v850_set_flags): Likewise.
6111 (zero_extendqisi2_v850_set_flags): Likewise.
6112 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
6113 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
6114 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
6116 * config/v850/v850-protos.h (notice_update_cc): Remove.
6117 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
6118 (v850_print_operand): Handle 'D' and "d".
6119 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
6120 Add handling of arithmetic/logical operations compared against zero.
6121 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
6122 Do not look at v850_compare_op, instead get mode from last argument.
6123 (v850_gen_compare): Remove
6124 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
6125 after reload for prologue insns.
6126 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
6128 (construct_save_jarl): Likewise.
6129 (TARGET_FLAGS_REGNUM): Define.
6130 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
6131 (NOTICE_UPDATE_CC): Remove.
6132 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
6133 than cc0. Conditionalize on reload_completed.
6134 (cmpsi_insn, setfcc_insn): Likewise.
6135 (tst1 splitter): Turn into define_and_split which sets the flags
6137 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
6138 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
6139 (cstoresf4, cstoredf4): Clobber the flags.
6140 (cmpsi, cmpsf, cmpdf): Remove expanders.
6141 (setf_insn): Remove pattern.
6142 (addsi3): Turn into define_and_split which clobbers the flags after
6143 reload and a suitable pattern (addsi3_clobber_flags) for use after
6145 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
6146 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
6147 (ashrsi3, ashrsi3_v850e2): Likewise.
6148 (bins): Clobber the flags.
6149 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
6150 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
6151 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
6152 (call_value_internal_short, call_value_internal_long): Likewise.
6153 (callt_save_interrupt, callt_return_interrupt): Likewise.
6154 (save_interrupt, return_interrupt): Likewise.
6155 (callt_save_all_interrupt, save_all_interrupt): Likewise.
6156 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
6157 (restore_all_interrupt, _restore_all_interrupt): Likewise.
6158 (All FP comparisons): Only allow after reload has completed.
6160 (divh, divhu): Tweak output template.
6161 (branch_z_normal, branch_z_invert): Remove
6162 (branch_nz_normal, branch_nz_invert): Likewise.
6163 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
6165 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
6166 * config/v850/v850.c (notice_update_cc): Remove.
6167 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
6168 (CC_NO_CARRY): Likewise.
6169 (NOTICE_UPDATE_CC): Define to nothing.
6170 * config/v850/v850.md: Remove block comment on cc0 handling
6171 Remove "cc" attribute from all patterns. Remove cc_status handling
6172 from all patterns. Minor formatting fixes.
6174 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6176 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
6177 (cortex-a76.cortex-a55): Likewise.
6178 * config/aarch64/aarch64-tune.md: Regenerate.
6179 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
6180 cortex-a76.cortex-a55.
6182 2018-06-27 Jeff Law <law@redhat.com>
6184 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
6185 (MULTILIB_DIRNAMES): Similarly.
6187 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
6189 * gimple.h (gimple_return_retbnd): Delete.
6190 (gimple_return_set_retbnd): Likewise.
6191 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
6192 gimple_return_set_retbnd.
6193 * gimple-pretty-print.c (dump_gimple_return): Remove call to
6194 gimple_return_retbnd and adjust.
6195 * tree-inline.h (struct copy_body_data): Remove retbnd field.
6196 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
6197 Explicitly return NULL in a couple more cases. Move assertion
6198 on debug statements and remove unreachable code.
6199 (reset_debug_binding): Do not test id->retbnd.
6200 (expand_call_inline): Do not set it.
6202 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6204 * configure.ac: Add --disable-gcov option.
6205 * configure: Regenerate.
6206 * Makefile.in: Honour @enable_gcov@.
6207 * doc/install.texi: Document --disable-gcov.
6209 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6211 * config/arm/arm-cpus.in (cortex-a76): New entry.
6212 (cortex-a76.cortex-a55): Likewise.
6213 * config/arm/arm-tables.opt: Regenerate.
6214 * config/arm/arm-tune.md: Likewise.
6215 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
6216 * doc/invoke.texi (ARM Options): Document cortex-a76 and
6217 cortex-a76.cortex-a55.
6219 2018-06-27 Tamar Christina <tamar.christina@arm.com>
6222 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
6224 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
6226 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
6228 (EPILOGUE_USES): Likewise.
6230 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
6232 * tree-inline.c (remap_location): New function extracted from...
6233 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
6234 (copy_phis_for_bb): ...here. Call remap_location.
6235 (copy_cfg_body): Adjust call to copy_edges_for_bb.
6237 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
6239 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
6240 unaligned vsx for 16B memset.
6242 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
6245 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
6246 ieee128_float_type_node to long_double_type_node unless
6247 TARGET_LONG_DOUBLE_128 is set.
6249 2018-06-26 David Malcolm <dmalcolm@redhat.com>
6251 * cfgloop.c (get_loop_location): Convert return type from
6252 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
6253 by implicit construction from rtx_insn *, and using
6254 dump_user_location_t::from_function_decl for the fallback case.
6255 * cfgloop.h (get_loop_location): Convert return type from
6256 location_t to dump_user_location_t.
6257 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
6258 dump_printf_loc to pass in a dump_location_t rather than a
6259 location_t, via the gimple stmt.
6260 * coverage.c (get_coverage_counts): Update calls to
6261 dump_printf_loc to pass in dump_location_t rather than a
6263 * doc/optinfo.texi (Dump types): Convert example of
6264 dump_printf_loc from taking "locus" to taking "insn". Update
6265 description of the "_loc" calls to cover dump_location_t.
6266 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
6268 (dump_user_location_t::dump_user_location_t): New constructors,
6269 from gimple *stmt and rtx_insn *.
6270 (dump_user_location_t::from_function_decl): New function.
6271 (dump_loc): Make static.
6272 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
6273 const dump_location_t &.
6274 (dump_generic_expr_loc): Delete.
6275 (dump_printf_loc): Convert param "loc" from location_t to
6276 const dump_location_t &.
6277 (selftest::test_impl_location): New function.
6278 (selftest::dumpfile_c_tests): New function.
6279 * dumpfile.h: Include "profile-count.h".
6280 (class dump_user_location_t): New class.
6281 (struct dump_impl_location_t): New struct.
6282 (class dump_location_t): New class.
6283 (dump_printf_loc): Convert 2nd param from source_location to
6284 const dump_location_t &.
6285 (dump_generic_expr_loc): Delete.
6286 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
6287 const dump_location_t &.
6288 * gimple-fold.c (fold_gimple_assign): Update call to
6289 dump_printf_loc to pass in a dump_location_t rather than a
6290 location_t, via the gimple stmt.
6291 (gimple_fold_call): Likewise.
6292 * gimple-loop-interchange.cc
6293 (loop_cand::analyze_iloop_reduction_var): Update for change to
6294 check_reduction_path.
6295 (tree_loop_interchange::interchange): Update for change to
6297 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
6298 change in return-type of find_loop_location.
6299 (graphite_regenerate_ast_isl): Likewise.
6300 * graphite-optimize-isl.c (optimize_isl): Likewise.
6301 * graphite.c (graphite_transform_loops): Likewise.
6302 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
6303 pass in a dump_location_t rather than a location_t, via the
6305 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6306 * ipa.c (walk_polymorphic_call_targets): Likewise.
6307 * loop-unroll.c (report_unroll): Convert "locus" param from
6308 location_t to dump_location_t.
6309 (decide_unrolling): Update for change to get_loop_location's
6311 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
6312 location_t to dump_user_location_t.
6313 (grid_find_single_omp_among_assignments_1): Updates calls to
6314 dump_printf_loc to pass in a dump_location_t rather than a
6315 location_t, via the gimple stmt.
6316 (grid_parallel_clauses_gridifiable): Convert "tloc" from
6317 location_t to dump_location_t. Updates calls to dump_printf_loc
6318 to pass in a dump_location_t rather than a location_t, via the
6320 (grid_inner_loop_gridifiable_p): Likewise.
6321 (grid_dist_follows_simple_pattern): Likewise.
6322 (grid_gfor_follows_tiling_pattern): Likewise.
6323 (grid_target_follows_gridifiable_pattern): Likewise.
6324 (grid_attempt_target_gridification): Convert initialization
6325 of local "grid" from memset to zero-initialization; FIXME: does
6326 this require C++11? Update call to dump_printf_loc to pass in a
6327 optinfo_location rather than a location_t, via the gimple stmt.
6328 * profile.c (read_profile_edge_counts): Updates call to
6329 dump_printf_loc to pass in a dump_location_t rather than a
6331 (compute_branch_probabilities): Likewise.
6332 * selftest-run-tests.c (selftest::run_tests): Call
6334 * selftest.h (dumpfile_c_tests): New decl.
6335 * tree-loop-distribution.c (pass_loop_distribution::execute):
6336 Update for change in return type of find_loop_location.
6337 * tree-parloops.c (parallelize_loops): Likewise.
6338 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
6339 "locus" from location_t to dump_user_location_t.
6340 (canonicalize_loop_induction_variables): Likewise.
6341 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
6342 for change in return type of find_loop_location.
6343 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
6344 to dump_printf_loc to pass in a dump_location_t rather than a
6345 location_t, via the stmt.
6346 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
6348 * tree-vect-loop-manip.c (find_loop_location): Convert return
6349 type from source_location to dump_user_location_t.
6350 (vect_do_peeling): Update for above change.
6351 (vect_loop_versioning): Update for change in type of
6353 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
6354 from location_t to dump_user_location_t.
6355 (vect_estimate_min_profitable_iters): Update for change in type
6357 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
6358 location_t to dump_location_t.
6359 (vect_slp_bb): Update for change in type of vect_location.
6360 * tree-vectorizer.c (vect_location): Convert from source_location
6361 to dump_user_location_t.
6362 (try_vectorize_loop_1): Update for change in vect_location's type.
6363 (vectorize_loops): Likewise.
6364 (increase_alignment): Likewise.
6365 * tree-vectorizer.h (vect_location): Convert from source_location
6366 to dump_user_location_t.
6367 (find_loop_location): Convert return type from source_location to
6368 dump_user_location_t.
6369 (check_reduction_path): Convert 1st param from location_t to
6370 dump_user_location_t.
6371 * value-prof.c (check_counter): Update call to dump_printf_loc to
6372 pass in a dump_user_location_t rather than a location_t; update
6373 call to error_at for change in type of "locus".
6374 (check_ic_target): Update call to dump_printf_loc to
6375 pass in a dump_user_location_t rather than a location_t, via the
6378 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
6380 * config/s390/s390.h (enum processor_flags): Do not use
6381 default tune parameter when -march was specified.
6383 2018-06-26 Jakub Jelinek <jakub@redhat.com>
6386 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
6387 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
6390 2018-06-26 Richard Biener <rguenther@suse.de>
6392 PR tree-optimization/86287
6394 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
6395 (vect_analyze_loop): Initialize n_stmts.
6397 2018-06-26 Richard Biener <rguenther@suse.de>
6400 * fold-const.c (fold_convertible_p): Pointer extension
6403 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
6406 * dwarf2out.c (loc_list_has_views): Adjust comments.
6407 (dw_loc_list): Split single cross-partition range with
6410 2018-06-25 Jeff Law <law@redhat.com>
6412 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
6413 on -mbig-switch by default.
6415 * config/v850/predicates.md (const_float_1_operand): Fix match_code
6417 (const_float_0_operand): Remove unused predicate.
6418 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
6419 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
6420 (recipsf2): New expander. Original pattern now called
6422 (recipdf2, recipdf2_insn): Similarly.
6423 (rsqrtsf2, rsqrtsf2_insn): Similarly
6424 (rsqrtdf2, rsqrtdf2_insn): Similarly
6426 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
6428 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
6429 Simplify logic for FreeBSD (twice).
6431 2018-06-25 Martin Sebor <msebor@redhat.com>
6433 PR tree-optimization/86204
6434 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
6435 a strnlen result if it's less than the length of the string.
6437 2018-06-25 Martin Sebor <msebor@redhat.com>
6439 PR tree-optimization/85700
6440 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
6441 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
6442 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
6444 2018-06-25 Martin Sebor <msebor@redhat.com>
6446 * doc/extend.texi (Zero-length arrays): Update and clarify.
6448 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
6450 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
6451 added IEEE/IBM long double multilib support on PowerPC little
6452 endian Linux systems.
6453 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
6454 (MULTILIB_DEFAULTS): Likewise.
6455 * config/rs6000/rs6000.c (rs6000_option_override_internal):
6457 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
6458 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
6459 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
6461 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
6464 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
6465 (REORDER_45): Likewise.
6467 2018-06-25 Jeff Law <law@redhat.com>
6469 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
6470 dividend to 32 bits. Adjust length.
6471 (udivmodhi4): Cleanup output template. Fix length.
6473 2018-06-25 Carl Love <cel@us.ibm.com>
6475 * config/rs6000/vsx.md: Change word selector to prefered location.
6477 2018-06-25 Richard Biener <rguenther@suse.de>
6479 PR tree-optimization/86304
6480 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
6481 epilogue-if-converted loops as well.
6483 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
6485 * lto-section-out.c (lto_begin_section): Do not print section
6486 name for noaddr and unnumbered dumps.
6488 2018-06-25 Richard Biener <rguenther@suse.de>
6490 * tree-vectorizer.h (struct vec_info_shared): New structure
6491 with parts split out from struct vec_info and loop_nest from
6492 struct _loop_vec_info.
6493 (struct vec_info): Adjust accordingly.
6494 (struct _loop_vec_info): Likewise.
6495 (LOOP_VINFO_LOOP_NEST): Adjust.
6496 (LOOP_VINFO_DATAREFS): Likewise.
6497 (LOOP_VINFO_DDRS): Likewise.
6498 (struct _bb_vec_info): Likewise.
6499 (BB_VINFO_DATAREFS): Likewise.
6500 (BB_VINFO_DDRS): Likewise.
6501 (struct _stmt_vec_info): Add dr_aux member.
6502 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
6503 (DR_MISALIGNMENT_UNINITIALIZED): New.
6504 (set_dr_misalignment): Adjust.
6505 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
6506 (vect_analyze_loop): Adjust prototype.
6507 (vect_analyze_loop_form): Likewise.
6508 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
6509 Compute dependences lazily.
6510 (vect_record_base_alignments): Use shared datarefs/ddrs.
6511 (vect_verify_datarefs_alignment): Likewise.
6512 (vect_analyze_data_refs_alignment): Likewise.
6513 (vect_analyze_data_ref_accesses): Likewise.
6514 (vect_analyze_data_refs): Likewise.
6515 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
6516 constructor parameter for shared part.
6517 (vect_analyze_loop_form): Pass in shared part and adjust.
6518 (vect_analyze_loop_2): Pass in storage for the number of
6519 stmts. Move loop nest finding to the caller. Compute
6521 (vect_analyze_loop): Pass in shared part.
6522 (vect_transform_loop): Verify shared datarefs are unchanged.
6523 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
6524 constructor parameter for shared part.
6525 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
6526 (vect_slp_bb): Verify shared datarefs are unchanged before
6528 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
6530 (new_stmt_vec_info): Initialize DR_AUX misalignment to
6531 DR_MISALIGNMENT_UNINITIALIZED.
6532 * tree-vectorizer.c (vec_info::vec_info): Add constructor
6533 parameter for shared part.
6534 (vec_info::~vec_info): Adjust.
6535 (vec_info_shared::vec_info_shared): New.
6536 (vec_info_shared::~vec_info_shared): Likewise.
6537 (vec_info_shared::save_datarefs): Likewise.
6538 (vec_info_shared::check_datarefs): Likewise.
6539 (try_vectorize_loop_1): Construct shared part live for analyses
6540 of a single loop for multiple vector sizes.
6541 * tree-parloops.c (gather_scalar_reductions): Adjust.
6543 2018-06-25 Richard Biener <rguenther@suse.de>
6545 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
6546 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
6547 (vect_analyze_data_refs): Remove similar code from here and
6548 simplify accordingly.
6550 2018-06-25 Richard Biener <rguenther@suse.de>
6552 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
6553 for reverse storage order accesses rather than asserting
6554 they cannot happen here.
6556 2018-06-25 Tom de Vries <tdevries@suse.de>
6559 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
6560 Use data16 instead of .byte for insn prefix.
6562 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
6565 * parser.c (make_char_string_pack): Pass this literal chars
6566 through cpp_interpret_string.
6567 (cp_parser_userdef_numeric_literal): Check the result of
6568 make_char_string_pack.
6570 2018-06-24 Maya Rashish <coypu@sdf.org>
6572 * ginclude/stddef.h: Simplify conditions around avoiding
6573 re-definition of __size_t.
6575 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
6577 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
6578 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
6580 2018-06-22 Maya Rashish <coypu@sdf.org>
6582 * doc/invoke.texi (mno-fancy-math-387): Update for changes
6583 made to OpenBSD and NetBSD through the years.
6585 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
6587 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
6588 behavior of vec_pack (vector double, vector double) to match
6589 behavior of vec_float2 (vector double, vector double).
6591 2018-06-22 Olivier Hainque <hainque@adacore.com>
6593 * gimplify.c (gimplify_function_tree): Prevent creation
6594 of a trampoline for the address of the current function
6595 passed to entry/exit instrumentation hooks.
6597 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
6600 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
6603 2018-06-22 Martin Liska <mliska@suse.cz>
6605 PR tree-optimization/86263
6606 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6607 Bail out if is_enabled is false.
6608 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
6610 (jump_table_cluster::is_enabled): New function.
6612 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
6614 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
6615 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
6616 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
6617 (lto_input_ts_binfo_tree_pointers): Likewise.
6618 * tree-streamer-out.c (streamer_write_tree_bitfields,
6619 write_ts_binfo_tree_pointers): Likewise.
6620 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
6622 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
6624 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
6626 2018-06-22 Martin Liska <mliska@suse.cz>
6628 * symbol-summary.h (get): Make it pure and inline move
6629 functionality from ::get function.
6630 (get): Remove and inline into ::get and ::get_create.
6631 (get_create): Move code from ::get function.
6633 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6636 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
6637 -x assembler-with-cpp.
6639 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6641 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
6642 _FILE_OFFSET_BITS=64 for C++.
6644 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
6646 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
6647 conversion insn that shows up when pr85657-3.c is compiled using
6648 IEEE 128-bit long double.
6649 (neg<mode>2_internal): Use the correct mode to check whether the
6650 mode is IBM extended.
6651 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
6652 multiply and divide external functions from being created more
6655 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6657 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
6659 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
6660 the edge can be forwarded.
6661 (cfg_layout_merge_blocks): Likewise.
6663 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6665 * except.c (finish_eh_generation): Commit edge insertions only after
6666 the EH edges have been redirected from post-landing to landing pads.
6668 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6670 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
6671 create_tmp_var_for to create the FRAME decl.
6672 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
6674 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6676 * tree-inline.c (copy_edges_for_bb): Minor tweak.
6677 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
6678 debug statement when resetting its value.
6679 (expand_call_inline): Copy the locus of the call onto the assignment
6680 of the return value, if any. Use local variable in more cases.
6682 2018-06-21 Martin Liska <mliska@suse.cz>
6684 * ipa-pure-const.c (propagate_nothrow): Use
6685 funct_state_summaries->get.
6686 (dump_malloc_lattice): Likewise.
6687 (propagate_malloc): Likewise.
6689 2018-06-21 Richard Biener <rguenther@suse.de>
6691 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
6692 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
6693 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
6695 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
6696 BLOCK_ABSTRACT_ORIGIN unconditionally.
6698 2018-06-21 David Malcolm <dmalcolm@redhat.com>
6700 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
6702 * ipa-reference.c (ipa_reference_c_finalize): Delete
6703 ipa_ref_opt_sum_summaries and set it to NULL.
6705 2018-06-21 Tom de Vries <tdevries@suse.de>
6707 PR tree-optimization/85859
6708 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
6709 test with comment from bb_no_side_effects_p.
6711 2018-06-21 Richard Biener <rguenther@suse.de>
6713 PR tree-optimization/86232
6714 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
6715 max for constant niter.
6717 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
6719 * config/aarch64/aarch64-simd.md
6720 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
6722 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
6724 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
6725 Make opernads of the unspec commutative.
6727 2018-06-21 Richard Biener <rguenther@suse.de>
6729 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
6730 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
6731 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
6732 (vect_analyze_data_ref_dependence): Re-order checks to deal with
6734 (vect_record_base_alignments): Do not record base alignment
6735 for gathers or scatters.
6736 (vect_compute_data_ref_alignment): Drop return value that is always
6737 true. Bail out early for gathers or scatters.
6738 (vect_enhance_data_refs_alignment): Bail out early for gathers
6740 (vect_find_same_alignment_drs): Likewise.
6741 (vect_analyze_data_refs_alignment): Remove dead code.
6742 (vect_slp_analyze_and_verify_node_alignment): Likewise.
6743 (vect_analyze_data_refs): For possible gathers or scatters do
6744 not create an alternate DR, just check their possible validity
6745 and mark them. Adjust DECL_NONALIASED handling to not rely
6747 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
6748 update inits of gathers or scatters.
6749 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
6750 Also copy gather/scatter flag to pattern vinfo.
6752 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
6754 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
6755 behavior of vec_packsu (vector unsigned long long, vector unsigned
6756 long long) to match behavior of vec_packs with same signature.
6758 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
6759 Thomas Schwinge <thomas@codesourcery.com>
6760 Cesar Philippidis <cesar@codesourcery.com>
6762 * gimplify.c (gimplify_scan_omp_clauses): Add support for
6763 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
6764 (gimplify_adjust_omp_clauses): Likewise.
6765 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
6766 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
6767 (gimplify_omp_target_update): Update handling of acc update and
6769 * omp-low.c (install_var_field): Remove unused parameter
6770 base_pointers_restrict.
6771 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
6772 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
6774 (omp_target_base_pointers_restrict_p): Delete.
6775 (scan_omp_target): Update call to scan_sharing_clauses.
6776 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
6778 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
6779 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
6780 (convert_local_omp_clauses): Likewise.
6781 * tree-pretty-print.c (dump_omp_clause): Likewise.
6782 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
6784 (omp_clause_code_name): Likewise.
6786 2018-06-20 Jakub Jelinek <jakub@redhat.com>
6789 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
6792 PR tree-optimization/86231
6793 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
6794 anti-range don't overwrite *vr0min before using it to compute *vr0max.
6796 2018-06-20 Tom de Vries <tdevries@suse.de>
6798 PR tree-optimization/86097
6799 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
6800 iv type if signedness of iv type is not the same as that of *nit.
6802 2018-06-20 Jakub Jelinek <jakub@redhat.com>
6804 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
6805 EDGE_EH edges, verify they are all EDGE_EH.
6807 2018-06-20 Maya Rashish <coypu@sdf.org>
6809 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
6811 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6813 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
6814 * config/aarch64/aarch64.c (xgene1_tunings): Add
6815 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
6816 (aarch64_mode_valid_for_sched_fusion_p):
6817 Allow 16-byte modes.
6818 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
6819 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
6821 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
6823 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
6824 * config/aarch64/iterators.md (VQ2): New mode iterator.
6826 2018-06-20 Martin Liska <mliska@suse.cz>
6828 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
6829 Change default ratio from 10 to 8.
6831 2018-06-20 Martin Liska <mliska@suse.cz>
6833 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6835 (bit_test_cluster::find_bit_tests): Likewise.
6836 (switch_decision_tree::analyze_switch_statement): Find clusters.
6837 * tree-switch-conversion.h (struct jump_table_cluster): Document
6840 2018-06-20 Martin Liska <mliska@suse.cz>
6842 * tree-switch-conversion.c (switch_conversion::collect):
6843 Record m_uniq property.
6844 (switch_conversion::expand): Bail out for special conditions.
6845 (group_cluster::~group_cluster): New.
6846 (group_cluster::group_cluster): Likewise.
6847 (group_cluster::dump): Likewise.
6848 (jump_table_cluster::emit): New.
6849 (switch_decision_tree::fix_phi_operands_for_edges): New.
6850 (struct case_node): Remove struct.
6851 (jump_table_cluster::can_be_handled): New.
6852 (case_values_threshold): Moved to header.
6853 (reset_out_edges_aux): Likewise.
6854 (jump_table_cluster::is_beneficial): New.
6855 (bit_test_cluster::can_be_handled): Likewise.
6856 (add_case_node): Remove.
6857 (bit_test_cluster::is_beneficial): New.
6858 (case_bit_test::cmp): New.
6859 (bit_test_cluster::emit): New.
6860 (expand_switch_as_decision_tree_p): Remove.
6861 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
6862 (fix_phi_operands_for_edge): Likewise.
6863 (switch_decision_tree::analyze_switch_statement): New.
6864 (compute_cases_per_edge): Move ...
6865 (switch_decision_tree::compute_cases_per_edge): ... here.
6866 (try_switch_expansion): Likewise.
6867 (switch_decision_tree::try_switch_expansion): Likewise.
6868 (record_phi_operand_mapping): Likewise.
6869 (switch_decision_tree::record_phi_operand_mapping): Likewise.
6870 (emit_case_decision_tree): Likewise.
6871 (switch_decision_tree::emit): Likewise.
6872 (balance_case_nodes): Likewise.
6873 (switch_decision_tree::balance_case_nodes): Likewise.
6874 (dump_case_nodes): Likewise.
6875 (switch_decision_tree::dump_case_nodes): Likewise.
6876 (emit_jump): Likewise.
6877 (switch_decision_tree::emit_jump): Likewise.
6878 (emit_cmp_and_jump_insns): Likewise.
6879 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
6880 (emit_case_nodes): Likewise.
6881 (switch_decision_tree::emit_case_nodes): Likewise.
6882 (conditional_probability): Remove.
6883 * tree-switch-conversion.h (enum cluster_type): New.
6885 (struct cluster): Likewise.
6886 (cluster::cluster): Likewise.
6887 (struct simple_cluster): Likewise.
6888 (simple_cluster::simple_cluster): Likewise.
6889 (struct group_cluster): Likewise.
6890 (struct jump_table_cluster): Likewise.
6891 (struct bit_test_cluster): Likewise.
6892 (struct min_cluster_item): Likewise.
6893 (struct case_tree_node): Likewise.
6894 (case_tree_node::case_tree_node): Likewise.
6895 (jump_table_cluster::case_values_threshold): Likewise.
6896 (struct case_bit_test): Likewise.
6897 (struct switch_decision_tree): Likewise.
6898 (struct switch_conversion): Likewise.
6899 (switch_decision_tree::reset_out_edges_aux): Likewise.
6901 2018-06-20 Martin Liska <mliska@suse.cz>
6903 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
6904 (hoist_edge_and_branch_if_true): Likewise.
6905 (expand_switch_using_bit_tests_p): Likewise.
6906 (struct case_bit_test): Likewise.
6907 (case_bit_test_cmp): Likewise.
6908 (emit_case_bit_tests): Likewise.
6909 (switch_conversion::switch_conversion): New class.
6910 (struct switch_conv_info): Remove old struct.
6911 (collect_switch_conv_info): More to ...
6912 (switch_conversion::collect): ... this.
6913 (check_range): Likewise.
6914 (switch_conversion::check_range): Likewise.
6915 (check_all_empty_except_final): Likewise.
6916 (switch_conversion::check_all_empty_except_final): Likewise.
6917 (check_final_bb): Likewise.
6918 (switch_conversion::check_final_bb): Likewise.
6919 (create_temp_arrays): Likewise.
6920 (switch_conversion::create_temp_arrays): Likewise.
6921 (free_temp_arrays): Likewise.
6922 (gather_default_values): Likewise.
6923 (switch_conversion::gather_default_values): Likewise.
6924 (build_constructors): Likewise.
6925 (switch_conversion::build_constructors): Likewise.
6926 (constructor_contains_same_values_p): Likewise.
6927 (switch_conversion::contains_same_values_p): Likewise.
6928 (array_value_type): Likewise.
6929 (switch_conversion::array_value_type): Likewise.
6930 (build_one_array): Likewise.
6931 (switch_conversion::build_one_array): Likewise.
6932 (build_arrays): Likewise.
6933 (switch_conversion::build_arrays): Likewise.
6934 (gen_def_assigns): Likewise.
6935 (switch_conversion::gen_def_assigns): Likewise.
6936 (prune_bbs): Likewise.
6937 (switch_conversion::prune_bbs): Likewise.
6938 (fix_phi_nodes): Likewise.
6939 (switch_conversion::fix_phi_nodes): Likewise.
6940 (gen_inbound_check): Likewise.
6941 (switch_conversion::gen_inbound_check): Likewise.
6942 (process_switch): Use the newly created class.
6943 (switch_conversion::expand): New.
6944 (switch_conversion::~switch_conversion): New.
6945 * tree-switch-conversion.h: New file.
6947 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6949 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
6950 tree-vect-patterns.c.
6951 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
6952 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
6953 (vect_recog_sad_pattern): Likewise.
6954 (vect_recog_widen_sum_pattern): Likewise.
6955 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
6956 (vect_recog_widen_shift_pattern): Remove the type_in argument.
6957 (vect_recog_rotate_pattern): Likewise.
6958 (vect_recog_mult_pattern): Likewise.
6959 (vect_recog_vector_vector_shift_pattern): Likewise.
6960 (vect_recog_divmod_pattern): Likewise.
6961 (vect_recog_mixed_size_cond_pattern): Likewise.
6962 (vect_recog_bool_pattern): Likewise.
6963 (vect_recog_mask_conversion_pattern): Likewise.
6964 (vect_try_gather_scatter_pattern): Likewise.
6965 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
6966 (vect_recog_over_widening_pattern): Likewise.
6967 (vect_recog_gather_scatter_pattern): Likewise.
6968 (vect_recog_func_ptr): Move from tree-vectorizer.h
6969 (vect_vect_recog_func_ptrs): Move further down the file.
6970 (vect_recog_func): Likewise. Remove the third argument.
6971 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
6972 (vect_pattern_recog_1): Expect the pattern function to do any
6973 necessary target tests. Also expect it to provide a vector type.
6974 Remove the type_in handling.
6976 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6978 * tree-vect-patterns.c (vect_pattern_detected): New function.
6979 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
6980 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
6981 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
6982 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
6983 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6984 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6985 (vect_recog_mask_conversion_pattern)
6986 (vect_try_gather_scatter_pattern): Likewise.
6988 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6990 * tree-vect-patterns.c (vect_get_internal_def): New function.
6991 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6992 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
6993 (search_type_for_mask_1): Use it.
6995 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6997 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
6998 redundant WIDEN_SUM_EXPR handling.
6999 (vect_recog_sad_pattern): Likewise.
7001 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7003 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
7004 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
7005 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
7006 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
7007 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
7009 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7011 * tree-vect-stmts.c (vectorizable_call): Make sure that we
7012 use the stmt_vec_info of the original bb statement for the
7013 new zero assignment, even if the call is part of a pattern.
7015 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7017 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
7018 that the sequence is attached to the original statement rather
7019 than the pattern statement.
7020 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
7021 PATTERN_DEF_SEQ from the original statement rather than
7022 the main pattern statement.
7023 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
7024 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
7025 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
7027 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7029 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
7030 definition statements before the early exit for statements that aren't
7032 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
7034 (vect_transform_loop): ...here. Process pattern definition
7035 statements without first checking whether the main pattern
7036 statement is live or relevant.
7038 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
7040 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
7041 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
7043 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
7045 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
7046 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
7047 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
7048 (expand_block_compare): Change select_block_compare_mode call.
7049 (expand_strncmp_align_check): Use new functions, fix comment.
7050 (emit_final_str_compare_gpr): New function.
7051 (expand_strn_compare): Refactor and clean up code.
7052 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
7054 2018-06-19 Tony Reix <tony.reix@atos.com>
7055 Damien Bergamini <damien.bergamini@atos.com>
7056 David Edelsohn <dje.gcc@gmail.com>
7058 * collect2.c (static_obj): New variable.
7059 (static_libs): New variable.
7060 (is_in_list): Uncomment declaration.
7061 (main): Track AIX libraries linked statically.
7062 (is_in_list): Uncomment definition.
7063 (scan_prog_file): Don't add AIX shared libraries initializer
7064 to constructor list if linking statically.
7066 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
7068 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
7070 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
7072 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
7074 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
7077 2018-06-19 Martin Liska <mliska@suse.cz>
7079 * config/i386/i386.c (ix86_can_inline_p): Do not use
7080 ipa_fn_summaries::get_create.
7081 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
7083 (devirtualization_time_bonus): Likewise.
7084 (ipcp_propagate_stage): Likewise.
7085 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
7086 (edge_set_predicate): Likewise.
7087 (evaluate_conditions_for_known_args): Likewise.
7088 (evaluate_properties_for_edge): Likewise.
7089 (ipa_call_summary::reset): Tranform to ...
7090 (ipa_call_summary::~ipa_call_summary): ... this.
7091 (ipa_fn_summary::reset): Transform to ...
7092 (ipa_fn_summary::~ipa_fn_summary): ... this.
7093 (ipa_fn_summary_t::remove): Rename to ...
7094 (ipa_fn_summary_t::remove_callees): ... this.
7095 (ipa_fn_summary_t::duplicate): Use placement new
7096 instead of memory copy.
7097 (ipa_call_summary_t::duplicate): Likewise.
7098 (ipa_call_summary_t::remove): Remove.
7099 (dump_ipa_call_summary): Change get_create to get.
7100 (ipa_dump_fn_summary): Dump only when summary exists.
7101 (analyze_function_body): Use symbol_summary::get instead
7103 (compute_fn_summary): Likewise.
7104 (estimate_edge_devirt_benefit): Likewise.
7105 (estimate_edge_size_and_time): Likewise.
7106 (inline_update_callee_summaries): Likewise.
7107 (remap_edge_change_prob): Likewise.
7108 (remap_edge_summaries): Likewise.
7109 (ipa_merge_fn_summary_after_inlining): Likewise.
7110 (write_ipa_call_summary): Likewise.
7111 (ipa_fn_summary_write): Likewise.
7112 (ipa_free_fn_summary): Likewise.
7113 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
7114 (struct ipa_call_summary): Likewise.
7115 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
7117 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
7118 (estimate_size_after_inlining): Likewise.
7119 (estimate_growth): Likewise.
7120 (growth_likely_positive): Likewise.
7121 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
7122 (inline_call): Likewise.
7123 * ipa-inline.c (caller_growth_limits): Likewise.
7124 (can_inline_edge_p): Likewise.
7125 (can_inline_edge_by_limits_p): Likewise.
7126 (compute_uninlined_call_time): Likewise.
7127 (compute_inlined_call_time): Likewise.
7128 (want_inline_small_function_p): Likewise.
7129 (edge_badness): Likewise.
7130 (update_caller_keys): Likewise.
7131 (update_callee_keys): Likewise.
7132 (inline_small_functions): Likewise.
7133 (inline_to_all_callers_1): Likewise.
7134 (dump_overall_stats): Likewise.
7135 (early_inline_small_functions): Likewise.
7136 (early_inliner): Likewise.
7137 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
7138 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7139 * ipa-pure-const.c (malloc_candidate_p): Likewise.
7140 * ipa-split.c (execute_split_functions): Likewise.
7141 * symbol-summary.h: Likewise.
7142 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
7144 2018-06-19 Richard Biener <rguenther@suse.de>
7146 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
7147 (vectorize_loops): ... here. Fix dbgcnt handling.
7148 (try_vectorize_loop): Wrap try_vectorize_loop_1.
7150 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
7153 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
7154 ieee128 argument takes up only one (vector) register, not two (floating
7157 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
7159 * gimplify.c (gimplify_init_constructor): Really never clear for an
7160 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
7162 2018-06-19 Richard Biener <rguenther@suse.de>
7164 PR tree-optimization/86179
7165 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
7166 after failed recognition.
7168 2018-06-18 Martin Sebor <msebor@redhat.com>
7171 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
7172 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
7173 Handle integer subtraction.
7174 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
7175 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
7177 2018-06-18 David Malcolm <dmalcolm@redhat.com>
7179 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
7180 param from rtx to rtx_insn *.
7181 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
7183 (frv_ifcvt_modify_insn): Likwise.
7184 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
7185 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
7186 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
7187 as_a <rtx_insn *> cast to local "unprotected_region" once
7188 it's been established that it's not NULL or pc_rtx.
7189 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
7190 param "sethi" from rtx to rtx_insn *.
7191 (nds32_group_float_insns): Likewise for param "insn".
7192 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
7194 (vax_output_int_subtract): Likewise.
7195 * config/vax/vax.c (vax_output_int_add): Likewise for param
7197 (vax_output_int_subtract): Likewise.
7198 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
7199 (emit_pattern_after): Likewise for param "after".
7200 (emit_insn_after): Likewise.
7201 (emit_jump_insn_after): Likewise.
7202 (emit_call_insn_after): Likewise.
7203 (emit_debug_insn_after): Likewise.
7204 (emit_pattern_before): Likewise for param "before".
7205 (emit_insn_before): Likewise.
7206 (emit_jump_insn_before): Likewise.
7207 * final.c (get_insn_template): Likewise for param "insn", removing
7209 * output.h (get_insn_template): Likewise for 2nd param.
7210 * rtl.h (emit_insn_before): Likewise.
7211 (emit_jump_insn_before): Likewise.
7212 (emit_debug_insn_before_noloc): Likewise.
7213 (emit_insn_after): Likewise.
7214 (emit_jump_insn_after): Likewise.
7215 (emit_call_insn_after): Likewise.
7216 (emit_debug_insn_after): Likewise.
7217 (set_insn_deleted): Likewise for param.
7219 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
7222 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
7223 floating point modes, so that IFmode is numerically greater than
7224 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
7225 to declare the ordering. This prevents IFmode from being
7226 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
7227 machine. Include rs6000-modes.h to share the fractional values
7228 between genmodes* and the rest of the compiler.
7232 * config/rs6000/rs6000-modes.h: New file.
7233 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
7234 meaning of rs6000_long_double_size so that 126..128 selects an
7235 appropriate 128-bit floating point type.
7236 (rs6000_option_override_internal): Likewise.
7237 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
7238 (TARGET_LONG_DOUBLE_128): Change the meaning of
7239 rs6000_long_double_size so that 126..128 selects an appropriate
7240 128-bit floating point type.
7241 (LONG_DOUBLE_TYPE_SIZE): Update comment.
7242 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
7243 source and destination to match the standard usage.
7244 (truncifkf2): Likewise.
7245 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
7246 ISA 2.07 to use an explicit clobber, instead of passing in a
7248 (copysign<mode>3_soft): Likewise.
7250 2018-06-18 David Malcolm <dmalcolm@redhat.com>
7252 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
7253 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
7254 (vect_slp_analyze_instance_dependence): Likewise.
7255 (vect_enhance_data_refs_alignment): Likewise.
7256 (vect_analyze_data_refs_alignment): Likewise.
7257 (vect_slp_analyze_and_verify_instance_alignment
7258 (vect_analyze_data_ref_accesses): Likewise.
7259 (vect_prune_runtime_alias_test_list): Likewise.
7260 (vect_analyze_data_refs): Likewise.
7261 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
7262 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
7263 (vect_analyze_scalar_cycles_1): Likewise.
7264 (vect_get_loop_niters): Likewise.
7265 (vect_analyze_loop_form_1): Likewise.
7266 (vect_update_vf_for_slp): Likewise.
7267 (vect_analyze_loop_operations): Likewise.
7268 (vect_analyze_loop): Likewise.
7269 (vectorizable_induction): Likewise.
7270 (vect_transform_loop): Likewise.
7271 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
7272 * tree-vect-slp.c (vect_analyze_slp): Likewise.
7273 (vect_make_slp_decision): Likewise.
7274 (vect_detect_hybrid_slp): Likewise.
7275 (vect_slp_analyze_operations): Likewise.
7276 (vect_slp_bb): Likewise.
7277 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
7278 (vectorizable_bswap): Likewise.
7279 (vectorizable_call): Likewise.
7280 (vectorizable_simd_clone_call): Likewise.
7281 (vectorizable_conversion): Likewise.
7282 (vectorizable_assignment): Likewise.
7283 (vectorizable_shift): Likewise.
7284 (vectorizable_operation): Likewise.
7285 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
7287 2018-06-18 Martin Sebor <msebor@redhat.com>
7289 PR tree-optimization/81384
7290 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
7291 * builtins.c (expand_builtin_strnlen): New function.
7292 (expand_builtin): Call it.
7293 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
7294 * builtins.def (BUILT_IN_STRNLEN): New.
7295 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
7296 Warn for bounds in excess of maximum object size.
7297 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
7298 single-value ranges. Handle strnlen.
7299 (handle_builtin_strlen): Handle strnlen.
7300 (strlen_check_and_optimize_stmt): Same.
7301 * doc/extend.texi (Other Builtins): Document strnlen.
7303 2018-06-18 Maya Rashish <coypu@sdf.org>
7305 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
7306 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
7307 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
7309 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
7311 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
7313 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7315 * tree.c (escaped_string::escape): Replace cast to char * by
7316 const_cast<char *> (unescaped).
7318 2018-06-18 Nick Clifton <nickc@redhat.com>
7321 * tree.c (escaped_string): New class. Converts an unescaped
7322 string into its escaped equivalent.
7323 (warn_deprecated_use): Use the new class to convert the
7324 deprecation message, if present.
7325 (test_escaped_strings): New self test.
7326 (test_c_tests): Add test_escaped_strings.
7327 * doc/extend.texi (deprecated): Add a note that the
7328 deprecation message is affected by the -fmessage-length
7329 option, and that control characters will be escaped.
7330 (#pragma GCC error): Document this pragma.
7331 (#pragma GCC warning): Likewise.
7332 * doc/invoke.texi (-fmessage-length): Document this option's
7333 effect on the #warning and #error preprocessor directives and
7334 the deprecated attribute.
7336 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
7338 * tree.c (decl_value_expr_lookup): Revert latest change.
7339 (decl_value_expr_insert): Likewise.
7341 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
7343 * gimplify.c (nonlocal_vlas): Delete.
7344 (nonlocal_vla_vars): Likewise.
7345 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
7347 (gimplify_body): Do not create and destroy nonlocal_vlas.
7348 * tree-nested.c: Include diagnostic.h.
7349 (use_pointer_in_frame): Tweak.
7350 (lookup_field_for_decl): Add assertion and declare the transformation.
7351 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
7352 internal error when the reference is in a wrong context. Do not
7353 create a debug decl by default.
7354 (note_nonlocal_block_vlas): Delete.
7355 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
7356 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
7357 create a debug decl by default.
7358 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
7359 call is in a wrong context.
7360 (fixup_vla_decls): New function.
7361 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
7362 debug variables were created.
7363 * tree.c (decl_value_expr_lookup): Add checking assertion.
7364 (decl_value_expr_insert): Likewise.
7366 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
7369 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
7370 * tree-scalar-evolution.c (interpret_expr): Likewise.
7371 (expression_expensive_p): Likewise.
7372 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
7373 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
7374 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
7375 (ssa_defined_by_minus_one_stmt_p): New.
7377 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
7380 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
7381 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
7382 * dojump.c (do_jump): Likewise.
7383 * expr.c (expand_expr_real_2): Check operand type's sign.
7384 * fold-const.c (const_unop): Handle ABSU_EXPR.
7385 (fold_abs_const): Likewise.
7386 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
7387 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
7388 (strip_sign_op_1): Likesise.
7389 * match.pd: Add new pattern to generate ABSU_EXPR.
7390 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
7391 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
7392 * tree-eh.c (operation_could_trap_helper_p): Likewise.
7393 * tree-inline.c (estimate_operator_cost): Likewise.
7394 * tree-pretty-print.c (dump_generic_node): Likewise.
7395 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
7396 * tree.def (ABSU_EXPR): New.
7398 2018-06-16 Jakub Jelinek <jakub@redhat.com>
7401 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
7402 documented as preserved for backward compatibility only.
7403 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
7405 PR rtl-optimization/86108
7406 * bb-reorder.c (create_forwarder_block): Renamed to ...
7407 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
7408 jump from new landing pad to the second part.
7409 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
7412 2018-06-15 Jakub Jelinek <jakub@redhat.com>
7415 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
7416 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
7417 Only call store_expr for halves if the mode is the same.
7420 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
7421 Fix up comment formatting.
7423 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
7425 * typed-splay-tree.h (typed_splay_tree::remove): New function.
7426 (typed_splay_tree::closure,
7427 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
7428 (typed_splay_tree::typed_splay_tree,
7429 typed_splay_tree::operator =): Declared private.
7430 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
7431 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
7432 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
7433 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
7434 typed_splay_tree::splay_tree_splay,
7435 typed_splay_tree::splay_tree_foreach_helper,
7436 typed_splay_tree::splay_tree_insert,
7437 typed_splay_tree::splay_tree_remove,
7438 typed_splay_tree::splay_tree_lookup,
7439 typed_splay_tree::splay_tree_predecessor,
7440 typed_splay_tree::splay_tree_successor,
7441 typed_splay_tree::splay_tree_min,
7442 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
7443 (typed_splay_tree::root, typed_splay_tree::comp,
7444 typed_splay_tree::delete_key,
7445 typed_splay_tree::delete_value): New data members.
7446 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
7447 typed_splay_tree::remove.
7449 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
7451 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
7452 -mginv and -mno-ginv to the assembler.
7453 * config/mips/mips.opt (-mcrc): New option.
7455 * doc/invoke.text (-mcrc): Document.
7458 2018-06-15 Nick Clifton <nickc@redhat.com>
7461 * tree.c (escaped_string): New class. Converts an unescaped
7462 string into its escaped equivalent.
7463 (warn_deprecated_use): Use the new class to convert the
7464 deprecation message, if present.
7465 (test_escaped_strings): New self test.
7466 (test_c_tests): Add test_escaped_strings.
7467 * doc/extend.texi (deprecated): Add a note that the
7468 deprecation message is affected by the -fmessage-length
7469 option, and that control characters will be escaped.
7470 (#pragma GCC error): Document this pragma.
7471 (#pragma GCC warning): Likewise.
7472 * doc/invoke.texi (-fmessage-length): Document this option's
7473 effect on the #warning and #error preprocessor directives and
7474 the deprecated attribute.
7476 2018-06-15 Richard Biener <rguenther@suse.de>
7478 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
7479 here, also noting vector size used.
7480 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
7481 size used in MSG_OPTIMIZED_LOCATIONS dump.
7482 (pass_slp_vectorize::execute): Adjust.
7484 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
7487 * config/arc/arc.c (arc_return_address_register): Fix
7490 2018-06-15 Richard Biener <rguenther@suse.de>
7493 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
7494 leave useless conversion stripping to force_gimple_operand_gsi.
7495 (gimplify_build2): Likewise.
7496 (gimplify_build1): Likewise.
7498 2018-06-15 Richard Biener <rguenther@suse.de>
7501 * tree-cfg.c (move_stmt_op): unshare invariant addresses
7502 before adjusting their block.
7504 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
7506 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
7507 multilibs for *-*-rtems*.
7508 * config/riscv/t-rtems: New file.
7510 2018-06-14 Jakub Jelinek <jakub@redhat.com>
7513 * match.pd ((A +- CST1) +- CST2): Punt if last resort
7514 unsigned_type_for returns NULL.
7517 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
7518 subregs of multi-word pseudos unless the float mode has word size.
7520 2018-06-14 Richard Biener <rguenther@suse.de>
7523 * tree-vect-generic.c (build_word_mode_vector_type): Remove
7524 duplicate and harmful type_hash_canon.
7525 * tree.c (type_hash_canon): Assert we didn't find ourselves.
7527 2018-06-14 Richard Biener <rguenther@suse.de>
7530 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
7533 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
7535 * config/rtems.h (STDINT_LONG32): Define.
7537 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
7538 Prachi Godbole <prachi.godbole@imgtec.com>
7540 * config/mips/mips-cpus.def: Define P6600.
7541 * config/mips/mips-tables.opt: Regenerate.
7542 * config/mips/mips.c (mips_ucbranch_type): New enum.
7543 (mips_rtx_cost_data): Add support for P6600.
7544 (mips_issue_rate): Likewise.
7545 (mips_multipass_dfa_lookahead): Likewise.
7546 (mips_avoid_hazard): Likewise.
7547 (mips_reorg_process_insns): Likewise.
7548 (mips_classify_branch_p6600): New function.
7549 * config/mips/mips.h (TUNE_P6600): New define.
7550 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
7551 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
7552 * config/mips/mips.md: Include p6600.md.
7553 (processor): Add p6600.
7554 * config/mips/p6600.md: New file.
7555 * doc/invoke.texi: Add p6600 to supported architectures.
7557 2018-06-13 Martin Sebor <msebor@redhat.com>
7559 PR tree-optimization/86114
7560 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
7562 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
7564 2018-06-13 Richard Biener <rguenther@suse.de>
7566 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
7567 Properly set vector type of the intermediate stmt.
7568 * tree-vect-stmts.c (vectorizable_operation): The destination
7569 var always has vectype_out type.
7571 2018-06-13 Jeff Law <law@redhat.com>
7573 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
7574 integer 0 for argument to print_rtl_with_bb.
7575 (rl78_reorg): Likewise.
7577 2018-06-13 David Malcolm <dmalcolm@redhat.com>
7579 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
7580 from rtx to rtx_insn *.
7581 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
7583 (add_sched_insns_for_speculation): Likewise for local "target",
7584 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
7585 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
7586 from rtx_insn ** to rtx_code_label **.
7587 (reorg_emit_nops): Likewise.
7588 (c6x_reorg): Likewise for local "call_labels".
7589 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
7591 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
7592 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
7593 the loops over LABEL_REFS.
7594 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
7596 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
7597 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
7598 (split_branches): Strengthen local "olabel" from rtx to
7599 rtx_insn *, adding a safe_as_a cast.
7600 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
7602 (add_insn_after): Likewise for first two params.
7603 (add_insn_before): Likewise.
7604 (remove_insn): Likewise for param.
7605 (emit_pattern_before_noloc): Likewise for second and third params.
7606 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
7607 (emit_call_insn_before_noloc): Likewise.
7608 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
7610 (emit_barrier_before): Likewise.
7611 (emit_label_before): Strengthen "label" param from "rtx" to
7612 "rtx_code_label *". Strengthen "before" param from "rtx" to
7614 (emit_insn_after_1): Strengthen "after" param from "rtx" to
7616 (emit_pattern_after_noloc): Likewise.
7617 (emit_insn_after_noloc): Likewise.
7618 (emit_jump_insn_after_noloc): Likewise.
7619 (emit_call_insn_after_noloc): Likewise.
7620 (emit_debug_insn_after_noloc): Likewise.
7621 (emit_barrier_after): Likewise.
7622 (emit_label_after): Likewise for both params.
7623 (emit_pattern_after_setloc): Likewise for "after" param. Convert
7624 "loc" param from "int" to "location_t".
7625 (emit_insn_after_setloc): Likewise.
7626 (emit_jump_insn_after_setloc): Likewise.
7627 (emit_call_insn_after_setloc): Likewise.
7628 (emit_debug_insn_after_setloc): Likewise.
7629 (emit_pattern_before_setloc): Likewise for "before" param. Convert
7630 "loc" param from "int" to "location_t".
7631 (emit_pattern_before): Convert NULL_RTX to NULL.
7632 (emit_insn_before_setloc): Convert "loc" param from "int" to
7634 (emit_jump_insn_before_setloc): Likewise.
7635 (emit_call_insn_before_setloc): Likewise.
7636 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
7637 rtx_insn *. Convert "loc" param from "int" to "location_t".
7638 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
7639 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
7640 Convert 3rd param from "int" to "location_t".
7641 (emit_barrier_before, emit_barrier_after, next_real_insn):
7642 Strengthen param from rtx to rtx_insn *.
7643 (emit_label_before): Strengthen 1st param from "rtx" to
7644 "rtx_code_label *". Strengthen 2nd param from "rtx" to
7646 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
7647 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
7648 Strengthen 2nd param from "rtx" to "rtx_insn *".
7649 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
7650 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
7651 Likewise. Convert 3rd param from "int" to "location_t".
7652 (emit_label_after): Strengthen 1st param from "rtx" to
7654 (next_real_insn, remove_insn): Strengthen param from "rtx" to
7656 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
7657 from "rtx" to "rtx_insn *".
7659 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
7661 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
7662 bodies streamed in with -Q.
7663 * dumpfile.c (dump_files): Add lto-stream-out dump file.
7664 * dumpfile.h (tree_dump_index): Add lto_stream_out.
7665 * gimple-streamer-out.c: Include gimple-pretty-print.h
7666 (output_bb): Dump stmts streamed.
7667 * lto-section-out.c: Include print-tree.h
7668 (lto_begin_section): Dump sections created.
7669 (lto_output_decl_index): Dump decl encoded.
7670 * lto-streamer-out.c: Include print-tree.h
7671 (create_output_block): Dump output block created.
7672 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
7673 (output_function): Dump function output.
7674 (output_constructor): Dump constructor streamed.
7675 (write_global_stream): Output indexes encoded.
7676 (produce_asm_for_decls): Dump streams encoded.
7677 * lto-streamer.c (streamer_dump_file): New global var.
7678 * lto-streamer.h (streamer_dump_file): Declare.
7679 * passes.c (ipa_write_summaries): Initialize streamer dump.
7680 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
7683 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
7686 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
7687 offsets for register save directives. Emit a second batch of save
7688 directives, if need be, when the function accesses prior frames.
7690 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7692 * config/arc/fpu.md (fmasf4): Force operand to register.
7693 (fnmasf4): Likewise.
7695 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7697 * config/arc/arc-protos.h (arc_pad_return): Remove.
7698 * config/arc/arc.c (machine_function): Remove force_short_suffix
7700 (arc_print_operand): Adjust printing of '&'.
7701 (arc_verify_short): Remove conditional printing of short suffix.
7702 (arc_final_prescan_insn): Remove reference to size_reason.
7703 (pad_return): New function.
7704 (arc_reorg): Call pad_return.
7705 (arc_pad_return): Remove.
7706 (arc_init_machine_status): Remove reference to force_short_suffix.
7707 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
7708 (attr length): When attribute iscompact is true force to 2
7709 regardless; in the case of maybe check if we want to force the
7710 instruction to have 4 bytes length.
7711 (nopv): Change it to generate 4 byte long nop as well.
7712 (blockage): New pattern.
7713 (simple_return): Remove call to arc_pad_return.
7714 (p_return_i): Likewise.
7716 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7718 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
7720 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7722 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
7725 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7727 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
7728 for ARC700 and ARCv2.
7730 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
7733 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
7734 operands[2] instead of operands[1].
7737 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
7739 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
7740 case, check whether the outer register overlaps an unallocatable
7741 register, not just whether it fits the required class.
7743 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
7745 * poly-int.h (can_div_trunc_p): Add new overload in which all values
7747 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
7748 (memrefs_conflict_p): Likewise.
7749 (init_alias_analysis): Likewise.
7750 * cfgexpand.c (expand_debug_expr): Likewise.
7751 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
7752 * cse.c (fold_rtx): Likewise.
7753 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
7754 * expr.c (emit_block_move_hints): Likewise.
7755 (clear_storage_hints, push_block, emit_push_insn): Likewise.
7756 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
7757 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
7758 (emit_group_store): Likewise.
7759 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
7760 to read the PRE/POST_MODIFY increment.
7761 * calls.c (store_one_arg): Use strip_offset.
7762 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
7764 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
7766 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
7767 (simplify_binary_operation_1): Extend CONST_INT handling to
7769 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
7770 than a HOST_WIDE_INT.
7771 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
7773 (adjust_mems, add_stores): Update accodingly.
7774 (vt_canonicalize_addr): Track polynomial offsets.
7775 (emit_note_insn_var_location): Likewise.
7776 (vt_add_function_parameter): Likewise.
7777 (vt_initialize): Likewise.
7779 2018-06-12 Jeff Law <law@redhat.com>
7781 * config.gcc (alpha*-*-freebsd*): Remove.
7782 * config/alpha/freebsd.h: Remove.
7784 2018-06-12 David Malcolm <dmalcolm@redhat.com>
7787 * spellcheck-tree.c (levenshtein_distance): Rename to...
7788 (get_edit_distance): ...this, and update for underlying renaming.
7789 * spellcheck-tree.h (levenshtein_distance): Rename to...
7790 (get_edit_distance): ...this.
7791 * spellcheck.c (levenshtein_distance): Rename to...
7792 (get_edit_distance): ...this. Convert from Levenshtein distance
7793 to Damerau-Levenshtein distance by supporting transpositions of
7794 adjacent characters. Rename "v1" to "v_next" and "v0" to
7796 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
7797 (selftest::test_edit_distance_unit_test_oneway): ...this, and
7798 update for underlying renaming.
7799 (selftest::levenshtein_distance_unit_test): Rename to...
7800 (selftest::test_get_edit_distance_unit): ...this, and update for
7801 underlying renaming.
7802 (selftest::test_find_closest_string): Add example from PR 69968
7803 where transposition helps
7804 (selftest::test_metric_conditions): Update for renaming.
7805 (selftest::test_metric_conditions): Likewise.
7806 (selftest::spellcheck_c_tests): Likewise.
7807 * spellcheck.h (levenshtein_distance): Rename both overloads to...
7808 (get_edit_distance): ...this.
7809 (best_match::consider): Update for renaming.
7811 2018-06-12 Martin Sebor <msebor@redhat.com>
7813 PR tree-optimization/85259
7814 * builtins.c (compute_objsize): Handle constant offsets.
7815 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
7816 true iff a warning has been issued.
7817 * gimple.h (gimple_nonartificial_location): New function.
7818 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
7819 gimple_nonartificial_location and handle -Wno-system-headers.
7820 (handle_builtin_stxncpy): Same.
7822 2018-06-12 Martin Sebor <msebor@redhat.com>
7825 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
7827 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
7829 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
7830 BUILTIN_VEC_XST entries for pointer to double and long long.
7832 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
7835 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
7837 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
7840 2018-06-12 Martin Liska <mliska@suse.cz>
7842 * doc/options.texi: Document IntegerRange.
7844 2018-06-12 Martin Liska <mliska@suse.cz>
7846 * config/i386/i386.opt: Make MPX-related options as Deprecated.
7847 * opt-functions.awk: Handle Deprecated flag.
7848 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
7850 (read_cmdline_option): Report warning for a deprecated option.
7851 * opts.h (struct cl_option): Add new field cl_deprecated.
7852 (CL_ERR_DEPRECATED): New.
7854 2018-06-12 Martin Liska <mliska@suse.cz>
7856 * doc/options.texi: Document Deprecated option flag.
7858 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7860 * config/arc/arc-arch.h (arc_extras): New enum.
7861 (arc_cpu_t):Add field extra.
7862 (arc_cpu_types): Consider the extras.
7863 * config/arc/arc-cpus.def: Add extras info.
7864 * config/arc/arc-opts.h (processor_type): Consider extra field.
7865 * config/arc/arc.c (arc_override_options): Handle extra field.
7867 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7869 * config/arc/arc-arch.h: Update ARC_OPTX macro.
7870 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
7872 * config/arc/arc.c (arc_init): Update pic warning.
7873 (irq_range): Update irq range parsing warnings.
7874 (arc_override_options): Update various warning messages.
7875 (arc_handle_aux_attribute): Likewise.
7877 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
7879 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
7881 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7883 * doc/sourcebuild.texi: Document usage of line number 0 in verify
7884 compiler messages directives.
7886 2018-06-12 Matthew Fortune <mfortune@gmail.com>
7888 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
7889 * config/mips/mips-tables.opt: Regenerate.
7890 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
7892 * doc/invoke.texi: Document -march=i6500.
7894 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
7896 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
7897 (i6400_gpmul): Add cpu_unit.
7898 (i6400_gpdiv): Likewise.
7899 (i6400_msa_add_d): Update reservations.
7900 (i6400_msa_int_add) Likewise.
7901 (i6400_msa_short_logic3) Likewise.
7902 (i6400_msa_short_logic2) Likewise.
7903 (i6400_msa_short_logic) Likewise.
7904 (i6400_msa_move) Likewise.
7905 (i6400_msa_cmp) Likewise.
7906 (i6400_msa_short_float2) Likewise.
7907 (i6400_msa_div_d) Likewise.
7908 (i6400_msa_long_logic1) Likewise.
7909 (i6400_msa_long_logic2) Likewise.
7910 (i6400_msa_mult) Likewise.
7911 (i6400_msa_long_float2) Likewise.
7912 (i6400_msa_long_float4) Likewise.
7913 (i6400_msa_long_float5) Likewise.
7914 (i6400_msa_long_float8) Likewise.
7915 (i6400_fpu_fadd): Include frint type.
7916 (i6400_fpu_store): New define_insn_reservation.
7917 (i6400_fpu_load): Likewise.
7918 (i6400_fpu_move): Likewise.
7919 (i6400_fpu_fcmp): Likewise.
7920 (i6400_fpu_fmadd): Likewise.
7921 (i6400_int_mult): Include imul3nc type and update reservation.
7922 (i6400_int_div): Include idiv3 type and update reservation.
7923 (i6400_int_load): Update to check type not move_type.
7924 (i6400_int_store): Likewise.
7925 (i6400_int_prefetch): Set zero latency.
7927 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
7929 * gcc.c: Document new %@{...} sequence.
7930 (LINK_COMMAND_SPEC): Use it for the -L switches.
7931 (cpp_unique_options): Use it for the -I switches.
7932 (at_file_argbuf): New global variable.
7933 (in_at_file): Likewise.
7934 (alloc_args): Create at_file_argbuf.
7935 (clear_args): Truncate at_file_argbuf.
7936 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
7937 (open_at_file): New function.
7938 (close_at_file): Likewise.
7939 (create_at_file): Delete.
7940 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
7943 (validate_switches_from_spec): Deal with %@{...} sequence.
7944 (validate_switches): Likewise.
7945 (driver::finalize): Call clear_args.
7947 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
7949 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
7951 2018-06-11 Martin Sebor <msebor@redhat.com>
7953 * doc/invoke.texi (-Wall): List -Wc++17-compat.
7954 (Wno-class-memaccess): Add @opindex.
7955 (Wno-templates, Wno-multiple-inheritance): Same.
7956 (Wno-virtual-inheritance, Wno-namespaces): Same.
7957 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
7958 (Wno-format-overflow, Wno-format-truncation): Same.
7959 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
7960 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
7961 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
7962 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
7963 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
7964 (Wno-misspelled-isr): Same.
7966 2018-06-11 Martin Sebor <msebor@redhat.com>
7968 * PR tree-optimization/86083
7969 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
7971 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
7973 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
7975 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
7978 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
7979 on the correct operand.
7980 (*movdi_internal64): Ditto.
7982 2018-06-11 Martin Liska <mliska@suse.cz>
7984 PR tree-optimization/86089
7985 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
7987 2018-06-11 Julia Koval <julia.koval@intel.com>
7989 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
7990 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
7991 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
7993 2018-06-11 Olivier Hainque <hainque@adacore.com>
7995 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
7996 for Ada with strict dwarf2.
7998 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
8001 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
8004 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
8006 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
8008 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
8010 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
8013 2018-06-08 Martin Liska <mliska@suse.cz>
8015 * tree-cfg.h (debug_function): Fix argument type to match
8018 2018-06-08 Martin Liska <mliska@suse.cz>
8020 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
8021 Remove usage of MPX-related (and removed) fields.
8022 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
8024 2018-06-08 David Malcolm <dmalcolm@redhat.com>
8026 * cfg.c (debug): Use TDF_NONE rather than 0.
8027 * cfghooks.c (debug): Likewise.
8028 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
8029 (struct dump_option_value_info): Convert to...
8030 (struct kv_pair): ...this template type.
8031 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
8033 (optinfo_verbosity_options): Likewise.
8034 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
8036 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
8037 than int for "optgroup_flags" param.
8038 (dump_generic_expr_loc): Use dump_flags_t rather than int for
8040 (dump_dec): Likewise.
8041 (dump_finish): Use TDF_NONE rather than 0.
8042 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
8043 rather than int for "optgroup_flags" param. Use TDF_NONE rather
8044 than 0. Update for change to option_ptr.
8045 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
8046 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
8047 0. Update for changes to optinfo_verbosity_options and
8049 (opt_info_switch_p): Convert optgroup_flags from int to
8051 (dump_basic_block): Use dump_flags_t rather than int
8052 for "dump_kind" param.
8053 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
8054 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
8055 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
8056 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
8057 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
8058 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
8059 TDF_NONE): Convert from macros to...
8060 (enum dump_flag): ...this new enum.
8061 (dump_flags_t): Update to use enum.
8062 (operator|, operator&, operator~, operator|=, operator&=):
8063 Implement for dump_flags_t.
8064 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
8065 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
8066 Convert from macros to...
8067 (enum optgroup_flag): ...this new enum.
8068 (optgroup_flags_t): New typedef.
8069 (operator|, operator|=): Implement for optgroup_flags_t.
8070 (struct dump_file_info): Convert field "alt_flags" to
8071 dump_flags_t. Convert field "optgroup_flags" to
8073 (dump_basic_block): Use dump_flags_t rather than int for param.
8074 (dump_generic_expr_loc): Likewise.
8075 (dump_dec): Likewise.
8076 (dump_register): Convert param "optgroup_flags" to
8078 (opt_info_enable_passes): Likewise.
8079 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
8081 * gimple-pretty-print.c (debug): Likewise.
8082 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
8083 (merged_store_group::apply_stores): Likewise.
8084 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
8085 * gimple.c (verify_gimple_pp): Likewise.
8086 * graphite-poly.c (print_pbb_body): Likewise.
8087 * passes.c (pass_manager::register_one_dump_file): Convert
8088 local "optgroup_flags" to optgroup_flags_t.
8089 * print-tree.c (print_node): Use TDF_NONE rather than 0.
8091 (debug_body): Likewise.
8092 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
8093 to optgroup_flags_t.
8094 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
8096 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
8097 (convert_mult_to_fma): Likewise.
8098 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
8099 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
8100 * tree-vect-data-refs.c (dump_lower_bound): Convert param
8101 "dump_kind" to dump_flags_t.
8103 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
8105 * config/rs6000/rs6000.c (min, max): Delete.
8107 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
8109 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
8110 -mabi=spe and -mabi=no-spe.
8112 2018-06-08 Martin Liska <mliska@suse.cz>
8114 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
8115 where we expect an existing summary.
8117 2018-06-08 Martin Liska <mliska@suse.cz>
8119 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
8120 * ipa-inline.h (estimate_edge_growth): Likewise.
8122 2018-06-08 Martin Liska <mliska@suse.cz>
8124 * cgraph.c (function_version_hasher::hash): Use
8125 cgraph_node::get_uid ().
8126 (function_version_hasher::equal):
8127 * cgraph.h (cgraph_node::get_uid): New method.
8128 * ipa-inline.c (update_caller_keys): Use
8129 cgraph_node::get_uid ().
8130 (update_callee_keys): Likewise.
8131 * ipa-utils.c (searchc): Likewise.
8132 (ipa_reduced_postorder): Likewise.
8133 * lto-cgraph.c (input_node): Likewise.
8134 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
8135 * symbol-summary.h (symtab_insertion): Likewise.
8136 (symtab_removal): Likewise.
8137 (symtab_duplication): Likewise.
8138 * tree-pretty-print.c (dump_function_header): Likewise.
8139 * tree-sra.c (convert_callers_for_node): Likewise.
8141 2018-06-08 Martin Liska <mliska@suse.cz>
8143 * cgraph.c (symbol_table::create_edge): Always assign a new
8145 (symbol_table::free_edge): Do not recycle numbers.
8146 * cgraph.h (cgraph_edge::get): New method.
8147 * symbol-summary.h (symtab_removal): Use it.
8148 (symtab_duplication): Likewise.
8149 (call_summary::hashable_uid): Remove.
8151 2018-06-08 Martin Liska <mliska@suse.cz>
8153 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
8154 (initialize_growth_caches): Remove.
8155 (free_growth_caches): Likewise.
8156 (do_estimate_edge_time): Use edge_growth_cache.
8157 (do_estimate_edge_size): Likewise.
8158 (do_estimate_edge_hints): Likewise.
8159 * ipa-inline.c (reset_edge_caches): Likewise.
8160 (recursive_inlining): Likewise.
8161 (inline_small_functions): Likewise.
8162 * ipa-inline.h (initialize_growth_caches): Remove.
8163 (estimate_edge_size): Likewise.
8164 (estimate_edge_time): Likewise.
8165 (estimate_edge_hints): Likewise.
8166 (reset_edge_growth_cache): Likewise.
8167 * symbol-summary.h (call_summary::remove): New method.
8169 2018-06-08 Martin Liska <mliska@suse.cz>
8171 * ipa-cp.c (class edge_clone_summary): New summary.
8172 (grow_edge_clone_vectors): Remove.
8173 (ipcp_edge_duplication_hook): Remove.
8174 (class edge_clone_summary_t): New call_summary class.
8175 (ipcp_edge_removal_hook): Remove.
8176 (edge_clone_summary_t::duplicate): New function.
8177 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
8178 (create_specialized_node): Likewise.
8179 (ipcp_driver): Initialize edge_clone_summaries and do not
8182 2018-06-08 Martin Liska <mliska@suse.cz>
8184 * symbol-summary.h (get): New function.
8185 (call_summary::m_initialize_when_cloning): New class member.
8187 2018-06-08 Martin Liska <mliska@suse.cz>
8189 * cgraph.c (cgraph_node::remove): Do not recycle uid.
8190 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
8191 (symbol_table::allocate_cgraph_symbol): Do not set uid.
8192 * passes.c (uid_hash_t): Record removed_nodes by their uids.
8193 (remove_cgraph_node_from_order): Use the removed_nodes set.
8194 (do_per_function_toporder): Likwise.
8195 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
8196 instead of summary_uid.
8197 (symtab_removal): Likewise.
8198 (symtab_duplication): Likewise.
8200 2018-06-08 Martin Liska <mliska@suse.cz>
8202 * ipa-cp.c (ipcp_store_bits_results): Use
8203 ipcp_transformation_sum.
8204 (ipcp_store_vr_results): Likewise.
8205 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
8207 (ipcp_transformation_initialize): ... this.
8208 (ipa_set_node_agg_value_chain):
8209 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
8210 (write_ipcp_transformation_info): Likewise.
8211 (read_ipcp_transformation_info): Likewise.
8212 (ipcp_update_bits): Likewise.
8213 (ipcp_update_vr): Likewise.
8214 (ipcp_transform_function): Likewise.
8215 * ipa-prop.h: Rename ipcp_transformation_summary to
8216 ipcp_transformation.
8217 (class ipcp_transformation_t): New function summary.
8218 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
8219 (ipa_get_agg_replacements_for_node): Likewise.
8221 2018-06-08 Martin Liska <mliska@suse.cz>
8223 * ipa-pure-const.c (struct funct_state_d): Do it class instead
8225 (class funct_state_summary_t): New function_summary class.
8226 (has_function_state): Remove.
8227 (get_function_state): Likewise.
8228 (set_function_state): Likewise.
8229 (add_new_function): Likewise.
8230 (funct_state_summary_t::insert): New function.
8231 (duplicate_node_data): Remove.
8232 (remove_node_data): Remove.
8233 (funct_state_summary_t::duplicate): New function.
8234 (register_hooks): Create new funct_state_summaries.
8235 (pure_const_generate_summary): Use it.
8236 (pure_const_write_summary): Likewise.
8237 (pure_const_read_summary): Likewise.
8238 (propagate_pure_const): Likewise.
8239 (propagate_nothrow): Likewise.
8240 (dump_malloc_lattice): Likewise.
8241 (propagate_malloc): Likewise.
8242 (execute): Do not register hooks, just remove summary
8244 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
8247 2018-06-08 Martin Liska <mliska@suse.cz>
8249 * ipa-reference.c (remove_node_data): Remove.
8250 (duplicate_node_data): Likewise.
8251 (class ipa_ref_var_info_summary_t): New class.
8252 (class ipa_ref_opt_summary_t): Likewise.
8253 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
8254 (get_reference_optimization_summary): Use
8255 ipa_ref_opt_sum_summaries.
8256 (set_reference_vars_info): Remove.
8257 (set_reference_optimization_summary): Likewise.
8258 (ipa_init): Create summaries.
8259 (init_function_info): Use function summary.
8260 (ipa_ref_opt_summary_t::duplicate): New function.
8261 (ipa_ref_opt_summary_t::remove): New function.
8262 (get_read_write_all_from_node): Fix GNU coding style.
8263 (propagate): Use function summary.
8264 (write_node_summary_p): Fix GNU coding style.
8265 (stream_out_bitmap): Likewise.
8266 (ipa_reference_read_optimization_summary): Use function summary.
8267 (ipa_reference_c_finalize): Do not release hooks.
8269 2018-06-08 Martin Liska <mliska@suse.cz>
8271 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
8272 (analyze_function_body): Extract multiple calls of get_create.
8273 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
8274 * ipa-inline.c (recursive_inlining): Use ::get method.
8275 * ipa-inline.h (estimate_edge_growth): Likewise.
8277 2018-06-08 Martin Liska <mliska@suse.cz>
8279 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
8281 (hsa_function_summary::hsa_function_summary): Use the new enum
8283 (hsa_gpu_implementation_p): Use hsa_summaries::get.
8284 * hsa-gen.c (hsa_get_host_function): Likewise.
8285 (get_brig_function_name): Likewise.
8286 * ipa-hsa.c (process_hsa_functions): Likewise.
8287 (ipa_hsa_write_summary): Likewise.
8288 * symbol-summary.h (symtab_duplication): Use ::get function/
8289 (get): New function.
8291 2018-06-08 Martin Liska <mliska@suse.cz>
8293 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
8295 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
8296 (hsa_register_kernel): Likewise.
8297 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
8298 * hsa-gen.c (hsa_get_host_function): Likewise.
8299 (get_brig_function_name): Likewise.
8300 (generate_hsa): Likewise.
8301 (pass_gen_hsail::execute): Likewise.
8302 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
8303 (devirtualization_time_bonus): Likewise.
8304 (ipcp_propagate_stage): Likewise.
8305 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
8306 (edge_set_predicate): Likewise.
8307 (evaluate_conditions_for_known_args): Likewise.
8308 (evaluate_properties_for_edge): Likewise.
8309 (ipa_fn_summary::reset): Likewise.
8310 (ipa_fn_summary_t::duplicate): Likewise.
8311 (dump_ipa_call_summary): Likewise.
8312 (ipa_dump_fn_summary): Likewise.
8313 (analyze_function_body): Likewise.
8314 (compute_fn_summary): Likewise.
8315 (estimate_edge_devirt_benefit): Likewise.
8316 (estimate_edge_size_and_time): Likewise.
8317 (estimate_calls_size_and_time): Likewise.
8318 (estimate_node_size_and_time): Likewise.
8319 (inline_update_callee_summaries): Likewise.
8320 (remap_edge_change_prob): Likewise.
8321 (remap_edge_summaries): Likewise.
8322 (ipa_merge_fn_summary_after_inlining): Likewise.
8323 (ipa_update_overall_fn_summary): Likewise.
8324 (read_ipa_call_summary): Likewise.
8325 (inline_read_section): Likewise.
8326 (write_ipa_call_summary): Likewise.
8327 (ipa_fn_summary_write): Likewise.
8328 (ipa_free_fn_summary): Likewise.
8329 * ipa-hsa.c (process_hsa_functions): Likewise.
8330 (ipa_hsa_write_summary): Likewise.
8331 (ipa_hsa_read_section): Likewise.
8332 * ipa-icf.c (sem_function::merge): Likewise.
8333 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
8334 (do_estimate_edge_time): Likewise.
8335 (estimate_size_after_inlining): Likewise.
8336 (estimate_growth): Likewise.
8337 (growth_likely_positive): Likewise.
8338 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
8339 (inline_call): Likewise.
8340 * ipa-inline.c (caller_growth_limits): Likewise.
8341 (can_inline_edge_p): Likewise.
8342 (can_inline_edge_by_limits_p): Likewise.
8343 (compute_uninlined_call_time): Likewise.
8344 (compute_inlined_call_time): Likewise.
8345 (want_inline_small_function_p): Likewise.
8346 (edge_badness): Likewise.
8347 (update_caller_keys): Likewise.
8348 (update_callee_keys): Likewise.
8349 (recursive_inlining): Likewise.
8350 (inline_small_functions): Likewise.
8351 (inline_to_all_callers_1): Likewise.
8352 (dump_overall_stats): Likewise.
8353 (early_inline_small_functions): Likewise.
8354 (early_inliner): Likewise.
8355 * ipa-inline.h (estimate_edge_growth): Likewise.
8356 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
8357 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8358 * ipa-prop.h (IPA_NODE_REF): Likewise.
8359 (IPA_EDGE_REF): Likewise.
8360 * ipa-pure-const.c (malloc_candidate_p): Likewise.
8361 (propagate_malloc): Likewise.
8362 * ipa-split.c (execute_split_functions): Likewise.
8363 * symbol-summary.h: Rename get to get_create.
8365 (get_create): Likewise.
8366 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
8368 2018-06-08 Martin Liska <mliska@suse.cz>
8370 * symbol-summary.h (release): Move definition out of class
8372 (symtab_removal): Likewise.
8373 (symtab_duplication): Likewise.
8375 2018-06-08 Martin Liska <mliska@suse.cz>
8377 * symbol-summary.h (function_summary): Move constructor
8378 implementation out of class declaration.
8379 (release): Likewise.
8380 (symtab_insertion): Likewise.
8381 (symtab_removal): Likewise.
8382 (symtab_duplication): Likewise.
8385 2018-06-08 Martin Liska <mliska@suse.cz>
8387 * Makefile.in: Remove support for MPX (macros, related functions,
8388 fields in cgraph_node, ...).
8389 * builtin-types.def (BT_BND): Likewise.
8390 (BT_FN_BND_CONST_PTR): Likewise.
8391 (BT_FN_CONST_PTR_BND): Likewise.
8392 (BT_FN_VOID_PTR_BND): Likewise.
8393 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
8394 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
8395 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
8396 (expand_builtin_mempcpy_with_bounds): Likewise.
8397 (expand_builtin_memset_with_bounds): Likewise.
8398 (expand_builtin_memset_args): Likewise.
8399 (std_expand_builtin_va_start): Likewise.
8400 (expand_builtin): Likewise.
8401 (expand_builtin_with_bounds): Likewise.
8402 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
8403 (DEF_LIB_BUILTIN_CHKP): Likewise.
8404 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
8405 (DEF_CHKP_BUILTIN): Likewise.
8406 (BUILT_IN_MEMCPY): Likewise.
8407 (BUILT_IN_MEMMOVE): Likewise.
8408 (BUILT_IN_MEMPCPY): Likewise.
8409 (BUILT_IN_MEMSET): Likewise.
8410 (BUILT_IN_STPCPY): Likewise.
8411 (BUILT_IN_STRCAT): Likewise.
8412 (BUILT_IN_STRCHR): Likewise.
8413 (BUILT_IN_STRCPY): Likewise.
8414 (BUILT_IN_STRLEN): Likewise.
8415 (BUILT_IN_MEMCPY_CHK): Likewise.
8416 (BUILT_IN_MEMMOVE_CHK): Likewise.
8417 (BUILT_IN_MEMPCPY_CHK): Likewise.
8418 (BUILT_IN_MEMSET_CHK): Likewise.
8419 (BUILT_IN_STPCPY_CHK): Likewise.
8420 (BUILT_IN_STRCAT_CHK): Likewise.
8421 (BUILT_IN_STRCPY_CHK): Likewise.
8422 * calls.c (store_bounds): Likewise.
8423 (emit_call_1): Likewise.
8424 (special_function_p): Likewise.
8425 (maybe_warn_nonstring_arg): Likewise.
8426 (initialize_argument_information): Likewise.
8427 (finalize_must_preallocate): Likewise.
8428 (compute_argument_addresses): Likewise.
8429 (expand_call): Likewise.
8430 * cfgexpand.c (expand_call_stmt): Likewise.
8431 (expand_return): Likewise.
8432 (expand_gimple_stmt_1): Likewise.
8433 (pass_expand::execute): Likewise.
8434 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
8435 (cgraph_node::remove): Likewise.
8436 (cgraph_node::dump): Likewise.
8437 (cgraph_node::verify_node): Likewise.
8438 * cgraph.h (chkp_function_instrumented_p): Likewise.
8439 (symtab_node::get_alias_target): Likewise.
8440 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
8441 (cgraph_local_p): Likewise.
8442 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
8443 (cgraph_edge::rebuild_references): Likewise.
8444 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
8445 (walk_polymorphic_call_targets): Likewise.
8446 (cgraph_node::expand_thunk): Likewise.
8447 (symbol_table::output_weakrefs): Likewise.
8448 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
8449 (ix86_handle_option): Likewise.
8450 * config/i386/constraints.md: Likewise.
8451 * config/i386/i386-builtin-types.def (BND): Likewise.
8455 * config/i386/i386-builtin.def (BDESC_END): Likewise.
8456 (BDESC_FIRST): Likewise.
8458 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
8459 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
8460 * config/i386/i386.c (enum reg_class): Likewise.
8461 (ix86_target_string): Likewise.
8462 (ix86_option_override_internal): Likewise.
8463 (ix86_conditional_register_usage): Likewise.
8464 (ix86_valid_target_attribute_inner_p): Likewise.
8465 (ix86_set_indirect_branch_type): Likewise.
8466 (ix86_set_current_function): Likewise.
8467 (ix86_function_arg_regno_p): Likewise.
8468 (init_cumulative_args): Likewise.
8469 (ix86_function_arg_advance): Likewise.
8470 (ix86_function_arg): Likewise.
8471 (ix86_pass_by_reference): Likewise.
8472 (ix86_function_value_regno_p): Likewise.
8473 (ix86_function_value_1): Likewise.
8474 (ix86_function_value_bounds): Likewise.
8475 (ix86_return_in_memory): Likewise.
8476 (ix86_setup_incoming_vararg_bounds): Likewise.
8477 (ix86_va_start): Likewise.
8478 (indirect_thunk_need_prefix): Likewise.
8479 (print_reg): Likewise.
8480 (ix86_print_operand): Likewise.
8481 (ix86_expand_call): Likewise.
8482 (ix86_output_function_return): Likewise.
8483 (reg_encoded_number): Likewise.
8484 (BDESC_VERIFYS): Likewise.
8485 (ix86_init_mpx_builtins): Likewise.
8486 (ix86_init_builtins): Likewise.
8487 (ix86_emit_cmove): Likewise.
8488 (ix86_emit_move_max): Likewise.
8489 (ix86_expand_builtin): Likewise.
8490 (ix86_builtin_mpx_function): Likewise.
8491 (ix86_get_arg_address_for_bt): Likewise.
8492 (ix86_load_bounds): Likewise.
8493 (ix86_store_bounds): Likewise.
8494 (ix86_load_returned_bounds): Likewise.
8495 (ix86_store_returned_bounds): Likewise.
8496 (ix86_class_likely_spilled_p): Likewise.
8497 (ix86_hard_regno_mode_ok): Likewise.
8498 (x86_order_regs_for_local_alloc): Likewise.
8499 (ix86_mitigate_rop): Likewise.
8500 (ix86_bnd_prefixed_insn_p): Likewise.
8501 (ix86_mpx_bound_mode): Likewise.
8502 (ix86_make_bounds_constant): Likewise.
8503 (ix86_initialize_bounds): Likewise.
8504 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
8505 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
8506 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
8507 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
8508 (TARGET_CHKP_BOUND_MODE): Likewise.
8509 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
8510 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
8511 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
8512 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
8513 * config/i386/i386.h (TARGET_MPX): Likewise.
8514 (TARGET_MPX_P): Likewise.
8515 (VALID_BND_REG_MODE): Likewise.
8516 (FIRST_BND_REG): Likewise.
8517 (LAST_BND_REG): Likewise.
8518 (enum reg_class): Likewise.
8519 (BND_REG_P): Likewise.
8520 (BND_REGNO_P): Likewise.
8521 (BNDmode): Likewise.
8522 (ADJUST_INSN_LENGTH): Likewise.
8523 * config/i386/i386.md: Likewise.
8524 * config/i386/i386.opt: Likewise.
8525 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
8526 (defined): Likewise.
8527 (LINK_MPX): Likewise.
8528 (MPX_SPEC): Likewise.
8529 (LIBMPX_SPEC): Likewise.
8530 (LIBMPXWRAPPERS_SPEC): Likewise.
8531 (CHKP_SPEC): Likewise.
8532 * config/i386/predicates.md: Likewise.
8533 * dbxout.c (dbxout_type): Likewise.
8534 * doc/extend.texi: Likewise.
8535 * doc/invoke.texi: Likewise.
8536 * doc/md.texi: Likewise.
8537 * doc/tm.texi: Likewise.
8538 * doc/tm.texi.in: Likewise.
8539 * dwarf2out.c (is_base_type): Likewise.
8540 (gen_formal_types_die): Likewise.
8541 (gen_subprogram_die): Likewise.
8542 (gen_type_die_with_usage): Likewise.
8543 (gen_decl_die): Likewise.
8544 (dwarf2out_late_global_decl): Likewise.
8545 * expr.c (expand_assignment): Likewise.
8546 (emit_storent_insn): Likewise.
8547 (store_expr_with_bounds): Likewise.
8548 (store_expr): Likewise.
8549 (expand_expr_real_1): Likewise.
8550 * expr.h (store_expr_with_bounds): Likewise.
8551 * function.c (use_register_for_decl): Likewise.
8552 (struct bounds_parm_data): Likewise.
8553 (assign_parms_augmented_arg_list): Likewise.
8554 (assign_parm_find_entry_rtl): Likewise.
8555 (assign_parm_is_stack_parm): Likewise.
8556 (assign_parm_load_bounds): Likewise.
8557 (assign_bounds): Likewise.
8558 (assign_parms): Likewise.
8559 (expand_function_start): Likewise.
8560 * gcc.c (CHKP_SPEC): Likewise.
8561 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
8562 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
8563 (wrestrict_dom_walker::check_call): Likewise.
8564 * gimple.c (gimple_build_call_from_tree): Likewise.
8565 * gimple.h (enum gf_mask): Likewise.
8566 (gimple_call_with_bounds_p): Likewise.
8567 (gimple_call_set_with_bounds): Likewise.
8568 * gimplify.c (gimplify_init_constructor): Likewise.
8569 * ipa-cp.c (initialize_node_lattices): Likewise.
8570 (propagate_constants_across_call): Likewise.
8571 (find_more_scalar_values_for_callers_subset): Likewise.
8572 * ipa-hsa.c (process_hsa_functions): Likewise.
8573 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
8574 * ipa-icf.c (sem_function::merge): Likewise.
8575 * ipa-inline.c (early_inliner): Likewise.
8576 * ipa-pure-const.c (warn_function_noreturn): Likewise.
8577 (warn_function_cold): Likewise.
8578 (propagate_pure_const): Likewise.
8579 * ipa-ref.h (enum GTY): Likewise.
8580 * ipa-split.c (find_retbnd): Likewise.
8581 (consider_split): Likewise.
8582 (split_function): Likewise.
8583 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
8584 * ipa.c (walk_polymorphic_call_targets): Likewise.
8585 (symbol_table::remove_unreachable_nodes): Likewise.
8586 (process_references): Likewise.
8587 (cgraph_build_static_cdtor_1): Likewise.
8588 * lto-cgraph.c (lto_output_node): Likewise.
8589 (output_refs): Likewise.
8590 (compute_ltrans_boundary): Likewise.
8591 (input_overwrite_node): Likewise.
8592 (input_node): Likewise.
8593 (input_cgraph_1): Likewise.
8594 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
8595 * passes.c (pass_manager::execute_early_local_passes): Likewise.
8596 (class pass_chkp_instrumentation_passes): Likewise.
8597 (make_pass_chkp_instrumentation_passes): Likewise.
8598 * passes.def: Likewise.
8599 * rtl.h (struct GTY): Likewise.
8600 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
8601 * stor-layout.c (layout_type): Likewise.
8602 * symtab.c: Likewise.
8603 * target.def: Likewise.
8604 * targhooks.c (default_chkp_bound_type): Likewise.
8605 (default_chkp_bound_mode): Likewise.
8606 (default_builtin_chkp_function): Likewise.
8607 (default_chkp_function_value_bounds): Likewise.
8608 (default_chkp_make_bounds_constant): Likewise.
8609 (default_chkp_initialize_bounds): Likewise.
8610 * targhooks.h (default_chkp_bound_type): Likewise.
8611 (default_chkp_bound_mode): Likewise.
8612 (default_builtin_chkp_function): Likewise.
8613 (default_chkp_function_value_bounds): Likewise.
8614 (default_chkp_make_bounds_constant): Likewise.
8615 (default_chkp_initialize_bounds): Likewise.
8616 * toplev.c (compile_file): Likewise.
8617 (process_options): Likewise.
8618 * tree-core.h (DEF_BUILTIN): Likewise.
8619 (DEF_BUILTIN_CHKP): Likewise.
8620 * tree-inline.c (declare_return_variable): Likewise.
8621 (remap_gimple_stmt): Likewise.
8622 (copy_bb): Likewise.
8623 (initialize_inlined_parameters): Likewise.
8624 (expand_call_inline): Likewise.
8625 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
8626 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
8627 (make_pass_ipa_chkp_produce_thunks): Likewise.
8628 (make_pass_chkp): Likewise.
8629 (make_pass_chkp_opt): Likewise.
8630 (make_pass_chkp_instrumentation_passes): Likewise.
8631 * tree-pretty-print.c (dump_generic_node): Likewise.
8632 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
8633 * tree-ssa-dce.c (propagate_necessity): Likewise.
8634 (eliminate_unnecessary_stmts): Likewise.
8635 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
8636 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
8637 * tree-ssa-sccvn.h: Likewise.
8638 * tree-ssa-strlen.c (get_string_length): Likewise.
8639 (valid_builtin_call): Likewise.
8640 (adjust_last_stmt): Likewise.
8641 (handle_builtin_strchr): Likewise.
8642 (handle_builtin_strcpy): Likewise.
8643 (handle_builtin_stxncpy): Likewise.
8644 (handle_builtin_memcpy): Likewise.
8645 (handle_builtin_strcat): Likewise.
8646 (strlen_check_and_optimize_stmt): Likewise.
8647 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
8648 * tree-streamer-in.c: Likewise.
8649 * tree-streamer.c (record_common_node): Likewise.
8650 * tree.c (tree_code_size): Likewise.
8651 (wide_int_to_tree_1): Likewise.
8652 (type_contains_placeholder_1): Likewise.
8653 (build_common_tree_nodes): Likewise.
8654 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
8655 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
8656 (POINTER_BOUNDS_P): Likewise.
8657 (BOUNDED_TYPE_P): Likewise.
8658 (BOUNDED_P): Likewise.
8659 (CALL_WITH_BOUNDS_P): Likewise.
8660 (pointer_bounds_type_node): Likewise.
8661 * value-prof.c (gimple_ic): Likewise.
8662 * var-tracking.c (vt_add_function_parameters): Likewise.
8663 * varasm.c (make_decl_rtl): Likewise.
8664 (assemble_start_function): Likewise.
8665 (output_constant): Likewise.
8666 (maybe_assemble_visibility): Likewise.
8667 * varpool.c (ctor_for_folding): Likewise.
8668 * chkp-builtins.def: Remove.
8669 * ipa-chkp.c: Remove.
8670 * ipa-chkp.h: Remove.
8671 * rtl-chkp.c: Remove.
8672 * rtl-chkp.h: Remove.
8673 * tree-chkp-opt.c: Remove.
8674 * tree-chkp.c: Remove.
8675 * tree-chkp.h: Remove.
8677 2018-06-07 Carl Love <cel@us.ibm.com>
8679 * config/rs6000/vsx.md (vextract_fp_from_shorth,
8680 vextract_fp_from_shortl): Add BE support.
8682 2018-06-07 Paul Koning <ni1d@arrl.net>
8684 * compare-elim.c (try_merge_compare): Don't merge compare if
8685 address contains a side effect.
8686 (try_eliminate_compare): Likewise.
8688 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
8690 * config.gcc: Support "tremont".
8691 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
8692 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8694 * config/i386/i386.c (m_TREMONT): Define.
8695 (processor_target_table): Add "tremont".
8696 (PTA_TREMONT): Define.
8697 (ix86_lea_outperforms): Add TARGET_TREMONT.
8698 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
8699 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
8700 and M_INTEL_GOLDMONT_PLUS.
8701 (fold_builtin_cpu): Add "tremont".
8702 (ix86_add_stmt_cost): Add TARGET_TREMONT.
8703 (ix86_option_override_internal): Add "tremont".
8704 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
8705 (processor_type): Add PROCESSOR_TREMONT.
8706 * config/i386/x86-tune.def: Add m_TREMONT.
8707 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
8709 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8711 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
8712 symbol defined for msp430i* devices to be lower case.
8714 2018-06-07 Richard Biener <rguenther@suse.de>
8716 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
8717 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
8718 Properly wrap signed arithmetic if overflow wraps.
8720 2018-06-07 Jakub Jelinek <jakub@redhat.com>
8722 PR tree-optimization/69615
8723 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
8724 of a cast from a same precision integral SSA_NAME in a bb dominated
8725 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
8726 cast to utype if rhs2 has already a compatible type.
8728 2018-06-07 Richard Biener <rguenther@suse.de>
8730 PR tree-optimization/85935
8731 * graphite-scop-detection.c (find_params_in_bb): Analyze
8732 condition operands with respect to the correct loop. Assert
8733 the analysis doesn't fail.
8735 2018-06-04 Carl Love <cel@us.ibm.com>
8737 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
8738 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
8739 as it is slightly cheaper.
8740 (first_match_or_eos_index_<mode>):
8741 Calculate index using natural element order.
8742 (first_match_index_<mode>):
8743 Calculate index using natural element order.
8744 (first_match_or_eos_index_<mode>):
8745 Calculate index using natural order.
8746 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
8747 for BE and LE modes.
8748 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
8749 P9V_BUILTIN_VCLZLSBB_V16QI.
8750 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
8753 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
8755 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
8756 indentation and line wrap for many prototypes. Add missing
8757 @smallexample directives around block of prototypes for vec_xl and
8760 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
8762 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
8763 track if we pass or return IEEE 128-bit floating point.
8764 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
8765 C++ mangling that is compatible with GCC 8.1.
8766 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
8767 (init_cumulative_args): Note if we pass or return IEEE 128-bit
8768 floating point types.
8769 (rs6000_function_arg_advance_1): Likewise.
8770 (rs6000_mangle_type): Optionally generate mangled names that match
8771 what GCC 8.1 generated for IEEE 128-bit floating point types.
8772 (rs6000_globalize_decl_name): If we have an external function that
8773 passes or returns IEEE 128-bit types, generate a weak reference
8774 from the mangled name used in GCC 8.1 to the current mangled
8776 (rs6000_init_builtins): Make __ibm128 use the long double type if
8777 long double is IBM extended double. Make __float128 use the long
8778 double type if long double is IEEE 128-bit.
8781 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
8782 macro for __ibm128 built-in functions.
8783 (PACK_IF): Add __ibm128 pack/unpack functions.
8784 (UNPACK_IF): Likewise.
8785 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
8786 enable long double built-in functions if long double is IEEE
8787 128-bit floating point.
8788 (rs6000_invalid_builtin): Update long double built-in function
8790 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
8791 functions, adjust the built-in function to use the long double
8792 built-in function if __ibm128 and long double are the same type.
8793 * doc/extend.texi (PowerPC builtins): Update documention for
8794 __builtin_{,un}pack_longdouble. Add documentation for
8795 __builtin_{,un}pack_ibm128.
8797 2018-06-06 Jim Wilson <jimw@sifive.com>
8799 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
8800 (struct machine_function): New field interrupt_mode.
8801 (riscv_handle_type_attribute): New function. Add forward declaration.
8802 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
8803 (riscv_expand_epilogue): Check interrupt_mode field.
8804 (riscv_set_current_function): Check interrupt attribute args and
8805 set interrupt_mode field.
8806 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
8807 (riscv_sret, riscv_uret): New.
8808 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
8809 new arguments to interrupt attribute.
8811 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
8814 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
8815 Don't handle -mcpu=power8 if -mpower9-vector is also used.
8817 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
8819 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
8820 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
8821 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
8822 several redundant entries.
8824 2018-06-06 David Malcolm <dmalcolm@redhat.com>
8826 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
8827 type from "rtx" to "rtx_insn *".
8828 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
8829 for local "call_insn", removing cast.
8830 (ix86_expand_call): Likewise, introducing a "call_insn" local.
8832 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
8834 PR tree-optimization/86066
8835 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
8836 for BIT_INSERT_EXPR stores.
8838 2018-06-06 Richard Biener <rguenther@suse.de>
8840 PR tree-optimization/86062
8841 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
8842 component refs ontop
8843 of to be offsetted base.
8845 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8847 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
8848 to be static and remove check on interrupt attribute name.
8850 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
8852 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
8853 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
8855 2018-06-05 Steve Ellcey <sellcey@cavium.com>
8858 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
8860 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
8861 Remove second argument, change how error is called.
8862 (aarch64_layout_arg): Remove second argument from
8863 aarch64_err_no_fpadvsimd call.
8864 (aarch64_init_cumulative_args): Ditto.
8865 (aarch64_gimplify_va_arg_expr): Ditto.
8866 * config/aarch64/aarch64.md (mov<mode>): Ditto.
8868 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
8870 * config/i386/i386.md (simple_return_indirect_internal): New expander.
8871 (*simple_return_indirect_internal<mode>): Rename from
8872 simple_return_indirect_internal. Use W mode iterator.
8873 (rstorssp): New expander.
8874 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
8875 (clrssbsy): New expander.
8876 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
8878 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
8880 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
8882 (cmse_check_pointed_object): Likewise.
8884 2018-06-05 Martin Liska <mliska@suse.cz>
8886 PR gcov-profile/47618
8887 * doc/invoke.texi: Document how -fprofile-dir format
8890 2018-06-05 Richard Biener <rguenther@suse.de>
8892 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
8893 removal pretend DOM info isn't available so we do not update
8894 it and only remove edges, not dominated blocks. Actually free
8895 DOM info in case we removed something. Remove unreachable blocks.
8896 (mfb_keep_latches): Work with either DOM info or marked backedges.
8897 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
8898 first. Mark backedges if DOM info isn't available.
8899 (Re-)compute DOM info after cleanup_control_flow_pre.
8901 2018-06-05 Richard Biener <rguenther@suse.de>
8903 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
8904 (locus_discrim_hasher::hash): Adjust.
8905 (locus_discrim_hasher::equal): Likewise.
8906 (next_discriminator_for_locus): Work on line directly.
8907 (same_line_p): Pass in expanded locus1 as well.
8908 (assign_discriminators): Avoid redundant location expansions.
8910 2018-06-05 Richard Biener <rguenther@suse.de>
8912 PR tree-optimization/86046
8913 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
8914 if required after clearing TREE_ADDRESSABLE.
8916 2018-06-05 Richard Biener <rguenther@suse.de>
8918 PR tree-optimization/86047
8919 * tree-ssa-loop.c (for_each_index): Glob handling of all
8920 decls and constants and really handle all of them.
8922 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8925 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
8926 qualifier_void_pointer and qualifier_const_void_pointer.
8927 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
8928 (arm_init_builtins): Handle the above.
8929 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
8930 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
8931 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
8934 2018-06-05 Martin Liska <mliska@suse.cz>
8936 * auto-profile.c (read_autofdo_file): Do not use
8937 gcov_ctr_summary struct.
8938 (afdo_callsite_hot_enough_for_early_inline): Likewise.
8939 * coverage.c (struct counts_entry): Likewise.
8940 (read_counts_file): Read just single summary entry.
8941 (get_coverage_counts): Use gcov_summary struct.
8942 * coverage.h (get_coverage_counts): Likewise.
8943 * gcov-dump.c (dump_working_sets): Likewise.
8944 (tag_summary): Dump just single summary.
8945 * gcov-io.c (gcov_write_summary): Write just histogram
8947 (gcov_read_summary): Read just single summary.
8948 (compute_working_sets): Use gcov_summary struct.
8949 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
8950 of GCOV_COUNTERS_SUMMABLE.
8951 (GCOV_COUNTERS_SUMMABLE): Remove.
8952 (GCOV_FIRST_VALUE_COUNTER): Replace with
8953 GCOV_COUNTER_V_INTERVAL.
8954 (struct gcov_ctr_summary): Remove.
8955 (struct gcov_summary): Directly use fields of former
8957 (compute_working_sets): Use gcov_summary struct.
8958 * gcov.c (read_count_file): Do not use ctrs fields.
8959 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
8961 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
8963 * profile.c: Likewise.
8964 * profile.h: Likewise.
8966 2018-06-05 Martin Liska <mliska@suse.cz>
8968 PR gcov-profile/84846
8969 * gcov.c (output_lines): Print working directory only
8970 in intermediate format.
8972 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
8974 * config/s390/s390-builtin-types.def: Add void function type.
8975 * config/s390/s390-builtins.def: Use the function type for the
8978 2018-06-04 Jim Wilson <jimw@sifive.com>
8980 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
8982 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
8983 and maybe_eh_return. Change regno to unsigned int. Use new args to
8984 handle EH_RETURN_DATA_REGNO registers properly.
8985 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
8986 (riscv_expand_epilogue): Update comment. Change argument name and
8987 type. Update code to use new name and type. Pass new args to
8988 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
8990 * config/riscv/riscv.md (NORMAL_RETURN): New.
8991 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
8992 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
8993 (eh_return): Call gen_eh_return_internal and emit barrier.
8994 (eh_return_internal): Call riscv_expand_epilogue.
8996 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
8998 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
8999 bit_insertion field and declare can_be_merged_into method.
9000 (merged_store_group::can_be_merged_into): New method.
9001 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
9002 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
9003 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
9005 2018-06-04 Richard Biener <rguenther@suse.de>
9007 PR tree-optimization/85955
9008 * builtins.c (fold_builtin_sincos): Convert pointers to
9009 destination to appropriate type before dereferencing.
9011 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
9013 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
9015 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
9017 * expr.c (expand_expr_real_1): Force the operand into memory if
9018 its TYPE_MODE is BLKmode and if there is no integer mode for
9019 the number of bits being extracted.
9021 2018-06-04 Jakub Jelinek <jakub@redhat.com>
9025 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
9026 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
9028 2018-06-04 Richard Biener <rguenther@suse.de>
9030 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
9031 (cleanup_tree_cfg_noloop): ... single caller. Do
9032 start_recording_case_labels later.
9034 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
9036 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
9037 to _IMMINTRIN_H_INCLUDED.
9038 * config/i386/pconfigintrin.h: Ditto.
9039 * config/i386/waitpkgintrin.h: Ditto.
9040 * config/i386/immintrin.h: Add includes for sgxintrin.h,
9041 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
9042 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
9043 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
9044 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
9045 waitpkgintrin.h and cldemoteintrin.h.
9047 2018-06-04 Richard Biener <rguenther@suse.de>
9049 PR tree-optimization/86038
9050 * tracer.c (find_best_successor): Check probability for
9051 being initialized, bail out if not.
9053 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
9056 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
9057 of bits to ignore when comparing architectures.
9059 2018-06-04 Jakub Jelinek <jakub@redhat.com>
9061 PR tree-optimization/69615
9062 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
9063 maximum or minimum of the type, try to merge it also as if
9064 range1 is + [-, x - 1] or + [x + 1, -].
9067 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
9069 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
9071 PR tree-optimization/86034
9072 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
9073 the unsigned bitfield type in a bit insertion sequence if it does not
9074 have a larger precision than the bitfield size.
9075 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
9077 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
9079 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
9081 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
9083 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
9084 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
9085 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
9086 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
9088 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
9090 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
9091 Disable -fdelete-null-pointer-checks for ELF toolchain.
9093 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
9094 Kito Cheng <kito.cheng@gmail.com>
9096 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
9097 (nds32le-*-*, nds32be-*-*): Integrate checking process.
9098 (nds32*-*-*): Add glibc and uclibc conditions.
9099 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
9100 (TARGET_EXCEPT_UNWIND_INFO): Define.
9101 * config/nds32/elf.h: New file.
9102 * config/nds32/linux.h: New file.
9103 * config/nds32/nds32-elf.opt: New file.
9104 * config/nds32/nds32-linux.opt: New file.
9105 * config/nds32/nds32-fp-as-gp.c
9106 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
9107 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
9109 (nds32_asm_file_end): Ditto.
9110 (nds32_print_operand): Ditto.
9111 (nds32_insert_attributes): Ditto.
9112 (nds32_init_libfuncs): New function.
9113 (TARGET_HAVE_TLS): Define.
9114 (TARGET_INIT_LIBFUNCS): Define.
9115 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
9117 (TARGET_ELF): Apply different mcmodel setting.
9118 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
9119 been migrated into elf.h and linux.h files.
9120 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
9121 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
9122 (mcmodel): The content has been migrated into nds32-elf.opt and
9123 nds32-linux.opt files.
9124 * config/nds32/t-elf: New file.
9125 * config/nds32/t-linux: New file.
9127 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
9128 Shiva Chen <shiva0217@gmail.com>
9130 * config/nds32/constants.md (unspec_volatile_element): Add
9131 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
9132 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
9134 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
9135 (make_pass_nds32_fp_as_gp): Declare.
9136 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
9138 (nds32_asm_function_end_prologue): Remove unused asm output.
9139 (nds32_asm_function_begin_epilogue): Remove unused asm output.
9140 (nds32_asm_file_start): Output necessary fp_as_gp information.
9141 (nds32_option_override): Adjust register usage.
9142 (nds32_expand_prologue): Consider fp_as_gp situation.
9143 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
9144 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
9147 (simple_return): Ditto.
9148 (omit_fp_begin): Output special directive for fp_as_gp.
9149 (omit_fp_end): Output special directive for fp_as_gp.
9150 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
9151 mforbid-fp-as-gp): New options.
9153 2018-06-01 Mark Wielaard <mark@klomp.org>
9155 * dwarf2out.c (dwarf2out_finish): Remove generation of
9156 DW_AT_loclists_base.
9158 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
9160 * gimple-ssa-store-merging.c: Include gimple-fold.h.
9161 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
9162 (struct merged_store_group): Add bit_insertion field.
9163 (dump_char_array): Use standard hexadecimal format.
9164 (merged_store_group::merged_store_group): Set bit_insertion to false.
9165 (merged_store_group::apply_stores): Use optimal buffer size. Deal
9166 with BIT_INSERT_EXPR stores. Move up code updating the mask and
9167 also print the mask in the dump file.
9168 (pass_store_merging::gate): Minor tweak.
9169 (imm_store_chain_info::coalesce_immediate): Fix wrong association
9170 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
9171 stores with INTEGER_CST stores.
9172 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
9173 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
9174 and use it throughout. Generate bit insertion sequences if need be.
9175 (pass_store_merging::process_store): Remove redundant condition.
9176 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
9178 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
9180 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
9181 the 128-bit floating point types. Fix function comment.
9183 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9185 * config/aarch64/aarch64-simd.md
9186 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
9188 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
9191 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
9193 PR tree-optimization/85989
9194 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
9196 (backprop::intersect_uses): Check it when deciding whether this
9197 is a backedge reference.
9198 (backprop::process_block): Add each phi to m_visited_phis
9199 after visiting it, then clear it at the end.
9201 2018-06-01 Richard Biener <rguenther@suse.de>
9203 * tree-vectorizer.h (vect_dr_stmt): New function.
9204 (vect_get_load_cost): Adjust.
9205 (vect_get_store_cost): Likewise.
9206 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
9207 Use vect_dr_stmt instead of DR_SMTT.
9208 (vect_record_base_alignments): Likewise.
9209 (vect_calculate_target_alignment): Likewise.
9210 (vect_compute_data_ref_alignment): Likewise and make static.
9211 (vect_update_misalignment_for_peel): Likewise.
9212 (vect_verify_datarefs_alignment): Likewise.
9213 (vector_alignment_reachable_p): Likewise.
9214 (vect_get_data_access_cost): Likewise. Pass down
9215 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
9216 (vect_get_peeling_costs_all_drs): Likewise.
9217 (vect_peeling_hash_get_lowest_cost): Likewise.
9218 (vect_enhance_data_refs_alignment): Likewise.
9219 (vect_find_same_alignment_drs): Likewise.
9220 (vect_analyze_data_refs_alignment): Likewise.
9221 (vect_analyze_group_access_1): Likewise.
9222 (vect_analyze_group_access): Likewise.
9223 (vect_analyze_data_ref_access): Likewise.
9224 (vect_analyze_data_ref_accesses): Likewise.
9225 (vect_vfa_segment_size): Likewise.
9226 (vect_small_gap_p): Likewise.
9227 (vectorizable_with_step_bound_p): Likewise.
9228 (vect_prune_runtime_alias_test_list): Likewise.
9229 (vect_analyze_data_refs): Likewise.
9230 (vect_supportable_dr_alignment): Likewise.
9231 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
9232 (vect_gen_prolog_loop_niters): Likewise.
9233 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
9234 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
9236 (vect_recog_mask_conversion_pattern): Likewise.
9237 (vect_try_gather_scatter_pattern): Likewise.
9238 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
9239 to vect_get_store_cost.
9240 (vect_get_store_cost): Get stmt_info instead of DR.
9241 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
9242 (vect_get_load_cost): Get stmt_info instead of DR.
9244 2018-06-01 Richard Biener <rguenther@suse.de>
9247 * gimple-fold.c (var_decl_component_p): Also allow offsetted
9248 vars wrapped in MEM_REFs.
9250 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
9252 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
9253 Fix subreg tests so that we only return a choice between
9254 GENERAL_REGS and FP_REGS if the original classes included both.
9256 2018-06-01 Richard Biener <rguenther@suse.de>
9259 * tree-ssa-structalias.c (get_function_part_constraint):
9260 Handle NULL fi->decl.
9261 (find_func_aliases_for_call): Properly handle indirect
9262 fi from direct call.
9263 (find_func_clobbers): Likewise.
9264 (ipa_pta_execute): Likewise.
9265 (create_variable_info_for): For functions that are ifunc_resolver
9266 resolve to a varinfo that contains the result of the resolver call.
9267 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
9270 2018-05-31 Michael Collison <michael.collison@arm.com>
9272 * config/aarch64/aarch64.md:
9273 (*fix_to_zero_extenddfdi2): New pattern.
9274 * gcc.target/aarch64/fix_extend1.c: New testcase.
9276 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
9280 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
9281 and BUILT_IN_STRNCMP_EQ.
9282 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
9283 BUILT_IN_STRNCMP_EQ.
9284 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
9285 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
9286 (gimple_fold_builtin): Likewise.
9287 * tree-ssa-strlen.c (compute_string_length): New function.
9288 (determine_min_obsize): New function.
9289 (handle_builtin_string_cmp): New function to handle calls to
9290 string compare functions.
9291 (strlen_optimize_stmt): Add handling to builtin string compare
9293 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
9294 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
9295 * tree.c (build_common_builtin_nodes): Add new defines of
9296 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
9298 2018-05-31 Jakub Jelinek <jakub@redhat.com>
9301 * bb-reorder.c (pass_partition_blocks::gate): Return false for
9302 functions with naked attribute.
9304 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
9306 * config/i386/sse.md (avx_vec_concat<mode>):
9307 Substitute concat_tg_mode mode attribute with xtg_mode.
9308 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
9309 (concat_tg_mode): Remove mode attribute.
9311 2018-05-31 Martin Sebor <msebor@redhat.com>
9314 * calls.c (alloc_max_size): Correct a logic error/typo.
9315 Treat excessive arguments as infinite. Warn for invalid arguments.
9316 * doc/invoke.texi (-Walloc-size-larger-than): Update.
9318 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
9321 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
9322 and movx for Haswell.
9324 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
9325 Cesar Philippidis <cesar@codesourcery.com>
9328 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
9329 when emitting error on private/firstprivate reductions.
9330 * omp-low.c (lower_omp_target): Avoid reference-type processing
9331 on pointers for firstprivate clause.
9333 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
9335 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
9338 * config/aarch64/aarch64-simd.md
9339 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
9340 (aarch64_ld1_x3_<mode>): Likewise
9341 (aarch64_st1x2<VALLDIF:mode>): Likewise
9342 (aarch64_st1_x2_<mode>): Likewise
9343 (aarch64_st1x3<VALLDIF:mode>): Likewise
9344 (aarch64_st1_x3_<mode>): Likewise
9345 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
9346 (vld1_s8_x3): Likewise.
9347 (vld1_u16_x3): Likewise.
9348 (vld1_s16_x3): Likewise.
9349 (vld1_u32_x3): Likewise.
9350 (vld1_s32_x3): Likewise.
9351 (vld1_u64_x3): Likewise.
9352 (vld1_s64_x3): Likewise.
9353 (vld1_f16_x3): Likewise.
9354 (vld1_f32_x3): Likewise.
9355 (vld1_f64_x3): Likewise.
9356 (vld1_p8_x3): Likewise.
9357 (vld1_p16_x3): Likewise.
9358 (vld1_p64_x3): Likewise.
9359 (vld1q_u8_x3): Likewise.
9360 (vld1q_s8_x3): Likewise.
9361 (vld1q_u16_x3): Likewise.
9362 (vld1q_s16_x3): Likewise.
9363 (vld1q_u32_x3): Likewise.
9364 (vld1q_s32_x3): Likewise.
9365 (vld1q_u64_x3): Likewise.
9366 (vld1q_s64_x3): Likewise.
9367 (vld1q_f16_x3): Likewise.
9368 (vld1q_f32_x3): Likewise.
9369 (vld1q_f64_x3): Likewise.
9370 (vld1q_p8_x3): Likewise.
9371 (vld1q_p16_x3): Likewise.
9372 (vld1q_p64_x3): Likewise.
9373 (vst1_s64_x2): Likewise.
9374 (vst1_u64_x2): Likewise.
9375 (vst1_f64_x2): Likewise.
9376 (vst1_s8_x2): Likewise.
9377 (vst1_p8_x2): Likewise.
9378 (vst1_s16_x2): Likewise.
9379 (vst1_p16_x2): Likewise.
9380 (vst1_s32_x2): Likewise.
9381 (vst1_u8_x2): Likewise.
9382 (vst1_u16_x2): Likewise.
9383 (vst1_u32_x2): Likewise.
9384 (vst1_f16_x2): Likewise.
9385 (vst1_f32_x2): Likewise.
9386 (vst1_p64_x2): Likewise.
9387 (vst1q_s8_x2): Likewise.
9388 (vst1q_p8_x2): Likewise.
9389 (vst1q_s16_x2): Likewise.
9390 (vst1q_p16_x2): Likewise.
9391 (vst1q_s32_x2): Likewise.
9392 (vst1q_s64_x2): Likewise.
9393 (vst1q_u8_x2): Likewise.
9394 (vst1q_u16_x2): Likewise.
9395 (vst1q_u32_x2): Likewise.
9396 (vst1q_u64_x2): Likewise.
9397 (vst1q_f16_x2): Likewise.
9398 (vst1q_f32_x2): Likewise.
9399 (vst1q_f64_x2): Likewise.
9400 (vst1q_p64_x2): Likewise.
9401 (vst1_s64_x3): Likewise.
9402 (vst1_u64_x3): Likewise.
9403 (vst1_f64_x3): Likewise.
9404 (vst1_s8_x3): Likewise.
9405 (vst1_p8_x3): Likewise.
9406 (vst1_s16_x3): Likewise.
9407 (vst1_p16_x3): Likewise.
9408 (vst1_s32_x3): Likewise.
9409 (vst1_u8_x3): Likewise.
9410 (vst1_u16_x3): Likewise.
9411 (vst1_u32_x3): Likewise.
9412 (vst1_f16_x3): Likewise.
9413 (vst1_f32_x3): Likewise.
9414 (vst1_p64_x3): Likewise.
9415 (vst1q_s8_x3): Likewise.
9416 (vst1q_p8_x3): Likewise.
9417 (vst1q_s16_x3): Likewise.
9418 (vst1q_p16_x3): Likewise.
9419 (vst1q_s32_x3): Likewise.
9420 (vst1q_s64_x3): Likewise.
9421 (vst1q_u8_x3): Likewise.
9422 (vst1q_u16_x3): Likewise.
9423 (vst1q_u32_x3): Likewise.
9424 (vst1q_u64_x3): Likewise.
9425 (vst1q_f16_x3): Likewise.
9426 (vst1q_f32_x3): Likewise.
9427 (vst1q_f64_x3): Likewise.
9428 (vst1q_p64_x3): Likewise.
9430 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9432 * config/msp430/msp430.c (msp430_output_labelref): Prepend
9433 user_label_prefix to name.
9435 * tree-core.h: Update comment about the format of NAME string
9436 passed to handler in attribute_spec.
9438 * config/msp430/msp430.md: Remove erroneous subreg expression from
9439 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
9440 zero_extend{q,h}isi2.
9442 2018-05-30 Borislav Petkov <bp@suse.de>
9444 * doc/extend.texi: Document some architecture specific
9445 constraints and sort entries.
9447 2018-05-30 Martin Sebor <msebor@redhat.com>
9450 * builtins.c (expand_builtin_stpcpy_1): New function.
9451 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
9452 only if the former succeeds.
9454 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
9456 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
9459 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9461 * doc/invoke.texi (-flinker-output): Document
9463 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9465 * passes.c (ipa_write_summaries): Only modify statements if body
9467 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
9468 incrementally linking.
9469 (ipa_passes): Likewise.
9470 * lto-cgraph.c (lto_output_node): When incrementally linking do not
9471 pass down resolution info.
9472 * common.opt (flag_incremental_link): Update info.
9473 * gcc.c (plugin specs): Turn flinker-output=* to
9474 -plugin-opt=-linker-output-known
9475 * toplev.c (compile_file): Also cut compilation when doing incremental
9477 * flag-types. (enum lto_partition_model): Add
9478 LTO_LINKER_OUTPUT_NOLTOREL.
9479 (invoke.texi): Add -flinker-output docs.
9480 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
9481 link same way as WPA; do not stream in dead initializers.
9483 * dwarf2out.c (dwarf2out_die_ref_for_decl,
9484 darf2out_register_external_decl): Support incremental link.
9486 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9488 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
9490 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9492 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
9493 it down to simple_object_copy_lto_debug_sections.
9494 (run_gcc): Determine incremental LTO link time and configure
9495 lto1 into non-wpa mode, disable renaming of debug sections.
9497 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
9499 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
9500 descriptions of various incorrectly documented functions.
9502 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
9505 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9506 address check not strict.
9508 2018-05-30 Richard Biener <rguenther@suse.de>
9510 PR tree-optimization/85964
9511 * tracer.c (better_p): Drop initialized count check, we only
9512 call the function with initialized counts now.
9513 (find_best_successor): Do find a best edge if one
9514 has uninitialized count.
9515 (find_best_predecessor): Likewise. Do BB frequency check only
9516 if count is initialized.
9518 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
9520 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
9521 (aarch64_ldrstr_offset_compare): New.
9522 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
9523 load/store orderings.
9524 (aarch64_gen_adjusted_ldpstp): Likewise.
9526 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
9528 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
9529 Check for subset of GENERAL_REGS and FP_REGS.
9530 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
9533 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
9535 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
9536 and wi::to_poly_offset. Add the current offset and then check
9537 whether the sum fits, rather than using an unchecked addition of
9538 a checked term. Check for a shwi rather than a uhwi.
9539 * expr.c (get_bit_range): Use tree_to_poly_uint64.
9540 (store_constructor): Use poly_int_tree_p.
9541 (expand_expr_real_1): Likewise.
9542 * function.c (assign_temp): Likewise.
9543 * fold-const.c (const_binop): Use poly_int_tree_p and
9545 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
9547 * ipa-icf-gimple.c (func_checker::compare_operand): Use
9548 to_poly_offset for MEM offsets.
9549 * ipa-icf.c (sem_variable::equals): Likewise.
9550 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
9551 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
9552 wi::to_poly_offset for BIT_FIELD_REF offsets.
9553 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
9555 * var-tracking.c (emit_note_insn_var_location): Use
9556 tree_to_poly_uint64.
9558 2018-05-29 Jim Wilson <jimw@sifive.com>
9560 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
9562 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
9565 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
9566 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
9568 (sse4_1_round<mode>2): Use nonimmediate_operand
9569 for operand 1 predicate.
9571 2018-05-29 Martin Sebor <msebor@redhat.com>
9572 Richard Biener <rguenther@suse.de>
9575 * calls.c (get_size_range): Call determine_value_range instead
9576 of get_value_range..
9577 * tree-vrp.h (determine_value_range): Declared new function.
9578 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
9580 2018-05-29 Richard Biener <rguenther@suse.de>
9582 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
9583 sure to use non-pattern stmts for get_earlier_stmt arguments.
9584 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
9585 called on pattern stmts.
9586 (get_later_stmt): Likewise.
9588 2018-05-29 Martin Liska <mliska@suse.cz>
9590 PR gcov-profile/85759
9591 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
9594 2018-05-29 Jakub Jelinek <jakub@redhat.com>
9596 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
9598 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
9602 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
9603 VEC_PACK_FLOAT_EXPR): New tree codes.
9604 * tree-pretty-print.c (op_code_prio): Handle
9605 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
9606 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
9607 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
9608 * tree-inline.c (estimate_operator_cost): Likewise.
9609 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
9610 * fold-const.c (const_binop): Likewise.
9611 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
9612 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
9613 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
9614 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
9615 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
9616 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
9617 * expr.c (expand_expr_real_2): Likewise.
9618 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
9619 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
9620 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
9622 * optabs.c (expand_widen_pattern_expr): For
9623 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
9624 sign from result type rather than operand's type.
9625 (expand_binop_directly): For vec_packu_float_optab and
9626 vec_packs_float_optab allow result type to be different from operand's
9628 * optabs-tree.c (optab_for_tree_code): Handle
9629 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
9630 VEC_PACK_FLOAT_EXPR. Formatting fixes.
9631 * tree-vect-generic.c (expand_vector_operations_1): Handle
9632 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
9633 VEC_PACK_FLOAT_EXPR.
9634 * tree-vect-stmts.c (supportable_widening_operation): Handle
9636 (supportable_narrowing_operation): Handle FLOAT_EXPR.
9637 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
9638 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
9639 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
9640 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
9642 (vec_pack<floatprefix>_float_<mode>): New expander.
9643 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
9645 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
9646 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
9647 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
9648 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
9649 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
9651 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
9652 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
9653 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
9654 VEC_PACK_FLOAT_EXPR): Document.
9656 2018-05-29 Richard Biener <rguenther@suse.de>
9658 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
9660 (stmt_vec_info_vec): Make pointer.
9661 (init_stmt_vec_info_vec): Remove.
9662 (free_stmt_vec_info_vec): Likewise.
9663 (set_stmt_vec_info_vec): New function.
9664 (free_stmt_vec_infos): Likewise.
9665 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
9666 (set_vinfo_for_stmt): Likewise.
9667 (get_earlier_stmt): Likewise.
9668 (get_later_stmt): Likewise.
9669 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
9670 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
9671 (vec_info::~vec_info): Free stmt_vec_infos.
9672 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
9673 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
9674 (pass_slp_vectorize::execute): Likewise.
9675 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
9676 (free_stmt_vec_info_vec): Likewise.
9677 (set_stmt_vec_info_vec): New function.
9678 (free_stmt_vec_infos): Likewise.
9679 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
9680 the global stmt_vec_info_vec.
9681 * tree-parloops.c (gather_scalar_reductions): Use
9682 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
9685 2018-05-29 Richard Biener <rguenther@suse.de>
9687 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
9689 2018-05-29 Martin Liska <mliska@suse.cz>
9690 David Malcolm <dmalcolm@redhat.com>
9692 * vec.c (test_reverse): New.
9693 (vec_c_tests): Add new test.
9694 * vec.h (vl_ptr>::reverse): New function.
9696 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
9698 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
9700 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
9703 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
9705 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
9707 2018-05-28 Richard Biener <rguenther@suse.de>
9709 PR tree-optimization/85933
9710 * tree-vect-data-refs.c (vect_record_base_alignments): Only
9711 look at stmts marked as vectorizable.
9713 2018-05-28 Richard Biener <rguenther@suse.de>
9715 PR tree-optimization/85934
9716 * tree-vect-generic.c (expand_vector_operations_1): Hoist
9717 vector boolean check before scalar optimization.
9719 2018-05-28 Jakub Jelinek <jakub@redhat.com>
9721 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
9724 2018-05-28 Mark Wielaard <mark@klomp.org>
9726 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
9727 if it is an expression containing a minus sign.
9729 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
9731 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
9733 2018-05-27 Paul Koning <ni1d@arrl.net>
9735 * config/pdp11/pdp11.md (truncsihi2): Remove.
9737 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
9738 Chung-Ju Wu <jasonwucj@gmail.com>
9740 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
9742 (unaligned_store_dw): Ditto.
9743 * config/nds32/nds32-memory-manipulation.c
9744 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
9745 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
9746 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
9747 (emit_setmem_word_loop): Rename to ...
9748 (emit_setmem_doubleword_loop): ... this.
9749 (nds32_gen_dup_4_byte_to_word_value): New function.
9750 (nds32_gen_dup_8_byte_to_double_word_value): New function.
9751 (nds32_expand_setmem_loop): Refine implementation.
9752 (nds32_expand_setmem_loop_v3m): Ditto.
9753 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
9756 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
9758 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
9760 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
9762 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
9763 (nds32_init_machine_status): Initialize machine->attr_naked_p and
9764 machine->attr_no_prologue_p.
9765 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
9766 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
9767 (nds32_expand_epilogue): Consider attr_naked_p.
9768 (nds32_expand_epilogue_v3pop): Likewise.
9769 (nds32_can_use_return_insn): Likewise.
9770 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
9771 attr_no_prologue_p fields.
9772 * config/nds32/nds32.opt (mret-in-naked-func): New option.
9774 2018-05-27 Jakub Jelinek <jakub@redhat.com>
9777 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
9779 * config/i386/sse.md
9780 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
9782 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
9784 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
9786 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
9788 (*<floatsuffix>floatv2div2sf2): Rename to ...
9789 (*float<floatunssuffix>v2div2sf2): ... this.
9790 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
9791 (float<floatunssuffix>v2div2sf2_mask): ... this.
9792 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
9793 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
9794 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
9796 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
9798 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
9800 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
9802 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
9804 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
9806 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
9807 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
9808 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
9809 gen_ufix_truncv8dfv8si2.
9810 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
9811 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
9812 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
9813 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
9814 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
9815 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
9816 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
9817 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
9819 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
9823 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
9825 2018-05-25 Jim Wilson <jimw@sifive.com>
9827 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
9828 * config/riscv/riscv.c (struct machine_function): Add
9829 interrupt_handler_p and attribute_checked_p fields.
9830 (riscv_attribute_table): Add interrupt.
9831 (riscv_interrupt_type_p): New.
9832 (riscv_save_reg_p): Save extra regs for interrupt handler.
9833 (riscv_use_save_libcall): Return false for interrupt handler.
9834 (riscv_first_stack_step): Add forward declaration.
9835 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
9836 for interrupt handler with large frame. Use it for saved reg list.
9837 (riscv_expand_prologue): Move flag_stack_usage_info support to
9838 eliminate duplication.
9839 (riscv_expand_epilogue): Generate mret for interrupt handler.
9840 (riscv_epilogue_uses): New.
9841 (riscv_can_use_return_insn): Return false for interrupt handler.
9842 (riscv_function_ok_for_sibcall): Likewise.
9843 (riscv_set_current_function): Add interrupt handler support.
9844 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
9845 * config/riscv/riscv.md (UNSPECV_MRET): New.
9847 (riscv_frflags, riscv_fsflags): Use tab after opcode.
9849 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
9851 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
9853 PR tree-optimization/85712
9854 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
9855 this candidate has already been replaced in-situ by a copy.
9857 2018-05-25 Jason Merrill <jason@redhat.com>
9859 PR c++/80485 - inline function non-zero address.
9860 * symtab.c (nonzero_address): Check DECL_COMDAT.
9862 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
9865 * config/alpha/alpha.md (ashlsi3): New insn pattern.
9866 (*ashlsi_se): Rename from *ashldi_se. Define as sign
9867 extension of SImode operation. Use const123_operand predicate.
9868 (*saddsi_1): Remove.
9869 (*saddl_se_1): Ditto.
9871 (*ssubl_se_1): Ditto.
9872 * config/alpha/predicates.md (const123_operand): New predicate.
9873 * config/alpha/constraints.md (P): Use IN_RANGE.
9875 2018-05-25 Richard Biener <rguenther@suse.de>
9877 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
9879 (ref_maybe_used_by_stmt_p): Likewise.
9880 (stmt_may_clobber_ref_p): Likewise.
9881 (stmt_may_clobber_ref_p_1): Likewise.
9882 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
9884 (ref_maybe_used_by_stmt_p): Likewise.
9885 (stmt_may_clobber_ref_p): Likewise.
9886 (stmt_may_clobber_ref_p_1): Likewise.
9887 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
9888 the alias oracle to disambiguate DRs with stmts DR analysis
9890 (vect_analyze_data_refs): Do not give up on not analyzable
9891 DRs for BB vectorization. Remove code truncating the dataref
9894 2018-05-25 Jakub Jelinek <jakub@redhat.com>
9897 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
9898 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
9899 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
9901 2018-05-25 Richard Biener <rguenther@suse.de>
9903 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
9904 function, combining stmt data ref gathering and fatal analysis
9906 (vect_analyze_data_refs): Remove now redudnant code and simplify.
9907 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
9908 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
9909 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
9910 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
9912 2018-05-25 Bin Cheng <bin.cheng@arm.com>
9914 PR tree-optimization/85720
9915 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
9916 SCC if all partitions are builtins.
9917 (version_loop_by_alias_check): New parameter. Generate cancelable
9918 runtime alias check if all partitions are builtins.
9919 (distribute_loop): Update call to above function.
9921 2018-05-25 Bin Cheng <bin.cheng@arm.com>
9923 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
9924 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
9925 (parm_default_def_partition_arg): Ditto.
9926 (set_parm_default_def_partition): Ditto.
9927 (get_parm_default_def_partitions): Ditto and make it static.
9928 (get_undefined_value_partitions): Ditto and make it static.
9929 (remove_ssa_form): Refactor call to init_var_map here.
9930 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
9931 computation for loop region.
9932 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
9933 (register_default_def): Delete.
9934 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
9935 (parm_default_def_partition_arg): Ditto.
9936 (set_parm_default_def_partition): Ditto.
9937 (get_parm_default_def_partitions): Ditto and make it static.
9938 (get_undefined_value_partitions): Ditto and make it static.
9939 (coalesce_with_default, coalesce_with_default): Update comment.
9940 (create_coalesce_list_for_region): New func factored out from
9941 create_outofssa_var_map.
9942 (populate_coalesce_list_for_outofssa): New func factored out from
9943 create_outofssa_var_map and coalesce_ssa_name.
9944 (create_outofssa_var_map): Delete.
9945 (coalesce_ssa_name): Refactor to support live range computation.
9946 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
9947 (get_parm_default_def_partitions): Delete.
9948 (get_undefined_value_partitions): Ditto.
9949 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
9950 computation for loop region.
9951 (new_tree_live_info, loe_visit_block): Ditto.
9952 (live_worklist, set_var_live_on_entry): Ditto.
9953 (calculate_live_on_exit, verify_live_on_entry): Ditto.
9954 * tree-ssa-live.h (struct _var_map): New fields.
9955 (init_var_map): Change decl.
9956 (region_contains_p): New.
9958 2018-05-25 Bin Cheng <bin.cheng@arm.com>
9960 * tree-ssa-live.h (live_merge_and_clear): Delete.
9962 2018-05-25 Richard Biener <rguenther@suse.de>
9965 * tree-dump.c (dequeue_and_dump): Remove access to removed
9966 operand 2 of a SWITCH_EXPR.
9968 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
9970 * doc/sourcebuild.texi (vect_double_cond_arith): Include
9971 multiplication and division.
9972 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
9973 (cond_udiv@var{m}, cond_umod@var{m}): Document.
9974 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
9975 (cond_udiv_optab, cond_umod_optab): New optabs.
9976 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
9977 (IFN_COND_RDIV): New internal functions.
9978 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
9979 TRUNC_MOD_EXPR and RDIV_EXPR.
9980 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
9981 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
9983 (SVE_INT_BINARY): Include mult.
9984 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
9985 (optab, sve_int_op): Handle mult.
9986 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
9988 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
9989 for SVE_INT_BINARY_SD.
9991 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
9993 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
9994 (optab, sve_int_op): Handle div and udiv.
9995 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
9996 for SVE_INT_BINARY_SD.
9997 (*<optab><mode>3): New insn for the same.
9999 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10001 * tree-vect-patterns.c: Include predict.h.
10002 (vect_recog_divmod_pattern): Restrict check for division support
10003 to when optimizing for size.
10005 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10007 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
10008 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
10009 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
10010 (gimple_match_op::set_op): Likewise.
10011 (gimple_resimplify4): Declare.
10012 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
10013 (expr::gen_transform): Likewise.
10014 (decision_tree::gen): Generate a simplification routine for 4 operands.
10015 * gimple-match-head.c (gimple_simplify): Add an overload for
10016 4 operands. In the top-level function, handle up to 4 call
10017 arguments and call gimple_resimplify4.
10018 (gimple_resimplify4): New function.
10019 (build_call_internal): Pass a fourth operand.
10020 (maybe_push_to_seq): Likewise.
10021 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
10022 Fold VEC_COND_EXPRs of an operation and a default value into
10023 an IFN_COND_* function if possible.
10024 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
10026 (SVE_COND_FP_BINARY): Include them.
10027 (optab, sve_fp_op): Handle them.
10028 (SVE_INT_BINARY_REV): New code iterator.
10029 (SVE_COND_FP_BINARY_REV): New int iterator.
10030 (commutative): New int attribute.
10031 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
10033 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
10035 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
10036 (*cond_<optab><mode>): New patterns for reversed operands.
10038 2018-05-25 Richard Biener <rguenther@suse.de>
10040 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
10041 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
10042 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
10043 (STMT_VINFO_GROUPED_ACCESS): Adjust.
10044 * tree-vect-data-refs.c (everywhere): Adjust users.
10045 * tree-vect-loop.c (everywhere): Likewise.
10046 * tree-vect-slp.c (everywhere): Likewise.
10047 * tree-vect-stmts.c (everywhere): Likewise.
10048 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
10050 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10052 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
10054 (gcc_cv_as_section_exclude): ... this.
10055 Try Solaris as #exclude syntax.
10056 * configure: Regenerate.
10057 * config.in: Regenerate.
10058 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
10060 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
10061 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
10063 * varasm.c (default_elf_asm_named_section): Don't check if
10064 HAVE_GAS_SECTION_EXCLUDE is defined.
10066 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10068 * doc/md.texi: Update the documentation of the cond_* optabs
10069 to mention the new final operand. Fix GET_MODE_NUNITS call.
10070 Describe the scalar case too.
10071 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
10072 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
10074 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
10075 (get_conditional_internal_fn): Update comment.
10076 * tree-vect-loop.c (vectorizable_reduction): Pass the original
10077 accumulator value as a final argument to conditional functions.
10078 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
10079 a define_expand and add an "else" operand. Assert for now that
10080 the else operand is equal to operand 2. Use SVE_INT_BINARY and
10081 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
10082 (*cond_<optab><mode>): New patterns.
10083 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
10084 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
10085 (UNSPEC_COND_EOR): Delete.
10086 (optab): Remove associated mappings.
10087 (SVE_INT_BINARY): New code iterator.
10088 (sve_int_op): Remove int attribute and add "minus" to the code
10090 (SVE_COND_INT_OP): Delete.
10091 (SVE_COND_FP_OP): Rename to...
10092 (SVE_COND_FP_BINARY): ...this.
10094 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10096 * optabs.c (can_reuse_operands_p): New function.
10097 (maybe_legitimize_operands): Try to reuse the results for
10100 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
10102 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
10103 Add {q} suffix to insn mnemonic.
10105 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10107 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
10108 (msp430_warn_func_return): New.
10110 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
10112 * fold-const.c (tree_nonzero_bits): New function.
10113 * fold-const.h (tree_nonzero_bits): Likewise.
10114 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
10115 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
10117 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
10121 * varasm.c (assemble_alias): Check ifunc_resolver only on
10124 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
10127 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
10128 when memory input operand is handled.
10130 2018-05-24 Luis Machado <luis.machado@linaro.org>
10132 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
10134 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
10136 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
10138 * match.pd: Delay FMA folds until after vectorization.
10140 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
10143 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10144 address check not strict.
10146 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
10148 * gimple-match.h (gimple_match_op): New class.
10149 (mprts_hook): Replace parameters with a gimple_match_op *.
10150 (maybe_build_generic_op): Likewise.
10151 (gimple_simplified_result_is_gimple_val): Replace parameters with
10152 a const gimple_match_op *.
10153 (gimple_simplify): Replace code_helper * and tree * parameters with
10154 a gimple_match_op * parameter.
10155 (gimple_resimplify1): Replace code_helper *, tree and tree *
10156 parameters with a gimple_match_op * parameter.
10157 (gimple_resimplify2): Likewise.
10158 (gimple_resimplify3): Likewise.
10159 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
10160 parameters with a gimple_match_op * parameter.
10161 * gimple-match-head.c (gimple_simplify): Change prototypes of
10162 auto-generated functions to take a gimple_match_op * instead of
10163 separate code_helper * and tree * parameters. Make the same
10164 change in the top-level overload and update calls to the
10165 gimple_resimplify routines. Update calls to the auto-generated
10166 functions and to maybe_push_res_to_seq in the publicly-facing
10167 operation-specific gimple_simplify overloads.
10168 (gimple_match_op::MAX_NUM_OPS): Define.
10169 (gimple_resimplify1): Replace rcode and ops with a single res_op
10170 parameter. Update call to gimple_simplify.
10171 (gimple_resimplify2): Likewise.
10172 (gimple_resimplify3): Likewise.
10173 (mprts_hook): Replace parameters with a gimple_match_op *.
10174 (maybe_build_generic_op): Likewise.
10175 (build_call_internal): Replace type, nargs and ops with
10176 a gimple_match_op *.
10177 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
10178 with a single gimple_match_op *. Update calls to mprts_hook,
10179 build_call_internal and gimple_simplified_result_is_gimple_val.
10180 Factor out code that is common to the tree_code and combined_fn cases.
10181 * genmatch.c (expr::gen_transform): Replace tem_code and
10182 tem_ops with a gimple_match_op called tem_op. Update calls
10183 to the gimple_resimplify functions and maybe_push_res_to_seq.
10184 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
10185 res_ops. Update call to the gimple_resimplify functions.
10186 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
10187 (decision_tree::gen): Make the functions take a gimple_match_op *
10188 called res_op instead of separate res_code and res_ops parameters.
10189 Update call accordingly.
10190 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
10191 and ops with a single res_op parameter. Update calls to
10192 maybe_build_generic_op and maybe_push_res_to_seq.
10193 (fold_stmt_1): Update calls to gimple_simplify and
10194 replace_stmt_with_simplification.
10195 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
10196 and gimple_simplified_result_is_gimple_val.
10197 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
10199 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
10200 with a gimple_match_op *.
10201 (vn_nary_build_or_lookup): Likewise. Update call to
10202 vn_nary_build_or_lookup_1.
10203 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
10204 gimple_match_op *. Update calls to the gimple_resimplify routines
10205 and to gimple_simplified_result_is_gimple_val.
10206 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
10207 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
10208 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
10209 (visit_nary_op): Likewise.
10210 (visit_reference_op_load): Likewise.
10212 2018-05-23 Luis Machado <luis.machado@linaro.org>
10214 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
10215 modifier for printing the step amount.
10217 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
10220 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
10223 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
10225 * doc/sourcebuild.texi (Endianness): New subsubsection.
10227 2018-05-23 Luis Machado <luis.machado@linaro.org>
10229 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10230 <prefetch_dynamic_strides>: New const bool field.
10231 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10232 prefetch_dynamic_strides.
10233 (exynosm1_prefetch_tune): Likewise.
10234 (thunderxt88_prefetch_tune): Likewise.
10235 (thunderx_prefetch_tune): Likewise.
10236 (thunderx2t99_prefetch_tune): Likewise.
10237 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
10239 (aarch64_override_options_internal): Update to set
10240 PARAM_PREFETCH_DYNAMIC_STRIDES.
10241 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10242 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10243 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10244 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10245 prefetch-dynamic-strides setting.
10247 2018-05-23 Luis Machado <luis.machado@linaro.org>
10249 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10250 <minimum_stride>: New const int field.
10251 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10252 minimum_stride field defaulting to -1.
10253 (exynosm1_prefetch_tune): Likewise.
10254 (thunderxt88_prefetch_tune): Likewise.
10255 (thunderx_prefetch_tune): Likewise.
10256 (thunderx2t99_prefetch_tune): Likewise.
10257 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
10258 <default_opt_level>: Set to 3.
10259 (aarch64_override_options_internal): Update to set
10260 PARAM_PREFETCH_MINIMUM_STRIDE.
10261 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10262 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10263 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10264 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10265 stride is constant and is below the minimum stride threshold.
10267 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10269 * config/arm/arm-cpus.in (mode26): Delete.
10270 (armv4): Delete mode26 reference.
10271 * config/arm/arm.c (arm_configure_build_target): Delete use of
10274 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
10276 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
10278 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
10279 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
10281 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
10282 (floatunsdidf2): Ditto.
10284 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
10286 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
10287 (fixuns_trunc<mode>si2_avx512f): Ditto.
10288 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
10289 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
10290 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
10292 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
10294 PR rtl-optimization/79985
10295 * df-scan.c (df_insn_refs_collect): Remove special case for
10296 global registers and asm statements.
10298 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
10300 * extend.texi (Global Register Variables): Rewrite the bullet list.
10301 Note that the register is available for allocation. Note that access
10302 via inline asm must use constraints. Add note about async-signal
10303 handlers. Remove paragraph about automagic register selection.
10305 2018-05-23 Richard Biener <rguenther@suse.de>
10307 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
10308 of fixed offset from memset VN.
10310 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
10312 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
10313 first_interp field.
10314 (alloc_cand_and_find_basis): Initialize first_interp field.
10315 (slsr_process_mul): Modify first_interp field.
10316 (slsr_process_add): Likewise.
10317 (slsr_process_cast): Modify first_interp field for each new
10319 (slsr_process_copy): Likewise.
10320 (dump_candidate): Dump first_interp field.
10321 (replace_mult_candidate): Process all interpretations, not just
10323 (replace_rhs_if_not_dup): Likewise.
10324 (replace_one_candidate): Likewise.
10326 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
10328 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
10330 (aarch64_needs_frame_chain): New function.
10331 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
10333 2018-05-23 Sudakshina Das <sudi.das@arm.com>
10336 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
10337 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
10338 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
10339 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
10340 as true for strict-align.
10341 (aarch64_can_inline_p): Perform checks even when callee has no
10342 attributes to check for strict alignment.
10343 * doc/extend.texi (AArch64 Function Attributes): Document
10345 * doc/invoke.texi: (AArch64 Options): Likewise.
10347 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
10349 PR tree-optimization/85853
10350 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
10351 the handling of the root of the node to...
10352 (vect_slp_analyze_node_operations_1): ...this new function,
10353 and run the whole thing with the child nodes' def types
10354 set according to their SLP node's def type.
10356 2018-05-23 Richard Biener <rguenther@suse.de>
10358 PR middle-end/85874
10359 * tree-data-ref.c (create_runtime_alias_checks): Defer
10360 and ignore overflow warnings.
10362 2018-05-23 Yury Gribov <tetra2005@gmail.com>
10364 PR tree-optimization/85822
10365 * tree-vrp.c (is_masked_range_test): Fix handling of negative
10368 2018-05-23 Richard Biener <rguenther@suse.de>
10370 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
10371 memset constants via native_interpret_expr.
10373 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
10376 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
10378 (cgraph_node::create_alias): Likewise.
10379 (cgraph_node::get_availability): Check ifunc_resolver instead
10380 of looking up ifunc attribute.
10381 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
10382 * varasm.c (do_assemble_alias): Likewise.
10383 (assemble_alias): Likewise.
10384 (default_binds_local_p_3): Likewise.
10385 * cgraph.h (cgraph_node): Add ifunc_resolver.
10386 (cgraph_node::only_called_directly_or_aliased_p): Return false
10387 for IFUNC resolver.
10388 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
10390 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
10391 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
10392 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
10393 instead of looking up ifunc attribute.
10395 2018-05-22 Luis Machado <luis.machado@linaro.org>
10397 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
10399 2018-05-22 Martin Sebor <msebor@redhat.com>
10401 PR middle-end/85359
10402 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
10403 only when expasion succeeds.
10404 (expand_builtin_strcmp): Same.
10405 (expand_builtin_strncmp): Same.
10407 2018-05-22 Martin Sebor <msebor@redhat.com>
10409 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
10411 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
10412 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10414 * config/aarch64/aarch64-ldpstp.md: Replace uses of
10415 aarch64_mem_pair_operand with memory_operand and delete operand swapping
10417 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
10418 Add check for legitimate_address.
10419 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
10420 (aarch64_swap_ldrstr_operands): New.
10421 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
10424 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
10425 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10427 * config/aarch64/aarch64.md: New patterns to generate stp
10429 (store_pair_sw, store_pair_dw): New patterns to generate stp for
10430 single words and double words.
10431 (load_pair_sw, load_pair_dw): Likewise.
10432 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
10434 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
10436 * config/aarch64/aarch64-ldpstp.md: Modify peephole
10437 for different mode ldpstp and add peephole for merged zero stores.
10438 Likewise for loads.
10439 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
10441 (aarch64_gen_store_pair): Rename calls to match new patterns.
10442 (aarch64_gen_load_pair): Rename calls to match new patterns.
10443 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
10444 (load_pair<DREG:mode><DREG2:mode>): ... This.
10445 (store_pair<mode>): Rename to...
10446 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
10447 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
10448 New mode iterators.
10449 (V_INT_EQUIV): Handle SImode.
10450 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
10453 2018-05-22 Martin Sebor <msebor@redhat.com>
10456 * calls.c (maybe_warn_nonstring_arg): Use string length to set
10457 or ajust the presumed bound on an operation to avoid unnecessary
10460 2018-05-22 Martin Sebor <msebor@redhat.com>
10462 PR tree-optimization/85826
10463 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
10464 assuming that a DECL necesarily has a constant size.
10466 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
10468 PR middle-end/85862
10469 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
10471 2018-05-22 Richard Biener <rguenther@suse.de>
10473 PR tree-optimization/85834
10474 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
10475 non-constant and non-zero memset arguments.
10477 2018-05-22 Martin Liska <mliska@suse.cz>
10480 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
10482 2018-05-22 Richard Biener <rguenther@suse.de>
10484 PR tree-optimization/85863
10485 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
10486 comparisons when vectype is specified.
10487 (vectorizable_condition): Do not specify vectype for
10488 vect_is_simple_cond when SLP vectorizing.
10490 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
10493 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
10494 define __ibm128 as long double.
10495 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
10496 as a distinct type when IEEE 128-bit support is enabled.
10497 (init_float128_ieee): Fix up conversions between IFmode and IEEE
10498 128-bit types to use the correct functions.
10499 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
10500 convert between 128-bit floating point types that have different
10501 modes but the same representation, instead of using gen_lowpart to
10503 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
10505 (IFKF_reg): New attributes to give the register constraints for
10507 (extend<mode>tf2_internal): New insns to mark an explicit
10508 conversion between 128-bit floating point types that have a
10509 different mode but share the same representation.
10511 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
10513 PR tree-optimization/85814
10514 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
10515 a null return from get_strinfo when unsharing the next
10516 strinfo in the chain.
10518 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
10521 * varasm.c (weak_finish): Clean up weak_decls.
10523 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10525 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
10526 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
10527 UNSPEC_UADALP values.
10528 * config/aarch64/iterators.md (ABAL): New int iterator.
10531 (sur): Add mappings for the above.
10532 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
10534 (aarch64_<sur>abal<mode>_4): Likewise.
10535 (aarch64_<sur>adalp<mode>_3): Likewise.
10536 (<sur>sadv16qi): New define_expand.
10538 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
10540 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
10541 (*movdf_internal): Ditto.
10542 (*rcpsf2_sse): Ditto.
10543 (*rsqrtsf2_sse): Ditto.
10544 (*sqrt<mode>2_sse): Ditto.
10546 2018-05-21 Tamar Christina <tamar.christina@arm.com>
10548 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
10550 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
10551 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
10552 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
10553 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
10555 * config/aarch64/arm_neon.h: Likewise.
10556 * config/aarch64/iterators.md (VQ_I): New.
10558 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
10560 * config.gcc: Add arc/t-multilib-linux to tmake_file for
10562 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
10565 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
10567 * config/nds32/constraints.md (S): New constraint.
10568 * config/nds32/nds32.md (call_internal): Use constraint S.
10569 (call_value_internal): Likewise.
10570 (sibcall_internal): Likewise.
10571 (sibcall_value_internal): Likewise.
10573 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
10574 Chung-Ju Wu <jasonwucj@gmail.com>
10576 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
10577 into consideration.
10579 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
10580 Chung-Ju Wu <jasonwucj@gmail.com>
10582 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
10583 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
10584 (nds32_rtx_costs_impl): Simplify.
10585 (nds32_address_cost_impl): Simplify.
10586 (nds32_init_rtx_costs): New function.
10587 (nds32_rtx_costs_speed_prefer): Likewise.
10588 (nds32_rtx_costs_size_prefer): Likewise.
10589 (nds32_address_cost_speed_prefer): Likewise.
10590 (nds32_address_cost_speed_fwprop): Likewise.
10591 (nds32_address_cost_size_prefer): Likewise.
10592 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
10593 * config/nds32/nds32.c (nds32_option_override): Use
10594 nds32_init_rtx_costs function.
10596 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
10598 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
10599 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
10600 (TARGET_PIPELINE_N8): Likewise.
10601 (TARGET_PIPELINE_N10): Likewise.
10602 (TARGET_PIPELINE_N13): Likewise.
10603 (TARGET_PIPELINE_GRAYWOLF): Likewise.
10605 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
10607 * config/nds32/nds32-fpu.md: Update copyright year.
10609 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10611 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
10613 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10615 * config/nds32/nds32.c
10616 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
10617 * config/nds32/nds32.opt (minline-asm-r15): New option.
10619 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10621 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
10623 * config/nds32/nds32.md (abssi2): New pattern.
10625 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
10627 * config/i386/i386.md (rex64namesuffix): New mode attribute.
10628 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
10629 Merge insn pattern from sse_cvtsi2ss<round_name> and
10630 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
10631 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
10632 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
10633 using SWI48 mode iterator.
10634 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
10635 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
10636 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
10637 pattern from sse_cvttss2si<round_saeonly_name>
10638 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
10639 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
10640 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
10641 using SWI48 mode iterator.
10642 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
10643 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
10644 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
10645 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
10646 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
10647 using SWI48 mode iterator.
10648 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
10649 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
10650 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
10651 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
10652 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
10653 SWI48 mode iterator.
10654 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
10655 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
10656 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
10657 pattern from sse_cvttsd2si<round_saeonly_name>
10658 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
10660 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10662 * config/nds32/nds32-md-auxiliary.c
10663 (nds32_valid_smw_lwm_base_p): Refine.
10664 (nds32_output_smw_single_word): Refine.
10665 (nds32_output_smw_double_word): New.
10666 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
10668 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10670 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
10671 (nds32_output_stack_pop): Refine.
10672 (nds32_expand_unaligned_load): Refine.
10673 (nds32_expand_unaligned_store): Refine.
10675 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
10676 Chung-Ju Wu <jasonwucj@gmail.com>
10678 * config/nds32/constants.md: Add TP_REGNUM constant.
10679 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
10680 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
10682 * config/nds32/nds32-doubleword.md: Consider flag_pic.
10683 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
10684 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
10685 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
10686 and PIC code generation.
10687 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
10689 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
10691 * config/nds32/nds32.md: Support TLS and PIC.
10692 * config/nds32/nds32.c: Support TLS and PIC.
10693 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
10694 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
10697 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10699 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
10700 mode with E_ prefix.
10702 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
10703 Chung-Ju Wu <jasonwucj@gmail.com>
10705 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
10706 * config/nds32/nds32-md-auxiliary.c
10707 (symbolic_reference_mentioned_p): New.
10708 (nds32_legitimize_ict_address): New.
10709 (nds32_expand_ict_move): New.
10710 (nds32_indirect_call_referenced_p): New.
10711 (nds32_symbol_binds_local_p): Delete.
10712 (nds32_long_call_p): Modify.
10713 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
10714 * config/nds32/nds32-protos.h
10715 (symbolic_reference_mentioned_p): Declare.
10716 (nds32_legitimize_ict_address): Declare.
10717 (nds32_expand_ict_move): Declare.
10718 (nds32_indirect_call_referenced_p): Declare.
10719 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
10720 (nds32_relax_group): Use nds32_ict_const_p as condition.
10721 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
10722 (nds32_asm_file_start): Output ict_model directive in asm code.
10723 (nds32_legitimate_address_p): Consider indirect call.
10724 (nds32_print_operand): Consider indirect call.
10725 (nds32_print_operand_address): Consider indirect call.
10726 (nds32_insert_attributes): Handle "indirect_call" attribute.
10727 (TARGET_LEGITIMATE_ADDRESS_P): Define.
10728 (TARGET_LEGITIMATE_CONSTANT_P): Define.
10729 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
10730 (TARGET_DELEGITIMIZE_ADDRESS): Define.
10731 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
10732 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
10733 (TARGET_ICT_MODEL_SMALL): Define.
10734 (TARGET_ICT_MODEL_LARGE): Define.
10735 * config/nds32/nds32.md (movsi): Consider ict model.
10736 (call, call_value): Consider ict model.
10737 (sibcall, sibcall_value): Consider ict model.
10738 * config/nds32/nds32.opt (mict-model): New option.
10739 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
10742 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
10743 Monk Chiang <sh.chiang04@gmail.com>
10744 Jim Wilson <jimw@sifive.com>
10746 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
10747 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
10748 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
10749 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
10750 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
10751 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
10752 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
10753 compute save_libcall_adjustment properly.
10754 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
10755 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
10756 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
10757 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
10758 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
10759 (ABI_SPEC): Handle mabi=ilp32e.
10760 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
10761 (RVE): Add RVE mask.
10762 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
10763 <-march>: Add rv32e as an example.
10765 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
10768 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
10769 (intra_create_variable_infos): Handle C++ constructors.
10771 2018-05-18 Martin Liska <mliska@suse.cz>
10773 * passes.def: Remove a redundant pass.
10775 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
10778 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
10780 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10782 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
10784 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
10786 (armv2, armv2a, armv3, armv3m): Delete architectures.
10787 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
10788 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
10789 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
10791 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
10792 (*mulsidi3adddi): Likewise.
10793 (mulsidi3): Likewise.
10794 (*mulsidi3_nov6): Likewise.
10795 (umulsidi3): Likewise.
10796 (umulsidi3_nov6): Likewise.
10797 (umaddsidi4): Likewise.
10798 (*umulsidi3adddi): Likewise.
10799 (smulsi3_highpart): Likewise.
10800 (*smulsi3_highpart_nov6): Likewise.
10801 (umulsi3_highpart): Likewise.
10802 (*umulsi3_highpart_nov6): Likewise.
10803 * config/arm/arm.h (arm_arch3m): Delete.
10804 * config/arm/arm.c (arm_arch3m): Delete.
10805 (arm_option_override_internal): Update armv3-related comment.
10806 (arm_configure_build_target): Delete use of isa_bit_mode32.
10807 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
10808 (arm_rtx_costs_internal): Delete check of arm_arch3m.
10809 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
10810 (mulsa3): Likewise.
10811 (mulusa3): Likewise.
10812 * config/arm/arm-protos.h (arm_arch3m): Delete.
10813 * config/arm/arm-tables.opt: Regenerate.
10814 * config/arm/arm-tune.md: Likewise.
10815 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
10816 deleted architectures.
10818 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10820 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
10821 (armv5t, armv5te): New features.
10822 (ARMv5, ARMv5e): Delete fgroups.
10823 (ARMv5t, ARMv5te): Adjust for above changes.
10824 (ARMv6m): Likewise.
10825 (armv5, armv5e): Delete arches.
10826 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
10828 (*call_reg_arm): Likewise.
10829 (*call_value_reg_armv5): Likewise.
10830 (*call_value_reg_arm): Likewise.
10831 (*call_symbol): Likewise.
10832 (*call_value_symbol): Likewise.
10833 (*sibcall_insn): Likewise.
10834 (*sibcall_value_insn): Likewise.
10835 (clzsi2): Likewise.
10836 (prefetch): Likewise.
10837 (define_split and define_peephole2 dependent on arm_arch5):
10839 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
10841 (TARGET_ARM_QBIT): Likewise.
10842 (TARGET_DSP_MULTIPLY): Likewise.
10843 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
10844 (arm_arch5, arm_arch5e): Delete.
10845 (arm_arch5t, arm_arch5te): Declare.
10846 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
10847 (arm_arch5t): Declare.
10848 (arm_option_reconfigure_globals): Update for the above.
10849 (arm_options_perform_arch_sanity_checks): Update comment, replace
10850 use of arm_arch5 with arm_arch5t.
10851 (use_return_insn): Likewise.
10852 (arm_emit_call_insn): Likewise.
10853 (output_return_instruction): Likewise.
10854 (arm_final_prescan_insn): Likewise.
10855 (arm_coproc_builtin_available): Likewise.
10856 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
10857 arm_arch5e with arm_arch5t and arm_arch5te.
10858 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
10859 (arm_arch5t, arm_arch5te): Declare.
10860 * config/arm/arm-tables.opt: Regenerate.
10861 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
10862 * config/arm/t-multilib: Likewise.
10863 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
10864 instead of arm_arch5.
10865 (*call_reg_thumb1): Likewise.
10866 (*call_value_reg_thumb1_v5): Likewise.
10867 (*call_value_reg_thumb1): Likewise.
10868 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
10870 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
10872 2018-05-18 Martin Liska <mliska@suse.cz>
10874 PR gcov-profile/84846
10875 * doc/gcov.texi: Document -t option of gcov tool.
10877 2018-05-18 Martin Liska <mliska@suse.cz>
10879 PR gcov-profile/84846
10880 * gcov.c (print_usage): Add new -t option.
10881 (process_args): Handle the option.
10882 (generate_results): Use stdout as output when requested by
10885 2018-05-18 Martin Liska <mliska@suse.cz>
10887 PR gcov-profile/84846
10888 * coverage.c (coverage_init): Write PWD to .gcno file.
10889 * doc/gcov.texi: Document how working directory is printed.
10890 * gcov-dump.c (dump_gcov_file): Print PWD.
10891 * gcov.c (output_intermediate_file): Likewise.
10892 (read_graph_file): Read PWD string.
10893 (output_lines): Print PWD.
10895 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
10897 PR middle-end/85817
10898 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
10899 for retval and return false if all args to phi are zero.
10901 2018-05-18 Richard Biener <rguenther@suse.de>
10903 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
10905 (evrp_dom_walker::before_dom_children): Call it.
10907 2018-05-18 Richard Biener <rguenther@suse.de>
10909 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
10910 results when processing array refs with variable index.
10912 2018-05-18 Toon Moene <toon@moene.org>
10914 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
10915 directly after that of -floop-interchange. Indicate that both
10916 options are enabled by default when specifying -O3.
10918 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10920 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
10921 iterator. Delete separate integer-mode vec_set<mode> expander.
10922 (aarch64_simd_vec_setv2di): Delete.
10923 (vec_setv2di): Delete.
10924 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
10925 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
10926 the "w, r" alternative.
10928 2018-05-18 Martin Liska <mliska@suse.cz>
10930 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
10931 * tree-pass.h (make_pass_lower_switch_O0): New function.
10932 * tree-switch-conversion.c (node_has_low_bound): Remove.
10933 (node_has_high_bound): Likewise.
10934 (node_is_bounded): Likewise.
10935 (class pass_lower_switch): Make it a template type and create
10937 (pass_lower_switch::execute): Add template argument.
10938 (make_pass_lower_switch): New function.
10939 (make_pass_lower_switch_O0): New function.
10940 (do_jump_if_equal): Remove.
10941 (emit_case_nodes): Simplify to just handle all 3 cases and leave
10942 all the hard work to tree optimization passes.
10944 2018-05-18 Martin Liska <mliska@suse.cz>
10946 * dbgcnt.c (limit_low): Renamed from limit.
10947 (limit_high): New variable.
10948 (dbg_cnt_is_enabled): Check for upper limit.
10949 (dbg_cnt): Adjust dumping.
10950 (dbg_cnt_set_limit_by_index): Add new argument for high
10952 (dbg_cnt_set_limit_by_name): Likewise.
10953 (dbg_cnt_process_single_pair): Parse new format.
10954 (dbg_cnt_process_opt): Use strtok.
10955 (dbg_cnt_list_all_counters): Remove 'value' and add
10957 * doc/invoke.texi: Document changes.
10959 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
10961 * doc/sourcebuild.texi (scalar_all_fma): Document.
10962 * tree.def (FMA_EXPR): Delete.
10963 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
10964 * internal-fn.c (ternary_direct): New macro.
10965 (expand_ternary_optab_fn): Likewise.
10966 (direct_ternary_optab_supported_p): Likewise.
10967 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
10968 * builtins.c (fold_builtin_fma): Delete.
10969 (fold_builtin_3): Don't call it.
10970 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
10971 * expr.c (expand_expr_real_2): Likewise.
10972 * fold-const.c (operand_equal_p): Likewise.
10973 (fold_ternary_loc): Likewise.
10974 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
10975 * gimple.c (DEFTREECODE): Likewise.
10976 * gimplify.c (gimplify_expr): Likewise.
10977 * optabs-tree.c (optab_for_tree_code): Likewise.
10978 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
10979 * tree-eh.c (operation_could_trap_p): Likewise.
10980 (stmt_could_throw_1_p): Likewise.
10981 * tree-inline.c (estimate_operator_cost): Likewise.
10982 * tree-pretty-print.c (dump_generic_node): Likewise.
10983 (op_code_prio): Likewise.
10984 * tree-ssa-loop-im.c (stmt_cost): Likewise.
10985 * tree-ssa-operands.c (get_expr_operands): Likewise.
10986 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
10987 * fold-const-call.h (fold_fma): Delete.
10988 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
10989 CFN_FNMA and CFN_FNMS.
10990 (fold_fma): Delete.
10991 * genmatch.c (combined_fn): New enum.
10992 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
10993 (commutative_op): New function.
10994 (commutate): Use it. Handle more than 2 operands.
10995 (dt_operand::gen_gimple_expr): Use commutative_op.
10996 (parser::parse_expr): Allow :c to be used with non-binary
10997 operators if the commutative operand is known.
10998 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
10999 CFN_FMS, CFN_FNMA and CFN_FNMS.
11000 (backprop::process_assign_use): Remove FMA_EXPR handling.
11001 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
11002 (gen_hsa_fma): New function.
11003 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
11004 IFN_FNMA and IFN_FNMS.
11005 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
11006 * gimple-fold.h (follow_all_ssa_edges): Declare.
11007 * gimple-fold.c (follow_all_ssa_edges): New function.
11008 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
11009 gimple_build interface and use follow_all_ssa_edges to fold the result.
11010 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
11011 instead of checking for optabs directly.
11012 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
11013 rather than FMA_EXPRs.
11014 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
11015 call to IFN_FMA instead of an FMA_EXPR.
11017 2018-05-17 Jim Wilson <jimw@sifive.com>
11019 * expr.c (do_tablejump): When converting index to Pmode, if we have a
11020 sign extended promoted subreg, and the range does not have the sign bit
11021 set, then do a sign extend.
11023 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
11024 test, check for sign extended subreg and/or constant operands, and
11025 do a sign extend in that case.
11027 2018-05-17 Steve Ellcey <sellcey@cavium.com>
11029 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
11030 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
11032 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
11033 Change logics_shift_reg to logics_shift_imm.
11034 (thunderx2t99_fp_loadpair_basic): Delete.
11035 (thunderx2t99_fp_storepair_basic): Delete.
11036 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
11037 (thunderx2t99_asimd_polynomial): Delete.
11038 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
11039 and neon_fp_mul_d_scalar_q.
11040 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
11041 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
11042 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
11043 (thunderx2t99_asimd_lut): Add missing tbl types.
11044 (thunderx2t99_asimd_ext): Delete.
11045 (thunderx2t99_asimd_load1_1_mult): Delete.
11046 (thunderx2t99_asimd_load1_2_mult): Delete.
11047 (thunderx2t99_asimd_load1_ldp): New.
11048 (thunderx2t99_asimd_load1): New.
11049 (thunderx2t99_asimd_load2): Add missing *load2* types.
11050 (thunderx2t99_asimd_load3): New.
11051 (thunderx2t99_asimd_load4): New.
11052 (thunderx2t99_asimd_store1_1_mult): Delete.
11053 (thunderx2t99_asimd_store1_2_mult): Delete.
11054 (thunderx2t99_asimd_store2_mult): Delete.
11055 (thunderx2t99_asimd_store2_onelane): Delete.
11056 (thunderx2t99_asimd_store_stp): New.
11057 (thunderx2t99_asimd_store1): New.
11058 (thunderx2t99_asimd_store2): New.
11059 (thunderx2t99_asimd_store3): New.
11060 (thunderx2t99_asimd_store4): New.
11062 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
11064 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
11065 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
11067 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
11068 Segher Boessenkool <segher@kernel.crashing.org>
11071 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
11074 2018-05-17 Richard Biener <rguenther@suse.de>
11076 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
11077 for pruning loop and prune defs feeding only already visited PHIs.
11079 2018-05-17 Richard Biener <rguenther@suse.de>
11081 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
11083 2018-05-17 Bin Cheng <bin.cheng@arm.com>
11084 Richard Biener <rguenther@suse.de>
11086 PR tree-optimization/85793
11087 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
11088 for VMAT_ELEMENTWISE.
11090 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
11092 * internal-fn.h (lookup_internal_fn): Declare
11093 * internal-fn.c (lookup_internal_fn): New function.
11094 * gimple.c (gimple_build_call_from_tree): Handle calls to
11095 internal functions.
11096 * gimple-pretty-print.c (dump_gimple_call): Print "." before
11097 internal function names.
11098 * tree-pretty-print.c (dump_generic_node): Likewise.
11099 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
11101 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
11103 * gimple-fold.h (gimple_build): Make the function forms take
11104 combined_fn rather than built_in_function.
11105 (gimple_simplify): Likewise.
11106 * gimple-match-head.c (gimple_simplify): Likewise.
11107 * gimple-fold.c (gimple_build): Likewise.
11108 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
11109 rather than gimple_build_call_internal.
11110 (get_initial_defs_for_reduction): Likewise.
11111 (vect_create_epilog_for_reduction): Likewise.
11112 (vectorizable_live_operation): Likewise.
11114 2018-05-17 Martin Liska <mliska@suse.cz>
11116 * gimple-ssa-sprintf.c (format_directive): Do not use
11117 space in between 'G_' and '('.
11119 2018-05-17 Jakub Jelinek <jakub@redhat.com>
11122 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
11123 even if the mask is not all ones.
11126 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
11128 (ix86_gimple_fold_builtin): Likewise.
11131 * config/i386/i386.c: Include tree-vector-builder.h.
11132 (ix86_vector_shift_count): New function.
11133 (ix86_fold_builtin): Fold shift builtins by scalar count.
11134 (ix86_gimple_fold_builtin): Likewise.
11136 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
11137 _mm512_setzero): New intrinsics.
11139 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
11140 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11142 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
11143 code generation for cases where splatting a value is not useful.
11144 * simplify-rtx.c (simplify_ternary_operation): Simplify
11145 vec_merge across a vec_duplicate and a paradoxical subreg forming
11146 a vector mode to a vec_concat.
11148 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
11150 * config.gcc: Support "goldmont-plus".
11151 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
11153 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11154 PROCESSOR_GOLDMONT_PLUS.
11155 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
11156 (processor_target_table): Add "goldmont-plus".
11157 (PTA_GOLDMONT_PLUS): Define.
11158 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
11159 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
11160 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
11161 (fold_builtin_cpu): Add "goldmont-plus".
11162 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
11163 (ix86_option_override_internal): Add "goldmont-plus".
11164 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
11165 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
11166 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
11167 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
11169 2018-05-17 Richard Biener <rguenther@suse.de>
11171 PR tree-optimization/85757
11172 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
11173 remove defs that only feed that PHI from further processing.
11175 2018-05-16 Jim Wilson <jimw@sifive.com>
11177 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
11179 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
11181 2018-05-16 Mark Wielaard <mark@klomp.org>
11183 * dwarf2out.c (count_index_strings): New function.
11184 (output_indirect_strings): Call count_index_strings and generate
11185 header for dwarf_version >= 5.
11187 2018-05-16 Mark Wielaard <mark@klomp.org>
11189 * dwarf2out.c (dwarf_FORM): New function.
11190 (set_indirect_string): Use dwarf_FORM.
11191 (reset_indirect_string): Likewise.
11192 (size_of_die): Likewise.
11193 (value_format): Likewise.
11194 (output_die): Likewise.
11195 (add_skeleton_AT_string): Likewise.
11196 (output_macinfo_op): Likewise.
11197 (index_string): Likewise.
11198 (output_index_string_offset): Likewise.
11199 (output_index_string): Likewise.
11200 (count_index_strings): Likewise.
11202 2018-05-16 Carl Love <cel@us.ibm.com>
11204 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
11205 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
11207 2018-05-16 Martin Jambor <mjambor@suse.cz>
11209 * ipa-prop.c (ipa_free_all_edge_args): Remove.
11210 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
11212 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
11214 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
11215 (fnma<mode>4): Likewise.
11216 (fms<mode>4): Likewise.
11217 (fnms<mode>4): Likewise.
11218 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
11219 (aarch64_fnma<mode>4): Likewise.
11220 (aarch64_fms<mode>4): Likewise.
11221 (aarch64_fnms<mode>4): Likewise.
11222 (aarch64_fnmadd<mode>4): Likewise.
11224 2018-05-16 Jason Merrill <jason@redhat.com>
11226 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
11228 2018-05-16 Richard Biener <rguenther@suse.de>
11230 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
11231 (dump_stmt_cost): Declare.
11232 (add_stmt_cost): Dump cost we add.
11233 (add_stmt_costs): New function.
11234 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
11235 No longer exported.
11236 (vect_analyze_stmt): Adjust prototype.
11237 (vectorizable_condition): Likewise.
11238 (vectorizable_live_operation): Likewise.
11239 (vectorizable_reduction): Likewise.
11240 (vectorizable_induction): Likewise.
11241 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
11242 cost vector to pass to vectorizable_ and record afterwards.
11243 (vect_model_reduction_cost): Take cost vector argument and adjust.
11244 (vect_model_induction_cost): Likewise.
11245 (vectorizable_reduction): Likewise.
11246 (vectorizable_induction): Likewise.
11247 (vectorizable_live_operation): Likewise.
11248 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
11249 SLP_TREE_NUMBER_OF_VEC_STMTS.
11250 (vect_analyze_slp_cost_1): Remove.
11251 (vect_analyze_slp_cost): Likewise.
11252 (vect_slp_analyze_node_operations): Take visited args and
11253 a target cost vector. Avoid processing already visited stmt sets.
11254 (vect_slp_analyze_operations): Use a local cost vector to gather
11255 costs and register those of non-discarded instances.
11256 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
11257 (vect_schedule_slp_instance): Remove copying of
11258 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
11260 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
11261 adding cost. Record cost entry location.
11262 (vect_prologue_cost_for_slp_op): Function to compute cost of
11263 a constant or invariant generated for SLP vect in the prologue,
11264 split out from vect_analyze_slp_cost_1.
11265 (vect_model_simple_cost): Make static. Adjust for SLP costing.
11266 (vect_model_promotion_demotion_cost): Likewise.
11267 (vect_model_store_cost): Likewise, make static.
11268 (vect_model_load_cost): Likewise.
11269 (vectorizable_bswap): Add cost vector arg and adjust.
11270 (vectorizable_call): Likewise.
11271 (vectorizable_simd_clone_call): Likewise.
11272 (vectorizable_conversion): Likewise.
11273 (vectorizable_assignment): Likewise.
11274 (vectorizable_shift): Likewise.
11275 (vectorizable_operation): Likewise.
11276 (vectorizable_store): Likewise.
11277 (vectorizable_load): Likewise.
11278 (vectorizable_condition): Likewise.
11279 (vectorizable_comparison): Likewise.
11280 (can_vectorize_live_stmts): Likewise.
11281 (vect_analyze_stmt): Likewise.
11282 (vect_transform_stmt): Adjust calls to vectorizable_*.
11283 * tree-vectorizer.c: Include gimple-pretty-print.h.
11284 (dump_stmt_cost): New function.
11286 2018-05-16 Richard Biener <rguenther@suse.de>
11288 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
11289 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
11290 * tree-ssa-dse.c: Include tree-ssa-loop.h.
11291 (check_name): New callback.
11292 (dse_classify_store): Track cycles via a visited bitmap of PHI
11293 defs and simplify handling of in-loop and across loop dead stores
11294 and properly fail for loop-variant refs. Handle byte-tracking with
11295 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
11298 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
11300 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
11301 (vect_get_mask_type_for_stmt): Likewise.
11302 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
11304 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
11305 to determine the statement's vector type and the vector type that
11306 should be used for calculating nunits. Deal with cases in which
11307 the type has to be deferred.
11308 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
11309 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
11310 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
11311 (vect_determine_vf_for_stmt): New functions, split out from...
11312 (vect_determine_vectorization_factor): ...here.
11313 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
11314 (vect_get_mask_type_for_stmt): New functions, split out from
11315 vect_determine_vectorization_factor.
11317 2018-05-16 Richard Biener <rguenther@suse.de>
11319 * tree-cfg.c (verify_gimple_assign_ternary): Properly
11320 verify the [VEC_]COND_EXPR embedded comparison.
11322 2018-05-15 Martin Sebor <msebor@redhat.com>
11324 PR tree-optimization/85753
11325 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
11326 RECORD_TYPE in addition to ARRAY_TYPE.
11328 2018-05-15 Martin Sebor <msebor@redhat.com>
11330 PR middle-end/85643
11331 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
11333 2018-05-15 Richard Biener <rguenther@suse.de>
11335 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
11336 add by_clobber_p one. Change algorithm to collect all defs
11337 representing uses we need to walk and try reducing them to
11338 a single one before failing.
11339 (dse_dom_walker::dse_optimize_stmt): Adjust.
11341 2018-05-13 Mark Wielaard <mark@klomp.org>
11343 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
11344 (size_of_loc_descr): Likewise.
11345 (output_loc_operands): Likewise.
11346 (output_loc_operands_raw): Likewise.
11347 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
11348 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
11349 (hash_loc_operands): Likewise.
11350 (compare_loc_operands): Likewise.
11352 2018-05-14 Mark Wielaard <mark@klomp.org>
11354 * dwarf2out.c (count_index_addrs): New function.
11355 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
11357 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11359 PR tree-optimization/83648
11360 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
11361 return value as malloc candidate.
11363 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11366 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
11367 param as true in call to suggest_attribute.
11369 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
11371 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
11372 -mreadonly-in-sdata.
11374 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11376 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
11378 (aarch64_crypto_aesd_fused): Likewise.
11380 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
11382 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
11383 (movsi_aarch64): Likewise.
11384 (load_pairsi): Likewise.
11385 (load_pairdi): Likewise.
11386 (store_pairsi): Likewise.
11387 (store_pairdi): Likewise.
11388 (load_pairsf): Likewise.
11389 (load_pairdf): Likewise.
11390 (store_pairsf): Likewise.
11391 (store_pairdf): Likewise.
11392 (zero_extend): Likewise.
11393 (trunc): Swap alternatives.
11394 (fcvt_target): Add '?' to prefer w over r.
11396 2018-05-14 Jakub Jelinek <jakub@redhat.com>
11399 * config/i386/i386.md: Disallow non-commutative arithmetics in
11400 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
11401 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
11402 in the peephole2 before it.
11404 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
11406 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
11407 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
11408 (ix86_handle_option): Handle -mcldemote.
11409 * config.gcc: New header.
11410 * config/i386/cldemoteintrin.h: New file.
11411 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
11412 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
11414 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11415 OPTION_MASK_ISA_CLDEMOTE.
11416 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
11417 (ix86_valid_target_attribute_inner_p): Ditto.
11418 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
11419 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
11420 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
11421 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
11422 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
11424 * config/i386/i386.opt: Add -mcldemote.
11425 * config/i386/x86intrin.h: New header.
11426 * doc/invoke.texi: Add -mcldemote.
11428 2018-05-14 Richard Biener <rguenther@suse.de>
11430 * doc/match-and-simplify.texi: Adjust :s documentation.
11432 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
11434 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
11435 intended memcpy size.
11436 (REORDER_45): Likewise.
11438 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
11440 * sort.cc: New file.
11441 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
11442 * vec.c (qsort_chk): Use gcc_qsort.
11443 * Makefile.in (OBJS-libcommon): Add sort.o.
11444 (build/sort.o): New target. Use it...
11445 (BUILD_RTL): ... here, and...
11446 (build/gencfn-macros): ... here, and...
11447 (build/genmatch): ... here.
11449 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
11450 Chung-Ju Wu <jasonwucj@gmail.com>
11452 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
11453 * config/nds32/nds32-graywolf.md: New file.
11454 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
11455 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
11457 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
11458 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
11459 * config/nds32/nds32.md (pipeline_model): Add graywolf.
11460 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
11461 * config/nds32/pipelines.md: Include n15 settings.
11463 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
11464 Chung-Ju Wu <jasonwucj@gmail.com>
11466 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
11467 * config/nds32/nds32-n13.md: New file.
11468 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
11469 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
11471 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
11472 * config/nds32/nds32.md (pipeline_model): Add n13.
11473 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
11474 * config/nds32/pipelines.md: Include n13 settings.
11476 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
11477 Chung-Ju Wu <jasonwucj@gmail.com>
11479 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
11480 * config/nds32/nds32-n10.md: New file.
11481 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
11482 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
11484 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
11485 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
11486 * config/nds32/nds32.md (pipeline_model): Add n10.
11487 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
11488 * config/nds32/pipelines.md: Include n10 settings.
11490 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
11491 Kito Cheng <kito.cheng@gmail.com>
11492 Chung-Ju Wu <jasonwucj@gmail.com>
11494 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
11495 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11496 Add enum values for DSP extension instructions.
11497 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
11499 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
11500 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
11501 New code iterators.
11502 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
11503 * config/nds32/nds32-dspext.md: New file for DSP implementation.
11504 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
11505 * config/nds32/nds32-intrinsic.md: Likewise.
11506 * config/nds32/nds32_intrinsic.h: Likewise.
11507 * config/nds32/nds32-md-auxiliary.c: Likewise.
11508 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
11509 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
11510 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
11511 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
11512 * config/nds32/nds32-protos.h: New declarations for DSP extension.
11513 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
11514 TYPE_DMAC in switch statement.
11515 * config/nds32/nds32.c: New checking and implementation for DSP
11516 extension instructions.
11517 * config/nds32/nds32.h: Likewise.
11518 * config/nds32/nds32.md: Likewise.
11519 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
11520 * config/nds32/predicates.md: Implement new predicates for DSP
11523 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
11525 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
11526 Reformat alternatives and attributes so it is easier to identify
11527 which constraints/attributes go with which instruction.
11528 (mov<mode>_hardfloat32, FMOVE64): Likewise.
11529 (mov<mode>_softfloat32, FMOVE64): Likewise.
11530 (mov<mode>_hardfloat64, FMOVE64): Likewise.
11531 (mov<mode>_softfloat64, FMOVE64): Likewise.
11533 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
11535 * doc/extend.texi (PowerPC Built-in Functions): Rename this
11537 (Basic PowerPC Built-in Functions): The new name of the
11538 subsection previously known as "PowerPC Built-in Functions".
11539 (Basic PowerPC Built-in Functions Available on all Configurations):
11541 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
11542 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
11543 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
11544 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
11546 2018-05-11 Martin Jambor <mjambor@suse.cz>
11549 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
11552 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
11555 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
11557 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
11559 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
11560 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
11561 (ix86_handle_option): Handle -mwaitpkg.
11562 * config.gcc: New header.
11563 * config/i386/cpuid.h (bit_WAITPKG): New bit.
11564 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
11565 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
11567 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11568 OPTION_MASK_ISA_WAITPKG.
11569 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
11570 (ix86_option_override_internal): Add PTA_WAITPKG.
11571 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
11572 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
11573 IX86_BUILTIN_TPAUSE.
11574 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
11575 __builtin_ia32_umwait and __builtin_ia32_tpause.
11576 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
11577 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
11578 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
11579 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
11580 UNSPECV_TPAUSE): New.
11581 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
11582 * config/i386/i386.opt: Add -mwaitpkg.
11583 * config/i386/waitpkgintrin.h: New file.
11584 * config/i386/x86intrin.h: New header.
11585 * doc/invoke.texi: Add -mwaitpkg.
11587 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
11590 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
11592 (cortex-m0): Use armv6s-m isa.
11593 (cortex-m0plus): Likewise.
11594 (cortex-m1): Likewise.
11595 (cortex-m0.small-multiply): Likewise.
11596 (cortex-m0plus.small-multiply): Likewise.
11597 (cortex-m1.small-multiply): Likewise.
11599 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
11600 Jakub Jelinek <jakub@redhat.com>
11602 PR tree-optimization/85692
11603 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
11604 source permute as well.
11606 2018-05-11 Martin Liska <mliska@suse.cz>
11609 * doc/extend.texi: Document LLVM style format for no_sanitize
11612 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
11614 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
11615 mode_supports_vsx_dform_quad to mode_supports_dq_form.
11616 (mode_supports_vsx_dform_quad): Likewise.
11617 (mode_supports_vmx_dform): Move these functions to be next to the
11618 other mode_supports functions.
11619 (mode_supports_dq_form): Likewise.
11620 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
11621 mode_supports_dq_form.
11622 (reg_offset_addressing_ok_p): Likewise.
11623 (offsettable_ok_by_alignment): Likewise.
11624 (rs6000_legitimate_offset_address_p): Likewise.
11625 (legitimate_lo_sum_address_p): Likewise.
11626 (rs6000_legitimize_address): Likewise.
11627 (rs6000_legitimize_reload_address): Likewise.
11628 (rs6000_secondary_reload_inner): Likewise.
11629 (rs6000_preferred_reload_class): Likewise.
11630 (rs6000_output_move_128bit): Likewise.
11632 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
11634 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
11635 Generate SImode target register for null target.
11636 <case IX86_BUILTIN_XGETBV>: Ditto.
11637 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
11638 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
11640 2018-05-10 Carl Love <cel@us.ibm.com>
11642 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
11643 dcbtt and dcbtstt if operands[2] is 0.
11645 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
11648 * config/i386/sse.md (usadv64qi): New expander.
11650 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
11652 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
11653 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
11654 -maltivec=be support.
11655 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
11656 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
11657 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
11658 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
11659 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
11660 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
11661 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
11662 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
11663 altivec_vsumsws): Adjust.
11664 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
11665 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
11666 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
11668 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
11669 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
11670 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
11671 (altivec_lve<VI_char>x): Delete expand.
11672 (*altivec_lve<VI_char>x_internal): Rename to...
11673 (altivec_lve<VI_char>x): ... this.
11674 (altivec_lvxl_<mode>): Delete expand.
11675 (*altivec_lvxl_<mode>_internal): Rename to ...
11676 (altivec_lvxl_<mode>): ... this.
11677 (altivec_stvxl_<mode>): Delete expand.
11678 (*altivec_stvxl_<mode>_internal): Rename to ...
11679 (altivec_stvxl_<mode>): ... this.
11680 (altivec_stve<VI_char>x): Delete expand.
11681 (*altivec_stve<VI_char>x_internal): Rename to ...
11682 (altivec_stve<VI_char>x): ... this.
11683 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
11684 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
11685 reduc_plus_scal_<mode>): Adjust.
11686 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
11688 (rs6000_cpu_cpp_builtins): Adjust.
11689 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
11690 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
11691 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
11692 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
11693 -maltivec=be support.
11694 (rs6000_split_vec_extract_var): Adjust.
11695 (rs6000_split_v4si_init): Adjust.
11696 (swap_selector_for_mode): Delete.
11697 (altivec_expand_lvx_be, altivec_expand_stvx_be,
11698 altivec_expand_stvex_be): Delete.
11699 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
11700 -maltivec=be support.
11701 (rs6000_gimple_fold_builtin): Ditto.
11702 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
11704 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
11705 (TARGET_DIRECT_MOVE_64BIT): Adjust.
11706 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
11707 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
11708 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
11709 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
11710 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
11711 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
11712 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
11713 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
11714 anonymous split): Adjust.
11715 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
11716 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
11718 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
11720 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
11721 when --with-gxx-include-dir is also specified.
11722 * configure: Regenerate.
11724 2018-05-09 Jim Wilson <jimw@sifive.com>
11727 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
11728 * config/riscv/t-withmultilib: New.
11729 * config/riscv/withmultilib.h: New.
11730 * doc/install.texi: Document RISC-V --with-multilib-list support.
11732 2018-05-09 Richard Biener <rguenther@suse.de>
11734 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
11736 (vect_bb_vectorization_profitable_p): Adjust. Compute
11737 actual scalar cost using the cost vector and the add_stmt_cost
11740 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
11742 PR rtl-optimization/85645
11743 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
11744 in the REG_CFA_REGISTER note for LR, don't leave it empty.
11746 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
11748 PR rtl-optimization/85645
11749 * shrink-wrap.c (spread_components): Return a boolean saying if
11750 anything was changed.
11751 (try_shrink_wrapping_separate): Iterate spread_components until
11752 nothing changes anymore.
11754 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
11756 PR rtl-optimization/85645
11757 * regrename.c (build_def_use): Also kill the chains that include the
11758 destination of a REG_CFA_REGISTER note.
11760 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
11762 PR rtl-optimization/85645
11763 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
11764 insn that has a REG_CFA_REGISTER note.
11766 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
11768 * cfgexpand.c (expand_clobber): New function.
11769 (expand_gimple_stmt_1): Use it.
11770 * tree-vect-stmts.c (vect_clobber_variable): New function,
11772 (vectorizable_simd_clone_call): ...here.
11773 (vectorizable_store): Emit a clobber either side of an
11774 IFN_STORE_LANES sequence.
11775 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
11777 2018-05-09 Tom de Vries <tom@codesourcery.com>
11780 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
11781 (define_insn "trap_if_false"): Add exit after trap.
11783 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
11785 PR rtl-optimization/85638
11786 * bb-reorder.c: Include common/common-target.h.
11787 (create_forwarder_block): New function extracted from...
11788 (fix_up_crossing_landing_pad): ...here. Rename into...
11789 (dw2_fix_up_crossing_landing_pad): ...this.
11790 (sjlj_fix_up_crossing_landing_pad): New function.
11791 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
11792 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
11793 from both partitions and exit the loop after one iteration.
11795 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
11798 * doc/extend.texi (PowerPC Built-in Functions): Rename this
11800 (Basic PowerPC Built-in Functions): The new name of the
11801 subsection previously known as "PowerPC Built-in Functions".
11802 (Basic PowerPC Built-in Functions Available on all Configurations):
11804 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
11806 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
11808 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
11810 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
11813 2018-05-08 Jim Wilson <jimw@sifive.com>
11815 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
11816 (LD_EMUL_SUFFIX): New.
11817 (LINK_SPEC): Use it.
11819 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
11821 * doc/extend.texi (PowerPC Built-in Functions): Rename this
11823 (Basic PowerPC Built-in Functions): The new name of the
11824 subsection previously known as "PowerPC Built-in Functions".
11825 (Basic PowerPC Built-in Functions Available on all Configurations):
11827 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
11829 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
11831 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
11833 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
11836 2018-05-08 Jakub Jelinek <jakub@redhat.com>
11839 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
11840 after cmpelim optimization.
11842 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
11844 * config.gcc: Support "goldmont".
11845 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
11846 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11847 PROCESSOR_GOLDMONT.
11848 * config/i386/i386.c (m_GOLDMONT): Define.
11849 (processor_target_table): Add "goldmont".
11850 (PTA_GOLDMONT): Define.
11851 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
11852 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
11853 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
11854 (fold_builtin_cpu): Add "goldmont".
11855 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
11856 (ix86_option_override_internal): Add "goldmont".
11857 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
11858 (processor_type): Add PROCESSOR_GOLDMONT.
11859 * config/i386/i386.md: Add CPU "glm".
11860 * config/i386/glm.md: New file.
11861 * config/i386/x86-tune.def: Add m_GOLDMONT.
11862 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
11864 2018-05-08 Jakub Jelinek <jakub@redhat.com>
11867 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
11869 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
11870 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
11871 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
11874 * config/i386/i386.c (ix86_fold_builtin): Handle
11875 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
11878 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
11879 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
11881 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
11884 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
11885 (check_arch): Likewise.
11886 (check_fpu): Return the result rather than printing it.
11887 (end arch): Fix operator precedence.
11888 (end cpu): Likewise.
11889 (END): Print the result from check_fpu.
11891 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
11892 Alan Hayward <alan.hayward@arm.com>
11893 David Sherwood <david.sherwood@arm.com>
11895 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
11896 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
11897 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
11898 (*fcmuo<mode>_and): New patterns.
11900 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
11902 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
11903 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
11904 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
11905 (cmp_op, sve_imm_con): New code attributes.
11906 (SVE_COND_INT_CMP, imm_con): Delete.
11907 (cmp_op): Remove above unspecs from int attribute.
11908 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
11910 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
11911 comparison-specific unspecs.
11912 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
11913 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
11914 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
11915 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
11916 (*vec_fcm<cmp_op><mode>): Rename to...
11917 (*fcm<cmp_op><mode>): ...this and adjust likewise.
11918 (*vec_fcmuo<mode>): Rename to...
11919 (*fcmuo<mode>): ...this and adjust likewise.
11920 (*pred_fcm<cmp_op><mode>): New pattern.
11921 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
11922 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
11924 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
11926 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
11927 (aarch64_emit_sve_predicated_cond): New function.
11928 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
11929 (aarch64_emit_unspec_cond_or): Replace with...
11930 (aarch64_emit_sve_or_conds): ...this new function. Use
11931 aarch64_emit_sve_ptrue_op for the individual comparisons and
11932 aarch64_emit_binop to OR them together.
11933 (aarch64_emit_inverted_unspec_cond): Replace with...
11934 (aarch64_emit_sve_inverted_cond): ...this new function. Use
11935 aarch64_emit_sve_ptrue_op for the comparison and
11936 aarch64_emit_unop to invert the result.
11937 (aarch64_expand_sve_vec_cmp_float): Update after the above
11938 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
11940 2018-05-07 Nathan Sidwell <nathan@acm.org>
11942 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
11943 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
11944 (Backwards Compatibility): Likewise.
11946 2018-05-07 Luis Machado <luis.machado@linaro.org>
11950 2018-05-07 Luis Machado <luis.machado@linaro.org>
11952 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11953 <prefetch_dynamic_strides>: New const bool field.
11954 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11955 prefetch_dynamic_strides.
11956 (exynosm1_prefetch_tune): Likewise.
11957 (thunderxt88_prefetch_tune): Likewise.
11958 (thunderx_prefetch_tune): Likewise.
11959 (thunderx2t99_prefetch_tune): Likewise.
11960 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
11962 (aarch64_override_options_internal): Update to set
11963 PARAM_PREFETCH_DYNAMIC_STRIDES.
11964 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11965 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11966 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11967 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11968 prefetch-dynamic-strides setting.
11970 2018-05-07 Luis Machado <luis.machado@linaro.org>
11972 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11973 <minimum_stride>: New const int field.
11974 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11975 minimum_stride field.
11976 (exynosm1_prefetch_tune): Likewise.
11977 (thunderxt88_prefetch_tune): Likewise.
11978 (thunderx_prefetch_tune): Likewise.
11979 (thunderx2t99_prefetch_tune): Likewise.
11980 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
11981 (aarch64_override_options_internal): Update to set
11982 PARAM_PREFETCH_MINIMUM_STRIDE.
11983 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11984 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11985 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11986 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11987 stride is constant and is below the minimum stride threshold.
11989 2018-05-07 Luis Machado <luis.machado@linaro.org>
11991 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
11994 2018-05-07 Luis Machado <luis.machado@linaro.org>
11996 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11997 <prefetch_dynamic_strides>: New const bool field.
11998 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11999 prefetch_dynamic_strides.
12000 (exynosm1_prefetch_tune): Likewise.
12001 (thunderxt88_prefetch_tune): Likewise.
12002 (thunderx_prefetch_tune): Likewise.
12003 (thunderx2t99_prefetch_tune): Likewise.
12004 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
12006 (aarch64_override_options_internal): Update to set
12007 PARAM_PREFETCH_DYNAMIC_STRIDES.
12008 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12009 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12010 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12011 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12012 prefetch-dynamic-strides setting.
12014 2018-05-07 Luis Machado <luis.machado@linaro.org>
12016 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12017 <minimum_stride>: New const int field.
12018 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12019 minimum_stride field.
12020 (exynosm1_prefetch_tune): Likewise.
12021 (thunderxt88_prefetch_tune): Likewise.
12022 (thunderx_prefetch_tune): Likewise.
12023 (thunderx2t99_prefetch_tune): Likewise.
12024 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
12025 (aarch64_override_options_internal): Update to set
12026 PARAM_PREFETCH_MINIMUM_STRIDE.
12027 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12028 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12029 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12030 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12031 stride is constant and is below the minimum stride threshold.
12033 2018-05-06 Jakub Jelinek <jakub@redhat.com>
12036 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
12037 the type is addressable. Don't force op into register if it has
12040 2018-05-05 Roland McGrath <mcgrathr@google.com>
12043 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
12044 any section for which we don't know a specific type it should have,
12045 regardless of name. Previously this was done only for the exact
12046 names ".init_array", ".fini_array", and ".preinit_array".
12047 (default_elf_asm_named_section): Add comment about
12048 relationship with default_section_type_flags and SECTION_NOTYPE.
12049 (get_section): Don't consider it a type conflict if one side has
12050 SECTION_NOTYPE and the other doesn't, as long as neither has the
12051 SECTION_BSS et al used in the default_section_type_flags logic.
12053 2018-05-05 Tom de Vries <tom@codesourcery.com>
12056 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
12057 (workaround_barsyncs): New function.
12058 (nvptx_reorg): Use workaround_barsyncs.
12059 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
12060 (define_expand "nvptx_membar_cta"): New define_expand.
12061 (define_insn "*nvptx_membar_cta"): New insn.
12063 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
12065 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
12066 To improve optimization opportunities.
12067 * builtin-types.def: The new needed builtin types for the above.
12069 2018-05-04 Richard Biener <rguenther@suse.de>
12071 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
12072 * gimple-ssa-store-merging.c
12073 (imm_store_chain_info::output_merged_store): Remove redundant create,
12074 release split_store vector contents on failure.
12075 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
12076 scalar stmt vector on cache hit.
12078 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
12080 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
12082 * config.gcc (powerpc-xilinx-eabi*): Remove.
12083 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
12085 (fusion_addis_mem_combo_load): Ditto.
12086 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
12088 (rs6000_cpu_cpp_builtins): Ditto.
12089 * config/rs6000/rs6000-linux.c
12090 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
12091 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
12092 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
12094 (rs6000_setup_reg_addr_masks): Ditto.
12095 (rs6000_init_hard_regno_mode_ok): Ditto.
12096 (rs6000_option_override_internal): Ditto.
12097 (legitimate_lo_sum_address_p): Ditto.
12098 (rs6000_legitimize_address): Ditto.
12099 (rs6000_legitimize_reload_address): Ditto.
12100 (rs6000_legitimate_address_p): Ditto.
12101 (abi_v4_pass_in_fpr): Ditto.
12102 (setup_incoming_varargs): Ditto.
12103 (rs6000_gimplify_va_arg): Ditto.
12104 (rs6000_split_multireg_move): Ditto.
12105 (rs6000_savres_strategy): Ditto.
12106 (rs6000_emit_prologue_components): Ditto.
12107 (rs6000_emit_epilogue_components): Ditto.
12108 (rs6000_emit_prologue): Ditto.
12109 (rs6000_emit_epilogue): Ditto.
12110 (rs6000_elf_file_end): Ditto.
12111 (rs6000_function_value): Ditto.
12112 (rs6000_libcall_value): Ditto.
12113 * config/rs6000/rs6000.h: Ditto.
12114 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
12115 (TARGET_MINMAX): ... this. New.
12116 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
12117 * config/rs6000/rs6000.md: Remove Xilinx FP support.
12118 (*movsi_internal1_single): Delete.
12119 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
12120 mfpu=, mxilinx-fpu): Delete.
12121 * config/rs6000/singlefp.h: Delete.
12122 * config/rs6000/sysv4.h: Remove Xilinx FP support.
12123 * config/rs6000/t-rs6000: Ditto.
12124 * config/rs6000/t-xilinx: Delete.
12125 * config/rs6000/titan.md: Adjust for fp_type removal.
12126 * config/rs6000/vsx.md: Remove Xilinx FP support.
12127 (VStype_simple): Delete.
12128 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
12129 * config/rs6000/xfpu.h: Delete.
12130 * config/rs6000/xfpu.md: Delete.
12131 * config/rs6000/xilinx.h: Delete.
12132 * config/rs6000/xilinx.opt: Delete.
12133 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
12134 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
12136 2018-05-04 Tom de Vries <tom@codesourcery.com>
12139 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
12142 2018-05-04 Richard Biener <rguenther@suse.de>
12144 PR middle-end/85627
12145 * tree-complex.c (update_complex_assignment): We are always in SSA form.
12146 (expand_complex_div_wide): Likewise.
12147 (expand_complex_operations_1): Likewise.
12148 (expand_complex_libcall): Preserve EH info of the original stmt.
12149 (tree_lower_complex): Handle removed blocks.
12150 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
12151 on complex multiplication and division libcall builtins.
12153 2018-05-04 Richard Biener <rguenther@suse.de>
12155 PR middle-end/85574
12156 * fold-const.c (negate_expr_p): Restrict negation of operand
12157 zero of a division to when we know that can happen without
12159 (fold_negate_expr_1): Likewise.
12161 2018-05-04 Jakub Jelinek <jakub@redhat.com>
12164 * real.h (real_nextafter): Declare.
12165 * real.c (real_nextafter): New function.
12166 * fold-const-call.c (fold_const_nextafter): New function.
12167 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
12168 CASE_CFN_NEXTTOWARD.
12169 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
12170 even when arg1_mode is different from arg0_mode.
12172 2018-05-03 Nathan Sidwell <nathan@acm.org>
12174 * doc/extend.texi (Deprecated Features): Remove
12175 -ffriend-injection.
12176 (Backwards Compatibility): Likewise.
12177 * doc/invoke.texi (C++ Language Options): Likewise.
12178 (C++ Dialect Options): Likewise.
12180 2018-05-03 Jakub Jelinek <jakub@redhat.com>
12183 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
12184 _mm512_mask_mullox_epi64): New intrinsics.
12186 2018-05-03 Tom de Vries <tom@codesourcery.com>
12189 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12190 dump files): Add offload-tree.
12192 2018-05-03 Richard Biener <rguenther@suse.de>
12194 PR tree-optimization/85615
12195 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
12196 to loops not nested in BBs loop father to avoid creating multi-entry
12199 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12201 PR tree-optimization/70291
12202 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
12203 arguments. Change return type to tree. Emit libcall as a new
12204 statement rather than replacing existing one when inplace_p is true.
12205 (expand_complex_multiplication_components): New function.
12206 (expand_complex_multiplication): Expand floating-point complex
12207 multiplication using the above.
12208 (expand_complex_division): Rename inner_type parameter to type.
12209 Update expand_complex_libcall call-site.
12210 (expand_complex_operations_1): Update expand_complex_multiplication
12211 and expand_complex_division call-sites.
12213 2018-05-02 Jakub Jelinek <jakub@redhat.com>
12216 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
12217 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
12218 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
12219 the highest significant bit of the shift count mask is clear. In
12220 check whether and[sq]i3 is needed verify that all significant bits
12221 of the shift count other than the highest are set.
12223 2018-05-02 Tom de Vries <tom@codesourcery.com>
12226 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
12227 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
12228 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
12229 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
12230 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
12231 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
12232 __builtin_goacc_parlevel_size.
12234 2018-05-02 Richard Biener <rguenther@suse.de>
12236 PR tree-optimization/85597
12237 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
12238 do not use split vect_get_vec_defs call but call vect_get_slp_defs
12241 2018-05-02 Tom de Vries <tom@codesourcery.com>
12244 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12245 dump files): Add ltrans-tree.
12247 2018-05-02 Tom de Vries <tom@codesourcery.com>
12250 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12251 dump files): Add wpa-ipa.
12253 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
12255 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
12256 powerpc*-*-linux*paired* target.
12257 * config/rs6000/750cl.h: Delete.
12258 * config/rs6000/paired.h: Delete.
12259 * config/rs6000/paired.md: Delete.
12260 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
12262 * config/rs6000/rs6000-builtin.def: Remove paired float support.
12263 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
12264 comment. Remove paired float support.
12265 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
12266 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
12268 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
12269 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
12271 * config/rs6000/rs6000.c: Remove paired float support.
12272 (paired_expand_vector_init, paired_expand_vector_move,
12273 paired_emit_vector_compare, paired_emit_vector_cond_expr,
12274 (paired_expand_lv_builtin, paired_expand_stv_builtin,
12275 paired_expand_builtin, paired_expand_predicate_builtin,
12276 paired_init_builtins): Delete.
12277 * config/rs6000/rs6000.h: Remove paired float support.
12278 * config/rs6000/rs6000.md: Remove paired float support.
12279 (move_from_CR_ov_bit): Delete.
12280 * config/rs6000/rs6000.opt (mpaired): Delete.
12281 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
12282 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
12284 2018-05-02 Richard Biener <rguenther@suse.de>
12286 PR middle-end/85567
12287 * gimplify.c (gimplify_save_expr): When in SSA form allow
12288 SAVE_EXPRs to compute to SSA vars.
12290 2018-05-02 Jakub Jelinek <jakub@redhat.com>
12293 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
12294 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
12295 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
12296 clobber operands[2], instead use a new pseudo. Formatting fixes.
12298 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
12300 PR tree-optimization/85586
12301 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
12302 exit early for statements in the same group if the accesses are
12305 2018-05-02 Tom de Vries <tom@codesourcery.com>
12308 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
12311 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
12313 PR tree-optimization/85143
12314 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
12316 2018-05-01 Tom de Vries <tom@codesourcery.com>
12319 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
12320 not found" error message.
12322 2018-05-01 Tom de Vries <tom@codesourcery.com>
12325 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
12326 * vec.c (test_ordered_remove_if): New function.
12327 (vec_c_tests): Call test_ordered_remove_if.
12328 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
12329 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
12330 * tree-vect-patterns.c (vect_pattern_recog_1): Use
12331 VEC_ORDERED_REMOVE_IF.
12333 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12335 PR tree-optimization/82665
12336 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
12337 pointer subtraction where arguments come from a memchr call.
12339 2018-05-01 Jakub Jelinek <jakub@redhat.com>
12341 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
12342 --push-state --as-needed and --pop-state instead of --as-needed and
12343 --no-as-needed if ld supports it.
12344 * configure: Regenerated.
12347 * doc/install.texi2html: Replace _002d with - and _002a with * in
12348 generated html files using sed.
12350 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12353 * gcc-rich-location.c (blank_line_before_p): New function.
12354 (use_new_line): New function.
12355 (gcc_rich_location::add_fixit_insert_formatted): New function.
12356 * gcc-rich-location.h
12357 (gcc_rich_location::add_fixit_insert_formatted): New function.
12359 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12361 * selftest.c (assert_streq): Rename "expected" and "actual" to
12362 "val1" and "val2". Extend NULL-handling to cover both inputs
12363 symmetrically, while still requiring both to be non-NULL for a pass.
12364 * selftest.h (assert_streq): Rename "expected" and "actual" to
12366 (ASSERT_EQ): Likewise.
12367 (ASSERT_EQ_AT): Likewise.
12368 (ASSERT_KNOWN_EQ): Likewise.
12369 (ASSERT_KNOWN_EQ_AT): Likewise.
12370 (ASSERT_NE): Likewise.
12371 (ASSERT_MAYBE_NE): Likewise.
12372 (ASSERT_MAYBE_NE_AT): Likewise.
12373 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
12374 the assertion to pass.
12375 (ASSERT_STREQ_AT): Likewise.
12377 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
12379 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
12380 interaction with -pie.
12382 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12384 * selftest.h: Fix alphabetization of per-source-file selftest
12387 2018-04-30 Jason Merrill <jason@redhat.com>
12389 PR c++/61982 - dead stores to destroyed objects.
12390 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
12393 2018-04-30 Jason Merrill <jason@redhat.com>
12395 * tree.c (build_clobber): New.
12396 * tree.h: Declare it.
12397 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
12399 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12401 * diagnostic-show-locus.c (layout::layout): Update for
12402 location_get_source_line returning a char_span.
12403 (struct char_span): Move to input.h.
12404 (struct correction): Update for fields in char_span becoming
12406 (struct source_line): Update for location_get_source_line
12407 returning a char_span.
12408 (layout::print_line): Likewise.
12409 * edit-context.c (edited_file::print_content): Likewise.
12410 (edited_file::print_diff_hunk): Likewise.
12411 (edited_file::print_run_of_changed_lines): Likewise.
12412 (edited_file::get_num_lines): Likewise.
12413 (edited_line::edited_line): Likewise.
12414 * final.c (asm_show_source): Likewise.
12415 * input.c (location_get_source_line): Convert return type
12416 from const char * to char_span, losing the final "line_len"
12418 (dump_location_info): Update for the above.
12419 (get_substring_ranges_for_loc): Likewise. Use a char_span
12420 when handling the literal within the line.
12421 (test_reading_source_line): Update for location_get_source_line
12422 returning a char_span.
12423 * input.h (class char_span): Move here from
12424 diagnostic-show-locus.c, converting from a struct to a class.
12425 Make data members private.
12426 (char_span::operator bool): New.
12427 (char_span::length): New.
12428 (char_span::get_buffer): New.
12429 (char_span::operator[]): New.
12430 (char_span::subspan): Make const.
12431 (char_span::xstrdup): New.
12432 (location_get_source_line): Convert return type from const char *
12433 to char_span, losing the final "line_size" param.
12435 2018-04-30 Jan Hubicka <jh@suse.cz>
12437 * lto-wrapper.c (ltrans_priorities): New static var.
12438 (cmp_priority): New.
12439 (run_gcc): Read priorities and if doing parallel build order
12440 the Makefile by them.
12442 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12444 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
12446 2018-04-30 Richard Biener <rguenther@suse.de>
12448 * tree-cfg.c (verify_address): Remove base argument, add
12449 flag whether to check TREE_ADDRESSABLE and do that.
12450 (verify_expr): Remove.
12451 (verify_types_in_gimple_reference): Add pieces from verify_expr.
12452 (verify_gimple_assign_single): Likewise.
12453 (verify_gimple_switch): Likewise.
12454 (verify_expr_location_1): Dereference tp once. Add (disabled)
12455 piece from verify_expr.
12456 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
12458 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
12460 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
12462 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
12464 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
12465 (small_data_pattern): Likewise.
12466 (arc_rewrite_small_data): Likewise.
12467 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
12468 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
12469 (get_symbol_alignment): New function.
12470 (legitimate_small_data_address_p): Likewise.
12471 (legitimate_scaled_address): Update, call
12472 legitimate_small_data_address_p.
12473 (output_sdata): New static variable.
12474 (arc_print_operand): Update how we handle small data operands.
12475 (arc_print_operand_address): Likewise.
12476 (arc_legitimate_address_p): Update, use
12477 legitimate_small_data_address_p.
12478 (arc_rewrite_small_data_p): Remove.
12479 (arc_rewrite_small_data_1): Likewise.
12480 (arc_rewrite_small_data): Likewise.
12481 (small_data_pattern): Likewise.
12482 (compact_sda_memory_operand): Update to use
12483 legitimate_small_data_address_p and get_symbol_alignment.
12484 (prepare_move_operands): Don't rewite sdata pattern.
12485 (prepare_extend_operands): Remove.
12486 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
12488 (zero_extendqisi2): Likewise.
12489 (zero_extendhisi2): Likewise.
12490 (extendqihi2): Likewise.
12491 (extendqisi2): Likewise.
12492 (extendhisi2): Likewise.
12493 (addsi3): Likewise.
12494 (subsi3): Likewise.
12495 (andsi3): Likewise.
12496 * config/arc/constraints.md (Usd): Change it to memory constraint.
12498 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
12500 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
12501 as source of std instructions.
12502 * config/arc/arc.md (movsi_insn): Update pattern predicate to
12503 allow 6-bit constants as source for store instructions.
12504 (movdi_insn): Update instruction pattern to allow 6-bit constants
12505 as source for store instructions.
12507 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
12509 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
12511 2018-04-30 Nathan Sidwell <nathan@acm.org>
12512 Sandra Loosemore <sandra@codesourcery.com>
12514 * dumpfile.c (dump_open): Allow '-' for stdout.
12515 * doc/invoke.texi (Developer Options): Document dump filename
12516 determination early. Document stdin/stdout selection.
12518 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
12520 Microblaze Target: PIC data text relative
12522 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
12523 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
12525 * config/microblaze/microblaze.h (microblaze_constant_address_p):
12526 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
12527 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
12528 New addressing mode for data-text relative position indepenedent code.
12529 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
12530 'ADDRESS_SYMBOLIC_TXT_REL'.
12531 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
12532 (microblaze_legitimate_pic_operand): Exclude function calls from
12533 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
12534 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
12536 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
12537 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
12538 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
12539 for 'address + offset'.
12540 (microblaze_expand_prologue): Add new function prologue call for
12542 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
12543 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
12544 table in case of TARGET_PIC_DATA_TEXT_REL.
12545 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
12546 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
12547 Add new macros 'UNSPEC_TEXT',
12548 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
12549 + exclude function calls from 'UNSPEC_PLT' in case of data text
12551 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
12552 new target hook for generating address diff vector tables in case of
12554 * doc/tm.texi : Regenerate.
12555 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
12556 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
12557 of addr diff vector generation.
12558 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
12559 target hook definition.
12560 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
12561 Add default function for generate_pic_addr_diff_vec -> flag_pic.
12562 * doc/invoke.texi (Add new pic option): Add new microblaze pic
12563 option for data text relative.
12565 2018-04-30 Richard Biener <rguenther@suse.de>
12567 * tree-chrec.h (evolution_function_is_constant_p): Remove
12569 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
12571 2018-04-30 Richard Biener <rguenther@suse.de>
12574 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
12576 2018-04-30 Richard Biener <rguenther@suse.de>
12578 PR tree-optimization/28364
12579 PR tree-optimization/85275
12580 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
12581 copying first exit test.
12583 2018-04-28 Mark Wielaard <mark@klomp.org>
12585 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
12586 dwarf_version >= 5.
12587 (dwarf_AT): Handle DW_AT_addr_base.
12588 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
12590 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
12593 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
12594 (*ashl<dwi>3_doubleword_mask_1): Ditto.
12595 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
12596 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
12598 2018-04-28 Richard Biener <rguenther@suse.de>
12600 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
12601 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
12602 to reflect use. Only add interesting stmts.
12604 2018-04-27 Martin Jambor <mjambor@suse.cz>
12607 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
12608 the jump function allows for passing through aggregate values.
12610 2018-04-27 David Malcolm <dmalcolm@redhat.com>
12612 * input.h (in_system_header_at): Convert from macro to inline
12614 (from_macro_expansion_at): Likewise.
12615 (from_macro_definition_at): Likewise.
12617 2018-04-27 Jeff Law <law@redhat.com>
12619 * config.gcc: Mark tile* targets as deprecated/obsolete.
12621 2018-04-27 Richard Biener <rguenther@suse.de>
12623 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
12626 2018-04-27 Richard Biener <rguenther@suse.de>
12628 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
12630 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
12632 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
12633 with Yd constraint. Set "preferred_for_speed" attribute from
12634 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
12635 with Yd constraint.
12636 (*movdi_internal): Ditto.
12637 (movti_interunit splitters): Remove
12638 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
12639 (movdi_interunit splitters): Ditto.
12640 * config/i386/constraints.md (Ye): Remove.
12641 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
12643 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12646 * config/aarch64/constraints.md (Usg): Limit to 31.
12647 (Usj): Limit to 63.
12649 2018-04-27 Jakub Jelinek <jakub@redhat.com>
12651 PR tree-optimization/85529
12652 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
12653 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
12654 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
12655 zero extension or masking of the MSB bit.
12656 (optimize_range_tests): Add FIRST_BB argument, pass it through
12657 to optimize_range_tests_var_bound.
12658 (maybe_optimize_range_tests, reassociate_bb): Adjust
12659 optimize_range_tests callers.
12661 2018-04-26 Richard Biener <rguenther@suse.de>
12662 Jakub Jelinek <jakub@redhat.com>
12664 * cgraph.h (symbol_table): Just declare debug method here.
12665 * symtab.c (symbol_table::debug): Define.
12667 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
12669 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
12671 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
12673 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
12674 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
12675 (*movdi_internal): Substitute Yi and Yj constraint with x
12676 and Ym and Yn constraint with y constraint. Update "isa"
12677 attribute and set "preferred_for_speed" attribute from
12678 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
12679 (*movsi_internal): Ditto.
12680 (*movdf_internal): Ditto.
12681 (*movsf_internal): Ditto.
12682 (*zero_extendsidi2): Ditto.
12683 * config/i386/sse.md (vec_set<mode>_0): Ditto.
12684 (sse2_loadld): Ditto.
12685 (*vec_extract<ssevecmodelower>_0): Ditto.
12686 (*vec_extractv4si_0_zext_sse4): Ditto.
12687 (vec_concatv2di): Ditto.
12688 (*vec_dup<mode>): Ditto.
12689 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
12690 * config/i386/constraints.md (Yi): Remove.
12695 2018-04-26 Nathan Sidwell <nathan@acm.org>
12697 * dumpfile.c (dump_open): New.
12698 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
12699 (dump_finish): Detect stdio/stderr by value not name.
12701 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
12703 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
12705 2018-04-26 Tom de Vries <tom@codesourcery.com>
12708 * config/nvptx/nvptx.c (verify_neutering_jumps)
12709 (verify_neutering_labels): New function
12710 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
12712 2018-04-26 Tom de Vries <tom@codesourcery.com>
12715 * config/nvptx/nvptx.c (needs_neutering_p): New function.
12716 (nvptx_single): Use needs_neutering_p to skip over insns that do not
12719 2018-04-26 Richard Biener <rguenther@suse.de>
12720 Tom de Vries <tom@codesourcery.com>
12723 * lto-streamer-out.c (output_function): Fixup loops if required to match
12724 discovery done in the reader.
12726 2018-04-26 Richard Biener <rguenther@suse.de>
12728 PR tree-optimization/85116
12729 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
12730 have a loop exit from the single latch predecessor. Remove
12731 case of header with just condition.
12732 (ch_base::copy_headers): Exclude infinite loops from any
12734 (pass_ch::execute): Record exits.
12736 2018-04-26 Richard Biener <rguenther@suse.de>
12738 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
12739 prologue cost vector and pass it to vect_get_load_cost.
12740 (vect_get_peeling_costs_all_drs): Likewise.
12741 (vect_peeling_hash_get_lowest_cost): Likewise.
12742 (vect_enhance_data_refs_alignment): Likewise.
12744 2018-04-26 Richard Biener <rguenther@suse.de>
12746 PR middle-end/85450
12747 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
12748 checking of integer<->pointer conversions.
12749 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
12750 sign-/zero-extending pointer types.
12751 (expand_omp_for_static_chunk): Likewise.
12753 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
12754 Jean Lee <xiaoyur347@gmail.com>
12756 * config/mips/mips.c (mips_asan_shadow_offset): New function.
12757 (TARGET_ASAN_SHADOW_OFFSET): Define.
12758 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
12759 true for -fsanitize=address.
12761 2018-04-25 Mark Wielaard <mark@klomp.org>
12763 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
12766 2018-04-25 Jakub Jelinek <jakub@redhat.com>
12768 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
12769 than "alu", remove explicit "memory" and "imm_disp" attributes.
12770 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
12772 PR middle-end/85414
12773 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
12774 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
12775 gen_lowpart_no_emit.
12777 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
12780 * config/i386/i386.c (ix86_expand_builtin): Change memory
12781 operand to XI, extend p0 to Pmode.
12782 * config/i386/i386.md: Change unspec volatile and operand
12783 1 mode to XI, change operand 0 mode to P.
12785 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
12787 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
12788 GET_MODE_MASK before any checking.
12789 (nds32_can_use_bset_p): Likewise.
12790 (nds32_can_use_btgl_p): Likewise.
12792 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
12794 * config/nds32/nds32-doubleword.md: New define_split pattern for
12795 illegal register number.
12797 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
12799 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
12801 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
12803 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
12805 2018-04-25 Richard Biener <rguenther@suse.de>
12807 * lto-streamer.h (LTO_major_version): Bump to 8.
12809 2018-04-25 Jakub Jelinek <jakub@redhat.com>
12811 * BASE-VER: Set to 9.0.0.
12813 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
12815 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
12816 in __abskf2 and __powikf2.
12818 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12821 * config/aarch64/constraints.md (Usg, Usj): New constraints.
12822 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
12823 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
12824 Use the above on operand 2. Reindent.
12825 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
12827 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
12830 * common/config/i386/i386-common.c (ix86_handle_option): Don't
12832 * config/i386/i386.opt (mcet): Removed.
12833 * doc/install.texi: Remove -mcet documentation.
12834 * doc/invoke.texi: Likewise.
12836 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
12839 * doc/install.texi: Remove -mcet from bootstrap-cet.
12841 2018-04-24 Jakub Jelinek <jakub@redhat.com>
12844 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
12845 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
12849 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
12850 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
12851 containing a CONST_VECTOR.
12853 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
12855 * doc/install.texi: Update newlib dependency for nvptx.
12857 2018-04-24 Jakub Jelinek <jakub@redhat.com>
12860 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
12861 instead of INTVAL when shifting x left.
12863 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
12865 PR tree-optimization/85478
12866 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
12867 vect_grouped_store_supported for single element vectors.
12869 2018-04-24 Richard Biener <rguenther@suse.de>
12872 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
12873 load cost increase to the case of non-constant step.
12875 2018-04-24 Jakub Jelinek <jakub@redhat.com>
12878 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
12879 destination if any_malformed_asm.
12881 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
12883 PR middle-end/85496
12884 * expr.c (store_field): In the bitfield case, if the value comes from
12885 a function call and is returned in registers by means of a PARALLEL,
12886 do not change the mode of the temporary unless BLKmode and VOIDmode.
12888 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
12890 PR rtl-optimization/85423
12891 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
12892 dependencies to debug insns when the previous insn is non-debug.
12894 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
12896 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
12897 enums into a single definition.
12898 (fls): Fix predicates and printing.
12901 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
12903 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
12904 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
12905 and short u6 immediate.
12906 (check_if_valid_sleep_operand): Remove.
12907 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
12909 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
12911 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
12912 flag_always_save_lp condition.
12913 * config/nds32/nds32.opt (malways-save-lp): New option.
12915 2018-04-22 Shiva Chen <shiva0217@gmail.com>
12917 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
12918 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
12919 * config/nds32/nds32.h
12920 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
12921 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
12923 2018-04-22 Shiva Chen <shiva0217@gmail.com>
12925 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
12926 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
12928 2018-04-22 Shiva Chen <shiva0217@gmail.com>
12929 Chung-Ju Wu <jasonwucj@gmail.com>
12931 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
12933 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
12934 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
12936 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
12938 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
12940 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
12942 * config/nds32/nds32-protos.h (nds32_data_alignment,
12943 nds32_local_alignment): Declare.
12944 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
12945 nds32_local_alignment): New functions.
12946 (TARGET_CONSTANT_ALIGNMENT): Define.
12947 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
12949 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
12951 * config/nds32/nds32.c
12952 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
12953 (TARGET_MODES_TIEABLE_P): Likewise.
12955 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
12957 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
12958 level Ofast and Og.
12960 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
12961 Chung-Ju Wu <jasonwucj@gmail.com>
12963 * config/nds32/constants.md (unspec_volatile_element): Add enum values
12964 for unaligned access.
12965 * config/nds32/nds32-intrinsic.c: Implementation of expanding
12967 * config/nds32/nds32-intrinsic.md: Likewise.
12968 * config/nds32/nds32_intrinsic.h: Likewise.
12969 * config/nds32/nds32.h (nds32_builtins): Likewise.
12970 * config/nds32/nds32.opt (munaligned-access): New option.
12971 * config/nds32/nds32.c (nds32_asm_file_start): Display
12972 flag_unaligned_access status.
12974 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
12976 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
12977 -mno-relax is present.
12978 * config/riscv/linux.h (LINK_SPEC): Ditto.
12980 2018-04-20 Martin Sebor <msebor@redhat.com>
12983 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
12985 (gimple_fold_builtin_stxcpy_chk): Same.
12986 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
12988 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
12991 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
12992 __powikf2 when long double is IEEE 128-bit.
12994 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
12996 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
12997 step to make sure stack always aligned.
12999 2018-04-20 Carl Love <cel@us.ibm.com>
13002 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
13003 size check for arg0.
13005 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
13006 Tom de Vries <tom@codesourcery.com>
13009 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
13010 Emit insns for calls too.
13011 (nvptx_find_par): Always look for worker-level predecessor insn.
13012 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
13014 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
13015 (nvptx_process_pars): Propagate frames for calls.
13017 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
13020 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
13022 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
13023 (ix86_handle_option): Don't handle OPT_mibt.
13024 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
13026 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
13028 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
13029 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
13030 (ix86_target_macros): Define __CET__ with flag_cf_protection
13031 for -fcf-protection.
13032 * config/i386/i386.c (isa2_opts): Remove -mibt.
13033 * config/i386/i386.h (TARGET_IBT): Removed.
13034 (TARGET_IBT_P): Likewise.
13035 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
13036 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
13037 * config/i386/i386.opt (mcet): Update help message.
13038 (mshstk): Likewise.
13040 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
13041 -mcet as an alias for -mshstk.
13043 2018-04-20 Richard Biener <rguenther@suse.de>
13045 PR middle-end/85475
13046 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
13047 complexity by forcing a single use of the multiply operand.
13049 2018-04-20 Martin Jambor <mjambor@suse.cz>
13052 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
13053 recursion dependency to only apply to non-clones.
13055 2018-04-20 Martin Jambor <mjambor@suse.cz>
13058 * ipa-cp.c (create_specialized_node): Check that clones of
13059 self-recursive edges exist during IPA-CP.
13061 2018-04-19 Toon Moene <toon@moene.org>
13063 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
13066 2018-04-19 Jakub Jelinek <jakub@redhat.com>
13068 PR tree-optimization/85467
13069 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
13070 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
13071 VECTOR_CST element to type.
13073 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
13076 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
13077 * config/i386/i386.md (builtin_setjmp_setup): Removed.
13078 (builtin_longjmp): Likewise.
13079 (save_stack_nonlocal): New pattern.
13080 (restore_stack_nonlocal): Likewise.
13082 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
13085 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
13086 Replace ASM_OUTPUT_LABEL with fprintf.
13088 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
13091 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
13092 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
13093 * config/i386/i386-c.c (ix86_target_macros_internal): Also
13094 define __IBT__ and __SHSTK__ for -fcf-protection.
13095 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
13097 (ix86_trampoline_init): Likewise.
13098 (x86_output_mi_thunk): Likewise.
13099 (ix86_notrack_prefixed_insn_p): Likewise.
13100 (ix86_option_override_internal): Don't disallow -fcf-protection.
13101 * config/i386/i386.md (rdssp<mode>): Also enable for
13103 (incssp<mode>): Likewise.
13104 (nop_endbr): Likewise.
13105 * config/i386/i386.opt (mcet): Change help message to built-in
13108 (mshstk): Likewise.
13109 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
13110 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
13111 enable CET built-in functions.
13113 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
13115 * common/config/i386/i386-common.c
13116 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
13117 OPTION_MASK_ISA_MOVDIRI_UNSET,
13118 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
13119 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
13120 * config.gcc (movdirintrin.h): New header.
13121 * config/i386/cpuid.h (bit_MOVDIRI,
13122 bit_MOVDIR64B): New bits.
13123 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
13125 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
13126 (VOID, PVOID, PCVOID)): New function types.
13127 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
13128 __builtin_ia32_directstoreu_u64,
13129 __builtin_ia32_movdir64b): New builtins.
13130 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
13131 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
13133 (ix86_valid_target_attribute_inner_p): Ditto.
13134 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
13135 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
13136 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
13137 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
13138 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
13139 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
13140 (movdiri<mode>, movdir64b_<mode>): New.
13141 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
13142 * config/i386/immintrin.h: Include movdirintrin.h.
13143 * config/i386/movdirintrin.h: New file.
13144 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
13146 2018-04-19 Richard Biener <rguenther@suse.de>
13148 PR middle-end/85455
13149 * cfg.c (clear_bb_flags): When loop state says we have
13150 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
13152 2018-04-19 Richard Biener <rguenther@suse.de>
13154 PR tree-optimization/84737
13155 * tree-vect-data-refs.c (vect_copy_ref_info): New function
13156 copying restrict info.
13157 (vect_setup_realignment): Use it.
13158 * tree-vectorizer.h (vect_copy_ref_info): Declare.
13159 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
13160 the first DR to all generated stores.
13161 (vectorizable_load): Likewise for loads.
13163 2018-04-19 Jakub Jelinek <jakub@redhat.com>
13165 PR tree-optimization/85446
13166 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
13167 the integral and pointer types to have the same precision.
13169 * doc/install.texi: Document --disable-cet being the default and
13172 2018-04-18 Martin Liska <mliska@suse.cz>
13174 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
13177 2018-04-18 Martin Liska <mliska@suse.cz>
13180 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
13183 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
13184 arguments if they are comparable.
13186 2018-04-18 Martin Liska <mliska@suse.cz>
13189 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
13192 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
13195 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
13198 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
13199 ENDBR after calling __morestack.
13201 2018-04-18 David Malcolm <dmalcolm@redhat.com>
13204 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
13205 by using gcc_base_ver to generate a gcc_driver_version, and use
13206 it when generating GCC_DRIVER_NAME.
13207 * configure: Regenerate.
13209 2018-04-18 Jakub Jelinek <jakub@redhat.com>
13212 * config.gcc: Obsolete powerpc*-*-*spe*.
13214 2018-04-17 Jakub Jelinek <jakub@redhat.com>
13217 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
13218 (stabstr_D): Change type of unum from unsigned int to
13219 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
13222 2018-04-17 Jim Wilson <jimw@sifive.com>
13225 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
13226 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
13227 Set arg_pointer_offset after using pretend_args_size.
13229 2018-04-17 Jakub Jelinek <jakub@redhat.com>
13231 PR rtl-optimization/85431
13232 * dse.c (record_store): Ignore zero width stores.
13235 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
13236 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
13237 __builtin_stack_restore rather than after it.
13238 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
13239 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
13240 argument instead of virtual_dynamic_stack_rtx.
13242 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
13244 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
13246 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
13247 Add note to error message to explain internal mapping of overloaded
13248 built-in function name to non-overloaded built-in function name.
13249 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
13252 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
13255 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
13256 where the inputs overlap with the output.
13258 2018-04-17 Jakub Jelinek <jakub@redhat.com>
13260 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
13261 (=v, v) alternative and explicit "memory" attribute.
13262 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
13263 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
13265 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
13266 "sselog1" type instead of "sselog".
13267 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
13268 "sselog". Remove explicit "memory" attribute.
13269 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
13270 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
13272 (vec_extract_hi_v32hi): Merge all alternatives into one, use
13273 "sselog1" type instead of "sselog". Remove explicit "memory"
13275 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
13276 use "sselog1" type instead of "sselog". Remove explicit "memory"
13278 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
13279 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
13281 (vec_extract_hi_v64qi): Merge all alternatives into one, use
13282 "sselog1" type instead of "sselog". Remove explicit "memory"
13284 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
13285 use "sselog1" type instead of "sselog". Remove explicit "memory"
13289 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
13291 PR middle-end/85414
13292 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
13295 2018-04-17 Martin Jambor <mjambor@suse.cz>
13298 * ipa-cp.c (create_specialized_node): Call
13299 expand_all_artificial_thunks if necessary.
13301 2018-04-17 Martin Liska <mliska@suse.cz>
13304 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
13305 in message, remote space in between '_G' and '('.
13307 2018-04-17 Jakub Jelinek <jakub@redhat.com>
13310 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
13311 avx512f_vmcmp<mode>3<round_saeonly_name>,
13312 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
13313 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
13314 avx512f_rndscale<mode><round_saeonly_name>,
13315 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
13316 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
13317 Use %<iptr>2 instead of %2 for -masm=intel.
13318 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
13319 avx512f_vcvttss2usi<round_saeonly_name>,
13320 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
13322 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
13323 avx512f_vcvttsd2usi<round_saeonly_name>,
13324 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
13325 Use %q1 instead of %1 for -masm=intel.
13326 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
13327 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
13328 of %3 for -masm=intel.
13329 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
13331 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
13333 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
13335 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
13336 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
13338 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
13340 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
13341 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
13342 %g1 and one with %0 and %1.
13343 (avx512er_vmrcp28<mode><round_saeonly_name>,
13344 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
13345 %1 for -masm=intel.
13346 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
13347 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
13348 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
13349 of %0 and %{%4%} for -masm=intel.
13350 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
13351 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
13352 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
13353 order of %0 and %{%5%}%{z%} for -masm=intel.
13355 2018-04-17 Jan Hubicka <jh@suse.cz>
13358 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
13360 2018-04-17 Martin Liska <mliska@suse.cz>
13363 * multiple_target.c (create_dispatcher_calls): Set apostrophes
13364 for target_clone error message. Make default implementation
13365 clone to be a local declaration.
13366 (separate_attrs): Add new argument and check for an empty
13368 (expand_target_clones): Handle it.
13369 (ipa_target_clone): Make redirection just for target_clones
13372 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
13373 Tom de Vries <tom@codesourcery.com>
13375 PR middle-end/84955
13376 * omp-expand.c (expand_oacc_for): Add dummy false branch for
13377 tiled basic blocks without omp continue statements.
13379 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
13382 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
13383 vec_extract expression as having side effects to make sure it gets
13386 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
13389 * config/i386/i386.c (get_builtin_code_for_version): Check
13392 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
13395 * config.gcc: Support "skylake".
13396 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13398 * config/i386/i386.c (m_SKYLAKE): Define.
13399 (processor_target_table): Add "skylake".
13400 (ix86_option_override_internal): Add "skylake".
13401 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
13402 PROCESSOR_CANNONLAKE.
13403 (get_builtin_code_for_version): Fix priority for
13404 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
13405 PROCESSOR_SKYLAKE-AVX512.
13406 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
13407 (processor_type): Add PROCESSOR_SKYLAKE.
13409 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
13410 Jason Merrill <jason@redhat.com>
13413 * convert.c (convert_to_integer_1): Use direct recursion for
13414 enumeral types and types with a precision less than the number
13415 of bits in their mode.
13417 2018-04-16 Julia Koval <julia.koval@intel.com>
13420 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
13421 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
13423 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
13426 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
13427 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
13428 and -mno-direct-move.
13430 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
13433 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
13434 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
13435 Ensure negative shifts result in {0}.
13437 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
13439 PR rtl-optimization/79916
13440 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
13441 regs (if any) to define how to gnerate SD moves when LRA is in
13444 2018-04-13 Jakub Jelinek <jakub@redhat.com>
13446 PR rtl-optimization/85393
13447 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
13448 * except.c (expand_dw2_landing_pad_for_region): Make static.
13449 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
13450 a label and unconditional jump to old_bb, rather than
13451 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
13454 PR rtl-optimization/85376
13455 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
13456 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
13457 instead of a specific value.
13459 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
13460 Bin Cheng <bin.cheng@arm.com>
13462 PR tree-optimization/82965
13463 PR tree-optimization/83991
13464 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
13465 by_profile_only parameter.
13466 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
13467 information if the loop was predicted to iterate too many times.
13468 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
13470 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
13473 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
13476 2018-04-13 Martin Liska <mliska@suse.cz>
13477 Jakub Jelinek <jakub@redhat.com>
13479 PR middle-end/81657
13480 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
13481 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
13482 * builtins.c (expand_builtin_memory_copy_args): Use
13483 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
13484 handle dest_addr == pc_rtx.
13486 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
13489 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
13490 asked to not generate direct moves.
13491 (fix_trunc<mode>si2_stfiwx): Similar.
13492 (fix_trunc<mode>si2_internal): Similar.
13494 2018-04-12 Jakub Jelinek <jakub@redhat.com>
13497 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
13498 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
13499 lookup if dest in some wider mode is known to be const0_rtx and
13500 if so, record permanent equivalence for it to be ZERO_EXTEND of
13501 the narrower mode destination.
13503 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
13505 * lto-streamer-out.c (output_function): Revert 259346.
13506 * omp-expand.c (expand_oacc_for): Likewise.
13508 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
13510 PR rtl-optimization/85354
13511 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
13512 * sel-sched.c (sel_global_init): ... here.
13514 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
13517 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
13518 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
13519 mode for PE-COFF targets.
13520 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
13521 (i386_pe_asm_lto_end): Likewise.
13522 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
13523 (TARGET_ASM_LTO_END): Likewise.
13524 * config/i386/winnt.c (saved_debug_info_level): New static variable.
13525 (i386_pe_asm_lto_start): New function.
13526 (i386_pe_asm_lto_end): Likewise.
13528 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
13529 Richard Biener <rguenther@suse.de>
13531 PR middle-end/84955
13532 * lto-streamer-out.c (output_function): Fix CFG loop state before
13534 * omp-expand.c (expand_oacc_for): Handle calls to internal
13535 functions like regular functions.
13537 2018-04-12 Richard Biener <rguenther@suse.de>
13540 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
13541 for the early LTO debug to properly generate references to it
13542 during DIE emission. Do not re-use that for the skeleton for
13544 (dwarf2out_early_finish): Likewise.
13546 2018-04-12 Jakub Jelinek <jakub@redhat.com>
13549 * config/i386/sse.md
13550 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
13551 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
13552 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
13553 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
13554 and output is a reg, avoid creating invalid lowpart subreg, but
13555 instead split into a 512-bit move. Don't split if not AVX512VL,
13556 input is xmm16+ reg and output is a mem.
13557 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
13558 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
13559 xmm16+ reg and output is a mem.
13561 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
13563 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
13564 also for flag_dwarf2_cfi_asm.
13566 2018-04-12 Jakub Jelinek <jakub@redhat.com>
13568 PR rtl-optimization/85342
13569 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
13570 a bool scalar var inside of the loop instead. Don't try to update
13571 recog_data.operand after failed apply_change_group.
13573 2018-04-12 Tom de Vries <tom@codesourcery.com>
13576 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
13577 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
13578 array with flexible array member as array without given dimension.
13579 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
13580 argument for undefined param to true.
13582 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
13585 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
13586 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
13587 from PowerPC section.
13588 * config/rs6000/sysv4.opt (mcall-): Improve help text.
13589 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
13590 help text that is too long.
13591 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
13592 help text that is too long.
13593 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
13594 help text that is too long.
13596 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
13598 * config/alpha/alpha.md (stack_probe_internal): Rename
13599 from "probe_stack". Update all callers.
13601 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
13603 PR rtl-optimization/84566
13604 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
13605 sched_macro_fuse_insns.
13607 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
13610 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
13611 (compute_block_dependences): ... from here.
13613 2018-04-11 Jakub Jelinek <jakub@redhat.com>
13615 PR tree-optimization/85331
13616 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
13617 from int to HOST_WIDE_INT.
13619 2018-04-11 Martin Jambor <mjambor@suse.cz>
13622 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
13623 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
13624 not the same as the source val.
13625 (cgraph_edge_brings_value_p): New parameter.
13626 (gather_edges_for_value): Pass destination value to
13627 cgraph_edge_brings_value_p.
13628 (perhaps_add_new_callers): Likewise.
13629 (get_info_about_necessary_edges): Likewise and exclude values brought
13630 only by self-recursive edges.
13631 (create_specialized_node): Redirect only clones of self-calling edges.
13632 (+self_recursive_pass_through_p): New function.
13633 (find_more_scalar_values_for_callers_subset): Use it.
13634 (find_aggregate_values_for_callers_subset): Likewise.
13635 (known_aggs_to_agg_replacement_list): Removed.
13636 (decide_whether_version_node): Re-calculate known constants for all
13637 remaining context clones.
13639 2018-04-11 Richard Biener <rguenther@suse.de>
13642 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
13643 from early DWARF output.
13644 (dwarf2out_early_finish): Output line info unconditionally into
13645 early DWARF and add reference to it.
13647 2018-04-11 Jakub Jelinek <jakub@redhat.com>
13650 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
13651 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
13652 other than V2DFmode using iptr mode attribute.
13653 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
13655 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
13657 PR rtl-optimization/84659
13658 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
13660 2018-04-11 Jakub Jelinek <jakub@redhat.com>
13663 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
13665 (output_loc_list): Pass address of a dummy size variable even in the
13666 locview handling loop.
13667 (index_location_lists): Add comment on why skip_loc_list_entry can't
13670 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
13673 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
13676 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
13679 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
13680 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
13681 and -mstring-compare-inline-limit.
13683 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
13686 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
13687 for stack clash protection in a register whenever we need it to be in
13690 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
13692 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
13693 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
13695 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
13698 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
13700 (mlong-double-): Ditto.
13701 * config/rs6000/sysv4.opt (msdata=): Ditto.
13702 (mtls-size=): Ditto.
13704 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
13706 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
13707 erroneous entries for
13708 "vector int vec_ldl (int, long int *)", and
13709 "vector unsigned int vec_ldl (int, unsigned long int *)".
13710 Add comments and entries for
13711 "vector bool char vec_ldl (int, bool char *)",
13712 "vector bool short vec_ldl (int, bool short *)",
13713 "vector bool int vec_ldl (int, bool int *)",
13714 "vector bool long long vec_ldl (int, bool long long *)",
13715 "vector pixel vec_ldl (int, pixel *)",
13716 "vector long long vec_ldl (int, long long *)",
13717 "vector unsigned long long vec_ldl (int, unsigned long long *)".
13718 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
13719 type tree bool_long_long_type_node and correct definition of
13720 bool_V2DI_type_node to make reference to this new type tree.
13721 (rs6000_mangle_type): Replace erroneous reference to
13722 bool_long_type_node with bool_long_long_type_node.
13723 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
13724 comments to emphasize sign distinctions for char and int types and
13725 replace RS6000_BTI_bool_long constant with
13726 RS6000_BTI_bool_long_long constant. Also add comment to restrict
13727 use of RS6000_BTI_pixel.
13728 (bool_long_type_node): Remove this macro definition.
13729 (bool_long_long_type_node): New macro definition
13731 2018-04-10 Jakub Jelinek <jakub@redhat.com>
13733 PR rtl-optimization/85300
13734 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
13735 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
13736 simplify_unary_operation fails.
13738 2018-04-10 Martin Liska <mliska@suse.cz>
13740 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
13741 cgraph_edge and ipa_ref.
13743 2018-04-10 Jakub Jelinek <jakub@redhat.com>
13747 * config/i386/sse.md
13748 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
13749 computation of the VEC_MERGE selector from mask.
13750 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
13751 Fix decoding of the VEC_MERGE selector into mask.
13753 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
13755 PR tree-optimization/85286
13756 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
13758 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
13760 * final.c (final_1): Set insn_last_address as well as
13761 insn_current_address.
13763 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13766 * explow.c (emit_stack_probe): Call validize_mem on memory location
13767 before passing it to gen_probe_stack. Create address operand and
13768 legitimize it for the probe_stack_address case.
13770 2018-04-09 Jan Hubicka <jh@suse.cz>
13773 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
13774 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
13775 * tree.c (free_lang_data_in_type): Fix handling of binfos;
13777 (free_lang_data): Rebuild type inheritance graph.
13779 2018-04-09 Martin Sebor <msebor@redhat.com>
13781 * invoke.texi (-finline-small-functions): Mention other optimization
13783 (-findirect-inlining, -fpartial-inlining): Same.
13784 (-finline-functions-called-once): Same.
13785 (-freorder-blocks-and-partition): Same.
13787 2018-04-09 Jan Hubicka <jh@suse.cz>
13790 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
13791 jumps; choose last target that matches the criteria (i.e.
13792 no partition changes for non-crossing jumps).
13793 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
13794 support for redirecting crossing jumps to non-crossing.
13796 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
13798 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
13799 also for naked functions.
13801 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
13803 * config/arc/arc.md (add_shift): New pattern.
13804 (add_shift2): Likewise.
13805 (sub_shift): Likewise.
13806 (sub_shift_cmp0_noout): Likewise.
13807 (compare_si_ashiftsi): Likewise.
13808 (xbfu_cmp0_noout): New combine pattern.
13809 (xbfu_cmp0"): Likewise.
13810 (movsi_set_cc_insn): Place the predicable variant first.
13811 (commutative_binary_cmp0_noout): Remove clobber.
13812 (commutative_binary_cmp0): New pattern.
13813 (noncommutative_binary_cmp0): Likewise.
13814 (noncommutative_binary_cmp0_noout): Likewise.
13815 (noncommutative_binary_comparison_result_used): Removed.
13816 (rsub_cmp0): New pattern.
13817 (rsub_cmp0_noout): Likewise.
13818 (extzvsi): Changed, keep only meaningful variants.
13819 (SQH, SEZ): New iterators.
13820 (SQH_postfix): New mode attribute.
13821 (SEZ_prefix): New code attribute.
13822 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
13823 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
13824 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
13825 of numerical value.
13826 (noncommutative_operator): Check the availability of barrel
13829 2018-04-09 Richard Biener <rguenther@suse.de>
13831 PR tree-optimization/85284
13832 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
13833 Only use the niter constraining form of simple_iv when the exit
13834 is always executed.
13836 2018-04-09 Tom de Vries <tom@codesourcery.com>
13839 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13840 (define_expand "*memory_barrier"): New define_expand.
13841 (define_insn "memory_barrier"): New insn.
13843 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
13845 PR rtl-optimization/80463
13846 PR rtl-optimization/83972
13847 PR rtl-optimization/83480
13849 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
13850 correct producer for the insn.
13851 (tidy_control_flow): Fixup seqnos in case of debug insns.
13853 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
13855 PR rtl-optimization/83913
13857 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
13858 different sched-times when merging exprs.
13860 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
13862 PR rtl-optimization/83962
13864 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
13865 tidy_fallthru_edge and tidy_control_flow.
13867 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
13869 PR rtl-optimization/83530
13871 * sel-sched.c (force_next_insn): New global variable.
13872 (remove_insn_for_debug): When force_next_insn is true, also leave only
13873 next insn in the ready list.
13874 (sel_sched_region): When the region wasn't scheduled, make another pass
13875 over it with force_next_insn set to 1.
13877 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
13879 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
13881 * config/nds32/constants.md (unspec_volatile_element): Add enum values
13882 for interrupt control.
13883 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
13884 functions for interrupt control.
13885 * config/nds32/nds32-intrinsic.md: Likewise.
13886 * config/nds32/nds32_intrinsic.h: Likewise.
13887 * config/nds32/nds32.h (nds32_builtins): Likewise.
13889 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
13891 * config/nds32/nds32.c (nds32_init_machine_status,
13892 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
13893 strict_aligned_p field.
13894 (nds32_expand_to_rtl_hook): New function.
13895 (TARGET_EXPAND_TO_RTL_HOOK): Define.
13896 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
13898 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
13899 Chung-Ju Wu <jasonwucj@gmail.com>
13901 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
13902 * config/nds32/nds32-n7.md: New file.
13903 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
13904 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
13906 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
13907 * config/nds32/nds32.md (pipeline_model): Add n7.
13908 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
13909 * config/nds32/pipelines.md: Include n7 settings.
13911 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
13912 Chung-Ju Wu <jasonwucj@gmail.com>
13914 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
13915 * config/nds32/nds32-e8.md: New file.
13916 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
13917 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
13919 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
13920 * config/nds32/nds32.md (pipeline_model): Add e8.
13921 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
13922 * config/nds32/pipelines.md: Include e8 settings.
13924 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
13925 Chung-Ju Wu <jasonwucj@gmail.com>
13927 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
13928 * config/nds32/nds32-n8.md: New file.
13929 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
13930 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
13932 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
13933 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
13934 * config/nds32/nds32.md (pipeline_model): Add n8.
13935 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
13936 * config/nds32/pipelines.md: Include n8 settings.
13938 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
13939 Chung-Ju Wu <jasonwucj@gmail.com>
13941 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
13942 * config/nds32/nds32-n9-2r1w.md: New file.
13943 * config/nds32/nds32-n9-3r2w.md: New file.
13944 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
13945 nds32_register_ports): New or modify for cpu n9.
13946 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
13948 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
13949 * config/nds32/nds32-utils.c: New file.
13950 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
13951 TARGET_MUL_SLOW): Define.
13952 * config/nds32/nds32.md (pipeline_model): New attribute.
13953 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
13954 New options that support cpu n9.
13955 * config/nds32/pipelines.md: Include n9 settings.
13956 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
13958 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
13960 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
13961 information if necessary.
13962 (output_cond_branch_compare_zero): Likewise.
13963 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
13964 (nds32_target_alignment): Refine for alignment.
13965 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
13966 (FUNCTION_BOUNDARY): Modify.
13967 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
13969 * config/nds32/nds32.opt (malways-align, malign-functions): New.
13971 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
13973 * config/nds32/constants.md (unspec_volatile_element): Add values for
13974 TLB operation and data prefetch.
13975 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
13976 functions for TLB operation and data prefetch.
13977 * config/nds32/nds32-intrinsic.md: Likewise.
13978 * config/nds32/nds32_intrinsic.h: Likewise.
13979 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
13980 (nds32_print_operand): Likewise.
13981 * config/nds32/nds32.h (nds32_builtins): Likewise.
13983 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
13984 Andrew Pinski <pinsika@gcc.gnu.org>
13986 PR middle-end/82976
13987 * match.pd: Use constant_boolean_node of correct type instead of
13988 boolean_true_node or boolean_false_node for simplifying
13989 pointer comparisons to zero.
13991 2018-04-07 Jakub Jelinek <jakub@redhat.com>
13993 PR tree-optimization/80021
13994 * tree.c (verify_type_variant): Make error call in verify_variant_match
13995 translatable and remove final full stop.
13997 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
13999 * config/nds32/constants.md (unspec_volatile_element): Add
14000 UNSPEC_VOLATILE_EH_RETURN.
14001 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
14002 nds32_output_stack_pop): Support dwarf exception handling process.
14003 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
14004 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
14005 exception handling process.
14006 (nds32_compute_stack_frame): Likewise.
14007 (nds32_return_addr_rtx): Likewise.
14008 (nds32_initial_elimination_offset): Likewise.
14009 (nds32_expand_prologue): Likewise.
14010 (nds32_expand_epilogue): Likewise.
14011 (nds32_dynamic_chain_address): New function.
14012 * config/nds32/nds32.h (machine_function): Add fields for dwarf
14013 exception handling.
14014 (DYNAMIC_CHAIN_ADDRESS): Define.
14015 (EH_RETURN_DATA_REGNO): Define.
14016 (EH_RETURN_STACKADJ_RTX): Define.
14017 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
14018 patterns for dwarf exception handling.
14020 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14022 * config/nds32/nds32.h: Clean up obsolete macros.
14024 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14026 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
14027 Add enum values for particular instructions.
14028 * config/nds32/nds32-intrinsic.c: Implementation of expanding
14029 particular intrinsic functions.
14030 * config/nds32/nds32-intrinsic.md: Likewise.
14031 * config/nds32/nds32_intrinsic.h: Likewise.
14032 * config/nds32/nds32.h (nds32_builtins): Likewise.
14033 * config/nds32/nds32.md (type): Add pbsad and pbsada.
14034 (btst, ave): New patterns for particular instructions.
14036 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14038 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
14039 Add enum values for atomic load/store and memory sync.
14040 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
14042 * config/nds32/nds32-intrinsic.md: Likewise.
14043 * config/nds32/nds32_intrinsic.h: Likewise.
14044 * config/nds32/nds32.h (nds32_builtins): Likewise.
14046 2018-04-07 Jakub Jelinek <jakub@redhat.com>
14048 PR tree-optimization/85257
14049 * fold-const.c (native_encode_vector): If not all elts could fit
14050 and off is -1, return 0 rather than offset.
14051 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
14052 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
14053 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
14054 adjust buffer in native_interpret_expr call.
14056 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14058 * config/nds32/constants.md (unspec_volatile_element): Add cache
14059 control enum values.
14060 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
14061 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
14062 * config/nds32/nds32.c (nds32_cctl_names): New.
14063 (nds32_print_operand): Handle cache control register names.
14064 * config/nds32/nds32.h (nds32_builtins): New enum values.
14065 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
14067 * config/nds32/nds32.md (type): Add mmu.
14068 * config/nds32/pipelines.md (simple_insn): Add mmu.
14070 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14072 * config/nds32/nds32.md (type): Remove call.
14073 * config/nds32/pipelines.md (simple_insn): Likewise.
14075 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14077 * config/nds32/constants.md (unspec_volatile_element): Add
14078 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
14079 UNSPEC_VOLATILE_FMFCFG.
14080 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
14081 description for fmfcfg and fmfcsr.
14082 (bdesc_1arg): Add fmtcsr.
14083 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
14084 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
14085 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
14086 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
14087 unspec_fmfcfg): New patterns.
14088 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
14089 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
14090 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
14091 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
14092 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
14093 __nds32__fmfcfg): Define.
14095 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14097 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
14098 intrinsic register names.
14099 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
14100 intrinsic register enum values and macros.
14102 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14104 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
14105 for load/store addressing form.
14106 (nds32_print_operand_address): Likewise.
14108 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
14111 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
14112 based on LABEL_REF. Remove useless assertion.
14113 (pic_address_needs_scratch): Fix formatting.
14114 (sparc_legitimize_pic_address): Minor tweaks.
14115 (sparc_delegitimize_address): Adjust assertion accordingly.
14116 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
14117 into symbolic_operand.
14118 (movsi_high_pic_label_ref): Likewise.
14119 (movsi_lo_sum_pic_label_ref): Likewise.
14120 (movdi_pic_label_ref): Likewise.
14121 (movdi_high_pic_label_ref): Likewise.
14122 (movdi_lo_sum_pic_label_ref): Likewise.
14124 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
14126 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
14127 custom LIB_SPEC setup.
14129 2018-04-06 Ruslan Bukin <br@bsdpad.com>
14130 Kito Cheng <kito.cheng@gmail.com>
14132 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
14133 * config/riscv/freebsd.h: New.
14135 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
14137 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
14138 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
14141 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
14142 Kito Cheng <kito.cheng@gmail.com>
14144 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
14145 nds32_output_call, nds32_symbol_binds_local_p): New functions.
14146 * config/nds32/nds32-protos.h (nds32_output_call,
14147 nds32_output_return): Declare.
14148 * config/nds32/nds32.md: Refine all the call and return patterns.
14150 2018-04-06 Jakub Jelinek <jakub@redhat.com>
14153 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
14154 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
14156 PR rtl-optimization/84872
14157 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
14158 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
14159 EDGE_CROSSING edge.
14161 2018-04-06 Tamar Christina <tamar.christina@arm.com>
14163 * expr.c (copy_blkmode_to_reg): Revert 254862.
14164 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
14166 2018-04-06 Richard Biener <rguenther@suse.de>
14168 PR middle-end/85244
14169 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
14170 after seeing a component reference with an adjacent field. Treat
14171 refs to arrays at struct end of external decls similar to
14172 refs to unconstrained commons.
14174 2018-04-06 Jakub Jelinek <jakub@redhat.com>
14177 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
14178 look through SAVE_EXPRs with non-side-effects argument. Adjust
14180 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
14183 2018-04-06 Richard Biener <rguenther@suse.de>
14185 PR middle-end/85180
14186 * alias.c (find_base_term): New wrapper around find_base_term
14187 unwinding CSELIB_VAL_PTR changes.
14188 (find_base_term): Do not restore CSELIB_VAL_PTR during the
14191 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14193 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
14195 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
14196 constant definitions.
14197 ("nop"): lr 0,0 -> nopr r0
14198 ("nop_lr0", "nop_lr1"): New insn definitions.
14200 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
14202 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
14203 NDS32_V3PUSH_AVAILABLE_P macro.
14205 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
14206 Chung-Ju Wu <jasonwucj@gmail.com>
14208 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
14209 (nds32*-*-*): Add float and fpu_config into supported_defaults.
14210 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
14211 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
14212 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
14213 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
14214 * config/nds32/constraints.md: New constraints and checking for hard
14215 float configuration.
14216 * config/nds32/iterators.md: New mode iterator and attribute for hard
14217 float configuration.
14218 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
14220 * config/nds32/nds32-fpu.md: New file.
14221 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
14222 deal with hard float code generation.
14223 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
14225 (abi_type, float_reg_number): New enum type.
14226 * config/nds32/nds32-predicates.c: New predicates for hard float.
14227 * config/nds32/nds32-protos.h: Declare functions for hard float.
14228 * config/nds32/nds32.c: Implementation for hard float configuration.
14229 * config/nds32/nds32.h: Definitions for hard float configuration.
14230 * config/nds32/nds32.md: Include hard float machine description and
14231 modify patterns for hard float configuration.
14232 * config/nds32/nds32.opt: New options for hard float configuration.
14233 * config/nds32/predicates.md: New predicates for hard float
14236 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
14238 * common/config/nds32/nds32-common.c
14239 (nds32_option_optimization_table): Enable -mreleax-hint by default.
14241 2018-04-05 Jakub Jelinek <jakub@redhat.com>
14243 PR middle-end/85195
14244 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
14245 CONSTRUCTOR_ELT (ctor, ...)->value.
14247 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
14250 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
14252 2018-04-05 Tom de Vries <tom@codesourcery.com>
14255 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
14258 2018-04-05 Shiva Chen <shiva0217@gmail.com>
14259 Kito Cheng <kito.cheng@gmail.com>
14261 * config/nds32/constraints.md (U33): Fine-tune checking condition.
14262 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
14263 * config/nds32/nds32.h (nds32_16bit_address_type): Add
14264 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
14266 2018-04-05 Shiva Chen <shiva0217@gmail.com>
14267 Kito Cheng <kito.cheng@gmail.com>
14269 * config/nds32/constraints.md (Ufe): New memory constraint.
14270 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
14271 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
14272 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
14274 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
14275 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
14277 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14279 * config/nds32/nds32.md: Use optimize_size in the condition for
14280 alu-shift instructions.
14282 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14284 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
14286 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14288 * config/nds32/nds32.md (negsi2): Refine pattern.
14290 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
14291 Chung-Ju Wu <jasonwucj@gmail.com>
14293 * config/nds32/iterators.md (shift_rotate): New code iterator.
14294 (shift): New code attribute.
14295 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
14296 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
14297 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
14298 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
14299 bit-wise operations.
14300 (andsi3, *andsi3): Ditto.
14301 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
14302 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
14303 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
14304 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
14305 nds32_ior_operand, nds32_xor_operand): New predicates.
14307 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14309 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
14310 (addsi3, subsi3): ... this.
14312 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14314 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
14316 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14318 * config/nds32/nds32.md: Adjust indention.
14320 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
14322 * config/nds32/nds32.md (feature): New attribute.
14324 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14326 * config/nds32/nds32.md (subtype): New attribute.
14328 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
14331 * config/arm/arm-builtins.c (arm_expand_builtin): Change
14332 expansion to perform a bitwise AND of the argument followed by a
14333 boolean negation of the result.
14335 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
14337 PR rtl-optimization/84878
14338 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
14339 the basic block. Assert the use reference is not artificial and that
14340 it has an associated insn.
14342 2018-04-04 Michael Matz <matz@suse.de>
14344 * builtins.c (compute_objsize): Pass correct operand
14345 to array_at_struct_end_p.
14347 2018-04-04 Richard Biener <rguenther@suse.de>
14350 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
14351 from contexts for DINFO_LEVEL_TERSE and below.
14353 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
14355 * config/nds32/nds32-doubleword.md (move_<mode>): Require
14356 resiter_operand condition.
14357 * config/nds32/nds32.md (*move<mode>): Ditto.
14359 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
14360 Monk Chiang <sh.chiang04@gmail.com>
14362 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
14364 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14366 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
14368 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14369 Kito Cheng <kito.cheng@gmail.com>
14371 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
14372 nds32_cond_code_str, output_cond_branch,
14373 output_cond_branch_compare_zero, nds32_expand_cbranch,
14374 nds32_expand_cstore, nds32_expand_movcc,
14375 nds32_output_cbranchsi4_equality_zero,
14376 nds32_output_cbranchsi4_equality_reg,
14377 nds32_output_cbranchsi4_equality_reg_or_const_int,
14378 nds32_output_cbranchsi4_greater_less_zero: New functions.
14379 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
14380 nds32_expand_cstore, nds32_expand_movcc,
14381 nds32_output_cbranchsi4_equality_zero,
14382 nds32_output_cbranchsi4_equality_reg,
14383 nds32_output_cbranchsi4_equality_reg_or_const_int,
14384 nds32_output_cbranchsi4_greater_less_zero): Declare.
14385 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
14386 nds32_rimm11s_operand): New predicates.
14387 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
14388 * config/nds32/nds32.md: Rewrite all the branch and conditional move
14391 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
14393 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
14394 * config/nds32/nds32.md: Ditto.
14395 * config/nds32/pipelines.md: Ditto.
14397 2018-04-04 Richard Biener <rguenther@suse.de>
14399 PR tree-optimization/85168
14400 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
14401 propagating abnormals.
14403 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14405 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
14407 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14408 Kito Cheng <kito.cheng@gmail.com>
14410 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
14411 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
14412 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
14413 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
14414 * config/nds32/nds32.md (sibcall_internal): New.
14415 (sibcall_register): Remove.
14416 (sibcall_immediate): Remove.
14417 (sibcall_value_internal): New.
14418 (sibcall_value_register): Remove.
14419 (sibcall_value_immediate): Remove.
14420 * config/nds32/predicates.md (nds32_general_register_operand): New.
14421 (nds32_call_address_operand): New.
14423 2018-04-03 Jakub Jelinek <jakub@redhat.com>
14425 PR rtl-optimization/85167
14426 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
14427 bb_defs if *split_p, instead preinitialize it to NULL.
14429 PR tree-optimization/85156
14430 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
14431 evaluating the argument multiple times.
14433 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
14435 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
14437 (_mm_cvtpd_ps): Likewise.
14438 (_mm_cvttpd_epi32): Likewise.
14439 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
14440 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
14441 vector, pixel, and bool following altivec.h include.
14443 2018-04-03 Martin Sebor <msebor@redhat.com>
14445 * doc/extend.texi (Common Function Attributes): Clarify.
14446 (const attribute): Likewise.
14447 (pure attribute): Likewise.
14449 2018-04-03 Jakub Jelinek <jakub@redhat.com>
14452 * config/i386/i386.c (ix86_expand_vector_set): Use
14453 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
14455 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
14457 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
14458 instructions when changing rounding bits to preserve precision bits
14459 in the x87 control word.
14461 2018-04-03 Martin Liska <mliska@suse.cz>
14463 PR tree-optimization/82491
14464 * rtl.h (strip_offset_and_add): Replace += suboffset with
14465 poly_uint64 () + suboffset.
14467 2018-03-29 Martin Liska <mliska@suse.cz>
14468 Martin Jambor <mjambor@suse.cz>
14471 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
14472 param_type is not an integral or pointer type.
14474 2018-04-03 Richard Biener <rguenther@suse.de>
14476 * sese.h (recompute_all_dominators): Remove.
14478 2018-04-02 Martin Sebor <msebor@redhat.com>
14480 * doc/invoke.texi (-Wrestrict): Fix typos.
14482 2018-04-02 Jim Wilson <jimw@sifive.com>
14484 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
14485 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
14486 (<optab>di3, <optab>si3_extend): Likewise.
14487 (<optab>si3_mask, <optab>si3_mask_1): New.
14488 (<optab>di3_mask, <optab>di3_mask_1): New.
14489 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
14490 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
14491 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
14493 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
14495 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
14498 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
14500 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
14501 (nds32_canonicalize_comparison): New function.
14503 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
14504 Kito Cheng <kito.cheng@gmail.com>
14505 Kuan-Lin Chen <kuanlinchentw@gmail.com>
14507 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
14508 * config/nds32/constants.md (unspec_volatile_element): Add
14509 UNSPEC_VOLATILE_RELAX_GROUP.
14510 * config/nds32/nds32-relax-opt.c: New file.
14511 * config/nds32/nds32-predicates.c
14512 (nds32_symbol_load_store_p): New function.
14513 * config/nds32/nds32-protos.h
14514 (nds32_symbol_load_store_p): Declare function.
14515 (make_pass_nds32_relax_opt): Declare new rtl pass function.
14516 * config/nds32/nds32.c
14517 (nds32_register_pass): New function to register pass.
14518 (nds32_register_passes): New function to register passes.
14519 * config/nds32/nds32.md (relax_group): New pattern.
14520 * config/nds32/nds32.opt (mrelax-hint): New option.
14521 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
14523 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
14525 * config/nds32/t-nds32: Modify files dependency.
14527 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
14529 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
14530 (PROFILE_HOOK): Define its implementation.
14532 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
14534 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
14535 type and 32-bit size.
14537 2018-04-01 Jakub Jelinek <jakub@redhat.com>
14539 PR middle-end/85090
14540 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
14541 (V_128_256): New mode iterator.
14542 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
14543 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
14544 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
14546 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
14547 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
14549 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
14552 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
14553 NaN inputs correctly.
14555 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
14558 * config/rs6000/vsx.md (??r): New mode attribute.
14559 (*vsx_mov<mode>_64bit): Use it.
14560 (*vsx_mov<mode>_32bit): Likewise.
14562 2018-03-30 Martin Sebor <msebor@redhat.com>
14564 PR tree-optimization/84818
14565 * builtins.c (check_access): Use warning_n.
14567 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
14570 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
14572 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
14575 2018-03-30 Julia Koval <julia.koval@intel.com>
14578 * x86-tune.def (movx, partial_reg_dependency): Enable for
14581 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
14583 PR inline-asm/84985
14584 * lra-constraints.c (process_alt_operands): Move setting
14585 this_alternative_matches below.
14587 2018-03-29 Martin Liska <mliska@suse.cz>
14590 * doc/invoke.texi: Document how LTO works with debug info.
14591 Describe auto-load support of binutils. Mention 'x86-64'
14592 as valid option value of -march option.
14594 2018-03-29 Jakub Jelinek <jakub@redhat.com>
14596 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
14599 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
14600 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
14601 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
14604 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
14607 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
14608 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
14609 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
14610 for RS6000_BTM_POWERPC64.
14611 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
14612 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
14613 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
14616 (DIVDEU): Likewise.
14618 2018-03-28 Carl Love <cel@us.ibm.com>
14621 2017-09-27 Carl Love <cel@us.ibm.com>
14623 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
14624 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
14625 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
14628 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14630 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
14631 instead of __vector bool.
14632 (_mm_max_pu8): Likewise.
14633 (_mm_min_pi16): Likewise.
14635 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
14638 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
14639 (DIVWEUO): Likewise.
14640 (DIVDEO): Likewise.
14641 (DIVDEUO): Likewise.
14642 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
14643 DIVWEUO and DIVDEUO.
14644 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
14645 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
14646 (div_extend): Likewise.
14647 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
14649 (__builtin_divweuo): Likewise.
14650 (__builtin_divdeo): Likewise.
14651 (__builtin_divdeuo): Likewise.
14653 2018-03-28 Jakub Jelinek <jakub@redhat.com>
14656 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
14657 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
14659 PR tree-optimization/82004
14660 * gimple-match-head.c (optimize_pow_to_exp): New function.
14661 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
14662 Don't fold to exp if optimize_pow_to_exp is false.
14664 2018-03-28 Martin Liska <mliska@suse.cz>
14667 * calls.c (initialize_argument_information): Fix trailing space.
14668 * common.opt: Fix typo and provide better explanation for
14669 -fsanitize-coverage option.
14670 * config/i386/i386.opt: Fix typo.
14672 2018-03-28 Jakub Jelinek <jakub@redhat.com>
14673 Martin Liska <mliska@suse.cz>
14676 * gimplify.c (asan_poison_variable): Don't do the check for
14677 gimplify_omp_ctxp here.
14678 (gimplify_decl_expr): Do it here.
14679 (gimplify_target_expr): Likewise.
14681 2018-03-28 Martin Liska <mliska@suse.cz>
14684 * config/i386/i386.c (ix86_function_arg_advance): Do not call
14685 chkp_type_bounds_count if MPX is not enabled.
14687 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
14689 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
14691 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
14694 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
14695 function to create the function decl for complex long double
14696 multiply and divide for -mabi=ieeelongdouble.
14697 (init_float128_ieee): Call it.
14699 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
14702 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
14703 -fcf-protection=branch -mibt.
14704 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
14706 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
14709 * config/arm/arm.c (arm_valid_symbolic_address): Handle
14710 arm_word_relocations.
14712 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
14715 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
14716 extern array declarations.
14718 2018-03-27 Richard Biener <rguenther@suse.de>
14720 PR middle-end/84067
14721 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
14722 explicit single_use checks.
14724 2018-03-27 Richard Biener <rguenther@suse.de>
14726 PR tree-optimization/85082
14727 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
14730 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
14732 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
14733 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
14734 Turn on fasynchronous-unwind-tables and funwind-tables.
14736 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
14739 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
14740 (*bmi_blsr_<mode>_ccz): Ditto.
14742 2018-03-26 Tom de Vries <tom@codesourcery.com>
14744 PR tree-optimization/85063
14745 * omp-general.c (offloading_function_p): New function. Factor out
14747 * omp-offload.c (pass_omp_target_link::gate): ... here.
14748 * omp-general.h (offloading_function_p): Declare.
14749 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
14750 with attribute omp declare target for offloading functions.
14752 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
14754 PR tree-optimization/84005
14755 * tree-data-ref.h (get_base_for_alignment): Declare.
14756 * tree-data-ref.c (get_base_for_alignment_1): New function.
14757 (get_base_for_alignment): Likewise.
14758 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
14759 get_base_for_alignment to find a suitable base object, instead
14760 of always using drb->base_address.
14762 2018-03-23 Jakub Jelinek <jakub@redhat.com>
14764 PR inline-asm/85022
14765 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
14766 known size by default.
14768 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
14770 PR inline-asm/85030
14771 * lra-constraints.c (process_alt_operands): Don't match BLKmode
14772 and non BLKmode operands.
14774 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14777 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
14778 Clean up attributes.
14780 2018-03-23 Richard Biener <rguenther@suse.de>
14783 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
14784 we are going to emit early debug for LTO.
14786 2018-03-23 Jakub Jelinek <jakub@redhat.com>
14788 PR inline-asm/85034
14789 * function.c (match_asm_constraints_1): Don't optimize if input
14790 doesn't satisfy general_operand predicate for output's mode.
14792 PR inline-asm/85022
14793 * alias.c (write_dependence_p): Don't require for x_canonicalized
14794 non-VOIDmode if x has VOIDmode.
14797 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
14798 just don't try to optimize it rather than assert it never happens.
14800 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
14802 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
14803 macro expansions for definition of ST_INTERNAL_<mode> and
14804 LD_INTERNAL_<mode> builtins.
14805 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
14807 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
14809 (altivec_expand_st_builtin): Likewise.
14810 (altivec_expand_builtin): Remove calls to deleted functions.
14811 (rs6000_address_for_altivec): Delete this function.
14812 * config/rs6000/vector.md: Remove expands for
14813 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
14815 2018-03-22 Sudakshina Das <sudi.das@arm.com>
14818 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
14819 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
14820 re-computing once computed.
14821 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
14822 (arm_init_machine_status): Initialize
14823 machine->static_chain_stack_bytes.
14825 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
14828 * doc/extend.texi: Add four new prototypes for vec_ld.
14829 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
14830 definitions for more logical presentation.
14831 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
14832 entries for V1TI variants of __builtin_altivec_ld builtin.
14833 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
14834 handling of V1TI variant of LVX icode pattern.
14835 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
14836 (rs6000_gimple_fold_builtin): Likewise.
14837 (altivec_init_builtins): Add code to define
14838 __builtin_altivec_lvx_v1ti function.
14840 2018-03-22 Jakub Jelinek <jakub@redhat.com>
14842 PR inline-asm/84941
14843 * function.c (match_asm_constraints_1): Don't do the optimization
14844 if input isn't a REG, SUBREG, MEM or constant.
14846 2018-03-22 Tom de Vries <tom@codesourcery.com>
14848 PR tree-optimization/84956
14849 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
14850 bb_has_abnormal_pred.
14852 2018-03-22 Jakub Jelinek <jakub@redhat.com>
14855 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
14856 DECL_INITIAL (decl) to decl at the end.
14857 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
14858 adjust the comment.
14860 2018-03-21 Joseph Myers <joseph@codesourcery.com>
14862 * doc/extend.texi (__builtin_tgmath): Document when complex
14863 integer types are treated as _Complex _Float64.
14865 2018-03-21 Tom de Vries <tom@codesourcery.com>
14867 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
14869 2018-03-21 Jakub Jelinek <jakub@redhat.com>
14871 PR tree-optimization/84960
14872 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
14873 if it is ENTRY block, move them into single succ of ENTRY in that case.
14875 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
14877 PR tree-optimization/84811
14878 * poly-int.h (poly_span_traits): Remove the T3 parameter and
14879 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
14880 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
14881 (known_subrange_p): Update accordingly. Cast each value involved
14882 in the size comparison, rather than casting the result of the
14885 2018-03-21 Jakub Jelinek <jakub@redhat.com>
14887 PR tree-optimization/84982
14888 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
14889 by flipping the least significant bit rather than all bits from
14890 bitpos to bitpos + bitsize - 1.
14892 2018-03-21 Nathan Sidwell <nathan@acm.org>
14894 * doc/extend.texi (Deprecated Features): Remove mention of
14895 long-deleted deprecations.
14897 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14900 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
14901 * configure: Regenerate.
14903 2018-03-21 Tom de Vries <tom@codesourcery.com>
14905 PR tree-optimization/83126
14906 * tree-parloops.c (num_phis): New function.
14907 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
14909 2018-03-21 Nathan Sidwell <nathan@acm.org>
14911 * doc/extend.texi (Deprecated Features): Update deprecated flags,
14912 mention anon-struct/union members and trailing attributes.
14914 2018-03-21 Bin Cheng <bin.cheng@arm.com>
14916 PR tree-optimization/84969
14917 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
14918 builtin memset partitions if they set different rhs values.
14920 2018-03-21 Jakub Jelinek <jakub@redhat.com>
14922 PR rtl-optimization/84989
14923 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
14924 VEC_DUPLICATE with scalar result mode.
14926 2018-03-21 Martin Liska <mliska@suse.cz>
14929 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
14930 not intended return statement.
14932 2018-03-21 Martin Liska <mliska@suse.cz>
14935 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
14936 (chkp_find_bound_slots_1): Limit number of iterations.
14938 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
14941 * Minor grammar fixes for x86 options.
14943 2018-03-20 Jakub Jelinek <jakub@redhat.com>
14946 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
14947 holding REG_CFA_RESTORE notes, instead turn them into a USE.
14949 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
14952 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
14953 (altivec_lvx_<mode>_1op): Likewise.
14954 (altivec_stvx_<mode>_2op): Likewise.
14955 (altivec_stvx_<mode>_1op): Likewise.
14956 (altivec_lvx_<VM2:mode>): New define_expand.
14957 (altivec_stvx_<VM2:mode>): Likewise.
14958 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
14959 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
14960 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
14961 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
14962 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
14963 (rs6000_gen_lvx): Likewise.
14964 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
14965 (altivec_expand_stv_builtin): Likewise.
14966 (altivec_expand_builtin): Likewise.
14967 * config/rs6000/vector.md: Likewise.
14969 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14972 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
14975 2018-03-20 Richard Biener <rguenther@suse.de>
14978 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
14979 sign-conversions as zero, fall back to standard scalar_stmt
14982 2018-03-20 Martin Liska <mliska@suse.cz>
14985 * predict.c (rebuild_frequencies): Handle case when we have
14986 PROFILE_ABSENT, but flag_guess_branch_prob is false.
14988 2018-03-20 Jakub Jelinek <jakub@redhat.com>
14991 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
14992 flag_section_anchors.
14993 * varasm.c (use_blocks_for_decl_p): Remove hack for
14994 dw2_force_const_mem.
14997 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
14999 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
15000 be created, use lowpart_subreg of operands[0] rather than operands[0]
15002 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
15003 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
15004 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
15005 and n constraint instead of aarch64_shift_imm_di and Usd.
15006 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
15007 (*aarch64_<optab>_reg_minus<mode>3): ... this.
15009 2018-03-20 Sudakshina Das <sudi.das@arm.com>
15012 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
15013 to favor GPR over NEON registers.
15014 (<shift>di3_neon): Likewise.
15016 2018-03-20 Tom de Vries <tom@codesourcery.com>
15019 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
15020 (nvptx_process_pars): Emit bar.sync asap and alap.
15022 2018-03-20 Tom de Vries <tom@codesourcery.com>
15025 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
15026 seen_label if seen_label is already set.
15028 2018-03-20 Jakub Jelinek <jakub@redhat.com>
15031 * config/i386/i386.c (fold_builtin_cpu): For features above 31
15032 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
15033 Use 1U instead of 1. Formatting fixes.
15036 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
15037 instead of TREE_TYPE (s1) for the return value.
15039 2018-03-19 Jakub Jelinek <jakub@redhat.com>
15041 PR tree-optimization/84946
15042 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
15043 bitsize + bitsize in poly_uint64 rather than poly_int64.
15046 * dwarf2asm.c: Include fold-const.c.
15047 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
15048 of decl rather than decl itself.
15050 PR rtl-optimization/84643
15051 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
15053 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
15056 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
15057 calling assemble_variable.
15059 2018-03-19 Sudakshina Das <sudi.das@arm.com>
15062 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
15063 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
15065 2018-03-19 Jim Wilson <jimw@sifive.com>
15068 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
15069 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
15070 (riscv_first_stack_step): Likewise.
15071 (riscv_option_override): Use STACK_BOUNDARY instead of
15072 MIN_STACK_BOUNDARY.
15073 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
15074 MIN_STACK_BOUNDARY.
15075 (BIGGEST_ALIGNMENT): Set to 128.
15076 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
15077 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
15080 2018-03-19 Richard Biener <rguenther@suse.de>
15082 PR tree-optimization/84933
15083 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
15084 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
15086 2018-03-19 Richard Biener <rguenther@suse.de>
15088 PR tree-optimization/84859
15089 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
15090 (cond_if_else_store_replacement): Perform sinking operation on
15091 single-store BBs regardless of MAX_STORES_TO_SINK setting.
15092 Generalize what a BB with a single eligible store is.
15094 2018-03-19 Richard Biener <rguenther@suse.de>
15096 PR tree-optimization/84929
15097 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
15098 chrec_is_positive against non-chrec arg.
15100 2018-03-19 Tamar Christina <tamar.christina@arm.com>
15103 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
15105 2018-03-18 Martin Liska <mliska@suse.cz>
15107 PR rtl-optimization/84635
15108 * regrename.c (build_def_use): Use matches_mode only when
15111 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
15113 PR tree-optimization/84913
15114 * tree-vect-loop.c (vectorizable_reduction): Don't try to
15115 vectorize chains of COND_EXPRs.
15117 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
15119 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
15121 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
15123 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
15125 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
15127 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
15129 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
15130 Kito Cheng <kito.cheng@gmail.com>
15132 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
15133 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
15134 (nds32_adjust_reg_alloc_order): New function.
15135 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
15137 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
15139 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
15140 nds32_print_operand, nds32_print_operand_address): Use
15141 HOST_WIDE_INT_PRINT_DEC instead.
15143 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
15145 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
15147 2018-03-17 Jakub Jelinek <jakub@redhat.com>
15150 * config/i386/i386.c (initial_ix86_tune_features,
15151 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
15152 unsigned long long.
15153 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
15154 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
15155 rather than 1u << ix86_tune. Formatting fix.
15156 (ix86_option_override_internal): Change ix86_arch_mask from
15157 unsigned int to unsigned HOST_WIDE_INT, initialize to
15158 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
15159 (ix86_function_specific_restore): Likewise.
15161 2018-03-16 Jakub Jelinek <jakub@redhat.com>
15164 * postreload.c (reload_combine_recognize_pattern): Perform
15165 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
15166 truncate_int_for_mode the result for the destination's mode.
15169 * hsa-gen.c (mem_type_for_type): Fix comment typo.
15170 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
15172 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
15175 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
15178 * lra-assigns.c (lra_split_hard_reg_for): Don't use
15179 regno_allocno_class_array and sorted_pseudos.
15180 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
15181 insns where regno is used.
15183 2018-03-16 Martin Liska <mliska@suse.cz>
15186 * multiple_target.c (create_dispatcher_calls): Redirect
15187 reference in the symbol table.
15189 2018-03-16 Martin Liska <mliska@suse.cz>
15192 * multiple_target.c (create_dispatcher_calls): Redirect also
15195 2018-03-16 Jakub Jelinek <jakub@redhat.com>
15199 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
15200 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
15201 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
15203 2018-03-16 Julia Koval <julia.koval@intel.com>
15205 * doc/invoke.texi (Skylake Server): Add CLWB.
15206 Cannonlake): Remove CLWB.
15208 2018-03-16 Jakub Jelinek <jakub@redhat.com>
15210 PR tree-optimization/84841
15211 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
15213 (FLOAT_ONE_CONST_TYPE): Define.
15214 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
15215 (sort_by_operand_rank): Put entries with higher constant_type last
15216 rather than first to match comments.
15218 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
15220 * config/nios2/nios2.md (movsi_internal): Fix thinko in
15223 2018-03-15 Jakub Jelinek <jakub@redhat.com>
15226 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
15227 check and use address of target always.
15229 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
15232 * config/i386/i386.c (indirect_thunk_needed): Update comments.
15233 (indirect_thunk_bnd_needed): Likewise.
15234 (indirect_thunks_used): Likewise.
15235 (indirect_thunks_bnd_used): Likewise.
15236 (indirect_return_needed): New.
15237 (indirect_return_bnd_needed): Likewise.
15238 (output_indirect_thunk_function): Add a bool argument for
15240 (output_indirect_thunk_function): Don't generate alias for
15241 function return thunk.
15242 (ix86_code_end): Call output_indirect_thunk_function to generate
15243 function return thunks.
15244 (ix86_output_function_return): Set indirect_return_bnd_needed
15245 and indirect_return_needed instead of indirect_thunk_bnd_needed
15246 and indirect_thunk_needed.
15248 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
15250 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
15251 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
15252 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
15254 2018-03-15 David Malcolm <dmalcolm@redhat.com>
15255 Paul Hua <paul.hua.gm@gmail.com>
15258 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
15260 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
15262 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
15263 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
15264 resp. SFmode cases.
15266 2018-03-15 Tamar Christina <tamar.christina@arm.com>
15269 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
15270 instead of GET_MODE_SIZE when comparing Units.
15272 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
15275 * varasm.c (hash_section): Return an unchangeble hash value
15276 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
15277 Return !aarch64_can_use_per_function_literal_pools_p ().
15279 2018-03-15 Jakub Jelinek <jakub@redhat.com>
15282 * optabs.c (emit_conditional_move): Pass address of cmode's copy
15283 rather than address of cmode as last argument to prepare_cmp_insn.
15285 2018-03-15 Julia Koval <julia.koval@intel.com>
15287 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
15288 F_AVX512VNNI, F_AVX512BITALG): New.
15290 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
15293 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
15294 insn for floating-point loads and stores.
15296 2018-03-14 Carl Love <cel@us.ibm.com>
15298 * config/rs6000/rs6000-c.c: Add macro definitions for
15299 ALTIVEC_BUILTIN_VEC_PERMXOR.
15300 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
15301 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
15302 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
15303 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
15305 * config/doc/extend.texi: Add prototypes for vec_permxor.
15307 2018-03-14 David Malcolm <dmalcolm@redhat.com>
15310 * diagnostic-show-locus.c (class layout_point): Convert m_line
15311 from int to linenum_type.
15312 (line_span::comparator): Use linenum "compare" function when
15313 comparing line numbers.
15314 (test_line_span): New function.
15315 (layout_range::contains_point): Convert param "row" from int to
15317 (layout_range::intersects_line_p): Likewise.
15318 (layout::will_show_line_p): Likewise.
15319 (layout::print_source_line): Likewise.
15320 (layout::should_print_annotation_line_p): Likewise.
15321 (layout::print_annotation_line): Likewise.
15322 (layout::print_leading_fixits): Likewise.
15323 (layout::annotation_line_showed_range_p): Likewise.
15324 (struct line_corrections): Likewise for field m_row.
15325 (line_corrections::line_corrections): Likewise for param "row".
15326 (layout::print_trailing_fixits): Likewise.
15327 (layout::get_state_at_point): Likewise.
15328 (layout::get_x_bound_for_row): Likewise.
15329 (layout::print_line): Likewise.
15330 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
15331 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
15332 * input.c (selftest::test_linenum_comparisons): New function.
15333 (selftest::input_c_tests): Call it.
15334 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
15335 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
15336 * selftest.h (ASSERT_GT): New macro.
15337 (ASSERT_GT_AT): New macro.
15338 (ASSERT_LT): New macro.
15339 (ASSERT_LT_AT): New macro.
15341 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
15343 PR rtl-optimization/84780
15344 * combine.c (distribute_links): Don't make a link based on pc_rtx.
15346 2018-03-14 Martin Liska <mliska@suse.cz>
15348 * tree.c (record_node_allocation_statistics): Use
15349 get_stats_node_kind.
15350 (get_stats_node_kind): New function extracted from
15351 record_node_allocation_statistics.
15352 (free_node): Use get_stats_node_kind.
15354 2018-03-14 Richard Biener <rguenther@suse.de>
15356 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
15357 that the value-set of ANTIC_IN doesn't grow.
15360 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
15362 (BB_VISITED_WITH_VISITED_SUCCS): New define.
15363 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
15365 2018-03-14 Julia Koval <julia.koval@intel.com>
15367 * config.gcc (icelake-client, icelake-server): New.
15369 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
15370 (initial_ix86_arch_features): Ditto.
15371 (PTA_SKYLAKE): Add SGX.
15372 (PTA_ICELAKE): Remove.
15373 (PTA_ICELAKE_CLIENT): New.
15374 (PTA_ICELAKE_SERVER): New.
15375 (ix86_option_override_internal): Split up icelake on icelake client and
15377 (get_builtin_code_for_version): Ditto.
15378 (fold_builtin_cpu): Ditto.
15379 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
15380 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
15381 * config/i386/i386.h (processor_type): Ditto.
15382 * doc/invoke.texi: Ditto.
15384 2018-03-14 Jakub Jelinek <jakub@redhat.com>
15387 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
15388 INTEGER_CST offset, add it together with bitpos / 8 and
15389 sign extend based on POINTER_SIZE.
15393 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
15396 * config/i386/constraints.md (Yc): New register constraint.
15397 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
15398 Use Yc constraint for alternative 2 of operand 0. Remove
15399 preferred_for_speed attribute.
15401 2018-03-14 Richard Biener <rguenther@suse.de>
15403 PR tree-optimization/84830
15404 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
15405 with the old one to avoid oscillations.
15407 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
15410 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
15412 (assign_by_spills): Return a flag of reload assignment failure.
15413 Do not process the reload assignment failures. Do not spill other
15414 reload pseudos if they has the same reg class. Update n if
15416 (lra_assign): Add a return arg. Set up from the result of
15417 assign_by_spills call.
15418 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15419 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
15420 usage_insns if it is not NULL.
15421 (spill_hard_reg_in_range): New function.
15422 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15423 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15424 function prototypes.
15425 (lra_assign): Change prototype.
15426 * lra.c (lra): Add code to deal with fails by splitting hard reg
15429 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
15431 * config/riscv/riscv.opt (mrelax): New option.
15432 * config/riscv/riscv.c (riscv_file_start): Emit ".option
15433 "norelax" when riscv_mrelax is disabled.
15434 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
15436 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15439 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
15440 reassociation for int modes.
15442 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
15444 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
15445 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
15447 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
15448 * config/aarch64/aarch64-sve.md
15449 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
15450 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
15451 (*extend<mode><Vwide>2): Rename to...
15452 (aarch64_sve_extend<mode><Vwide>2): ...this.
15453 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
15454 renaming the old pattern to...
15455 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
15457 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
15458 define_expand, renaming the old pattern to...
15459 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
15460 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
15461 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
15462 account when deciding which SVE instruction the optab should use.
15463 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
15465 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
15467 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
15468 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
15469 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
15470 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
15471 (tlsdesc_small_<mode>): Turn a define_expand and use
15472 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
15473 (tlsdesc_small_advsimd_<mode>): ...this.
15474 (tlsdesc_small_sve_<mode>): New pattern.
15476 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
15478 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
15479 (UNSPEC_UMUL_HIGHPART): New constants.
15480 (MUL_HIGHPART): New int iteraor.
15481 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
15482 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
15484 (*<su>mul<mode>3_highpart): New define_insn.
15486 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
15489 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
15492 2018-03-13 Martin Liska <mliska@suse.cz>
15495 * (sem_item_optimizer::sem_item_optimizer): Initialize new
15497 (sem_item_optimizer::~sem_item_optimizer): Release it.
15498 (sem_item_optimizer::merge_classes): Register variable aliases.
15499 (sem_item_optimizer::fixup_pt_set): New function.
15500 (sem_item_optimizer::fixup_points_to_sets): Likewise.
15501 * ipa-icf.h: Declare new variables and functions.
15503 2018-03-13 Jakub Jelinek <jakub@redhat.com>
15505 PR middle-end/84834
15506 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
15507 integer_pow2p@2 and test integer_pow2p in condition.
15508 (A < 0 ? C : 0): Similarly for @1.
15510 PR middle-end/84831
15511 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
15512 characters starting at p contain '\0' character, don't look beyond
15516 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
15517 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
15520 * reg-stack.c (change_stack): Change update_end var from int to
15521 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
15522 also call set_block_for_insn on the newly added insns and rescan.
15525 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
15526 on the last operand.
15529 * tree.c (stabilize_reference_1): Return save_expr (e) for
15530 STATEMENT_LIST even if it doesn't have side-effects.
15532 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
15534 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
15536 2018-03-12 Renlin Li <renlin.li@arm.com>
15538 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
15539 aarch64_output_scalar_simd_mov_immediate.
15541 2018-03-12 Martin Sebor <msebor@redhat.com>
15543 PR tree-optimization/83456
15544 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
15545 for perfectly overlapping calls to memcpy.
15546 (gimple_fold_builtin_memory_chk): Same.
15547 (gimple_fold_builtin_strcpy): Handle no-warning.
15548 (gimple_fold_builtin_stxcpy_chk): Same.
15549 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
15551 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
15553 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
15554 parameter. Use it for SFmode.
15555 (rs6000_function_arg_advance_1): Adjust.
15556 (rs6000_function_arg): Adjust.
15557 (rs6000_gimplify_va_arg): Pass false for that new parameter.
15559 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
15561 PR rtl-optimization/84169
15562 PR rtl-optimization/84780
15563 * combine.c (can_combine_p): Check for a 2-insn combination whether
15564 the destination register is used between the two insns, too.
15566 2018-03-12 Richard Biener <rguenther@suse.de>
15568 PR tree-optimization/84803
15569 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
15570 for refs DR analysis didn't process.
15572 2018-03-12 Richard Biener <rguenther@suse.de>
15574 PR tree-optimization/84777
15575 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
15576 force-vectorize loops ignore whether we are optimizing for size.
15578 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
15580 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
15581 (TARGET_MD_ASM_ADJUST): Define.
15583 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
15584 Kito Cheng <kito.cheng@gmail.com>
15585 Chung-Ju Wu <jasonwucj@gmail.com>
15587 * config/nds32/nds32.c (nds32_compute_stack_frame,
15588 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
15589 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
15590 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
15591 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
15592 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
15593 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
15594 * config/nds32/nds32.md (prologue, epilogue): Use macro
15595 NDS32_V3PUSH_AVAILABLE_P to do checking.
15597 2018-03-11 Jakub Jelinek <jakub@redhat.com>
15600 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
15601 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
15602 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
15603 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
15604 addition of most attributes on !orig_type_die or the attribute not
15605 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
15607 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
15608 Chung-Ju Wu <jasonwucj@gmail.com>
15610 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
15611 __NDS32_VH__ macro.
15612 * config/nds32/nds32.opt (mvh): New option.
15614 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
15615 Chung-Ju Wu <jasonwucj@gmail.com>
15617 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
15619 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
15620 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
15623 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
15624 Chung-Ju Wu <jasonwucj@gmail.com>
15626 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
15628 * config/nds32/nds32-multiple.md (strlensi): New pattern.
15629 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
15631 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
15632 Kito Cheng <kito.cheng@gmail.com>
15633 Chung-Ju Wu <jasonwucj@gmail.com>
15635 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
15636 UNSPEC_FFMISM and UNSPEC_FLMISM.
15637 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
15638 for ffb, ffmism and flmism.
15639 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
15640 (unspec_ffmism): Ditto.
15641 (unspec_flmism): Ditto.
15642 (nds32_expand_builtin_impl): Check if string extension is available.
15643 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
15644 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
15646 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
15649 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
15652 * lra-assigns.c (assign_by_spills): Return a flag of reload
15653 assignment failure. Do not process the reload assignment
15654 failures. Do not spill other reload pseudos if they has the same
15656 (lra_assign): Add a return arg. Set up from the result of
15657 assign_by_spills call.
15658 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15659 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
15660 usage_insns if it is not NULL.
15661 (spill_hard_reg_in_range): New function.
15662 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15663 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15664 function prototypes.
15665 (lra_assign): Change prototype.
15666 * lra.c (lra): Add code to deal with fails by splitting hard reg
15669 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
15672 * config/i386/i386.opt: Replace Enforcment with Enforcement.
15674 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
15677 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
15678 (dw_val_node): Add val_symbolic_view.
15679 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
15680 (symview_upper_bound): New.
15681 (new_line_info_table): Initialize symviews_since_reset.
15682 (dwarf2out_source_line): Count symviews_since_reset and set
15683 symview_upper_bound.
15684 (dw_val_equal_p): Handle symview.
15685 (add_AT_symview): New.
15686 (print_dw_val): Handle symview.
15687 (attr_checksum, attr_checksum_ordered): Likewise.
15688 (same_dw_val_p, size_of_die): Likewise.
15689 (value_format, output_die): Likewise.
15690 (add_high_low_attributes): Use add_AT_symview for entry_view.
15691 (dwarf2out_finish): Reset symview_upper_bound, clear
15694 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
15697 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
15698 Add strict argument and use it.
15699 (rs6000_split_multireg_move): Update for new strict argument.
15700 (mem_operand_gpr): Disallow all non-offsettable addresses.
15701 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
15703 2018-03-09 Jakub Jelinek <jakub@redhat.com>
15706 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
15707 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
15708 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
15711 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
15712 decl, use remap_type if we want to use the type.
15714 2018-03-09 Martin Sebor <msebor@redhat.com>
15716 PR tree-optimization/84526
15717 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
15719 (builtin_access::generic_overlap): Be prepared to handle non-array
15722 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
15724 PR rtl-optimization/84682
15725 * lra-constraints.c (process_address_1): Check is_address flag
15726 for address constraints.
15727 (process_alt_operands): Likewise.
15728 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
15729 preprocess_constraints.
15730 * recog.h (preprocess_constraints): Add oploc parameter.
15732 * recog.c (preprocess_constraints): Test address_operand for
15733 CT_ADDRESS constraints.
15735 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
15738 * lra-assigns.c (assign_by_spills): Return a flag of reload
15739 assignment failure. Do not process the reload assignment
15740 failures. Do not spill other reload pseudos if they has the same
15742 (lra_assign): Add a return arg. Set up from the result of
15743 assign_by_spills call.
15744 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15745 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
15746 usage_insns if it is not NULL.
15747 (spill_hard_reg_in_range): New function.
15748 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15749 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15750 function prototypes.
15751 (lra_assign): Change prototype.
15752 * lra.c (lra): Add code to deal with fails by splitting hard reg
15755 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15758 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
15759 Accept complain bool parameter. Only emit errors if it is true.
15760 (arm_parse_cpu_option_name): Likewise.
15761 (arm_target_thumb_only): Adjust callers of the above.
15762 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
15763 prototype to take a default true bool parameter.
15764 (arm_parse_arch_option_name): Likewise.
15766 2018-03-09 David Malcolm <dmalcolm@redhat.com>
15767 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
15771 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
15772 * configure: Regenerate.
15773 * configure.ac ("linker --version-script option"): New.
15774 ("linker soname option"): New.
15776 2018-03-09 Richard Biener <rguenther@suse.de>
15778 PR tree-optimization/84775
15779 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
15780 immediate uses of predicate stmts and mark them modified.
15783 PR tree-optimization/84178
15784 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
15786 (version_loop_for_if_conversion): Delay update_ssa call.
15787 (tree_if_conversion): Delay update_ssa until after predicate
15790 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
15793 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
15794 when the function accesses prior frames.
15796 2018-03-08 Jakub Jelinek <jakub@redhat.com>
15799 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
15800 gen_llsym, otherwise call maybe_gen_llsym.
15802 PR inline-asm/84742
15803 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
15804 has ',' character inside of it.
15806 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15809 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
15810 as clobbering CC_REGNUM.
15812 2018-03-08 Richard Biener <rguenther@suse.de>
15814 PR middle-end/84552
15815 * tree-scalar-evolution.c: Include tree-into-ssa.h.
15816 (follow_copies_to_constant): Do not follow SSA names registered
15819 2018-03-08 Richard Biener <rguenther@suse.de>
15821 PR tree-optimization/84178
15822 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
15824 (version_loop_for_if_conversion): Delay update_ssa call.
15825 (tree_if_conversion): Delay update_ssa until after predicate
15828 2018-03-08 David Malcolm <dmalcolm@redhat.com>
15830 PR tree-optimization/84178
15831 * tree-if-conv.c (release_bb_predicate): Remove the
15832 the assertion that the stmts have NULL use_ops.
15833 Discard the statements, asserting that they haven't
15834 yet been added to a BB.
15836 2018-03-08 Richard Biener <rguenther@suse.de>
15838 PR tree-optimization/84746
15839 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
15840 (phi_translate): Pass in destination ANTIC_OUT set.
15841 (phi_translate_1): Likewise. For a simplified result lookup
15842 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
15843 (phi_translate_set): Adjust.
15844 (do_pre_regular_insertion): Likewise.
15845 (do_pre_partial_partial_insertion): Likewise.
15847 2018-03-08 Martin Liska <mliska@suse.cz>
15849 PR gcov-profile/84735
15850 * doc/gcov.texi: Document usage of profile files.
15851 * gcov-io.h: Document changes in the format.
15853 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
15857 * dwarf2out.c (struct dw_line_info_table): Update comments for
15859 (FORCE_RESET_NEXT_VIEW): New.
15860 (FORCE_RESETTING_VIEW_P): New.
15861 (RESETTING_VIEW_P): Check for -1 too.
15862 (ZERO_VIEW_P): Likewise.
15863 (new_line_info_table): Force-reset next view.
15864 (dwarf2out_begin_function): Likewise.
15865 (dwarf2out_source_line): Simplify zero_view_p initialization.
15866 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
15867 view directly. Omit view when omitting .loc at line 0.
15869 2018-03-08 Jakub Jelinek <jakub@redhat.com>
15871 PR tree-optimization/84740
15872 * tree-switch-conversion.c (process_switch): Call build_constructors
15873 only if info.phi_count is non-zero.
15875 PR tree-optimization/84739
15876 * tree-tailcall.c (find_tail_calls): Check call arguments against
15877 DECL_ARGUMENTS (current_function_decl) rather than
15878 DECL_ARGUMENTS (func) when checking for tail recursion.
15880 2018-03-07 Jakub Jelinek <jakub@redhat.com>
15882 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
15883 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
15884 Volker Reichelt's entry and add entries for people that perform
15885 GCC fuzzy testing and report numerous bugs.
15887 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
15890 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
15891 readonly data in sdata, if that is disabled.
15892 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
15893 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
15894 -mreadonly-in-sdata option.
15896 2018-03-07 Martin Sebor <msebor@redhat.com>
15898 PR tree-optimization/84468
15899 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
15900 basic block when looking for nul assignment.
15902 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
15905 * except.h (output_function_exception_table): Adjust prototype.
15906 * except.c (output_function_exception_table): Remove FNNAME parameter
15907 and add SECTION parameter. Ouput one part of the table at a time.
15908 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
15909 the first part of the exception table and emit unwind directives.
15910 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
15911 (i386_pe_seh_cold_init): Likewise.
15912 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
15913 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
15914 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
15915 (ix86_output_call_insn): Emit a nop in one more case for SEH.
15916 * config/i386/winnt.c: Include except.h.
15917 (struct seh_frame_state): Add reg_offset, after_prologue and
15918 in_cold_section fields.
15919 (i386_pe_seh_end_prologue): Set seh->after_prologue.
15920 (i386_pe_seh_cold_init): New function.
15921 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
15922 to seh->in_cold_section.
15923 (seh_emit_push): Record the offset of the push.
15924 (seh_emit_save): Record the offet of the save.
15925 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
15926 Test seh->after_prologue to disregard the epilogue.
15927 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
15928 (i386_pe_end_cold_function): New function.
15930 2018-03-07 Jakub Jelinek <jakub@redhat.com>
15933 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
15934 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
15937 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
15939 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
15940 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
15942 PR middle-end/84723
15943 * multiple_target.c: Include tree-inline.h and intl.h.
15944 (expand_target_clones): Diagnose and fail if node->definition and
15945 !tree_versionable_function_p (node->decl).
15947 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
15949 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
15951 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
15952 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
15953 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
15955 2018-03-06 Jakub Jelinek <jakub@redhat.com>
15958 * combine.c (try_combine): Use reg_or_subregno instead of handling
15959 just paradoxical SUBREGs and REGs.
15961 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
15963 * config/arc/arc.c (arc_finalize_pic): Remove function.
15964 (arc_must_save_register): We use single base PIC register, remove
15965 checks to save/restore the PIC register.
15966 (arc_expand_prologue): Likewise.
15967 * config/arc/arc-protos.h (arc_set_default_type_attributes):
15969 (arc_verify_short): Likewise.
15970 (arc_attr_type): Likewise.
15971 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
15972 (walk_stores): Likewise.
15973 (arc_address_cost): Make it static.
15974 (arc_verify_short): Likewise.
15975 (branch_dest): Likewise.
15976 (arc_attr_type): Likewise.
15977 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
15978 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
15979 (arc_final_prescan_insn): Remove inserting the nops due to
15980 hardware hazards. It is done in reorg step.
15981 (insn_length_variant_t): Remove.
15982 (insn_length_parameters_t): Likewise.
15983 (arc_insn_length_parameters): Likewise.
15984 (arc_get_insn_variants): Likewise.
15985 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
15987 2018-03-06 Jakub Jelinek <jakub@redhat.com>
15989 PR inline-asm/84683
15990 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
15993 PR tree-optimization/84687
15994 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
15996 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
15998 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16000 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
16001 Rename to ppc_speculation_barrier.
16002 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
16003 __builtin_ppc_speculation_barrier.
16005 2018-03-05 Jakub Jelinek <jakub@redhat.com>
16008 * combine.c (combine_simplify_rtx): Don't try to simplify if
16009 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
16012 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
16014 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
16015 to 32 bytes when compiling for POWER9.
16017 2018-03-05 Jakub Jelinek <jakub@redhat.com>
16020 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
16021 regparm >= 3 with no arg reg available also for calls with
16022 flag_force_indirect_call. Pass decl to ix86_function_regparm.
16025 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
16027 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
16029 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
16032 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
16034 2018-03-05 Richard Biener <rguenther@suse.de>
16036 PR tree-optimization/84486
16037 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
16038 When inserting a __builtin_assume_aligned call set the LHS
16039 SSA name alignment info accordingly.
16041 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
16043 PR tree-optimization/84114
16044 * config/aarch64/aarch64.c (aarch64_reassociation_width)
16045 Avoid reassociation of FLOAT_MODE addition.
16047 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
16049 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
16050 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
16051 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
16052 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
16053 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
16054 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
16055 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
16057 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
16058 __builtin_ia32_wbinvd): New builtins.
16059 (SPECIAL_ARGS2): New.
16060 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
16061 (SPECIAL_ARGS2): New.
16062 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
16063 (ix86_valid_target_attribute_inner_p): Ditto.
16064 (ix86_init_mmx_sse_builtins): Add special_args2.
16065 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
16066 TARGET_WBNOINVD_P): New.
16067 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
16068 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
16069 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
16070 * config/i386/immintrin.h (_wbinvd): New intrinsic.
16071 * config/i386/pconfigintrin.h: New file.
16072 * config/i386/wbnoinvdintrin.h: Ditto.
16073 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
16075 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
16077 2018-03-05 Richard Biener <rguenther@suse.de>
16079 PR tree-optimization/84670
16080 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16082 (BB_VISITED_WITH_VISITED_SUCCS): New define.
16083 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16084 (compute_antic_aux): Only assert the number of values in ANTIC_IN
16085 doesn't grow if all successors (recursively) were visited at least
16088 2018-03-05 Richard Biener <rguenther@suse.de>
16090 PR tree-optimization/84650
16091 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
16092 if executed in the loop pipeline.
16094 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
16096 * doc/configfiles.texi (Configuration Files): Move info about
16097 conditionalizing $target-protos.h to...
16098 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
16099 differs from $target-protos.h.
16101 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
16102 Chung-Ju Wu <jasonwucj@gmail.com>
16104 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
16105 * config/nds32/nds32-multiple.md (setmemsi): Define.
16106 * config/nds32/nds32-memory-manipulation.c
16107 (nds32_gen_dup_4_byte_to_word_value): New.
16108 (emit_setmem_word_loop): New.
16109 (emit_setmem_byte_loop): New.
16110 (nds32_expand_setmem_loop): New.
16111 (nds32_expand_setmem_loop_v3m): New.
16112 (nds32_expand_setmem_unroll): New.
16113 (nds32_expand_setmem): New.
16115 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
16116 Chung-Ju Wu <jasonwucj@gmail.com>
16118 * config/nds32/nds32-memory-manipulation.c
16119 (nds32_emit_load_store): New.
16120 (nds32_emit_post_inc_load_store): New.
16121 (nds32_emit_mem_move): New.
16122 (nds32_emit_mem_move_block): New.
16123 (nds32_expand_movmemsi_loop_unknown_size): New.
16124 (nds32_expand_movmemsi_loop_known_size): New.
16125 (nds32_expand_movmemsi_loop): New.
16126 (nds32_expand_movmemsi_unroll): New.
16127 (nds32_expand_movmemqi): Rename ...
16128 (nds32_expand_movmemsi): ... to this.
16129 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
16130 (movmemsi): ... to this.
16131 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
16132 (nds32_expand_movmemsi): ... to this.
16134 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
16135 Monk Chiang <sh.chiang04@gmail.com>
16136 Chung-Ju Wu <jasonwucj@gmail.com>
16138 * config/nds32/nds32-protos.h
16139 (nds32_expand_load_multiple): New arguments.
16140 (nds32_expand_store_multiple): Ditto.
16141 (nds32_valid_multiple_load_store): Rename ...
16142 (nds32_valid_multiple_load_store_p): ... to this.
16143 * config/nds32/nds32-memory-manipulation.c
16144 (nds32_expand_load_multiple): Refine implementation.
16145 (nds32_expand_store_multiple): Ditto.
16146 * config/nds32/nds32-multiple.md
16147 (load_multiple): Update nds32_expand_load_multiple interface.
16148 (store_multiple): Update nds32_expand_store_multiple interface.
16149 * config/nds32/nds32-predicates.c
16150 (nds32_valid_multiple_load_store): Rename ...
16151 (nds32_valid_multiple_load_store_p): ... to this and refine
16153 * config/nds32/predicates.md
16154 (nds32_load_multiple_and_update_address_operation): New predicate.
16155 (nds32_store_multiple_and_update_address_operation): New predicate.
16157 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
16158 Chung-Ju Wu <jasonwucj@gmail.com>
16160 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
16161 (combo): New attribute.
16162 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
16164 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
16166 * config/nds32/nds32.opt: Change -mcmodel= default value.
16168 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
16169 Monk Chiang <sh.chiang04@gmail.com>
16170 Chung-Ju Wu <jasonwucj@gmail.com>
16172 * config/nds32/constants.md (unspec_element): New enum.
16173 * config/nds32/constraints.md (Umw): New constraint.
16174 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
16175 * config/nds32/nds32-intrinsic.md: Likewise.
16176 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
16177 (nds32_valid_smw_lwm_base_p): New.
16178 (nds32_output_smw_single_word): New.
16179 (nds32_output_lmw_single_word): New.
16180 (nds32_expand_unaligned_load): New.
16181 (nds32_expand_unaligned_store): New.
16182 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
16183 (nds32_output_smw_single_word): Declare.
16184 (nds32_output_lmw_single_word): Declare.
16185 (nds32_expand_unaligned_load): Declare.
16186 (nds32_expand_unaligned_store): Declare.
16187 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
16188 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
16189 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
16190 NDS32_BUILTIN_UASTORE_DW.
16191 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
16194 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
16195 Kito Cheng <kito.cheng@gmail.com>
16196 Chung-Ju Wu <jasonwucj@gmail.com>
16198 * config/nds32/nds32-intrinsic.c
16199 (nds32_expand_builtin_null_ftype_reg): Delete.
16200 (nds32_expand_builtin_reg_ftype_imm): Ditto.
16201 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
16202 (nds32_read_argument): New.
16203 (nds32_legitimize_target): Ditto.
16204 (nds32_legitimize_argument): Ditto.
16205 (nds32_check_constant_argument): Ditto.
16206 (nds32_expand_unop_builtin): Ditto.
16207 (nds32_expand_unopimm_builtin): Ditto.
16208 (nds32_expand_binop_builtin): Ditto.
16209 (nds32_builtin_decl_impl): Ditto.
16210 (builtin_description): Ditto.
16211 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
16212 (nds32_init_builtins_impl): Ditto.
16213 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
16214 (nds32_builtin_decl): New.
16215 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
16216 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
16218 2018-03-02 Jeff Law <law@redhat.com>
16220 * reorg.c (stop_search_p): Handle DEBUG_INSN.
16221 (redundant_insn, fill_simple_delay_slots): Likewise.
16222 (fill_slots_from_thread): Likewise.
16223 * resource.c (mark_referenced_resources): Likewise.
16224 (mark_set_resources, find_dead_or_set_registers): Likewise.
16226 2018-03-02 Jakub Jelinek <jakub@redhat.com>
16228 * substring-locations.h (format_warning_va): Formatting fix for
16229 ATTRIBUTE_GCC_DIAG.
16230 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
16232 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
16233 * substring-locations.c: Include intl.h.
16234 (format_warning_va): Turned into small wrapper around
16235 format_warning_n_va, renamed to ...
16236 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
16237 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
16239 (format_warning_at_substring_n): New function.
16240 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
16241 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
16242 format_warning_at_substring with just a shorter name instead of
16243 const function pointer.
16244 (fmtwarn_n): New function.
16245 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
16246 appropriate, get rid of all the fmtstr temporaries, move conditionals
16247 with G_() wrapped string literals directly into fmtwarn arguments,
16248 cast dir.len to (int), formatting fixes.
16250 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
16252 * doc/invoke.texi: Remove "Cilk Plus" references.
16254 2018-03-02 Jakub Jelinek <jakub@redhat.com>
16255 Richard Biener <rguenther@suse.de>
16258 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
16259 for error or warning attributes if CALL_FROM_THUNK_P is set.
16262 2018-03-02 Jakub Jelinek <jakub@redhat.com>
16265 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
16266 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
16269 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
16270 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
16272 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
16273 instead of -1U in last predictors element's probability member.
16275 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
16278 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
16279 arguments if they are comparable.
16281 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
16283 PR tree-optimization/84634
16284 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
16285 masks and masked_loop_p with a single loop_masks, making sure it's
16286 null for bb vectorization.
16288 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
16290 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
16291 (vect_analyze_data_ref_access): Use loop->safe_len rather than
16292 loop->force_vectorize to check whether there is no alias.
16294 2018-03-02 Jakub Jelinek <jakub@redhat.com>
16297 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
16299 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
16301 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
16302 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
16303 instead of a loop around prev_real_insn.
16304 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
16307 PR inline-asm/84625
16308 * config/i386/i386.c (ix86_print_operand): Use conditional
16309 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
16312 2018-03-02 Richard Biener <rguenther@suse.de>
16314 PR tree-optimization/84427
16315 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
16316 (bitmap_set_subtract_values): Rewrite to handle multiple
16319 (prune_clobbered_mems): Likewise.
16320 (phi_translate): Take edge instead of pred/phiblock.
16321 (phi_translate_1): Likewise.
16322 (phi_translate_set): Likewise. Insert all translated
16323 exprs for a value into the set, keeping possibly multiple
16324 expressions per value.
16325 (compute_antic_aux): Adjust for phi_translate changes.
16326 When intersecting union the expressions and prune those
16327 not in the final value set, keeping possibly multiple
16328 expressions per value. Do not use value-insertion
16329 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
16330 all expressions. Add verification that the value-sets
16331 only shrink during iteration.
16332 (compute_partial_antic_aux): Adjust for the phi_translate changes.
16333 (do_pre_regular_insertion): Likewise.
16334 (do_pre_partial_partial_insertion): Likewise.
16336 2018-03-02 Richard Biener <rguenther@suse.de>
16339 * config/darwin.c (saved_debug_info_level): New static global.
16340 (darwin_asm_lto_start): Disable debug info generation for LTO out.
16341 (darwin_asm_lto_end): Restore debug info generation settings.
16343 2018-03-01 Martin Liska <mliska@suse.cz>
16346 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
16347 volatile arguments.
16349 2018-03-01 Richard Biener <rguenther@suse.de>
16352 * dwarf2out.c (gen_variable_die): Properly handle late VLA
16353 type annotation with LTO when debug was disabled at compile-time.
16355 2018-03-01 Matthew Fortune <mfortune@gmail.com>
16357 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
16359 (mips_final_postscan_insn): Likewise.
16361 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
16363 PR rtl-optimization/84528
16364 * alias.c (init_alias_target): Add commentary.
16365 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
16366 a unique base value if the frame pointer is not eliminated
16367 to the stack pointer.
16369 2018-03-01 Tom de Vries <tom@codesourcery.com>
16371 PR rtl-optimization/83327
16372 * lra-int.h (hard_regs_spilled_into): Declare.
16373 * lra.c (hard_regs_spilled_into): Define.
16374 (init_reg_info): Init hard_regs_spilled_into.
16375 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
16376 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
16377 (process_bb_lives): Handle hard_regs_spilled_into.
16378 (lra_create_live_ranges_1): Before doing liveness propagation, clear
16379 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
16381 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
16383 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
16384 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
16385 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
16386 * config/rs6000/aix72.h: New file.
16388 2018-02-28 Jakub Jelinek <jakub@redhat.com>
16390 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
16391 instead of warning_at with conditional singular and plural messages
16395 * stor-layout.c (update_alignment_for_field): For
16396 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
16397 && !DECL_PACKED (field), do the alignment update, just use
16398 only desired_align instead of MAX (type_align, desired_align)
16400 (place_field): Don't do known_align < desired_align handling
16401 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
16402 is non-NULL, instead do it after rli->prev_field handling and
16403 only if not within a bitfield word. For DECL_PACKED (field)
16404 use type_align of BITS_PER_UNIT.
16406 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
16408 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
16409 superfluous parentheses and trailing spaces.
16411 2018-02-28 Richard Biener <rguenther@suse.de>
16413 PR tree-optimization/84584
16414 * graphite-scop-detection.c (scop_detection::add_scop): Discard
16415 SCoPs with fake exit edge.
16417 2018-02-28 Martin Liska <mliska@suse.cz>
16420 * timevar.c (timer::print): Fix format to properly print 100%
16423 2018-02-28 Richard Biener <rguenther@suse.de>
16425 PR middle-end/84607
16426 * genmatch.c (capture_info::walk_match): Do not mark
16427 captured expressions without operands as expr_p given
16428 they act more like predicates and should be subject to
16429 "lost tail" side-effect preserving.
16431 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
16433 PR rtl-optimization/81611
16434 * auto-inc-dec.c (attempt_change): Move dead note from
16435 mem_insn if it's the next use of regno
16436 (find_address): Take address use of reg holding
16437 non-incremented value. Add parm to limit search to the named
16439 (merge_in_block): Attempt to use a mem insn that is the next
16440 use of the original regno.
16442 2018-02-27 Martin Sebor <msebor@redhat.com>
16445 * doc/invoke.texi (-Wmissing-attributes): New option.
16446 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
16448 2018-02-27 Martin Sebor <msebor@redhat.com>
16450 PR translation/84207
16451 * diagnostic-core.h (warning_n, error_n, inform_n): Change
16452 n argument to unsigned HOST_WIDE_INT.
16453 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
16454 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
16455 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
16456 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
16458 2018-02-27 Richard Biener <rguenther@suse.de>
16460 PR tree-optimization/84512
16461 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
16462 Do not use the estimate returned from record_stmt_cost for
16463 the scalar iteration cost but sum properly using add_stmt_cost.
16465 2018-02-27 Richard Biener <rguenther@suse.de>
16467 PR tree-optimization/84466
16468 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
16469 Adjust last change to less strictly validate use operands.
16471 2018-02-27 Martin Liska <mliska@suse.cz>
16473 PR gcov-profile/84548
16474 * gcov.c (process_file): Allow partial overlap and consider it
16475 also as group functions.
16476 (output_lines): Properly calculate range of lines for a group.
16478 2018-02-27 Martin Liska <mliska@suse.cz>
16480 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
16481 'ggc' suffixes. Change first column width.
16482 (timer::print): Fix formatting of the column.
16484 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
16486 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
16487 preserve inline entry blocks for the sake of debug inline
16488 entry point markers alone.
16489 (remove_unused_locals): Suggest in comments a better place to
16490 force the preservation of inline entry blocks that are
16491 otherwise unused, but do not preserve them.
16493 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
16495 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
16497 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
16500 * config/i386/constraints.md (Bs): Replace
16501 ix86_indirect_branch_register with
16502 TARGET_INDIRECT_BRANCH_REGISTER.
16504 * config/i386/i386.md (indirect_jump): Likewise.
16505 (tablejump): Likewise.
16506 (*sibcall_memory): Likewise.
16507 (*sibcall_value_memory): Likewise.
16508 Peepholes of indirect call and jump via memory: Likewise.
16509 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
16510 (*sibcall_value_GOT_32): Likewise.
16511 * config/i386/predicates.md (indirect_branch_operand): Likewise.
16512 (GOT_memory_operand): Likewise.
16513 (call_insn_operand): Likewise.
16514 (sibcall_insn_operand): Likewise.
16515 (GOT32_symbol_operand): Likewise.
16516 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
16518 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
16520 PR rtl-optimization/83496
16521 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
16522 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
16523 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
16524 redundant insn, if any.
16525 (relax_delay_slots): Likewise.
16526 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
16528 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
16530 PR tree-optimization/83965
16531 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
16532 that grouped statements are part of a reduction chain. Return
16533 true if the statement is not marked as a reduction itself but
16534 is part of a group.
16535 (vect_recog_dot_prod_pattern): Don't check whether the statement
16536 is part of a group here.
16537 (vect_recog_sad_pattern): Likewise.
16538 (vect_recog_widen_sum_pattern): Likewise.
16540 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
16543 * final.c (rest_of_clean_state): Also look for calls inside sequences.
16545 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
16548 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
16550 (ix86_output_indirect_function_return): New prototype.
16551 (ix86_split_simple_return_pop_internal): Likewise.
16552 * config/i386/i386.c (indirect_return_via_cx): New.
16553 (indirect_return_via_cx_bnd): Likewise.
16554 (indirect_thunk_name): Handle return va CX_REG.
16555 (output_indirect_thunk_function): Create alias for
16556 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
16557 (ix86_output_indirect_jmp): Remove the bool argument.
16558 (ix86_output_indirect_function_return): New function.
16559 (ix86_split_simple_return_pop_internal): Likewise.
16560 * config/i386/i386.md (*indirect_jump): Don't pass false
16561 to ix86_output_indirect_jmp.
16562 (*tablejump_1): Likewise.
16563 (simple_return_pop_internal): Change it to define_insn_and_split.
16564 Call ix86_split_simple_return_pop_internal to split it for
16565 -mfunction-return=.
16566 (simple_return_indirect_internal): Call
16567 ix86_output_indirect_function_return instead of
16568 ix86_output_indirect_jmp.
16570 2018-02-26 Jakub Jelinek <jakub@redhat.com>
16573 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
16574 memset and value initialization afterwards.
16576 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
16578 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
16580 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16583 * common/config/aarch64/aarch64-common.c
16584 (aarch_option_optimization_table[]): Switch
16585 off fomit-frame-pointer
16587 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
16588 Chung-Ju Wu <jasonwucj@gmail.com>
16590 * config/nds32/nds32-multiple.md (load_multiple): Disallow
16592 (store_multiple): Ditto.
16594 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
16596 * config.gcc: Add --with-cpu support for nds32 target.
16597 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
16598 * config/nds32/nds32.opt: Add -mcpu= option.
16600 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
16602 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
16603 isel=yes): Warn for these deprecated options.
16605 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
16607 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
16608 ISA_2_5_MASKS_EMBEDDED.
16610 2018-02-23 Jakub Jelinek <jakub@redhat.com>
16612 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
16613 p->max as pointers rather than using iterative_hash_expr.
16615 2018-02-23 Carl Love <cel@us.ibm.com>
16617 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
16618 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
16620 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
16621 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
16622 P8V_BUILTIN_VEC_VUNSIGNED2.
16624 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
16627 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
16628 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
16630 * lra-constraints.c (curr_insn_transform): Set up
16631 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
16633 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
16634 * lra-eliminations.c (spill_pseudos): Ditto.
16635 (process_insn_for_elimination): Ditto.
16636 * lra-lives.c (reg_early_clobber_p): Use the new macros.
16637 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
16638 LRA_NON_CLOBBERED_ALT.
16640 2018-02-22 Martin Sebor <msebor@redhat.com>
16642 PR tree-optimization/84480
16643 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
16644 to maybe_diag_stxncpy_trunc. Call it.
16645 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
16646 from gimple_fold_builtin_strcpy. Print inlining stack.
16647 (handle_builtin_stxncpy): Print inlining stack.
16648 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
16650 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
16653 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
16654 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
16655 and -fcheck-pointer-bounds are used together.
16656 (indirect_thunk_prefix): New enum.
16657 (indirect_thunk_need_prefix): New function.
16658 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
16659 "_nt" instead of "_bnd" for NOTRACK prefix.
16660 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
16661 (output_indirect_thunk_function): Likewise.
16663 (ix86_code_end): Update output_indirect_thunk_function calls.
16664 (ix86_output_indirect_branch_via_reg): Replace
16665 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
16666 (ix86_output_indirect_branch_via_push): Likewise.
16667 (ix86_output_function_return): Likewise.
16668 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
16669 incompatible with -fcf-protection=branch and
16670 -fcheck-pointer-bounds.
16672 2018-02-22 Steve Ellcey <sellcey@cavium.com>
16675 * config/aarch64/aarch64.c (aarch64_print_address_internal):
16676 Change gcc_assert call to output_operand_lossage.
16678 2018-02-22 Steve Ellcey <sellcey@cavium.com>
16680 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
16682 2018-02-22 DJ Delorie <dj@redhat.com>
16683 Sebastian Perta <sebastian.perta@renesas.com>
16684 Oleg Endo <olegendo@gcc.gnu.org>
16686 * config/rx/rx.c (rx_rtx_costs): New function.
16687 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
16689 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
16691 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
16693 2018-02-22 Martin Liska <mliska@suse.cz>
16696 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
16697 Add "native" as a possible value.
16699 2018-02-22 Martin Liska <mliska@suse.cz>
16702 * config/i386/i386.c (ix86_option_override_internal):
16703 Add "native" as a possible value for -march and -mtune.
16705 2018-02-22 Jakub Jelinek <jakub@redhat.com>
16708 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
16709 to all type variants.
16711 PR tree-optimization/84503
16712 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
16713 width as info->bitpos + info->bitsize - start.
16714 (merged_store_group::merge_overlapping): Simplify width computation.
16715 (check_no_overlap): New function.
16716 (imm_store_chain_info::try_coalesce_bswap): Compute expected
16717 start + width and last_order of the group, fail if check_no_overlap
16719 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
16720 to group if check_no_overlap fails.
16722 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
16724 * config/rs6000/altivec.md: Delete contraint arguments to
16725 define_expand, define_split, and define_peephole2, and in
16726 define_insn_and_split if always unused.
16727 * config/rs6000/darwin.md: Ditto.
16728 * config/rs6000/dfp.md: Ditto.
16729 * config/rs6000/rs6000.md: Ditto.
16730 * config/rs6000/sync.md: Ditto.
16731 * config/rs6000/vector.md: Ditto.
16732 * config/rs6000/vsx.md: Ditto.
16734 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
16736 * config/rs6000/altivec.md: Write output control strings as braced
16737 blocks instead of double-quoted strings.
16738 * config/rs6000/darwin.md: Ditto.
16739 * config/rs6000/rs6000.md: Ditto.
16740 * config/rs6000/vector.md: Ditto.
16741 * config/rs6000/vsx.md: Ditto.
16743 2018-02-21 Jason Merrill <jason@redhat.com>
16745 PR c++/84314 - ICE with templates and fastcall attribute.
16746 * attribs.c (build_type_attribute_qual_variant): Remove assert.
16748 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
16750 * ipa-cp.c (determine_versionability): Fix comment typos.
16752 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
16755 * ipa-cp.c (determine_versionability): Do not version functions caling
16758 2018-02-21 Martin Liska <mliska@suse.cz>
16761 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
16762 Add "native" as a possible value.
16763 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
16764 the macro when native cpu detection is available.
16766 2018-02-21 Martin Liska <mliska@suse.cz>
16769 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
16770 Add "native" as a possible value.
16771 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
16772 when native cpu detection is available.
16774 2018-02-21 Jakub Jelinek <jakub@redhat.com>
16775 Martin Sebor <msebor@redhat.com>
16777 PR tree-optimization/84478
16778 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
16780 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
16781 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
16782 support which is conservatively correct, for 2 only stay conservative
16783 for maxlen. Formatting and comment capitalization fixes. Add STRICT
16784 argument to the 2 argument get_range_strlen, adjust 6 arg
16785 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
16787 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
16788 (gimple_fold_builtin_strlen): Pass true as last argument to
16791 2018-02-20 Martin Sebor <msebor@redhat.com>
16793 PR middle-end/84095
16794 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
16795 (builtin_memref::set_base_and_offset): Same. Handle inner references.
16796 (builtin_memref::builtin_memref): Factor out parts into
16797 set_base_and_offset and call it.
16799 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
16801 PR middle-end/84406
16802 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
16803 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
16804 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
16805 search at the associated MODE_INT.
16807 2018-02-20 Jeff Law <law@redhat.com>
16809 PR middle-end/82123
16810 PR tree-optimization/81592
16811 PR middle-end/79257
16812 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
16813 for range data rather than using global data.
16814 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
16815 range data rather than using global data.
16816 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
16817 pass it to children as needed.
16818 (struct directive::fmtresult): Similarly.
16819 (struct directive::set_width): Similarly.
16820 (struct directive::set_precision): Similarly.
16821 (format_integer, format_directive, parse_directive): Similarly.
16822 (format_none): Accept unnamed vr_values parameter.
16823 (format_percent, format_floating, format_character): Similarly.
16824 (format_string, format_plain): Similarly.
16825 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
16826 the EVRP range analyzer for range data rather than using global data.
16827 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
16828 gimple-ssa-evrp-analyze.h
16829 (class sprintf_dom_walker): Add after_dom_children member function.
16830 Add evrp_range_analyzer member.
16831 (sprintf_dom_walker::before_dom_children): Call into the EVRP
16832 range analyzer as needed.
16833 (sprintf_dom_walker::after_dom_children): New member function.
16834 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
16836 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
16837 (evrp_range_analyzer::pop_to_marker): Likewise.
16839 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
16841 PR tree-optimization/84419
16842 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
16843 with the required type if its current type is compatible but
16846 2018-02-20 Jakub Jelinek <jakub@redhat.com>
16848 PR middle-end/82004
16849 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
16850 after vectorization.
16852 2018-02-20 Martin Liska <mliska@suse.cz>
16855 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
16856 possible values if we don't have a hint.
16858 2018-02-20 Martin Liska <mliska@suse.cz>
16862 * final.c (shorten_branches): Build align_tab array with one
16864 * opts.c (finish_options): Add alignment option limit check.
16865 (MAX_CODE_ALIGN): Likewise.
16866 (MAX_CODE_ALIGN_VALUE): Likewise.
16867 * doc/invoke.texi: Document maximum allowed option value for
16868 all -falign-* options.
16870 2018-02-19 Jakub Jelinek <jakub@redhat.com>
16873 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
16874 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
16875 * var-tracking.c (emit_note_insn_var_location): Remove all references
16876 to NOTE_INSN_CALL_ARG_LOCATION.
16877 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
16878 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
16879 Use copy_rtx_if_shared.
16880 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
16881 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
16882 (dwarf2out_var_location): Remove handling of
16883 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
16885 * final.c (final_scan_insn): Remove all references to
16886 NOTE_INSN_CALL_ARG_LOCATION.
16887 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
16888 before dumping final insns.
16889 * except.c (emit_note_eh_region_end): Remove all references to
16890 NOTE_INSN_CALL_ARG_LOCATION.
16891 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
16892 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
16893 * config/arc/arc.c (hwloop_optimize): Likewise.
16894 * config/arm/arm.c (create_fix_barrier): Likewise.
16895 * config/s390/s390.c (s390_chunkify_start): Likewise.
16896 * config/sh/sh.c (find_barrier): Likewise.
16897 * config/i386/i386.c (rest_of_insert_endbranch,
16898 ix86_seh_fixup_eh_fallthru): Likewise.
16899 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
16900 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
16901 * config/frv/frv.c (frv_function_prologue): Likewise.
16902 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
16904 (note_outside_basic_block_p): Remove all references to
16905 NOTE_INSN_CALL_ARG_LOCATION.
16906 * gengtype.c (adjust_field_rtx_def): Likewise.
16907 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
16909 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
16910 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
16913 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
16916 PR tree-optimization/84452
16917 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
16918 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
16921 2018-02-19 Martin Liska <mliska@suse.cz>
16924 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
16926 2018-02-19 Martin Liska <mliska@suse.cz>
16927 Richard Sandiford <richard.sandiford@linaro.org>
16929 PR tree-optimization/82491
16930 * gimple-fold.c (get_base_constructor): Make earlier bail out
16933 2018-02-19 Carl Love <cel@us.ibm.com>
16935 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
16936 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
16938 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
16939 P8V_BUILTIN_VEC_NEG.
16941 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
16943 * config/rl78/rl78.md (movdf): New define expand.
16945 2018-02-19 Martin Liska <mliska@suse.cz>
16948 * doc/invoke.texi: Fix typo.
16949 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
16951 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
16953 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
16954 handle rs6000_single_float and rs6000_double_float specially for
16957 2018-02-16 Jeff Law <law@redhat.com>
16959 * config/rx/rx.c (add_pop_cfi_notes): New function.;
16960 (pop_regs): Use it.
16962 2018-02-16 Jakub Jelinek <jakub@redhat.com>
16965 * ipa-inline.c (inline_small_functions): Fix a typo.
16967 2018-02-16 Nathan Sidwell <nathan@acm.org>
16969 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
16971 2018-02-16 Carl Love <cel@us.ibm.com>
16973 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
16974 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
16975 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
16976 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
16977 expansion to P8V_BUILTIN_VEC_FLOAT2.
16979 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
16981 PR rtl-optimization/70023
16982 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
16983 src_regno into account.
16985 2018-02-16 Carl Love <cel@us.ibm.com>
16987 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
16988 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
16989 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
16990 * config/rs6000/rs6000.c: Remove case statements for
16991 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
16992 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
16993 and P9V_BUILTIN_VEC_VINSERT4B.
16994 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
16995 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
16996 * config/rs6000/vsx.md:
16997 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
17000 2018-02-16 Carl Love <cel@us.ibm.com>
17002 * config/rs6000/altivec.h: Add builtin names vec_extract4b
17004 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
17006 * config/rs6000/rs6000-c.c: Add the definitions for
17007 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
17008 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
17009 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
17010 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
17011 definition for insert4b and define insn *insert3b_internal.
17012 * doc/extend.texi: Add documentation for vec_extract4b.
17014 2018-02-16 Nathan Sidwell <nathan@acm.org>
17016 * doc/extend.texi (Backwards Compatibility): Mention friend
17017 injection. Note for-scope is deprecated.
17018 * doc/invoke.texi (-ffriend-injection): Deprecate.
17020 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
17022 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
17023 that moved to I2, also allow destinations that are a paradoxical
17024 subreg (instead of a normal reg).
17026 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
17029 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
17032 2018-02-16 Richard Biener <rguenther@suse.de>
17034 PR tree-optimization/84037
17035 PR tree-optimization/84016
17037 * config/i386/i386.c (ix86_builtin_vectorization_cost):
17038 Adjust vec_construct for the fact we need additional higher latency
17039 128bit inserts for AVX256 and AVX512 vector builds.
17040 (ix86_add_stmt_cost): Scale vector construction cost for
17043 2018-02-16 Richard Biener <rguenther@suse.de>
17045 PR tree-optimization/84417
17046 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
17047 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
17048 (non_rewritable_lvalue_p): Likewise, use poly-ints.
17050 2018-02-16 Martin Liska <mliska@suse.cz>
17053 * internal-fn.def (ASAN_CHECK): Set proper flags.
17054 (ASAN_MARK): Likewise.
17056 2018-02-16 Julia Koval <julia.koval@intel.com>
17058 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
17059 from PTA_CANNONLAKE.
17061 2018-02-16 Jakub Jelinek <jakub@redhat.com>
17064 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
17065 Use ++iter rather than iter++ for std::list iterators.
17066 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
17067 defer deleting them until all nodes in the forest are processed. Do
17068 free even leaf nodes. Change to_process into auto_vec.
17071 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
17072 * vec.h (vec_default_construct): Use memset instead of placement new
17073 if BROKEN_VALUE_INITIALIZATION is defined.
17074 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
17075 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
17078 PR rtl-optimization/83723
17079 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
17080 * lra.c (lra_substitute_pseudo): Likewise. If true, use
17081 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
17083 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
17085 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
17087 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
17089 PR rtl-optimization/81443
17090 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
17091 from inner REGs to paradoxical SUBREGs.
17093 2018-02-16 Richard Biener <rguenther@suse.de>
17095 PR tree-optimization/84399
17096 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17097 For operands we can analyze at their definition make sure we can
17098 analyze them at each use as well.
17100 2018-02-16 Richard Biener <rguenther@suse.de>
17102 PR tree-optimization/84190
17103 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
17104 volatile accesses if the decl isn't volatile.
17106 2018-02-15 Jason Merrill <jason@redhat.com>
17108 PR c++/84314 - ICE with templates and fastcall attribute.
17109 * attribs.c (build_type_attribute_qual_variant): Don't clobber
17110 TYPE_CANONICAL on an existing type.
17112 2018-02-15 Jakub Jelinek <jakub@redhat.com>
17114 PR tree-optimization/84383
17115 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
17116 dstoff nor call operand_equal_p if dstbase is NULL.
17118 PR tree-optimization/84334
17119 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
17120 also a CONSTANT_CLASS_P, punt.
17122 2018-02-14 Jim Wilson <jimw@sifive.com>
17124 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
17125 first SMALL_OPERAND check. New local min_second_step. Move assert
17126 to where locals are set. Add TARGET_RVC support.
17127 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
17129 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
17131 * doc/invoke.texi: Correct -Wformat-overflow code sample.
17133 2018-02-14 Martin Sebor <msebor@redhat.com>
17135 PR tree-optimization/83698
17136 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
17137 arrays constrain the offset range to their bounds.
17138 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
17139 (builtin_access::overlap): Avoid setting the size of overlap if it's
17141 (maybe_diag_overlap): Also consider arrays when deciding what values
17142 of offsets to include in diagnostics.
17144 2018-02-14 Martin Sebor <msebor@redhat.com>
17147 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
17148 that correspond to the kind of a declaration.
17150 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
17153 * config/pa/pa.md: Load address of PIC label using the linkage table
17154 if the label is nonlocal.
17156 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
17158 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
17159 warning message if user requests -maltivec=be.
17160 * doc/invoke.texi: Document deprecation of -maltivec=be.
17162 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
17165 * config/rs6000/rs6000-c.c: Update definitions for
17166 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
17167 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
17169 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
17172 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
17173 add _get_ssp intrinsics. Remove argument from
17174 __builtin_ia32_rdssp[d|q].
17175 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
17176 * config/i386/i386-builtin.def: Remove argument from
17177 __builtin_ia32_rdssp[d|q].
17178 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
17179 ix86_expand_special_args_builtin for _rdssp[d|q].
17180 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
17181 Clear register before usage.
17182 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
17183 Add documentation for new _get_ssp and _inc_ssp intrinsics.
17185 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
17187 PR tree-optimization/84357
17188 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
17189 operand 1 of an ARRAY_REF too.
17191 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
17194 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
17195 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
17197 (set_of_reg): New struct.
17198 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
17199 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
17200 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
17202 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
17203 Split into bitclr, bitset, bitinvert patterns if appropriate.
17204 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
17205 use rx_fuse_in_memory_bitop.
17206 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
17207 to named insn, correct maximum insn length.
17209 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
17212 * machmode.def: Define a complex mode for PARTIAL_INT.
17213 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
17215 * doc/rtl.texi: Document CSPImode.
17216 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
17218 (msp430_hard_regno_nregs_with_padding): Likewise.
17220 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
17223 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
17225 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
17227 PR rtl-optimization/84169
17228 * combine.c (try_combine): New variable split_i2i3. Set it to true if
17229 we generated a parallel as new i3 and we split that to new i2 and i3
17230 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
17231 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
17232 those to i2, not i1. Partially rewrite this scan code.
17234 2018-02-13 Jakub Jelinek <jakub@redhat.com>
17237 * stor-layout.c (place_field): For variable length fields, adjust
17238 offset_align afterwards not just based on the field's alignment,
17239 but also on the size.
17241 PR middle-end/84309
17242 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
17243 of exps and logs in the use_exp2 case.
17245 2018-02-13 Jeff Law <law@redhat.com>
17247 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
17248 entry for "vector".
17250 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
17253 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
17257 * common.opt (gas-loc-support, gas-locview-support): New.
17258 (ginline-points, ginternal-reset-location-views): New.
17259 * doc/invoke.texi: Document them. Use @itemx where intended.
17260 (gvariable-location-views): Adjust.
17261 * target.def (reset_location_view): New.
17262 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
17263 (TARGET_RESET_LOCATION_VIEW): New.
17264 * doc/tm.texi: Rebuilt.
17265 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
17266 (dwarf2out_default_as_locview_support): New.
17267 (output_asm_line_debug_info): Use option variables.
17268 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
17269 (output_loc_list): Likewise.
17270 (add_high_low_attributes): Check option variables.
17271 Don't output entry view attribute in strict mode.
17272 (gen_inlined_subroutine_die): Check option variables.
17273 (dwarf2out_inline_entry): Likewise.
17274 (init_sections_and_labels): Likewise.
17275 (dwarf2out_early_finish): Likewise.
17276 (maybe_reset_location_view): New, from...
17277 (dwarf2out_var_location): ... here. Call it.
17278 * debug.h (dwarf2out_default_as_loc_support): Declare.
17279 (dwarf2out_default_as_locview_support): Declare.
17280 * hooks.c (hook_int_rtx_insn_0): New.
17281 * hooks.h (hook_int_rtx_insn_0): Declare.
17282 * toplev.c (process_options): Take -gas-loc-support and
17283 -gas-locview-support from dwarf2out. Enable
17284 -gvariable-location-views by default only with locview
17285 assembler support. Enable -ginternal-reset-location-views by
17286 default only if the target defines the corresponding hook.
17287 Enable -ginline-points by default if location views are
17288 enabled; force it disabled if statement frontiers are
17290 * tree-inline.c (expand_call_inline): Check option variables.
17291 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
17293 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
17295 PR tree-optimization/84321
17296 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
17297 handling. Also check whether the anti-range contains any values
17298 that satisfy the mask; switch to a VR_RANGE if not.
17300 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
17303 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
17305 2018-02-13 Martin Jambor <mjambor@suse.cz>
17308 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
17309 of call statements, also set location of a load to a temporary.
17311 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
17313 * config/rl78/rl78.c (add_vector_labels): New function.
17314 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
17315 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
17316 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
17317 which checks that no arguments are passed.
17318 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
17319 * doc/extend.texi: Documentation for the new attribute.
17321 2018-02-13 Andreas Schwab <schwab@suse.de>
17323 * config/riscv/linux.h (CPP_SPEC): Define.
17325 2018-02-13 Jakub Jelinek <jakub@redhat.com>
17328 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
17329 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
17330 OPTION_MASK_ISA_AES as first argument to def_builtin_const
17331 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
17332 instead of OPTION_MASK_ISA_PCLMUL as first argument to
17333 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
17334 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
17335 temporarily for AES and PCLMUL builtins.
17337 PR tree-optimization/84339
17338 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
17339 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
17342 PR middle-end/84309
17343 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
17344 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
17345 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
17347 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
17349 * omp-simd-clone.h: New file.
17350 * omp-simd-clone.c: Include omp-simd-clone.h.
17351 (expand_simd_clones): No longer static.
17352 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
17353 cgraph.h and omp-simd-clone.h.
17354 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
17355 (vect_recog_widen_shift_pattern): Formatting fix.
17356 (vect_pattern_recog_1): Don't check optab for calls.
17359 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
17360 operands[2] into a REG before using gen_lowpart on it.
17362 2018-02-12 Jeff Law <law@redhat.com>
17365 * config/sh/sh.c (find_barrier): Consider a sibling call
17368 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
17369 successfully back substituting a reg.
17371 2018-02-12 Richard Biener <rguenther@suse.de>
17373 PR tree-optimization/84037
17374 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
17375 parameter, move visited init to caller.
17376 (vect_slp_analyze_operations): Separate cost from validity
17377 check, initialize visited once for all instances.
17378 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
17380 * tree-vect-stmts.c (vect_model_simple_cost): Make early
17382 (vect_model_promotion_demotion_cost): Likewise.
17383 (vectorizable_bswap): Guard cost modeling with !slp_node
17384 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
17386 (vectorizable_call): Likewise.
17387 (vectorizable_conversion): Likewise.
17388 (vectorizable_assignment): Likewise.
17389 (vectorizable_shift): Likewise.
17390 (vectorizable_operation): Likewise.
17391 (vectorizable_store): Likewise.
17392 (vectorizable_load): Likewise.
17393 (vectorizable_condition): Likewise.
17394 (vectorizable_comparison): Likewise.
17396 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
17399 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
17400 (ASAN_MARK): Fix fnspec to account for return value, change pointer
17401 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
17403 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
17405 PR middle-end/83665
17406 * params.def (inline-min-speedup): Increase from 8 to 15.
17407 (max-inline-insns-auto): Decrease from 40 to 30.
17408 * ipa-split.c (consider_split): Add some buffer for function to
17409 be considered inlining candidate.
17410 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
17413 2018-02-12 Richard Biener <rguenther@suse.de>
17415 PR tree-optimization/84037
17416 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
17417 matched stmts if we cannot swap the non-matched ones.
17419 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
17421 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
17422 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
17423 _mm_maskz_scalef_round_ss): New intrinsics.
17424 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
17425 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
17426 __builtin_ia32_scalefss_round): Remove.
17427 (__builtin_ia32_scalefsd_mask_round,
17428 __builtin_ia32_scalefss_mask_round): New intrinsics.
17429 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
17430 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
17431 ((match_operand:VF_128 2 "<round_nimm_predicate>"
17432 "<round_constraint>")): Changed to ...
17433 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
17434 "<round_scalar_constraint>")): ... this.
17435 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
17436 %0, %1, %2<round_op3>}"): Changed to ...
17437 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
17438 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
17439 %2<round_scalar_mask_op3>}"): ... this.
17440 * config/i386/subst.md (round_scalar_nimm_predicate): New.
17442 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
17444 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
17445 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
17446 (_mm_maskz_sqrt_round_ss): New intrinsics.
17447 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
17448 (__builtin_ia32_sqrtsd_mask_round)
17449 (__builtin_ia32_sqrtss_mask_round): New builtins.
17450 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
17451 (__builtin_ia32_sqrtss_round): Remove.
17452 (__builtin_ia32_sqrtsd_mask_round)
17453 (__builtin_ia32_sqrtss_mask_round): New builtins.
17454 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
17455 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
17456 ((match_operand:VF_128 1 "vector_operand"
17457 "xBm,<round_constraint>")): Changed to ...
17458 ((match_operand:VF_128 1 "vector_operand"
17459 "xBm,<round_scalar_constraint>")): ... this.
17460 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
17461 %0, %2, %<iptr>1<round_op3>}): Changed to ...
17462 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
17463 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
17464 %<iptr>1<round_scalar_mask_op3>}): ... this.
17465 ((set_attr "prefix" "<round_prefix>")): Changed to ...
17466 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
17468 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
17471 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
17472 Cast vec_cmpeq result to correct type.
17473 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
17474 Cast vec_cmpgt result to correct type.
17476 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
17478 * final.c (final_scan_insn_1): Renamed from...
17479 (final_scan_insn): ... this. New wrapper, to recover
17480 seen from the outermost call in recursive ones.
17481 * config/sparc/sparc.c (output_return): Drop seen from call.
17482 (output_sibcall): Likewise.
17483 * config/visium/visium.c (output_branch): Likewise.
17485 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
17487 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
17490 2018-02-10 Alan Modra <amodra@gmail.com>
17493 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
17494 Specify LR as an input.
17496 2018-02-10 Jakub Jelinek <jakub@redhat.com>
17499 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
17500 remove_member_access_dummy_vars): New functions.
17501 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
17502 lower_omp_1, execute_lower_omp): Use them.
17504 PR rtl-optimization/84308
17505 * shrink-wrap.c (spread_components): Release todo vector.
17507 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
17509 PR rtl-optimization/57193
17510 * ira-color.c (struct allocno_color_data): Add member
17511 conflict_allocno_hard_prefs.
17512 (update_conflict_allocno_hard_prefs): New.
17513 (bucket_allocno_compare_func): Add a preference based on
17514 conflict_allocno_hard_prefs.
17515 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
17516 (color_allocnos): Remove a dead code. Initiate
17517 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
17519 2018-02-09 Jakub Jelinek <jakub@redhat.com>
17522 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
17523 constraint from =wa to wa. Avoid a subreg on the output operand,
17524 instead use a pseudo and subreg it in a move.
17525 (p9_xxbrd_<mode>): Changed to ...
17526 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
17527 (p9_xxbrd_v2df): New expander.
17528 (p9_xxbrw_<mode>): Changed to ...
17529 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
17530 (p9_xxbrw_v4sf): New expander.
17532 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
17534 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
17536 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
17539 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
17540 multiply in 32-bit mode.
17541 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
17542 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
17545 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
17547 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
17548 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
17549 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
17550 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
17552 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
17555 * dwarf2out.c (is_trivial_indirect_ref): New function.
17556 (dwarf2out_late_global_decl): Do not generate a location
17557 attribute for variables that have a non-trivial DECL_VALUE_EXPR
17558 and that are not defined in the current unit.
17560 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
17562 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
17563 instead of a libcall for UNORDERED.
17565 2018-02-09 Tamar Christina <tamar.christina@arm.com>
17568 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
17569 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
17571 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17574 * config/s390/s390.c (s390_set_current_function): Invoke
17575 s390_indirect_branch_settings also if fndecl didn't change.
17577 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
17579 * config/rs6000/rs6000.md (blockage): Set length to zero.
17581 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
17583 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
17585 2018-02-09 Jakub Jelinek <jakub@redhat.com>
17588 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
17589 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
17593 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
17594 PARALLEL incoming that failed vt_get_decl_and_offset check.
17596 PR middle-end/84237
17597 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
17598 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
17600 (get_variable_section): For decls in named .bss* sections pass true as
17601 second argument to bss_initializer_p.
17603 2018-02-09 Marek Polacek <polacek@redhat.com>
17604 Jakub Jelinek <jakub@redhat.com>
17607 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
17608 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
17609 Sync some changes from cxx_fold_indirect_ref.
17611 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
17613 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
17615 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
17616 (BLOCK_INLINE_ENTRY_LABEL): New.
17617 (dwarf2out_var_location): Disregard inline entry markers.
17618 (inline_entry_data): New struct.
17619 (inline_entry_data_hasher): New hashtable type.
17620 (inline_entry_data_hasher::hash): New.
17621 (inline_entry_data_hasher::equal): New.
17622 (inline_entry_data_table): New variable.
17623 (add_high_low_attributes): Add DW_AT_entry_pc and
17624 DW_AT_GNU_entry_view attributes if a pending entry is found
17625 in inline_entry_data_table. Add old entry_pc attribute only
17626 if debug nonbinding markers are disabled.
17627 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
17628 markers are enabled.
17629 (block_within_block_p, dwarf2out_inline_entry): New.
17630 (dwarf2out_finish): Check that no entries remained in
17631 inline_entry_data_table.
17632 * final.c (reemit_insn_block_notes): Handle inline entry notes.
17633 (final_scan_insn, notice_source_line): Likewise.
17634 (rest_of_clean_state): Skip inline entry markers.
17635 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
17637 * gimple.c (gimple_build_debug_inline_entry): New.
17638 * gimple.h (enum gimple_debug_subcode): Add
17639 GIMPLE_DEBUG_INLINE_ENTRY.
17640 (gimple_build_debug_inline_entry): Declare.
17641 (gimple_debug_inline_entry_p): New.
17642 (gimple_debug_nonbind_marker_p): Adjust.
17643 * insn-notes.def (INLINE_ENTRY): New.
17644 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
17645 inline entry marker notes.
17646 (print_insn): Likewise.
17647 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
17648 (INSN_DEBUG_MARKER_KIND): Likewise.
17649 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
17650 * tree-inline.c (expand_call_inline): Build and insert
17651 debug_inline_entry stmt.
17652 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
17653 inline entry blocks early, if nonbind markers are enabled.
17654 (dump_scope_block): Dump fragment info.
17655 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
17656 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
17657 (gimple_build_debug_inline_entry): New.
17658 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
17659 Enable/disable inline entry points too.
17660 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
17661 (DEBUG_INSN): Describe inline entry markers.
17663 * common.opt (gvariable-location-views): New.
17664 (gvariable-location-views=incompat5): New.
17665 * config.in: Rebuilt.
17666 * configure: Rebuilt.
17667 * configure.ac: Test assembler for view support.
17668 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
17669 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
17670 * dwarf2out.c (var_loc_view): New typedef.
17671 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
17672 (dwarf2out_locviews_in_attribute): New.
17673 (dwarf2out_locviews_in_loclist): New.
17674 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
17675 (enum dw_line_info_opcode): Add LI_adv_address.
17676 (struct dw_line_info_table): Add view.
17677 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
17678 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
17679 (zero_view_p): New variable.
17680 (ZERO_VIEW_P): New macro.
17681 (output_asm_line_debug_info): New.
17682 (struct var_loc_node): Add view.
17683 (add_AT_view_list, AT_loc_list): New.
17684 (add_var_loc_to_decl): Add view param. Test it against last.
17685 (new_loc_list): Add view params. Record them.
17686 (AT_loc_list_ptr): Handle loc and view lists.
17687 (view_list_to_loc_list_val_node): New.
17688 (print_dw_val): Handle dw_val_class_view_list.
17689 (size_of_die): Likewise.
17690 (value_format): Likewise.
17691 (loc_list_has_views): New.
17692 (gen_llsym): Set vl_symbol too.
17693 (maybe_gen_llsym, skip_loc_list_entry): New.
17694 (dwarf2out_maybe_output_loclist_view_pair): New.
17695 (output_loc_list): Output view list or entries too.
17696 (output_view_list_offset): New.
17697 (output_die): Handle dw_val_class_view_list.
17698 (output_dwarf_version): New.
17699 (output_compilation_unit_header): Use it.
17700 (output_skeleton_debug_sections): Likewise.
17701 (output_rnglists, output_line_info): Likewise.
17702 (output_pubnames, output_aranges): Update version comments.
17703 (output_one_line_info_table): Output view numbers in asm comments.
17704 (dw_loc_list): Determine current endview, pass it to new_loc_list.
17705 Call maybe_gen_llsym.
17706 (loc_list_from_tree_1): Adjust.
17707 (add_AT_location_description): Create view list attribute if
17708 needed, check it's absent otherwise.
17709 (convert_cfa_to_fb_loc_list): Adjust.
17710 (maybe_emit_file): Call output_asm_line_debug_info for test.
17711 (dwarf2out_var_location): Reset views as needed. Precompute
17712 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
17713 attribute. Set view.
17714 (new_line_info_table): Reset next view.
17715 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
17716 (dwarf2out_source_line): Likewise. Output view resets and labels to
17717 the assembler, or select appropriate line info opcodes.
17718 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
17719 (optimize_string_length): Catch it. Adjust.
17720 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
17721 dw_val_class_view_list, and remove it if no longer needed.
17722 (hash_loc_list): Hash view numbers.
17723 (loc_list_hasher::equal): Compare them.
17724 (optimize_location_lists): Check whether a view list symbol is
17725 needed, and whether the locview attribute is present, and
17726 whether they match. Remove the locview attribute if no longer
17728 (index_location_lists): Call skip_loc_list_entry for test.
17729 (dwarf2out_finish): Call output_asm_line_debug_info for test.
17730 Use output_dwarf_version.
17731 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
17732 (struct dw_val_node): Add val_view_list.
17733 * final.c (SEEN_NEXT_VIEW): New.
17734 (set_next_view_needed): New.
17735 (clear_next_view_needed): New.
17736 (maybe_output_next_view): New.
17737 (final_start_function): Rename to...
17738 (final_start_function_1): ... this. Take pointer to FIRST,
17739 add SEEN parameter. Emit param bindings in the initial view.
17740 (final_start_function): Reintroduce SEEN-less interface.
17741 (final): Rename to...
17742 (final_1): ... this. Take SEEN parameter. Output final pending
17743 next view at the end.
17744 (final): Reintroduce seen-less interface.
17745 (final_scan_insn): Output pending next view before switching
17746 sections or ending a block. Mark the next view as needed when
17747 outputting variable locations. Notify debug backend of section
17748 changes, and of location view changes.
17749 (rest_of_handle_final): Adjust.
17750 * toplev.c (process_options): Autodetect value for debug variable
17751 location views option. Warn on incompat5 without -gdwarf-5.
17752 * doc/invoke.texi (gvariable-location-views): New.
17753 (gvariable-location-views=incompat5): New.
17754 (gno-variable-location-views): New.
17756 2018-02-08 David Malcolm <dmalcolm@redhat.com>
17758 PR tree-optimization/84136
17759 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
17760 that the result of find_edge is non-NULL.
17762 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
17765 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
17766 storing integer register in SImode. Fix cost of 256 and 512
17767 byte aligned SSE register store.
17769 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
17771 * config/i386/i386.c (ix86_multiplication_cost): Fix
17772 multiplication cost for TARGET_AVX512DQ.
17774 2018-02-08 Marek Polacek <polacek@redhat.com>
17776 PR tree-optimization/84238
17777 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
17780 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
17782 PR tree-optimization/84265
17783 * tree-vect-stmts.c (vectorizable_store): Don't treat
17784 VMAT_CONTIGUOUS accesses as grouped.
17785 (vectorizable_load): Likewise.
17787 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
17789 PR tree-optimization/81635
17790 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
17791 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
17792 (test_round_for_mask): New functions.
17793 (wide_int_cc_tests): Call test_round_for_mask.
17794 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
17795 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
17796 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
17797 range returned by get_range_info.
17799 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
17802 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
17803 * symtab.c: Include builtins.h
17804 (symtab_node::output_to_lto_symbol_table_p): Move here
17805 from lto-streamer-out.c:output_symbol_p.
17806 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
17807 (output_symbol_p): Move all logic to symtab.c
17808 (produce_symtab): Update.
17810 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17812 * config/s390/s390-opts.h (enum indirect_branch): Define.
17813 * config/s390/s390-protos.h (s390_return_addr_from_memory)
17814 (s390_indirect_branch_via_thunk)
17815 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
17816 (enum s390_indirect_branch_type): Define.
17817 * config/s390/s390.c (struct s390_frame_layout, struct
17818 machine_function): Remove.
17819 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
17820 (indirect_branch_table_label_no, indirect_branch_table_name):
17822 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
17823 (enum s390_indirect_branch_option): Define.
17824 (s390_return_addr_from_memory): New function.
17825 (s390_handle_string_attribute): New function.
17826 (s390_attribute_table): Add new attribute handler.
17827 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
17828 (s390_indirect_branch_via_thunk): New function.
17829 (s390_indirect_branch_via_inline_thunk): New function.
17830 (s390_function_ok_for_sibcall): When jumping via thunk disallow
17831 sibling call optimization for non z10 compiles.
17832 (s390_emit_call): Force indirect branch target to be a single
17833 register. Add r1 clobber for non-z10 compiles.
17834 (s390_emit_epilogue): Emit return jump via return_use expander.
17835 (s390_reorg): Handle JUMP_INSNs as execute targets.
17836 (s390_option_override_internal): Perform validity checks for the
17837 new command line options.
17838 (s390_indirect_branch_attrvalue): New function.
17839 (s390_indirect_branch_settings): New function.
17840 (s390_set_current_function): Invoke s390_indirect_branch_settings.
17841 (s390_output_indirect_thunk_function): New function.
17842 (s390_code_end): Implement target hook.
17843 (s390_case_values_threshold): Implement target hook.
17844 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
17846 * config/s390/s390.h (struct s390_frame_layout)
17847 (struct machine_function): Move here from s390.c.
17848 (TARGET_INDIRECT_BRANCH_NOBP_RET)
17849 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
17850 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
17851 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
17852 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
17853 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
17854 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
17855 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
17856 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
17857 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
17858 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
17859 (mnemonic attribute): Add values which aren't recognized
17861 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
17862 pattern for branch conversion. Fix mnemonic attribute.
17863 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
17864 indirect branch via thunk if requested.
17865 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
17866 ("*indirect_jump"): Disable for branch conversion using out of
17868 ("indirect_jump_via_thunk<mode>_z10")
17869 ("indirect_jump_via_thunk<mode>")
17870 ("indirect_jump_via_inlinethunk<mode>_z10")
17871 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
17872 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
17873 ("casesi_jump_via_inlinethunk<mode>_z10")
17874 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
17875 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
17876 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
17877 ("*indirect2_jump"): Disable for branch conversion.
17878 ("casesi_jump"): Turn into expander and expand patterns for branch
17880 ("return_use"): New expander.
17881 ("*return"): Emit return via thunk and rename it to ...
17882 ("*return<mode>"): ... this one.
17883 * config/s390/s390.opt: Add new options and and enum for the
17886 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
17888 * lra-constraints.c (match_reload): Unconditionally use
17889 gen_lowpart_SUBREG, rather than selecting between that
17890 and equivalent gen_rtx_SUBREG code.
17892 2018-02-08 Richard Biener <rguenther@suse.de>
17894 PR tree-optimization/84233
17895 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
17896 changed flag instead of boguously re-using phi_inserted.
17898 2018-02-08 Martin Jambor <mjambor@suse.cz>
17900 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
17901 static local variables.
17903 2018-02-08 Richard Biener <rguenther@suse.de>
17905 PR tree-optimization/84278
17906 * tree-vect-stmts.c (vectorizable_store): When looking for
17907 smaller vector types to perform grouped strided loads/stores
17908 make sure the mode is supported by the target.
17909 (vectorizable_load): Likewise.
17911 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
17913 * config/aarch64/aarch64.c (aarch64_components_for_bb):
17914 Increase LDP/STP opportunities by adding adjacent callee-saves.
17916 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
17918 PR rtl-optimization/84068
17919 PR rtl-optimization/83459
17920 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
17922 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
17924 PR tree-optimization/84224
17925 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
17926 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
17927 non-zero arguments.
17929 2018-02-07 Iain Sandoe <iain@codesourcery.com>
17932 * config/rs6000/altivec.md (*restore_world): Remove LR use.
17933 * config/rs6000/predicates.md (restore_world_operation): Adjust op
17934 count, remove one USE.
17936 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
17938 * doc/install.texi (Configuration): Document the
17939 --with-long-double-format={ibm,ieee} PowerPC configuration
17943 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
17944 Convert from define_expand to be define_insn_and_split. Rework
17945 float/double/_Float128 conversions to QI/HI/SImode to work with
17946 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
17947 conversions to QI/HImode types did a store and then a load to
17948 truncate the value. For conversions to VSX registers, don't split
17949 the insn, instead emit the code directly. Use the code iterator
17950 any_fix to combine signed and unsigned conversions.
17951 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
17952 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
17953 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
17954 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
17955 (fix_<mode>di2_hw): Likewise.
17956 (fixuns_<mode>di2_hw): Likewise.
17957 (fix_<mode>si2_hw): Likewise.
17958 (fixuns_<mode>si2_hw): Likewise.
17959 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
17960 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
17961 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
17962 fix<uns>_trunc<SFDF:mode>si2_p8.
17963 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
17964 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
17965 (fix<uns>_<mode>_mem): Likewise.
17966 (fctiw<u>z_<mode>_mem): Likewise.
17967 (fix<uns>_<mode>_mem): Likewise.
17968 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
17969 the register allocator from doing a direct move to the GPRs to do
17970 a store, and instead use the ISA 3.0 store byte/half-word from
17971 vector register instruction. For IEEE 128-bit floating point,
17972 also optimize stores of 32-bit ints.
17973 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
17975 2018-02-07 Alan Hayward <alan.hayward@arm.com>
17977 * genextract.c (push_pathstr_operand): New function to support
17979 (walk_rtx): Call push_pathstr_operand.
17980 (print_path): Support [a-zA-Z].
17982 2018-02-07 Richard Biener <rguenther@suse.de>
17984 PR tree-optimization/84037
17985 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
17986 (cse_and_gimplify_to_preheader): Declare.
17987 (vect_get_place_in_interleaving_chain): Likewise.
17988 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17990 (_loop_vec_info::~_loop_vec_info): Delete it.
17991 (cse_and_gimplify_to_preheader): New function.
17992 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
17993 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
17994 (vectorizable_load): Likewise. For grouped stores always base
17995 the IV on the first element.
17996 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
17997 condition before gimplifying.
17999 2018-02-07 Jakub Jelinek <jakub@redhat.com>
18001 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
18002 *DIV_EXPR and *MOD_EXPR.
18004 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
18007 * config/i386/i386.c (ix86_option_override_internal): Mask out
18008 the CF_SET bit when checking -fcf-protection.
18010 2018-02-07 Tom de Vries <tom@codesourcery.com>
18013 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
18016 2018-02-07 Richard Biener <rguenther@suse.de>
18018 PR tree-optimization/84204
18019 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
18022 PR tree-optimization/84205
18023 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
18024 special-case isl_ast_op_zdiv_r.
18026 PR tree-optimization/84223
18027 * graphite-scop-detection.c (gather_bbs::before_dom_children):
18028 Only add conditions from within the region.
18029 (gather_bbs::after_dom_children): Adjust.
18031 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
18034 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
18035 * config/avr/avr.md: Only post-reload split REG-REG moves if
18036 either register is GENERAL_REG_P.
18038 2018-02-07 Jakub Jelinek <jakub@redhat.com>
18040 PR tree-optimization/84235
18041 * tree-ssa-scopedtables.c
18042 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
18043 if the subtraction is performed in floating point type where NaNs are
18044 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
18045 build 1. Formatting fix.
18047 2018-02-06 Jakub Jelinek <jakub@redhat.com>
18050 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
18051 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
18052 and skip it regardless of bb boundaries. Use CALL_P macro,
18053 don't test INSN_P (insn) together with CALL_P or JUMP_P check
18054 unnecessarily, formatting fix.
18056 2018-02-06 Michael Collison <michael.collison@arm.com>
18058 * config/arm/thumb2.md:
18059 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
18060 (*thumb_mov_notscc): Ditto.
18062 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
18065 * config/rs6000/rs6000.md (su code attribute): Use "u" for
18066 unsigned_fix, not "s".
18068 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18070 * configure.ac (gcc_fn_eh_frame_ro): New function.
18071 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
18072 correct .eh_frame permissions.
18073 * configure: Regenerate.
18075 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
18077 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
18078 irrelevant options.
18080 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18082 * config/rs6000/rs6000.c (rs6000_option_override_internal):
18083 Display warning message for -mno-speculate-indirect-jumps.
18085 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
18087 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
18089 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
18091 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
18093 PR tree-optimization/84225
18094 * tree-eh.c (find_trapping_overflow): Only call
18095 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
18097 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18100 * config/i386/i386.c: Reimplement the check of possible options
18101 -mibt/-mshstk conbination. Change error messages.
18102 * doc/invoke.texi: Fix a typo: remove extra '='.
18104 2018-02-06 Marek Polacek <polacek@redhat.com>
18106 PR tree-optimization/84228
18107 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
18109 2018-02-06 Tamar Christina <tamar.christina@arm.com>
18112 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
18113 emitted arch directives.
18114 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
18115 __ARM_FEATURE_COPROC before changing architectures.
18117 2018-02-06 Richard Biener <rguenther@suse.de>
18119 * config/i386/i386.c (print_reg): Fix typo.
18120 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
18122 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
18124 * configure: Regenerate.
18126 2018-02-05 Martin Sebor <msebor@redhat.com>
18128 PR tree-optimization/83369
18129 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
18132 2018-02-05 Martin Liska <mliska@suse.cz>
18134 * doc/invoke.texi: Cherry-pick upstream r323995.
18136 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
18138 * ira.c (ira_init_register_move_cost): Adjust comment.
18140 2018-02-05 Martin Liska <mliska@suse.cz>
18142 PR gcov-profile/84137
18143 * doc/gcov.texi: Fix typo in documentation.
18145 2018-02-05 Martin Liska <mliska@suse.cz>
18147 PR gcov-profile/83879
18148 * doc/gcov.texi: Document necessity of --dynamic-list-data when
18149 using dlopen functionality.
18151 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
18153 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
18154 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
18155 _mm_maskz_range_ss, _mm_mask_range_round_ss,
18156 _mm_maskz_range_round_ss): New intrinsics.
18157 (__builtin_ia32_rangesd128_round)
18158 (__builtin_ia32_rangess128_round): Remove.
18159 (__builtin_ia32_rangesd128_mask_round,
18160 __builtin_ia32_rangess128_mask_round): New builtins.
18161 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
18162 __builtin_ia32_rangess128_round): Remove.
18163 (__builtin_ia32_rangesd128_mask_round,
18164 __builtin_ia32_rangess128_mask_round): New builtins.
18165 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
18166 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
18167 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
18168 "<round_saeonly_constraint>")): Changed to ...
18169 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
18170 "<round_saeonly_scalar_constraint>")): ... this.
18171 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
18172 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
18173 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
18174 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
18175 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
18177 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
18179 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
18181 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
18182 Remove all values except native, 8540 and 8548.
18184 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
18186 * config/i386/i386.c (ix86_output_function_return): Pass
18187 INVALID_REGNUM, instead of -1, as invalid register number to
18188 indirect_thunk_name and output_indirect_thunk.
18190 2018-02-02 Julia Koval <julia.koval@intel.com>
18192 * config.gcc: Add -march=icelake.
18193 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
18194 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
18195 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
18196 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
18197 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
18198 (processor_target_table): Add icelake.
18199 (ix86_option_override_internal): Handle new PTAs.
18200 (get_builtin_code_for_version): Handle icelake.
18201 (M_INTEL_COREI7_ICELAKE): New.
18202 (fold_builtin_cpu): Handle icelake.
18203 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
18204 * doc/invoke.texi: Add -march=icelake.
18206 2018-02-02 Julia Koval <julia.koval@intel.com>
18208 * config/i386/i386.c (ix86_option_override_internal): Change flags type
18209 to wide_int_bitmask.
18210 * wide-int-bitmask.h: New.
18212 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18215 * config/i386/i386.md: Replace Pmode with word_mode in
18216 builtin_setjmp_setup and builtin_longjmp to support x32.
18218 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
18222 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
18224 (rs6000_supported_cpu_names): New static variable.
18225 (linux_cpu_translation_table): Likewise.
18226 (elf_platform) <cpu>: Define new static variable and use it.
18227 Translate kernel AT_PLATFORM name to canonical name if needed.
18228 Error if platform name is unknown.
18230 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
18233 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
18235 2018-02-01 Jeff Law <law@redhat.com>
18238 * config/i386/i386.c (release_scratch_register_on_entry): Add new
18239 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
18240 the scratch if RELEASE_VIA_POP is false.
18241 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
18242 If we have to save a temporary register, decrement SIZE appropriately.
18243 Pass new arguments to release_scratch_register_on_entry.
18244 (ix86_adjust_stack_and_probe): Likewise.
18245 (ix86_emit_probe_stack_range): Pass new arguments to
18246 release_scratch_register_on_entry.
18248 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
18250 PR rtl-optimization/84157
18251 * combine.c (change_zero_ext): Use REG_P predicate in
18252 front of HARD_REGISTER_P predicate.
18254 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
18256 * config/avr/avr.c (avr_option_override): Move disabling of
18257 -fdelete-null-pointer-checks to...
18258 * common/config/avr/avr-common.c (avr_option_optimization_table):
18261 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18263 PR tree-optimization/81635
18264 * tree-data-ref.c (split_constant_offset_1): For types that
18265 wrap on overflow, try to use range info to prove that wrapping
18268 2018-02-01 Renlin Li <renlin.li@arm.com>
18271 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
18272 TAILCALL_ADDR_REGS.
18273 (aarch64_register_move_cost): Likewise.
18274 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
18275 TAILCALL_ADDR_REGS.
18276 (REG_CLASS_NAMES): Likewise.
18277 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
18278 TAILCALL_ADDR_REGS. Remove IP registers.
18279 * config/aarch64/aarch64.md (Ucs): Update register constraint.
18281 2018-02-01 Richard Biener <rguenther@suse.de>
18283 * domwalk.h (dom_walker::dom_walker): Add additional constructor
18284 for specifying RPO order and allow NULL for that.
18285 * domwalk.c (dom_walker::dom_walker): Likewise.
18286 (dom_walker::walk): Handle NULL RPO order.
18287 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
18289 (rewrite_update_dom_walker): Likewise.
18290 (mark_def_dom_walker): Likewise.
18292 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18294 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
18295 (aarch64_maybe_expand_sve_subreg_move): Declare.
18296 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
18297 * config/aarch64/predicates.md (aarch64_any_register_operand): New
18299 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
18300 that are semantically a reverse operation.
18301 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
18302 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
18303 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
18305 (aarch64_can_change_mode_class): For big-endian, forbid changes
18306 between two SVE modes if they have different element sizes.
18308 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18310 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
18311 the TImode handling for big-endian targets.
18313 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18315 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
18316 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
18318 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
18319 Remove BSWAP handing for big-endian targets and use the form of
18320 LD1RQ appropariate for the mode.
18322 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18324 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
18325 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
18326 duplicated element.
18328 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18331 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
18332 check for operands that need to go through aarch64_sve_reload_be.
18334 2018-02-01 Jakub Jelinek <jakub@redhat.com>
18336 PR tree-optimization/81661
18337 PR tree-optimization/84117
18338 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
18339 * tree-eh.c: Include gimplify.h.
18340 (find_trapping_overflow, replace_trapping_overflow,
18341 rewrite_to_non_trapping_overflow): New functions.
18342 * tree-vect-loop.c: Include tree-eh.h.
18343 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
18344 * tree-data-ref.c: Include tree-eh.h.
18345 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
18347 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
18349 PR rtl-optimization/84123
18350 * combine.c (change_zero_ext): Check if hard register satisfies
18351 can_change_dest_mode before calling gen_lowpart_SUBREG.
18353 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
18356 * ira.c (ira_init_register_move_cost): Remove assert.
18358 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
18360 PR rtl-optimization/84071
18361 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
18362 * doc/tm.texi: Regenerate.
18364 2018-01-31 Richard Biener <rguenther@suse.de>
18366 PR tree-optimization/84132
18367 * tree-data-ref.c (analyze_miv_subscript): Properly
18368 check whether evolution_function_is_affine_multivariate_p
18369 before calling gcd_of_steps_may_divide_p.
18371 2018-01-31 Julia Koval <julia.koval@intel.com>
18374 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
18375 * config/i386/i386.md (rdpid_rex64) New.
18376 (rdpid): Make 32bit only.
18378 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
18381 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
18382 an IDENTIFIER_NODE for FUNCTION_TYPE's.
18384 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
18387 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
18389 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
18391 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
18393 PR rtl-optimization/84071
18394 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
18395 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
18397 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
18399 * config/arc/arc.c (arc_handle_aux_attribute): New function.
18400 (arc_attribute_table): Add 'aux' attribute.
18401 (arc_in_small_data_p): Consider aux like variables.
18402 (arc_is_aux_reg_p): New function.
18403 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
18404 (arc_get_aux_arg): New function.
18405 (prepare_move_operands): Handle aux-register access.
18406 (arc_handle_aux_attribute): New function.
18407 * doc/extend.texi (ARC Variable attributes): Add subsection.
18409 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
18411 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
18412 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
18413 (arc_attribute_table): Add 'uncached' attribute.
18414 (arc_print_operand): Print '.di' flag for uncached memory
18416 (arc_in_small_data_p): Do not consider for small data the uncached
18418 (arc_is_uncached_mem_p): New function.
18419 * config/arc/predicates.md (compact_store_memory_operand): Check
18420 for uncached memory accesses.
18421 (nonvol_nonimm_operand): Likewise.
18422 * doc/extend.texi (ARC Type Attribute): New subsection.
18424 2018-01-31 Jakub Jelinek <jakub@redhat.com>
18427 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
18428 falign-loops=): Add Optimization flag.
18430 2018-01-30 Jeff Law <law@redhat.com>
18433 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
18434 INT_REGISTERS_SAVED. Check it prior to calling
18435 get_scratch_register_on_entry.
18436 (ix86_adjust_stack_and_probe): Similarly.
18437 (ix86_emit_probe_stack_range): Similarly.
18438 (ix86_expand_prologue): Corresponding changes.
18440 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18443 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
18444 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
18446 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
18449 * lra-constraints.c (curr_insn_transform): Process AND in the
18452 2018-01-30 Jakub Jelinek <jakub@redhat.com>
18454 PR rtl-optimization/83986
18455 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
18456 dependence against last_pending_memory_flush in addition to
18457 pending_jump_insns.
18459 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
18461 PR tree-optimization/81611
18462 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
18465 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18468 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
18471 2018-01-30 Richard Biener <rguenther@suse.de>
18472 Jakub Jelinek <jakub@redhat.com>
18474 PR tree-optimization/84111
18475 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
18476 inner loops added during recursion, as they don't have up-to-date
18479 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
18482 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
18483 (can_inline_edge_by_limits_p): ... here.
18484 (can_early_inline_edge_p, check_callers,
18485 update_caller_keys, update_callee_keys, recursive_inlining,
18486 add_new_edges_to_heap, speculation_useful_p,
18487 inline_small_functions,
18488 inline_small_functions, flatten_function,
18489 inline_to_all_callers_1): Update.
18491 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
18493 * profile-count.c (profile_count::combine_with_ipa_count): Handle
18496 2018-01-30 Richard Biener <rguenther@suse.de>
18498 PR tree-optimization/83008
18499 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
18500 invariant and constant vector uses in stmts when they need
18501 more than one stmt.
18503 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18506 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
18507 * configure: Regenerate.
18509 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
18511 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
18513 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
18514 Use gen_rtx_REG rather than gen_lowpart.
18516 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
18518 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
18519 rather than 0 when creating partial subregs.
18521 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
18523 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
18526 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
18529 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
18530 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
18531 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
18532 flags. This restores the settings used before the 2017-07-24.
18533 Turning off pre increment/decrement/modify allows IVOPTS to
18534 optimize DF/SF loops where the index is an int.
18536 2018-01-29 Richard Biener <rguenther@suse.de>
18537 Kelvin Nilsen <kelvin@gcc.gnu.org>
18540 * tree-vect-stmts.c (vectorizable_call): Don't call
18541 targetm.vectorize_builtin_md_vectorized_function if callee is
18544 2018-01-22 Carl Love <cel@us.ibm.com>
18546 * doc/extend.tex: Fix typo in second arg in
18547 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
18549 2018-01-29 Richard Biener <rguenther@suse.de>
18551 PR tree-optimization/84086
18552 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
18553 (flush_ssaname_freelist): When SSA names were released reset
18554 the SCEV hash table.
18556 2018-01-29 Richard Biener <rguenther@suse.de>
18558 PR tree-optimization/84057
18559 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
18560 removed paths when removing edges.
18562 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
18564 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
18565 -mfunction-return=@var{choice}.
18567 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
18569 PR diagnostic/84034
18570 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
18571 Handle CR like TAB.
18572 (layout::print_source_line): Likewise.
18573 (test_get_line_width_without_trailing_whitespace): Add test cases.
18575 2018-01-27 Jakub Jelinek <jakub@redhat.com>
18577 PR middle-end/84040
18578 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
18581 2018-01-26 Jim Wilson <jimw@sifive.com>
18583 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
18585 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
18588 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18590 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
18591 and CMP + SUB-immediate -> SUBS.
18593 2018-01-26 Martin Sebor <msebor@redhat.com>
18595 PR tree-optimization/83896
18596 * tree-ssa-strlen.c (get_string_len): Rename...
18597 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
18598 Avoid assuming length is constant.
18599 (handle_char_store): Use HOST_WIDE_INT for string length.
18601 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
18604 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
18605 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
18607 2018-01-26 Richard Biener <rguenther@suse.de>
18609 PR rtl-optimization/84003
18610 * dse.c (record_store): Only record redundant stores when
18611 the earlier store aliases at least all accesses the later one does.
18613 2018-01-26 Jakub Jelinek <jakub@redhat.com>
18615 PR rtl-optimization/83985
18616 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
18617 REG_CFA_RESTORE insns.
18618 (delete_unmarked_insns): Don't ignore separate shrink wrapping
18619 REG_CFA_RESTORE insns here.
18622 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
18623 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
18625 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18627 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
18628 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
18629 (arc_init): Likewise.
18630 (arc_override_options): Likewise.
18631 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
18633 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
18635 * config/arc/arc.h (TARGET_DBNZ): Define.
18636 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
18637 properly set the tune attribute.
18638 (dbnz): Use TARGET_DBNZ guard.
18639 * config/arc/arc.opt (mtune): Add core3 option.
18641 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18643 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
18644 recognize new pic like addresses.
18645 (arc_delegitimize_address): Clean up.
18647 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18649 * config/arc/arc-arches.def: Option mrf16 valid for all
18651 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
18652 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
18653 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
18654 * config/arc/arc-tables.opt: Regenerate.
18655 * config/arc/arc.c (arc_conditional_register_usage): Handle
18656 reduced register file case.
18657 (arc_file_start): Set must have build attributes.
18658 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
18659 mrf16 option value.
18660 * config/arc/arc.opt (mrf16): Add new option.
18661 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
18662 * config/arc/genmultilib.awk: Handle new mrf16 option.
18663 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
18664 * config/arc/t-multilib: Regenerate.
18665 * doc/invoke.texi (ARC Options): Document mrf16 option.
18667 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18669 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
18670 * config/arc/arc.c (arc_handle_secure_attribute): New function.
18671 (arc_attribute_table): Add 'secure_call' attribute.
18672 (arc_print_operand): Print secure call operand.
18673 (arc_function_ok_for_sibcall): Don't optimize tail calls when
18675 (arc_is_secure_call_p): New function. * config/arc/arc.md
18676 (call_i): Add support for sjli instruction.
18677 (call_value_i): Likewise.
18678 * config/arc/constraints.md (Csc): New constraint.
18680 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18681 John Eric Martin <John.Martin@emmicro-us.com>
18683 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
18684 * config/arc/arc.c (_arc_jli_section): New struct.
18685 (arc_jli_section): New type.
18686 (rc_jli_sections): New static variable.
18687 (arc_handle_jli_attribute): New function.
18688 (arc_attribute_table): Add jli_always and jli_fixed attribute.
18689 (arc_file_end): New function.
18690 (TARGET_ASM_FILE_END): Define.
18691 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
18692 (arc_add_jli_section): New function.
18693 (jli_call_scan): Likewise.
18694 (arc_reorg): Call jli_call_scan.
18695 (arc_output_addsi): Remove 'S' from printing asm operand.
18696 (arc_is_jli_call_p): New function.
18697 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
18699 (movhi_insn): Likewise.
18700 (movsi_insn): Likewise.
18701 (movsi_set_cc_insn): Likewise.
18702 (loadqi_update): Likewise.
18703 (load_zeroextendqisi_update): Likewise.
18704 (load_signextendqisi_update): Likewise.
18705 (loadhi_update): Likewise.
18706 (load_zeroextendhisi_update): Likewise.
18707 (load_signextendhisi_update): Likewise.
18708 (loadsi_update): Likewise.
18709 (loadsf_update): Likewise.
18710 (movsicc_insn): Likewise.
18711 (bset_insn): Likewise.
18712 (bxor_insn): Likewise.
18713 (bclr_insn): Likewise.
18714 (bmsk_insn): Likewise.
18715 (bicsi3_insn): Likewise.
18716 (cmpsi_cc_c_insn): Likewise.
18717 (movsi_ne): Likewise.
18718 (movsi_cond_exec): Likewise.
18719 (clrsbsi2): Likewise.
18720 (norm_f): Likewise.
18730 (call_i): Remove 'S' asm letter, add jli instruction.
18731 (call_value_i): Likewise.
18732 * config/arc/arc.op (mjli-always): New option.
18733 * config/arc/constraints.md (Cji): New constraint.
18734 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
18736 (subsf3_fpx): Likewise.
18737 (mulsf3_fpx): Likewise.
18738 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
18740 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
18741 function attrbutes.
18742 * doc/invoke.texi (ARC): Document mjli-always option.
18744 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
18746 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
18747 avoid addition with 0 and use incw and decw where possible.
18749 2018-01-26 Richard Biener <rguenther@suse.de>
18751 PR tree-optimization/81082
18752 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
18753 association if it requires casting to unsigned.
18754 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
18755 from fold_plusminus_mult_expr to catch important cases late when
18756 range info is available.
18758 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18760 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
18761 * configure.ac (hidden_linkonce): New test.
18762 * configure: Regenerate.
18763 * config.in: Regenerate.
18765 2018-01-26 Julia Koval <julia.koval@intel.com>
18767 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
18768 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
18769 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
18770 _mm_mask_bitshuffle_epi64_mask): Fix type.
18771 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
18772 USI_FTYPE_V4DI_V4DI_USI): Remove.
18773 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
18774 __builtin_ia32_vpshufbitqmb256_mask,
18775 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
18776 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
18777 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
18779 2018-01-26 Alan Modra <amodra@gmail.com>
18782 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
18783 UNSPEC_VBPERMQ. Sort other unspecs.
18785 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
18787 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
18789 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
18791 PR middle-end/83055
18792 * predict.c (drop_profile): Do not push/pop cfun; update also
18794 (handle_missing_profiles): Fix logic looking for zero profiles.
18796 2018-01-25 Jakub Jelinek <jakub@redhat.com>
18798 PR middle-end/83977
18799 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
18800 on functions with #pragma omp declare simd or functions with simd
18802 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
18803 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
18804 Remove trailing \n from warning_at calls.
18806 2018-01-25 Tom de Vries <tom@codesourcery.com>
18809 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
18810 for neutered workers.
18812 2018-01-24 Joseph Myers <joseph@codesourcery.com>
18815 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
18816 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
18818 2018-01-24 Jeff Law <law@redhat.com>
18821 * i386.c (get_probe_interval): Move to earlier point.
18822 (ix86_compute_frame_layout): If -fstack-clash-protection and
18823 the frame is larger than the probe interval, then use pushes
18824 to save registers rather than reg->mem moves.
18825 (ix86_expand_prologue): Remove conditional for int_registers_saved
18828 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
18831 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
18832 min/max for never referenced object.
18834 2018-01-24 Jakub Jelinek <jakub@redhat.com>
18836 PR middle-end/83977
18837 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
18839 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
18840 attributes from DECL_ATTRIBUTES (decl) without affecting
18841 DECL_ATTRIBUTES (current_function_decl).
18842 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
18843 functions with non-NULL DECL_ABSTRACT_ORIGIN.
18845 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
18847 PR tree-optimization/83979
18848 * fold-const.c (fold_comparison): Use constant_boolean_node
18849 instead of boolean_{true,false}_node.
18851 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
18853 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
18856 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18858 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18859 Simplify the clause that sets the length attribute.
18860 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18861 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
18862 clause that sets the length attribute.
18863 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18865 2018-01-24 Tom de Vries <tom@codesourcery.com>
18868 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
18869 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
18870 Add strict parameter.
18871 (prevent_branch_around_nothing): Insert dummy insn between branch to
18872 label and label with no ptx insn inbetween.
18873 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
18875 2018-01-24 Tom de Vries <tom@codesourcery.com>
18878 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
18879 for neutered threads in warp.
18880 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
18882 2018-01-24 Richard Biener <rguenther@suse.de>
18884 PR tree-optimization/83176
18885 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
18888 2018-01-24 Richard Biener <rguenther@suse.de>
18890 PR tree-optimization/82819
18891 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
18892 code generating pluses that are no-ops in the target precision.
18894 2018-01-24 Richard Biener <rguenther@suse.de>
18896 PR middle-end/84000
18897 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
18899 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
18901 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
18902 to merge probabilities.
18903 * predict.c (probably_never_executed): Also mark as cold functions
18904 with global 0 profile and guessed local profile.
18905 * profile-count.c (profile_probability::combine_with_count): New
18907 * profile-count.h (profile_probability::operator*,
18908 profile_probability::operator*=, profile_probability::operator/,
18909 profile_probability::operator/=): Reduce precision to adjusted
18910 and set value to guessed on contradictory divisions.
18911 (profile_probability::combine_with_freq): Remove.
18912 (profile_probability::combine_wiht_count): Declare.
18913 (profile_count::force_nonzero):: Set to adjusted.
18914 (profile_count::probability_in):: Set quality to adjusted.
18915 * tree-ssa-tail-merge.c (replace_block_by): Use
18916 combine_with_count.
18918 2018-01-23 Andrew Waterman <andrew@sifive.com>
18919 Jim Wilson <jimw@sifive.com>
18921 * config/riscv/riscv.c (riscv_stack_boundary): New.
18922 (riscv_option_override): Set riscv_stack_boundary. Handle
18923 riscv_preferred_stack_boundary_arg.
18924 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
18925 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
18926 (STACK_BOUNDARY): Set to riscv_stack_boundary.
18927 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
18928 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
18929 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
18931 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
18934 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
18935 of struct ix86_frame.
18936 (ix86_expand_epilogue): Likewise. Add a local variable for
18937 the reg_save_offset field in struct ix86_frame.
18939 2018-01-23 Bin Cheng <bin.cheng@arm.com>
18941 PR tree-optimization/82604
18942 * tree-loop-distribution.c (enum partition_kind): New enum item
18943 PKIND_PARTIAL_MEMSET.
18944 (partition_builtin_p): Support above new enum item.
18945 (generate_code_for_partition): Ditto.
18946 (compute_access_range): Differentiate cases that equality can be
18947 proven at all loops, the innermost loops or no loops.
18948 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
18949 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
18950 (finalize_partitions, distribute_loop): Don't fuse partition of
18951 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
18952 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
18953 parloop is enabled.
18955 2018-01-23 Martin Liska <mliska@suse.cz>
18957 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
18958 order to ignore the predictor.
18959 (PRED_POLYMORPHIC_CALL): Likewise.
18960 (PRED_RECURSIVE_CALL): Likewise.
18962 2018-01-23 Martin Liska <mliska@suse.cz>
18964 * tree-profile.c (tree_profiling): Print function header to
18965 aware reader which function we are working on.
18966 * value-prof.c (gimple_find_values_to_profile): Do not print
18967 not interesting value histograms.
18969 2018-01-23 Martin Liska <mliska@suse.cz>
18971 * profile-count.h (enum profile_quality): Add
18972 profile_uninitialized as the first value. Do not number values
18973 as they are zero based.
18974 (profile_count::verify): Update sanity check.
18975 (profile_probability::verify): Likewise.
18977 2018-01-23 Nathan Sidwell <nathan@acm.org>
18979 * doc/invoke.texi (ffor-scope): Deprecate.
18981 2018-01-23 David Malcolm <dmalcolm@redhat.com>
18983 PR tree-optimization/83510
18984 * domwalk.c (set_all_edges_as_executable): New function.
18985 (dom_walker::dom_walker): Convert bool param
18986 "skip_unreachable_blocks" to enum reachability. Move setup of
18987 edge flags to set_all_edges_as_executable and only do it when
18988 reachability is REACHABLE_BLOCKS.
18989 * domwalk.h (enum dom_walker::reachability): New enum.
18990 (dom_walker::dom_walker): Convert bool param
18991 "skip_unreachable_blocks" to enum reachability.
18992 (set_all_edges_as_executable): New decl.
18993 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
18994 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
18996 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
18997 but converting true to REACHABLE_BLOCKS.
18998 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
19000 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
19001 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
19002 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
19004 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
19005 if check_all_array_refs will be called.
19007 2018-01-23 David Malcolm <dmalcolm@redhat.com>
19009 * tree.c (selftest::test_location_wrappers): Add more test
19012 2018-01-23 David Malcolm <dmalcolm@redhat.com>
19014 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
19015 (selftest::test_bit_in_range): Likewise.
19017 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
19020 * doc/sourcebuild.texi (vect_float): Say that the selector
19021 only describes the situation when -funsafe-math-optimizations is on.
19022 (vect_float_strict): Document.
19024 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
19026 PR tree-optimization/83965
19027 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
19028 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
19029 instead of checking only for a reduction.
19030 (vect_recog_widen_sum_pattern): Likewise.
19032 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
19034 * predict.c (probably_never_executed): Only use precise profile info.
19035 (compute_function_frequency): Skip after inlining hack since we now
19036 have quality checking.
19038 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
19040 * profile-count.h (profile_probability::very_unlikely,
19041 profile_probability::unlikely, profile_probability::even): Set
19042 precision to guessed.
19044 2018-01-23 Richard Biener <rguenther@suse.de>
19046 PR tree-optimization/83963
19047 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
19048 Properly terminate dominator walk when crossing the exit edge not
19049 when visiting its source block.
19051 2018-01-23 Jakub Jelinek <jakub@redhat.com>
19054 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
19055 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
19057 2018-01-22 Jakub Jelinek <jakub@redhat.com>
19059 PR tree-optimization/83957
19060 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
19061 semicolon after for body surrounded by braces.
19063 PR tree-optimization/83081
19064 * profile-count.h (profile_probability::split): New method.
19065 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
19066 Use profile_probability::split.
19067 (do_compare_rtx_and_jump): Fix adjustment of probabilities
19068 when splitting a single conditional jump into 2.
19070 2018-01-22 David Malcolm <dmalcolm@redhat.com>
19072 PR tree-optimization/69452
19073 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
19076 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19078 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
19079 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
19080 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
19082 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19084 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
19086 * config/rl78/rl78.md (movdi): New define_expand.
19087 * config/rl78/rl78.c (rl78_split_movdi): New function.
19089 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
19092 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
19094 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
19095 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
19096 128-bit to produce an UNSPEC move to get the double word with the
19097 signbit and then a shift directly to do signbit.
19098 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
19099 implementation with a new version that just does either a direct
19100 move or a regular move. Move memory interface to separate insns.
19101 Move insns so they are next to the expander.
19102 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
19103 with signbit move. Split big and little endian case.
19104 (signbit<mode>2_dm_mem_le): Likewise.
19105 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
19106 (signbit<mode>2_dm2): Likewise.
19108 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19110 * config/rl78/rl78.md (anddi3): New define_expand.
19112 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19114 * config/rl78/rl78.md (umindi3): New define_expand.
19116 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19118 * config/rl78/rl78.md (smindi3): New define_expand.
19120 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19122 * config/rl78/rl78.md (smaxdi3): New define_expand.
19124 2018-01-22 Carl Love <cel@us.ibm.com>
19126 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
19127 LVX_V1TI): Add macro expansion.
19128 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
19129 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
19130 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
19131 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
19132 Change check to determine if the instruction is a byte reversing
19133 entry. Fix typo in comment.
19134 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
19135 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
19136 Add def_builtin calls for new builtins.
19137 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
19138 Add define_insn expansion.
19140 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19142 * config/rl78/rl78.md (umaxdi3): New define_expand.
19144 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19146 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
19147 for non-QImode registers.
19149 2018-01-22 Richard Biener <rguenther@suse.de>
19151 PR tree-optimization/83963
19152 * graphite-scop-detection.c (scop_detection::get_sese): Delay
19153 including the loop exit block.
19154 (scop_detection::merge_sese): Likewise.
19155 (scop_detection::add_scop): Do it here instead.
19157 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19159 * doc/sourcebuild.texi (arm_softfloat): Document.
19161 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
19164 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
19165 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
19166 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
19168 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19169 David Edelsohn <dje.gcc@gmail.com>
19172 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19173 Change "crset eq" to "crset 2".
19174 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19175 (*call_indirect_aix<mode>_nospec): Likewise.
19176 (*call_value_indirect_aix<mode>_nospec): Likewise.
19177 (*call_indirect_elfv2<mode>_nospec): Likewise.
19178 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
19179 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
19180 change assembly output from . to $.
19181 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19182 (indirect_jump<mode>_nospec): Change assembly output from . to $.
19183 (*tablejump<mode>_internal1_nospec): Likewise.
19185 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
19188 * config/sh/sh_optimize_sett_clrt.cc:
19189 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
19191 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
19193 PR tree-optimization/83940
19194 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
19195 offset_dt to vect_constant_def rather than vect_unknown_def_type.
19196 (vect_check_load_store_mask): Add a mask_dt_out parameter and
19197 use it to pass back the definition type.
19198 (vect_check_store_rhs): Likewise rhs_dt_out.
19199 (vect_build_gather_load_calls): Add a mask_dt argument and use
19200 it instead of a call to vect_is_simple_use.
19201 (vectorizable_store): Update calls to vect_check_load_store_mask
19202 and vect_check_store_rhs. Use the dt returned by the latter instead
19203 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
19204 instead of calls to vect_is_simple_use. Pass the scalar rather
19205 than the vector operand to vect_is_simple_use when handling
19206 second and subsequent copies of an rhs value.
19207 (vectorizable_load): Update calls to vect_check_load_store_mask
19208 and vect_build_gather_load_calls. Use the cached mask_dt and
19209 gs_info.offset_dt instead of calls to vect_is_simple_use.
19211 2018-01-20 Jakub Jelinek <jakub@redhat.com>
19213 PR middle-end/83945
19214 * tree-emutls.c: Include gimplify.h.
19215 (lower_emutls_2): New function.
19216 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
19217 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
19218 it before further processing.
19221 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
19222 UINTVAL (trueop1) instead of INTVAL (op1).
19224 2018-01-19 Jakub Jelinek <jakub@redhat.com>
19228 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
19229 INCOMING_FRAME_SP_OFFSET if not defined.
19230 (scan_trace): Add ENTRY argument. If true and
19231 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
19232 emit a note to adjust the CFA offset.
19233 (create_cfi_notes): Adjust scan_trace callers.
19234 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
19235 INCOMING_FRAME_SP_OFFSET in the CIE.
19236 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
19237 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
19239 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
19240 * doc/tm.texi: Regenerated.
19242 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19244 PR rtl-optimization/83147
19245 * lra-constraints.c (remove_inheritance_pseudos): Use
19246 lra_substitute_pseudo_within_insn.
19248 2018-01-19 Tom de Vries <tom@codesourcery.com>
19249 Cesar Philippidis <cesar@codesourcery.com>
19252 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
19254 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
19257 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
19258 spaces for function labels.
19260 2018-01-19 Martin Liska <mliska@suse.cz>
19262 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
19263 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
19264 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
19265 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
19266 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
19267 (PRED_CONST_RETURN): Change from 69 to 65.
19268 (PRED_NULL_RETURN): Change from 91 to 71.
19269 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
19270 (PRED_LOOP_GUARD): Change from 66 to 73.
19272 2018-01-19 Martin Liska <mliska@suse.cz>
19274 * predict.c (predict_insn_def): Add new assert.
19275 (struct branch_predictor): Change type to signed integer.
19276 (test_prediction_value_range): Amend test to cover
19277 PROB_UNINITIALIZED.
19278 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
19279 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
19280 (PRED_LOOP_ITERATIONS_MAX): Likewise.
19281 (PRED_LOOP_IV_COMPARE): Likewise.
19282 * predict.h (PROB_UNINITIALIZED): Define new constant.
19284 2018-01-19 Martin Liska <mliska@suse.cz>
19286 * predict.c (dump_prediction): Add new format for
19287 analyze_brprob.py script which is enabled with -details
19289 * profile-count.h (precise_p): New function.
19291 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
19293 PR tree-optimization/83922
19294 * tree-vect-loop.c (vect_verify_full_masking): Return false if
19295 there are no statements that need masking.
19296 (vect_active_double_reduction_p): New function.
19297 (vect_analyze_loop_operations): Use it when handling phis that
19298 are not in the loop header.
19300 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
19302 PR tree-optimization/83914
19303 * tree-vect-loop.c (vectorizable_induction): Don't convert
19304 init_expr or apply the peeling adjustment for inductions
19305 that are nested within the vectorized loop.
19307 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19309 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
19312 2018-01-18 Jakub Jelinek <jakub@redhat.com>
19316 * function.h (gimplify_parameters): Add gimple_seq * argument.
19317 * function.c: Include gimple.h and options.h.
19318 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
19319 for the added local temporaries if needed.
19320 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
19321 if there are any parameter cleanups, wrap whole body into a
19322 try/finally with the cleanups.
19324 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
19327 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
19328 Use GET_MODE_CLASS for scalar floating point.
19330 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
19334 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
19335 Fix call of call_cgraph_insertion_hooks.
19337 2018-01-18 Martin Sebor <msebor@redhat.com>
19339 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
19341 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
19344 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
19347 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
19350 * common.opt: (-ffile-prefix-map): New option.
19351 * opts.c (common_handle_option): Defer it.
19352 * opts-global.c (handle_common_deferred_options): Handle it.
19353 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
19354 * file-prefix-map.h: New file.
19355 (remap_debug_filename, add_debug_prefix_map): ...here.
19356 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
19357 * final.c (debug_prefix_map, add_debug_prefix_map
19358 remap_debug_filename): Move to...
19359 * file-prefix-map.c: New file.
19360 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
19361 generalize, get rid of alloca(), use strrchr() instead of strchr().
19362 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
19363 Implement in terms of add_prefix_map().
19364 (remap_macro_filename, remap_debug_filename): Implement in term of
19366 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
19367 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
19368 * dbxout.c: Include file-prefix-map.h.
19369 * varasm.c: Likewise.
19370 * vmsdbgout.c: Likewise.
19371 * xcoffout.c: Likewise.
19372 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
19373 * doc/cppopts.texi (-fmacro-prefix-map): Document.
19374 * doc/invoke.texi (-ffile-prefix-map): Document.
19375 (-fdebug-prefix-map): Update description.
19377 2018-01-18 Martin Liska <mliska@suse.cz>
19379 * config/i386/i386.c (indirect_thunk_name): Document that also
19381 (output_indirect_thunk): Document why both instructions
19382 (pause and lfence) are generated.
19384 2018-01-18 Richard Biener <rguenther@suse.de>
19386 PR tree-optimization/83887
19387 * graphite-scop-detection.c
19388 (scop_detection::get_nearest_dom_with_single_entry): Remove.
19389 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
19390 (scop_detection::merge_sese): Re-implement with a flood-fill
19391 algorithm that properly finds a SESE region if it exists.
19393 2018-01-18 Jakub Jelinek <jakub@redhat.com>
19396 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
19397 pointer_diff optimizations use view_convert instead of convert.
19399 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19401 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19402 Generate different code for -mno-speculate-indirect-jumps.
19403 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19404 (*call_indirect_aix<mode>): Disable for
19405 -mno-speculate-indirect-jumps.
19406 (*call_indirect_aix<mode>_nospec): New define_insn.
19407 (*call_value_indirect_aix<mode>): Disable for
19408 -mno-speculate-indirect-jumps.
19409 (*call_value_indirect_aix<mode>_nospec): New define_insn.
19410 (*sibcall_nonlocal_sysv<mode>): Generate different code for
19411 -mno-speculate-indirect-jumps.
19412 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19414 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
19416 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
19417 long double type, set the flags for noting the default long double
19418 type, even if we don't pass or return a long double type.
19420 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
19423 * ipa-inline.c (flatten_function): Do not overwrite final inlining
19426 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
19428 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
19429 support for merge[hl].
19430 (fold_mergehl_helper): New helper function.
19431 (tree-vector-builder.h): New #include for tree_vector_builder usage.
19432 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
19433 (altivec_vmrglw_direct): Add xxmrglw insn.
19435 2018-01-17 Andrew Waterman <andrew@sifive.com>
19437 * config/riscv/riscv.c (riscv_conditional_register_usage): If
19438 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
19440 2018-01-17 David Malcolm <dmalcolm@redhat.com>
19443 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
19444 call the lto_location_cache before reading the
19445 DECL_SOURCE_LOCATION of the types.
19447 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
19448 Richard Sandiford <richard.sandiford@linaro.org>
19450 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
19451 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
19452 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
19453 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
19454 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
19456 * config/aarch64/constraints.md (aarch64_movti_operand):
19458 * config/aarch64/predicates.md (Uti): Add new constraint.
19460 2018-01-17 Carl Love <cel@us.ibm.com>
19462 * config/rs6000/vsx.md (define_expand xl_len_r,
19463 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
19464 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
19466 (define_expand, define_insn): Move the shift left from the
19467 define_insn to the define_expand for lxvl and stxvl instructions.
19468 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
19469 and XL_LEN_R definitions to PURE.
19471 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
19473 * config/i386/i386.c (indirect_thunk_name): Declare regno
19474 as unsigned int. Compare regno with INVALID_REGNUM.
19475 (output_indirect_thunk): Ditto.
19476 (output_indirect_thunk_function): Ditto.
19477 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
19478 in the call to output_indirect_thunk_function.
19480 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
19482 PR middle-end/83884
19483 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
19484 rather than the size of inner_type to determine the stack slot size
19485 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
19487 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
19490 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
19493 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
19495 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
19496 endian Linux systems to optionally enable multilibs for selecting
19497 the long double type if the user configured an explicit type.
19498 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
19499 have no long double multilibs if not defined.
19500 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
19501 warn if the user used -mabi={ieee,ibm}longdouble and we built
19502 multilibs for long double.
19503 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
19504 appropriate multilib option.
19505 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
19507 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
19508 for building long double multilibs.
19509 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
19511 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
19513 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
19516 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
19518 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
19521 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
19524 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
19527 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
19529 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
19530 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
19532 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
19534 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
19535 different rtl trees depending on TARGET_64BIT.
19536 (rs6000_gen_lvx): Likewise.
19538 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
19540 * config/visium/visium.md (nop): Tweak comment.
19541 (hazard_nop): Likewise.
19543 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19545 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
19546 -mspeculate-indirect-jumps.
19547 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
19548 for -mno-speculate-indirect-jumps.
19549 (*call_indirect_elfv2<mode>_nospec): New define_insn.
19550 (*call_value_indirect_elfv2<mode>): Disable for
19551 -mno-speculate-indirect-jumps.
19552 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
19553 (indirect_jump): Emit different RTL for
19554 -mno-speculate-indirect-jumps.
19555 (*indirect_jump<mode>): Disable for
19556 -mno-speculate-indirect-jumps.
19557 (*indirect_jump<mode>_nospec): New define_insn.
19558 (tablejump): Emit different RTL for
19559 -mno-speculate-indirect-jumps.
19560 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
19561 (tablejumpsi_nospec): New define_expand.
19562 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
19563 (tablejumpdi_nospec): New define_expand.
19564 (*tablejump<mode>_internal1): Disable for
19565 -mno-speculate-indirect-jumps.
19566 (*tablejump<mode>_internal1_nospec): New define_insn.
19567 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
19570 2018-01-16 Artyom Skrobov tyomitch@gmail.com
19572 * caller-save.c (insert_save): Drop unnecessary parameter. All
19575 2018-01-16 Jakub Jelinek <jakub@redhat.com>
19576 Richard Biener <rguenth@suse.de>
19579 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
19580 return early, inline manually is_gimple_sizepos. Make sure if we
19581 call gimplify_expr we don't end up with a gimple constant.
19582 * tree.c (variably_modified_type_p): Don't return true for
19583 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
19584 * gimplify.h (is_gimple_sizepos): Remove.
19586 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19588 PR tree-optimization/83857
19589 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
19590 vectorizable_live_operation for pure SLP statements.
19591 (vectorizable_live_operation): Handle PHIs.
19593 2018-01-16 Richard Biener <rguenther@suse.de>
19595 PR tree-optimization/83867
19596 * tree-vect-stmts.c (vect_transform_stmt): Precompute
19597 nested_in_vect_loop_p since the scalar stmt may get invalidated.
19599 2018-01-16 Jakub Jelinek <jakub@redhat.com>
19602 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
19603 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
19604 If off is not INTEGER_CST, issue a may not be aligned warning
19605 rather than isn't aligned. Use isn%'t rather than isn't.
19606 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
19608 <case MULT_EXPR>: Improve the case when bottom and one of the
19609 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
19610 operand, in that case check if the other operand is multiple of
19611 bottom divided by the INTEGER_CST operand.
19613 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19616 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
19617 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
19618 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
19619 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
19620 * config/pa/pa.c (pa_function_arg_advance): Likewise.
19621 (pa_function_arg, pa_arg_partial_bytes): Likewise.
19622 (pa_function_arg_size): New function.
19624 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19626 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
19627 in a separate statement.
19629 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19631 PR tree-optimization/83847
19632 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
19633 group gathers and scatters.
19635 2018-01-16 Jakub Jelinek <jakub@redhat.com>
19637 PR rtl-optimization/86620
19638 * params.def (max-sched-ready-insns): Bump minimum value to 1.
19640 PR rtl-optimization/83213
19641 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
19642 to last if both are JUMP_INSNs.
19644 PR tree-optimization/83843
19645 * gimple-ssa-store-merging.c
19646 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
19647 store_immediate_info for bswap/nop orig_stores.
19649 2018-01-15 Andrew Waterman <andrew@sifive.com>
19651 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
19653 <UDIV>: Increase cost if !TARGET_DIV.
19655 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
19657 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
19658 (define_attr "cr_logical_3op"): New.
19659 (cceq_ior_compare): Adjust.
19660 (cceq_ior_compare_complement): Adjust.
19661 (*cceq_rev_compare): Adjust.
19662 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
19663 (is_cracked_insn): Adjust.
19664 (insn_must_be_first_in_group): Adjust.
19665 * config/rs6000/40x.md: Adjust.
19666 * config/rs6000/440.md: Adjust.
19667 * config/rs6000/476.md: Adjust.
19668 * config/rs6000/601.md: Adjust.
19669 * config/rs6000/603.md: Adjust.
19670 * config/rs6000/6xx.md: Adjust.
19671 * config/rs6000/7450.md: Adjust.
19672 * config/rs6000/7xx.md: Adjust.
19673 * config/rs6000/8540.md: Adjust.
19674 * config/rs6000/cell.md: Adjust.
19675 * config/rs6000/e300c2c3.md: Adjust.
19676 * config/rs6000/e500mc.md: Adjust.
19677 * config/rs6000/e500mc64.md: Adjust.
19678 * config/rs6000/e5500.md: Adjust.
19679 * config/rs6000/e6500.md: Adjust.
19680 * config/rs6000/mpc.md: Adjust.
19681 * config/rs6000/power4.md: Adjust.
19682 * config/rs6000/power5.md: Adjust.
19683 * config/rs6000/power6.md: Adjust.
19684 * config/rs6000/power7.md: Adjust.
19685 * config/rs6000/power8.md: Adjust.
19686 * config/rs6000/power9.md: Adjust.
19687 * config/rs6000/rs64.md: Adjust.
19688 * config/rs6000/titan.md: Adjust.
19690 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19692 * config/i386/predicates.md (indirect_branch_operand): Rewrite
19693 ix86_indirect_branch_register logic.
19695 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19697 * config/i386/constraints.md (Bs): Update
19698 ix86_indirect_branch_register check. Don't check
19699 ix86_indirect_branch_register with GOT_memory_operand.
19701 * config/i386/predicates.md (GOT_memory_operand): Don't check
19702 ix86_indirect_branch_register here.
19703 (GOT32_symbol_operand): Likewise.
19705 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19707 * config/i386/predicates.md (constant_call_address_operand):
19708 Rewrite ix86_indirect_branch_register logic.
19709 (sibcall_insn_operand): Likewise.
19711 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19713 * config/i386/constraints.md (Bs): Replace
19714 ix86_indirect_branch_thunk_register with
19715 ix86_indirect_branch_register.
19717 * config/i386/i386.md (indirect_jump): Likewise.
19718 (tablejump): Likewise.
19719 (*sibcall_memory): Likewise.
19720 (*sibcall_value_memory): Likewise.
19721 Peepholes of indirect call and jump via memory: Likewise.
19722 * config/i386/i386.opt: Likewise.
19723 * config/i386/predicates.md (indirect_branch_operand): Likewise.
19724 (GOT_memory_operand): Likewise.
19725 (call_insn_operand): Likewise.
19726 (sibcall_insn_operand): Likewise.
19727 (GOT32_symbol_operand): Likewise.
19729 2018-01-15 Jakub Jelinek <jakub@redhat.com>
19731 PR middle-end/83837
19732 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
19733 type rather than type addr's type points to.
19734 (expand_omp_atomic_mutex): Likewise.
19735 (expand_omp_atomic): Likewise.
19737 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19740 * config/i386/i386.c (output_indirect_thunk_function): Use
19741 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
19742 for __x86_return_thunk.
19744 2018-01-15 Richard Biener <rguenther@suse.de>
19746 PR middle-end/83850
19747 * expmed.c (extract_bit_field_1): Fix typo.
19749 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19752 * config/arm/iterators.md (VF): New mode iterator.
19753 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
19754 Remove integer-related logic from pattern.
19755 (neon_vabd<mode>_3): Likewise.
19757 2018-01-15 Jakub Jelinek <jakub@redhat.com>
19759 PR middle-end/82694
19760 * common.opt (fstrict-overflow): No longer an alias.
19761 (fwrapv-pointer): New option.
19762 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
19763 also for pointer types based on flag_wrapv_pointer.
19764 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
19765 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
19766 opts->x_flag_wrapv got set.
19767 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
19768 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
19769 POINTER_TYPE_OVERFLOW_UNDEFINED.
19770 * match.pd: Likewise in address comparison pattern.
19771 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
19773 2018-01-15 Richard Biener <rguenther@suse.de>
19776 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
19777 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
19778 Reset type names to their identifier if their TYPE_DECL doesn't
19779 have linkage (and thus is used for ODR and devirt).
19780 (save_debug_info_for_decl): Remove.
19781 (save_debug_info_for_type): Likewise.
19782 (add_tree_to_fld_list): Adjust.
19783 * tree-pretty-print.c (dump_generic_node): Make dumping of
19784 type names more robust.
19786 2018-01-15 Richard Biener <rguenther@suse.de>
19788 * BASE-VER: Bump to 8.0.1.
19790 2018-01-14 Martin Sebor <msebor@redhat.com>
19793 * builtins.c (check_access): Avoid warning when the no-warning bit
19796 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
19798 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
19799 * ira-color (allocno_hard_regs_compare): Likewise.
19801 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
19804 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
19805 Use .pushsection/.popsection.
19807 2018-01-14 Martin Sebor <msebor@redhat.com>
19810 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
19812 2018-01-14 Jakub Jelinek <jakub@redhat.com>
19814 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
19815 entry from extra_headers.
19816 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
19817 extra_headers, make the list bitwise identical to the i?86-*-* one.
19819 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
19821 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
19822 -mcmodel=large with -mindirect-branch=thunk,
19823 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
19824 -mfunction-return=thunk-extern.
19825 * doc/invoke.texi: Document -mcmodel=large is incompatible with
19826 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
19827 -mfunction-return=thunk and -mfunction-return=thunk-extern.
19829 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
19831 * config/i386/i386.c (print_reg): Print the name of the full
19832 integer register without '%'.
19833 (ix86_print_operand): Handle 'V'.
19834 * doc/extend.texi: Document 'V' modifier.
19836 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
19838 * config/i386/constraints.md (Bs): Disallow memory operand for
19839 -mindirect-branch-register.
19841 * config/i386/predicates.md (indirect_branch_operand): Likewise.
19842 (GOT_memory_operand): Likewise.
19843 (call_insn_operand): Likewise.
19844 (sibcall_insn_operand): Likewise.
19845 (GOT32_symbol_operand): Likewise.
19846 * config/i386/i386.md (indirect_jump): Call convert_memory_address
19847 for -mindirect-branch-register.
19848 (tablejump): Likewise.
19849 (*sibcall_memory): Likewise.
19850 (*sibcall_value_memory): Likewise.
19851 Disallow peepholes of indirect call and jump via memory for
19852 -mindirect-branch-register.
19853 (*call_pop): Replace m with Bw.
19854 (*call_value_pop): Likewise.
19855 (*sibcall_pop_memory): Replace m with Bs.
19856 * config/i386/i386.opt (mindirect-branch-register): New option.
19857 * doc/invoke.texi: Document -mindirect-branch-register option.
19859 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
19861 * config/i386/i386-protos.h (ix86_output_function_return): New.
19862 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
19863 set function_return_type.
19864 (indirect_thunk_name): Add ret_p to indicate thunk for function
19866 (output_indirect_thunk_function): Pass false to
19867 indirect_thunk_name.
19868 (ix86_output_indirect_branch_via_reg): Likewise.
19869 (ix86_output_indirect_branch_via_push): Likewise.
19870 (output_indirect_thunk_function): Create alias for function
19871 return thunk if regno < 0.
19872 (ix86_output_function_return): New function.
19873 (ix86_handle_fndecl_attribute): Handle function_return.
19874 (ix86_attribute_table): Add function_return.
19875 * config/i386/i386.h (machine_function): Add
19876 function_return_type.
19877 * config/i386/i386.md (simple_return_internal): Use
19878 ix86_output_function_return.
19879 (simple_return_internal_long): Likewise.
19880 * config/i386/i386.opt (mfunction-return=): New option.
19881 (indirect_branch): Mention -mfunction-return=.
19882 * doc/extend.texi: Document function_return function attribute.
19883 * doc/invoke.texi: Document -mfunction-return= option.
19885 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
19887 * config/i386/i386-opts.h (indirect_branch): New.
19888 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
19889 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
19890 with local indirect jump when converting indirect call and jump.
19891 (ix86_set_indirect_branch_type): New.
19892 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
19893 (indirectlabelno): New.
19894 (indirect_thunk_needed): Likewise.
19895 (indirect_thunk_bnd_needed): Likewise.
19896 (indirect_thunks_used): Likewise.
19897 (indirect_thunks_bnd_used): Likewise.
19898 (INDIRECT_LABEL): Likewise.
19899 (indirect_thunk_name): Likewise.
19900 (output_indirect_thunk): Likewise.
19901 (output_indirect_thunk_function): Likewise.
19902 (ix86_output_indirect_branch_via_reg): Likewise.
19903 (ix86_output_indirect_branch_via_push): Likewise.
19904 (ix86_output_indirect_branch): Likewise.
19905 (ix86_output_indirect_jmp): Likewise.
19906 (ix86_code_end): Call output_indirect_thunk_function if needed.
19907 (ix86_output_call_insn): Call ix86_output_indirect_branch if
19909 (ix86_handle_fndecl_attribute): Handle indirect_branch.
19910 (ix86_attribute_table): Add indirect_branch.
19911 * config/i386/i386.h (machine_function): Add indirect_branch_type
19912 and has_local_indirect_jump.
19913 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
19915 (tablejump): Likewise.
19916 (*indirect_jump): Use ix86_output_indirect_jmp.
19917 (*tablejump_1): Likewise.
19918 (simple_return_indirect_internal): Likewise.
19919 * config/i386/i386.opt (mindirect-branch=): New option.
19920 (indirect_branch): New.
19923 (thunk-inline): Likewise.
19924 (thunk-extern): Likewise.
19925 * doc/extend.texi: Document indirect_branch function attribute.
19926 * doc/invoke.texi: Document -mindirect-branch= option.
19928 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
19931 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
19933 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
19935 * ipa-inline.c (want_inline_small_function_p): Return false if
19936 inlining has already failed with CIF_FINAL_ERROR.
19937 (update_caller_keys): Call want_inline_small_function_p before
19939 (update_callee_keys): Likewise.
19941 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
19943 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
19945 (rs6000_quadword_masked_address_p): Likewise.
19946 (quad_aligned_load_p): Likewise.
19947 (quad_aligned_store_p): Likewise.
19948 (const_load_sequence_p): Add comment to describe the outer-most loop.
19949 (mimic_memory_attributes_and_flags): New function.
19950 (rs6000_gen_stvx): Likewise.
19951 (replace_swapped_aligned_store): Likewise.
19952 (rs6000_gen_lvx): Likewise.
19953 (replace_swapped_aligned_load): Likewise.
19954 (replace_swapped_load_constant): Capitalize argument name in
19955 comment describing this function.
19956 (rs6000_analyze_swaps): Add a third pass to search for vector loads
19957 and stores that access quad-word aligned addresses and replace
19958 with stvx or lvx instructions when appropriate.
19959 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
19960 New function prototype.
19961 (rs6000_quadword_masked_address_p): Likewise.
19962 (rs6000_gen_lvx): Likewise.
19963 (rs6000_gen_stvx): Likewise.
19964 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
19965 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
19966 when memory address is aligned.
19967 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
19968 this split to select lvx instruction when memory address is aligned.
19969 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
19970 instruction when memory address is aligned.
19971 (*vsx_le_perm_load_v16qi): Likewise.
19972 (four unnamed splitters): Modify to select the stvx instruction
19973 when memory is aligned.
19975 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
19977 * predict.c (determine_unlikely_bbs): Handle correctly BBs
19978 which appears in the queue multiple times.
19980 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19981 Alan Hayward <alan.hayward@arm.com>
19982 David Sherwood <david.sherwood@arm.com>
19984 * tree-vectorizer.h (vec_lower_bound): New structure.
19985 (_loop_vec_info): Add check_nonzero and lower_bounds.
19986 (LOOP_VINFO_CHECK_NONZERO): New macro.
19987 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
19988 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
19989 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
19990 fields. Make seg_len the distance travelled, not including the
19992 (dr_direction_indicator): Declare.
19993 (dr_zero_step_indicator): Likewise.
19994 (dr_known_forward_stride_p): Likewise.
19995 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
19997 (runtime_alias_check_p): Allow runtime alias checks with
19999 (operator ==): Compare access_size and align.
20000 (prune_runtime_alias_test_list): Rework for new distinction between
20001 the access_size and seg_len.
20002 (create_intersect_range_checks_index): Likewise. Cope with polynomial
20004 (get_segment_min_max): New function.
20005 (create_intersect_range_checks): Use it.
20006 (dr_step_indicator): New function.
20007 (dr_direction_indicator): Likewise.
20008 (dr_zero_step_indicator): Likewise.
20009 (dr_known_forward_stride_p): Likewise.
20010 * tree-loop-distribution.c (data_ref_segment_size): Return
20011 DR_STEP * (niters - 1).
20012 (compute_alias_check_pairs): Update call to the dr_with_seg_len
20014 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
20015 (vect_preserves_scalar_order_p): New function, split out from...
20016 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
20017 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
20018 (vect_vfa_access_size): New function.
20019 (vect_vfa_align): Likewise.
20020 (vect_compile_time_alias): Take access_size_a and access_b arguments.
20021 (dump_lower_bound): New function.
20022 (vect_check_lower_bound): Likewise.
20023 (vect_small_gap_p): Likewise.
20024 (vectorizable_with_step_bound_p): Likewise.
20025 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
20026 depencies if the vectorization factor is 1. Convert the checks
20027 for nonzero steps into checks on the bounds of DR_STEP. Try using
20028 a bunds check for variable steps if the minimum required step is
20029 relatively small. Update calls to the dr_with_seg_len
20030 constructor and to vect_compile_time_alias.
20031 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
20033 (vect_loop_versioning): Call it.
20034 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
20036 (vect_estimate_min_profitable_iters): Account for any bounds checks.
20038 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20039 Alan Hayward <alan.hayward@arm.com>
20040 David Sherwood <david.sherwood@arm.com>
20042 * doc/sourcebuild.texi (vect_scatter_store): Document.
20043 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
20045 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
20047 * genopinit.c (main): Add supports_vec_scatter_store and
20048 supports_vec_scatter_store_cached to target_optabs.
20049 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
20050 IFN_MASK_SCATTER_STORE.
20051 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
20053 * internal-fn.h (internal_store_fn_p): Declare.
20054 (internal_fn_stored_value_index): Likewise.
20055 * internal-fn.c (scatter_store_direct): New macro.
20056 (expand_scatter_store_optab_fn): New function.
20057 (direct_scatter_store_optab_supported_p): New macro.
20058 (internal_store_fn_p): New function.
20059 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
20060 IFN_MASK_SCATTER_STORE.
20061 (internal_fn_mask_index): Likewise.
20062 (internal_fn_stored_value_index): New function.
20063 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
20064 for scatter stores.
20065 * optabs-query.h (supports_vec_scatter_store_p): Declare.
20066 * optabs-query.c (supports_vec_scatter_store_p): New function.
20067 * tree-vectorizer.h (vect_get_store_rhs): Declare.
20068 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
20069 true for scatter stores.
20070 (vect_gather_scatter_fn_p): Handle scatter stores too.
20071 (vect_check_gather_scatter): Consider using scatter stores if
20072 supports_vec_scatter_store_p.
20073 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
20074 scatter stores too.
20075 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
20076 internal_fn_stored_value_index.
20077 (check_load_store_masking): Handle scatter stores too.
20078 (vect_get_store_rhs): Make public.
20079 (vectorizable_call): Use internal_store_fn_p.
20080 (vectorizable_store): Handle scatter store internal functions.
20081 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
20082 when deciding whether the end of the group has been reached.
20083 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
20084 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
20085 (mask_scatter_store<mode>): New insns.
20087 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20088 Alan Hayward <alan.hayward@arm.com>
20089 David Sherwood <david.sherwood@arm.com>
20091 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
20092 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
20093 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
20095 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
20096 Use vect_truncate_gather_scatter_offset if we can't treat the
20097 operation as a normal gather load or scatter store.
20098 (get_group_load_store_type): Take the gather_scatter_info
20099 as argument. Try using a gather load or scatter store for
20100 single-element groups.
20101 (get_load_store_type): Update calls to get_group_load_store_type
20102 and vect_use_strided_gather_scatters_p.
20104 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20105 Alan Hayward <alan.hayward@arm.com>
20106 David Sherwood <david.sherwood@arm.com>
20108 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
20109 optional tree argument.
20110 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
20112 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
20113 but continue to use the current value as a fallback.
20114 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
20115 to compare the updates.
20116 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
20117 (get_load_store_type): Use it when handling a strided access.
20118 (vect_get_strided_load_store_ops): New function.
20119 (vect_get_data_ptr_increment): Likewise.
20120 (vectorizable_load): Handle strided gather loads. Always pass
20121 a step to vect_create_data_ref_ptr and bump_vector_ptr.
20123 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20124 Alan Hayward <alan.hayward@arm.com>
20125 David Sherwood <david.sherwood@arm.com>
20127 * doc/md.texi (gather_load@var{m}): Document.
20128 (mask_gather_load@var{m}): Likewise.
20129 * genopinit.c (main): Add supports_vec_gather_load and
20130 supports_vec_gather_load_cached to target_optabs.
20131 * optabs-tree.c (init_tree_optimization_optabs): Use
20132 ggc_cleared_alloc to allocate target_optabs.
20133 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
20134 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
20136 * internal-fn.h (internal_load_fn_p): Declare.
20137 (internal_gather_scatter_fn_p): Likewise.
20138 (internal_fn_mask_index): Likewise.
20139 (internal_gather_scatter_fn_supported_p): Likewise.
20140 * internal-fn.c (gather_load_direct): New macro.
20141 (expand_gather_load_optab_fn): New function.
20142 (direct_gather_load_optab_supported_p): New macro.
20143 (direct_internal_fn_optab): New function.
20144 (internal_load_fn_p): Likewise.
20145 (internal_gather_scatter_fn_p): Likewise.
20146 (internal_fn_mask_index): Likewise.
20147 (internal_gather_scatter_fn_supported_p): Likewise.
20148 * optabs-query.c (supports_at_least_one_mode_p): New function.
20149 (supports_vec_gather_load_p): Likewise.
20150 * optabs-query.h (supports_vec_gather_load_p): Declare.
20151 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
20152 and memory_type field.
20153 (NUM_PATTERNS): Bump to 15.
20154 * tree-vect-data-refs.c: Include internal-fn.h.
20155 (vect_gather_scatter_fn_p): New function.
20156 (vect_describe_gather_scatter_call): Likewise.
20157 (vect_check_gather_scatter): Try using internal functions for
20158 gather loads. Recognize existing calls to a gather load function.
20159 (vect_analyze_data_refs): Consider using gather loads if
20160 supports_vec_gather_load_p.
20161 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
20162 (vect_get_gather_scatter_offset_type): Likewise.
20163 (vect_convert_mask_for_vectype): Likewise.
20164 (vect_add_conversion_to_patterm): Likewise.
20165 (vect_try_gather_scatter_pattern): Likewise.
20166 (vect_recog_gather_scatter_pattern): New pattern recognizer.
20167 (vect_vect_recog_func_ptrs): Add it.
20168 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
20169 internal_fn_mask_index and internal_gather_scatter_fn_p.
20170 (check_load_store_masking): Take the gather_scatter_info as an
20171 argument and handle gather loads.
20172 (vect_get_gather_scatter_ops): New function.
20173 (vectorizable_call): Check internal_load_fn_p.
20174 (vectorizable_load): Likewise. Handle gather load internal
20176 (vectorizable_store): Update call to check_load_store_masking.
20177 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
20178 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
20179 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
20180 (aarch64_gather_scale_operand_d): New predicates.
20181 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
20182 (mask_gather_load<mode>): New insns.
20184 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20185 Alan Hayward <alan.hayward@arm.com>
20186 David Sherwood <david.sherwood@arm.com>
20188 * optabs.def (fold_left_plus_optab): New optab.
20189 * doc/md.texi (fold_left_plus_@var{m}): Document.
20190 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
20191 * internal-fn.c (fold_left_direct): Define.
20192 (expand_fold_left_optab_fn): Likewise.
20193 (direct_fold_left_optab_supported_p): Likewise.
20194 * fold-const-call.c (fold_const_fold_left): New function.
20195 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
20196 * tree-parloops.c (valid_reduction_p): New function.
20197 (gather_scalar_reductions): Use it.
20198 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
20199 (vect_finish_replace_stmt): Declare.
20200 * tree-vect-loop.c (fold_left_reduction_fn): New function.
20201 (needs_fold_left_reduction_p): New function, split out from...
20202 (vect_is_simple_reduction): ...here. Accept reductions that
20203 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
20204 (vect_force_simple_reduction): Also store the reduction type in
20205 the assignment's STMT_VINFO_REDUC_TYPE.
20206 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
20207 (merge_with_identity): New function.
20208 (vect_expand_fold_left): Likewise.
20209 (vectorize_fold_left_reduction): Likewise.
20210 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
20211 scalar phi in place for it. Check for target support and reject
20212 cases that would reassociate the operation. Defer the transform
20213 phase to vectorize_fold_left_reduction.
20214 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
20215 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
20216 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
20218 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20220 * tree-if-conv.c (predicate_mem_writes): Remove redundant
20221 call to ifc_temp_var.
20223 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20224 Alan Hayward <alan.hayward@arm.com>
20225 David Sherwood <david.sherwood@arm.com>
20227 * target.def (legitimize_address_displacement): Take the original
20228 offset as a poly_int.
20229 * targhooks.h (default_legitimize_address_displacement): Update
20231 * targhooks.c (default_legitimize_address_displacement): Likewise.
20232 * doc/tm.texi: Regenerate.
20233 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
20234 as an argument, moving assert of ad->disp == ad->disp_term to...
20235 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
20236 Try calling targetm.legitimize_address_displacement before expanding
20237 the address rather than afterwards, and adjust for the new interface.
20238 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
20239 Match the new hook interface. Handle SVE addresses.
20240 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
20241 new hook interface.
20243 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20245 * Makefile.in (OBJS): Add early-remat.o.
20246 * target.def (select_early_remat_modes): New hook.
20247 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
20248 * doc/tm.texi: Regenerate.
20249 * targhooks.h (default_select_early_remat_modes): Declare.
20250 * targhooks.c (default_select_early_remat_modes): New function.
20251 * timevar.def (TV_EARLY_REMAT): New timevar.
20252 * passes.def (pass_early_remat): New pass.
20253 * tree-pass.h (make_pass_early_remat): Declare.
20254 * early-remat.c: New file.
20255 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
20257 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
20259 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20260 Alan Hayward <alan.hayward@arm.com>
20261 David Sherwood <david.sherwood@arm.com>
20263 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
20264 vfm1 with a bound_epilog parameter.
20265 (vect_do_peeling): Update calls accordingly, and move the prologue
20266 call earlier in the function. Treat the base bound_epilog as 0 for
20267 fully-masked loops and retain vf - 1 for other loops. Add 1 to
20268 this base when peeling for gaps.
20269 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
20270 with fully-masked loops.
20271 (vect_estimate_min_profitable_iters): Handle the single peeled
20272 iteration in that case.
20274 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20275 Alan Hayward <alan.hayward@arm.com>
20276 David Sherwood <david.sherwood@arm.com>
20278 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
20279 single-element interleaving even if the size is not a power of 2.
20280 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
20281 accesses for single-element interleaving if the group size is
20284 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20285 Alan Hayward <alan.hayward@arm.com>
20286 David Sherwood <david.sherwood@arm.com>
20288 * doc/md.texi (fold_extract_last_@var{m}): Document.
20289 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
20290 * optabs.def (fold_extract_last_optab): New optab.
20291 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
20292 * internal-fn.c (fold_extract_direct): New macro.
20293 (expand_fold_extract_optab_fn): Likewise.
20294 (direct_fold_extract_optab_supported_p): Likewise.
20295 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
20296 * tree-vect-loop.c (vect_model_reduction_cost): Handle
20297 EXTRACT_LAST_REDUCTION.
20298 (get_initial_def_for_reduction): Do not create an initial vector
20299 for EXTRACT_LAST_REDUCTION reductions.
20300 (vectorizable_reduction): Leave the scalar phi in place for
20301 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
20302 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
20303 epilogue code for EXTRACT_LAST_REDUCTION and defer the
20304 transform phase to vectorizable_condition.
20305 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
20307 (vect_finish_stmt_generation): ...here.
20308 (vect_finish_replace_stmt): New function.
20309 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
20310 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
20312 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
20314 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20315 Alan Hayward <alan.hayward@arm.com>
20316 David Sherwood <david.sherwood@arm.com>
20318 * doc/md.texi (extract_last_@var{m}): Document.
20319 * optabs.def (extract_last_optab): New optab.
20320 * internal-fn.def (EXTRACT_LAST): New internal function.
20321 * internal-fn.c (cond_unary_direct): New macro.
20322 (expand_cond_unary_optab_fn): Likewise.
20323 (direct_cond_unary_optab_supported_p): Likewise.
20324 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
20325 loops using EXTRACT_LAST.
20326 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
20327 (extract_last_<mode>): ...this optab.
20328 (vec_extract<mode><Vel>): Update accordingly.
20330 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20331 Alan Hayward <alan.hayward@arm.com>
20332 David Sherwood <david.sherwood@arm.com>
20334 * target.def (empty_mask_is_expensive): New hook.
20335 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
20336 * doc/tm.texi: Regenerate.
20337 * targhooks.h (default_empty_mask_is_expensive): Declare.
20338 * targhooks.c (default_empty_mask_is_expensive): New function.
20339 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
20340 if the target says that empty masks are expensive.
20341 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
20343 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
20345 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20346 Alan Hayward <alan.hayward@arm.com>
20347 David Sherwood <david.sherwood@arm.com>
20349 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
20350 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
20351 (vect_use_loop_mask_for_alignment_p): New function.
20352 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
20353 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
20354 niters_skip argument. Make sure that the first niters_skip elements
20355 of the first iteration are inactive.
20356 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
20357 Update call to vect_set_loop_masks_directly.
20358 (get_misalign_in_elems): New function, split out from...
20359 (vect_gen_prolog_loop_niters): ...here.
20360 (vect_update_init_of_dr): Take a code argument that specifies whether
20361 the adjustment should be added or subtracted.
20362 (vect_update_init_of_drs): Likewise.
20363 (vect_prepare_for_masked_peels): New function.
20364 (vect_do_peeling): Skip prologue peeling if we're using a mask
20365 instead. Update call to vect_update_inits_of_drs.
20366 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
20368 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
20369 alignment. Do not include the number of peeled iterations in
20370 the minimum threshold in that case.
20371 (vectorizable_induction): Adjust the start value down by
20372 LOOP_VINFO_MASK_SKIP_NITERS iterations.
20373 (vect_transform_loop): Call vect_prepare_for_masked_peels.
20374 Take the number of skipped iterations into account when calculating
20376 * tree-vect-stmts.c (vect_gen_while_not): New function.
20378 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20379 Alan Hayward <alan.hayward@arm.com>
20380 David Sherwood <david.sherwood@arm.com>
20382 * doc/sourcebuild.texi (vect_fully_masked): Document.
20383 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
20384 default value to 0.
20385 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
20387 (vect_analyze_loop_2): ...here. Don't check the vectorization
20388 factor against the number of loop iterations if the loop is
20391 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20392 Alan Hayward <alan.hayward@arm.com>
20393 David Sherwood <david.sherwood@arm.com>
20395 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
20396 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
20397 (dump_groups): Update accordingly.
20398 (iv_use::mem_type): New member variable.
20399 (address_p): New function.
20400 (record_use): Add a mem_type argument and initialize the new
20402 (record_group_use): Add a mem_type argument. Use address_p.
20403 Remove obsolete null checks of base_object. Update call to record_use.
20404 (find_interesting_uses_op): Update call to record_group_use.
20405 (find_interesting_uses_cond): Likewise.
20406 (find_interesting_uses_address): Likewise.
20407 (get_mem_type_for_internal_fn): New function.
20408 (find_address_like_use): Likewise.
20409 (find_interesting_uses_stmt): Try find_address_like_use before
20410 calling find_interesting_uses_op.
20411 (addr_offset_valid_p): Use the iv mem_type field as the type
20412 of the addressed memory.
20413 (add_autoinc_candidates): Likewise.
20414 (get_address_cost): Likewise.
20415 (split_small_address_groups_p): Use address_p.
20416 (split_address_groups): Likewise.
20417 (add_iv_candidate_for_use): Likewise.
20418 (autoinc_possible_for_pair): Likewise.
20419 (rewrite_groups): Likewise.
20420 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
20421 (determine_group_iv_cost): Update after split of USE_ADDRESS.
20422 (get_alias_ptr_type_for_ptr_address): New function.
20423 (rewrite_use_address): Rewrite address uses in calls that were
20424 identified by find_address_like_use.
20426 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20427 Alan Hayward <alan.hayward@arm.com>
20428 David Sherwood <david.sherwood@arm.com>
20430 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
20432 * gimple-expr.h (is_gimple_addressable: Likewise.
20433 * gimple-expr.c (is_gimple_address): Likewise.
20434 * internal-fn.c (expand_call_mem_ref): New function.
20435 (expand_mask_load_optab_fn): Use it.
20436 (expand_mask_store_optab_fn): Likewise.
20438 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20439 Alan Hayward <alan.hayward@arm.com>
20440 David Sherwood <david.sherwood@arm.com>
20442 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
20443 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
20444 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
20445 (cond_umax@var{mode}): Document.
20446 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
20447 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
20448 (cond_umin_optab, cond_umax_optab): New optabs.
20449 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
20450 (COND_IOR, COND_XOR): New internal functions.
20451 * internal-fn.h (get_conditional_internal_fn): Declare.
20452 * internal-fn.c (cond_binary_direct): New macro.
20453 (expand_cond_binary_optab_fn): Likewise.
20454 (direct_cond_binary_optab_supported_p): Likewise.
20455 (get_conditional_internal_fn): New function.
20456 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
20457 Cope with reduction statements that are vectorized as calls rather
20459 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
20460 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
20461 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
20462 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
20463 (UNSPEC_COND_EOR): New unspecs.
20464 (optab): Add mappings for them.
20465 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
20466 (sve_int_op, sve_fp_op): New int attributes.
20468 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20469 Alan Hayward <alan.hayward@arm.com>
20470 David Sherwood <david.sherwood@arm.com>
20472 * optabs.def (while_ult_optab): New optab.
20473 * doc/md.texi (while_ult@var{m}@var{n}): Document.
20474 * internal-fn.def (WHILE_ULT): New internal function.
20475 * internal-fn.h (direct_internal_fn_supported_p): New override
20476 that takes two types as argument.
20477 * internal-fn.c (while_direct): New macro.
20478 (expand_while_optab_fn): New function.
20479 (convert_optab_supported_p): Likewise.
20480 (direct_while_optab_supported_p): New macro.
20481 * wide-int.h (wi::udiv_ceil): New function.
20482 * tree-vectorizer.h (rgroup_masks): New structure.
20483 (vec_loop_masks): New typedef.
20484 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
20485 and fully_masked_p.
20486 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
20487 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
20488 (vect_max_vf): New function.
20489 (slpeel_make_loop_iterate_ntimes): Delete.
20490 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
20491 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
20492 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
20493 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
20494 internal-fn.h, stor-layout.h and optabs-query.h.
20495 (vect_set_loop_mask): New function.
20496 (add_preheader_seq): Likewise.
20497 (add_header_seq): Likewise.
20498 (interleave_supported_p): Likewise.
20499 (vect_maybe_permute_loop_masks): Likewise.
20500 (vect_set_loop_masks_directly): Likewise.
20501 (vect_set_loop_condition_masked): Likewise.
20502 (vect_set_loop_condition_unmasked): New function, split out from
20503 slpeel_make_loop_iterate_ntimes.
20504 (slpeel_make_loop_iterate_ntimes): Rename to..
20505 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
20506 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
20507 (vect_do_peeling): Update call accordingly.
20508 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
20510 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
20511 mask_compare_type, can_fully_mask_p and fully_masked_p.
20512 (release_vec_loop_masks): New function.
20513 (_loop_vec_info): Use it to free the loop masks.
20514 (can_produce_all_loop_masks_p): New function.
20515 (vect_get_max_nscalars_per_iter): Likewise.
20516 (vect_verify_full_masking): Likewise.
20517 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
20518 retries, and free the mask rgroups before retrying. Check loop-wide
20519 reasons for disallowing fully-masked loops. Make the final decision
20520 about whether use a fully-masked loop or not.
20521 (vect_estimate_min_profitable_iters): Do not assume that peeling
20522 for the number of iterations will be needed for fully-masked loops.
20523 (vectorizable_reduction): Disable fully-masked loops.
20524 (vectorizable_live_operation): Likewise.
20525 (vect_halve_mask_nunits): New function.
20526 (vect_double_mask_nunits): Likewise.
20527 (vect_record_loop_mask): Likewise.
20528 (vect_get_loop_mask): Likewise.
20529 (vect_transform_loop): Handle the case in which the final loop
20530 iteration might handle a partial vector. Call vect_set_loop_condition
20531 instead of slpeel_make_loop_iterate_ntimes.
20532 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
20533 (check_load_store_masking): New function.
20534 (prepare_load_store_mask): Likewise.
20535 (vectorizable_store): Handle fully-masked loops.
20536 (vectorizable_load): Likewise.
20537 (supportable_widening_operation): Use vect_halve_mask_nunits for
20539 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
20540 (vect_gen_while): New function.
20541 * config/aarch64/aarch64.md (umax<mode>3): New expander.
20542 (aarch64_uqdec<mode>): New insn.
20544 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20545 Alan Hayward <alan.hayward@arm.com>
20546 David Sherwood <david.sherwood@arm.com>
20548 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
20549 (reduc_xor_scal_optab): New optabs.
20550 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
20551 (reduc_xor_scal_@var{m}): Document.
20552 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
20553 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
20554 internal functions.
20555 * fold-const-call.c (fold_const_call): Handle them.
20556 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
20557 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
20558 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
20559 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
20560 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
20561 (UNSPEC_XORV): New unspecs.
20562 (optab): Add entries for them.
20563 (BITWISEV): New int iterator.
20564 (bit_reduc_op): New int attributes.
20566 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20567 Alan Hayward <alan.hayward@arm.com>
20568 David Sherwood <david.sherwood@arm.com>
20570 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
20571 * internal-fn.def (VEC_SHL_INSERT): New internal function.
20572 * optabs.def (vec_shl_insert_optab): New optab.
20573 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
20574 (duplicate_and_interleave): Likewise.
20575 * tree-vect-loop.c: Include internal-fn.h.
20576 (neutral_op_for_slp_reduction): New function, split out from
20577 get_initial_defs_for_reduction.
20578 (get_initial_def_for_reduction): Handle option 2 for variable-length
20579 vectors by loading the neutral value into a vector and then shifting
20580 the initial value into element 0.
20581 (get_initial_defs_for_reduction): Replace the code argument with
20582 the neutral value calculated by neutral_op_for_slp_reduction.
20583 Use gimple_build_vector for constant-length vectors.
20584 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
20585 but the first group_size elements have a neutral value.
20586 Use duplicate_and_interleave otherwise.
20587 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
20588 Update call to get_initial_defs_for_reduction. Handle SLP
20589 reductions for variable-length vectors by creating one vector
20590 result for each scalar result, with the elements associated
20591 with other scalar results stubbed out with the neutral value.
20592 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
20593 Require IFN_VEC_SHL_INSERT for double reductions on
20594 variable-length vectors, or SLP reductions that have
20595 a neutral value. Require can_duplicate_and_interleave_p
20596 support for variable-length unchained SLP reductions if there
20597 is no neutral value, such as for MIN/MAX reductions. Also require
20598 the number of vector elements to be a multiple of the number of
20599 SLP statements when doing variable-length unchained SLP reductions.
20600 Update call to vect_create_epilog_for_reduction.
20601 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
20602 and remove initial values.
20603 (duplicate_and_interleave): Make public.
20604 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
20605 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
20607 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20608 Alan Hayward <alan.hayward@arm.com>
20609 David Sherwood <david.sherwood@arm.com>
20611 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
20612 (can_duplicate_and_interleave_p): New function.
20613 (vect_get_and_check_slp_defs): Take the vector of statements
20614 rather than just the current one. Remove excess parentheses.
20615 Restriction rejectinon of vect_constant_def and vect_external_def
20616 for variable-length vectors to boolean types, or types for which
20617 can_duplicate_and_interleave_p is false.
20618 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
20619 (duplicate_and_interleave): New function.
20620 (vect_get_constant_vectors): Use gimple_build_vector for
20621 constant-length vectors and suitable variable-length constant
20622 vectors. Use duplicate_and_interleave for other variable-length
20623 vectors. Don't defer the update when inserting new statements.
20625 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20626 Alan Hayward <alan.hayward@arm.com>
20627 David Sherwood <david.sherwood@arm.com>
20629 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
20630 min_profitable_iters doesn't go negative.
20632 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20633 Alan Hayward <alan.hayward@arm.com>
20634 David Sherwood <david.sherwood@arm.com>
20636 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
20637 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
20638 * optabs.def (vec_mask_load_lanes_optab): New optab.
20639 (vec_mask_store_lanes_optab): Likewise.
20640 * internal-fn.def (MASK_LOAD_LANES): New internal function.
20641 (MASK_STORE_LANES): Likewise.
20642 * internal-fn.c (mask_load_lanes_direct): New macro.
20643 (mask_store_lanes_direct): Likewise.
20644 (expand_mask_load_optab_fn): Handle masked operations.
20645 (expand_mask_load_lanes_optab_fn): New macro.
20646 (expand_mask_store_optab_fn): Handle masked operations.
20647 (expand_mask_store_lanes_optab_fn): New macro.
20648 (direct_mask_load_lanes_optab_supported_p): Likewise.
20649 (direct_mask_store_lanes_optab_supported_p): Likewise.
20650 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
20652 (vect_load_lanes_supported): Likewise.
20653 * tree-vect-data-refs.c (strip_conversion): New function.
20654 (can_group_stmts_p): Likewise.
20655 (vect_analyze_data_ref_accesses): Use it instead of checking
20656 for a pair of assignments.
20657 (vect_store_lanes_supported): Take a masked_p parameter.
20658 (vect_load_lanes_supported): Likewise.
20659 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
20660 vect_store_lanes_supported and vect_load_lanes_supported.
20661 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
20662 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
20663 parameter. Don't allow gaps for masked accesses.
20664 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
20665 and vect_load_lanes_supported.
20666 (get_load_store_type): Take a masked_p parameter and update
20667 call to get_group_load_store_type.
20668 (vectorizable_store): Update call to get_load_store_type.
20669 Handle IFN_MASK_STORE_LANES.
20670 (vectorizable_load): Update call to get_load_store_type.
20671 Handle IFN_MASK_LOAD_LANES.
20673 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20674 Alan Hayward <alan.hayward@arm.com>
20675 David Sherwood <david.sherwood@arm.com>
20677 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
20679 * config/aarch64/aarch64-protos.h
20680 (aarch64_sve_struct_memory_operand_p): Declare.
20681 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
20682 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
20683 (VPRED, vpred): Handle SVE structure modes.
20684 * config/aarch64/constraints.md (Utx): New constraint.
20685 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
20686 (aarch64_sve_struct_nonimmediate_operand): New predicates.
20687 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
20688 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
20689 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
20690 structure modes. Split into pieces after RA.
20691 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
20692 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
20694 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
20695 SVE structure modes.
20696 (aarch64_classify_address): Likewise.
20697 (sizetochar): Move earlier in file.
20698 (aarch64_print_operand): Handle SVE register lists.
20699 (aarch64_array_mode): New function.
20700 (aarch64_sve_struct_memory_operand_p): Likewise.
20701 (TARGET_ARRAY_MODE): Redefine.
20703 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20704 Alan Hayward <alan.hayward@arm.com>
20705 David Sherwood <david.sherwood@arm.com>
20707 * target.def (array_mode): New target hook.
20708 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
20709 * doc/tm.texi: Regenerate.
20710 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
20711 * hooks.c (hook_optmode_mode_uhwi_none): New function.
20712 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
20713 targetm.array_mode.
20714 * stor-layout.c (mode_for_array): Likewise. Support polynomial
20717 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20718 Alan Hayward <alan.hayward@arm.com>
20719 David Sherwood <david.sherwood@arm.com>
20721 * fold-const.c (fold_binary_loc): Check the argument types
20722 rather than the result type when testing for a vector operation.
20724 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20726 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
20727 * doc/tm.texi: Regenerate.
20729 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20730 Alan Hayward <alan.hayward@arm.com>
20731 David Sherwood <david.sherwood@arm.com>
20733 * doc/invoke.texi (-msve-vector-bits=): Document new option.
20734 (sve): Document new AArch64 extension.
20735 * doc/md.texi (w): Extend the description of the AArch64
20736 constraint to include SVE vectors.
20737 (Upl, Upa): Document new AArch64 predicate constraints.
20738 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
20740 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
20741 (msve-vector-bits=): New option.
20742 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
20743 SVE when these are disabled.
20744 (sve): New extension.
20745 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
20746 modes. Adjust their number of units based on aarch64_sve_vg.
20747 (MAX_BITSIZE_MODE_ANY_MODE): Define.
20748 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
20749 aarch64_addr_query_type.
20750 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
20751 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
20752 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
20753 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
20754 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
20755 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
20756 (aarch64_simd_imm_zero_p): Delete.
20757 (aarch64_check_zero_based_sve_index_immediate): Declare.
20758 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
20759 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
20760 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
20761 (aarch64_sve_float_mul_immediate_p): Likewise.
20762 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
20763 rather than an rtx.
20764 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
20765 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
20766 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
20767 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
20768 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
20769 (aarch64_regmode_natural_size): Likewise.
20770 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
20771 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
20773 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
20774 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
20775 for VG and the SVE predicate registers.
20776 (V_ALIASES): Add a "z"-prefixed alias.
20777 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
20778 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
20779 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
20780 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
20781 (REG_CLASS_NAMES): Add entries for them.
20782 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
20783 and the predicate registers.
20784 (aarch64_sve_vg): Declare.
20785 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
20786 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
20787 (REGMODE_NATURAL_SIZE): Define.
20788 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
20790 * config/aarch64/aarch64.c: Include cfgrtl.h.
20791 (simd_immediate_info): Add a constructor for series vectors,
20792 and an associated step field.
20793 (aarch64_sve_vg): New variable.
20794 (aarch64_dbx_register_number): Handle VG and the predicate registers.
20795 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
20796 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
20797 (VEC_ANY_DATA, VEC_STRUCT): New constants.
20798 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
20799 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
20800 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
20801 (aarch64_get_mask_mode): New functions.
20802 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
20803 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
20804 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
20805 predicate modes and predicate registers. Explicitly restrict
20806 GPRs to modes of 16 bytes or smaller. Only allow FP registers
20807 to store a vector mode if it is recognized by
20808 aarch64_classify_vector_mode.
20809 (aarch64_regmode_natural_size): New function.
20810 (aarch64_hard_regno_caller_save_mode): Return the original mode
20812 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
20813 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
20814 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
20815 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
20817 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
20818 does not overlap dest if the function is frame-related. Handle
20820 (aarch64_split_add_offset): New function.
20821 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
20822 them aarch64_add_offset.
20823 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
20824 and update call to aarch64_sub_sp.
20825 (aarch64_add_cfa_expression): New function.
20826 (aarch64_expand_prologue): Pass extra temporary registers to the
20827 functions above. Handle the case in which we need to emit new
20828 DW_CFA_expressions for registers that were originally saved
20829 relative to the stack pointer, but now have to be expressed
20830 relative to the frame pointer.
20831 (aarch64_output_mi_thunk): Pass extra temporary registers to the
20833 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
20834 IP0 and IP1 values for SVE frames.
20835 (aarch64_expand_vec_series): New function.
20836 (aarch64_expand_sve_widened_duplicate): Likewise.
20837 (aarch64_expand_sve_const_vector): Likewise.
20838 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
20839 Handle SVE constants. Use emit_move_insn to move a force_const_mem
20840 into the register, rather than emitting a SET directly.
20841 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
20842 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
20843 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
20844 (offset_9bit_signed_scaled_p): New functions.
20845 (aarch64_replicate_bitmask_imm): New function.
20846 (aarch64_bitmask_imm): Use it.
20847 (aarch64_cannot_force_const_mem): Reject expressions involving
20848 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
20849 (aarch64_classify_index): Handle SVE indices, by requiring
20850 a plain register index with a scale that matches the element size.
20851 (aarch64_classify_address): Handle SVE addresses. Assert that
20852 the mode of the address is VOIDmode or an integer mode.
20853 Update call to aarch64_classify_symbol.
20854 (aarch64_classify_symbolic_expression): Update call to
20855 aarch64_classify_symbol.
20856 (aarch64_const_vec_all_in_range_p): New function.
20857 (aarch64_print_vector_float_operand): Likewise.
20858 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
20859 "vN" for FP registers with SVE modes. Handle (const ...) vectors
20860 and the FP immediates 1.0 and 0.5.
20861 (aarch64_print_address_internal): Handle SVE addresses.
20862 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
20863 (aarch64_regno_regclass): Handle predicate registers.
20864 (aarch64_secondary_reload): Handle big-endian reloads of SVE
20866 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
20867 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
20868 (aarch64_convert_sve_vector_bits): New function.
20869 (aarch64_override_options): Use it to handle -msve-vector-bits=.
20870 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
20871 rather than an rtx.
20872 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
20873 Handle SVE vector and predicate modes. Accept VL-based constants
20874 that need only one temporary register, and VL offsets that require
20875 no temporary registers.
20876 (aarch64_conditional_register_usage): Mark the predicate registers
20877 as fixed if SVE isn't available.
20878 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
20879 Return true for SVE vector and predicate modes.
20880 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
20881 rather than an unsigned int. Handle SVE modes.
20882 (aarch64_preferred_simd_mode): Update call accordingly. Handle
20884 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
20886 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
20887 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
20888 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
20889 (aarch64_sve_float_mul_immediate_p): New functions.
20890 (aarch64_sve_valid_immediate): New function.
20891 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
20892 Explicitly reject structure modes. Check for INDEX constants.
20893 Handle PTRUE and PFALSE constants.
20894 (aarch64_check_zero_based_sve_index_immediate): New function.
20895 (aarch64_simd_imm_zero_p): Delete.
20896 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
20897 vector modes. Accept constants in the range of CNT[BHWD].
20898 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
20899 ask for an Advanced SIMD mode.
20900 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
20901 (aarch64_simd_vector_alignment): Handle SVE predicates.
20902 (aarch64_vectorize_preferred_vector_alignment): New function.
20903 (aarch64_simd_vector_alignment_reachable): Use it instead of
20905 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
20906 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
20908 (MAX_VECT_LEN): Delete.
20909 (expand_vec_perm_d): Add a vec_flags field.
20910 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
20911 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
20912 (aarch64_evpc_ext): Don't apply a big-endian lane correction
20914 (aarch64_evpc_rev): Rename to...
20915 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
20916 (aarch64_evpc_rev_global): New function.
20917 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
20918 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
20920 (aarch64_evpc_sve_tbl): New function.
20921 (aarch64_expand_vec_perm_const_1): Update after rename of
20922 aarch64_evpc_rev. Handle SVE permutes too, trying
20923 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
20924 than aarch64_evpc_tbl.
20925 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
20926 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
20927 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
20928 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
20929 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
20930 (aarch64_expand_sve_vcond): New functions.
20931 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
20932 of aarch64_vector_mode_p.
20933 (aarch64_dwarf_poly_indeterminate_value): New function.
20934 (aarch64_compute_pressure_classes): Likewise.
20935 (aarch64_can_change_mode_class): Likewise.
20936 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
20937 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
20938 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
20939 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
20940 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
20941 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
20942 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
20943 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
20945 (Dn, Dl, Dr): Accept const as well as const_vector.
20946 (Dz): Likewise. Compare against CONST0_RTX.
20947 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
20948 of "vector" where appropriate.
20949 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
20950 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
20951 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
20952 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
20953 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
20954 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
20955 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
20956 (v_int_equiv): Extend to SVE modes.
20957 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
20959 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
20960 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
20961 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
20962 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
20963 (SVE_COND_FP_CMP): New int iterators.
20964 (perm_hilo): Handle the new unpack unspecs.
20965 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
20967 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
20968 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
20969 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
20970 (aarch64_equality_operator, aarch64_constant_vector_operand)
20971 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
20972 (aarch64_sve_nonimmediate_operand): Likewise.
20973 (aarch64_sve_general_operand): Likewise.
20974 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
20975 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
20976 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
20977 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
20978 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
20979 (aarch64_sve_float_arith_immediate): Likewise.
20980 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
20981 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
20982 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
20983 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
20984 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
20985 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
20986 (aarch64_sve_float_arith_operand): Likewise.
20987 (aarch64_sve_float_arith_with_sub_operand): Likewise.
20988 (aarch64_sve_float_mul_operand): Likewise.
20989 (aarch64_sve_vec_perm_operand): Likewise.
20990 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
20991 (aarch64_mov_operand): Accept const_poly_int and const_vector.
20992 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
20993 as well as const_vector.
20994 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
20995 in file. Use CONST0_RTX and CONSTM1_RTX.
20996 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
20997 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
20998 Use aarch64_simd_imm_zero.
20999 * config/aarch64/aarch64-sve.md: New file.
21000 * config/aarch64/aarch64.md: Include it.
21001 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
21002 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
21003 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
21004 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
21005 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
21006 (sve): New attribute.
21007 (enabled): Disable instructions with the sve attribute unless
21009 (movqi, movhi): Pass CONST_POLY_INT operaneds through
21010 aarch64_expand_mov_immediate.
21011 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
21012 CNT[BHSD] immediates.
21013 (movti): Split CONST_POLY_INT moves into two halves.
21014 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
21015 Split additions that need a temporary here if the destination
21016 is the stack pointer.
21017 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
21018 (*add<mode>3_poly_1): New instruction.
21019 (set_clobber_cc): New expander.
21021 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21023 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
21024 parameter and use it instead of GET_MODE_SIZE (innermode). Use
21025 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
21026 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
21027 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
21028 Change innermode from fixed_mode_size to machine_mode.
21029 (simplify_subreg): Update call accordingly. Handle a constant-sized
21030 subreg of a variable-length CONST_VECTOR.
21032 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21033 Alan Hayward <alan.hayward@arm.com>
21034 David Sherwood <david.sherwood@arm.com>
21036 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
21037 (add_offset_to_base): New function, split out from...
21038 (create_mem_ref): ...here. When handling a scale other than 1,
21039 check first whether the address is valid without the offset.
21040 Add it into the base if so, leaving the index and scale as-is.
21042 2018-01-12 Jakub Jelinek <jakub@redhat.com>
21045 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
21046 fold_for_warn before checking if arg2 is INTEGER_CST.
21048 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
21050 * config/rs6000/predicates.md (load_multiple_operation): Delete.
21051 (store_multiple_operation): Delete.
21052 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
21053 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
21054 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
21055 guarded by TARGET_STRING.
21056 (rs6000_output_load_multiple): Delete.
21057 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
21058 OPTION_MASK_STRING / TARGET_STRING handling.
21059 (print_operand) <'N', 'O'>: Add comment that these are unused now.
21060 (const rs6000_opt_masks) <"string">: Change mask to 0.
21061 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
21062 (MASK_STRING): Delete.
21063 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
21065 (load_multiple): Delete.
21072 (store_multiple): Delete.
21079 (movmemsi_8reg): Delete.
21080 (corresponding unnamed define_insn): Delete.
21081 (movmemsi_6reg): Delete.
21082 (corresponding unnamed define_insn): Delete.
21083 (movmemsi_4reg): Delete.
21084 (corresponding unnamed define_insn): Delete.
21085 (movmemsi_2reg): Delete.
21086 (corresponding unnamed define_insn): Delete.
21087 (movmemsi_1reg): Delete.
21088 (corresponding unnamed define_insn): Delete.
21089 * config/rs6000/rs6000.opt (mno-string): New.
21090 (mstring): Replace by deprecation warning stub.
21091 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
21093 2018-01-12 Jakub Jelinek <jakub@redhat.com>
21095 * regrename.c (regrename_do_replace): If replacing the same
21096 reg multiple times, try to reuse last created gen_raw_REG.
21099 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
21100 main to workaround a bug in GDB.
21102 2018-01-12 Tom de Vries <tom@codesourcery.com>
21105 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
21107 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
21109 PR rtl-optimization/80481
21110 * ira-color.c (get_cap_member): New function.
21111 (allocnos_conflict_by_live_ranges_p): Use it.
21112 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
21113 (setup_slot_coalesced_allocno_live_ranges): Ditto.
21115 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
21118 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
21119 (*saddl_se_1): Ditto.
21120 (*ssubsi_1): Ditto.
21121 (*ssubl_se_1): Ditto.
21123 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
21125 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
21126 rather than wi::to_widest for DR_INITs.
21127 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
21128 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
21129 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
21131 (vect_analyze_group_access_1): Note that here.
21133 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
21135 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
21136 polynomial type sizes.
21138 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
21140 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
21141 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
21142 (gimple_add_tmp_var): Likewise.
21144 2018-01-12 Martin Liska <mliska@suse.cz>
21146 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
21147 (gimple_alloc_sizes): Likewise.
21148 (dump_gimple_statistics): Use PRIu64 in printf format.
21149 * gimple.h: Change uint64_t to int.
21151 2018-01-12 Martin Liska <mliska@suse.cz>
21153 * tree-core.h: Use uint64_t instead of int.
21154 * tree.c (tree_node_counts): Likewise.
21155 (tree_node_sizes): Likewise.
21156 (dump_tree_statistics): Use PRIu64 in printf format.
21158 2018-01-12 Martin Liska <mliska@suse.cz>
21160 * Makefile.in: As qsort_chk is implemented in vec.c, add
21161 vec.o to linkage of gencfn-macros.
21162 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
21163 passing the info to record_node_allocation_statistics.
21164 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
21166 * ggc-common.c (struct ggc_usage): Add operator== and use
21167 it in operator< and compare function.
21168 * mem-stats.h (struct mem_usage): Likewise.
21169 * vec.c (struct vec_usage): Remove operator< and compare
21170 function. Can be simply inherited.
21172 2018-01-12 Martin Jambor <mjambor@suse.cz>
21175 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
21176 * tree-ssa-math-opts.c: Include domwalk.h.
21177 (convert_mult_to_fma_1): New function.
21178 (fma_transformation_info): New type.
21179 (fma_deferring_state): Likewise.
21180 (cancel_fma_deferring): New function.
21181 (result_of_phi): Likewise.
21182 (last_fma_candidate_feeds_initial_phi): Likewise.
21183 (convert_mult_to_fma): Added deferring logic, split actual
21184 transformation to convert_mult_to_fma_1.
21185 (math_opts_dom_walker): New type.
21186 (math_opts_dom_walker::after_dom_children): New method, body moved
21187 here from pass_optimize_widening_mul::execute, added deferring logic
21189 (pass_optimize_widening_mul::execute): Moved most of code to
21190 math_opts_dom_walker::after_dom_children.
21191 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
21192 * config/i386/i386.c (ix86_option_override_internal): Added
21193 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
21195 2018-01-12 Richard Biener <rguenther@suse.de>
21198 * dwarf2out.c (gen_variable_die): Do not reset old_die for
21199 inline instance vars.
21201 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
21204 * config/rx/rx.c (rx_is_restricted_memory_address):
21205 Handle SUBREG case.
21207 2018-01-12 Richard Biener <rguenther@suse.de>
21209 PR tree-optimization/80846
21210 * target.def (split_reduction): New target hook.
21211 * targhooks.c (default_split_reduction): New function.
21212 * targhooks.h (default_split_reduction): Declare.
21213 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
21214 target requests first reduce vectors by combining low and high
21216 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
21217 (get_vectype_for_scalar_type_and_size): Export.
21218 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
21219 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
21220 * doc/tm.texi: Regenerate.
21221 * config/i386/i386.c (ix86_split_reduction): Implement
21222 TARGET_VECTORIZE_SPLIT_REDUCTION.
21224 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
21227 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
21228 in PIC mode except for TARGET_VXWORKS_RTP.
21229 * config/sparc/sparc.c: Include cfgrtl.h.
21230 (TARGET_INIT_PIC_REG): Define.
21231 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
21232 (sparc_pic_register_p): New predicate.
21233 (sparc_legitimate_address_p): Use it.
21234 (sparc_legitimize_pic_address): Likewise.
21235 (sparc_delegitimize_address): Likewise.
21236 (sparc_mode_dependent_address_p): Likewise.
21237 (gen_load_pcrel_sym): Remove 4th parameter.
21238 (load_got_register): Adjust call to above. Remove obsolete stuff.
21239 (sparc_expand_prologue): Do not call load_got_register here.
21240 (sparc_flat_expand_prologue): Likewise.
21241 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
21242 (sparc_use_pseudo_pic_reg): New function.
21243 (sparc_init_pic_reg): Likewise.
21244 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
21245 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
21247 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
21249 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
21250 Add item for branch_cost.
21252 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
21254 PR rtl-optimization/83565
21255 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
21256 not extend the result to a larger mode for rotate operations.
21257 (num_sign_bit_copies1): Likewise.
21259 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
21262 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
21264 Use values-Xc.o for -pedantic.
21265 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
21267 2018-01-12 Martin Liska <mliska@suse.cz>
21270 * ipa-devirt.c (final_warning_record::grow_type_warnings):
21272 (possible_polymorphic_call_targets): Use it.
21273 (ipa_devirt): Likewise.
21275 2018-01-12 Martin Liska <mliska@suse.cz>
21277 * profile-count.h (enum profile_quality): Use 0 as invalid
21278 enum value of profile_quality.
21280 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
21282 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
21283 -mext-string options.
21285 2018-01-12 Richard Biener <rguenther@suse.de>
21287 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
21288 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
21289 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
21291 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
21293 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
21295 * configure.ac (--with-long-double-format): Add support for the
21296 configuration option to change the default long double format on
21298 * config.gcc (powerpc*-linux*-*): Likewise.
21299 * configure: Regenerate.
21300 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
21301 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
21302 used without modification.
21304 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21306 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
21307 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
21308 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
21309 MISC_BUILTIN_SPEC_BARRIER.
21310 (rs6000_init_builtins): Likewise.
21311 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
21313 (speculation_barrier): New define_insn.
21314 * doc/extend.texi: Document __builtin_speculation_barrier.
21316 2018-01-11 Jakub Jelinek <jakub@redhat.com>
21319 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
21320 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
21321 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
21323 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
21324 integral modes instead of "ss" and "sd".
21325 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
21326 vectors with 32-bit and 64-bit elements.
21327 (vecdupssescalarmodesuffix): New mode attribute.
21328 (vec_dup<mode>): Use it.
21330 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
21333 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
21334 frame if argument is passed on stack.
21336 2018-01-11 Jakub Jelinek <jakub@redhat.com>
21339 * ree.c (combine_reaching_defs): Optimize also
21340 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
21341 reg2=any_extend(exp); reg1=reg2;, formatting fix.
21343 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
21345 PR middle-end/83189
21346 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
21348 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
21350 PR middle-end/83718
21351 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
21352 after they are computed.
21354 2018-01-11 Bin Cheng <bin.cheng@arm.com>
21356 PR tree-optimization/83695
21357 * gimple-loop-linterchange.cc
21358 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
21359 reset cached scev information after interchange.
21360 (pass_linterchange::execute): Remove call to scev_reset_htab.
21362 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21364 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
21365 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
21366 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
21367 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
21368 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
21369 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
21370 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
21371 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
21372 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
21373 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
21374 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
21375 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
21376 (V_lane_reg): Likewise.
21377 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
21379 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
21380 (vfmal_lane_low<mode>_intrinsic,
21381 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
21382 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
21383 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
21384 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
21385 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
21386 vfmsl_lane_high<mode>_intrinsic): New define_insns.
21388 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21390 * config/arm/arm-cpus.in (fp16fml): New feature.
21391 (ALL_SIMD): Add fp16fml.
21392 (armv8.2-a): Add fp16fml as an option.
21393 (armv8.3-a): Likewise.
21394 (armv8.4-a): Add fp16fml as part of fp16.
21395 * config/arm/arm.h (TARGET_FP16FML): Define.
21396 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
21398 * config/arm/arm-modes.def (V2HF): Define.
21399 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
21400 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
21401 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
21402 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
21403 vfmsl_low, vfmsl_high): New set of builtins.
21404 * config/arm/iterators.md (PLUSMINUS): New code iterator.
21405 (vfml_op): New code attribute.
21406 (VFMLHALVES): New int iterator.
21407 (VFML, VFMLSEL): New mode attributes.
21408 (V_reg): Define mapping for V2HF.
21409 (V_hi, V_lo): New mode attributes.
21410 (VF_constraint): Likewise.
21411 (vfml_half, vfml_half_selector): New int attributes.
21412 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
21414 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
21415 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
21417 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
21418 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
21419 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
21420 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
21422 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
21423 Document new effective target and option set.
21425 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21427 * config/arm/arm-cpus.in (armv8_4): New feature.
21428 (ARMv8_4a): New fgroup.
21429 (armv8.4-a): New arch.
21430 * config/arm/arm-tables.opt: Regenerate.
21431 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
21432 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
21433 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
21434 Add matching rules for -march=armv8.4-a and extensions.
21435 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
21437 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
21440 * config/rx/rx.md (BW): New mode attribute.
21441 (sync_lock_test_and_setsi): Add mode suffix to insn output.
21443 2018-01-11 Richard Biener <rguenther@suse.de>
21445 PR tree-optimization/83435
21446 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
21447 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
21448 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
21450 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21451 Alan Hayward <alan.hayward@arm.com>
21452 David Sherwood <david.sherwood@arm.com>
21454 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
21456 (aarch64_classify_address): Initialize it. Track polynomial offsets.
21457 (aarch64_print_address_internal): Use it to check for a zero offset.
21459 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21460 Alan Hayward <alan.hayward@arm.com>
21461 David Sherwood <david.sherwood@arm.com>
21463 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
21464 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
21465 Return a poly_int64 rather than a HOST_WIDE_INT.
21466 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
21467 rather than a HOST_WIDE_INT.
21468 * config/aarch64/aarch64.h (aarch64_frame): Protect with
21469 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
21470 hard_fp_offset, frame_size, initial_adjust, callee_offset and
21471 final_offset from HOST_WIDE_INT to poly_int64.
21472 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
21473 to_constant when getting the number of units in an Advanced SIMD
21475 (aarch64_builtin_vectorized_function): Check for a constant number
21477 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
21479 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
21480 attribute instead of GET_MODE_NUNITS.
21481 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
21482 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
21483 GET_MODE_SIZE for fixed-size registers.
21484 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
21485 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
21486 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
21487 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
21488 (aarch64_print_operand, aarch64_print_address_internal)
21489 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
21490 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
21491 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
21492 Handle polynomial GET_MODE_SIZE.
21493 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
21494 wider than SImode without modification.
21495 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
21496 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
21497 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
21498 passing and returning SVE modes.
21499 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
21500 rather than GEN_INT.
21501 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
21502 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
21503 (aarch64_allocate_and_probe_stack_space): Likewise.
21504 (aarch64_layout_frame): Cope with polynomial offsets.
21505 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
21506 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
21507 polynomial offsets.
21508 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
21509 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
21510 poly_int64 rather than a HOST_WIDE_INT.
21511 (aarch64_get_separate_components, aarch64_process_components)
21512 (aarch64_expand_prologue, aarch64_expand_epilogue)
21513 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
21514 (aarch64_anchor_offset): New function, split out from...
21515 (aarch64_legitimize_address): ...here.
21516 (aarch64_builtin_vectorization_cost): Handle polynomial
21517 TYPE_VECTOR_SUBPARTS.
21518 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
21520 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
21521 number of elements from the PARALLEL rather than the mode.
21522 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
21523 rather than GET_MODE_BITSIZE.
21524 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
21525 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
21526 (aarch64_expand_vec_perm_const_1): Handle polynomial
21527 d->perm.length () and d->perm elements.
21528 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
21529 Apply to_constant to d->perm elements.
21530 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
21531 polynomial CONST_VECTOR_NUNITS.
21532 (aarch64_move_pointer): Take amount as a poly_int64 rather
21534 (aarch64_progress_pointer): Avoid temporary variable.
21535 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
21536 the mode attribute instead of GET_MODE.
21538 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21539 Alan Hayward <alan.hayward@arm.com>
21540 David Sherwood <david.sherwood@arm.com>
21542 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
21543 x exists before using it.
21544 (aarch64_add_constant_internal): Rename to...
21545 (aarch64_add_offset_1): ...this. Replace regnum with separate
21546 src and dest rtxes. Handle the case in which they're different,
21547 including when the offset is zero. Replace scratchreg with an rtx.
21548 Use 2 additions if there is no spare register into which we can
21549 move a 16-bit constant.
21550 (aarch64_add_constant): Delete.
21551 (aarch64_add_offset): Replace reg with separate src and dest
21552 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
21553 Use aarch64_add_offset_1.
21554 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
21555 an rtx rather than an int. Take the delta as a poly_int64
21556 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
21557 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
21558 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
21559 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
21560 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
21561 and aarch64_add_sp.
21562 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
21563 aarch64_add_constant.
21565 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21567 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
21568 Use scalar_float_mode.
21570 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21572 * config/aarch64/aarch64-simd.md
21573 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
21574 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
21575 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
21576 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
21577 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
21578 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
21579 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
21580 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
21581 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
21582 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
21584 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21587 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
21588 targ_options->x_arm_arch_string is non NULL.
21590 2018-01-11 Tamar Christina <tamar.christina@arm.com>
21592 * config/aarch64/aarch64.h
21593 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
21595 2018-01-11 Sudakshina Das <sudi.das@arm.com>
21598 * expmed.c (emit_store_flag_force): Swap if const op0
21599 and change VOIDmode to mode of op0.
21601 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21603 PR rtl-optimization/83761
21604 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
21605 than bytes to mode_for_size.
21607 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
21609 PR middle-end/83189
21610 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
21611 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
21614 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
21616 PR middle-end/83575
21617 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
21618 when in layout mode.
21619 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
21620 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
21623 2018-01-10 Michael Collison <michael.collison@arm.com>
21625 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
21626 * config/aarch64/aarch64-option-extension.def: Add
21627 AARCH64_OPT_EXTENSION of 'fp16fml'.
21628 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21629 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
21630 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
21631 * config/aarch64/constraints.md (Ui7): New constraint.
21632 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
21633 (VFMLA_SEL_W): Ditto.
21636 (VFMLA16_LOW): New int iterator.
21637 (VFMLA16_HIGH): Ditto.
21638 (UNSPEC_FMLAL): New unspec.
21639 (UNSPEC_FMLSL): Ditto.
21640 (UNSPEC_FMLAL2): Ditto.
21641 (UNSPEC_FMLSL2): Ditto.
21642 (f16mac): New code attribute.
21643 * config/aarch64/aarch64-simd-builtins.def
21644 (aarch64_fmlal_lowv2sf): Ditto.
21645 (aarch64_fmlsl_lowv2sf): Ditto.
21646 (aarch64_fmlalq_lowv4sf): Ditto.
21647 (aarch64_fmlslq_lowv4sf): Ditto.
21648 (aarch64_fmlal_highv2sf): Ditto.
21649 (aarch64_fmlsl_highv2sf): Ditto.
21650 (aarch64_fmlalq_highv4sf): Ditto.
21651 (aarch64_fmlslq_highv4sf): Ditto.
21652 (aarch64_fmlal_lane_lowv2sf): Ditto.
21653 (aarch64_fmlsl_lane_lowv2sf): Ditto.
21654 (aarch64_fmlal_laneq_lowv2sf): Ditto.
21655 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
21656 (aarch64_fmlalq_lane_lowv4sf): Ditto.
21657 (aarch64_fmlsl_lane_lowv4sf): Ditto.
21658 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
21659 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
21660 (aarch64_fmlal_lane_highv2sf): Ditto.
21661 (aarch64_fmlsl_lane_highv2sf): Ditto.
21662 (aarch64_fmlal_laneq_highv2sf): Ditto.
21663 (aarch64_fmlsl_laneq_highv2sf): Ditto.
21664 (aarch64_fmlalq_lane_highv4sf): Ditto.
21665 (aarch64_fmlsl_lane_highv4sf): Ditto.
21666 (aarch64_fmlalq_laneq_highv4sf): Ditto.
21667 (aarch64_fmlsl_laneq_highv4sf): Ditto.
21668 * config/aarch64/aarch64-simd.md:
21669 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
21670 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
21671 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
21672 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
21673 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
21674 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
21675 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
21676 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
21677 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
21678 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
21679 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
21680 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
21681 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
21682 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
21683 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
21684 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
21685 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
21686 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
21687 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
21688 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
21689 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
21690 (vfmlsl_low_u32): Ditto.
21691 (vfmlalq_low_u32): Ditto.
21692 (vfmlslq_low_u32): Ditto.
21693 (vfmlal_high_u32): Ditto.
21694 (vfmlsl_high_u32): Ditto.
21695 (vfmlalq_high_u32): Ditto.
21696 (vfmlslq_high_u32): Ditto.
21697 (vfmlal_lane_low_u32): Ditto.
21698 (vfmlsl_lane_low_u32): Ditto.
21699 (vfmlal_laneq_low_u32): Ditto.
21700 (vfmlsl_laneq_low_u32): Ditto.
21701 (vfmlalq_lane_low_u32): Ditto.
21702 (vfmlslq_lane_low_u32): Ditto.
21703 (vfmlalq_laneq_low_u32): Ditto.
21704 (vfmlslq_laneq_low_u32): Ditto.
21705 (vfmlal_lane_high_u32): Ditto.
21706 (vfmlsl_lane_high_u32): Ditto.
21707 (vfmlal_laneq_high_u32): Ditto.
21708 (vfmlsl_laneq_high_u32): Ditto.
21709 (vfmlalq_lane_high_u32): Ditto.
21710 (vfmlslq_lane_high_u32): Ditto.
21711 (vfmlalq_laneq_high_u32): Ditto.
21712 (vfmlslq_laneq_high_u32): Ditto.
21713 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
21714 (AARCH64_FL_FOR_ARCH8_4): New.
21715 (AARCH64_ISA_F16FML): New ISA flag.
21716 (TARGET_F16FML): New feature flag for fp16fml.
21717 (doc/invoke.texi): Document new fp16fml option.
21719 2018-01-10 Michael Collison <michael.collison@arm.com>
21721 * config/aarch64/aarch64-builtins.c:
21722 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
21723 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21724 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
21725 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
21726 (AARCH64_ISA_SHA3): New ISA flag.
21727 (TARGET_SHA3): New feature flag for sha3.
21728 * config/aarch64/iterators.md (sha512_op): New int attribute.
21729 (CRYPTO_SHA512): New int iterator.
21730 (UNSPEC_SHA512H): New unspec.
21731 (UNSPEC_SHA512H2): Ditto.
21732 (UNSPEC_SHA512SU0): Ditto.
21733 (UNSPEC_SHA512SU1): Ditto.
21734 * config/aarch64/aarch64-simd-builtins.def
21735 (aarch64_crypto_sha512hqv2di): New builtin.
21736 (aarch64_crypto_sha512h2qv2di): Ditto.
21737 (aarch64_crypto_sha512su0qv2di): Ditto.
21738 (aarch64_crypto_sha512su1qv2di): Ditto.
21739 (aarch64_eor3qv8hi): Ditto.
21740 (aarch64_rax1qv2di): Ditto.
21741 (aarch64_xarqv2di): Ditto.
21742 (aarch64_bcaxqv8hi): Ditto.
21743 * config/aarch64/aarch64-simd.md:
21744 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
21745 (aarch64_crypto_sha512su0qv2di): Ditto.
21746 (aarch64_crypto_sha512su1qv2di): Ditto.
21747 (aarch64_eor3qv8hi): Ditto.
21748 (aarch64_rax1qv2di): Ditto.
21749 (aarch64_xarqv2di): Ditto.
21750 (aarch64_bcaxqv8hi): Ditto.
21751 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
21752 (vsha512h2q_u64): Ditto.
21753 (vsha512su0q_u64): Ditto.
21754 (vsha512su1q_u64): Ditto.
21755 (veor3q_u16): Ditto.
21756 (vrax1q_u64): Ditto.
21757 (vxarq_u64): Ditto.
21758 (vbcaxq_u16): Ditto.
21759 * config/arm/types.md (crypto_sha512): New type attribute.
21760 (crypto_sha3): Ditto.
21761 (doc/invoke.texi): Document new sha3 option.
21763 2018-01-10 Michael Collison <michael.collison@arm.com>
21765 * config/aarch64/aarch64-builtins.c:
21766 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
21767 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21768 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
21769 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
21770 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
21771 (AARCH64_ISA_SM4): New ISA flag.
21772 (TARGET_SM4): New feature flag for sm4.
21773 * config/aarch64/aarch64-simd-builtins.def
21774 (aarch64_sm3ss1qv4si): Ditto.
21775 (aarch64_sm3tt1aq4si): Ditto.
21776 (aarch64_sm3tt1bq4si): Ditto.
21777 (aarch64_sm3tt2aq4si): Ditto.
21778 (aarch64_sm3tt2bq4si): Ditto.
21779 (aarch64_sm3partw1qv4si): Ditto.
21780 (aarch64_sm3partw2qv4si): Ditto.
21781 (aarch64_sm4eqv4si): Ditto.
21782 (aarch64_sm4ekeyqv4si): Ditto.
21783 * config/aarch64/aarch64-simd.md:
21784 (aarch64_sm3ss1qv4si): Ditto.
21785 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
21786 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
21787 (aarch64_sm4eqv4si): Ditto.
21788 (aarch64_sm4ekeyqv4si): Ditto.
21789 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
21790 (sm3part_op): Ditto.
21791 (CRYPTO_SM3TT): Ditto.
21792 (CRYPTO_SM3PART): Ditto.
21793 (UNSPEC_SM3SS1): New unspec.
21794 (UNSPEC_SM3TT1A): Ditto.
21795 (UNSPEC_SM3TT1B): Ditto.
21796 (UNSPEC_SM3TT2A): Ditto.
21797 (UNSPEC_SM3TT2B): Ditto.
21798 (UNSPEC_SM3PARTW1): Ditto.
21799 (UNSPEC_SM3PARTW2): Ditto.
21800 (UNSPEC_SM4E): Ditto.
21801 (UNSPEC_SM4EKEY): Ditto.
21802 * config/aarch64/constraints.md (Ui2): New constraint.
21803 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
21804 * config/arm/types.md (crypto_sm3): New type attribute.
21805 (crypto_sm4): Ditto.
21806 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
21807 (vsm3tt1aq_u32): Ditto.
21808 (vsm3tt1bq_u32): Ditto.
21809 (vsm3tt2aq_u32): Ditto.
21810 (vsm3tt2bq_u32): Ditto.
21811 (vsm3partw1q_u32): Ditto.
21812 (vsm3partw2q_u32): Ditto.
21813 (vsm4eq_u32): Ditto.
21814 (vsm4ekeyq_u32): Ditto.
21815 (doc/invoke.texi): Document new sm4 option.
21817 2018-01-10 Michael Collison <michael.collison@arm.com>
21819 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
21820 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
21821 (AARCH64_FL_FOR_ARCH8_4): New.
21822 (AARCH64_FL_V8_4): New flag.
21823 (doc/invoke.texi): Document new armv8.4-a option.
21825 2018-01-10 Michael Collison <michael.collison@arm.com>
21827 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21828 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
21829 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
21830 * config/aarch64/aarch64-option-extension.def: Add
21831 AARCH64_OPT_EXTENSION of 'sha2'.
21832 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
21833 (crypto): Disable sha2 and aes if crypto disabled.
21834 (crypto): Enable aes and sha2 if enabled.
21835 (simd): Disable sha2 and aes if simd disabled.
21836 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
21838 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
21839 (TARGET_SHA2): New feature flag for sha2.
21840 (TARGET_AES): New feature flag for aes.
21841 * config/aarch64/aarch64-simd.md:
21842 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
21843 conditional on TARGET_AES.
21844 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
21845 (aarch64_crypto_sha1hsi): Make pattern conditional
21847 (aarch64_crypto_sha1hv4si): Ditto.
21848 (aarch64_be_crypto_sha1hv4si): Ditto.
21849 (aarch64_crypto_sha1su1v4si): Ditto.
21850 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
21851 (aarch64_crypto_sha1su0v4si): Ditto.
21852 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
21853 (aarch64_crypto_sha256su0v4si): Ditto.
21854 (aarch64_crypto_sha256su1v4si): Ditto.
21855 (doc/invoke.texi): Document new aes and sha2 options.
21857 2018-01-10 Martin Sebor <msebor@redhat.com>
21859 PR tree-optimization/83781
21860 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
21863 2018-01-11 Martin Sebor <msebor@gmail.com>
21864 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21866 PR tree-optimization/83501
21867 PR tree-optimization/81703
21869 * tree-ssa-strlen.c (get_string_cst): Rename...
21870 (get_string_len): ...to this. Handle global constants.
21871 (handle_char_store): Adjust.
21873 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
21874 Jim Wilson <jimw@sifive.com>
21876 * config/riscv/riscv-protos.h (riscv_output_return): New.
21877 * config/riscv/riscv.c (struct machine_function): New naked_p field.
21878 (riscv_attribute_table, riscv_output_return),
21879 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
21880 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
21881 (riscv_compute_frame_info): Only compute frame->mask if not a naked
21883 (riscv_expand_prologue): Add early return for naked function.
21884 (riscv_expand_epilogue): Likewise.
21885 (riscv_function_ok_for_sibcall): Return false for naked function.
21886 (riscv_set_current_function): New.
21887 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
21888 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
21889 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
21890 * doc/extend.texi (RISC-V Function Attributes): New.
21892 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
21894 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
21895 check for 128-bit long double before checking TCmode.
21896 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
21897 128-bit long doubles before checking TFmode or TCmode.
21898 (FLOAT128_IBM_P): Likewise.
21900 2018-01-10 Martin Sebor <msebor@redhat.com>
21902 PR tree-optimization/83671
21903 * builtins.c (c_strlen): Unconditionally return zero for the empty
21905 Use -Warray-bounds for warnings.
21906 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
21907 for non-constant array indices with COMPONENT_REF, arrays of
21908 arrays, and pointers to arrays.
21909 (gimple_fold_builtin_strlen): Determine and set length range for
21910 non-constant character arrays.
21912 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
21914 PR middle-end/81897
21915 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
21918 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
21920 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
21922 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
21925 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
21926 VECTOR_MEM_ALTIVEC_OR_VSX_P.
21927 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
21928 indexed_or_indirect_operand predicate.
21929 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
21930 (*vsx_le_perm_load_v8hi): Likewise.
21931 (*vsx_le_perm_load_v16qi): Likewise.
21932 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
21933 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
21934 (*vsx_le_perm_store_v8hi): Likewise.
21935 (*vsx_le_perm_store_v16qi): Likewise.
21936 (eight unnamed splitters): Likewise.
21938 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
21940 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
21941 * config/rs6000/emmintrin.h: Likewise.
21942 * config/rs6000/mmintrin.h: Likewise.
21943 * config/rs6000/xmmintrin.h: Likewise.
21945 2018-01-10 David Malcolm <dmalcolm@redhat.com>
21948 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
21950 * tree.c (tree_nop_conversion): Return true for location wrapper
21952 (maybe_wrap_with_location): New function.
21953 (selftest::check_strip_nops): New function.
21954 (selftest::test_location_wrappers): New function.
21955 (selftest::tree_c_tests): Call it.
21956 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
21957 (maybe_wrap_with_location): New decl.
21958 (EXPR_LOCATION_WRAPPER_P): New macro.
21959 (location_wrapper_p): New inline function.
21960 (tree_strip_any_location_wrapper): New inline function.
21962 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
21965 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
21966 stack_realign_offset for the largest alignment of stack slot
21968 (ix86_find_max_used_stack_alignment): New function.
21969 (ix86_finalize_stack_frame_flags): Use it. Set
21970 max_used_stack_alignment if we don't realign stack.
21971 * config/i386/i386.h (machine_function): Add
21972 max_used_stack_alignment.
21974 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
21976 * config/arm/arm.opt (-mbranch-cost): New option.
21977 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
21980 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
21983 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
21984 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
21986 2018-01-10 Richard Biener <rguenther@suse.de>
21989 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
21990 early out so it also covers the case where we have a non-NULL
21993 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
21995 PR tree-optimization/83753
21996 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
21997 for non-strided grouped accesses if the number of elements is 1.
21999 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22002 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
22003 * i386.h (TARGET_USE_GATHER): Define.
22004 * x86-tune.def (X86_TUNE_USE_GATHER): New.
22006 2018-01-10 Martin Liska <mliska@suse.cz>
22009 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
22010 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
22012 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
22013 CLEANUP_NO_PARTITIONING is not set.
22015 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
22017 * doc/rtl.texi: Remove documentation of (const ...) wrappers
22018 for vectors, as a partial revert of r254296.
22019 * rtl.h (const_vec_p): Delete.
22020 (const_vec_duplicate_p): Don't test for vector CONSTs.
22021 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
22022 * expmed.c (make_tree): Likewise.
22025 * common.md (E, F): Use CONSTANT_P instead of checking for
22027 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
22028 checking for CONST_VECTOR.
22030 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
22032 PR middle-end/83575
22033 * predict.c (force_edge_cold): Handle in more sane way edges
22034 with no prediction.
22036 2018-01-09 Carl Love <cel@us.ibm.com>
22038 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
22040 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
22041 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
22042 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
22043 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
22044 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
22045 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
22046 * config/rs6000/rs6000-protos.h: Add extern defition for
22047 rs6000_generate_float2_double_code.
22048 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
22050 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
22051 (float2_v2df): Add define_expand.
22053 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
22056 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
22057 op_mode in the force_to_mode call.
22059 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
22061 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
22062 instead of checking each element individually.
22063 (aarch64_evpc_uzp): Likewise.
22064 (aarch64_evpc_zip): Likewise.
22065 (aarch64_evpc_ext): Likewise.
22066 (aarch64_evpc_rev): Likewise.
22067 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
22068 instead of checking each element individually. Return true without
22070 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
22071 whether all selected elements come from the same input, instead of
22072 checking each element individually. Remove calls to gen_rtx_REG,
22073 start_sequence and end_sequence and instead assert that no rtl is
22076 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
22078 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
22079 order of HIGH and CONST checks.
22081 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
22083 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
22084 if the destination isn't an SSA_NAME.
22086 2018-01-09 Richard Biener <rguenther@suse.de>
22088 PR tree-optimization/83668
22089 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
22091 (canonicalize_loop_form): ... here, renamed from ...
22092 (canonicalize_loop_closed_ssa_form): ... this and amended to
22093 swap successor edges for loop exit blocks to make us use
22094 the RPO order we need for initial schedule generation.
22096 2018-01-09 Joseph Myers <joseph@codesourcery.com>
22098 PR tree-optimization/64811
22099 * match.pd: When optimizing comparisons with Inf, avoid
22100 introducing or losing exceptions from comparisons with NaN.
22102 2018-01-09 Martin Liska <mliska@suse.cz>
22105 * asan.c (shadow_mem_size): Add gcc_assert.
22107 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
22109 Don't save registers in main().
22112 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
22113 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
22114 * config/avr/avr.c (avr_set_current_function): Don't error if
22115 naked, OS_task or OS_main are specified at the same time.
22116 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
22118 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
22120 * common/config/avr/avr-common.c (avr_option_optimization_table):
22121 Switch on -mmain-is-OS_task for optimizing compilations.
22123 2018-01-09 Richard Biener <rguenther@suse.de>
22125 PR tree-optimization/83572
22126 * graphite.c: Include cfganal.h.
22127 (graphite_transform_loops): Connect infinite loops to exit
22128 and remove fake edges at the end.
22130 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
22132 * ipa-inline.c (edge_badness): Revert accidental checkin.
22134 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
22137 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
22138 symbols; not inline clones.
22140 2018-01-09 Jakub Jelinek <jakub@redhat.com>
22143 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
22144 hard registers. Formatting fixes.
22146 PR preprocessor/83722
22147 * gcc.c (try_generate_repro): Pass
22148 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
22149 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
22152 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
22153 Kito Cheng <kito.cheng@gmail.com>
22155 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
22156 (riscv_leaf_function_p): Delete.
22157 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
22159 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22161 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
22163 (do_ifelse): New function.
22164 (do_isel): New function.
22165 (do_sub3): New function.
22166 (do_add3): New function.
22167 (do_load_mask_compare): New function.
22168 (do_overlap_load_compare): New function.
22169 (expand_compare_loop): New function.
22170 (expand_block_compare): Call expand_compare_loop() when appropriate.
22171 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
22172 option description.
22173 (-mblock-compare-inline-loop-limit): New option.
22175 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22178 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
22179 Reverse order of second and third operands in first alternative.
22180 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
22181 of first and second elements in UNSPEC_VPERMR vector.
22182 (altivec_expand_vec_perm_le): Likewise.
22184 2018-01-08 Jeff Law <law@redhat.com>
22186 PR rtl-optimizatin/81308
22187 * tree-switch-conversion.c (cfg_altered): New file scoped static.
22188 (process_switch): If group_case_labels makes a change, then set
22190 (pass_convert_switch::execute): If a switch is converted, then
22191 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
22193 PR rtl-optimization/81308
22194 * recog.c (split_all_insns): Conditionally cleanup the CFG after
22197 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
22199 PR target/83663 - Revert r255946
22200 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
22201 generation for cases where splatting a value is not useful.
22202 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
22203 across a vec_duplicate and a paradoxical subreg forming a vector
22204 mode to a vec_concat.
22206 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22208 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
22209 -march=armv8.3-a variants.
22210 * config/arm/t-multilib: Likewise.
22211 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
22213 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22215 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
22217 (cceq_ior_compare_complement): Give it a name so I can use it, and
22218 change boolean_or_operator predicate to boolean_operator so it can
22219 be used to generate a crand.
22220 (eqne): New code iterator.
22221 (bd/bd_neg): New code_attrs.
22222 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
22223 a single define_insn.
22224 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
22225 decrement (bdnzt/bdnzf/bdzt/bdzf).
22226 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
22227 with the new names of the branch decrement patterns, and added the
22228 names of the branch decrement conditional patterns.
22230 2018-01-08 Richard Biener <rguenther@suse.de>
22232 PR tree-optimization/83563
22233 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
22236 2018-01-08 Richard Biener <rguenther@suse.de>
22238 PR middle-end/83713
22239 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
22241 2018-01-08 Richard Biener <rguenther@suse.de>
22243 PR tree-optimization/83685
22244 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
22245 references to abnormals.
22247 2018-01-08 Richard Biener <rguenther@suse.de>
22250 * dwarf2out.c (output_indirect_strings): Handle empty
22251 skeleton_debug_str_hash.
22252 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
22254 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
22256 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
22257 (emit_store_direct): Likewise.
22258 (arc_trampoline_adjust_address): Likewise.
22259 (arc_asm_trampoline_template): New function.
22260 (arc_initialize_trampoline): Use asm_trampoline_template.
22261 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
22262 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
22263 * config/arc/arc.md (flush_icache): Delete pattern.
22265 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
22267 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
22268 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
22271 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
22274 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
22275 by not USED_FOR_TARGET.
22276 (make_pass_resolve_sw_modes): Likewise.
22278 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
22280 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
22283 2018-01-08 Richard Biener <rguenther@suse.de>
22285 PR middle-end/83580
22286 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
22288 2018-01-08 Richard Biener <rguenther@suse.de>
22290 PR middle-end/83517
22291 * match.pd ((t * 2) / 2) -> t): Add missing :c.
22293 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
22295 PR middle-end/81897
22296 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
22297 basic blocks with a small number of successors.
22298 (convert_control_dep_chain_into_preds): Improve handling of
22300 (dump_predicates): Split apart into...
22301 (dump_pred_chain): ...here...
22302 (dump_pred_info): ...and here.
22303 (can_one_predicate_be_invalidated_p): Add debugging printfs.
22304 (can_chain_union_be_invalidated_p): Improve check for invalidation
22306 (uninit_uses_cannot_happen): Avoid unnecessary if
22307 convert_control_dep_chain_into_preds yielded nothing.
22309 2018-01-06 Martin Sebor <msebor@redhat.com>
22311 PR tree-optimization/83640
22312 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
22313 subtracting negative offset from size.
22314 (builtin_access::overlap): Adjust offset bounds of the access to fall
22315 within the size of the object if possible.
22317 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
22319 PR rtl-optimization/83699
22320 * expmed.c (extract_bit_field_1): Restrict the vector usage of
22321 extract_bit_field_as_subreg to cases in which the extracted
22322 value is also a vector.
22324 * lra-constraints.c (process_alt_operands): Test for the equivalence
22325 substitutions when detecting a possible reload cycle.
22327 2018-01-06 Jakub Jelinek <jakub@redhat.com>
22330 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
22331 by default if flag_selective_schedling{,2}. Formatting fixes.
22333 PR rtl-optimization/83682
22334 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
22335 if it has non-VECTOR_MODE element mode.
22336 (vec_duplicate_p): Likewise.
22338 PR middle-end/83694
22339 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
22340 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
22342 2018-01-05 Jakub Jelinek <jakub@redhat.com>
22345 * config/i386/i386-builtin.def
22346 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
22347 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
22348 Require also OPTION_MASK_ISA_AVX512F in addition to
22349 OPTION_MASK_ISA_GFNI.
22350 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
22351 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
22352 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
22353 to OPTION_MASK_ISA_GFNI.
22354 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
22355 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
22356 OPTION_MASK_ISA_AVX512BW.
22357 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
22358 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
22359 addition to OPTION_MASK_ISA_GFNI.
22360 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
22361 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
22362 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
22363 to OPTION_MASK_ISA_GFNI.
22364 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
22365 a requirement for all ISAs rather than any of them with a few
22367 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
22369 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
22370 bitmasks to be enabled with 3 exceptions, instead of requiring any
22371 enabled ISA with lots of exceptions.
22372 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
22373 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
22374 Change avx512bw in isa attribute to avx512f.
22375 * config/i386/sgxintrin.h: Add license boilerplate.
22376 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
22377 to __AVX512F__ and __AVX512VL to __AVX512VL__.
22378 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
22379 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
22381 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
22382 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
22383 temporarily sse2 rather than sse if not enabled already.
22386 * config/i386/sse.md (VI248_VLBW): Rename to ...
22387 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
22388 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
22389 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
22390 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
22391 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
22392 mode iterator instead of VI248_VLBW.
22394 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
22396 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
22397 (record_modified): Skip clobbers; add debug output.
22398 (param_change_prob): Use sreal frequencies.
22400 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
22402 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
22403 punt for user-aligned variables.
22405 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
22407 * tree-chrec.c (chrec_contains_symbols): Return true for
22410 2018-01-05 Sudakshina Das <sudi.das@arm.com>
22413 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
22414 of (x|y) == x for BICS pattern.
22416 2018-01-05 Jakub Jelinek <jakub@redhat.com>
22418 PR tree-optimization/83605
22419 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
22420 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
22423 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
22425 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
22426 * config/epiphany/rtems.h: New file.
22428 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22429 Uros Bizjak <ubizjak@gmail.com>
22432 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
22433 QIreg_operand instead of register_operand predicate.
22434 * config/i386/i386.c (ix86_rop_should_change_byte_p,
22435 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
22436 comments instead of -fmitigate[-_]rop.
22438 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22441 * cgraphunit.c (symbol_table::compile): Switch to text_section
22442 before calling assembly_start debug hook.
22443 * run-rtl-passes.c (run_rtl_passes): Likewise.
22446 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22448 * tree-vrp.c (extract_range_from_binary_expr_1): Check
22449 range_int_cst_p rather than !symbolic_range_p before calling
22450 extract_range_from_multiplicative_op_1.
22452 2018-01-04 Jeff Law <law@redhat.com>
22454 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
22455 redundant test in assertion.
22457 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22459 * doc/rtl.texi: Document machine_mode wrapper classes.
22461 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22463 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
22464 using tree_to_uhwi.
22466 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22468 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
22469 the VEC_PERM_EXPR fold to fail.
22471 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22474 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
22475 to switched_sections.
22477 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22480 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
22481 test for d.testing.
22483 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
22486 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
22487 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
22489 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22492 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
22493 is BLKmode and bitpos not zero or mode change is needed.
22495 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22498 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
22501 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
22504 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
22505 instead of MULT rtx. Update all corresponding splitters.
22506 (*saddl_se): Ditto.
22507 (*ssub<modesuffix>): Ditto.
22508 (*ssubl_se): Ditto.
22509 (*cmp_sadd_di): Update split patterns.
22510 (*cmp_sadd_si): Ditto.
22511 (*cmp_sadd_sidi): Ditto.
22512 (*cmp_ssub_di): Ditto.
22513 (*cmp_ssub_si): Ditto.
22514 (*cmp_ssub_sidi): Ditto.
22515 * config/alpha/predicates.md (const23_operand): New predicate.
22516 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
22517 Look for ASHIFT, not MULT inner operand.
22518 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
22520 2018-01-04 Martin Liska <mliska@suse.cz>
22522 PR gcov-profile/83669
22523 * gcov.c (output_intermediate_file): Add version to intermediate
22525 * doc/gcov.texi: Document new field 'version' in intermediate
22526 file format. Fix location of '-k' option of gcov command.
22528 2018-01-04 Martin Liska <mliska@suse.cz>
22531 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
22533 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22535 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
22537 2018-01-03 Martin Sebor <msebor@redhat.com>
22539 PR tree-optimization/83655
22540 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
22541 checking calls with invalid arguments.
22543 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22545 * tree-vect-stmts.c (vect_get_store_rhs): New function.
22546 (vectorizable_mask_load_store): Delete.
22547 (vectorizable_call): Return false for masked loads and stores.
22548 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
22549 instead of gimple_assign_rhs1.
22550 (vectorizable_load): Handle IFN_MASK_LOAD.
22551 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
22553 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22555 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
22557 (vectorizable_mask_load_store): ...here.
22558 (vectorizable_load): ...and here.
22560 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22562 * tree-vect-stmts.c (vect_build_all_ones_mask)
22563 (vect_build_zero_merge_argument): New functions, split out from...
22564 (vectorizable_load): ...here.
22566 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22568 * tree-vect-stmts.c (vect_check_store_rhs): New function,
22570 (vectorizable_mask_load_store): ...here.
22571 (vectorizable_store): ...and here.
22573 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22575 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
22577 (vectorizable_mask_load_store): ...here.
22579 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22581 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
22582 (vect_model_store_cost): Take a vec_load_store_type instead of a
22584 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
22585 (vect_model_store_cost): Take a vec_load_store_type instead of a
22587 (vectorizable_mask_load_store): Update accordingly.
22588 (vectorizable_store): Likewise.
22589 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
22591 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22593 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
22594 IFN_MASK_LOAD calls here rather than...
22595 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
22597 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22598 Alan Hayward <alan.hayward@arm.com>
22599 David Sherwood <david.sherwood@arm.com>
22601 * expmed.c (extract_bit_field_1): For vector extracts,
22602 fall back to extract_bit_field_as_subreg if vec_extract
22605 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22606 Alan Hayward <alan.hayward@arm.com>
22607 David Sherwood <david.sherwood@arm.com>
22609 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
22610 they are variable or constant sized.
22611 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
22612 slots for constant-sized data.
22614 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22615 Alan Hayward <alan.hayward@arm.com>
22616 David Sherwood <david.sherwood@arm.com>
22618 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
22619 handling COND_EXPRs with boolean comparisons, try to find a better
22620 basis for the mask type than the boolean itself.
22622 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22624 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
22625 is calculated and how it can be overridden.
22626 * genmodes.c (max_bitsize_mode_any_mode): New variable.
22627 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
22629 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
22632 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22633 Alan Hayward <alan.hayward@arm.com>
22634 David Sherwood <david.sherwood@arm.com>
22636 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
22637 Remove the mode argument.
22638 (aarch64_simd_valid_immediate): Remove the mode and inverse
22640 * config/aarch64/iterators.md (bitsize): New iterator.
22641 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
22642 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
22643 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
22644 aarch64_simd_valid_immediate.
22645 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
22646 (aarch64_reg_or_bic_imm): Likewise.
22647 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
22648 with an insn_type enum and msl with a modifier_type enum.
22649 Replace element_width with a scalar_mode. Change the shift
22650 to unsigned int. Add constructors for scalar_float_mode and
22651 scalar_int_mode elements.
22652 (aarch64_vect_float_const_representable_p): Delete.
22653 (aarch64_can_const_movi_rtx_p)
22654 (aarch64_simd_scalar_immediate_valid_for_move)
22655 (aarch64_simd_make_constant): Update call to
22656 aarch64_simd_valid_immediate.
22657 (aarch64_advsimd_valid_immediate_hs): New function.
22658 (aarch64_advsimd_valid_immediate): Likewise.
22659 (aarch64_simd_valid_immediate): Remove mode and inverse
22660 arguments. Rewrite to use the above. Use const_vec_duplicate_p
22661 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
22662 and aarch64_float_const_representable_p on the result.
22663 (aarch64_output_simd_mov_immediate): Remove mode argument.
22664 Update call to aarch64_simd_valid_immediate and use of
22665 simd_immediate_info.
22666 (aarch64_output_scalar_simd_mov_immediate): Update call
22669 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22670 Alan Hayward <alan.hayward@arm.com>
22671 David Sherwood <david.sherwood@arm.com>
22673 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
22674 (mode_nunits): Likewise CONST_MODE_NUNITS.
22675 * machmode.def (ADJUST_NUNITS): Document.
22676 * genmodes.c (mode_data::need_nunits_adj): New field.
22677 (blank_mode): Update accordingly.
22678 (adj_nunits): New variable.
22679 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
22681 (emit_mode_size_inline): Set need_bytesize_adj for all modes
22682 listed in adj_nunits.
22683 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
22684 listed in adj_nunits. Don't emit case statements for such modes.
22685 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
22686 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
22687 nothing if adj_nunits is nonnull.
22688 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
22689 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
22690 (emit_mode_fbit): Update use of print_maybe_const_decl.
22691 (emit_move_size): Likewise. Treat the array as non-const
22693 (emit_mode_adjustments): Handle adj_nunits.
22695 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22697 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
22698 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
22699 (VECTOR_MODES): Use it.
22700 (make_vector_modes): Take the prefix as an argument.
22702 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22703 Alan Hayward <alan.hayward@arm.com>
22704 David Sherwood <david.sherwood@arm.com>
22706 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
22707 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
22708 for MODE_VECTOR_BOOL.
22709 * machmode.def (VECTOR_BOOL_MODE): Document.
22710 * genmodes.c (VECTOR_BOOL_MODE): New macro.
22711 (make_vector_bool_mode): New function.
22712 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
22714 * lto-streamer-in.c (lto_input_mode_table): Likewise.
22715 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
22717 * stor-layout.c (int_mode_for_mode): Likewise.
22718 * tree.c (build_vector_type_for_mode): Likewise.
22719 * varasm.c (output_constant_pool_2): Likewise.
22720 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
22721 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
22722 for MODE_VECTOR_BOOL.
22723 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
22724 of mode class checks.
22725 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
22726 instead of a list of mode class checks.
22727 (expand_vector_scalar_condition): Likewise.
22728 (type_for_widest_vector_mode): Handle BImode as an inner mode.
22730 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22731 Alan Hayward <alan.hayward@arm.com>
22732 David Sherwood <david.sherwood@arm.com>
22734 * machmode.h (mode_size): Change from unsigned short to
22736 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
22737 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
22738 or if measurement_type is not polynomial.
22739 (fixed_size_mode::includes_p): Check for constant-sized modes.
22740 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
22741 return a poly_uint16 rather than an unsigned short.
22742 (emit_mode_size): Change the type of mode_size from unsigned short
22743 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
22744 (emit_mode_adjustments): Cope with polynomial vector sizes.
22745 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22747 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22749 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
22750 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
22751 * caller-save.c (setup_save_areas): Likewise.
22752 (replace_reg_with_saved_mem): Likewise.
22753 * calls.c (emit_library_call_value_1): Likewise.
22754 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
22755 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
22756 (gen_lowpart_for_combine): Likewise.
22757 * convert.c (convert_to_integer_1): Likewise.
22758 * cse.c (equiv_constant, cse_insn): Likewise.
22759 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
22760 (cselib_subst_to_values): Likewise.
22761 * dce.c (word_dce_process_block): Likewise.
22762 * df-problems.c (df_word_lr_mark_ref): Likewise.
22763 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
22764 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
22765 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
22766 (rtl_for_decl_location): Likewise.
22767 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
22768 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
22769 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
22770 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
22771 (expand_expr_real_1): Likewise.
22772 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
22773 (pad_below): Likewise.
22774 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
22775 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
22776 * ira.c (get_subreg_tracking_sizes): Likewise.
22777 * ira-build.c (ira_create_allocno_objects): Likewise.
22778 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
22779 (ira_sort_regnos_for_alter_reg): Likewise.
22780 * ira-costs.c (record_operand_costs): Likewise.
22781 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
22782 (resolve_simple_move): Likewise.
22783 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
22784 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
22785 (lra_constraints): Likewise.
22786 (CONST_POOL_OK_P): Reject variable-sized modes.
22787 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
22788 (add_pseudo_to_slot, lra_spill): Likewise.
22789 * omp-low.c (omp_clause_aligned_alignment): Likewise.
22790 * optabs-query.c (get_best_extraction_insn): Likewise.
22791 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
22792 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
22793 (expand_mult_highpart, valid_multiword_target_p): Likewise.
22794 * recog.c (offsettable_address_addr_space_p): Likewise.
22795 * regcprop.c (maybe_mode_change): Likewise.
22796 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
22797 * regrename.c (build_def_use): Likewise.
22798 * regstat.c (dump_reg_info): Likewise.
22799 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
22800 (find_reloads, find_reloads_subreg_address): Likewise.
22801 * reload1.c (eliminate_regs_1): Likewise.
22802 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
22803 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
22804 (simplify_binary_operation_1, simplify_subreg): Likewise.
22805 * targhooks.c (default_function_arg_padding): Likewise.
22806 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
22807 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
22808 (verify_gimple_assign_ternary): Likewise.
22809 * tree-inline.c (estimate_move_cost): Likewise.
22810 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22811 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
22812 (get_address_cost_ainc): Likewise.
22813 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
22814 (vect_supportable_dr_alignment): Likewise.
22815 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
22816 (vectorizable_reduction): Likewise.
22817 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
22818 (vectorizable_operation, vectorizable_load): Likewise.
22819 * tree.c (build_same_sized_truth_vector_type): Likewise.
22820 * valtrack.c (cleanup_auto_inc_dec): Likewise.
22821 * var-tracking.c (emit_note_insn_var_location): Likewise.
22822 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
22823 (ADDR_VEC_ALIGN): Likewise.
22825 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22826 Alan Hayward <alan.hayward@arm.com>
22827 David Sherwood <david.sherwood@arm.com>
22829 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
22831 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
22832 or if measurement_type is polynomial.
22833 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
22834 * combine.c (make_extraction): Likewise.
22835 * dse.c (find_shift_sequence): Likewise.
22836 * dwarf2out.c (mem_loc_descriptor): Likewise.
22837 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
22838 (extract_bit_field, extract_low_bits): Likewise.
22839 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
22840 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
22841 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
22842 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
22843 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
22844 * reload.c (find_reloads): Likewise.
22845 * reload1.c (alter_reg): Likewise.
22846 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
22847 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
22848 * tree-if-conv.c (predicate_mem_writes): Likewise.
22849 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
22850 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
22851 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
22852 * valtrack.c (dead_debug_insert_temp): Likewise.
22853 * varasm.c (mergeable_constant_section): Likewise.
22854 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
22856 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22857 Alan Hayward <alan.hayward@arm.com>
22858 David Sherwood <david.sherwood@arm.com>
22860 * expr.c (expand_assignment): Cope with polynomial mode sizes
22861 when assigning to a CONCAT.
22863 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22864 Alan Hayward <alan.hayward@arm.com>
22865 David Sherwood <david.sherwood@arm.com>
22867 * machmode.h (mode_precision): Change from unsigned short to
22869 (mode_to_precision): Return a poly_uint16 rather than an unsigned
22871 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
22872 or if measurement_type is not polynomial.
22873 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
22874 in which the mode is already known to be a scalar_int_mode.
22875 * genmodes.c (emit_mode_precision): Change the type of mode_precision
22876 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
22878 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22879 for GET_MODE_PRECISION.
22880 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22881 for GET_MODE_PRECISION.
22882 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
22884 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
22885 (expand_field_assignment, make_extraction): Likewise.
22886 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
22887 (get_last_value): Likewise.
22888 * convert.c (convert_to_integer_1): Likewise.
22889 * cse.c (cse_insn): Likewise.
22890 * expr.c (expand_expr_real_1): Likewise.
22891 * lra-constraints.c (simplify_operand_subreg): Likewise.
22892 * optabs-query.c (can_atomic_load_p): Likewise.
22893 * optabs.c (expand_atomic_load): Likewise.
22894 (expand_atomic_store): Likewise.
22895 * ree.c (combine_reaching_defs): Likewise.
22896 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
22897 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
22898 * tree.h (type_has_mode_precision_p): Likewise.
22899 * ubsan.c (instrument_si_overflow): Likewise.
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 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
22906 polynomial numbers of units.
22907 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
22908 (valid_vector_subparts_p): New function.
22909 (build_vector_type): Remove temporary shim and take the number
22910 of units as a poly_uint64 rather than an int.
22911 (build_opaque_vector_type): Take the number of units as a
22912 poly_uint64 rather than an int.
22913 * tree.c (build_vector_from_ctor): Handle polynomial
22914 TYPE_VECTOR_SUBPARTS.
22915 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
22916 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
22917 (build_vector_from_val): If the number of units is variable,
22918 use build_vec_duplicate_cst for constant operands and
22919 VEC_DUPLICATE_EXPR otherwise.
22920 (make_vector_type): Remove temporary is_constant ().
22921 (build_vector_type, build_opaque_vector_type): Take the number of
22922 units as a poly_uint64 rather than an int.
22923 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
22925 * cfgexpand.c (expand_debug_expr): Likewise.
22926 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
22927 (store_constructor, expand_expr_real_1): Likewise.
22928 (const_scalar_mask_from_tree): Likewise.
22929 * fold-const-call.c (fold_const_reduction): Likewise.
22930 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
22931 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
22932 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
22933 (fold_relational_const): Likewise.
22934 (native_interpret_vector): Likewise. Change the size from an
22935 int to an unsigned int.
22936 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
22937 TYPE_VECTOR_SUBPARTS.
22938 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
22939 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
22940 duplicating a non-constant operand into a variable-length vector.
22941 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
22942 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
22943 * ipa-icf.c (sem_variable::equals): Likewise.
22944 * match.pd: Likewise.
22945 * omp-simd-clone.c (simd_clone_subparts): Likewise.
22946 * print-tree.c (print_node): Likewise.
22947 * stor-layout.c (layout_type): Likewise.
22948 * targhooks.c (default_builtin_vectorization_cost): Likewise.
22949 * tree-cfg.c (verify_gimple_comparison): Likewise.
22950 (verify_gimple_assign_binary): Likewise.
22951 (verify_gimple_assign_ternary): Likewise.
22952 (verify_gimple_assign_single): Likewise.
22953 * tree-pretty-print.c (dump_generic_node): Likewise.
22954 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22955 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
22956 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
22957 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
22958 (vect_shift_permute_load_chain): Likewise.
22959 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
22960 (expand_vector_condition, optimize_vector_constructor): Likewise.
22961 (lower_vec_perm, get_compute_type): Likewise.
22962 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
22963 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
22964 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
22965 (vect_recog_mask_conversion_pattern): Likewise.
22966 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
22967 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
22968 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22969 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
22970 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
22971 (vectorizable_shift, vectorizable_operation, vectorizable_store)
22972 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
22973 (supportable_widening_operation): Likewise.
22974 (supportable_narrowing_operation): Likewise.
22975 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
22977 * varasm.c (output_constant): Likewise.
22979 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22980 Alan Hayward <alan.hayward@arm.com>
22981 David Sherwood <david.sherwood@arm.com>
22983 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
22984 so that both the length == 3 and length != 3 cases set up their
22985 own permute vectors. Add comments explaining why we know the
22986 number of elements is constant.
22987 (vect_permute_load_chain): Likewise.
22989 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22990 Alan Hayward <alan.hayward@arm.com>
22991 David Sherwood <david.sherwood@arm.com>
22993 * machmode.h (mode_nunits): Change from unsigned char to
22995 (ONLY_FIXED_SIZE_MODES): New macro.
22996 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
22997 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
22998 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
23000 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
23001 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
23002 or if measurement_type is not polynomial.
23003 * genmodes.c (ZERO_COEFFS): New macro.
23004 (emit_mode_nunits_inline): Make mode_nunits_inline return a
23006 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
23007 Use ZERO_COEFFS when emitting initializers.
23008 * data-streamer.h (bp_pack_poly_value): New function.
23009 (bp_unpack_poly_value): Likewise.
23010 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23011 for GET_MODE_NUNITS.
23012 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23013 for GET_MODE_NUNITS.
23014 * tree.c (make_vector_type): Remove temporary shim and make
23015 the real function take the number of units as a poly_uint64
23016 rather than an int.
23017 (build_vector_type_for_mode): Handle polynomial nunits.
23018 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
23019 * emit-rtl.c (const_vec_series_p_1): Likewise.
23020 (gen_rtx_CONST_VECTOR): Likewise.
23021 * fold-const.c (test_vec_duplicate_folding): Likewise.
23022 * genrecog.c (validate_pattern): Likewise.
23023 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
23024 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
23025 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
23026 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
23027 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
23028 * rtlanal.c (subreg_get_info): Likewise.
23029 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23030 (vect_grouped_load_supported): Likewise.
23031 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
23032 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
23033 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
23034 (simplify_const_unary_operation, simplify_binary_operation_1)
23035 (simplify_const_binary_operation, simplify_ternary_operation)
23036 (test_vector_ops_duplicate, test_vector_ops): Likewise.
23037 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
23038 instead of CONST_VECTOR_NUNITS.
23039 * varasm.c (output_constant_pool_2): Likewise.
23040 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
23041 explicit-encoded elements in the XVEC for variable-length vectors.
23043 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23045 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
23047 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23048 Alan Hayward <alan.hayward@arm.com>
23049 David Sherwood <david.sherwood@arm.com>
23051 * coretypes.h (fixed_size_mode): Declare.
23052 (fixed_size_mode_pod): New typedef.
23053 * builtins.h (target_builtins::x_apply_args_mode)
23054 (target_builtins::x_apply_result_mode): Change type to
23055 fixed_size_mode_pod.
23056 * builtins.c (apply_args_size, apply_result_size, result_vector)
23057 (expand_builtin_apply_args_1, expand_builtin_apply)
23058 (expand_builtin_return): Update accordingly.
23060 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23062 * cse.c (hash_rtx_cb): Hash only the encoded elements.
23063 * cselib.c (cselib_hash_rtx): Likewise.
23064 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
23065 CONST_VECTOR encoding.
23067 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23068 Jeff Law <law@redhat.com>
23071 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
23072 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
23073 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
23074 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
23077 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
23078 explicitly probe *sp in a noreturn function if there were any callee
23079 register saves or frame pointer is needed.
23081 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23084 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
23085 BLKmode for ternary, binary or unary expressions.
23088 * var-tracking.c (delete_vta_debug_insn): New inline function.
23089 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
23090 insns from get_insns () to NULL instead of each bb separately.
23091 Use delete_vta_debug_insn. No longer static.
23092 (vt_debug_insns_local, variable_tracking_main_1): Adjust
23093 delete_vta_debug_insns callers.
23094 * rtl.h (delete_vta_debug_insns): Declare.
23095 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
23096 instead of variable_tracking_main.
23098 2018-01-03 Martin Sebor <msebor@redhat.com>
23100 PR tree-optimization/83603
23101 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
23102 arguments past the endof the argument list in functions declared
23103 without a prototype.
23104 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
23105 Avoid checking when arguments are null.
23107 2018-01-03 Martin Sebor <msebor@redhat.com>
23110 * doc/extend.texi (attribute const): Fix a typo.
23111 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
23112 issuing -Wsuggest-attribute for void functions.
23114 2018-01-03 Martin Sebor <msebor@redhat.com>
23116 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
23117 offset_int::from instead of wide_int::to_shwi.
23118 (maybe_diag_overlap): Remove assertion.
23119 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
23120 * gimple-ssa-sprintf.c (format_directive): Same.
23121 (parse_directive): Same.
23122 (sprintf_dom_walker::compute_format_length): Same.
23123 (try_substitute_return_value): Same.
23125 2018-01-03 Jeff Law <law@redhat.com>
23127 PR middle-end/83654
23128 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
23129 non-constant residual for zero at runtime and avoid probing in
23130 that case. Reorganize code for trailing problem to mirror handling
23133 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23135 PR tree-optimization/83501
23136 * tree-ssa-strlen.c (get_string_cst): New.
23137 (handle_char_store): Call get_string_cst.
23139 2018-01-03 Martin Liska <mliska@suse.cz>
23141 PR tree-optimization/83593
23142 * tree-ssa-strlen.c: Include tree-cfg.h.
23143 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
23144 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
23145 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
23147 (strlen_dom_walker::before_dom_children): Call
23148 gimple_purge_dead_eh_edges. Dump tranformation with details
23150 (strlen_dom_walker::before_dom_children): Update call by adding
23151 new argument cleanup_eh.
23152 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
23154 2018-01-03 Martin Liska <mliska@suse.cz>
23157 * cif-code.def (VARIADIC_THUNK): New enum value.
23158 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
23161 2018-01-03 Jan Beulich <jbeulich@suse.com>
23163 * sse.md (mov<mode>_internal): Tighten condition for when to use
23164 vmovdqu<ssescalarsize> for TI and OI modes.
23166 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23168 Update copyright years.
23170 2018-01-03 Martin Liska <mliska@suse.cz>
23173 * ipa-visibility.c (function_and_variable_visibility): Skip
23174 functions with noipa attribure.
23176 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23178 * gcc.c (process_command): Update copyright notice dates.
23179 * gcov-dump.c (print_version): Ditto.
23180 * gcov.c (print_version): Ditto.
23181 * gcov-tool.c (print_version): Ditto.
23182 * gengtype.c (create_file): Ditto.
23183 * doc/cpp.texi: Bump @copying's copyright year.
23184 * doc/cppinternals.texi: Ditto.
23185 * doc/gcc.texi: Ditto.
23186 * doc/gccint.texi: Ditto.
23187 * doc/gcov.texi: Ditto.
23188 * doc/install.texi: Ditto.
23189 * doc/invoke.texi: Ditto.
23191 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23193 * vector-builder.h (vector_builder::m_full_nelts): Change from
23194 unsigned int to poly_uint64.
23195 (vector_builder::full_nelts): Update prototype accordingly.
23196 (vector_builder::new_vector): Likewise.
23197 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
23198 (vector_builder::operator ==): Likewise.
23199 (vector_builder::finalize): Likewise.
23200 * int-vector-builder.h (int_vector_builder::int_vector_builder):
23201 Take the number of elements as a poly_uint64 rather than an
23203 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
23204 from unsigned int to poly_uint64.
23205 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
23206 (vec_perm_indices::new_vector): Likewise.
23207 (vec_perm_indices::length): Likewise.
23208 (vec_perm_indices::nelts_per_input): Likewise.
23209 (vec_perm_indices::input_nelts): Likewise.
23210 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
23211 number of elements per input as a poly_uint64 rather than an
23212 unsigned int. Use the original encoding for variable-length
23213 vectors, rather than clamping each individual element.
23214 For the second and subsequent elements in each pattern,
23215 clamp the step and base before clamping their sum.
23216 (vec_perm_indices::series_p): Handle polynomial element counts.
23217 (vec_perm_indices::all_in_range_p): Likewise.
23218 (vec_perm_indices_to_tree): Likewise.
23219 (vec_perm_indices_to_rtx): Likewise.
23220 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
23221 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
23222 (tree_vector_builder::new_binary_operation): Handle polynomial
23223 element counts. Return false if we need to know the number
23224 of elements at compile time.
23225 * fold-const.c (fold_vec_perm): Punt if the number of elements
23226 isn't known at compile time.
23228 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23230 * vec-perm-indices.h (vec_perm_builder): Change element type
23231 from HOST_WIDE_INT to poly_int64.
23232 (vec_perm_indices::element_type): Update accordingly.
23233 (vec_perm_indices::clamp): Handle polynomial element_types.
23234 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
23235 (vec_perm_indices::all_in_range_p): Likewise.
23236 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
23238 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
23239 polynomial vec_perm_indices element types.
23240 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
23241 * fold-const.c (fold_vec_perm): Likewise.
23242 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
23243 * tree-vect-generic.c (lower_vec_perm): Likewise.
23244 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
23245 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
23246 element type to HOST_WIDE_INT.
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 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
23253 rather than an int. Use plus_constant.
23254 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
23255 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
23257 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23258 Alan Hayward <alan.hayward@arm.com>
23259 David Sherwood <david.sherwood@arm.com>
23261 * calls.c (emit_call_1, expand_call): Change struct_value_size from
23262 a HOST_WIDE_INT to a poly_int64.
23264 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23265 Alan Hayward <alan.hayward@arm.com>
23266 David Sherwood <david.sherwood@arm.com>
23268 * calls.c (load_register_parameters): Cope with polynomial
23269 mode sizes. Require a constant size for BLKmode parameters
23270 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
23271 forces a parameter to be padded at the lsb end in order to
23272 fill a complete number of words, require the parameter size
23273 to be ordered wrt UNITS_PER_WORD.
23275 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23276 Alan Hayward <alan.hayward@arm.com>
23277 David Sherwood <david.sherwood@arm.com>
23279 * reload1.c (spill_stack_slot_width): Change element type
23280 from unsigned int to poly_uint64_pod.
23281 (alter_reg): Treat mode sizes as polynomial.
23283 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23284 Alan Hayward <alan.hayward@arm.com>
23285 David Sherwood <david.sherwood@arm.com>
23287 * reload.c (complex_word_subreg_p): New function.
23288 (reload_inner_reg_of_subreg, push_reload): Use it.
23290 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23291 Alan Hayward <alan.hayward@arm.com>
23292 David Sherwood <david.sherwood@arm.com>
23294 * lra-constraints.c (process_alt_operands): Reject matched
23295 operands whose sizes aren't ordered.
23296 (match_reload): Refer to this check here.
23298 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23299 Alan Hayward <alan.hayward@arm.com>
23300 David Sherwood <david.sherwood@arm.com>
23302 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
23303 that the mode size is in the set {1, 2, 4, 8, 16}.
23305 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23306 Alan Hayward <alan.hayward@arm.com>
23307 David Sherwood <david.sherwood@arm.com>
23309 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
23310 Use plus_constant instead of gen_rtx_PLUS.
23312 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23313 Alan Hayward <alan.hayward@arm.com>
23314 David Sherwood <david.sherwood@arm.com>
23316 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
23317 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
23318 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
23319 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
23320 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
23321 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
23322 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
23323 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
23324 * config/i386/i386.c (ix86_push_rounding): ...this new function.
23325 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
23327 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
23328 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
23329 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
23330 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
23331 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
23332 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
23333 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
23334 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
23335 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
23336 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
23338 * expr.c (emit_move_resolve_push): Treat the input and result
23339 of PUSH_ROUNDING as a poly_int64.
23340 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
23341 (emit_push_insn): Likewise.
23342 * lra-eliminations.c (mark_not_eliminable): Likewise.
23343 * recog.c (push_operand): Likewise.
23344 * reload1.c (elimination_effects): Likewise.
23345 * rtlanal.c (nonzero_bits1): Likewise.
23346 * calls.c (store_one_arg): Likewise. Require the padding to be
23347 known at compile time.
23349 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23350 Alan Hayward <alan.hayward@arm.com>
23351 David Sherwood <david.sherwood@arm.com>
23353 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
23354 Use plus_constant instead of gen_rtx_PLUS.
23356 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23357 Alan Hayward <alan.hayward@arm.com>
23358 David Sherwood <david.sherwood@arm.com>
23360 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
23361 rather than an int.
23363 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23364 Alan Hayward <alan.hayward@arm.com>
23365 David Sherwood <david.sherwood@arm.com>
23367 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
23368 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
23369 via stack temporaries. Treat the mode size as polynomial too.
23371 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23372 Alan Hayward <alan.hayward@arm.com>
23373 David Sherwood <david.sherwood@arm.com>
23375 * expr.c (expand_expr_real_2): When handling conversions involving
23376 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
23377 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
23378 as a poly_uint64 too.
23380 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23381 Alan Hayward <alan.hayward@arm.com>
23382 David Sherwood <david.sherwood@arm.com>
23384 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
23386 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23387 Alan Hayward <alan.hayward@arm.com>
23388 David Sherwood <david.sherwood@arm.com>
23390 * combine.c (can_change_dest_mode): Handle polynomial
23391 REGMODE_NATURAL_SIZE.
23392 * expmed.c (store_bit_field_1): Likewise.
23393 * expr.c (store_constructor): Likewise.
23394 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
23395 and polynomial REGMODE_NATURAL_SIZE.
23396 (gen_lowpart_common): Likewise.
23397 * reginfo.c (record_subregs_of_mode): Likewise.
23398 * rtlanal.c (read_modify_subreg_p): Likewise.
23400 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23401 Alan Hayward <alan.hayward@arm.com>
23402 David Sherwood <david.sherwood@arm.com>
23404 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
23405 numbers of elements.
23407 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23408 Alan Hayward <alan.hayward@arm.com>
23409 David Sherwood <david.sherwood@arm.com>
23411 * match.pd: Cope with polynomial numbers of vector elements.
23413 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23414 Alan Hayward <alan.hayward@arm.com>
23415 David Sherwood <david.sherwood@arm.com>
23417 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
23418 in a POINTER_PLUS_EXPR.
23420 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23421 Alan Hayward <alan.hayward@arm.com>
23422 David Sherwood <david.sherwood@arm.com>
23424 * omp-simd-clone.c (simd_clone_subparts): New function.
23425 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
23426 (ipa_simd_modify_function_body): Likewise.
23428 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23429 Alan Hayward <alan.hayward@arm.com>
23430 David Sherwood <david.sherwood@arm.com>
23432 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
23433 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
23434 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
23435 (expand_vector_condition, vector_element): Likewise.
23436 (subparts_gt): New function.
23437 (get_compute_type): Use subparts_gt.
23438 (count_type_subparts): Delete.
23439 (expand_vector_operations_1): Use subparts_gt instead of
23440 count_type_subparts.
23442 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23443 Alan Hayward <alan.hayward@arm.com>
23444 David Sherwood <david.sherwood@arm.com>
23446 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
23447 (vect_compile_time_alias): ...this new function. Do the calculation
23448 on poly_ints rather than trees.
23449 (vect_prune_runtime_alias_test_list): Update call accordingly.
23451 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23452 Alan Hayward <alan.hayward@arm.com>
23453 David Sherwood <david.sherwood@arm.com>
23455 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
23457 (vect_schedule_slp_instance): Likewise.
23459 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23460 Alan Hayward <alan.hayward@arm.com>
23461 David Sherwood <david.sherwood@arm.com>
23463 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
23464 constant and extern definitions for variable-length vectors.
23465 (vect_get_constant_vectors): Note that the number of units
23466 is known to be constant.
23468 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23469 Alan Hayward <alan.hayward@arm.com>
23470 David Sherwood <david.sherwood@arm.com>
23472 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
23473 of units as polynomial. Choose between WIDE and NARROW based
23476 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23477 Alan Hayward <alan.hayward@arm.com>
23478 David Sherwood <david.sherwood@arm.com>
23480 * tree-vect-stmts.c (simd_clone_subparts): New function.
23481 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
23483 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23484 Alan Hayward <alan.hayward@arm.com>
23485 David Sherwood <david.sherwood@arm.com>
23487 * tree-vect-stmts.c (vectorizable_call): Treat the number of
23488 vectors as polynomial. Use build_index_vector for
23489 IFN_GOMP_SIMD_LANE.
23491 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23492 Alan Hayward <alan.hayward@arm.com>
23493 David Sherwood <david.sherwood@arm.com>
23495 * tree-vect-stmts.c (get_load_store_type): Treat the number of
23496 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
23497 for variable-length vectors.
23498 (vectorizable_mask_load_store): Treat the number of units as
23499 polynomial, asserting that it is constant if the condition has
23500 already been enforced.
23501 (vectorizable_store, vectorizable_load): Likewise.
23503 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23504 Alan Hayward <alan.hayward@arm.com>
23505 David Sherwood <david.sherwood@arm.com>
23507 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
23508 of units as polynomial. Punt if we can't tell at compile time
23509 which vector contains the final result.
23511 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23512 Alan Hayward <alan.hayward@arm.com>
23513 David Sherwood <david.sherwood@arm.com>
23515 * tree-vect-loop.c (vectorizable_induction): Treat the number
23516 of units as polynomial. Punt on SLP inductions. Use an integer
23517 VEC_SERIES_EXPR for variable-length integer reductions. Use a
23518 cast of such a series for variable-length floating-point
23521 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23522 Alan Hayward <alan.hayward@arm.com>
23523 David Sherwood <david.sherwood@arm.com>
23525 * tree.h (build_index_vector): Declare.
23526 * tree.c (build_index_vector): New function.
23527 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
23528 of units as polynomial, forcibly converting it to a constant if
23529 vectorizable_reduction has already enforced the condition.
23530 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
23531 to create a {1,2,3,...} vector.
23532 (vectorizable_reduction): Treat the number of units as polynomial.
23533 Choose vectype_in based on the largest scalar element size rather
23534 than the smallest number of units. Enforce the restrictions
23537 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23538 Alan Hayward <alan.hayward@arm.com>
23539 David Sherwood <david.sherwood@arm.com>
23541 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
23542 number of units as polynomial.
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 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
23549 * target.def (autovectorize_vector_sizes): Return the vector sizes
23550 by pointer, using vector_sizes rather than a bitmask.
23551 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
23552 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
23553 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
23555 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
23556 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
23557 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
23558 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
23559 * omp-general.c (omp_max_vf): Likewise.
23560 * omp-low.c (omp_clause_aligned_alignment): Likewise.
23561 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
23562 * tree-vect-loop.c (vect_analyze_loop): Likewise.
23563 * tree-vect-slp.c (vect_slp_bb): Likewise.
23564 * doc/tm.texi: Regenerate.
23565 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
23567 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
23568 the vector size as a poly_uint64 rather than an unsigned int.
23569 (current_vector_size): Change from an unsigned int to a poly_uint64.
23570 (get_vectype_for_scalar_type): Update accordingly.
23571 * tree.h (build_truth_vector_type): Take the size and number of
23572 units as a poly_uint64 rather than an unsigned int.
23573 (build_vector_type): Add a temporary overload that takes
23574 the number of units as a poly_uint64 rather than an unsigned int.
23575 * tree.c (make_vector_type): Likewise.
23576 (build_truth_vector_type): Take the number of units as a poly_uint64
23577 rather than an unsigned int.
23579 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23580 Alan Hayward <alan.hayward@arm.com>
23581 David Sherwood <david.sherwood@arm.com>
23583 * target.def (get_mask_mode): Take the number of units and length
23584 as poly_uint64s rather than unsigned ints.
23585 * targhooks.h (default_get_mask_mode): Update accordingly.
23586 * targhooks.c (default_get_mask_mode): Likewise.
23587 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
23588 * doc/tm.texi: Regenerate.
23590 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23591 Alan Hayward <alan.hayward@arm.com>
23592 David Sherwood <david.sherwood@arm.com>
23594 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
23595 * omp-general.c (omp_max_vf): Likewise.
23596 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
23597 (expand_omp_simd): Handle polynomial safelen.
23598 * omp-low.c (omplow_simd_context): Add a default constructor.
23599 (omplow_simd_context::max_vf): Change from int to poly_uint64.
23600 (lower_rec_simd_input_clauses): Update accordingly.
23601 (lower_rec_input_clauses): Likewise.
23603 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23604 Alan Hayward <alan.hayward@arm.com>
23605 David Sherwood <david.sherwood@arm.com>
23607 * tree-vectorizer.h (vect_nunits_for_cost): New function.
23608 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
23609 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
23610 (vect_analyze_slp_cost): Likewise.
23611 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
23612 (vect_model_load_cost): Likewise.
23614 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23615 Alan Hayward <alan.hayward@arm.com>
23616 David Sherwood <david.sherwood@arm.com>
23618 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
23619 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
23620 from an unsigned int * to a poly_uint64_pod *.
23621 (calculate_unrolling_factor): New function.
23622 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
23624 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23625 Alan Hayward <alan.hayward@arm.com>
23626 David Sherwood <david.sherwood@arm.com>
23628 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
23629 from an unsigned int to a poly_uint64.
23630 (_loop_vec_info::slp_unrolling_factor): Likewise.
23631 (_loop_vec_info::vectorization_factor): Change from an int
23633 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
23634 (vect_get_num_vectors): New function.
23635 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
23636 (vect_get_num_copies): Use vect_get_num_vectors.
23637 (vect_analyze_data_ref_dependences): Change max_vf from an int *
23638 to an unsigned int *.
23639 (vect_analyze_data_refs): Change min_vf from an int * to a
23641 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
23642 than an unsigned HOST_WIDE_INT.
23643 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
23644 (vect_analyze_data_ref_dependence): Change max_vf from an int *
23645 to an unsigned int *.
23646 (vect_analyze_data_ref_dependences): Likewise.
23647 (vect_compute_data_ref_alignment): Handle polynomial vf.
23648 (vect_enhance_data_refs_alignment): Likewise.
23649 (vect_prune_runtime_alias_test_list): Likewise.
23650 (vect_shift_permute_load_chain): Likewise.
23651 (vect_supportable_dr_alignment): Likewise.
23652 (dependence_distance_ge_vf): Take the vectorization factor as a
23653 poly_uint64 rather than an unsigned HOST_WIDE_INT.
23654 (vect_analyze_data_refs): Change min_vf from an int * to a
23656 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
23657 vfm1 as a poly_uint64 rather than an int. Make the same change
23658 for the returned bound_scalar.
23659 (vect_gen_vector_loop_niters): Handle polynomial vf.
23660 (vect_do_peeling): Likewise. Update call to
23661 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
23662 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
23664 * tree-vect-loop.c (vect_determine_vectorization_factor)
23665 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
23666 (vect_get_known_peeling_cost): Likewise.
23667 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
23668 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
23669 (vect_transform_loop): Likewise. Use the lowest possible VF when
23670 updating the upper bounds of the loop.
23671 (vect_min_worthwhile_factor): Make static. Return an unsigned int
23672 rather than an int.
23673 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
23674 polynomial unroll factors.
23675 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
23676 (vect_make_slp_decision): Likewise.
23677 (vect_supported_load_permutation_p): Likewise, and polynomial
23679 (vect_analyze_slp_cost): Handle polynomial vf.
23680 (vect_slp_analyze_node_operations): Likewise.
23681 (vect_slp_analyze_bb_1): Likewise.
23682 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
23683 than an unsigned HOST_WIDE_INT.
23684 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
23685 (vectorizable_load): Handle polynomial vf.
23686 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
23688 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
23690 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23691 Alan Hayward <alan.hayward@arm.com>
23692 David Sherwood <david.sherwood@arm.com>
23694 * match.pd: Handle bit operations involving three constants
23695 and try to fold one pair.
23697 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23699 * tree-vect-loop-manip.c: Include gimple-fold.h.
23700 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
23701 niters_maybe_zero parameters. Handle other cases besides a step of 1.
23702 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
23703 Add a path that uses a step of VF instead of 1, but disable it
23705 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
23706 and niters_no_overflow parameters. Update calls to
23707 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
23708 Create a new SSA name if the latter choses to use a ste other
23709 than zero, and return it via niters_vector_mult_vf_var.
23710 * tree-vect-loop.c (vect_transform_loop): Update calls to
23711 vect_do_peeling, vect_gen_vector_loop_niters and
23712 slpeel_make_loop_iterate_ntimes.
23713 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
23714 (vect_gen_vector_loop_niters): Update declarations after above changes.
23716 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
23718 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
23719 128-bit round to integer instructions.
23720 (ceil<mode>2): Likewise.
23721 (btrunc<mode>2): Likewise.
23722 (round<mode>2): Likewise.
23724 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23726 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
23727 unaligned VSX load/store on P8/P9.
23728 (expand_block_clear): Allow the use of unaligned VSX
23729 load/store on P8/P9.
23731 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23733 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
23735 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
23736 swap associated with both a load and a store.
23738 2018-01-02 Andrew Waterman <andrew@sifive.com>
23740 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
23741 * config/riscv/riscv.md (clear_cache): Use it.
23743 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
23745 * web.c: Remove out-of-date comment.
23747 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23749 * expr.c (fixup_args_size_notes): Check that any existing
23750 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
23751 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
23752 (emit_single_push_insn): ...here.
23754 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23756 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
23757 (const_vector_encoded_nelts): New function.
23758 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
23759 (const_vector_int_elt, const_vector_elt): Declare.
23760 * emit-rtl.c (const_vector_int_elt_1): New function.
23761 (const_vector_elt): Likewise.
23762 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
23763 of CONST_VECTOR_ELT.
23765 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23767 * expr.c: Include rtx-vector-builder.h.
23768 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
23769 directly on the tree encoding.
23770 (const_vector_from_tree): Likewise.
23771 * optabs.c: Include rtx-vector-builder.h.
23772 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
23773 sequence of "u" values.
23774 * vec-perm-indices.c: Include rtx-vector-builder.h.
23775 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
23776 directly on the vec_perm_indices encoding.
23778 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23780 * doc/rtl.texi (const_vector): Describe new encoding scheme.
23781 * Makefile.in (OBJS): Add rtx-vector-builder.o.
23782 * rtx-vector-builder.h: New file.
23783 * rtx-vector-builder.c: Likewise.
23784 * rtl.h (rtx_def::u2): Add a const_vector field.
23785 (CONST_VECTOR_NPATTERNS): New macro.
23786 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
23787 (CONST_VECTOR_DUPLICATE_P): Likewise.
23788 (CONST_VECTOR_STEPPED_P): Likewise.
23789 (CONST_VECTOR_ENCODED_ELT): Likewise.
23790 (const_vec_duplicate_p): Check for a duplicated vector encoding.
23791 (unwrap_const_vec_duplicate): Likewise.
23792 (const_vec_series_p): Check for a non-duplicated vector encoding.
23793 Say that the function only returns true for integer vectors.
23794 * emit-rtl.c: Include rtx-vector-builder.h.
23795 (gen_const_vec_duplicate_1): Delete.
23796 (gen_const_vector): Call gen_const_vec_duplicate instead of
23797 gen_const_vec_duplicate_1.
23798 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
23799 (gen_const_vec_duplicate): Use rtx_vector_builder.
23800 (gen_const_vec_series): Likewise.
23801 (gen_rtx_CONST_VECTOR): Likewise.
23802 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
23803 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
23804 Build a new vector rather than modifying a CONST_VECTOR in-place.
23805 (handle_special_swappables): Update call accordingly.
23806 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
23807 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
23808 Build a new vector rather than modifying a CONST_VECTOR in-place.
23809 (handle_special_swappables): Update call accordingly.
23811 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23813 * simplify-rtx.c (simplify_const_binary_operation): Use
23814 CONST_VECTOR_ELT instead of XVECEXP.
23816 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23818 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
23819 the selector elements to be different from the data elements
23820 if the selector is a VECTOR_CST.
23821 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
23822 ssizetype for the selector.
23824 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23826 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
23827 before testing each element individually.
23828 * tree-vect-generic.c (lower_vec_perm): Likewise.
23830 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23832 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
23833 * selftest-run-tests.c (selftest::run_tests): Call it.
23834 * vector-builder.h (vector_builder::operator ==): New function.
23835 (vector_builder::operator !=): Likewise.
23836 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
23837 (vec_perm_indices::all_from_input_p): New function.
23838 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
23839 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
23840 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
23841 instead of reading the VECTOR_CST directly. Detect whether both
23842 vector inputs are the same before constructing the vec_perm_indices,
23843 and update the number of inputs argument accordingly. Use the
23844 utility functions added above. Only construct sel2 if we need to.
23846 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23848 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
23849 the broadcast of the low byte.
23850 (expand_mult_highpart): Use an explicit encoding for the permutes.
23851 * optabs-query.c (can_mult_highpart_p): Likewise.
23852 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
23853 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23854 (vectorizable_bswap): Likewise.
23855 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
23856 explicit encoding for the power-of-2 permutes.
23857 (vect_permute_store_chain): Likewise.
23858 (vect_grouped_load_supported): Likewise.
23859 (vect_permute_load_chain): Likewise.
23861 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23863 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
23864 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
23865 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
23866 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
23867 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
23868 (vect_gen_perm_mask_any): Likewise.
23870 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23872 * int-vector-builder.h: New file.
23873 * vec-perm-indices.h: Include int-vector-builder.h.
23874 (vec_perm_indices): Redefine as an int_vector_builder.
23875 (auto_vec_perm_indices): Delete.
23876 (vec_perm_builder): Redefine as a stand-alone class.
23877 (vec_perm_indices::vec_perm_indices): New function.
23878 (vec_perm_indices::clamp): Likewise.
23879 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
23880 (vec_perm_indices::new_vector): New function.
23881 (vec_perm_indices::new_expanded_vector): Update for new
23882 vec_perm_indices class.
23883 (vec_perm_indices::rotate_inputs): New function.
23884 (vec_perm_indices::all_in_range_p): Operate directly on the
23885 encoded form, without computing elided elements.
23886 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
23887 encoding. Update for new vec_perm_indices class.
23888 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
23889 the given vec_perm_builder.
23890 (expand_vec_perm_var): Update vec_perm_builder constructor.
23891 (expand_mult_highpart): Use vec_perm_builder instead of
23892 auto_vec_perm_indices.
23893 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
23894 vec_perm_indices instead of auto_vec_perm_indices. Use a single
23895 or double series encoding as appropriate.
23896 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
23897 vec_perm_indices instead of auto_vec_perm_indices.
23898 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23899 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23900 (vect_permute_store_chain): Likewise.
23901 (vect_grouped_load_supported): Likewise.
23902 (vect_permute_load_chain): Likewise.
23903 (vect_shift_permute_load_chain): Likewise.
23904 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
23905 (vect_transform_slp_perm_load): Likewise.
23906 (vect_schedule_slp_instance): Likewise.
23907 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23908 (vectorizable_mask_load_store): Likewise.
23909 (vectorizable_bswap): Likewise.
23910 (vectorizable_store): Likewise.
23911 (vectorizable_load): Likewise.
23912 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
23913 vec_perm_indices instead of auto_vec_perm_indices. Use
23914 tree_to_vec_perm_builder to read the vector from a tree.
23915 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
23916 vec_perm_builder instead of a vec_perm_indices.
23917 (have_whole_vector_shift): Use vec_perm_builder and
23918 vec_perm_indices instead of auto_vec_perm_indices. Leave the
23919 truncation to calc_vec_perm_mask_for_shift.
23920 (vect_create_epilog_for_reduction): Likewise.
23921 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
23922 from auto_vec_perm_indices to vec_perm_indices.
23923 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
23924 instead of changing individual elements.
23925 (aarch64_vectorize_vec_perm_const): Use new_vector to install
23926 the vector in d.perm.
23927 * config/arm/arm.c (expand_vec_perm_d::perm): Change
23928 from auto_vec_perm_indices to vec_perm_indices.
23929 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
23930 instead of changing individual elements.
23931 (arm_vectorize_vec_perm_const): Use new_vector to install
23932 the vector in d.perm.
23933 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
23934 Update vec_perm_builder constructor.
23935 (rs6000_expand_interleave): Likewise.
23936 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
23937 (rs6000_expand_interleave): Likewise.
23939 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23941 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
23942 to qimode could truncate the indices.
23943 * optabs.c (expand_vec_perm_var): Likewise.
23945 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23947 * Makefile.in (OBJS): Add vec-perm-indices.o.
23948 * vec-perm-indices.h: New file.
23949 * vec-perm-indices.c: Likewise.
23950 * target.h (vec_perm_indices): Replace with a forward class
23952 (auto_vec_perm_indices): Move to vec-perm-indices.h.
23953 * optabs.h: Include vec-perm-indices.h.
23954 (expand_vec_perm): Delete.
23955 (selector_fits_mode_p, expand_vec_perm_var): Declare.
23956 (expand_vec_perm_const): Declare.
23957 * target.def (vec_perm_const_ok): Replace with...
23958 (vec_perm_const): ...this new hook.
23959 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
23960 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
23961 * doc/tm.texi: Regenerate.
23962 * optabs.def (vec_perm_const): Delete.
23963 * doc/md.texi (vec_perm_const): Likewise.
23964 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
23965 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
23966 expand_vec_perm for constant permutation vectors. Assert that
23967 the mode of variable permutation vectors is the integer equivalent
23968 of the mode that is being permuted.
23969 * optabs-query.h (selector_fits_mode_p): Declare.
23970 * optabs-query.c: Include vec-perm-indices.h.
23971 (selector_fits_mode_p): New function.
23972 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
23973 is defined, instead of checking whether the vec_perm_const_optab
23974 exists. Use targetm.vectorize.vec_perm_const instead of
23975 targetm.vectorize.vec_perm_const_ok. Check whether the indices
23976 fit in the vector mode before using a variable permute.
23977 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
23978 vec_perm_indices instead of an rtx.
23979 (expand_vec_perm): Replace with...
23980 (expand_vec_perm_const): ...this new function. Take the selector
23981 as a vec_perm_indices rather than an rtx. Also take the mode of
23982 the selector. Update call to shift_amt_for_vec_perm_mask.
23983 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
23984 Use vec_perm_indices::new_expanded_vector to expand the original
23985 selector into bytes. Check whether the indices fit in the vector
23986 mode before using a variable permute.
23987 (expand_vec_perm_var): Make global.
23988 (expand_mult_highpart): Use expand_vec_perm_const.
23989 * fold-const.c: Includes vec-perm-indices.h.
23990 * tree-ssa-forwprop.c: Likewise.
23991 * tree-vect-data-refs.c: Likewise.
23992 * tree-vect-generic.c: Likewise.
23993 * tree-vect-loop.c: Likewise.
23994 * tree-vect-slp.c: Likewise.
23995 * tree-vect-stmts.c: Likewise.
23996 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
23998 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
23999 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
24000 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
24001 (aarch64_vectorize_vec_perm_const): ...this new function.
24002 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24003 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24004 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
24005 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
24006 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24007 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24008 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
24010 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
24011 check for NEON modes.
24012 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
24013 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
24014 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
24015 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
24017 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
24018 the old VEC_PERM_CONST conditions.
24019 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
24020 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
24021 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
24022 (ia64_vectorize_vec_perm_const_ok): Merge into...
24023 (ia64_vectorize_vec_perm_const): ...this new function.
24024 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
24025 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
24026 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
24027 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
24028 * config/mips/mips.c (mips_expand_vec_perm_const)
24029 (mips_vectorize_vec_perm_const_ok): Merge into...
24030 (mips_vectorize_vec_perm_const): ...this new function.
24031 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
24032 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
24033 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
24034 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
24035 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
24036 (rs6000_expand_vec_perm_const): Delete.
24037 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
24039 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24040 (altivec_expand_vec_perm_const_le): Take each operand individually.
24041 Operate on constant selectors rather than rtxes.
24042 (altivec_expand_vec_perm_const): Likewise. Update call to
24043 altivec_expand_vec_perm_const_le.
24044 (rs6000_expand_vec_perm_const): Delete.
24045 (rs6000_vectorize_vec_perm_const_ok): Delete.
24046 (rs6000_vectorize_vec_perm_const): New function.
24047 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
24048 an element count and rtx array.
24049 (rs6000_expand_extract_even): Update call accordingly.
24050 (rs6000_expand_interleave): Likewise.
24051 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
24052 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
24053 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
24054 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
24055 (rs6000_expand_vec_perm_const): Delete.
24056 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24057 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24058 (altivec_expand_vec_perm_const_le): Take each operand individually.
24059 Operate on constant selectors rather than rtxes.
24060 (altivec_expand_vec_perm_const): Likewise. Update call to
24061 altivec_expand_vec_perm_const_le.
24062 (rs6000_expand_vec_perm_const): Delete.
24063 (rs6000_vectorize_vec_perm_const_ok): Delete.
24064 (rs6000_vectorize_vec_perm_const): New function. Remove stray
24065 reference to the SPE evmerge intructions.
24066 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
24067 an element count and rtx array.
24068 (rs6000_expand_extract_even): Update call accordingly.
24069 (rs6000_expand_interleave): Likewise.
24070 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
24071 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
24073 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24075 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24077 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
24078 vector mode and that that mode matches the mode of the data
24080 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
24081 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
24082 directly using expand_vec_perm_1 when forcing selectors into
24084 (expand_vec_perm_var): New function, split out from expand_vec_perm.
24086 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24088 * optabs-query.h (can_vec_perm_p): Delete.
24089 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
24090 * optabs-query.c (can_vec_perm_p): Split into...
24091 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
24092 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
24093 particular selector is valid.
24094 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24095 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24096 (vect_grouped_load_supported): Likewise.
24097 (vect_shift_permute_load_chain): Likewise.
24098 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
24099 (vect_transform_slp_perm_load): Likewise.
24100 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24101 (vectorizable_bswap): Likewise.
24102 (vect_gen_perm_mask_checked): Likewise.
24103 * fold-const.c (fold_ternary_loc): Likewise. Don't take
24104 implementations of variable permutation vectors into account
24105 when deciding which selector to use.
24106 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
24107 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
24108 with a false third argument.
24109 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
24110 to test whether the constant selector is valid and can_vec_perm_var_p
24111 to test whether a variable selector is valid.
24113 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24115 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
24116 * optabs-query.c (can_vec_perm_p): Likewise.
24117 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
24118 instead of vec_perm_indices.
24119 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
24120 (vect_gen_perm_mask_checked): Likewise,
24121 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
24122 (vect_gen_perm_mask_checked): Likewise,
24124 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24126 * optabs-query.h (qimode_for_vec_perm): Declare.
24127 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
24128 (qimode_for_vec_perm): ...this new function.
24129 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
24131 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24133 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
24134 does not have a conditional at the top.
24136 2018-01-02 Richard Biener <rguenther@suse.de>
24138 * ipa-inline.c (big_speedup_p): Fix expression.
24140 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
24143 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
24146 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
24150 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
24151 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
24152 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
24153 cond_taken_branch_cost 3->4.
24155 2018-01-01 Jakub Jelinek <jakub@redhat.com>
24157 PR tree-optimization/83581
24158 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
24159 TODO_cleanup_cfg if any changes have been made.
24161 PR middle-end/83608
24162 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
24163 convert_modes if target mode has the right side, but different mode
24166 PR middle-end/83609
24167 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
24168 last argument when extracting from CONCAT. If either from_real or
24169 from_imag is NULL, use expansion through memory. If result is not
24170 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
24171 the parts directly to inner mode, if even that fails, use expansion
24174 PR middle-end/83623
24175 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
24176 check for bswap in mode rather than HImode and use that in expand_unop
24179 Copyright (C) 2018 Free Software Foundation, Inc.
24181 Copying and distribution of this file, with or without modification,
24182 are permitted in any medium without royalty provided the copyright
24183 notice and this notice are preserved.